efficient-shell 8.17.0 → 8.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -6
- package/dist/{Browser-GZXTAL7Z.js → Browser-H5OJL6TK.js} +14 -14
- package/dist/Calculator-VHXRKH2M.js +29 -0
- package/dist/{CurrencyConverter-XK6SETYS.js → CurrencyConverter-5AIXDNF6.js} +8 -8
- package/dist/{Documents-GXYD4UD2.js → Documents-352IGNWY.js} +19 -19
- package/dist/Files-ODENHLKQ.js +87 -0
- package/dist/{Notepad-L4TKPWZ7.js → Notepad-DWPTCM2I.js} +10 -10
- package/dist/PdfViewer-456B27TB.js +1 -0
- package/dist/{PomodoroTimer-D37Y6TE7.js → PomodoroTimer-YWR6X3FT.js} +34 -34
- package/dist/{Preview-MPDXIVGC.js → Preview-LMUHIWNB.js} +49 -49
- package/dist/Sidebar-ZIHLBHKR.js +43 -0
- package/dist/{Spreadsheet-JBPWIBDY.js → Spreadsheet-DAZUBPFY.js} +13 -13
- package/dist/{Stock-ZUTJX6S6.js → Stock-C2EQYFNA.js} +7 -7
- package/dist/{Weather-4GPPPHK5.js → Weather-EZU5A7JW.js} +19 -19
- package/dist/{WorldClock-TW36BP7G.js → WorldClock-SKUEYQXU.js} +6 -6
- package/dist/ai/index.js +15 -15
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/StatTile.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-WAMBQNDN.js → chunk-2QYQDCJE.js} +14 -14
- package/dist/{chunk-T6L6HQI5.js → chunk-2RKTVTJJ.js} +1 -1
- package/dist/{chunk-42U4LJT7.js → chunk-2VFRVO3N.js} +26 -26
- package/dist/{chunk-B4LK7WL6.js → chunk-2YZ3ITNG.js} +2 -2
- package/dist/{chunk-CP6Q24MP.js → chunk-2ZIVFBJN.js} +8 -8
- package/dist/{chunk-LJSJFS2M.js → chunk-37DRDM4D.js} +12 -12
- package/dist/{chunk-2VLQECPC.js → chunk-3NU2B2WM.js} +9 -9
- package/dist/{chunk-QV2GME3Y.js → chunk-3XLDWJDG.js} +6 -6
- package/dist/{chunk-VJPJNCB4.js → chunk-42BBJJDP.js} +2 -1
- package/dist/{chunk-TWWJLFTD.js → chunk-4JCNWUVZ.js} +4 -4
- package/dist/{chunk-7UBV5MPQ.js → chunk-4NB3WHWK.js} +1 -1
- package/dist/{chunk-O6TKI4F5.js → chunk-4S724CEA.js} +1 -1
- package/dist/{chunk-S2ONNZVX.js → chunk-56CQPUIJ.js} +15 -15
- package/dist/{chunk-CASSD64W.js → chunk-5N6VSOZV.js} +5 -5
- package/dist/chunk-5QFPTDQF.js +1 -0
- package/dist/{chunk-UL4WB3VH.js → chunk-5WYCXSUM.js} +1 -1
- package/dist/{chunk-NIULZZAI.js → chunk-6EAVTBKE.js} +1 -1
- package/dist/{chunk-XF2NZVXW.js → chunk-6JLZMVVE.js} +6 -6
- package/dist/{chunk-RECXXFYW.js → chunk-6MN2JR25.js} +8 -8
- package/dist/{chunk-JHXYW542.js → chunk-6OPAUSMV.js} +3 -3
- package/dist/{chunk-2M5JD52X.js → chunk-6YPZHG7O.js} +2 -2
- package/dist/{chunk-SDIGC5NU.js → chunk-73FD77RD.js} +1 -1
- package/dist/{chunk-KIGGG3LT.js → chunk-7F5FURAC.js} +1 -1
- package/dist/{chunk-QP2S2K2Y.js → chunk-7GCBMTP2.js} +3 -3
- package/dist/{chunk-PRR2GXBV.js → chunk-7NOU275V.js} +2 -2
- package/dist/{chunk-IJMV4F2Q.js → chunk-A3MOA3T7.js} +1 -1
- package/dist/{chunk-OS57C5J7.js → chunk-A3R6DKQ5.js} +1 -1
- package/dist/{chunk-KLAZTKN2.js → chunk-AAYACT5T.js} +4 -4
- package/dist/{chunk-Y3XH4HJQ.js → chunk-ABD34D3N.js} +3 -3
- package/dist/chunk-AG3ALTVD.js +20 -0
- package/dist/chunk-AJOWAZ46.js +1 -0
- package/dist/{chunk-LI7D6SMK.js → chunk-APMBWBD7.js} +1 -1
- package/dist/{chunk-UWHGJTAL.js → chunk-B6BE4WSP.js} +6 -6
- package/dist/chunk-BE4APEUI.js +2 -0
- package/dist/{chunk-OU3ITBK5.js → chunk-BG5BCF64.js} +6 -6
- package/dist/{chunk-ENSA3NAS.js → chunk-BJGD2ZWK.js} +1 -1
- package/dist/{chunk-O3WSAR62.js → chunk-BVDGHZ4H.js} +1 -1
- package/dist/{chunk-7KYFOYC7.js → chunk-CG4KTWP4.js} +5 -5
- package/dist/chunk-CGY5RNAF.js +3 -0
- package/dist/chunk-CKDFXYYY.js +8 -0
- package/dist/{chunk-XTPDXB4X.js → chunk-DBBUHXRT.js} +1 -1
- package/dist/{chunk-XKCEVZZB.js → chunk-DGTP6BGV.js} +1 -1
- package/dist/{chunk-CTB634WT.js → chunk-DQEST7MN.js} +1 -1
- package/dist/{chunk-QIEMOYTG.js → chunk-DTJQHW3Q.js} +1 -1
- package/dist/chunk-EA37JL6P.js +3 -0
- package/dist/{chunk-PSOHSTXL.js → chunk-EFUQ4KAH.js} +1 -1
- package/dist/{chunk-GATOVTJT.js → chunk-EJNFOBE3.js} +4 -4
- package/dist/{chunk-SWSN3HZX.js → chunk-EO2XHSIK.js} +2 -2
- package/dist/{chunk-HEJTHEXN.js → chunk-EOPPYQIT.js} +1 -1
- package/dist/{chunk-76YDO3KA.js → chunk-F2HM7SV4.js} +1 -1
- package/dist/{chunk-KSYNJTVA.js → chunk-FJUFQXDS.js} +20 -20
- package/dist/chunk-FNQJO3HZ.js +11 -0
- package/dist/{chunk-EDYCBXWD.js → chunk-FTQ5DH5U.js} +7 -7
- package/dist/chunk-GTRUBA2R.js +1 -0
- package/dist/chunk-GVKFLNRP.js +12 -0
- package/dist/{chunk-YYUICWSB.js → chunk-GVYJYXVH.js} +7 -7
- package/dist/{chunk-KBHC4VLA.js → chunk-HAZLMRTT.js} +1 -1
- package/dist/{chunk-PDPBIDHF.js → chunk-HBBTB6RW.js} +1 -1
- package/dist/{chunk-2LKH6JM5.js → chunk-HIDOSOI4.js} +1 -1
- package/dist/{chunk-MH4EUGAB.js → chunk-HKAWQF7O.js} +7 -7
- package/dist/{chunk-HEM6NC23.js → chunk-HKTU536H.js} +1 -1
- package/dist/{chunk-4B7ZRWDA.js → chunk-HMA4ZSCS.js} +1 -1
- package/dist/{chunk-IH2DJOTW.js → chunk-HNFLUVVM.js} +10 -10
- package/dist/{chunk-S3RTAWEU.js → chunk-HQIUFRWO.js} +13 -13
- package/dist/{chunk-BMBQ3IX3.js → chunk-HQNR4JQG.js} +1 -1
- package/dist/{chunk-5BLAPU7W.js → chunk-I5T3A4KI.js} +1 -1
- package/dist/chunk-IC72MGON.js +1 -0
- package/dist/{chunk-WKSVUJZA.js → chunk-JBMGI5YX.js} +3 -3
- package/dist/{chunk-SNDYD76W.js → chunk-JLDGZFNY.js} +10 -10
- package/dist/chunk-JSOO4O5K.js +10 -0
- package/dist/chunk-JSVYN6D6.js +3 -0
- package/dist/{chunk-4AFNDOPF.js → chunk-K2DUF2AR.js} +1 -1
- package/dist/{chunk-BGVN7HOZ.js → chunk-K5UPORAA.js} +2 -2
- package/dist/{chunk-HPQ56MKK.js → chunk-KH6GERFP.js} +1 -1
- package/dist/{chunk-ION2GBY3.js → chunk-KIYO4U4T.js} +12 -12
- package/dist/{chunk-YO52QEKT.js → chunk-KW4VUPJV.js} +9 -9
- package/dist/chunk-LACL4MAR.js +1 -0
- package/dist/{chunk-2DGTGJYJ.js → chunk-LAHK4WVH.js} +7 -7
- package/dist/{chunk-4EIGXW4U.js → chunk-LDHYCVMV.js} +1 -1
- package/dist/{chunk-EKFIRCNP.js → chunk-LJVLMM3Q.js} +8 -8
- package/dist/{chunk-RQARJHDB.js → chunk-LWGNNVDA.js} +1 -1
- package/dist/{chunk-2OTCFJCU.js → chunk-M7JJOCBU.js} +1 -1
- package/dist/{chunk-ZEDYXP2J.js → chunk-MKTO2FHK.js} +1 -1
- package/dist/chunk-MNQ6EPAR.js +9 -0
- package/dist/{chunk-VAACOJ2H.js → chunk-MPN267PR.js} +1 -1
- package/dist/{chunk-PK4ZY4GZ.js → chunk-NADUURUA.js} +3 -3
- package/dist/{chunk-EDEQRSJC.js → chunk-NQ46AZ3D.js} +1 -1
- package/dist/{chunk-EVKBV6IV.js → chunk-NU55QIUV.js} +1 -1
- package/dist/{chunk-5GHLKEJQ.js → chunk-O5PJELY7.js} +1 -1
- package/dist/chunk-OLFYNMTD.js +1 -0
- package/dist/{chunk-CD6PGAYP.js → chunk-P5ILG2DA.js} +1 -1
- package/dist/{chunk-OHHJF547.js → chunk-P5QRK7WD.js} +1 -1
- package/dist/{chunk-PG665FWX.js → chunk-PEEVPAIJ.js} +9 -9
- package/dist/{chunk-E4YSP5RD.js → chunk-Q6BY4BME.js} +2 -2
- package/dist/{chunk-LC52BB6N.js → chunk-QAR4NYW6.js} +1 -1
- package/dist/{chunk-35DHYR37.js → chunk-QCP4F6EF.js} +1 -1
- package/dist/{chunk-T2VNNW6Z.js → chunk-QMLG5XKP.js} +7 -7
- package/dist/chunk-QSVKEONU.js +2 -0
- package/dist/{chunk-TUT6SGH2.js → chunk-QSW26NAH.js} +1 -1
- package/dist/{chunk-UWNL4FO2.js → chunk-QTK5NV7L.js} +1 -1
- package/dist/{chunk-6AKXEUZA.js → chunk-QTNPOMXM.js} +5 -5
- package/dist/chunk-QYGBWH5J.js +15 -0
- package/dist/{chunk-C4D4L2E5.js → chunk-RPY7FBYY.js} +1 -1
- package/dist/{chunk-SEFPZXO5.js → chunk-S2PKTGHB.js} +6 -6
- package/dist/{chunk-HHXP34PV.js → chunk-SACUPX6L.js} +4 -4
- package/dist/{chunk-LT2MMSHH.js → chunk-SGVIMTN6.js} +16 -16
- package/dist/{chunk-PMJMPYLQ.js → chunk-SLC3KT7F.js} +4 -4
- package/dist/{chunk-LR2X6MKB.js → chunk-SS7BG7BS.js} +1 -1
- package/dist/{chunk-RD5UPROC.js → chunk-TDAFCJY7.js} +6 -6
- package/dist/{chunk-HXXUMKTV.js → chunk-TF3E5J3Y.js} +1 -1
- package/dist/chunk-TQP3L4OC.js +7 -0
- package/dist/{chunk-TLZVEW34.js → chunk-TSOK3QNK.js} +4 -4
- package/dist/chunk-U5KIRPLV.js +2 -0
- package/dist/chunk-U5YJREQJ.js +14 -0
- package/dist/{chunk-QQVLFDX6.js → chunk-UB6TIA2R.js} +4 -4
- package/dist/{chunk-QGU24ERZ.js → chunk-UJULZQM2.js} +1 -1
- package/dist/{chunk-XZLBPVRH.js → chunk-UNDHDLWB.js} +1 -1
- package/dist/chunk-UPHXYWL6.js +15 -0
- package/dist/{chunk-7KZ65FSA.js → chunk-USE4HNZ2.js} +1 -1
- package/dist/{chunk-7IHH5CDD.js → chunk-V5GDA4I6.js} +3 -3
- package/dist/{chunk-JIJOXLDJ.js → chunk-V7NVQ3Z7.js} +1 -1
- package/dist/{chunk-GLVEL6AQ.js → chunk-VKLVHULL.js} +9 -9
- package/dist/chunk-VLKDWKVR.js +1 -0
- package/dist/chunk-VSQSBY2P.js +5 -0
- package/dist/chunk-W4YNYZDQ.js +6 -0
- package/dist/{chunk-TYEXEETI.js → chunk-WDIFRAQM.js} +5 -5
- package/dist/chunk-WEJFTUS7.js +9 -0
- package/dist/{chunk-65HOBHY7.js → chunk-WOHOIJRZ.js} +3 -3
- package/dist/{chunk-AGPQEI3I.js → chunk-WVSLFX37.js} +7 -7
- package/dist/{chunk-BUDBBIKN.js → chunk-WVWIRII2.js} +9 -9
- package/dist/chunk-XDG2RWUO.js +2 -0
- package/dist/{chunk-MV7WC6SL.js → chunk-XINUGME7.js} +45 -45
- package/dist/{chunk-EPGKTANF.js → chunk-XW56UIDQ.js} +6 -6
- package/dist/{chunk-VANXHWGP.js → chunk-Y67ILJVG.js} +1 -1
- package/dist/{chunk-PEELLEPP.js → chunk-YFY2LSWZ.js} +6 -6
- package/dist/{chunk-FARRGETL.js → chunk-YGITR6I5.js} +1 -1
- package/dist/chunk-YULJ7F6Z.js +19 -0
- package/dist/{chunk-PRXPLEVZ.js → chunk-Z3ZIVVKE.js} +1 -1
- package/dist/{chunk-R6XC7X63.js → chunk-Z7PS4QUO.js} +6 -6
- package/dist/{chunk-PPSIMRJM.js → chunk-ZGCLFQS5.js} +7 -7
- package/dist/{chunk-DVFMCVI5.js → chunk-ZSRYQW64.js} +3 -3
- package/dist/{chunk-YT32RSS6.js → chunk-ZVK74ERI.js} +1 -1
- package/dist/{chunk-6EJ7G234.js → chunk-ZVY4J3PU.js} +7 -7
- package/dist/chunk-ZWQRFYE6.js +11 -0
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.d.ts +24 -0
- package/dist/forms/MediaUsedInList.js +2 -0
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaMoveItems.d.ts +31 -0
- package/dist/forms/mediaMoveItems.js +2 -0
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useGridSelection.d.ts +70 -0
- package/dist/hooks/useGridSelection.js +2 -0
- package/dist/hooks/useMarquee.d.ts +68 -0
- package/dist/hooks/useMarquee.js +2 -0
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.js +695 -694
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +4 -4
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/ContextMenu.d.ts +12 -4
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.d.ts +18 -2
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.d.ts +32 -0
- package/dist/shell/ImageLightbox.js +2 -0
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MarqueeBox.d.ts +17 -0
- package/dist/shell/MarqueeBox.js +1 -0
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.d.ts +9 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/ZoomableImage.d.ts +49 -0
- package/dist/shell/ZoomableImage.js +2 -0
- package/dist/shell/contextMenuTarget.d.ts +30 -4
- package/dist/shell/contextMenuTarget.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +23 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +10 -2
- package/dist/ui/index.js +1 -1
- package/dist/utils/edgeScroll.d.ts +25 -0
- package/dist/utils/edgeScroll.js +1 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-TYZWIYJW.js +0 -29
- package/dist/Files-OYZXQMRA.js +0 -87
- package/dist/PdfViewer-Q7IS273H.js +0 -1
- package/dist/Sidebar-F4LYK5XP.js +0 -43
- package/dist/chunk-26DGOAPH.js +0 -14
- package/dist/chunk-3S52QOEP.js +0 -20
- package/dist/chunk-62LFDQGF.js +0 -15
- package/dist/chunk-6TWRV44R.js +0 -15
- package/dist/chunk-7GU3LUMW.js +0 -11
- package/dist/chunk-7IF3RZF3.js +0 -15
- package/dist/chunk-7UEFFCQV.js +0 -12
- package/dist/chunk-ARC3R4I2.js +0 -3
- package/dist/chunk-B3LWYJS7.js +0 -2
- package/dist/chunk-GLCKZI3N.js +0 -1
- package/dist/chunk-GZCAFWWB.js +0 -1
- package/dist/chunk-LPYFS4RV.js +0 -19
- package/dist/chunk-OVNRVFWS.js +0 -1
- package/dist/chunk-R6N26ITY.js +0 -5
- package/dist/chunk-RKWGWBET.js +0 -9
- package/dist/chunk-TB3AK6XF.js +0 -2
- package/dist/chunk-XMGXVMVS.js +0 -6
- package/dist/chunk-Y4NIZQNT.js +0 -8
- package/dist/chunk-YEY6YPTM.js +0 -2
- package/dist/chunk-ZOGEAYWJ.js +0 -9
- /package/dist/{chunk-4MNNVSHD.js → chunk-PCGZS6S4.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return(new Date).toISOString()}var
|
|
1
|
+
import{toast_default as t}from"./chunk-HIDOSOI4.js";import{useShellPrefs as e}from"./chunk-KC3EX26K.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(F(),R()):"none"!==t&&0!==m||F()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&R())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),F())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);F(),N(s,{volume:u,repeat:d});const e="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(e)}catch{}try{t.info(e)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function N(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>P(t,n),2500*e)}function P(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,O={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function _(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function R(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=_(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*O[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function F(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function G(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=_(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*O[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var V="pomodoro_tasks",j="pomodoro_tasks_migrated";function E(){return Math.random().toString(36).slice(2,11)}function K(){/* @__PURE__ */
|
|
2
|
+
return(new Date).toISOString()}var W=null,q=[],H=!1,J=null,L=/* @__PURE__ */new Set;function X(){for(const t of L)t()}function $(t){q=t,X()}function z(){const t=W;return t?J=t.list().then(e=>{W===t&&(q=e,H=!0,X())}).catch(()=>{W===t&&(H=!0,X())}).finally(()=>{J=null}):(q=[],H=!0,X(),Promise.resolve())}function Q(t){W=t,q=[],H=!1,t?z():X()}function U(t){return L.add(t),!W||H||J||z(),()=>{L.delete(t)}}function Y(){return q}function Z(){const t=function(){const{prefs:t,save:n}=e(),r=a(()=>{const e=t.todo_tasks;return Array.isArray(e)?e:[]},[t.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=E(),n=K(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:K()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(U,Y,Y),i=o(e=>{const n=W;if(!n)return t.addTask(e);const o="tmp-"+E(),a=K(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return $([...q,r]),n.create({...e,name:e.name.trim()}).then(t=>$(q.map(e=>e.id===o?{...r,...t}:e))).catch(()=>$(q.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=W;if(!o)return t.updateTask(e,n);$(q.map(t=>t.id===e?{...t,...n,id:e,updatedAt:K()}:t)),o.update(e,n).catch(()=>{z()})},[t]),l=o(e=>{const n=W;if(!n)return t.removeTask(e);const o=q;$(q.filter(t=>t.id!==e)),n.remove(e).catch(()=>$(o))},[t]),s=o(e=>{if(!W)return t.toggleDone(e);const n=q.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=o(e=>{W||t.setAllTasks(e)},[t]);return null===W?t:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(j))return;const n=localStorage.getItem(V);if(!n)return void localStorage.setItem(j,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(V),void localStorage.setItem(j,"1");const a=K(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||E(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(V),localStorage.setItem(j,"1")}catch{try{localStorage.setItem(j,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,N as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,G as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,Q as setShellTodoProvider,S as subscribePomo,Z as useTodoTasks};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ShellStringsProvider as t}from"./chunk-
|
|
1
|
+
import{ShellStringsProvider as t}from"./chunk-GTRUBA2R.js";import{createContext as e,useEffect as a,useCallback as n,useMemo as r,useContext as l}from"react";import{jsx as o}from"react/jsx-runtime";var g={tag:"en",name:"English",locale:null},c="react-os-shell:language",u=t=>"string"==typeof t?t:t.tag;function i(t){try{const e=new Intl.Locale(t).maximize();return{language:e.language,script:e.script}}catch{return null}}function s(t,e){const a=e.map(u),n=t.toLowerCase(),r=a.find(t=>t.toLowerCase()===n);if(r)return r;const l=i(t);if(!l)return;const o=a.map(t=>({tag:t,parts:i(t)})).filter(t=>t.parts?.language===l.language);return(o.find(t=>t.parts?.script===l.script)??o[0])?.tag}function f(){try{return globalThis.localStorage?.getItem(c)??null}catch{return null}}function m(t){try{return globalThis.localStorage?.setItem(c,t),globalThis.localStorage?.getItem(c)===t}catch{return!1}}function h({offered:t,fallback:e,saved:a=f(),preferred:n=globalThis.navigator?.languages??[]}){const r=e??(t.length>0?u(t[0]):g.tag);if(a){const e=s(a,t);if(e)return e}for(const e of n){const a=s(e,t);if(a)return a}return r}var d=e({language:g.tag,languages:[g],setLanguage:async()=>{}}),p=()=>globalThis.location?.reload();function b({languages:e,language:l,strings:g,onChange:c,reload:u=p,children:i}){const s=e.find(t=>t.tag===l),f=s?void 0===s.locale?s.tag:s.locale??void 0:void 0;a(()=>{const t=globalThis.document?.documentElement;if(!t)return;const e=t.getAttribute("lang");return t.setAttribute("lang",l),()=>{null===e?t.removeAttribute("lang"):t.setAttribute("lang",e)}},[l]);const h=n(async t=>{if(t!==l&&e.some(e=>e.tag===t)){m(t);try{await(c?.(t))}catch{}u&&u()}},[l,e,c,u]),b=r(()=>({language:l,languages:e,setLanguage:h}),[l,e,h]);/* @__PURE__ */
|
|
2
2
|
return o(d.Provider,{value:b,children:/* @__PURE__ */o(t,{value:g,locale:f,children:i})})}function v(){return l(d)}export{g as ENGLISH,c as SHELL_LANGUAGE_STORAGE_KEY,b as ShellLanguageProvider,s as matchShellLanguage,f as readSavedShellLanguage,h as resolveShellLanguage,m as saveShellLanguage,v as useShellLanguage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-GLCKZI3N.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,Z=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},_=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{_(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],N=[800,1800],B=e=>{document.prerendering?E(()=>B(e)):"complete"!==document.readyState?addEventListener("load",()=>B(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},K=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,J=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;_(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,N,t.reportAllChanges);B(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,N,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,N,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(K,"[redacted]").replace(J,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
|
|
1
|
+
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-AJOWAZ46.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],A=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},P=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,Z=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},_=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{_(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var O=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,U=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,W=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,V=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&U.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&O.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;_(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();A(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,P,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,P,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),A(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(W,"[url]").replace(V,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-X3II54HU.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-P5BOTIJU.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-X3II54HU.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-P5BOTIJU.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-GTRUBA2R.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),I=y??M.nothingToBreakDown,[N,w]=u(null),{highlighted:R}=r(),U=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",U),0===U.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:I});const A=Math.max(...U.map(e=>e.depth))+1,B=f/2,C=f/2,E=(f/2-8-b)/A,L=U.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),T=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,z=e=>null!==N?e.id===N:null===R||e.branchKey===R,F=N?U.find(e=>e.id===N):void 0,H=e=>c(e.value/L*100,1,$);/* @__PURE__ */
|
|
2
2
|
return d("div",{className:`relative ${g??""}`,children:[
|
|
3
|
-
/* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(
|
|
4
|
-
/* @__PURE__ */s(e,{caption:M.sunburst(j(
|
|
3
|
+
/* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(L),A),onMouseLeave:()=>w(null),children:[U.map(e=>/* @__PURE__ */s("path",{d:t(B,C,b+e.depth*E+v/2,b+(e.depth+1)*E-v/2,e.start,e.end),fill:T(e),fillOpacity:z(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>w(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:B,y:C+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),F&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:F.label,rows:[{key:"value",label:M.value,color:T(F),value:j(F.value)},{key:"share",label:M.share,color:a.muted,value:H(F)}]})}),
|
|
4
|
+
/* @__PURE__ */s(e,{caption:M.sunburst(j(L),A),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:U.map(e=>[e.depth+1,e.label,j(e.value),H(e)])})]})}export{f as SunburstChart};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-2LXTJXWC.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-
|
|
2
|
-
return s(e,{content:z??
|
|
1
|
+
import{Tooltip as e}from"./chunk-2LXTJXWC.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-GTRUBA2R.js";import{useRef as o,useEffect as n,useCallback as i}from"react";import{jsx as s}from"react/jsx-runtime";var a=(e,r,t)=>Math.min(t,Math.max(r,e));function l(e,r,t,o,n){return Math.round(a("left"===t||"top"===t?e+r:e-r,o,n))}function u(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:a(n,r,t)}function c({width:c,onResize:d,orientation:h="vertical",side:m,min:f,max:p,defaultWidth:v=f,step:g=16,storageKey:b,label:w,hint:z,controls:y,className:x=""}){const P="horizontal"===h,k=t().resizeHandle,N=o(null),T=o({onResize:d,min:f,max:p,side:m});T.current={onResize:d,min:f,max:p,side:m},r(()=>{if(!b)return;const e=u(b,f,p);null!==e&&e!==c&&d(e)},[b]),n(()=>{if(!b)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(b,String(Math.round(c)))}catch{}},200);return()=>window.clearTimeout(e)},[c,b]);const C=i(()=>{N.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>C,[C]);const D=e=>{N.current&&(e.currentTarget.hasPointerCapture?.(N.current.pointer)&&e.currentTarget.releasePointerCapture(N.current.pointer),C())},M="left"===m?"right-0":"right"===m?"left-0":"top"===m?"bottom-0":"top-0",R="left"===m?"right":"right"===m?"left":"top"===m?"bottom":"top",I=P?`absolute inset-x-0 ${M} z-10 flex h-2`:`absolute inset-y-0 ${M} z-10 flex w-2`;/* @__PURE__ */
|
|
2
|
+
return s(e,{content:z??k.hint,side:R,delay:600,className:`${I} ${x}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":h,"aria-label":w??k.label,"aria-valuenow":Math.round(c),"aria-valuemin":f,"aria-valuemax":p,"aria-controls":y,"data-resize-handle":m,onPointerDown:e=>{0===e.button&&(e.preventDefault(),N.current={x:P?e.clientY:e.clientX,width:c,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=P?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=N.current;if(!r)return;if(0===e.buttons)return void C();const t=(P?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:s}=T.current;o(l(r.width,t,s,n,i))},onPointerUp:D,onPointerCancel:D,onLostPointerCapture:()=>{N.current&&C()},onDoubleClick:()=>d(a(v,f,p)),onKeyDown:e=>{const r=P?"ArrowDown":"ArrowRight",t=P?"ArrowUp":"ArrowLeft",o=e.key===r?g:e.key===t?-g:null,n=null!==o?l(c,o,m,f,p):"Home"===e.key?f:"End"===e.key?p:"Enter"===e.key?a(v,f,p):null;null!==n&&(e.preventDefault(),n!==c&&d(n))},className:P?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:P?`absolute inset-x-0 ${M} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${M} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}export{c as ResizeHandle,u as readStoredWidth,l as resizedWidth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-GTRUBA2R.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as r,jsxs as n}from"react/jsx-runtime";var i={danger:"bg-red-600 text-white",neutral:"bg-gray-600 text-white",accent:"bg-blue-600 text-white"};function a({count:a=0,max:l=99,dot:s=!1,tone:o="danger",showZero:c=!1,children:m,className:u=""}){const h=s||a>0||0===a&&c,d=e(),x=a>l?`${t(l,d)}+`:t(a,d),f=m?"":u,g=h?/* @__PURE__ */r("span",s?{className:`block h-2.5 w-2.5 rounded-full ring-2 ring-white ${i[o]} ${f}`.trim(),"aria-hidden":m?"true":void 0}:{className:`flex h-5 min-w-[1.25rem] items-center justify-center whitespace-nowrap rounded-full px-1 text-xs font-semibold tabular-nums ring-2 ring-white ${i[o]} ${f}`.trim(),children:x}):null;return m?/* @__PURE__ */n("span",{className:`relative inline-flex ${u}`.trim(),children:[m,g&&/* @__PURE__ */r("span",{className:"absolute -right-1.5 -top-1.5 flex",children:g})]}):g}export{a as CountBadge};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tabs as e}from"./chunk-4G5M752L.js";import{Card as a}from"./chunk-
|
|
1
|
+
import{Tabs as e}from"./chunk-4G5M752L.js";import{Card as a}from"./chunk-TDAFCJY7.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-5SULG7D5.js";import{Button_default as l}from"./chunk-UDD7GB4F.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
|
|
2
2
|
return d(r,{groups:n,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */s("div",{className:"mx-auto max-w-5xl space-y-4",children:[
|
|
3
3
|
/* @__PURE__ */s("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Gallery"}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{IconButton_default as e}from"./chunk-HMZLRXLA.js";import{Icon as l}from"./chunk-
|
|
2
|
-
return n(a,{content:e,children:l},l.key??void 0)}function m({offered:a,pressed:d,onMark:m,color:g,linkOpen:w=!1,last:f,alignment:k,list:v,letterCase:N,disabled:C=!1,"aria-label":y,windows:
|
|
1
|
+
import{IconButton_default as e}from"./chunk-HMZLRXLA.js";import{Icon as l}from"./chunk-42BBJJDP.js";import{Tooltip as a}from"./chunk-2LXTJXWC.js";import{useShellStrings as r}from"./chunk-GTRUBA2R.js";import{jsx as n,jsxs as o,Fragment as s}from"react/jsx-runtime";var i=e=>e.preventDefault(),t=e=>null!=e&&!1!==e,d=["bold","italic","underline","strike","link","sup","sub","code"],c=["left","center","right","justify"];function u(e,l,a){const r={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===r||0===l.length)return;const n=[...e.currentTarget.querySelectorAll('[role="radio"]')],o=n.findIndex(l=>l===e.target||l.contains(e.target));if(o<0)return;e.preventDefault();const s=n.length,i="first"===r?0:"last"===r?s-1:(o+r+s)%s;n[i].disabled||(a(l[i]),n[i].focus())}function h(e,l){const a=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:a,link:a+(l?1:0)}}function p({offered:e,color:l,last:a,alignment:r,list:n,letterCase:o}){const s=d.filter(l=>e.has(l)).length+(l?1:0)+(t(a)?1:0),i=(r?c.filter(e=>r.allow.includes(e)).length:0)+(n&&e.has("bullet")?1:0)+(n&&e.has("number")?1:0)+(e.has("quote")?1:0)+(o?3:0);return{words:s>0,paragraph:i>0,oneRow:s>0&&i>0&&s+1+i<=9,flow:s>0&&i>0&&s+1+i>9&&s<=7,cells:{words:s,paragraph:i}}}function b(e,l){/* @__PURE__ */
|
|
2
|
+
return n(a,{content:e,children:l},l.key??void 0)}function m({offered:a,pressed:d,onMark:m,color:g,linkOpen:w=!1,last:f,alignment:k,list:v,letterCase:N,disabled:C=!1,"aria-label":y,windows:D,className:M="",layout:x="grid"}){const j=r().textToolbar,L=p({offered:a,color:g,last:f,alignment:k,list:v,letterCase:N});if(!L.words&&!L.paragraph)return null;const R=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,A=(l,r,o,s)=>a.has(l)?b(r,/* @__PURE__ */n(e,"link"===l?{pressed:w,className:R(w),"aria-label":r,"aria-haspopup":"dialog","aria-expanded":w,"aria-keyshortcuts":s,disabled:C,onMouseDown:i,onClick:()=>m(l),children:o}:{className:R(Boolean(d[l])),"aria-label":r,"aria-pressed":Boolean(d[l]),"aria-keyshortcuts":s,disabled:C,onMouseDown:i,onClick:()=>m(l),children:o},l)):null,B=[["left",j.alignLeft,/* @__PURE__ */n(l,{name:"align-left"})],["center",j.alignCenter,/* @__PURE__ */n(l,{name:"align-center"})],["right",j.alignRight,/* @__PURE__ */n(l,{name:"align-right"})],["justify",j.alignJustify,/* @__PURE__ */n(l,{name:"align-justify"})]],q=k?c.filter(e=>k.allow.includes(e)):[],T=k&&q.includes(k.value)?k.value:q[0],$=[["none",j.caseNone,/* @__PURE__ */n(l,{name:"case-normal"})],["upper",j.caseUpper,/* @__PURE__ */n(l,{name:"case-upper"})],["lower",j.caseLower,/* @__PURE__ */n(l,{name:"case-lower"})]],I=/* @__PURE__ */o(s,{children:[A("bold",j.bold,/* @__PURE__ */n(l,{name:"bold"}),"Meta+B"),A("italic",j.italic,/* @__PURE__ */n(l,{name:"italic"}),"Meta+I"),A("underline",j.underline,/* @__PURE__ */n(l,{name:"underline"}),"Meta+U"),A("strike",j.strike,/* @__PURE__ */n(l,{name:"strike"})),g?b(j.color,/* @__PURE__ */n(e,{pressed:g.open,className:R(g.open,"rosh-tb-color"),"aria-label":j.color,"aria-haspopup":"dialog","aria-expanded":g.open,disabled:C,style:g.run?{"--rosh-tb-run":g.run}:void 0,onMouseDown:i,onClick:g.onToggle,children:/* @__PURE__ */n(l,{name:"text-color"})},"color")):null,A("link",j.link,/* @__PURE__ */n(l,{name:"link"}),"Meta+K"),A("sup",j.sup,/* @__PURE__ */n(l,{name:"superscript"})),A("sub",j.sub,/* @__PURE__ */n(l,{name:"subscript"})),A("code",j.code,/* @__PURE__ */n(l,{name:"code"})),t(f)?f:null]}),J=/* @__PURE__ */o(s,{children:[k&&q.length>0?/* @__PURE__ */n("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":j.alignment,onKeyDown:e=>u(e,q,e=>k.onChange(e)),children:B.map(([l,a,r])=>k.allow.includes(l)?b(a,/* @__PURE__ */n(e,{role:"radio",pressed:k.value===l,className:R(k.value===l),"aria-checked":k.value===l,"aria-label":a,tabIndex:l===T?0:-1,disabled:C||k.disabled,onMouseDown:i,onClick:()=>k.onChange(l),children:r},l)):null)}):null,v&&a.has("bullet")?b(j.bullet,/* @__PURE__ */n(e,{className:R("bullet"===v.pressed),"aria-label":j.bullet,"aria-pressed":"bullet"===v.pressed,disabled:C,onMouseDown:i,onClick:()=>v.onList("bullet"),children:/* @__PURE__ */n(l,{name:"list"})},"bullet")):null,v&&a.has("number")?b(j.number,/* @__PURE__ */n(e,{className:R("number"===v.pressed),"aria-label":j.number,"aria-pressed":"number"===v.pressed,disabled:C,onMouseDown:i,onClick:()=>v.onList("number"),children:/* @__PURE__ */n(l,{name:"numbered-list"})},"number")):null,A("quote",j.quote,/* @__PURE__ */n(l,{name:"quote"})),N?/* @__PURE__ */n("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":j.letterCase,onKeyDown:e=>u(e,$.map(([e])=>e),e=>N.onChange(e)),children:$.map(([l,a,r])=>b(a,/* @__PURE__ */n(e,{role:"radio",pressed:N.value===l,className:R(N.value===l),"aria-checked":N.value===l,"aria-label":a,tabIndex:l===(N.value||"none")?0:-1,disabled:C||N.disabled,onMouseDown:i,onClick:()=>N.onChange(N.value===l?"":l),children:r},l)))}):null]}),S="row"===x,U=S?" is-row":L.flow?" is-flow":L.oneRow?" is-one-row":L.words&&void 0===f?" is-eight":"",K=h(a,Boolean(g)),X={"--rosh-tb-color-col":String(K.color),"--rosh-tb-link-col":String(K.link),...S?{"--rosh-tb-cells":String(L.cells.words+L.cells.paragraph),"--rosh-tb-groupgap":L.words&&L.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let H;return H=S?/* @__PURE__ */o("div",{className:"rosh-tb-row is-row",children:[L.words?/* @__PURE__ */n("div",{className:"rosh-tb-words",children:I}):null,L.paragraph?/* @__PURE__ */n("div",{className:"rosh-tb-para",children:J}):null]}):L.flow?/* @__PURE__ */o("div",{className:"rosh-tb-row is-flow",children:[I,
|
|
3
3
|
/* @__PURE__ */n("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),J]}):L.oneRow?/* @__PURE__ */o("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
4
|
/* @__PURE__ */n("div",{className:"rosh-tb-words",children:I}),
|
|
5
|
-
/* @__PURE__ */n("div",{className:"rosh-tb-para",children:J})]}):/* @__PURE__ */o(s,{children:[L.words?/* @__PURE__ */n("div",{className:"rosh-tb-row"+(void 0===f?" is-eight":""),children:I}):null,L.paragraph?/* @__PURE__ */n("div",{className:"rosh-tb-row",children:J}):null]}),/* @__PURE__ */o("div",{className:`rosh-tb-wrap${
|
|
6
|
-
/* @__PURE__ */n("div",{className:"rosh-tb",role:"toolbar","aria-label":y??j.formatting,children:
|
|
5
|
+
/* @__PURE__ */n("div",{className:"rosh-tb-para",children:J})]}):/* @__PURE__ */o(s,{children:[L.words?/* @__PURE__ */n("div",{className:"rosh-tb-row"+(void 0===f?" is-eight":""),children:I}):null,L.paragraph?/* @__PURE__ */n("div",{className:"rosh-tb-row",children:J}):null]}),/* @__PURE__ */o("div",{className:`rosh-tb-wrap${U} ${M}`.trim(),style:X,children:[
|
|
6
|
+
/* @__PURE__ */n("div",{className:"rosh-tb",role:"toolbar","aria-label":y??j.formatting,children:H}),D]})}export{m as TextToolbar,p as textToolbarRows,h as textToolbarWindowColumns};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{MOTION as e,stagger as a}from"./chunk-465RRWBY.js";import{autoHighlightIndex as t}from"./chunk-CNYAHYE6.js";import{seriesColor as s,STATUS_VARS as l,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as r}from"./chunk-
|
|
2
|
-
return o("p",{className:`text-sm text-gray-500 ${k??""}`,children:
|
|
3
|
-
return o("ol",{className:`m-0 list-none p-0 ${k??""}`,style:{display:"grid",rowGap:`${Math.max(4,y-f)}px`},children:c.map((t,i)=>{const r=t.key===
|
|
1
|
+
import{MOTION as e,stagger as a}from"./chunk-465RRWBY.js";import{autoHighlightIndex as t}from"./chunk-CNYAHYE6.js";import{seriesColor as s,STATUS_VARS as l,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as r}from"./chunk-GTRUBA2R.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsx as o,jsxs as h}from"react/jsx-runtime";function c({rows:c,max:u,formatValue:d,emphasisKey:p,highlight:g="none",emphasisTone:x,barHeight:f=12,rowGap:y=30,animate:b=!0,labelFont:N="sans",className:k,emptyLabel:v}){const $=i().charts,j=r(),w=d??(e=>m(e,j)),R=v??$.nothingToRank;if(0===c.length)/* @__PURE__ */
|
|
2
|
+
return o("p",{className:`text-sm text-gray-500 ${k??""}`,children:R});const M=t(c.map(e=>e.value),g),F=p??(null===M?void 0:c[M]?.key),C=u??Math.max(...c.map(e=>e.value).filter(Number.isFinite),0),T=s(0);/* @__PURE__ */
|
|
3
|
+
return o("ol",{className:`m-0 list-none p-0 ${k??""}`,style:{display:"grid",rowGap:`${Math.max(4,y-f)}px`},children:c.map((t,i)=>{const r=t.key===F,m=r?x?l[x]:s(1):F?n.muted:T,c=Number.isFinite(t.value)?t.value:null,u=null!==c&&C>0?Math.max(0,Math.min(1,c/C)):0;/* @__PURE__ */
|
|
4
4
|
return h("li",{className:"grid gap-1",children:[
|
|
5
5
|
/* @__PURE__ */h("div",{className:"flex items-baseline justify-between gap-3",children:[
|
|
6
6
|
/* @__PURE__ */h("span",{className:`truncate ${"mono"===N?"font-mono ":""}text-xs text-gray-600 ${r?"font-semibold":""}`,title:t.label,children:[t.label,r&&/* @__PURE__ */o("span",{className:"sr-only",children:` ${$.emphasised}`})]}),
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-QSW26NAH.js";import{useSettingAuto as d}from"./chunk-E4Z5OXBI.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-JFSYWEHD.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-QR4RM7PO.js";import{Icon as m}from"./chunk-42BBJJDP.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as g}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-GTRUBA2R.js";import{forwardRef as w,useId as k,useState as N,useRef as $,useMemo as D,useCallback as j,useEffect as T,useLayoutEffect as E}from"react";import{createPortal as S}from"react-dom";import{jsxs as H,jsx as I,Fragment as O}from"react/jsx-runtime";var R=w(function({value:e,onChange:t,options:r,placeholder:n,invalid:i,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},w){const N=t,$=x(),D=d(),j=f??D,T=k(),E=/* @__PURE__ */H("select",{ref:w,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":i||void 0,"aria-describedby":[g,j?T:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:i,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==n&&!b&&/* @__PURE__ */I("option",{value:"",disabled:!0,children:n}),
|
|
2
|
+
/* @__PURE__ */I(B,{items:r})]});return j?/* @__PURE__ */H(O,{children:[E,
|
|
3
|
+
/* @__PURE__ */I("span",{id:T,hidden:!0,children:$.settingView.auto})]}):E});function B({items:e}){const t=e=>/* @__PURE__ */I("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
+
return I(O,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */I("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var C=w(function({value:l,onChange:u,options:w,placeholder:R,invalid:C,className:z="",id:A,disabled:U,size:W,touchSize:K,title:P,multiple:V,renderOption:F,renderValue:J,valueText:L,readOnly:M=!1,footer:G,changed:Q=!1,auto:q,"aria-describedby":X,"aria-label":Y,"aria-labelledby":Z,..._},ee){const[te,re]=N(!1),[ne,ie]=N(-1),ae=$(null),le=$(null),oe=$(null),de=$(null),se=$([]),ce=()=>de.current??oe.current,ue=!!G?.length,pe="sm"===W,me=pe?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",ve=p(pe),[he,fe]=N(null),be=x(),ge=$(te);ge.current=te;const ye=$({buffer:"",timer:null}),xe=k(),we=`${xe}-listbox`,ke=A??`${xe}-trigger`,Ne=e=>`${xe}-opt-${e}`,$e=`${xe}-changed`,De=d(),je=q??De,Te=`${xe}-auto`,Ee=[X,Q?$e:void 0,je?Te:void 0].filter(Boolean).join(" ")||void 0,Se=D(()=>i(w),[w]),He=V?l:[],Ie=u,Oe=f(le,te,{matchTriggerWidth:!0,...G?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),Re="undefined"==typeof window?T:E,Be=`${te}|${Oe?.top}|${Oe?.bottom}|${Oe?.maxHeight}|${w.length}`;Re(()=>{fe(null)},[Be]),Re(()=>{const e=oe.current;if(!te||!e||null!==he)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const n=e.getBoundingClientRect().top;let i=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-n+e.scrollTop;if(!(r<=e.clientHeight+.5))break;i=r}i>r&&fe(Math.floor(i))},[te,he,Be]);const Ce=V?Se.findIndex(e=>He.includes(e.value)):Se.findIndex(e=>e.value===l),ze=V?Se.filter(e=>He.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ce>=0?Se[Ce].label:void 0,Ae=!V&&Ce>=0?Se[Ce].lang:void 0,Ue=V?Se.filter(e=>He.includes(e.value)):Ce>=0?[Se[Ce]]:[],We=J&&Ue.length?J(Ue):void 0,Ke=void 0!==We&&L?L(Ue):void 0,Pe=j((e=!0)=>{re(!1),ie(-1),e&&le.current?.focus()},[]),Ve=j(()=>{U||M||(ie(Ce>=0?Ce:e(Se)),re(!0))},[U,M,Se,Ce]),Fe=j(e=>{const t=Se[e];if(t&&!t.disabled){if(V){const r=l;return Ie(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ie(e)}Ie(t.value),Pe()}},[Se,V,l,Ie,Pe]);T(()=>{if(!te)return;return y(e=>!("Escape"!==e.key||!ge.current)&&(Pe(),!0),ce)},[te,Pe]),T(()=>{if(!te)return;const e=e=>{const t=e.target;ae.current?.contains(t)||ce()?.contains(t)||Pe(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Pe(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[te,Pe]),T(()=>{!te||ne<0||oe.current?.querySelector(`#${CSS.escape(Ne(ne))}`)?.scrollIntoView({block:"nearest"})},[te,ne]);const Je=j(e=>{const r=ye.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const n=te?ne:Ce,i=t(Se,r.buffer,n);i<0||(te?ie(i):V?(ie(i),re(!0)):Fe(i))},[te,ne,Ce,Se,Fe,V]),Le=te?a(w,(e,t)=>{const r=(n=e.value,V?He.includes(n):l===n);var n;const i=t===ne;/* @__PURE__ */
|
|
5
|
+
return H("div",{id:Ne(t),role:"option",lang:e.description||F?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ie(t)},onClick:()=>Fe(t),className:`mx-1 cursor-pointer truncate rounded-lg ${me}${V?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":i?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[V&&/* @__PURE__ */I(o,{selected:r}),F?/* @__PURE__ */I("span",{className:"block min-w-0 flex-1 truncate",children:F(e,{selected:r,active:i})}):V?/* @__PURE__ */H("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
+
/* @__PURE__ */I("span",{lang:e.lang,className:"block truncate",children:e.label}),e.description&&/* @__PURE__ */I("span",{className:ve,children:e.description})]}):e.description?
|
|
7
|
+
/* @__PURE__ */H(O,{children:[
|
|
8
|
+
/* @__PURE__ */I("span",{lang:e.lang,className:"block truncate",children:e.label}),
|
|
9
|
+
/* @__PURE__ */I("span",{className:ve,children:e.description})]}):e.label]},e.value)},xe,"mx-1"):null,Me=void 0!==We?
|
|
10
|
+
/* @__PURE__ */H("span",{className:"relative block min-w-0 truncate",children:[
|
|
11
|
+
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:We}),
|
|
12
|
+
/* @__PURE__ */I("span",{lang:void 0===Ke?Ae:void 0,className:"sr-only",children:Ke??ze})]}):/* @__PURE__ */I("span",{lang:Ae,className:"block truncate "+(void 0===ze?"text-gray-400":""),children:ze??R??" "}),Ge={zIndex:h.popup,left:Oe?.left,top:Oe?.top,bottom:Oe?.bottom,width:Oe?.width,maxHeight:Oe?.maxHeight??b,visibility:Oe?void 0:"hidden",...g()},Qe=/* @__PURE__ */I("div",{ref:oe,id:we,role:"listbox","aria-labelledby":Z??(Y?void 0:ke),"aria-label":Z?void 0:Y,"aria-multiselectable":V||void 0,className:ue?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:ue?null!==he?{maxHeight:he}:void 0:null!==he?{...Ge,maxHeight:he}:Ge,children:Le}),qe=ue?/* @__PURE__ */H("div",{ref:de,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Ge,children:[Qe,
|
|
13
|
+
/* @__PURE__ */I("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:G.map((e,t)=>/* @__PURE__ */H("button",{ref:e=>{se.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Pe(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(G?.length??0)-1,n=t=>{e.preventDefault(),se.current[t]?.focus()},i=()=>{e.preventDefault(),le.current?.focus()};switch(e.key){case"ArrowDown":return void n(Math.min(t+1,r));case"ArrowUp":return void(0===t?i():n(t-1));case"Home":return void n(0);case"End":return void n(r);case"Tab":return e.shiftKey?void(0===t?i():n(t-1)):t<r?void n(t+1):(e.preventDefault(),void Pe());case"Escape":return e.preventDefault(),e.stopPropagation(),void Pe()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${me} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-gray-400":"cursor-pointer text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */I(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
14
|
+
/* @__PURE__ */I("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Qe;/* @__PURE__ */
|
|
15
|
+
return H("div",{ref:ae,className:"relative",children:[
|
|
16
|
+
/* @__PURE__ */I("button",{ref:le,id:ke,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":te,"aria-controls":te?we:void 0,"aria-activedescendant":te&&ne>=0?Ne(ne):void 0,"aria-invalid":C||void 0,"aria-describedby":Ee,"aria-label":Y,"aria-labelledby":Z,title:P,disabled:U,"aria-readonly":M||void 0,onClick:()=>te?Pe():Ve(),onKeyDown:t=>{if(!U&&!M)switch(t.key){case"ArrowDown":return t.preventDefault(),void(te?ie(e=>n(Se,e,1)):Ve());case"ArrowUp":return t.preventDefault(),void(te?ie(e=>n(Se,e,-1)):Ve());case"Home":return void(te&&(t.preventDefault(),ie(e(Se))));case"End":return void(te&&(t.preventDefault(),ie(r(Se))));case"Enter":return void(te&&(t.preventDefault(),Fe(ne)));case" ":return t.preventDefault(),void(te?Fe(ne):Ve());case"Escape":return void(te&&(t.preventDefault(),t.stopPropagation(),Pe()));case"Tab":return te&&ue&&!t.shiftKey?(t.preventDefault(),void se.current[0]?.focus()):void(te&&Pe(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Je(t.key))}},className:s({invalid:C,size:W,readOnly:M,auto:je,className:`${M?"":"pr-8 "}text-left ${z}`.trim()}),children:Q?
|
|
17
|
+
/* @__PURE__ */H("span",{className:"flex min-w-0 items-center gap-1",children:[Me,
|
|
18
|
+
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Me}),Q&&/* @__PURE__ */I("span",{id:$e,hidden:!0,children:be.select.changed}),je&&/* @__PURE__ */I("span",{id:Te,hidden:!0,children:be.settingView.auto}),!M&&/* @__PURE__ */I(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
19
|
+
/* @__PURE__ */H("select",{ref:ee,value:l,multiple:V||void 0,onChange:e=>Ie(V?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:U,"aria-hidden":"true",tabIndex:-1,className:"sr-only",..._,children:[void 0!==R&&!V&&/* @__PURE__ */I("option",{value:"",disabled:!0,children:R}),
|
|
20
|
+
/* @__PURE__ */I(B,{items:w})]}),te&&S(qe,document.body)]})}),z=w(function({touchSize:e="touch",...t},r){const n=u();return!n||void 0===t.footer&&void 0===t.changed||t.readOnly?n&&!t.readOnly?/* @__PURE__ */I(R,{ref:r,...t,size:e}):/* @__PURE__ */I(C,{ref:r,...t}):/* @__PURE__ */I(C,{ref:r,...t,size:e})});export{R as NativeSelect,z as Select_default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="8.18.0",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{TransferProgress as e}from"./chunk-
|
|
1
|
+
import{TransferProgress as e}from"./chunk-YGITR6I5.js";import{Icon as r}from"./chunk-42BBJJDP.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-GTRUBA2R.js";import{jsx as o}from"react/jsx-runtime";var n=/^data:([a-z0-9!#$&^_.+-]+)\/([a-z0-9!#$&^_.+-]+)/i;function i(e){if(/^data:/i.test(e||""))return function(e){const r=n.exec(e);if(!r)return"media";const[,t,o]=r,i=o.split("+")[0].split(".").pop().replace(/^x-/i,"");return i?`${t.toLowerCase()}.${i.toLowerCase()}`:"media"}(e);const r=(e||"").split("?")[0].split("#")[0],t=r.substring(r.lastIndexOf("/")+1);try{return decodeURIComponent(t.replace(/^[0-9a-f]{32}_/i,""))||t||"media"}catch{return t||"media"}}var s=/\.(mp4|webm|ogg|ogv|mov|m4v)(\?|#|$)/i;function a(e,r=t.media){const o=function(e){const r=e.includes("video"),t=e.includes("image")||"*"===e||""===e;return r&&!t?"video":t&&!r?"image":"file"}(e);return"image"===o?r.uploadImage:"video"===o?r.uploadVideo:r.uploadFile}function u(e,r,t="",o="p-4"){return["flex w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed text-center transition-colors",o,r?"cursor-not-allowed opacity-60":"cursor-pointer",e?"border-blue-500 bg-blue-50":"border-gray-300 bg-gray-50 hover:bg-gray-100",t].filter(Boolean).join(" ")}function c(e){return e?"rosh-focus-ring":"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-zone)]"}function d({label:r,progress:t,rounded:n="rounded-lg"}){/* @__PURE__ */
|
|
2
2
|
return o("div",{className:`absolute inset-0 flex items-center justify-center bg-white/60 ${n}`,children:/* @__PURE__ */o(e,{state:"busy",verb:r,pct:t})})}function l({children:e}){/* @__PURE__ */
|
|
3
3
|
return o("span",{className:"absolute inset-x-1 bottom-1 truncate rounded px-2 py-0.5 text-xs text-white",style:{background:"var(--rosh-media-scrim)"},children:e})}function m(e,r=""){if(!e)return!1;const t=n.exec(e);if(t)return"video"===t[1].toLowerCase();const o=r.includes("video"),i=r.includes("image")||"*"===r||""===r;return s.test(e)||o&&!i}function f({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
4
4
|
return o(r,{name:"close",className:e,strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})}function p({className:e="h-6 w-6"}){/* @__PURE__ */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{ChartDefs as t,MOTION as e,stagger as a,glowId as n}from"./chunk-465RRWBY.js";import{ChartSkeleton as i}from"./chunk-
|
|
1
|
+
import{ChartDefs as t,MOTION as e,stagger as a,glowId as n}from"./chunk-465RRWBY.js";import{ChartSkeleton as i}from"./chunk-NU55QIUV.js";import{useHighlight as r,autoHighlightIndex as l,highlightOpacity as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as m}from"./chunk-P5BOTIJU.js";import{CartesianPlot as s}from"./chunk-ZGCLFQS5.js";import{CHART_INK as u,STATUS_VARS as h,resolveSeriesColor as c}from"./chunk-TZFACUMR.js";import{useShellStrings as d,useShellLocale as f}from"./chunk-GTRUBA2R.js";import{formatPercent as b,formatPlain as p}from"./chunk-C3QOHMR6.js";import{useId as x}from"react";import{jsx as y,jsxs as M}from"react/jsx-runtime";function g({series:g,labels:v,stacked:k=!1,stackMode:N="value",height:$=220,width:w,max:F,formatValue:j,yAxisLabel:L,className:A,emptyLabel:C,radius:R=3,loading:S=!1,animate:V=!0,glow:T=!1,emphasise:U=!1,activeKey:z,highlight:B="none",valueLabels:O=!1,onSelect:E,min:G,formatTooltipValue:Q,tooltipLabels:Y,barGap:H=4,seriesLabels:I=!1}){const W=x(),{highlighted:Z}=r(),J=d().charts,K=f(),P=j??(t=>p(t,K)),q=Q??P;if(S)/* @__PURE__ */return y(i,{height:$,width:w,variant:"bars",className:A});const D=(t,e)=>{const a=t.pointColors?.[e];if(a)return a;const n=t.pointTones?.[e];return n?h[n]:c(t.slot,t.color,t.tone)},X=g.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(t=>Number.isFinite(t))),_=(t,e)=>{const a=t.data[e];return"number"==typeof a&&Number.isFinite(a)?a:0},tt=v.map((t,e)=>X.reduce((t,a)=>t+_(a,e),0)),et=v.map((t,e)=>X.reduce((t,a)=>t+Math.max(0,_(a,e)),0)),at=v.map((t,e)=>X.reduce((t,a)=>t+Math.min(0,_(a,e)),0)),nt=k&&"percent"===N,it=(t,e)=>tt[e]>0?t/tt[e]:null,rt=nt?[1]:k?[...et,...at]:X.flatMap(t=>t.data.filter(Number.isFinite)),lt=(t,e)=>{const a=t.bandwidth/Math.max(1,X.length),n=X.length>1?Math.min(H,.25*a):0;return{offset:e*a+n/2,width:Math.max(1,a-n)}},ot=I&&!k?({x:t,y:e})=>{const a=Math.min(e.domain[1],Math.max(e.domain[0],0));return v.map((n,i)=>X.map((n,r)=>{const l=n.data[i];if(!Number.isFinite(l))return null;const o=Math.min(e.domain[1],Math.max(e.domain[0],l)),{offset:m,width:s}=lt(t,r),h=t(i)+m+s/2,c=Math.min(e(o),e(a)),d=Math.max(e(o),e(a));if(s<13)return null;const f=Math.floor((d-c-12)/6.6),b=f>=Math.min(4,n.label.length),p=b&&n.label.length>f?`${n.label.slice(0,f-1).trimEnd()}…`:n.label,x=b?d-6:c-4;/* @__PURE__ */
|
|
2
2
|
return y("text",{"data-series-label":"true",x:h,y:x,transform:`rotate(-90 ${h} ${x})`,textAnchor:"start",dominantBaseline:"central",fontSize:11,fill:b?u.surface:u.label,children:p},`n${n.key}-${i}`)}))}:null;/* @__PURE__ */
|
|
3
|
-
return y(s,{labels:v,values:rt,height:$,width:w,max:nt?1:F,min:nt?void 0:
|
|
4
|
-
return y("text",{"data-value-label":"true",x:t.center(n),y:a>=0?e(i)-4:e(i)+12,textAnchor:"middle",fontSize:11,fill:u.label,style:{fontVariantNumeric:"tabular-nums"},children:
|
|
5
|
-
return y("text",{"data-value-label":"true",x:t(n)+o+m/2,y:l>=0?e(l)-4:e(l)+12,textAnchor:"middle",fontSize:11,fill:u.label,style:{fontVariantNumeric:"tabular-nums"},children:
|
|
3
|
+
return y(s,{labels:v,values:rt,height:$,width:w,max:nt?1:F,min:nt?void 0:G,formatValue:nt?t=>b(Math.round(100*t),0,K):P,yAxisLabel:L,className:A,emptyLabel:C,onSelect:E,ariaLabel:J.acrossCategories(X.map(t=>t.label),v.length),tooltip:t=>/* @__PURE__ */y(m,{title:Y?.[t]??v[t],rows:X.map(e=>({key:e.key,label:e.label,color:D(e,t),value:Number.isFinite(e.data[t])?nt?`${b(100*(it(e.data[t],t)??0),1,K)} · ${q(e.data[t])}`:q(e.data[t]):void 0})),footnote:nt?J.inCategory(q(tt[t])):void 0}),overlay:O&&!nt||ot?({x:t,y:e})=>/* @__PURE__ */M("g",{pointerEvents:"none",children:[ot?.({x:t,y:e}),O&&!nt&&v.map((a,n)=>{if(k){if(!X.some(t=>Number.isFinite(t.data[n])))return null;const a=X.reduce((t,e)=>t+_(e,n),0),i=a>=0?et[n]:at[n];/* @__PURE__ */
|
|
4
|
+
return y("text",{"data-value-label":"true",x:t.center(n),y:a>=0?e(i)-4:e(i)+12,textAnchor:"middle",fontSize:11,fill:u.label,style:{fontVariantNumeric:"tabular-nums"},children:P(a)},`v${n}`)}return X.map((a,i)=>{const r=a.data[n];if(!Number.isFinite(r))return null;const l=r,{offset:o,width:m}=lt(t,i);/* @__PURE__ */
|
|
5
|
+
return y("text",{"data-value-label":"true",x:t(n)+o+m/2,y:l>=0?e(l)-4:e(l)+12,textAnchor:"middle",fontSize:11,fill:u.label,style:{fontVariantNumeric:"tabular-nums"},children:P(l)},`v${a.key}-${n}`)})})]}):void 0,children:({x:i,y:r,bottom:m,active:s})=>{const h=z?v.indexOf(z):-1,c=l(k?tt:X[0]?.data??[],B),d=s??(h>=0?h:c);/* @__PURE__ */
|
|
6
6
|
return M("g",{children:[
|
|
7
|
-
/* @__PURE__ */y(t,{id:
|
|
8
|
-
return y("rect",{x:M,y:v,width:g,height:w,rx:
|
|
7
|
+
/* @__PURE__ */y(t,{id:W,glow:T}),v.map((t,l)=>{let m=0,s=0;const h=r(Math.min(r.domain[1],Math.max(r.domain[0],0)));return X.map((t,c)=>{const f=t.data[l];if(!Number.isFinite(f))return null;const b=nt?it(f,l):f;if(null===b)return null;const p=D(t,l),x=lt(i,c),M=k?i(l):i(l)+x.offset,g=k?Math.max(1,i.bandwidth):x.width;let v,N,$=!0;if(k){const t=b>=0?m:s,e=t+b;b>=0?m=e:s=e,v=r(Math.max(t,e)),N=r(Math.min(t,e)),$=0===t}else v=Math.min(r(b),h),N=Math.max(r(b),h);const w=Math.max(0,N-v-(k&&!$?2:0)),F=null===d||d===l,j=F?p:U?u.muted:p,L=o(t.key,Z);/* @__PURE__ */
|
|
8
|
+
return y("rect",{x:M,y:v,width:g,height:w,rx:R,fill:j,fillOpacity:L??(F?1:U?.32:.45),filter:T&&d===l?`url(#${n(W)})`:void 0,className:"rosh-viz-mark"+(V?` ${e.rise}`:""),style:V?a(l*(k?1:X.length)+c,26):void 0},`${t.key}-${l}`)})}),null!==s&&!U&&/* @__PURE__ */y("line",{x1:i.center(s),y1:r(r.domain[1]),x2:i.center(s),y2:m,stroke:u.axis,strokeWidth:1})]})}})}export{g as ColumnChart};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{CartesianPlot as o}from"./chunk-ZGCLFQS5.js";import{binValues as r}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-GTRUBA2R.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const A=e().charts,L=i(),v=d??(t=>Number.isInteger(t)?m(t,L):n(t,1,L)),w=x??(t=>m(t,L)),R=g??A.countAxis,C=k??A.distribution,M=h??r(c??[],s),N=a(0,b,f),T=M.map(t=>v(t.from)),U=M.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(o,{labels:T,values:U,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:w,yAxisLabel:R,className:y,emptyLabel:j,ariaLabel:A.histogram(C,M.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${v(M[o].from)} – ${v(M[o].to)}`,rows:[{key:"count",label:A.observations,color:N,value:w(M[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:M.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:N,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{squarify as e}from"./chunk-46BYGPGD.js";import{AccessibleTable as t}from"./chunk-X3II54HU.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as a}from"./chunk-P5BOTIJU.js";import{usePlotWidth as r}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as i,CHART_INK as o}from"./chunk-TZFACUMR.js";import{useShellStrings as n,useShellLocale as m}from"./chunk-
|
|
2
|
-
return s("div",{className:b,ref:B,children:/* @__PURE__ */s("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const z=k??i(0),
|
|
1
|
+
import{squarify as e}from"./chunk-46BYGPGD.js";import{AccessibleTable as t}from"./chunk-X3II54HU.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as a}from"./chunk-P5BOTIJU.js";import{usePlotWidth as r}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as i,CHART_INK as o}from"./chunk-TZFACUMR.js";import{useShellStrings as n,useShellLocale as m}from"./chunk-GTRUBA2R.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as u}from"react";import{jsx as s,jsxs as f}from"react/jsx-runtime";function p({items:p,height:d=320,width:v,gap:x=2,radius:g=3,formatValue:y,color:k,className:b,emptyLabel:j}){const w=n().charts,M=m(),N=y??(e=>h(e,M)),$=j??w.nothingToBreakDown,B=c(null),U=r(B),A=v??U,[C,I]=u(null),{highlighted:R}=l(),T=e(p,A,d);if(0===T.length)/* @__PURE__ */
|
|
2
|
+
return s("div",{className:b,ref:B,children:/* @__PURE__ */s("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const z=k??i(0),F=Math.max(...T.map(e=>e.value),1),G=e=>34+e/F*62,H=e=>`color-mix(in oklab, ${z} ${G(e).toFixed(0)}%, ${o.surface})`,O=e=>G(e)>=55?o.surface:o.label,P=C??R,Y=C?T.find(e=>e.key===C):void 0;/* @__PURE__ */
|
|
3
3
|
return f("div",{className:`relative ${b??""}`,ref:B,children:[
|
|
4
|
-
/* @__PURE__ */s("svg",{width:"100%",height:d,viewBox:`0 0 ${
|
|
5
|
-
return f("g",{opacity:
|
|
6
|
-
/* @__PURE__ */s("rect",{x:e.x+x/2,y:e.y+x/2,width:t,height:l,rx:g,fill:
|
|
7
|
-
/* @__PURE__ */s(t,{caption:w.treemap(p.length),head:[w.tableItem,w.value],rows:
|
|
4
|
+
/* @__PURE__ */s("svg",{width:"100%",height:d,viewBox:`0 0 ${A} ${d}`,role:"img","aria-label":w.treemap(p.length),onMouseLeave:()=>I(null),children:T.map(e=>{const t=Math.max(0,e.width-x),l=Math.max(0,e.height-x),a=t>6.2*e.label.length+12&&l>30,r=a&&l>44;/* @__PURE__ */
|
|
5
|
+
return f("g",{opacity:P&&P!==e.key?.55:1,onMouseEnter:()=>I(e.key),children:[
|
|
6
|
+
/* @__PURE__ */s("rect",{x:e.x+x/2,y:e.y+x/2,width:t,height:l,rx:g,fill:H(e.value)}),a&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+18,fontSize:12,fontWeight:600,fill:O(e.value),children:e.label}),r&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+34,fontSize:11,fill:O(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:N(e.value)})]},e.key)})}),Y&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(a,{title:Y.label,rows:[{key:"value",label:w.value,color:H(Y.value),value:N(Y.value)}]})}),
|
|
7
|
+
/* @__PURE__ */s(t,{caption:w.treemap(p.length),head:[w.tableItem,w.value],rows:T.map(e=>[e.label,N(e.value)])})]})}export{p as TreemapChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SpinnerRing as e}from"./chunk-Q5MD3VY6.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{SpinnerRing as e}from"./chunk-Q5MD3VY6.js";import{useShellStrings as t}from"./chunk-GTRUBA2R.js";import{jsxs as n,Fragment as o,jsx as l}from"react/jsx-runtime";function r({selectedCount:r,hiddenSelectedCount:c=0,loadedCount:d,totalCount:i,label:s,isFetchingMore:a,extra:u}){const m=t().list,h=i??d,f=d>=h,p=c>0?m.selectedNotShown(r,c):r>0?m.selected(r):"";/* @__PURE__ */
|
|
2
2
|
return n(o,{children:[u,p?`${p} — `:"",f?null!=i?m.allLoaded(h,s):m.count(h,s):m.loadedOf(d,h,s),a?/* @__PURE__ */n(o,{children:[" · ",
|
|
3
3
|
/* @__PURE__ */n("span",{className:"inline-flex items-center gap-1",role:"status",children:[
|
|
4
4
|
/* @__PURE__ */l(e,{}),m.loadingMore]})]}):""]})}export{r as ListFooter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{navIcons as e}from"./chunk-TPDOOCFS.js";import{Icon as t}from"./chunk-
|
|
1
|
+
import{navIcons as e}from"./chunk-TPDOOCFS.js";import{Icon as t}from"./chunk-42BBJJDP.js";import{isValidElement as r,cloneElement as n}from"react";import{jsx as o,jsxs as i}from"react/jsx-runtime";var l=["from-blue-500 to-blue-700","from-indigo-500 to-purple-600","from-purple-500 to-pink-600","from-pink-500 to-rose-600","from-red-500 to-rose-600","from-orange-500 to-red-600","from-amber-500 to-orange-600","from-yellow-500 to-amber-500","from-lime-500 to-green-600","from-green-500 to-emerald-600","from-emerald-500 to-teal-600","from-teal-500 to-cyan-600","from-cyan-500 to-sky-600","from-sky-500 to-blue-600","from-violet-500 to-fuchsia-600"];function a(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r);return l[Math.abs(t)%l.length]}var d={order:"text-blue-600",purchase_order:"text-purple-600",invoice:"text-green-600",client:"text-indigo-600",manufacturer:"text-orange-600",shipment:"text-teal-600",part_number:"text-gray-600",project:"text-pink-600",mould:"text-red-600",design:"text-cyan-600",brand:"text-amber-600",price_sheet:"text-emerald-600",folder:"text-yellow-600",page:"text-blue-500"},s={order:"SO",purchase_order:"PO",invoice:"INV",client:"CLI",manufacturer:"MFR",shipment:"DN",part_number:"PN",project:"PRJ",mould:"MLD",design:"DSN",brand:"BRD",price_sheet:"PS",vendor_invoice:"VI",vendor_payment:"VP",warranty_claim:"WC",qc_report:"QC",vendor_shipment:"GRN",bank_account:"BA",wheel_finish:"WF",weight_log:"WL",production_progress:"PP",vendor_price_sheet:"VPS",proposal:"PR",folder:"FLD"},c={pdf:"PDF",dxf:"DXF","3d":"STP",image:"IMG",csv:"CSV"},f={pdf:"text-red-600",dxf:"text-blue-600","3d":"text-purple-600",image:"text-emerald-600",csv:"text-green-600"};function p({className:e}){/* @__PURE__ */
|
|
2
2
|
return o(t,{name:"folder",look:"solid",className:e})}function u(t,r){return r&&e[r]||(t?e[t]:void 0)}var m=/* @__PURE__ */o("svg",{className:"h-7 w-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */o("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6z"})});function h({entityType:e,isSelected:t,entityId:l,label:h,fileKind:w}){const g="preview-file"===e&&w,y=g?f[w]:null,x=g?c[w]:null;if("folder"===e)/* @__PURE__ */
|
|
3
3
|
return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o(p,{className:"h-12 w-12 text-amber-500 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]"})});if("page"===e){const e=u(l,h),i=a(l||h||"page");/* @__PURE__ */
|
|
4
4
|
return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o("span",{className:`h-11 w-11 rounded-xl bg-gradient-to-br ${i} flex items-center justify-center text-white border border-white/30 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]`,children:e&&r(e)?n(e,{className:"h-7 w-7 text-white"}):m})})}/* @__PURE__ */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-
|
|
1
|
+
import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-GTRUBA2R.js";import{formatPercent as a}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as u}from"react/jsx-runtime";function s(l){return null!=l&&Number.isFinite(l)&&l>=0?l:null}function r(l,e){const t=s(l);if(null==t)return"no-reading";const a=s(e);return null==a||0===a?"no-budget":t>a?"over":"within"}var i=l=>Math.min(100,Math.max(0,l));function m({label:m,elapsed:o,budget:d,grace:c,detail:h,formatDuration:g,formatValue:x,pace:b,emptyLabel:f,noBudgetLabel:p,size:v="sm",ariaLabel:y,className:N=""}){const w=l().meter,M=e(),$=x??g??(l=>function(l,e=t.meter){const a=Math.round(l),n=Math.floor(a/3600),u=Math.floor(a%3600/60),s=a%60;return n>0?e.hoursMinutes(n,u):u>0?e.minutesSeconds(u,s):e.seconds(s)}(l,w)),k=f??w.noReading,B=p??w.noBudget,R=s(o),j=s(d),L=null!=j&&j>0?j:null,z=s(c)??0,A="over"===r(o,d),C=null!=L?L+z:null,D=null!=L&&null!=C?i(L/C*100):null,F=A&&z>0,G=null==C||null==R?0:A?F?D??0:0:i(R/C*100),H=F?D??0:0,O=A?F&&null!=C&&null!=R?i(R/C*100):100:0,Q=Math.max(0,O-H),S=s(b),T=null!=S&&null!=C?i(S/C*100):null,U=null!=R&&null!=L?R/L*100:null,V=null!=U?a(Math.round(U),0,M):null!=R?$(R):"—",q=h??(null==R?k:null==L?B:`${$(R)} / ${$(L)}`),E="md"===v?"h-2":"h-1.5",I=A?"text-red-600":null!=R?"text-gray-900":"text-gray-400",J=null!=R&&null!=L&&null!=C?/* @__PURE__ */n("div",{role:"meter","aria-label":y??("string"==typeof m?m:void 0),"aria-valuemin":0,"aria-valuemax":C,"aria-valuenow":Math.min(C,R),"aria-valuetext":w.ofBudget(V),className:`relative mt-2 ${E} overflow-hidden rounded-full bg-gray-200`,children:[(!A||F)&&/* @__PURE__ */u("div",{className:"absolute inset-y-0 left-0 rounded-full bg-blue-600",style:{width:`${G}%`}}),Q>0&&/* @__PURE__ */u("div",{className:"rosh-budget-overrun absolute inset-y-0",style:{left:`${H}%`,width:`${Q}%`}}),z>0&&null!=D&&/* @__PURE__ */u("div",{title:w.budget,className:"absolute inset-y-0 w-0.5 bg-gray-700",style:{left:`${D}%`}}),null!=T&&/* @__PURE__ */u("div",{title:w.pace,"data-pace":"true",className:"absolute inset-y-0 w-0.5 -translate-x-1/2 bg-gray-700",style:{left:`${T}%`}})]}):null;/* @__PURE__ */
|
|
2
2
|
return n("div","md"===v?{className:N,children:[null!=m&&/* @__PURE__ */u("div",{className:"text-3xs font-medium uppercase tracking-wide text-gray-500",children:m}),
|
|
3
3
|
/* @__PURE__ */n("div",{className:"mt-1 flex items-baseline gap-2",children:[
|
|
4
|
-
/* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${
|
|
5
|
-
/* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-gray-400",children:
|
|
4
|
+
/* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${I}`,children:V}),
|
|
5
|
+
/* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-gray-400",children:q})]}),J]}:{className:N,children:[
|
|
6
6
|
/* @__PURE__ */n("div",{className:"flex items-baseline gap-2",children:[null!=m&&/* @__PURE__ */u("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-gray-500",children:m}),
|
|
7
|
-
/* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${
|
|
8
|
-
/* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-gray-400",children:
|
|
7
|
+
/* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${I}`,children:V}),
|
|
8
|
+
/* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-gray-400",children:q})]}),J]})}export{m as BudgetBar,r as budgetState};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{dialogA11y as e}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as r}from"./chunk-PKXQDCNR.js";import{useFocusTrap as i,useScrollLock as t}from"./chunk-CDAJKLGL.js";import{Icon as a}from"./chunk-42BBJJDP.js";import{Z_LAYERS as l}from"./chunk-62LW225J.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as s}from"./chunk-GTRUBA2R.js";import{useRef as n,useId as d,useEffect as c}from"react";import{jsxs as m,jsx as u}from"react/jsx-runtime";var f={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl"};function h({open:h,onClose:x,title:p,description:b,role:g="dialog",children:v,footer:y,blocking:k=!1,size:N="md",initialFocus:j,"aria-label":w,"aria-labelledby":C,"aria-describedby":W,className:B=""}){const D=n(null),J=d(),L=d(),U=!k,A=d(),G=s().dialog;return r(h),i(D,h,j),t(h),c(()=>{if(h)return o(()=>(k||x(),!0),()=>D.current)},[h,k,x]),h?/* @__PURE__ */m("div",{className:"fixed inset-0",style:{zIndex:l.overlay},role:"presentation",children:[
|
|
2
|
+
/* @__PURE__ */u("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
|
|
3
|
+
/* @__PURE__ */u("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:k?void 0:e=>{e.target===e.currentTarget&&x()},children:/* @__PURE__ */m("div",{ref:D,...e({role:g,modal:!0,titleId:p?A:void 0,labelledBy:C,label:w}),"aria-describedby":W??(b?L:v?J:void 0),className:`relative max-h-full w-full ${f[N]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${B}`.trim(),children:[p&&/* @__PURE__ */u("h2",{id:A,className:(U?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:p}),b&&/* @__PURE__ */u("p",{id:L,className:((p?"mt-1":U?"pr-8":"")+" text-sm text-gray-500").trim(),children:b}),v&&/* @__PURE__ */u("div",{id:J,className:"mt-2 text-sm text-gray-600",children:v}),y&&/* @__PURE__ */u("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:y}),U&&/* @__PURE__ */u("button",{type:"button",onClick:x,"aria-label":G.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */u(a,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]}):null}export{h as Dialog};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{AccessibleTable as t}from"./chunk-X3II54HU.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-P5BOTIJU.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as s}from"./chunk-GTRUBA2R.js";import{formatPlain as i}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),s=t.length>l,i=s?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(i.map((t,e)=>[t,e])),d=s?i.length:-1,m=s?[...i.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:s?t.length-i.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:v,className:k,emptyLabel:M}){const $=l().charts,w=s(),N=v??(t=>i(t,w)),y=M??$.noFlows,[j,E]=c(null),{highlighted:F}=o(),I=h(u,f,x,$.other),{labels:C,matrix:A,otherIndex:U,foldedCount:z}=I,O=(t,e)=>A[t]?.[e]??0,R=t=>t===U?r.muted:a(t),T=I.totals,B=C.map((t,e)=>e).sort((t,e)=>T[e]-T[t]),H=B.reduce((t,e)=>t+T[e],0);if(H<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:y});const L=p/2,P=p/2,Q=p/2-44,V=Q-b,W=g*B.length,Y=/* @__PURE__ */new Map;let G=-Math.PI/2;B.forEach((t,e)=>{const o=T[t]/H*(2*Math.PI-W);Y.set(t,{start:G,end:G+o,slot:e}),G+=o+g});const J=/* @__PURE__ */new Map,S=[];for(const t of B)for(const e of B){const o=O(t,e);if(o<=0)continue;const n=Y.get(t),r=o/Math.max(1,T[t])*(n.end-n.start),a=J.get(t)??0;J.set(t,a+r),S.push({from:t,to:e,value:o,a:n.start+a+r/2,b:Y.get(e).start+(Y.get(e).end-Y.get(e).start)/2})}const X=(t,e)=>[L+e*Math.cos(t),P+e*Math.sin(t)],Z="arc"===j?.kind?j.index:void 0,q="ribbon"===j?.kind?S[j.index]:void 0;/* @__PURE__ */
|
|
2
|
+
return m("div",{className:`relative ${k??""}`,children:[
|
|
3
|
+
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(B.length),onMouseLeave:()=>E(null),children:[S.map((t,e)=>{const[o,n]=X(t.a,V),[r,a]=X(t.b,V),l=R(t.from),s=((t,e)=>j?"ribbon"===j.kind?j.index===e:j.index===t.from||j.index===t.to:null!==F?C[t.from]===F||C[t.to]===F:null)(t,e);/* @__PURE__ */
|
|
4
|
+
return d("path",{d:`M${o},${n} Q${L},${P} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/H*p*.9),strokeOpacity:null===s||s?.34:.07,strokeLinecap:"round",onMouseEnter:()=>E({kind:"ribbon",index:e})},`${C[t.from]}→${C[t.to]}`)}),B.map(t=>{const o=Y.get(t),n=(o.start+o.end)/2,[a,l]=X(n,Q+16),s=(t=>j?"arc"===j.kind?j.index===t:S[j.index].from===t||S[j.index].to===t:null!==F?C[t]===F:null)(t);/* @__PURE__ */
|
|
5
|
+
return m("g",{onMouseEnter:()=>E({kind:"arc",index:t}),children:[
|
|
6
|
+
/* @__PURE__ */d("path",{d:e(L,P,V,Q,o.start,o.end),fill:R(t),fillOpacity:null===s||s?1:.45}),
|
|
7
|
+
/* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:C[t]})]},t)})]}),z>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-gray-500",children:$.chordFolded(z)}),void 0!==Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:C[Z],rows:[{key:"total",label:$.totalFlow,color:R(Z),value:N(T[Z])}]})}),q&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${C[q.from]} → ${C[q.to]}`,rows:[{key:"value",label:$.flow,color:R(q.from),value:N(q.value)}]})}),
|
|
8
|
+
/* @__PURE__ */d(t,{caption:$.chord(B.length),head:[$.tableFrom,$.tableTo,$.value],rows:S.map(t=>[C[t.from],C[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-42BBJJDP.js";import{useShellStrings as i}from"./chunk-GTRUBA2R.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(e,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:e,separator:l,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=l??s,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
|
|
2
2
|
return n("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */n("ol",{className:"flex items-center gap-2 text-sm",children:d.map((e,i)=>/* @__PURE__ */a(t,{children:[i>0&&/* @__PURE__ */n("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
|
|
3
3
|
/* @__PURE__ */n("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */n("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */a("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
|
|
4
4
|
/* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */a("a",{href:e.item.href,onClick:e.item.onClick,className:r,children:[e.item.icon,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellStrings as t,useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as t,useShellLocale as e}from"./chunk-GTRUBA2R.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var o="inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40";function l({page:l,pageCount:i,onPageChange:s,siblingCount:c=1,showEdges:b=!1,className:u=""}){const d=t().pagination,g=e();if(i<=1)return null;const m=function(t,e,a){const n=/* @__PURE__ */new Set([1,e]);for(let r=t-a;r<=t+a;r++)r>=1&&r<=e&&n.add(r);const r=[...n].sort((t,e)=>t-e),o=[];let l=0;for(const t of r)l&&t-l>1&&o.push("…"),o.push(t),l=t;return o}(l,i,c),p=t=>{t>=1&&t<=i&&t!==l&&s(t)};/* @__PURE__ */
|
|
2
2
|
return n("nav",{"aria-label":d.label,className:`flex items-center gap-1 ${u}`.trim(),children:[b&&/* @__PURE__ */r("button",{type:"button","aria-label":d.first,disabled:1===l,onClick:()=>p(1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"«"}),
|
|
3
3
|
/* @__PURE__ */r("button",{type:"button","aria-label":d.previous,disabled:1===l,onClick:()=>p(l-1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"‹"}),m.map((t,e)=>"…"===t?/* @__PURE__ */r("span",{className:"px-1 text-gray-400",children:"…"},`gap-${e}`):/* @__PURE__ */r("button",{type:"button","aria-current":t===l?"page":void 0,onClick:()=>p(t),className:`${o} ${t===l?"bg-blue-600 font-medium text-white":"text-gray-700 hover:bg-gray-100"}`,children:a(t,g)},t)),
|
|
4
4
|
/* @__PURE__ */r("button",{type:"button","aria-label":d.next,disabled:l===i,onClick:()=>p(l+1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"›"}),b&&/* @__PURE__ */r("button",{type:"button","aria-label":d.last,disabled:l===i,onClick:()=>p(i),className:`${o} text-gray-600 hover:bg-gray-100`,children:"»"})]})}export{l as Pagination};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-GTRUBA2R.js";import{formatFixed as t,formatPlain as s}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as r}from"react/jsx-runtime";var l={sm:"text-lg",md:"text-2xl",lg:"text-3xl"},m={default:"text-gray-900",success:"text-green-600",danger:"text-red-600",muted:"text-gray-500"};function n({title:n,value:i,precision:c,prefix:d,suffix:x,tone:u="default",size:o="md",className:f=""}){const p=e(),g="number"!=typeof i?i:null!=c?t(i,c,p):p?s(i,p):i;/* @__PURE__ */
|
|
2
2
|
return a("div",{className:f,children:[n&&/* @__PURE__ */r("div",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:n}),
|
|
3
3
|
/* @__PURE__ */a("div",{className:`mt-1 flex items-baseline gap-1 ${m[u]}`,children:[d&&/* @__PURE__ */r("span",{className:"text-sm",children:d}),
|
|
4
4
|
/* @__PURE__ */r("span",{className:`font-semibold tabular-nums ${l[o]}`,children:g}),x&&/* @__PURE__ */r("span",{className:"text-sm",children:x})]})]})}export{n as Statistic};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-YFY2LSWZ.js";import{Avatar as t}from"./chunk-5WYCXSUM.js";import{Input_default as a}from"./chunk-UNEJ2ABD.js";import{Button_default as i}from"./chunk-UDD7GB4F.js";import{useState as s}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var r=[{id:1,name:"Priya Patel",last:"Sounds good — shipping it now",time:"9:41",status:"online"},{id:2,name:"Design team",last:"Marco: updated the tokens",time:"9:12",status:"away"},{id:3,name:"Tom Becker",last:"Thanks!",time:"Yest",status:"offline"},{id:4,name:"Sara Lind",last:"See you Friday 🎉",time:"Yest",status:"busy"}],m=[{mine:!1,text:"Hey! Did the latest build go out?"},{mine:!0,text:"Just merged — deploying now."},{mine:!1,text:"Nice. Any breaking changes for the portal?"},{mine:!0,text:"Nope, fully additive. New components only."},{mine:!1,text:"Sounds good — shipping it now"}];function d(){const[d,o]=s(1),c=r.find(e=>e.id===d)??r[0];/* @__PURE__ */
|
|
2
2
|
return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:260,sidebar:/* @__PURE__ */l("div",{className:"h-full overflow-auto",children:r.map(e=>/* @__PURE__ */n("button",{onClick:()=>o(e.id),className:"flex w-full items-center gap-3 border-b border-gray-100 px-3 py-3 text-left hover:bg-gray-50 "+(e.id===d?"bg-blue-50/50":""),children:[
|
|
3
3
|
/* @__PURE__ */l(t,{name:e.name,status:e.status}),
|
|
4
4
|
/* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[
|