efficient-shell 10.13.0 → 10.15.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 +16 -6
- package/dist/{Browser-36HIDVL6.js → Browser-WR4GMYE7.js} +14 -14
- package/dist/Calculator-MV5JVQBS.js +29 -0
- package/dist/{CurrencyConverter-577XB7A3.js → CurrencyConverter-HEAAQX23.js} +7 -7
- package/dist/{Documents-ZS4M5I3S.js → Documents-NSPKXCTF.js} +10 -10
- package/dist/Files-5HAUE2PR.js +88 -0
- package/dist/{Notepad-6CFMSQCK.js → Notepad-5LSFAYXO.js} +9 -9
- package/dist/PdfViewer-LU5JKHSG.js +1 -0
- package/dist/{PomodoroTimer-CXJVY7U3.js → PomodoroTimer-5V32QOCZ.js} +20 -20
- package/dist/{Preview-HV2KB3IU.js → Preview-PDVZZRSK.js} +29 -29
- package/dist/{Sidebar-7RR5WNIF.js → Sidebar-E3VDFBF6.js} +32 -32
- package/dist/{Spreadsheet-J5AGNSGN.js → Spreadsheet-K4IAI3A2.js} +12 -12
- package/dist/{Stock-M4TDRNCI.js → Stock-AOCHAKUF.js} +3 -3
- package/dist/{Weather-K634BVDX.js → Weather-F2QHTG32.js} +18 -18
- package/dist/{WorldClock-56CYOGR2.js → WorldClock-G72577HU.js} +6 -6
- package/dist/ai/index.d.ts +8 -2
- package/dist/ai/index.js +57 -53
- package/dist/ai.css +1 -1
- 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/ChartTooltip.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/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/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.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-3BYLHJLC.js → chunk-25M7CYCR.js} +8 -8
- package/dist/chunk-26LO7XCK.js +2 -0
- package/dist/{chunk-QNK2I4IH.js → chunk-2RAOWHHM.js} +12 -12
- package/dist/{chunk-KKSVRIMP.js → chunk-2UO47XB4.js} +8 -3
- package/dist/{chunk-ULXCDM7Y.js → chunk-36R3R3IB.js} +4 -4
- package/dist/{chunk-O4V5PEA3.js → chunk-3AH524CN.js} +1 -1
- package/dist/{chunk-OZBM2XFQ.js → chunk-3EJ64VKE.js} +1 -1
- package/dist/chunk-3GHTOSJP.js +14 -0
- package/dist/chunk-4AQ67NP2.js +15 -0
- package/dist/{chunk-2SY76NFO.js → chunk-4U57ANZF.js} +1 -1
- package/dist/{chunk-QHOBK35Y.js → chunk-4VTJEKHX.js} +1 -1
- package/dist/{chunk-H64JJSXC.js → chunk-4XS32UWF.js} +4 -4
- package/dist/{chunk-A4HJDSRA.js → chunk-55W5TTKS.js} +6 -6
- package/dist/{chunk-SDQIXE5M.js → chunk-5FRFSPQ2.js} +8 -8
- package/dist/{chunk-GBCH3UHD.js → chunk-5JU53T3U.js} +17 -17
- package/dist/{chunk-3ELLBQPS.js → chunk-5LCDCO46.js} +1 -1
- package/dist/{chunk-YJLLLO5R.js → chunk-5LXT3IUL.js} +1 -1
- package/dist/{chunk-GISDIVFK.js → chunk-5N5AAYQV.js} +1 -1
- package/dist/{chunk-SMUH7NAN.js → chunk-66XPG5G3.js} +1 -1
- package/dist/{chunk-RPYFOQM2.js → chunk-6BB6A5OB.js} +5 -5
- package/dist/chunk-6C6TRDNI.js +1 -0
- package/dist/chunk-6WSH6D5N.js +29 -0
- package/dist/chunk-7LQGPMRP.js +3 -0
- package/dist/{chunk-KOBYM5JV.js → chunk-7MSC3Z5H.js} +12 -12
- package/dist/{chunk-D7F442OZ.js → chunk-7PSIPTOE.js} +1 -1
- package/dist/{chunk-SO6X4CII.js → chunk-A267MPGS.js} +1 -1
- package/dist/{chunk-ORIGX2H5.js → chunk-AJFR35CO.js} +4 -4
- package/dist/{chunk-JBOMPD3V.js → chunk-AJFWBEIG.js} +9 -9
- package/dist/{chunk-ZNAVCHBV.js → chunk-AJVUND5A.js} +6 -6
- package/dist/chunk-ALDGSODF.js +2 -0
- package/dist/chunk-ARCQYF7G.js +23 -0
- package/dist/{chunk-UNRPRMQO.js → chunk-B25RVAVS.js} +44 -44
- package/dist/{chunk-FFIQPFUR.js → chunk-B37JVKW5.js} +1 -1
- package/dist/chunk-CDA2VXBN.js +8 -0
- package/dist/{chunk-JRZ7PPVJ.js → chunk-CFAELIKH.js} +6 -6
- package/dist/{chunk-7PUVPDUZ.js → chunk-CHAWFMV4.js} +4 -4
- package/dist/chunk-CNLYFW47.js +9 -0
- package/dist/{chunk-XNKIDGZW.js → chunk-CRILBBSU.js} +1 -1
- package/dist/{chunk-XAROKI7X.js → chunk-E5QPXEKN.js} +2 -2
- package/dist/chunk-EFU4Z66K.js +8 -0
- package/dist/{chunk-BS7IPLRR.js → chunk-EHGGSUXA.js} +1 -1
- package/dist/{chunk-F6JDUMM7.js → chunk-EK5WJQTR.js} +1 -1
- package/dist/{chunk-TXDA7TTP.js → chunk-EQZZ4V5X.js} +1 -1
- package/dist/{chunk-NPK2TLIU.js → chunk-ESYYKGN4.js} +1 -1
- package/dist/{chunk-URERZUX5.js → chunk-EXJXOKUU.js} +1 -1
- package/dist/{chunk-EYZZW6SO.js → chunk-EYEB3J77.js} +5 -5
- package/dist/{chunk-RBQWIHYD.js → chunk-F2R3UFNQ.js} +1 -1
- package/dist/{chunk-LOFYSLC7.js → chunk-FFZREKEF.js} +9 -9
- package/dist/{chunk-2VTO64YC.js → chunk-FGJOGBGZ.js} +8 -8
- package/dist/{chunk-MXH3UPCH.js → chunk-FJYTYW6M.js} +5 -5
- package/dist/chunk-FQIA5BTN.js +22 -0
- package/dist/{chunk-37U326EL.js → chunk-FRVNDEV2.js} +11 -11
- package/dist/{chunk-LDE5IV2M.js → chunk-FUVVO6YP.js} +1 -1
- package/dist/chunk-FX6DBXXD.js +1 -0
- package/dist/{chunk-7JGR7WPD.js → chunk-G4JTO5PB.js} +1 -1
- package/dist/{chunk-3RORPK2J.js → chunk-G7QK7WAK.js} +1 -1
- package/dist/{chunk-TVH7IZQ4.js → chunk-GKIU55T5.js} +2 -2
- package/dist/{chunk-CBEKJTXU.js → chunk-HL3DJTIC.js} +7 -7
- package/dist/{chunk-F2MWLDN2.js → chunk-HRPXJ4EI.js} +1 -1
- package/dist/chunk-HXNMRJQ4.js +2 -0
- package/dist/{chunk-SCPCZCYQ.js → chunk-IC7BEFE3.js} +1 -1
- package/dist/chunk-IFA2EOAF.js +4 -0
- package/dist/chunk-JEH5EVIG.js +1 -0
- package/dist/{chunk-DRDYZ633.js → chunk-KJCTXWF7.js} +2 -2
- package/dist/{chunk-UDRMZ22J.js → chunk-KKOADH55.js} +1 -1
- package/dist/chunk-KMEERBZV.js +2 -0
- package/dist/chunk-KORKSPHQ.js +6 -0
- package/dist/{chunk-QODTON7V.js → chunk-LJN77RG6.js} +1 -1
- package/dist/{chunk-63L5ORRZ.js → chunk-LPXMHYTM.js} +1 -1
- package/dist/{chunk-JGFY54A4.js → chunk-LVBO2OMQ.js} +2 -2
- package/dist/{chunk-M3OYHYIS.js → chunk-LWEWURFT.js} +13 -13
- package/dist/chunk-LWWMRL2Y.js +5 -0
- package/dist/chunk-M4K6FLIY.js +1 -0
- package/dist/{chunk-O6JJIR4H.js → chunk-M5LR7ZZX.js} +1 -1
- package/dist/{chunk-UWIZX3RK.js → chunk-MCYFUIXH.js} +1 -1
- package/dist/{chunk-N67QX3WW.js → chunk-MMQ6ETRD.js} +2 -2
- package/dist/chunk-MNZ7MGAT.js +2 -0
- package/dist/{chunk-2K2W6VIR.js → chunk-N2RHM432.js} +1 -1
- package/dist/{chunk-CAVADOJK.js → chunk-N3YBOXOF.js} +1 -1
- package/dist/{chunk-LTKXAHS3.js → chunk-N4REWGMM.js} +8 -8
- package/dist/{chunk-7X5FABQS.js → chunk-NBB2RKDH.js} +5 -5
- package/dist/{chunk-C2P2Z6HU.js → chunk-NBVHJZVS.js} +14 -14
- package/dist/chunk-NLGMJGD6.js +14 -0
- package/dist/{chunk-CKKUFDZ3.js → chunk-NWURIQI3.js} +3 -3
- package/dist/{chunk-AZ3AR7U7.js → chunk-NZCSLS4O.js} +3 -3
- package/dist/{chunk-3NW5LD7D.js → chunk-NZQCDFDG.js} +3 -3
- package/dist/chunk-OAT7OEWP.js +11 -0
- package/dist/chunk-OET2Q7P6.js +19 -0
- package/dist/{chunk-ISJPW2FZ.js → chunk-OSVY6SUO.js} +5 -5
- package/dist/{chunk-KP2THXEI.js → chunk-PB3OC4BO.js} +8 -8
- package/dist/{chunk-MBXLROCD.js → chunk-POQ4ETLL.js} +1 -1
- package/dist/{chunk-I2XGPTCN.js → chunk-PUBJ5YHQ.js} +1 -1
- package/dist/{chunk-6XBWM453.js → chunk-Q3IR5SKD.js} +1 -1
- package/dist/{chunk-P5YFQ4IQ.js → chunk-RDYFZHT3.js} +1 -1
- package/dist/chunk-RFEET2LS.js +9 -0
- package/dist/chunk-RSS2ALHH.js +9 -0
- package/dist/{chunk-PXQG5EIH.js → chunk-S52GQQVB.js} +1 -1
- package/dist/{chunk-MVZRZTQP.js → chunk-S5SRXI4V.js} +1 -1
- package/dist/chunk-SCYL5V5X.js +20 -0
- package/dist/chunk-SM7IDX7Y.js +1 -0
- package/dist/chunk-SOGQZVPJ.js +6 -0
- package/dist/{chunk-UYRITNQW.js → chunk-SP2AUVIU.js} +3 -3
- package/dist/{chunk-34URULVW.js → chunk-SQCUN2DX.js} +1 -1
- package/dist/{chunk-67JCJ2MG.js → chunk-SSM3EN7G.js} +1 -1
- package/dist/chunk-TIPU74XW.js +22 -0
- package/dist/{chunk-SOECV4V5.js → chunk-TXNCDDB4.js} +3 -3
- package/dist/{chunk-MUMQ6PW7.js → chunk-U2RFKQVA.js} +1 -1
- package/dist/{chunk-VZ4PBHFN.js → chunk-U2WCV56F.js} +1 -1
- package/dist/{chunk-W6SC3ZNO.js → chunk-UPCLAEKC.js} +2 -2
- package/dist/chunk-UUKTYAWY.js +7 -0
- package/dist/{chunk-VTFZ6W2D.js → chunk-UWIFXNH6.js} +3 -3
- package/dist/{chunk-DDCMMOB4.js → chunk-V2MIQ4GJ.js} +2 -2
- package/dist/chunk-V6F42DX3.js +11 -0
- package/dist/chunk-VWEG2WM4.js +12 -0
- package/dist/{chunk-G4GVLK44.js → chunk-WZ5QSSUM.js} +6 -6
- package/dist/{chunk-CHBRMAJV.js → chunk-XDBG4HPV.js} +1 -1
- package/dist/chunk-XIB72X74.js +2 -0
- package/dist/{chunk-YWDEFPSW.js → chunk-XJUREXYW.js} +3 -3
- package/dist/{chunk-WINNA7LS.js → chunk-XPPLCLYK.js} +1 -1
- package/dist/{chunk-7YOQS3C6.js → chunk-XTCXX5LJ.js} +1 -1
- package/dist/{chunk-QDQ347RL.js → chunk-YFMZKTJC.js} +1 -1
- package/dist/{chunk-AJO72CPB.js → chunk-YLGQ6ACR.js} +1 -1
- package/dist/chunk-ZE5TNYWX.js +7 -0
- package/dist/{chunk-LCJRTJXT.js → chunk-ZHPHNQKM.js} +7 -7
- package/dist/{chunk-AGG4RFXR.js → chunk-ZI6SMZJ4.js} +11 -11
- package/dist/{chunk-ZZOBG6GP.js → chunk-ZL5OSF26.js} +19 -19
- package/dist/{chunk-PBWUEBJ5.js → chunk-ZL7O4KGQ.js} +1 -1
- package/dist/{chunk-CPZ42W2B.js → chunk-ZLSUQAD3.js} +1 -1
- package/dist/{chunk-TKJBZIHT.js → chunk-ZMRGHVKS.js} +1 -1
- package/dist/chunk-ZO244TWH.js +8 -0
- package/dist/{chunk-GSKLHUQ6.js → chunk-ZW3IDCP2.js} +1 -1
- package/dist/{chunk-IKNG7EFQ.js → chunk-ZZTCYEQ4.js} +7 -7
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.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/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.d.ts +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.d.ts +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/textAlign.d.ts +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/icons/efficient-glyphs.d.ts +1 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +2 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +1 -0
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +1 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/EnterIcon.d.ts +8 -0
- package/dist/icons/glyphs/EnterIcon.js +1 -0
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/EnterMiniIcon.d.ts +8 -0
- package/dist/icons/looks/EnterMiniIcon.js +1 -0
- package/dist/icons/looks/EnterSolidIcon.d.ts +8 -0
- package/dist/icons/looks/EnterSolidIcon.js +1 -0
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +294 -294
- package/dist/map/index.js +7 -7
- package/dist/markdown/index.js +1 -1
- package/dist/{names-CwzeaUf6.d.ts → names-Bmx_9y41.d.ts} +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/FloatingBar.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.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.d.ts +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/Popover.js +1 -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/StatusBadge.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/Tooltip.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/discardGuard.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/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-ZFMTTDQ6.js +0 -29
- package/dist/Files-7XO7A4YT.js +0 -88
- package/dist/PdfViewer-Z4YKDHIH.js +0 -1
- package/dist/chunk-3GL4OVBB.js +0 -1
- package/dist/chunk-47EYPWCB.js +0 -14
- package/dist/chunk-A5BV6NFA.js +0 -7
- package/dist/chunk-CGQAKGPT.js +0 -8
- package/dist/chunk-COJYPNKF.js +0 -2
- package/dist/chunk-EDKRGYZX.js +0 -9
- package/dist/chunk-EU3JZGV2.js +0 -14
- package/dist/chunk-I4VIEGCX.js +0 -2
- package/dist/chunk-IKMWKOT5.js +0 -1
- package/dist/chunk-JSGQWVYH.js +0 -7
- package/dist/chunk-KZMJE24J.js +0 -5
- package/dist/chunk-KZX25YEW.js +0 -22
- package/dist/chunk-L3QNKCXH.js +0 -11
- package/dist/chunk-PJQGYKN6.js +0 -11
- package/dist/chunk-PN65IIYN.js +0 -8
- package/dist/chunk-PUF75SMJ.js +0 -1
- package/dist/chunk-QKWYCOMM.js +0 -23
- package/dist/chunk-R7APUBZB.js +0 -29
- package/dist/chunk-RCPFUDPS.js +0 -4
- package/dist/chunk-STAVWXWV.js +0 -1
- package/dist/chunk-SWN3LSQX.js +0 -12
- package/dist/chunk-TMNAHOJ7.js +0 -9
- package/dist/chunk-UBOP6HFI.js +0 -6
- package/dist/chunk-UWK5Q3R4.js +0 -19
- package/dist/chunk-W35N7SL3.js +0 -8
- package/dist/chunk-W6URVLQF.js +0 -20
- package/dist/chunk-WMEYNKXZ.js +0 -22
- package/dist/chunk-WTTSB4SV.js +0 -3
- package/dist/chunk-XBB6LSSB.js +0 -6
- package/dist/chunk-Y3R267FV.js +0 -15
- package/dist/chunk-YGSU5KCP.js +0 -9
- package/dist/chunk-ZTPMMNAZ.js +0 -1
- package/dist/chunk-ZZVE64OI.js +0 -2
- /package/dist/{chunk-744BFBBV.js → chunk-6V6ANLHW.js} +0 -0
- /package/dist/{chunk-S2P74CBN.js → chunk-ID6WFAXW.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Button_default as e}from"./chunk-
|
|
1
|
+
import{Button_default as e}from"./chunk-HXNMRJQ4.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{useShellStrings as t}from"./chunk-4PAWQEXM.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
|
|
2
2
|
return a("div",{className:`flex flex-col items-center justify-center text-center ${"card"===i?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===i?"px-6 py-12":"rounded-lg border-2 border-dashed border-red-200 px-6 py-12"}`,role:"alert",children:[
|
|
3
3
|
/* @__PURE__ */d(r,{name:"warning",className:"h-10 w-10 text-red-300 mb-3",strokeWidth:1,"aria-hidden":"true"}),
|
|
4
4
|
/* @__PURE__ */d("h3",{className:"text-sm font-medium text-gray-900",children:n??m.loadError}),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return(new Date).toISOString()}var J=null,W=[],q=!1,L=null,X=/* @__PURE__ */new Set;function $(){for(const t of X)t()}function z(t){W=t,$()}function H(){const t=J;return t?L=t.list().then(e=>{J===t&&(W=e,q=!0,$())}).catch(()=>{J===t&&(q=!0,$())}).finally(()=>{L=null}):(W=[],q=!0,$(),Promise.resolve())}function Q(t){J=t,W=[],q=!1,t?H():$()}function U(t){return X.add(t),!J||q||L||H(),()=>{X.delete(t)}}function Y(){return W}function Z(){const
|
|
1
|
+
import{toast_default as t}from"./chunk-AKM6JBMD.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,_={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function O(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=O(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*_[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(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*_[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var K="pomodoro_tasks",V="pomodoro_tasks_migrated";function j(){return Math.random().toString(36).slice(2,11)}function E(){/* @__PURE__ */
|
|
2
|
+
return(new Date).toISOString()}var J=null,W=[],q=!1,L=null,X=/* @__PURE__ */new Set;function $(){for(const t of X)t()}function z(t){W=t,$()}function H(){const t=J;return t?L=t.list().then(e=>{J===t&&(W=e,q=!0,$())}).catch(()=>{J===t&&(q=!0,$())}).finally(()=>{L=null}):(W=[],q=!0,$(),Promise.resolve())}function Q(t){J=t,W=[],q=!1,t?H():$()}function U(t){return X.add(t),!J||q||L||H(),()=>{X.delete(t)}}function Y(){return W}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=j(),n=E(),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:E()}: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=J;if(!n)return t.addTask(e);const o="tmp-"+j(),a=E(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return z([...W,r]),n.create({...e,name:e.name.trim()}).then(t=>z(W.map(e=>e.id===o?{...r,...t}:e))).catch(()=>z(W.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=J;if(!o)return t.updateTask(e,n);z(W.map(t=>t.id===e?{...t,...n,id:e,updatedAt:E()}:t)),o.update(e,n).catch(()=>{H()})},[t]),l=o(e=>{const n=J;if(!n)return t.removeTask(e);const o=W;z(W.filter(t=>t.id!==e)),n.remove(e).catch(()=>z(o))},[t]),s=o(e=>{if(!J)return t.toggleDone(e);const n=W.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=o(e=>{J||t.setAllTasks(e)},[t]);return null===J?t:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(V))return;const n=localStorage.getItem(K);if(!n)return void localStorage.setItem(V,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(K),void localStorage.setItem(V,"1");const a=E(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||j(),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(K),localStorage.setItem(V,"1")}catch{try{localStorage.setItem(V,"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,9 +1,9 @@
|
|
|
1
|
-
import{ChartDefs as t,MOTION as e,stagger as a,glowId as i}from"./chunk-465RRWBY.js";import{ChartSkeleton as n}from"./chunk-M22B3Y5Y.js";import{useHighlight as o,autoHighlightIndex as l,highlightOpacity as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as s}from"./chunk-
|
|
2
|
-
return
|
|
1
|
+
import{ChartDefs as t,MOTION as e,stagger as a,glowId as i}from"./chunk-465RRWBY.js";import{ChartSkeleton as n}from"./chunk-M22B3Y5Y.js";import{useHighlight as o,autoHighlightIndex as l,highlightOpacity as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as s}from"./chunk-WZ5QSSUM.js";import{CartesianPlot as m}from"./chunk-2JG5JU4M.js";import{useDragZoom as u,ChartZoomSummary as c}from"./chunk-QP4UPCXQ.js";import{CHART_INK as d,resolveSeriesColor as h,STATUS_VARS as f}from"./chunk-TZFACUMR.js";import{useShellStrings as p,useShellLocale as b}from"./chunk-4PAWQEXM.js";import{formatPercent as x,formatPlain as y}from"./chunk-C3QOHMR6.js";import{useId as M}from"react";import{jsx as v,jsxs as g,Fragment as k}from"react/jsx-runtime";function w({stacked:w=!1,stackMode:N="value",height:$=220,width:C,max:j,formatValue:F,yAxisLabel:A,className:L,emptyLabel:S,radius:z=3,loading:T=!1,animate:Q=!0,glow:V=!1,emphasise:Y=!1,activeKey:E,highlight:R="none",valueLabels:U=!1,onSelect:W,min:B,formatTooltipValue:O,tooltipLabels:P,barGap:G=4,seriesLabels:H=!1,zoomable:J=!0,series:X,labels:Z}){const K=M(),q=u(Z.length,J),D=q.view?.[0]??0,I=q.slice(Z),_=P?q.slice(P):void 0,tt=X.map(t=>({...t,data:q.slice(t.data),pointTones:t.pointTones?q.slice(t.pointTones):void 0,pointColors:t.pointColors?q.slice(t.pointColors):void 0})),{highlighted:et}=o(),at=p().charts,it=b(),nt=F??(t=>y(t,it)),ot=O??nt;if(T)/* @__PURE__ */return v(n,{height:$,width:C,variant:"bars",className:L});const lt=(t,e)=>{const a=t.pointColors?.[e];if(a)return a;const i=t.pointTones?.[e];return i?f[i]:h(t.slot,t.color,t.tone)},rt=tt.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(t=>Number.isFinite(t))),st=(t,e)=>{const a=t.data[e];return"number"==typeof a&&Number.isFinite(a)?a:0},mt=I.map((t,e)=>rt.reduce((t,a)=>t+st(a,e),0)),ut=I.map((t,e)=>rt.reduce((t,a)=>t+Math.max(0,st(a,e)),0)),ct=I.map((t,e)=>rt.reduce((t,a)=>t+Math.min(0,st(a,e)),0)),dt=w&&"percent"===N,ht=(t,e)=>mt[e]>0?t/mt[e]:null,ft=dt?[1]:w?[...ut,...ct]:rt.flatMap(t=>t.data.filter(Number.isFinite)),pt=(t,e)=>{const a=t.bandwidth/Math.max(1,rt.length),i=rt.length>1?Math.min(G,.25*a):0;return{offset:e*a+i/2,width:Math.max(1,a-i)}},bt=H&&!w?({x:t,y:e})=>{const a=Math.min(e.domain[1],Math.max(e.domain[0],0));return I.map((i,n)=>rt.map((i,o)=>{const l=i.data[n];if(!Number.isFinite(l))return null;const r=Math.min(e.domain[1],Math.max(e.domain[0],l)),{offset:s,width:m}=pt(t,o),u=t(n)+s+m/2,c=Math.min(e(r),e(a)),h=Math.max(e(r),e(a));if(m<13)return null;const f=Math.floor((h-c-12)/6.6),p=f>=Math.min(4,i.label.length),b=p&&i.label.length>f?`${i.label.slice(0,f-1).trimEnd()}…`:i.label,x=p?h-6:c-4;/* @__PURE__ */
|
|
2
|
+
return v("text",{"data-series-label":"true",x:u,y:x,transform:`rotate(-90 ${u} ${x})`,textAnchor:"start",dominantBaseline:"central",fontSize:11,fill:p?d.surface:d.label,children:b},`n${i.key}-${n}`)}))}:null;/* @__PURE__ */
|
|
3
3
|
return g(k,{children:[
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
return
|
|
6
|
-
return
|
|
4
|
+
/* @__PURE__ */v(m,{labels:I,values:ft,height:$,width:C,max:dt?1:j,min:dt?void 0:B,formatValue:dt?t=>x(Math.round(100*t),0,it):nt,yAxisLabel:A,className:L,emptyLabel:S,onSelect:W?t=>W(D+t):void 0,zoom:J?q:void 0,ariaLabel:at.acrossCategories(rt.map(t=>t.label),I.length),tooltip:t=>/* @__PURE__ */v(s,{title:_?.[t]??I[t],rows:rt.map(e=>({key:e.key,label:e.label,color:lt(e,t),value:Number.isFinite(e.data[t])?dt?`${x(100*(ht(e.data[t],t)??0),1,it)} · ${ot(e.data[t])}`:ot(e.data[t]):void 0})),footnote:dt?at.inCategory(ot(mt[t])):void 0}),overlay:U&&!dt||bt?({x:t,y:e})=>/* @__PURE__ */g("g",{pointerEvents:"none",children:[bt?.({x:t,y:e}),U&&!dt&&I.map((a,i)=>{if(w){if(!rt.some(t=>Number.isFinite(t.data[i])))return null;const a=rt.reduce((t,e)=>t+st(e,i),0),n=a>=0?ut[i]:ct[i];/* @__PURE__ */
|
|
5
|
+
return v("text",{"data-value-label":"true",x:t.center(i),y:a>=0?e(n)-4:e(n)+12,textAnchor:"middle",fontSize:11,fill:d.label,style:{fontVariantNumeric:"tabular-nums"},children:nt(a)},`v${i}`)}return rt.map((a,n)=>{const o=a.data[i];if(!Number.isFinite(o))return null;const l=o,{offset:r,width:s}=pt(t,n);/* @__PURE__ */
|
|
6
|
+
return v("text",{"data-value-label":"true",x:t(i)+r+s/2,y:l>=0?e(l)-4:e(l)+12,textAnchor:"middle",fontSize:11,fill:d.label,style:{fontVariantNumeric:"tabular-nums"},children:nt(l)},`v${a.key}-${i}`)})})]}):void 0,children:({x:n,y:o,bottom:s,active:m})=>{const u=E?I.indexOf(E):-1,c=l(w?mt:rt[0]?.data??[],R),h=m??(u>=0?u:c);/* @__PURE__ */
|
|
7
7
|
return g("g",{children:[
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
return
|
|
8
|
+
/* @__PURE__ */v(t,{id:K,glow:V}),I.map((t,l)=>{let s=0,m=0;const u=o(Math.min(o.domain[1],Math.max(o.domain[0],0)));return rt.map((t,c)=>{const f=t.data[l];if(!Number.isFinite(f))return null;const p=dt?ht(f,l):f;if(null===p)return null;const b=lt(t,l),x=pt(n,c),y=w?n(l):n(l)+x.offset,M=w?Math.max(1,n.bandwidth):x.width;let g,k,N=!0;if(w){const t=p>=0?s:m,e=t+p;p>=0?s=e:m=e,g=o(Math.max(t,e)),k=o(Math.min(t,e)),N=0===t}else g=Math.min(o(p),u),k=Math.max(o(p),u);const $=Math.max(0,k-g-(w&&!N?2:0)),C=null===h||h===l,j=C?b:Y?d.muted:b,F=r(t.key,et);/* @__PURE__ */
|
|
9
|
+
return v("rect",{x:y,y:g,width:M,height:$,rx:z,fill:j,fillOpacity:F??(C?1:Y?.32:.45),filter:V&&h===l?`url(#${i(K)})`:void 0,className:"rosh-viz-mark"+(Q?` ${e.rise}`:""),style:Q?a(l*(w?1:rt.length)+c,26):void 0},`${t.key}-${l}`)})}),null!==m&&!Y&&/* @__PURE__ */v("line",{x1:n.center(m),y1:o(o.domain[1]),x2:n.center(m),y2:s,stroke:d.axis,strokeWidth:1})]})}}),q.view&&/* @__PURE__ */v(c,{from:_?.[0]??I[0],to:_?.at(-1)??I[I.length-1],count:I.length,total:w?ot(mt.reduce((t,e)=>t+e,0)):void 0,rows:rt.map(t=>({s:t,sum:t.data.reduce((e,a,i)=>e+st(t,i),0)})).sort((t,e)=>e.sum-t.sum).map(({s:t,sum:e})=>({key:t.key,label:t.label,color:h(t.slot,t.color,t.tone),value:ot(e)})),onClear:q.clear})]})}export{w as ColumnChart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-STAVWXWV.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,_=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)}}},Z=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,_),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)=>{Z(()=>{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 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}},V=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,W=/\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,J=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,K=/\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,X=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(X,"").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=Q.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(X,"").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;Z(()=>{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,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(V,"[redacted]").replace(W,"[redacted]").replace(J,"[url]").replace(K,"[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-SM7IDX7Y.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,_=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)}}},Z=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,_),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)=>{Z(()=>{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 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}},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,D=/\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,W=/\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,X=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Y=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Q(e,t,n){const i=e.replace(X,"").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=Y.exec(n.trim()),i=e&&Q(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(X,"").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;Z(()=>{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,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(D,"[url]").replace(V,"[id]").replace(W,"[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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{buttonClasses as e}from"./chunk-UQYNPYF4.js";import{isAriaDisabled as a,swallowPress as r,describedByWith as i,OffWithReason as s}from"./chunk-SQCUN2DX.js";import{SpinnerRing as l}from"./chunk-R2VKEMZH.js";import{forwardRef as d,useId as n}from"react";import{jsxs as t,jsx as c}from"react/jsx-runtime";var o=d(function({variant:d="primary",size:o="md",loading:m=!1,leftIcon:p,rightIcon:b,block:f=!1,disabled:u,type:h="button",children:k,className:x="",disabledReason:N,onClick:y,pressed:v,"aria-disabled":g,"aria-describedby":j,...C},w){const z=n(),I=u||m,Q=null!=N&&""!==N,R=I&&Q,U=!I&&a(g),Y=U&&Q,D=R||Y?z:void 0,E=/* @__PURE__ */t("button",{ref:w,type:h,disabled:I,"aria-busy":m||void 0,"aria-disabled":!!U||g,"aria-describedby":i(j,D),onClick:U?r:y,className:e({variant:d,size:o,block:f,pressed:v??(!0===C["aria-pressed"]||"true"===C["aria-pressed"]),className:x}),...C,children:[m?/* @__PURE__ */c(l,{className:"h-3.5 w-3.5",ink:""}):p,k,!m&&b]});return Y?/* @__PURE__ */c(s,{reason:N,id:z,block:f,children:E}):R?/* @__PURE__ */t("span",{className:f?"flex w-full flex-col gap-1":"inline-flex flex-col items-start gap-1",children:[E,
|
|
2
|
+
/* @__PURE__ */c("span",{id:D,className:"text-xs text-red-600",children:N})]}):E});export{o as Button_default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{InputNumber_default as a}from"./chunk-
|
|
1
|
+
import{InputNumber_default as a}from"./chunk-LVBO2OMQ.js";import{Icon as e}from"./chunk-2UO47XB4.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
|
|
2
2
|
return r("div",{role:"group","aria-label":e,className:"grid min-w-0 grid-cols-2 gap-2",children:[u("x"),u("y")]})}export{s as PositionInput};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-ZMRGHVKS.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-WZ5QSSUM.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-4PAWQEXM.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:M}){const y=i().charts,$=o(),j=k??(e=>h(e,$)),N=M??y.nothingToBreakDown,[w,E]=u(null),{highlighted:A}=r(),C=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",C),0===C.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const L=Math.max(...C.map(e=>e.depth))+1,Q=f/2,R=f/2,S=(f/2-8-b)/L,W=C.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),z=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,F=e=>null!==w?e.id===w:null===A||e.branchKey===A,H=w?C.find(e=>e.id===w):void 0,I=e=>c(e.value/W*100,1,$);/* @__PURE__ */
|
|
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":y.sunburst(j(W),L),onMouseLeave:()=>E(null),children:[C.map(e=>/* @__PURE__ */s("path",{d:t(Q,R,b+e.depth*S+v/2,b+(e.depth+1)*S-v/2,e.start,e.end),fill:z(e),fillOpacity:F(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>E(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:Q,y:R+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),H&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:H.label,rows:[{key:"value",label:y.value,color:z(H),value:j(H.value)},{key:"share",label:y.share,color:a.muted,value:I(H)}]})}),
|
|
4
|
+
/* @__PURE__ */s(e,{caption:y.sunburst(j(W),L),head:[y.tableLevel,y.tableItem,y.value,y.share],rows:C.map(e=>[e.depth+1,e.label,j(e.value),I(e)])})]})}export{f as SunburstChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=["academic-cap","accent","account","account-circle","add","add-circle","add-person","adjust","align-center","align-justify","align-left","align-right","align-separate","alignment","anchor","animation","apps","archive-box","arrow","arrow-down","arrow-left","arrow-left-end-on-rectangle","arrow-long-right","arrow-right","arrow-trending-down","arrow-trending-up","arrow-up","arrow-up-right","at-symbol","attach","background","bag","bank","bars-3-bottom-left","battery","beaker","bell","bell-alert","bell-plus","billing","black-and-white","block-badge","block-banner","block-box","block-button","block-column","block-coupon","block-divider","block-footer","block-heading","block-image","block-included-list","block-layered-images","block-product","block-product-title","block-section","block-social","block-spacer","block-text","block-video","blog-post","bold","bolt","book-open","bookmark","bookmark-square","border-all","border-bottom","border-left","border-right","border-top","braces","brand-1password","brand-adyen","brand-afterpay","brand-aircall","brand-alipay","brand-amd","brand-americanexpress","brand-anthropic","brand-apple","brand-applepay","brand-aws","brand-bigcommerce","brand-brevo","brand-calendly","brand-campaignmonitor","brand-cloudflare","brand-dell","brand-dhl","brand-dinersclub","brand-dropbox","brand-ebay","brand-etsy","brand-facebook","brand-fedex","brand-github","brand-gmail","brand-googleads","brand-googleanalytics","brand-googlecalendar","brand-googledrive","brand-googlepay","brand-googlesheets","brand-hubspot","brand-instagram","brand-intel","brand-intercom","brand-jcb","brand-klarna","brand-line","brand-linkedin","brand-mailchimp","brand-mailgun","brand-make","brand-mastercard","brand-messenger","brand-meta","brand-myob","brand-notion","brand-nvidia","brand-paypal","brand-pinterest","brand-quickbooks","brand-sage","brand-samsung","brand-shopify","brand-square","brand-squarespace","brand-stripe","brand-telegram","brand-tiktok","brand-trello","brand-ups","brand-visa","brand-vonage","brand-wechat","brand-whatsapp","brand-wise","brand-wix","brand-woocommerce","brand-x","brand-xero","brand-youtube","brand-zapier","brand-zendesk","brand-zoom","breadcrumb","briefcase","bug","bug-ant","building-library","building-office-2","button","button-arrow","button-icon","calculator","calendar","calendar-check","camera","caption","car","card-payment","caret","cart","case","case-capitalized","case-lower","case-normal","case-upper","category","chart","chart-bar","chart-bar-square","chart-line","chat","chat-bubble-left-right","chat-bubble-oval-left-ellipsis","check","check-circle","checkbox","chevron","chevron-double","chevron-double-left","chevron-double-right","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle-stack","clear-marks","clipboard","clipboard-check","clipboard-document-list","clipboard-list","clock","close","close-circle","cloud","cloud-alert","cloud-arrow-up","cloud-check","cloud-download","cloud-pause","cloud-slash","code","code-bracket","collapse","collapse-all","column-gap","column-widths","columns","company","compose","contrast","cookie","copied","copy","copy-style","copy-to-page","corner","count-up","crop","crop-bottom","crop-left","crop-left-right","crop-right","crop-top","crop-y","cube-transparent","cursor","cursor-arrow-rays","cursor-click","dashboard","date","desktop","detach","diagram","direction","direction-down","direction-left","direction-right","direction-up","document","document-check","document-magnifying-glass","dollar","dot","download","drag","drop","duplicate","duration","edit","email","emphasis","enter","eraser","error","expand","external","eye","eye-off","face-smile","filter","finish","fire","flag","flag-au","flag-ca","flag-eu","flag-gb","flag-nz","flag-us","folder","folder-open","folder-plus","forward","full-width","gap","gem","gift","globe","grid","ground","hand","hand-thumb-up","hash","headquarters","heart","height","help","help-off","hexagon","home","hover","hover-lift","hover-next-image","hover-none","hover-rotate","hover-zoom","icon-after-text","icon-at-end","icon-before-text","identification","image","image-off","images","inbox","info","italic","key","layers","layout","letter-spacing","lightbulb","line-between","line-dashed","line-dotted","line-solid","line-spacing","line-style","link","link-slash","list","list-format","list-none","location","lock","logo","logout","loop","map","media","media-layout-big-two","media-layout-inset","media-layout-side-by-side","media-layout-stacked","megaphone","menu","meta","microphone","money","moon","more","more-vertical","move-down","move-up","newspaper","no-symbol","note","nudge","nudge-x","nudge-y","numbered-list","opacity","own-text","package","package-open","padding-all","padding-bottom","padding-left","padding-left-right","padding-right","padding-top","padding-x","padding-y","page","paint-brush","palette","panel-left","panel-right","paragraph-spacing","parcel","paste","paste-style","pause","pen","people","percent","phone","phone-hidden","placement","play","plus-minus","power","presentation-chart-bar","print","product","product-field","product-size","progress","quote","radio-dot","radius","receipt","receipt-percent","receipt-refund","rectangle-group","redo","refresh","remove","remove-circle","rename","reply","reply-all","revert","robot","rotate","scale","scroll-point","scroll-text","search","select-all","send","server","settings","shadow","shape-ellipse","shape-rect","share","shared","shield-check","shield-exclamation","sides-each","signal","signal-slash","sitemap","slide-arrows-bare","slide-arrows-round","slide-arrows-square","slide-picker-bar","slide-picker-cards","slide-picker-dots","slide-picker-numbers","slide-picker-squares","sort","sparkles","speaker","speaker-wave","spec-table","spinner","split","square","star","state","status-circle","status-dot","sticky","stop-circle","store","strike","styles","subscript","success-burst","sun","superscript","swap","swatch","table","tablet","tabs","tag","target","team","telephone","template","text-color","text-lines","text-size","text-small","text-value","texture","theme","ticket","title","trash","trigger","truck","tv","type","tyre","underline","undo","upload","v-align","verified","video-off","view-columns","wallet","warning","weight","wheel","widgets","width","window","windows","words-from","wrap","wrench","wrench-screwdriver","zoom-in"],e=new Set(a),r=a=>"string"==typeof a&&e.has(a),n=["brand-1password","brand-adyen","brand-afterpay","brand-aircall","brand-alipay","brand-amd","brand-americanexpress","brand-anthropic","brand-apple","brand-applepay","brand-aws","brand-bigcommerce","brand-brevo","brand-calendly","brand-campaignmonitor","brand-cloudflare","brand-dell","brand-dhl","brand-dinersclub","brand-dropbox","brand-ebay","brand-etsy","brand-facebook","brand-fedex","brand-github","brand-gmail","brand-googleads","brand-googleanalytics","brand-googlecalendar","brand-googledrive","brand-googlepay","brand-googlesheets","brand-hubspot","brand-instagram","brand-intel","brand-intercom","brand-jcb","brand-klarna","brand-line","brand-linkedin","brand-mailchimp","brand-mailgun","brand-make","brand-mastercard","brand-messenger","brand-meta","brand-myob","brand-notion","brand-nvidia","brand-paypal","brand-pinterest","brand-quickbooks","brand-sage","brand-samsung","brand-shopify","brand-square","brand-squarespace","brand-stripe","brand-telegram","brand-tiktok","brand-trello","brand-ups","brand-visa","brand-vonage","brand-wechat","brand-whatsapp","brand-wise","brand-wix","brand-woocommerce","brand-x","brand-xero","brand-youtube","brand-zapier","brand-zendesk","brand-zoom"],o=new Set(n),d=a=>"string"==typeof a&&o.has(a);export{n as BRAND_ICON_NAMES,a as ICON_NAMES,d as isBrandIconName,r as isIconName};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-
|
|
2
|
-
return s(e,{content:z??k.hint,side:
|
|
1
|
+
import{Tooltip as e}from"./chunk-Q3IR5SKD.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-4PAWQEXM.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),D=o({onResize:d,min:f,max:p,side:m});D.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 M=i(()=>{N.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>M,[M]);const I=e=>{N.current&&(e.currentTarget.hasPointerCapture?.(N.current.pointer)&&e.currentTarget.releasePointerCapture(N.current.pointer),M())},C="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",T=P?`absolute inset-x-0 ${C} z-10 flex h-2`:`absolute inset-y-0 ${C} z-10 flex w-2`;/* @__PURE__ */
|
|
2
|
+
return s(e,{content:z??k.hint,side:R,delay:600,className:`${T} ${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 M();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}=D.current;o(l(r.width,t,s,n,i))},onPointerUp:I,onPointerCancel:I,onLostPointerCapture:()=>{N.current&&M()},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 ${C} 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 ${C} 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,4 +1,4 @@
|
|
|
1
|
-
import{Avatar as e}from"./chunk-DKGZPVLL.js";import{StatCard as a,Card as t}from"./chunk-TOVKWNI2.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-
|
|
1
|
+
import{Avatar as e}from"./chunk-DKGZPVLL.js";import{StatCard as a,Card as t}from"./chunk-TOVKWNI2.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-ZHPHNQKM.js";import{ColumnChart as l}from"./chunk-HL3DJTIC.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-EQZZ4V5X.js";import{Button_default as c}from"./chunk-HXNMRJQ4.js";import{TH_ONE_LINE as n}from"./chunk-S5SRXI4V.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
|
|
2
2
|
return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
|
|
3
3
|
/* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */m("div",{children:[
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ChartTooltip as t}from"./chunk-WZ5QSSUM.js";import{CartesianPlot as o}from"./chunk-2JG5JU4M.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-4PAWQEXM.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 M=e().charts,A=i(),v=d??(t=>Number.isInteger(t)?m(t,A):n(t,1,A)),w=x??(t=>m(t,A)),L=g??M.countAxis,N=k??M.distribution,U=h??r(c??[],s),C=a(0,b,f),J=U.map(t=>v(t.from)),P=U.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(o,{labels:J,values:P,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:w,yAxisLabel:L,className:y,emptyLabel:j,ariaLabel:M.histogram(N,U.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${v(U[o].from)} – ${v(U[o].to)}`,rows:[{key:"count",label:M.observations,color:C,value:w(U[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:U.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:C,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-XDBG4HPV.js";import{IconButton_default as a}from"./chunk-FX6DBXXD.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{Tooltip as n}from"./chunk-Q3IR5SKD.js";import{useShellStrings as s}from"./chunk-4PAWQEXM.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
|
|
2
|
+
return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:D,letterCase:M,clear:x,disabled:y=!1,"aria-label":B,windows:j,className:A="",layout:X="grid"}){const q=s().textToolbar,I=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!I.words&&!I.paragraph)return null;const R=m(n,k,x,I.cells.paragraph),S=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,$=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:S(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:S(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,K=l(q),L=e.map(e=>[e,K[e],r(e)]),U=C?e.filter(e=>C.allow.includes(e)):[],T=C&&U.includes(C.value)?C.value:U[0],E=[["none",q.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",q.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",q.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],H=x&&R?g(q.clear,/* @__PURE__ */i(a,{className:S(!1),"aria-label":q.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,O=/* @__PURE__ */t(d,{children:[$("bold",q.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),$("italic",q.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),$("underline",q.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),$("strike",q.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(q.color,/* @__PURE__ */i(a,{pressed:k.open,className:S(k.open,"rosh-tb-color"),"aria-label":q.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,$("link",q.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),$("sup",q.sup,/* @__PURE__ */i(o,{name:"superscript"})),$("sub",q.sub,/* @__PURE__ */i(o,{name:"subscript"})),$("code",q.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===R?H:null]}),P=/* @__PURE__ */t(d,{children:[C&&U.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.alignment,onKeyDown:e=>p(e,U,e=>C.onChange(e)),children:L.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:S(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===T?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,D&&n.has("bullet")?g(q.bullet,/* @__PURE__ */i(a,{className:S("bullet"===D.pressed),"aria-label":q.bullet,"aria-pressed":"bullet"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,D&&n.has("number")?g(q.number,/* @__PURE__ */i(a,{className:S("number"===D.pressed),"aria-label":q.number,"aria-pressed":"number"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,$("quote",q.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.letterCase,onKeyDown:e=>p(e,E.map(([e])=>e),e=>M.onChange(e)),children:E.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:S(M.value===e),"aria-checked":M.value===e,"aria-label":l,tabIndex:e===(M.value||"none")?0:-1,disabled:y||M.disabled,onMouseDown:c,onClick:()=>M.onChange(M.value===e?"":e),children:r},e)))}):null,"paragraph"===R?H:null]}),Q="row"===X,F=Q?" is-row":I.flow?" is-flow":I.oneRow?" is-one-row":I.words&&void 0===N&&"words"!==R?" is-eight":"",G=b(n,Boolean(k)),V={"--rosh-tb-color-col":String(G.color),"--rosh-tb-link-col":String(G.link),...Q?{"--rosh-tb-cells":String(I.cells.words+I.cells.paragraph),"--rosh-tb-groupgap":I.words&&I.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let W;return W=Q?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[I.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:O}):null,I.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:P}):null]}):I.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[O,
|
|
3
|
+
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),P]}):I.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
+
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:O}),
|
|
5
|
+
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:P})]}):/* @__PURE__ */t(d,{children:[I.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==R?" is-eight":""),children:O}):null,I.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:P}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${F} ${A}`.trim(),style:V,children:[
|
|
6
|
+
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":B??q.formatting,children:W}),j]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as t}from"./chunk-
|
|
1
|
+
import{Icon as t}from"./chunk-2UO47XB4.js";import{jsxs as n,jsx as e}from"react/jsx-runtime";var r=t=>Array.isArray(t.options);function o(t){const n=[];for(const e of t)r(e)?n.push(...e.options):n.push(e);return n}function i(t,n){const e=[];for(const o of t){if(!r(o)){n(o)&&e.push(o);continue}const t=o.options.filter(n);t.length&&e.push({...o,options:t})}return e}function s(t,o,i,s=""){const a=[];let c=0;return t.forEach((t,u)=>{if(!r(t))return a.push(o(t,c)),void(c+=1);const l=`${i}-group-${u}`,p=c;c+=t.options.length,a.push(
|
|
2
2
|
/* @__PURE__ */n("div",{role:"group","aria-labelledby":l,children:[
|
|
3
3
|
/* @__PURE__ */e("div",{id:l,role:"presentation","data-option-group-heading":"",className:`truncate px-3 pb-1 pt-2 text-xs font-semibold text-gray-500 ${s}`.trim(),children:t.label}),t.options.map((t,n)=>o(t,p+n))]},l))}),a}function a({selected:n}){/* @__PURE__ */
|
|
4
4
|
return e(t,{name:"check","aria-hidden":"true",className:"h-4 w-4 shrink-0 "+(n?"":"invisible"),strokeWidth:2.5})}function c(t,n){return t.label.toLowerCase().includes(n)||(t.sublabel?.toLowerCase().includes(n)??!1)}function u({children:t,grows:n=!1}){/* @__PURE__ */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-2UO47XB4.js";import{useShellStrings as t}from"./chunk-4PAWQEXM.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
|
|
2
2
|
return r("div",{className:`flex flex-col items-center justify-center text-center ${"card"===h?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===h?"px-6 py-12":"rounded-lg border-2 border-dashed border-gray-300 px-6 py-12"}`,children:[x&&/* @__PURE__ */a("div",{className:"mb-3 flex h-10 w-10 items-center justify-center text-gray-300","aria-hidden":"true",children:x}),p&&/* @__PURE__ */a(e,{name:"inbox",className:"h-10 w-10 text-gray-300 mb-3","aria-hidden":"true",strokeWidth:1}),n&&/* @__PURE__ */a("h3",{className:"text-sm font-medium text-gray-900",children:n}),y&&/* @__PURE__ */a("p",{className:"text-sm text-gray-500 "+(n?"mt-2":""),children:y}),f&&/* @__PURE__ */a("p",{className:"text-xs text-gray-400 mt-1",children:f}),l&&/* @__PURE__ */a("div",{className:"mt-4",children:l})]})}export{n as EmptyState};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{useSettingAuto as e}from"./chunk-2NMW66P5.js";import{
|
|
2
|
-
return f("div",{className:"relative","data-number-box":"",style:
|
|
1
|
+
import{useSettingAuto as e}from"./chunk-2NMW66P5.js";import{inputClasses as r}from"./chunk-AYZY3YNC.js";import{IconButton_default as t}from"./chunk-FX6DBXXD.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{registerModalEscapeInterceptor as i}from"./chunk-TWVUQUUD.js";import{useBrowserLayoutEffect as o}from"./chunk-D65T4H6J.js";import{useShellStrings as a}from"./chunk-4PAWQEXM.js";import{forwardRef as l,useId as c,useState as u,useRef as s,useCallback as d,useEffect as p}from"react";import{jsx as m,jsxs as f,Fragment as v}from"react/jsx-runtime";function h(e){const r=String(e),t=/e-(\d+)$/.exec(r);return t?Number(t[1]):r.split(".")[1]?.length??0}var b=(e,r)=>null==e?"":null!=r?e.toFixed(r):String(e);function y({dir:e,compact:r,label:i,disabled:o,onStep:a}){const l=s(a);l.current=a;const c=s({}),u=d(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);p(()=>u,[u]),p(()=>{o&&u()},[o,u]);const f=/* @__PURE__ */m(n,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:r?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:r?2.6:2}),v={tabIndex:-1,"aria-label":i,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),u();const r=e.shiftKey;l.current(r);const t=e.currentTarget.ownerDocument.defaultView??window;t.addEventListener("pointerup",u),c.current={off:()=>t.removeEventListener("pointerup",u),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(r),60)},400)}},onPointerLeave:u,onPointerCancel:u,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return r?/* @__PURE__ */m("button",{type:"button",...v,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */m(t,{size:"sm",...v,children:f})}var g=l(function({value:t,onChange:n,min:l,max:g,precision:x,step:w,shiftStep:k,disabled:N,readOnly:E,invalid:j,placeholder:D,size:B,prefix:C,suffix:F,id:M,name:O,className:W="",onBlur:P,onFocus:S,steppers:U,stepFrom:K,snap:T=!1,allowEmpty:X=!0,appearance:$="box",display:z,reportWhileTyping:L=!0,onRevert:A,"aria-label":R,"aria-labelledby":Y,"aria-describedby":I,auto:V,...Q},H){const J="bare"===$,Z=e(),q=V??Z,G=c(),_="string"==typeof F&&""!==F.trim()?F.trim():void 0,ee=e=>function(e,r){let t=e.trim();if(r&&t.endsWith(r)&&(t=t.slice(0,-r.length).trim()),t=t.replace(",","."),""===t||"-"===t||"."===t||"-."===t)return null;const n=Number(t);return Number.isFinite(n)?n:null}(e,_),re=Object.fromEntries(Object.entries(Q).filter(([e])=>e.startsWith("data-"))),te=a(),[ne,ie]=u(()=>b(t,x)),oe=s(ne);oe.current=ne;const ae=s(null),le=d(e=>{ae.current=e,"function"==typeof H?H(e):H&&(H.current=e)},[H]),ce=s(t),ue=s(t);ue.current=t;const se=Boolean(N||E),de=U??!1,pe="compact"===de,me=s(null),[fe,ve]=u(0);o(()=>{const e=me.current;if(!e)return;const r=()=>ve(Math.ceil(e.getBoundingClientRect().width));if(r(),"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(r);return t.observe(e),()=>t.disconnect()},[C]),p(()=>{ee(oe.current)!==t&&ie(b(t,x))},[t,x]);const he=e=>{if(se)return;let r=(ee(oe.current)??K??(D?ee(D):null)??0)+e;null!=l&&r<l&&(r=l),null!=g&&r>g&&(r=g);const t=x??String(w??1).split(".")[1]?.length??0;r=Number(r.toFixed(t));const i=b(r,x);oe.current=i,ie(i),n(r),Ne()},be=s(he);be.current=he;const ye=s({unit:w??1,big:k??10*(w??1),locked:se});ye.current={unit:w??1,big:k??10*(w??1),locked:se},p(()=>{const e=ae.current;if(!e)return;const r=r=>{const{unit:t,big:n,locked:i}=ye.current;if(i||e.ownerDocument.activeElement!==e)return;const o=r.deltaY||r.deltaX;o&&(r.preventDefault(),be.current((o<0?1:-1)*(r.shiftKey?n:t)))};return e.addEventListener("wheel",r,{passive:!1}),()=>e.removeEventListener("wheel",r)},[]);const[ge,xe]=u(!1),[we,ke]=u(0),Ne=()=>{J&&ke(e=>e+1)};p(()=>{J&&ge&&document.activeElement===ae.current&&ae.current?.select()},[J,ge,we]);const Ee=s(!1);p(()=>{if(ge&&!se)return i(e=>{if("Escape"!==e.key||document.activeElement!==ae.current)return!1;const r=ce.current;if(ee(oe.current)===r)return!1;const t=b(r,x);return oe.current=t,ie(t),ue.current!==r&&(A??n)(r),Ne(),!0})},[ge,se,x,n,A]);const je=()=>{const e=ee(oe.current);if(null==e){if(!X){const e=b(ue.current,x);return oe.current=e,ie(e),ue.current}return oe.current="",ie(""),null!==ue.current&&n(null),null}let r=e;const t=x??(T?Math.max(h(w??1),h(l??0)):void 0);T&&(r=function(e,r,t){const n=(e-t)/r;return t+Math.round(n+1e-9*Math.sign(e))*r}(r,w??1,l??0)),null!=l&&r<l&&(r=l),null!=g&&r>g&&(r=g),null!=t&&(r=Number(r.toFixed(t)));const i=b(r,x);return oe.current=i,ie(i),r===e&&r===ue.current||n(r),r},De=/* @__PURE__ */m("input",{ref:le,id:M,"data-number-input":"",name:O,type:"text",inputMode:0===x?"numeric":"decimal",value:!ge&&z?z(t):ne,disabled:N,readOnly:E,placeholder:D,step:w,role:"spinbutton","aria-valuenow":t??void 0,"aria-valuemin":l,"aria-valuemax":g,"aria-valuetext":null==t?D||void 0:`${b(t,x)}${J&&_?_:""}`,"aria-describedby":[I,q?G:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":J?"bare":void 0,...re,autoComplete:J?"off":void 0,spellCheck:!J&&void 0,"aria-invalid":j||void 0,"aria-label":R,"aria-labelledby":Y,onChange:e=>(e=>{if(E)return;const r=_&&e.trimEnd().endsWith(_)?e.trimEnd().slice(0,-_.length).trimEnd():e;if(""!==r&&!/^-?\d*[.,]?\d*$/.test(r))return;if(ie(e),!L)return;const t=ee(e);(null!==t||X)&&n(t)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!se)return ce.current=je(),void Ne();const r=w??1,t=k??10*r,n="ArrowUp"===e.key?e.shiftKey?t:r:"ArrowDown"===e.key?-(e.shiftKey?t:r):"PageUp"===e.key?10*r:"PageDown"===e.key?10*-r:null;null===n||se||(e.preventDefault(),he(n))},onFocus:()=>{ce.current=ue.current,xe(!0),Ee.current=!0,S?.()},onMouseUp:J?e=>{Ee.current&&(Ee.current=!1,e.preventDefault())}:void 0,onBlur:()=>{xe(!1),Ee.current=!1,je(),P?.()},className:J?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",ge?"bg-surface":"bg-transparent",se?"cursor-default":"cursor-text",W].filter(Boolean).join(" "):r({invalid:j,size:B,readOnly:E,auto:q,className:[C?"pl-[max(var(--space-24),calc(var(--space-control-x-sm)+var(--rosh-number-prefix-width)+var(--space-icon-gap-sm)))]":"",pe?F?"pr-10":"pr-6":de?F?"pr-24":"pr-16":F?"pr-10":"","text-left tabular-nums",W].filter(Boolean).join(" ")})}),Be=q?/* @__PURE__ */m("span",{id:G,hidden:!0,children:te.settingView.auto}):null;if(J||!C&&!F&&!de)return Be?/* @__PURE__ */f(v,{children:[De,Be]}):De;const Ce=ee(ne);/* @__PURE__ */
|
|
2
|
+
return f("div",{className:"relative","data-number-box":"",style:C?{"--rosh-number-prefix-width":`${fe}px`}:void 0,children:[C&&/* @__PURE__ */m("span",{ref:me,className:"pointer-events-none absolute left-(--space-control-x-sm) top-1/2 -translate-y-1/2 whitespace-nowrap text-sm text-ink-faint",children:C}),De,Be,F&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${pe?"right-6":de?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-ink-faint`,children:F}),de&&(()=>{const e=/* @__PURE__ */m(y,{dir:-1,compact:pe,label:te.number.decrease,disabled:se||null!=l&&null!=Ce&&Ce<=l,onStep:e=>be.current(-(e?k??10*(w??1):w??1))}),r=/* @__PURE__ */m(y,{dir:1,compact:pe,label:te.number.increase,disabled:se||null!=g&&null!=Ce&&Ce>=g,onStep:e=>be.current(e?k??10*(w??1):w??1)});/* @__PURE__ */
|
|
3
3
|
return f("span",pe?{"data-steppers":"compact",className:"absolute inset-y-px right-px flex w-4 flex-col overflow-hidden rounded-r-(--radius-control)",children:[r,e]}:{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-0.5",children:[e,r]})})()]})});export{g as InputNumber_default};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-TOVKWNI2.js";import{Select_default as l}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-TOVKWNI2.js";import{Select_default as l}from"./chunk-OET2Q7P6.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Banner as r}from"./chunk-ZW3IDCP2.js";import{Input_default as i}from"./chunk-MAMWQCJ6.js";import{Button_default as c}from"./chunk-HXNMRJQ4.js";import{Checkbox_default as s}from"./chunk-CGZBDI6C.js";import{useState as d}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=d(!0),[p,u]=d("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
|
|
3
3
|
/* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
|
|
4
4
|
/* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
|
|
5
5
|
/* @__PURE__ */t("form",{className:"space-y-5 lg:col-span-2",onSubmit:e=>e.preventDefault(),children:[
|
|
6
|
-
/* @__PURE__ */n(e,{header:"Contact",children:/* @__PURE__ */n("div",{className:"space-y-4",children:/* @__PURE__ */n(a,{label:"Email",htmlFor:"ck-email",required:!0,children:/* @__PURE__ */n(
|
|
6
|
+
/* @__PURE__ */n(e,{header:"Contact",children:/* @__PURE__ */n("div",{className:"space-y-4",children:/* @__PURE__ */n(a,{label:"Email",htmlFor:"ck-email",required:!0,children:/* @__PURE__ */n(i,{id:"ck-email",type:"email",placeholder:"you@example.com"})})})}),
|
|
7
7
|
/* @__PURE__ */n(e,{header:"Shipping address",children:/* @__PURE__ */t("div",{className:"space-y-4",children:[
|
|
8
8
|
/* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[
|
|
9
|
-
/* @__PURE__ */n(a,{label:"First name",required:!0,children:/* @__PURE__ */n(
|
|
10
|
-
/* @__PURE__ */n(a,{label:"Last name",required:!0,children:/* @__PURE__ */n(
|
|
11
|
-
/* @__PURE__ */n(a,{label:"Address",required:!0,children:/* @__PURE__ */n(
|
|
9
|
+
/* @__PURE__ */n(a,{label:"First name",required:!0,children:/* @__PURE__ */n(i,{placeholder:"Alice"})}),
|
|
10
|
+
/* @__PURE__ */n(a,{label:"Last name",required:!0,children:/* @__PURE__ */n(i,{placeholder:"Nguyen"})})]}),
|
|
11
|
+
/* @__PURE__ */n(a,{label:"Address",required:!0,children:/* @__PURE__ */n(i,{placeholder:"123 Market St"})}),
|
|
12
12
|
/* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[
|
|
13
|
-
/* @__PURE__ */n(a,{label:"City",children:/* @__PURE__ */n(
|
|
14
|
-
/* @__PURE__ */n(a,{label:"ZIP",children:/* @__PURE__ */n(
|
|
13
|
+
/* @__PURE__ */n(a,{label:"City",children:/* @__PURE__ */n(i,{placeholder:"San Francisco"})}),
|
|
14
|
+
/* @__PURE__ */n(a,{label:"ZIP",children:/* @__PURE__ */n(i,{placeholder:"94103"})}),
|
|
15
15
|
/* @__PURE__ */n(a,{label:"Country",children:/* @__PURE__ */n(l,{value:p,onChange:u,options:[{value:"us",label:"United States"},{value:"de",label:"Germany"},{value:"jp",label:"Japan"}]})})]}),
|
|
16
|
-
/* @__PURE__ */n(
|
|
16
|
+
/* @__PURE__ */n(s,{checked:m,onChange:o,label:"Billing address same as shipping"})]})}),
|
|
17
17
|
/* @__PURE__ */n(e,{header:"Payment",children:/* @__PURE__ */t("div",{className:"space-y-4",children:[
|
|
18
|
-
/* @__PURE__ */n(a,{label:"Card number",required:!0,children:/* @__PURE__ */n(
|
|
18
|
+
/* @__PURE__ */n(a,{label:"Card number",required:!0,children:/* @__PURE__ */n(i,{placeholder:"1234 5678 9012 3456"})}),
|
|
19
19
|
/* @__PURE__ */t("div",{className:"grid grid-cols-2 gap-4",children:[
|
|
20
|
-
/* @__PURE__ */n(a,{label:"Expiry",required:!0,children:/* @__PURE__ */n(
|
|
21
|
-
/* @__PURE__ */n(a,{label:"CVC",required:!0,children:/* @__PURE__ */n(
|
|
20
|
+
/* @__PURE__ */n(a,{label:"Expiry",required:!0,children:/* @__PURE__ */n(i,{placeholder:"MM / YY"})}),
|
|
21
|
+
/* @__PURE__ */n(a,{label:"CVC",required:!0,children:/* @__PURE__ */n(i,{placeholder:"123"})})]})]})})]}),
|
|
22
22
|
/* @__PURE__ */t("div",{className:"space-y-4",children:[
|
|
23
23
|
/* @__PURE__ */t(e,{header:"Order summary",children:[
|
|
24
24
|
/* @__PURE__ */n("ul",{className:"space-y-2 text-sm",children:h.map(e=>/* @__PURE__ */t("li",{className:"flex items-center justify-between gap-2 text-gray-700",children:[
|
|
@@ -35,5 +35,5 @@ return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__P
|
|
|
35
35
|
/* @__PURE__ */t("div",{className:"flex justify-between text-base font-semibold text-gray-900",children:[
|
|
36
36
|
/* @__PURE__ */n("span",{children:"Total"}),
|
|
37
37
|
/* @__PURE__ */t("span",{children:["$",g]})]})]}),
|
|
38
|
-
/* @__PURE__ */t(
|
|
39
|
-
/* @__PURE__ */n(
|
|
38
|
+
/* @__PURE__ */t(c,{block:!0,className:"mt-4",children:["Pay $",g]})]}),
|
|
39
|
+
/* @__PURE__ */n(r,{tone:"success",title:"Promo applied",children:"Free returns within 30 days."})]})]})]})})}export{m as CheckoutTemplate};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as l}from"./chunk-ID6WFAXW.js";import{dialogA11y as a}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as o}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as s}from"./chunk-CDAJKLGL.js";import{Icon as d}from"./chunk-2UO47XB4.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{registerModalEscapeInterceptor as m}from"./chunk-TWVUQUUD.js";import{useHydrated as u}from"./chunk-D65T4H6J.js";import{useShellStrings as p}from"./chunk-4PAWQEXM.js";import{useRef as f,useId as h,useState as x,useEffect as v}from"react";import{createPortal as b}from"react-dom";import{jsxs as y,Fragment as g,jsx as k}from"react/jsx-runtime";var j={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function N({open:N,onClose:w,title:W,description:D,role:C="dialog",children:X,footer:A,blocking:L=!1,size:T="md",aside:U=!1,dirty:F=!1,initialFocus:I,"aria-label":J,"aria-labelledby":P,"aria-describedby":Q,className:V=""}){const $=f(null),z=h(),B=h(),G=!L,S=h(),E=p().dialog,H=e(u()),[K,M]=x(null),O=l({open:N,dirty:F,onClose:w,title:W,layer:K}),Y=f(null),Z=r(N&&null!==H,Y),q=i(Z,$);if(o(N),n($,N&&null!==H,I),s(N),v(()=>{if(N)return m(()=>(L||O(),!0),()=>$.current)},[N,L,O]),!N||!H)return null;/* @__PURE__ */
|
|
2
|
+
return y(g,{children:[/* @__PURE__ */k("span",{ref:Y,hidden:!0,"data-popup-anchor":""}),b(
|
|
3
|
+
/* @__PURE__ */k(t,{value:K,children:/* @__PURE__ */y("div",{ref:M,className:"fixed inset-0"+(U?" pointer-events-none opacity-0":""),style:{zIndex:c.overlay},role:"presentation","data-overlay-layer":"","data-aside":U?"":void 0,children:[
|
|
4
|
+
/* @__PURE__ */k("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
|
|
5
|
+
/* @__PURE__ */k("div",{className:Z?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:L?void 0:e=>{e.target===e.currentTarget&&O()},children:/* @__PURE__ */y("div",{ref:$,"data-popup-panel":"",style:Z?{left:q?.left??0,top:q?.top??0,visibility:q?void 0:"hidden"}:void 0,...a({role:C,modal:!0,titleId:W?S:void 0,labelledBy:P,label:J}),"aria-describedby":Q??(D?B:X?z:void 0),className:`${Z?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${j[T]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${V}`.trim(),children:[W&&/* @__PURE__ */k("h2",{id:S,className:(G?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:W}),D&&/* @__PURE__ */k("p",{id:B,className:((W?"mt-1":G?"pr-8":"")+" text-sm text-gray-500").trim(),children:D}),X&&/* @__PURE__ */k("div",{id:z,className:"mt-2 text-sm text-gray-600",children:X}),A&&/* @__PURE__ */k("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:A}),G&&/* @__PURE__ */k("button",{type:"button",onClick:O,"aria-label":E.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__ */k(d,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),H)]})}export{N as Dialog};
|