efficient-shell 12.10.0 → 12.12.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.
Files changed (198) hide show
  1. package/README.md +7 -2
  2. package/dist/{Browser-G2HGYZVD.js → Browser-KPVR5Z6J.js} +16 -16
  3. package/dist/Calculator-RP4UPGG7.js +29 -0
  4. package/dist/{CurrencyConverter-KBY2OXQ2.js → CurrencyConverter-HZWRB62S.js} +11 -11
  5. package/dist/Files-4DVFS74H.js +141 -0
  6. package/dist/{Notepad-CRHG5FLI.js → Notepad-ZQF2NRZZ.js} +8 -8
  7. package/dist/{PdfViewer-L4FJS3M6.js → PdfViewer-BFP2WCMQ.js} +1 -1
  8. package/dist/PomodoroTimer-ME3BMHKR.js +91 -0
  9. package/dist/{Preview-BVTWP7RW.js → Preview-DBXNCPGO.js} +35 -35
  10. package/dist/{Sidebar-QOGK5LJ2.js → Sidebar-FU7TD5FQ.js} +32 -32
  11. package/dist/{Stock-O7AQ2WUN.js → Stock-WK45DFIC.js} +2 -2
  12. package/dist/{Weather-WHXA5TTP.js → Weather-BVKZQI4R.js} +15 -15
  13. package/dist/{WorldClock-CZCIVYKB.js → WorldClock-L3BQXXQX.js} +6 -6
  14. package/dist/ai/index.js +56 -56
  15. package/dist/apps/index.d.ts +60 -2
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/media-host-check.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/charts/FlowChart.js +1 -1
  21. package/dist/{chunk-VWNHSLFY.js → chunk-3FNBUOZK.js} +1 -1
  22. package/dist/{chunk-TKFINWY6.js → chunk-3MMMN3U4.js} +2 -2
  23. package/dist/{chunk-MPTOEXED.js → chunk-3ZQT26GZ.js} +1 -1
  24. package/dist/{chunk-67BWG353.js → chunk-44VAZ2EL.js} +9 -9
  25. package/dist/{chunk-OSQ5NRV3.js → chunk-45HQXTA6.js} +1 -1
  26. package/dist/{chunk-INFL4YZF.js → chunk-4CKPY72R.js} +1 -1
  27. package/dist/{chunk-A2JYBUPB.js → chunk-4NLCXHWN.js} +6 -6
  28. package/dist/{chunk-2WNTDGOP.js → chunk-5EKNXSQG.js} +1 -1
  29. package/dist/{chunk-RLGPIJHB.js → chunk-5NCR64CE.js} +1 -1
  30. package/dist/chunk-5POLDDQW.js +14 -0
  31. package/dist/{chunk-LFWRHBTM.js → chunk-5T4WTFBC.js} +1 -1
  32. package/dist/{chunk-ZC6MXV4L.js → chunk-5ZQY42QX.js} +1 -1
  33. package/dist/{chunk-J4IT5C3A.js → chunk-654DGV5Q.js} +1 -1
  34. package/dist/{chunk-5YPCZLBW.js → chunk-6BNLDGST.js} +1 -1
  35. package/dist/{chunk-LFW3CQMF.js → chunk-6ET6JVNL.js} +4 -4
  36. package/dist/{chunk-HD7OBASH.js → chunk-6TIJH2M6.js} +1 -1
  37. package/dist/{chunk-457SK2XV.js → chunk-6VB4TBU6.js} +5 -5
  38. package/dist/{chunk-KRUI4LVW.js → chunk-73XILSFF.js} +1 -1
  39. package/dist/chunk-7ADTFFEM.js +5 -0
  40. package/dist/{chunk-QSK2OWT3.js → chunk-7ARBBWPQ.js} +2 -2
  41. package/dist/{chunk-RAQBZUU2.js → chunk-AG6Y62TP.js} +61 -61
  42. package/dist/{chunk-Y4YXZIES.js → chunk-AXFNOY2L.js} +9 -9
  43. package/dist/{chunk-J7BMSKOM.js → chunk-B7HTKDT3.js} +6 -6
  44. package/dist/{chunk-PHJFGLXB.js → chunk-BET6KEY2.js} +8 -8
  45. package/dist/{chunk-7Q4DE4CT.js → chunk-BFCIOWYI.js} +1 -1
  46. package/dist/{chunk-RGKSJBXJ.js → chunk-BGBSEPPH.js} +8 -8
  47. package/dist/{chunk-2X4U3VX2.js → chunk-BM5QI2L6.js} +5 -5
  48. package/dist/{chunk-AMSE4PMQ.js → chunk-C5SK5OYU.js} +4 -4
  49. package/dist/{chunk-HRDR56SK.js → chunk-CU3ZE25J.js} +1 -1
  50. package/dist/chunk-EAIHBASJ.js +28 -0
  51. package/dist/{chunk-2NZBQOA6.js → chunk-EAXPSAHZ.js} +9 -9
  52. package/dist/{chunk-KPHYWZXL.js → chunk-EO6MOQOZ.js} +9 -9
  53. package/dist/{chunk-C3E6XFIC.js → chunk-EQ2KTDOU.js} +3 -3
  54. package/dist/{chunk-5WCHUZ6O.js → chunk-FSZ3TNAR.js} +1 -1
  55. package/dist/{chunk-QIMMZVWV.js → chunk-GCVIUXKL.js} +1 -1
  56. package/dist/{chunk-LS6VU6F7.js → chunk-GOKJZKLV.js} +1 -1
  57. package/dist/{chunk-Z334LCCX.js → chunk-ICZUWLVU.js} +1 -1
  58. package/dist/chunk-ITGFHWYG.js +13 -0
  59. package/dist/chunk-J2YURAQY.js +13 -0
  60. package/dist/chunk-J7CHHY7O.js +6 -0
  61. package/dist/{chunk-T3NLFOLW.js → chunk-JOAKKXTL.js} +14 -6
  62. package/dist/{chunk-TVVSFXWY.js → chunk-JZKACEXW.js} +8 -8
  63. package/dist/chunk-KCAUYEYR.js +7 -0
  64. package/dist/{chunk-5MFWM6L4.js → chunk-L6LWO5NQ.js} +1 -1
  65. package/dist/{chunk-RHD4V6CE.js → chunk-LMUB2EAD.js} +9 -9
  66. package/dist/{chunk-4GTXRVDF.js → chunk-LO6TYB5E.js} +2 -2
  67. package/dist/{chunk-UMZJRZFN.js → chunk-LTN4AQYG.js} +1 -1
  68. package/dist/{chunk-6ITEA6SX.js → chunk-LTUVKDTO.js} +1 -1
  69. package/dist/{chunk-F7BXUVN4.js → chunk-LY55C5UI.js} +6 -6
  70. package/dist/chunk-LZKPV3XR.js +3 -0
  71. package/dist/{chunk-OW5LQWPU.js → chunk-MFZPTS7W.js} +2 -2
  72. package/dist/{chunk-6BK3KRT5.js → chunk-MXITMJCT.js} +16 -16
  73. package/dist/{chunk-PICRPJBL.js → chunk-NBUL37WB.js} +1 -1
  74. package/dist/{chunk-W5B7UNMJ.js → chunk-NGQZI7HP.js} +1 -1
  75. package/dist/{chunk-NAWIVFAN.js → chunk-NHIP2S4E.js} +8 -8
  76. package/dist/{chunk-RIF6BFEH.js → chunk-NOEAEXIZ.js} +1 -1
  77. package/dist/{chunk-NKZINXHG.js → chunk-OTXJ6VWX.js} +2 -2
  78. package/dist/{chunk-FOCQEWUH.js → chunk-P3GBQBDC.js} +1 -1
  79. package/dist/{chunk-TDMZFQRB.js → chunk-PDCCNHTP.js} +1 -1
  80. package/dist/{chunk-POOPWYJL.js → chunk-Q64F2EXW.js} +6 -6
  81. package/dist/{chunk-UD4NESX7.js → chunk-QCOXJXGZ.js} +1 -1
  82. package/dist/{chunk-ICNGLA5O.js → chunk-QGFAQVUO.js} +4 -4
  83. package/dist/{chunk-63J2MBXV.js → chunk-QQ5XCRZM.js} +10 -10
  84. package/dist/chunk-QULE4LAC.js +31 -0
  85. package/dist/chunk-QV4M7EOV.js +1 -0
  86. package/dist/{chunk-Q3RJMQYE.js → chunk-RAOM3WIQ.js} +1 -1
  87. package/dist/{chunk-3RDJFCIZ.js → chunk-SEMV4NCH.js} +1 -1
  88. package/dist/{chunk-5Z6XJPAX.js → chunk-SWB32OKH.js} +1 -1
  89. package/dist/{chunk-5QVCBAK2.js → chunk-SXHNZFUY.js} +1 -1
  90. package/dist/chunk-TCMAWDBL.js +19 -0
  91. package/dist/{chunk-NDAZPAQL.js → chunk-TJCJLKJB.js} +1 -1
  92. package/dist/chunk-U35TIWEP.js +23 -0
  93. package/dist/{chunk-22LU6FKN.js → chunk-UDYVA5DV.js} +10 -10
  94. package/dist/{chunk-JOD5ISTB.js → chunk-W7DYKTHE.js} +1 -1
  95. package/dist/{chunk-BJAJOIVY.js → chunk-WQV7VQ5Z.js} +1 -1
  96. package/dist/{chunk-VN3A43SA.js → chunk-XDJQWP5K.js} +1 -1
  97. package/dist/{chunk-NOCOLZ2W.js → chunk-XJW65EIG.js} +1 -1
  98. package/dist/{chunk-5G4CB3E6.js → chunk-Y23BITKG.js} +1 -1
  99. package/dist/{chunk-C7M7KYNY.js → chunk-YFDS6KF3.js} +1 -1
  100. package/dist/{chunk-WDAOTHX5.js → chunk-YMJOFWW6.js} +3 -3
  101. package/dist/{chunk-KZ7RR7EU.js → chunk-YPZXE67U.js} +1 -1
  102. package/dist/{chunk-CRRC72EE.js → chunk-ZICGXJUB.js} +7 -7
  103. package/dist/{chunk-IIMFLLYT.js → chunk-ZLFZJX6M.js} +9 -9
  104. package/dist/{chunk-OAFFHLJ4.js → chunk-ZV6WLVD3.js} +6 -6
  105. package/dist/data/EntityList.js +1 -1
  106. package/dist/data/ListLoadError.js +1 -1
  107. package/dist/data/ResizableTable.js +1 -1
  108. package/dist/forms/BorderInput.js +1 -1
  109. package/dist/forms/BrandAssetEditor.js +1 -1
  110. package/dist/forms/Calendar.js +1 -1
  111. package/dist/forms/ColorPicker.js +1 -1
  112. package/dist/forms/ComposerAttachments.js +1 -1
  113. package/dist/forms/CornersInput.js +1 -1
  114. package/dist/forms/DatePicker.js +1 -1
  115. package/dist/forms/DateRangePicker.js +1 -1
  116. package/dist/forms/DisplayChips.js +1 -1
  117. package/dist/forms/FilePicker.js +1 -1
  118. package/dist/forms/IconPicker.js +1 -1
  119. package/dist/forms/Input.js +1 -1
  120. package/dist/forms/InputNumber.js +1 -1
  121. package/dist/forms/LinkPicker.js +1 -1
  122. package/dist/forms/MediaLibrary.js +1 -1
  123. package/dist/forms/MediaUploadField.js +1 -1
  124. package/dist/forms/MediaUploadGrid.js +1 -1
  125. package/dist/forms/MediaUsedInList.js +1 -1
  126. package/dist/forms/PositionInput.js +1 -1
  127. package/dist/forms/RenameField.js +1 -1
  128. package/dist/forms/Select.js +1 -1
  129. package/dist/forms/SidesInput.js +1 -1
  130. package/dist/forms/Slider.js +1 -1
  131. package/dist/forms/Snippet.js +1 -1
  132. package/dist/forms/SplitButton.js +1 -1
  133. package/dist/forms/TagInput.js +1 -1
  134. package/dist/forms/TextToolbar.js +1 -1
  135. package/dist/forms/UnitMenu.js +1 -1
  136. package/dist/forms/WidthsBar.js +1 -1
  137. package/dist/forms/mediaLibraryMenu.js +1 -1
  138. package/dist/forms/textAlign.js +1 -1
  139. package/dist/icons/index.js +1 -1
  140. package/dist/index.js +359 -359
  141. package/dist/map/index.js +3 -3
  142. package/dist/markdown/index.js +1 -1
  143. package/dist/page-tabs/index.js +5 -5
  144. package/dist/pdf/index.js +1 -1
  145. package/dist/shell/AppUpdateBanner.js +1 -1
  146. package/dist/shell/Banner.js +1 -1
  147. package/dist/shell/Breadcrumbs.js +1 -1
  148. package/dist/shell/ColoredBadge.js +1 -1
  149. package/dist/shell/ConfirmDialog.js +1 -1
  150. package/dist/shell/ContextMenu.js +1 -1
  151. package/dist/shell/Dialog.js +1 -1
  152. package/dist/shell/Drawer.js +1 -1
  153. package/dist/shell/DropdownMenu.js +1 -1
  154. package/dist/shell/EmptyState.js +1 -1
  155. package/dist/shell/HelpCenter.js +1 -1
  156. package/dist/shell/ImageLightbox.js +1 -1
  157. package/dist/shell/LanguageSelect.js +1 -1
  158. package/dist/shell/Markdown.js +1 -1
  159. package/dist/shell/PageHeader.js +1 -1
  160. package/dist/shell/PopupMenu.js +1 -1
  161. package/dist/shell/ProductionTimeline.js +1 -1
  162. package/dist/shell/Result.js +1 -1
  163. package/dist/shell/SearchableSelect.js +1 -1
  164. package/dist/shell/SettingReset.js +1 -1
  165. package/dist/shell/SidebarLayout.js +1 -1
  166. package/dist/shell/SidebarNav.js +1 -1
  167. package/dist/shell/SortableList.js +1 -1
  168. package/dist/shell/StepChain.js +1 -1
  169. package/dist/shell/Stepper.js +1 -1
  170. package/dist/shell/TopNav.js +1 -1
  171. package/dist/shell/Tree.js +1 -1
  172. package/dist/shell/discardGuard.js +1 -1
  173. package/dist/telemetry/index.js +1 -1
  174. package/dist/templates/AuthScreen.js +1 -1
  175. package/dist/templates/ChatTemplate.js +1 -1
  176. package/dist/templates/CheckoutTemplate.js +1 -1
  177. package/dist/templates/DataTablePage.js +1 -1
  178. package/dist/templates/EmailTemplate.js +1 -1
  179. package/dist/templates/FormLayoutPage.js +1 -1
  180. package/dist/ui/index.js +1 -1
  181. package/dist/version.js +1 -1
  182. package/package.json +1 -1
  183. package/dist/Calculator-ALPNISJT.js +0 -29
  184. package/dist/Files-OY5TSWUZ.js +0 -126
  185. package/dist/PomodoroTimer-NGQPYDI3.js +0 -91
  186. package/dist/chunk-5RT5XDHG.js +0 -6
  187. package/dist/chunk-6BQUSUNK.js +0 -14
  188. package/dist/chunk-7XGUX3TH.js +0 -3
  189. package/dist/chunk-BR7L5NE3.js +0 -13
  190. package/dist/chunk-EHVBJUQI.js +0 -28
  191. package/dist/chunk-HV4VQ5XV.js +0 -13
  192. package/dist/chunk-KVU5IQOZ.js +0 -7
  193. package/dist/chunk-OSNHRKX6.js +0 -5
  194. package/dist/chunk-PEIRPNXT.js +0 -23
  195. package/dist/chunk-PY7GHIYF.js +0 -19
  196. package/dist/chunk-Z6KW4WZ6.js +0 -31
  197. package/dist/chunk-ZPHUMLET.js +0 -1
  198. /package/dist/{chunk-MBXCXFQO.js → chunk-27ZJQUDS.js} +0 -0
package/dist/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import"../chunk-GMHMWDXU.js";export{ACCENT_ROLES,COLOUR_ROLES,FLAT_STATUS_ROLES,IDENTITY_ROLES,NEUTRAL_ROLES,SCRIM_ROLES,STATUS_GROUPS,STATUS_ROLES}from"../chunk-VVJIKS47.js";export{ELEVATION_LEVELS,RADIUS_ROLES}from"../chunk-4MVRSCQE.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";export{DashboardTemplate}from"../chunk-M4MN2GOE.js";export{DataTablePage}from"../chunk-RLGPIJHB.js";export{EmailTemplate}from"../chunk-OSQ5NRV3.js";export{ErrorBoundary}from"../chunk-HE24VQMU.js";export{ErrorPage}from"../chunk-6YIVKPWQ.js";export{FormLayoutPage}from"../chunk-TDMZFQRB.js";export{GalleryTemplate}from"../chunk-GMLDGXNQ.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-UMZJRZFN.js";export{ChatTemplate}from"../chunk-QIMMZVWV.js";export{CheckoutTemplate}from"../chunk-PICRPJBL.js";export{TopNav}from"../chunk-VN3A43SA.js";export{Statistic}from"../chunk-RQKD5AAL.js";export{Stepper}from"../chunk-VWNHSLFY.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-QJGZOD6X.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-IARCNQD3.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-2X4U3VX2.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-WDAOTHX5.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-A2JYBUPB.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-KPHYWZXL.js";export{ResizeHandle}from"../chunk-EIXMUGVZ.js";export{SettingReset}from"../chunk-OW5LQWPU.js";export{SettingRow}from"../chunk-2GS2VOQT.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-2WNTDGOP.js";export{MetricBar}from"../chunk-AUCNJFTP.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-AKTEMZOT.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-HL3V67JZ.js";import"../chunk-S4Z657L6.js";export{TimelineTrack}from"../chunk-FZWAOYAM.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-7TC3LJQM.js";export{PageHeader}from"../chunk-C7M7KYNY.js";export{EmptyValue}from"../chunk-HNQPF5QZ.js";export{FloatingBar}from"../chunk-7KWYVQMX.js";export{GlobalSearch,openGlobalSearch}from"../chunk-6JLXXX4H.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-WGRS6QBT.js";export{HelpCenter}from"../chunk-IIMFLLYT.js";export{IconRail,IconRailButton}from"../chunk-GMJ5WOB2.js";import"../chunk-FQEALPZJ.js";export{CountBadge}from"../chunk-V6FHZGCL.js";export{EditableGrid}from"../chunk-VPZOSVDF.js";export{Avatar,AvatarGroup}from"../chunk-QMNDKNK2.js";export{BudgetBar,budgetState}from"../chunk-KIRLSUQT.js";export{Card,StatCard}from"../chunk-BYDSBDVS.js";export{ContainerFillChart}from"../chunk-ISU4FCEX.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-SEHKTBVM.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-QQM36CYU.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-KZ7RR7EU.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-T23TIJ4P.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{WidthsBar}from"../chunk-F7BXUVN4.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{Snippet}from"../chunk-J7BMSKOM.js";export{SplitButton_default as SplitButton}from"../chunk-7XGUX3TH.js";export{Switch_default as Switch}from"../chunk-M3R4C3A6.js";export{TagInput}from"../chunk-OAFFHLJ4.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-5RT5XDHG.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-J4IT5C3A.js";export{Textarea_default as Textarea}from"../chunk-PB7G6CJ7.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-4MUE4CYB.js";export{RadioGroup}from"../chunk-32VV2J22.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-KRUI4LVW.js";export{UnitMenu}from"../chunk-Z334LCCX.js";export{Slider,SliderGroup}from"../chunk-LFW3CQMF.js";export{LinkPicker,TextLinkField}from"../chunk-6BQUSUNK.js";export{SearchableSelect}from"../chunk-BR7L5NE3.js";export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary,readMediaFileDrag}from"../chunk-EHVBJUQI.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-POOPWYJL.js";import"../chunk-WM2BBRT6.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{EmptyState}from"../chunk-5G4CB3E6.js";export{ImageLightbox,lightboxKind}from"../chunk-63J2MBXV.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Drawer}from"../chunk-TVVSFXWY.js";export{Breadcrumbs}from"../chunk-5Z6XJPAX.js";export{mediaLibraryMenu}from"../chunk-BJAJOIVY.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-MEAJGM6F.js";export{RenameField}from"../chunk-6ITEA6SX.js";export{NativeSelect,Select_default as Select}from"../chunk-PY7GHIYF.js";import"../chunk-EO5RLFRX.js";import"../chunk-Q3RJMQYE.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-Y4YXZIES.js";export{MediaUsedInList}from"../chunk-FOCQEWUH.js";export{NumericKeypad}from"../chunk-VLCHHTX6.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-OCI3PZDU.js";export{PositionInput}from"../chunk-INFL4YZF.js";export{FormErrorSummary}from"../chunk-UG5GKEU5.js";export{Label,labelClasses}from"../chunk-EQKUFYX6.js";export{CornersInput}from"../chunk-AMSE4PMQ.js";export{DatePicker_default as DatePicker}from"../chunk-RGKSJBXJ.js";export{DateRangePicker,toISODate}from"../chunk-PEIRPNXT.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-MAI2DN7N.js";export{DisplayChips}from"../chunk-5WCHUZ6O.js";export{FilePicker_default as FilePicker}from"../chunk-67BWG353.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-CUZQVBPC.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{AlignmentGrid}from"../chunk-3DWVSQIJ.js";export{BorderInput,borderSides,borderStartEach}from"../chunk-TKFINWY6.js";export{IconPicker}from"../chunk-C3E6XFIC.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-22LU6FKN.js";export{Popover}from"../chunk-LFYZ7NQ4.js";export{InputNumber_default as InputNumber}from"../chunk-4GTXRVDF.js";export{useSettingAuto,useSettingRowName}from"../chunk-2NMW66P5.js";export{BrandAssetEditor}from"../chunk-ICNGLA5O.js";export{MediaUploadField}from"../chunk-457SK2XV.js";export{Segmented}from"../chunk-QAS22BIS.js";import"../chunk-JDQGHQ2C.js";export{ImageFocusPoint}from"../chunk-YX4MRM7A.js";export{FormField}from"../chunk-6KBDNYRW.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar}from"../chunk-PHJFGLXB.js";export{slugify}from"../chunk-24AL3CDS.js";export{ENTRANCE_ATTR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-Q2SCJQ5H.js";export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionSeconds,rotateDegrees}from"../chunk-AIJ3G6BD.js";export{hexWithAlpha,mixHex,rgbToHex}from"../chunk-CJSZW3OS.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{fromDateKey,toDateKey}from"../chunk-2HMNOLKX.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{useGridSelection}from"../chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"../chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"../chunk-LACL4MAR.js";export{useRootIsDark}from"../chunk-UPXDDO3U.js";export{Kanban}from"../chunk-HEX3EP5F.js";export{useSort}from"../chunk-E6FDUFPH.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{DataTable}from"../chunk-6P7SIIG4.js";export{Pagination}from"../chunk-EVEGK57J.js";export{EntityList}from"../chunk-RHD4V6CE.js";import"../chunk-5HOXR3L4.js";export{useTableNav}from"../chunk-ATMJ5ZPK.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{ListFooter}from"../chunk-ASOVTAIT.js";export{ListLoadError}from"../chunk-5YPCZLBW.js";export{ResizableTable}from"../chunk-2NZBQOA6.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{useColumnConfig}from"../chunk-UKBXQXDZ.js";import"../chunk-ULJQYXHB.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{TreemapChart}from"../chunk-675RYIWR.js";export{squarify}from"../chunk-46BYGPGD.js";export{WaterfallChart}from"../chunk-D4K72BHN.js";export{RangeChart}from"../chunk-JGJWPONL.js";export{RankedBars}from"../chunk-42BVXJZN.js";export{SankeyChart}from"../chunk-CA3OC4YY.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-YVAJ42M2.js";export{StatTile}from"../chunk-4UQNNA4K.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-FQHY6DTF.js";export{FunnelChart}from"../chunk-CB5FQMFB.js";export{HeatmapChart}from"../chunk-SY65V6K7.js";export{HistogramChart}from"../chunk-ISZOD5S6.js";export{Meter}from"../chunk-WJBP5SND.js";export{PieChart}from"../chunk-5S4YF5XA.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-KFS7WSCC.js";export{RadialBarChart}from"../chunk-BUZ5AJLR.js";export{ChordChart}from"../chunk-HULQSIX5.js";import"../chunk-HY6CBG4M.js";export{StepChain,StepChainItem}from"../chunk-MPTOEXED.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-LS6VU6F7.js";export{Divider}from"../chunk-DFOFEBYX.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-Q5Z3KHT2.js";export{ContextMenu,useContextMenu}from"../chunk-QSK2OWT3.js";export{Banner}from"../chunk-3RDJFCIZ.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-LFWRHBTM.js";export{Input_default as Input}from"../chunk-HRDR56SK.js";export{DropdownMenu}from"../chunk-KVU5IQOZ.js";import"../chunk-JOD5ISTB.js";export{IconButton_default as IconButton}from"../chunk-SV5RRBVA.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-AYZY3YNC.js";export{mediaFileName}from"../chunk-RIF6BFEH.js";export{TransferProgress}from"../chunk-JVNJCRHM.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-Z7RXWXR5.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-CINGDJPM.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-GEYM4WN3.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-Y3JW2GW5.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";import"../chunk-LF27WIN2.js";export{TimeSeriesChart}from"../chunk-MTP3MBZA.js";export{DEFAULT_FLOW_CHART_LABELS,FlowChart}from"../chunk-HD7OBASH.js";export{FLOW_LAYOUT,FLOW_SPEC_LIMITS,layoutFlow,parseFlowSpec}from"../chunk-FAERBT6Y.js";export{ChartBrush}from"../chunk-KOPTKTHN.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-ZR2UWJIR.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-SFFELHLP.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-YVIV7SKG.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{ImageAnnotator_default as ImageAnnotator}from"../chunk-GB2XLSR5.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";import"../chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"../chunk-JDCM2VHG.js";export{Result}from"../chunk-5QVCBAK2.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"../chunk-ZDMZM7HD.js";import"../chunk-5A7MWTXX.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-6BK3KRT5.js";export{Dialog}from"../chunk-OSNHRKX6.js";export{ItemCount}from"../chunk-KWTK6TGH.js";import"../chunk-3DVNXNTF.js";import"../chunk-MBXCXFQO.js";import"../chunk-VWGWZY7A.js";import"../chunk-7QSDPSXP.js";export{ColoredBadge}from"../chunk-UD4NESX7.js";import"../chunk-NV7QRWQJ.js";import"../chunk-F3ZOO23R.js";import"../chunk-2QY5BJLA.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";export{VERSION}from"../chunk-ZPHUMLET.js";export{useFocusTrap,useScrollLock}from"../chunk-CDAJKLGL.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-JMGDGNM7.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-CRRC72EE.js";import"../chunk-URHGHXDN.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";export{Button_default as Button}from"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";export{Icon}from"../chunk-T3NLFOLW.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";export{Tooltip}from"../chunk-SOZCWT6I.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"../chunk-PGN5ME7B.js";export{Z_LAYERS}from"../chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";export{setShellApiClient}from"../chunk-STKJA4PV.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-JTZVUO3I.js";export{buttonClasses,iconButtonClasses}from"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";export{BoxPlotChart}from"../chunk-O3YCIWHF.js";export{CandlestickChart}from"../chunk-G3VRO4CK.js";export{CartesianPlot}from"../chunk-YRG6XJ6M.js";import"../chunk-EDANELWX.js";export{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"../chunk-2JWPNR2U.js";export{ChartTooltip}from"../chunk-WDQI3FV6.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"../chunk-TZFACUMR.js";export{registerModalEscapeInterceptor}from"../chunk-TWVUQUUD.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-TJSJVC6P.js";import"../chunk-C3QOHMR6.js";
2
+ import"../chunk-GMHMWDXU.js";export{ACCENT_ROLES,COLOUR_ROLES,FLAT_STATUS_ROLES,IDENTITY_ROLES,NEUTRAL_ROLES,SCRIM_ROLES,STATUS_GROUPS,STATUS_ROLES}from"../chunk-VVJIKS47.js";export{ELEVATION_LEVELS,RADIUS_ROLES}from"../chunk-4MVRSCQE.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";export{DashboardTemplate}from"../chunk-M4MN2GOE.js";export{DataTablePage}from"../chunk-5NCR64CE.js";export{EmailTemplate}from"../chunk-45HQXTA6.js";export{ErrorBoundary}from"../chunk-HE24VQMU.js";export{ErrorPage}from"../chunk-6YIVKPWQ.js";export{FormLayoutPage}from"../chunk-PDCCNHTP.js";export{GalleryTemplate}from"../chunk-GMLDGXNQ.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-LTN4AQYG.js";export{ChatTemplate}from"../chunk-GCVIUXKL.js";export{CheckoutTemplate}from"../chunk-NBUL37WB.js";export{TopNav}from"../chunk-XDJQWP5K.js";export{Statistic}from"../chunk-RQKD5AAL.js";export{Stepper}from"../chunk-3FNBUOZK.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-QJGZOD6X.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-IARCNQD3.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-BM5QI2L6.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-YMJOFWW6.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-4NLCXHWN.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-EO6MOQOZ.js";export{ResizeHandle}from"../chunk-EIXMUGVZ.js";export{SettingReset}from"../chunk-MFZPTS7W.js";export{SettingRow}from"../chunk-2GS2VOQT.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-5EKNXSQG.js";export{MetricBar}from"../chunk-AUCNJFTP.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-AKTEMZOT.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-HL3V67JZ.js";import"../chunk-S4Z657L6.js";export{TimelineTrack}from"../chunk-FZWAOYAM.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-7TC3LJQM.js";export{PageHeader}from"../chunk-YFDS6KF3.js";export{EmptyValue}from"../chunk-HNQPF5QZ.js";export{FloatingBar}from"../chunk-7KWYVQMX.js";export{GlobalSearch,openGlobalSearch}from"../chunk-6JLXXX4H.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-WGRS6QBT.js";export{HelpCenter}from"../chunk-ZLFZJX6M.js";export{IconRail,IconRailButton}from"../chunk-GMJ5WOB2.js";import"../chunk-FQEALPZJ.js";export{CountBadge}from"../chunk-V6FHZGCL.js";export{EditableGrid}from"../chunk-VPZOSVDF.js";export{Avatar,AvatarGroup}from"../chunk-QMNDKNK2.js";export{BudgetBar,budgetState}from"../chunk-KIRLSUQT.js";export{Card,StatCard}from"../chunk-BYDSBDVS.js";export{ContainerFillChart}from"../chunk-ISU4FCEX.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-SEHKTBVM.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-QQM36CYU.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-YPZXE67U.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-T23TIJ4P.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{WidthsBar}from"../chunk-LY55C5UI.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{Snippet}from"../chunk-B7HTKDT3.js";export{SplitButton_default as SplitButton}from"../chunk-LZKPV3XR.js";export{Switch_default as Switch}from"../chunk-M3R4C3A6.js";export{TagInput}from"../chunk-ZV6WLVD3.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-J7CHHY7O.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-654DGV5Q.js";export{Textarea_default as Textarea}from"../chunk-PB7G6CJ7.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-4MUE4CYB.js";export{RadioGroup}from"../chunk-32VV2J22.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-73XILSFF.js";export{UnitMenu}from"../chunk-ICZUWLVU.js";export{Slider,SliderGroup}from"../chunk-6ET6JVNL.js";export{LinkPicker,TextLinkField}from"../chunk-5POLDDQW.js";export{SearchableSelect}from"../chunk-ITGFHWYG.js";export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary,readMediaFileDrag}from"../chunk-EAIHBASJ.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-Q64F2EXW.js";import"../chunk-WM2BBRT6.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{EmptyState}from"../chunk-Y23BITKG.js";export{ImageLightbox,lightboxKind}from"../chunk-QQ5XCRZM.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Drawer}from"../chunk-JZKACEXW.js";export{Breadcrumbs}from"../chunk-SWB32OKH.js";export{mediaLibraryMenu}from"../chunk-WQV7VQ5Z.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-MEAJGM6F.js";export{RenameField}from"../chunk-LTUVKDTO.js";export{NativeSelect,Select_default as Select}from"../chunk-TCMAWDBL.js";import"../chunk-EO5RLFRX.js";import"../chunk-RAOM3WIQ.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-AXFNOY2L.js";export{MediaUsedInList}from"../chunk-P3GBQBDC.js";export{NumericKeypad}from"../chunk-VLCHHTX6.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-OCI3PZDU.js";export{PositionInput}from"../chunk-4CKPY72R.js";export{FormErrorSummary}from"../chunk-UG5GKEU5.js";export{Label,labelClasses}from"../chunk-EQKUFYX6.js";export{CornersInput}from"../chunk-C5SK5OYU.js";export{DatePicker_default as DatePicker}from"../chunk-BGBSEPPH.js";export{DateRangePicker,toISODate}from"../chunk-U35TIWEP.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-MAI2DN7N.js";export{DisplayChips}from"../chunk-FSZ3TNAR.js";export{FilePicker_default as FilePicker}from"../chunk-44VAZ2EL.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-CUZQVBPC.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{AlignmentGrid}from"../chunk-3DWVSQIJ.js";export{BorderInput,borderSides,borderStartEach}from"../chunk-3MMMN3U4.js";export{IconPicker}from"../chunk-EQ2KTDOU.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-UDYVA5DV.js";export{Popover}from"../chunk-LFYZ7NQ4.js";export{InputNumber_default as InputNumber}from"../chunk-LO6TYB5E.js";export{useSettingAuto,useSettingRowName}from"../chunk-2NMW66P5.js";export{BrandAssetEditor}from"../chunk-QGFAQVUO.js";export{MediaUploadField}from"../chunk-6VB4TBU6.js";export{Segmented}from"../chunk-QAS22BIS.js";import"../chunk-JDQGHQ2C.js";export{ImageFocusPoint}from"../chunk-YX4MRM7A.js";export{FormField}from"../chunk-6KBDNYRW.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar}from"../chunk-BET6KEY2.js";export{slugify}from"../chunk-24AL3CDS.js";export{ENTRANCE_ATTR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-Q2SCJQ5H.js";export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionSeconds,rotateDegrees}from"../chunk-AIJ3G6BD.js";export{hexWithAlpha,mixHex,rgbToHex}from"../chunk-CJSZW3OS.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{fromDateKey,toDateKey}from"../chunk-2HMNOLKX.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{useGridSelection}from"../chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"../chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"../chunk-LACL4MAR.js";export{useRootIsDark}from"../chunk-UPXDDO3U.js";export{Kanban}from"../chunk-HEX3EP5F.js";export{useSort}from"../chunk-E6FDUFPH.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{DataTable}from"../chunk-6P7SIIG4.js";export{Pagination}from"../chunk-EVEGK57J.js";export{EntityList}from"../chunk-LMUB2EAD.js";import"../chunk-5HOXR3L4.js";export{useTableNav}from"../chunk-ATMJ5ZPK.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{ListFooter}from"../chunk-ASOVTAIT.js";export{ListLoadError}from"../chunk-6BNLDGST.js";export{ResizableTable}from"../chunk-EAXPSAHZ.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{useColumnConfig}from"../chunk-UKBXQXDZ.js";import"../chunk-ULJQYXHB.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{TreemapChart}from"../chunk-675RYIWR.js";export{squarify}from"../chunk-46BYGPGD.js";export{WaterfallChart}from"../chunk-D4K72BHN.js";export{RangeChart}from"../chunk-JGJWPONL.js";export{RankedBars}from"../chunk-42BVXJZN.js";export{SankeyChart}from"../chunk-CA3OC4YY.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-YVAJ42M2.js";export{StatTile}from"../chunk-4UQNNA4K.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-FQHY6DTF.js";export{FunnelChart}from"../chunk-CB5FQMFB.js";export{HeatmapChart}from"../chunk-SY65V6K7.js";export{HistogramChart}from"../chunk-ISZOD5S6.js";export{Meter}from"../chunk-WJBP5SND.js";export{PieChart}from"../chunk-5S4YF5XA.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-KFS7WSCC.js";export{RadialBarChart}from"../chunk-BUZ5AJLR.js";export{ChordChart}from"../chunk-HULQSIX5.js";import"../chunk-HY6CBG4M.js";export{StepChain,StepChainItem}from"../chunk-3ZQT26GZ.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-GOKJZKLV.js";export{Divider}from"../chunk-DFOFEBYX.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-Q5Z3KHT2.js";export{ContextMenu,useContextMenu}from"../chunk-7ARBBWPQ.js";export{Banner}from"../chunk-SEMV4NCH.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-5T4WTFBC.js";export{Input_default as Input}from"../chunk-CU3ZE25J.js";export{DropdownMenu}from"../chunk-KCAUYEYR.js";import"../chunk-W7DYKTHE.js";export{IconButton_default as IconButton}from"../chunk-SV5RRBVA.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-AYZY3YNC.js";export{mediaFileName}from"../chunk-NOEAEXIZ.js";export{TransferProgress}from"../chunk-JVNJCRHM.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-Z7RXWXR5.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-CINGDJPM.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-GEYM4WN3.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-Y3JW2GW5.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";import"../chunk-LF27WIN2.js";export{TimeSeriesChart}from"../chunk-MTP3MBZA.js";export{DEFAULT_FLOW_CHART_LABELS,FlowChart}from"../chunk-6TIJH2M6.js";export{FLOW_LAYOUT,FLOW_SPEC_LIMITS,layoutFlow,parseFlowSpec}from"../chunk-FAERBT6Y.js";export{ChartBrush}from"../chunk-KOPTKTHN.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-ZR2UWJIR.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-SFFELHLP.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-YVIV7SKG.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{ImageAnnotator_default as ImageAnnotator}from"../chunk-GB2XLSR5.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";import"../chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"../chunk-JDCM2VHG.js";export{Result}from"../chunk-SXHNZFUY.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"../chunk-ZDMZM7HD.js";import"../chunk-5A7MWTXX.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-MXITMJCT.js";export{Dialog}from"../chunk-7ADTFFEM.js";export{ItemCount}from"../chunk-KWTK6TGH.js";import"../chunk-3DVNXNTF.js";import"../chunk-27ZJQUDS.js";import"../chunk-VWGWZY7A.js";import"../chunk-7QSDPSXP.js";export{ColoredBadge}from"../chunk-QCOXJXGZ.js";import"../chunk-NV7QRWQJ.js";import"../chunk-F3ZOO23R.js";import"../chunk-2QY5BJLA.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";export{VERSION}from"../chunk-QV4M7EOV.js";export{useFocusTrap,useScrollLock}from"../chunk-CDAJKLGL.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-JMGDGNM7.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-ZICGXJUB.js";import"../chunk-URHGHXDN.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";export{Button_default as Button}from"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";export{Icon}from"../chunk-JOAKKXTL.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";export{Tooltip}from"../chunk-SOZCWT6I.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"../chunk-PGN5ME7B.js";export{Z_LAYERS}from"../chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";export{setShellApiClient}from"../chunk-STKJA4PV.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-JTZVUO3I.js";export{buttonClasses,iconButtonClasses}from"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";export{BoxPlotChart}from"../chunk-O3YCIWHF.js";export{CandlestickChart}from"../chunk-G3VRO4CK.js";export{CartesianPlot}from"../chunk-YRG6XJ6M.js";import"../chunk-EDANELWX.js";export{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"../chunk-2JWPNR2U.js";export{ChartTooltip}from"../chunk-WDQI3FV6.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"../chunk-TZFACUMR.js";export{registerModalEscapeInterceptor}from"../chunk-TWVUQUUD.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-TJSJVC6P.js";import"../chunk-C3QOHMR6.js";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export{APP_VERSION,VERSION}from"./chunk-ZPHUMLET.js";
1
+ export{APP_VERSION,VERSION}from"./chunk-QV4M7EOV.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "12.10.0",
3
+ "version": "12.12.0",
4
4
  "description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1,29 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-7Q4DE4CT.js";import{useWidgetSettings as n}from"./chunk-RAQBZUU2.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-5QVCBAK2.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-W5B7UNMJ.js";import"./chunk-6BK3KRT5.js";import"./chunk-OSNHRKX6.js";import"./chunk-KWTK6TGH.js";import"./chunk-3DVNXNTF.js";import"./chunk-MBXCXFQO.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-UD4NESX7.js";import"./chunk-NV7QRWQJ.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-CDAJKLGL.js";import"./chunk-JMGDGNM7.js";import"./chunk-CRRC72EE.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import{Icon as r}from"./chunk-T3NLFOLW.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-TJSJVC6P.js";import"./chunk-C3QOHMR6.js";import{useState as c,useRef as i,useCallback as o,useEffect as s}from"react";import{jsxs as l,Fragment as a,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function m(){const[m,k]=c("0"),[p,d]=c(null),[b,g]=c(null),[j,N]=c(!1),[C,y]=c(""),[x,f]=c([]),[v,$]=c(!1),[T,E]=c(()=>e(h)),[W,D]=c(!1),[J,Q]=c(T),S=i(null);n(o(()=>{Q({...T}),D(!0)},[T]));const K=o(e=>{y(""),k(t=>j||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[j]),M=o(()=>{k("0"),d(null),g(null),N(!1)},[]),R=o((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),U=o(e=>{const t=parseFloat(m);if(null!==p&&b&&!j){const e=R(p,t,b);k(String(e)),d(e),f(n=>[`${p} ${b} ${t} = ${e}`,...n].slice(0,20))}else d(t);g(e),N(!0)},[m,p,b,j,R]),w=o(()=>{if(null===p||!b)return;const e=parseFloat(m),t=R(p,e,b),n=`${p} ${b} ${e} =`;f(e=>[`${n} ${t}`,...e].slice(0,20)),y(n),k(String(t)),d(null),g(null),N(!0)},[m,p,b,R]),A=o(()=>{k(e=>String(parseFloat(e)/100))},[]),F=o(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);s(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?K(e.key):"."===e.key?K("."):"+"===e.key?U("+"):"-"===e.key?U("-"):"*"===e.key?U("×"):"/"===e.key?(e.preventDefault(),U("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&S.current?.contains(e.target)&&e.preventDefault(),w()):"Escape"===e.key?M():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&A())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[K,U,w,M,A]);const X="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",B=`${X} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,G=`${X} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,L=`${X} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,V=`${X} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
- return l(a,{children:[
3
- /* @__PURE__ */l("div",{ref:S,className:"flex flex-col h-full",style:{opacity:T.activeOpacity/100,backdropFilter:T.activeBlur>0?`blur(${T.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */l("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
5
- /* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:x.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(C||b&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:C||`${p} ${b} ${j?"":m}`}),
6
- /* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,v?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
8
- /* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(m)})]})]}),
9
- /* @__PURE__ */l("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
10
- /* @__PURE__ */u("button",{onClick:M,className:L,children:"AC"}),
11
- /* @__PURE__ */u("button",{onClick:F,className:L,children:"+/−"}),
12
- /* @__PURE__ */u("button",{onClick:A,className:L,children:"%"}),
13
- /* @__PURE__ */u("button",{onClick:()=>U("÷"),className:`${G} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
- /* @__PURE__ */u("button",{onClick:()=>K("7"),className:B,children:"7"}),
15
- /* @__PURE__ */u("button",{onClick:()=>K("8"),className:B,children:"8"}),
16
- /* @__PURE__ */u("button",{onClick:()=>K("9"),className:B,children:"9"}),
17
- /* @__PURE__ */u("button",{onClick:()=>U("×"),className:`${G} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
18
- /* @__PURE__ */u("button",{onClick:()=>K("4"),className:B,children:"4"}),
19
- /* @__PURE__ */u("button",{onClick:()=>K("5"),className:B,children:"5"}),
20
- /* @__PURE__ */u("button",{onClick:()=>K("6"),className:B,children:"6"}),
21
- /* @__PURE__ */u("button",{onClick:()=>U("-"),className:`${G} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
22
- /* @__PURE__ */u("button",{onClick:()=>K("1"),className:B,children:"1"}),
23
- /* @__PURE__ */u("button",{onClick:()=>K("2"),className:B,children:"2"}),
24
- /* @__PURE__ */u("button",{onClick:()=>K("3"),className:B,children:"3"}),
25
- /* @__PURE__ */u("button",{onClick:()=>U("+"),className:`${G} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
26
- /* @__PURE__ */u("button",{onClick:()=>K("0"),className:`${B} col-span-2`,children:"0"}),
27
- /* @__PURE__ */u("button",{onClick:()=>K("."),className:B,children:"."}),
28
- /* @__PURE__ */u("button",{onClick:w,className:V,children:"="})]})]}),
29
- /* @__PURE__ */u(t,{open:W,onClose:()=>D(!1),title:"Calculator Settings",appearance:J,onAppearanceChange:Q,onSave:()=>{E(J),localStorage.setItem(h,JSON.stringify(J)),D(!1)}})]})}export{m as default};
@@ -1,126 +0,0 @@
1
- import{openPreviewFile as e}from"./chunk-NDAZPAQL.js";import{SidebarLayout as t}from"./chunk-2X4U3VX2.js";import"./chunk-QWK6DRSN.js";import"./chunk-EIXMUGVZ.js";import{SearchableSelect as n}from"./chunk-BR7L5NE3.js";import{Breadcrumbs as a}from"./chunk-5Z6XJPAX.js";import{Select_default as r}from"./chunk-PY7GHIYF.js";import"./chunk-EO5RLFRX.js";import"./chunk-Q3RJMQYE.js";import"./chunk-2NMW66P5.js";import{useContextMenu as i,ContextMenu as s}from"./chunk-QSK2OWT3.js";import"./chunk-HRDR56SK.js";import"./chunk-KVU5IQOZ.js";import"./chunk-JOD5ISTB.js";import{IconButton_default as l}from"./chunk-SV5RRBVA.js";import"./chunk-AYZY3YNC.js";import{formatBytes as o}from"./chunk-GEYM4WN3.js";import"./chunk-Y3JW2GW5.js";import"./chunk-36BRD5J3.js";import"./chunk-LF27WIN2.js";import{getFilesDemoTree as c,subscribeFilesChoice as d,getFilesChoice as h,holdFilesChoice as m,answerFilesChoice as p,choiceTakes as u}from"./chunk-NOCOLZ2W.js";import{AboutApp as f}from"./chunk-NKZINXHG.js";import{getFilesStore as x,peekFilesViewRequest as k,consumeFilesViewRequest as g,FILES_SHOW_TRASH_EVENT as b,FILES_OPEN_DESKTOP_FOLDER_EVENT as N,subscribeDesktopFolders as w,getDesktopFoldersSnapshot as v,hasHostFilesStore as y,FolderGlyph as j,DesktopItemMiniIcon as C,desktopItemTypeLabel as D,FilesQuotaError as L}from"./chunk-HV4VQ5XV.js";import"./chunk-ESL5TDNA.js";import{useWindowManager as T,WindowTitle as $}from"./chunk-RAQBZUU2.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-5QVCBAK2.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-W5B7UNMJ.js";import{confirm as W,prompt as E}from"./chunk-6BK3KRT5.js";import{Dialog as R}from"./chunk-OSNHRKX6.js";import{ItemCount as S}from"./chunk-KWTK6TGH.js";import"./chunk-3DVNXNTF.js";import"./chunk-MBXCXFQO.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-UD4NESX7.js";import"./chunk-NV7QRWQJ.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-ZPHUMLET.js";import"./chunk-CDAJKLGL.js";import"./chunk-JMGDGNM7.js";import"./chunk-CRRC72EE.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import{Button_default as M}from"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import{Icon as F}from"./chunk-T3NLFOLW.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as P}from"./chunk-R2VKEMZH.js";import{TH_ONE_LINE as A}from"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import{toast_default as V}from"./chunk-JTZVUO3I.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-TJSJVC6P.js";import"./chunk-C3QOHMR6.js";import{useState as O,useSyncExternalStore as U,useEffect as K,useRef as Q,useCallback as J}from"react";import{jsxs as X,jsx as I,Fragment as B}from"react/jsx-runtime";var Z=[{value:"viewer",label:"Viewer"},{value:"editor",label:"Editor"}];function H({store:e,entry:t,onClose:a,onChanged:i}){const[s,o]=O(null),[c,d]=O(""),[h,m]=O([]),[p,u]=O(!1),[f,x]=O(""),[k,g]=O("viewer"),[b,N]=O(!1),w=Q(/* @__PURE__ */new Map),v=t?.id??null;if(K(()=>{if(o(null),x(""),d(""),!v||!e.shares)return;let t=!0;return e.shares(v).then(e=>{t&&o(e)}).catch(e=>{t&&(V.error(e.message),o([]))}),()=>{t=!1}},[v,e]),K(()=>{if(!e.searchPeople||!v)return;let t=!0;u(!0);const n=setTimeout(()=>{e.searchPeople(c).then(e=>{if(t){for(const t of e)w.current.set(t.id,t);m(e)}}).catch(()=>{t&&m([])}).finally(()=>{t&&u(!1)})},250);return()=>{t=!1,clearTimeout(n)}},[c,v,e]),!t)return null;const y=new Set((s??[]).map(e=>e.person.id)),j=h.filter(e=>!y.has(e.id)).map(e=>({value:e.id,label:e.name})),C=async n=>{N(!0);try{await n(),o(await e.shares(t.id)),i()}catch(e){V.error(e.message)}finally{N(!1)}};/* @__PURE__ */
2
- return X(R,{open:!0,onClose:a,size:"md",title:`Share “${t.name}”`,description:"folder"===t.kind?"Everything inside this folder is shared too. Editors’ uploads count toward your quota.":"Viewers can open and download it. Editors can also replace, rename and delete it.",footer:/* @__PURE__ */I(M,{variant:"secondary",onClick:a,children:"Done"}),children:[
3
- /* @__PURE__ */X("div",{className:"flex items-center gap-2",children:[
4
- /* @__PURE__ */I("div",{className:"min-w-0 flex-1",children:/* @__PURE__ */I(n,{value:f,onChange:x,onSearchChange:d,loading:p&&0===h.length,options:j,placeholder:"Search colleagues by name","aria-label":"Colleague to share with"})}),
5
- /* @__PURE__ */I("div",{className:"w-28 shrink-0",children:/* @__PURE__ */I(r,{value:k,onChange:e=>g(e),options:Z,"aria-label":"Access"})}),
6
- /* @__PURE__ */I(M,{variant:"primary",onClick:()=>{if(!f||!e.share)return;const n=w.current.get(f);C(async()=>{await e.share(t.id,f,k),x(""),d(""),n&&V.success(`Shared with ${n.name}`)})},disabled:!f||b,children:"Add"})]}),
7
- /* @__PURE__ */I("div",{className:"mt-4 mb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Who has access"}),null===s?/* @__PURE__ */I(P,{size:"sm",padding:"p-4",label:"Loading"}):/* @__PURE__ */X("ul",{className:"divide-y divide-line-subtle text-sm",children:[
8
- /* @__PURE__ */X("li",{className:"flex items-center gap-2 h-10",children:[
9
- /* @__PURE__ */I("span",{className:"flex-1 truncate",children:"You"}),
10
- /* @__PURE__ */I("span",{className:"text-xs text-ink-faint",children:"Owner"})]}),s.map(n=>/* @__PURE__ */X("li",{className:"flex items-center gap-2 h-10",children:[
11
- /* @__PURE__ */I("span",{className:"flex-1 truncate",title:n.person.name,children:n.person.name}),
12
- /* @__PURE__ */I("div",{className:"w-28 shrink-0",children:/* @__PURE__ */I(r,{value:n.role,onChange:a=>C(()=>e.share(t.id,n.person.id,a)),options:Z,"aria-label":`Access for ${n.person.name}`,disabled:b})}),
13
- /* @__PURE__ */I(l,{"aria-label":`Remove ${n.person.name}`,variant:"ghost",size:"sm",disabled:b,onClick:()=>C(()=>e.unshare(t.id,n.person.id)),children:/* @__PURE__ */I(F,{name:"close",className:"h-4 w-4",strokeWidth:1.8})})]},n.person.id))]})]})}var Y={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"};function G(e){if(!e)return"—";try{const t=new Date(e);return isNaN(t.getTime())?"—":t.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return e}}function z(e,t){return`Not enough space for “${e}” (${o(t.attempted)}). You've used ${o(t.used)} of ${o(t.limit)}. Empty Trash or ask an administrator for more space.`}var q=(e,t)=>e instanceof Error&&e.message||t;function _(){const n=x(),r=null!==c(),l=!r&&!!n.shares&&!!n.sharedWithMe,[R,M]=O(null),[Z,_]=O(null),[ee,te]=O([]),[ne,ae]=O([]),[re,ie]=O(null),[se,le]=O(!0),[oe,ce]=O(!1),[de,he]=O(null),[me,pe]=O(!1),[ue,fe]=O(null),xe=i(),ke=U(d,h,h);K(()=>m(),[]);const[ge,be]=O(()=>{const e=k();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});K(()=>{g()},[]);const[Ne,we]=O([]);K(()=>{const e=()=>{g(),be("trash")},t=e=>{g();const t=e.detail?.folderId;t&&be({desktopFolderId:t})};return window.addEventListener(b,e),window.addEventListener(N,t),()=>{window.removeEventListener(b,e),window.removeEventListener(N,t)}},[]);const ve=U(w,v,v),ye="object"==typeof ge?ge.desktopFolderId:null,je=ye?ve?.folders.find(e=>e.id===ye)??null:null,Ce=ye&&ve?.itemsByFolder[ye]||[];K(()=>{ye&&ve&&!ve.folders.some(e=>e.id===ye)&&be("files")},[ye,ve]);const De=Q(0),Le=Q(null),{openPage:Te,openEntity:$e}=T(),We=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>Te(e)}):"page"===t.entityType?Te(t.entityId):$e(t.entityType,t.entityId,null,t.label)},Ee=J(async()=>{if(!r)try{he(await n.quota())}catch{}},[n,r]),Re=J(async e=>{if(ie(null),r){const t=function(e){const t=e??"/",n=t.split("/").filter(Boolean);let a=c()??[];for(const e of n){const t=a.find(t=>"folder"===t.kind&&t.name===e);a=t?.children??[]}return{folder:{id:e,name:n[n.length-1]??"",role:"owner",path:[{id:null,name:""},...n.map((e,t)=>({id:"/"+n.slice(0,t+1).join("/"),name:e}))]},entries:a.map(e=>({id:("/"===t?"":t)+"/"+e.name,name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}}(e);return _(t),ce(!1),le(!1),void(null===e&&te(t.entries.filter(e=>"folder"===e.kind)))}le(!0);try{const t=await n.list(e);_(t),ce(!1),null===e&&te(t.entries.filter(e=>"folder"===e.kind))}catch(e){e instanceof TypeError?ce(!0):V.error(q(e,"Failed to list"))}finally{le(!1)}Ee()},[n,Ee,r]),Se=J(async()=>{if(n.sharedWithMe){le(!0),ie(null);try{ae(await n.sharedWithMe()),ce(!1)}catch(e){e instanceof TypeError?ce(!0):V.error(q(e,"Failed to list shared files"))}finally{le(!1)}}},[n]),Me=J(async()=>{if(r)return we([]),void le(!1);le(!0),ie(null);try{we(await n.trash()),ce(!1)}catch(e){e instanceof TypeError?ce(!0):V.error(q(e,"Failed to list trash"))}finally{le(!1)}Ee()},[n,Ee,r]),Fe=()=>{"files"===ge?Re(R):"shared"===ge?Se():"trash"===ge&&Me()};K(()=>{Fe()},[R,ge]);const Pe=e=>{be("files"),M(e)};K(()=>{!ke||"trash"!==ge&&"object"!=typeof ge||be("files")},[ke,ge]);const Ae=async(e,t)=>{try{await e()}catch(e){V.error(q(e,t))}Fe()},Ve=async e=>{try{const t=await n.read(e.id),a=URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download=e.name,r.click(),setTimeout(()=>URL.revokeObjectURL(a),1e3)}catch(e){V.error(q(e,"Download failed"))}},Oe=async e=>{for(const t of Array.from(e))try{await n.upload(R,t)}catch(e){e instanceof L?V.error(z(t.name,e)):V.error(`Upload ${t.name}: ${q(e,"failed")}`)}Re(R)},Ue=async e=>{const t=await E({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});t&&t!==e.name&&(/[\\/]/.test(t)?V.error("Names cannot contain slashes"):Ae(()=>n.rename(e.id,t),"Rename failed"))},Ke=async e=>{const t="owner"!==(e.role??"owner");await W({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will move to `+(t?`${(e.owner??Z?.folder.owner)?.name??"its owner"}'s Trash.`:"Trash. You can restore it from there."),confirmLabel:"Delete",variant:"danger"})&&Ae(()=>n.remove(e.id),"Delete failed")},Qe=()=>{De.current=0,pe(!1)};if(K(()=>{const e=()=>Qe();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),oe)/* @__PURE__ */
14
- return X("div",{className:"flex flex-col h-full bg-surface",children:[
15
- /* @__PURE__ */I($,{title:"Files - offline"}),
16
- /* @__PURE__ */I("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */X("div",{className:"max-w-md",children:[
17
- /* @__PURE__ */I(F,{name:"close-circle",className:"h-12 w-12 mx-auto text-ink-faintest mb-3",strokeWidth:1.4}),y()?/* @__PURE__ */X(B,{children:[
18
- /* @__PURE__ */I("h3",{className:"text-base font-semibold text-ink-strong mb-1",children:"Can't reach your files"}),
19
- /* @__PURE__ */I("p",{className:"text-sm text-ink-faint mb-3",children:"Check your connection and try again."})]}):/* @__PURE__ */X(B,{children:[
20
- /* @__PURE__ */I("h3",{className:"text-base font-semibold text-ink-strong mb-1",children:"Can't reach the file server"}),
21
- /* @__PURE__ */X("p",{className:"text-sm text-ink-faint mb-3",children:["No response from the file server. Make sure the server is running — see ",
22
- /* @__PURE__ */I("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]})]}),
23
- /* @__PURE__ */I("button",{onClick:Fe,className:"px-3 h-8 text-sm bg-accent-fill text-on-accent rounded hover:bg-accent-fill-hover",children:"Retry"})]})})]});const Je="files"===ge?Z?.folder??null:null,Xe=Je?.role??"owner",Ie="owner"!==Xe,Be=!r&&"files"===ge&&"viewer"!==Xe,Ze="files"===ge?Z?.entries??[]:[],He=de&&de.limit>0?Math.min(100,Math.round(de.used/de.limit*100)):0,Ye=He>90?"bg-danger":He>75?"bg-warning":"bg-accent-fill",Ge=(Je?.path??[]).filter(e=>null!==e.id),ze=[Ie?{label:"Shared with me",onClick:()=>be("shared")}:{label:"My files",onClick:()=>Pe(null)},...Ge.map(e=>({label:e.name,onClick:()=>Pe(e.id)}))],qe=Ge.length>1?Ge[Ge.length-2].id:null,_e=e=>"flex w-full items-center gap-2 rounded-md px-3 min-h-(--row-height-menu) py-2 text-left text-sm transition-colors "+(e?"bg-accent-tint font-medium text-accent-text":"text-ink hover:bg-row-hover"),et=e=>/* @__PURE__ */I("svg",{className:"h-4 w-4 shrink-0 text-ink-faintest",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */I("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),tt=/* @__PURE__ */X("nav",{className:"p-2",children:[
24
- /* @__PURE__ */I("div",{className:"px-2 py-2 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Locations"}),
25
- /* @__PURE__ */X("button",{onClick:()=>Pe(null),className:_e("files"===ge&&null===R),children:[et("M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0L21.75 12M4.5 9.75v9.75a.75.75 0 00.75.75H9V15a.75.75 0 01.75-.75h4.5A.75.75 0 0115 15v5.25h3.75a.75.75 0 00.75-.75V9.75"),"My files"]}),ee.map(e=>/* @__PURE__ */X("button",{onClick:()=>Pe(e.id),className:_e("files"===ge&&R===e.id),children:[et("M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"),
26
- /* @__PURE__ */I("span",{className:"truncate",children:e.name})]},e.id)),l&&/* @__PURE__ */X("button",{onClick:()=>be("shared"),className:_e("shared"===ge||"files"===ge&&Ie),children:[
27
- /* @__PURE__ */I(F,{name:"team",className:"h-4 w-4 shrink-0 text-ink-faintest",strokeWidth:1.6}),"Shared with me"]}),!r&&/* @__PURE__ */X("button",{onClick:()=>be("trash"),className:_e("trash"===ge),children:[et("M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79"),"Trash"]}),ve&&ve.folders.length>0&&/* @__PURE__ */X(B,{children:[
28
- /* @__PURE__ */I("div",{className:"px-2 pt-3 pb-2 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Desktop"}),ve.folders.map(e=>/* @__PURE__ */X("button",{onClick:()=>be({desktopFolderId:e.id}),className:_e(ye===e.id),children:[
29
- /* @__PURE__ */I(j,{className:"h-4 w-4 shrink-0 text-amber-500"}),
30
- /* @__PURE__ */I("span",{className:"truncate",children:e.name}),
31
- /* @__PURE__ */I(S,{count:e.itemCount,active:ye===e.id,className:"ml-auto"})]},e.id))]})]}),nt=e=>/* @__PURE__ */I(F,"folder"===e?{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}:{name:"page",className:"h-4 w-4 text-ink-faintest shrink-0",strokeWidth:1.5}),at="px-2 py-0.5 rounded hover:bg-row-hover text-ink-faint text-2xs ml-1",rt=e=>ke&&"file"===e.kind&&!u(ke.request,e.name)?"text-ink-faintest":"",it=e=>!!ke&&"file"===e.kind&&u(ke.request,e.name),st=e=>{if(!ke||!it(e))return;const t="shared"===ge;p(ke.id,{entry:e,folderId:t?null:R,location:t?"Shared with me":ze.map(e=>e.label).join(" › ")})},lt=t=>{"folder"===t.kind?Pe(t.id):ke?st(t):(async t=>{if(r)return;if(n.open?.(t))return;const a=(t.name.split(".").pop()||"").toLowerCase(),i=Y[a];i?await e({filePath:n.shortcutPath?.(t.id)??t.id,filename:t.name,kind:i,load:()=>n.read(t.id),onStaged:e=>Te(e)}):Ve(t)})(t)},ot=e=>{ke&&"file"===e.kind&&!it(e)||ie(e.id)},ct=ke?[...Ze,..."shared"===ge?ne:[]].find(e=>e.id===re&&it(e))??null:null,dt=(e,t,a)=>{const r=[{key:"open",label:"file"===e.kind&&!ke&&n.openLabel?.(e)||"Open",onSelect:()=>lt(e)}];return"file"===e.kind&&r.push({key:"download",label:"Download",onSelect:()=>{Ve(e)}}),l&&a&&r.push({key:"share",label:"Share",onSelect:()=>fe(e)}),t&&(r.push({key:"rename",label:"Rename",onSelect:()=>{Ue(e)}}),r.push({key:"divider",type:"divider"}),r.push({key:"delete",label:"Delete",danger:!0,onSelect:()=>{Ke(e)}})),r},ht=ke?"Files - Choosing":je?`Files - ${je.name}`:"shared"===ge?"Files - Shared with me":"trash"===ge?"Files - Trash":Je&&null!==Je.id?`Files - ${Je.name}`:"Files";/* @__PURE__ */
32
- return X("div",{className:"relative flex flex-col h-full bg-surface",onDragEnter:e=>{Be&&e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),De.current++,me||pe(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{De.current>0&&De.current--,0===De.current&&pe(!1)},onDrop:e=>{e.preventDefault(),Qe(),Be&&e.dataTransfer.files?.length&&Oe(e.dataTransfer.files)},children:[
33
- /* @__PURE__ */I($,{title:ht}),
34
- /* @__PURE__ */I(f,{app:"files"}),
35
- /* @__PURE__ */I("input",{ref:Le,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&Oe(e.target.files),Le.current&&(Le.current.value="")}}),
36
- /* @__PURE__ */I("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */I(t,{sidebar:tt,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */X("div",{className:"flex h-full min-w-0 flex-col",children:[ke&&/* @__PURE__ */X("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-line bg-accent-tint text-accent-text text-sm shrink-0",role:"status",children:[
37
- /* @__PURE__ */I(F,{name:"cursor",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),
38
- /* @__PURE__ */I("span",{className:"flex-1 min-w-0 truncate",children:ke.request.title}),
39
- /* @__PURE__ */I("button",{onClick:()=>p(ke.id,null),className:"px-3 h-7 rounded border border-line-strong bg-surface text-ink hover:bg-row-hover",children:"Cancel"}),
40
- /* @__PURE__ */I("button",{onClick:()=>{ct&&st(ct)},disabled:!ct,className:"px-3 h-7 rounded bg-accent-fill text-on-accent hover:bg-accent-fill-hover disabled:opacity-40",children:"Open"})]}),
41
- /* @__PURE__ */X("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-line bg-surface-sunken shrink-0 text-xs",children:[/* @__PURE__ */X(B,"files"===ge?{children:[
42
- /* @__PURE__ */I("button",{onClick:()=>{Ie&&Ge.length<=1?be("shared"):Pe(qe)},disabled:!Ie&&null===R,className:"px-2 py-1 rounded hover:bg-row-hover disabled:opacity-30 text-ink-muted",title:"Parent folder",children:/* @__PURE__ */I(F,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
43
- /* @__PURE__ */X("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[
44
- /* @__PURE__ */I("div",{className:"min-w-0 flex-1",children:/* @__PURE__ */I(a,{items:ze,maxItems:5})}),Ie&&"viewer"===Xe&&/* @__PURE__ */X("span",{className:"shrink-0 inline-flex items-center gap-1 rounded-full bg-surface-sunken px-2 py-0.5 text-2xs text-ink-faint whitespace-nowrap",children:[
45
- /* @__PURE__ */I(F,{name:"eye",className:"h-3 w-3",strokeWidth:1.8}),"View only"]}),Ie&&Je?.owner&&/* @__PURE__ */X("span",{className:"shrink-0 text-2xs text-ink-faint whitespace-nowrap",children:["Shared by ",Je.owner.name]})]}),
46
- /* @__PURE__ */I("button",{onClick:Fe,className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted",title:"Refresh",children:/* @__PURE__ */I(F,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),Be&&/* @__PURE__ */X(B,{children:[!Ie&&/* @__PURE__ */X("button",{onClick:()=>be("trash"),className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted flex items-center gap-1",title:"Open trash",children:[
47
- /* @__PURE__ */I(F,{name:"trash",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Trash"]}),
48
- /* @__PURE__ */X("button",{onClick:async()=>{const e=await E({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});e&&(/[\\/]/.test(e)?V.error("Folder names cannot contain slashes"):Ae(()=>n.createFolder(R,e),"Create folder failed"))},className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted flex items-center gap-1",children:[
49
- /* @__PURE__ */I(F,{name:"folder-plus",className:"h-3.5 w-3.5",strokeWidth:1.5}),"New Folder"]}),
50
- /* @__PURE__ */X("button",{onClick:()=>Le.current?.click(),className:"px-2 py-1 rounded bg-accent-fill text-on-accent hover:bg-accent-fill-hover flex items-center gap-1",children:[
51
- /* @__PURE__ */I(F,{name:"upload",className:"h-3.5 w-3.5",strokeWidth:1.8}),"Upload"]})]})]}:"shared"===ge?{children:[
52
- /* @__PURE__ */I(F,{name:"team",className:"h-4 w-4 ml-1",strokeWidth:1.6}),
53
- /* @__PURE__ */I("span",{className:"flex-1 text-ink font-medium px-1",children:"Shared with me"}),
54
- /* @__PURE__ */I("button",{onClick:Se,className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted",title:"Refresh",children:/* @__PURE__ */I(F,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})})]}:"trash"===ge?{children:[
55
- /* @__PURE__ */I("button",{onClick:()=>be("files"),className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted",title:"Back to files",children:/* @__PURE__ */I(F,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
56
- /* @__PURE__ */I("span",{className:"flex-1 text-ink font-medium px-2",children:"Trash"}),
57
- /* @__PURE__ */I("button",{onClick:Me,className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted",title:"Refresh",children:/* @__PURE__ */I(F,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),
58
- /* @__PURE__ */I("button",{onClick:async()=>{if(0===Ne.length)return;await W({title:"Empty trash",message:`${Ne.length} item${1===Ne.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"})&&Ae(()=>n.emptyTrash(),"Empty trash failed")},disabled:0===Ne.length,className:"px-2 py-1 rounded text-danger-text hover:bg-status-danger-soft disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
59
- /* @__PURE__ */I("button",{onClick:()=>be("files"),className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted",title:"Back to files",children:/* @__PURE__ */I(F,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
60
- /* @__PURE__ */I(j,{className:"h-4 w-4 text-amber-500 ml-1"}),
61
- /* @__PURE__ */I("span",{className:"flex-1 text-ink font-medium px-1 truncate",children:je?.name??"Desktop folder"}),
62
- /* @__PURE__ */I("span",{className:"text-2xs text-ink-faintest px-2",children:"Desktop shortcuts"})]}),de&&/* @__PURE__ */X(B,{children:[
63
- /* @__PURE__ */I("div",{className:"h-4 w-px bg-line-strong mx-1"}),
64
- /* @__PURE__ */X("div",{className:"flex items-center gap-2",title:`${o(de.used)} of ${o(de.limit)} used`,children:[
65
- /* @__PURE__ */I("div",{className:"w-20 h-1.5 rounded-full bg-line overflow-hidden",children:/* @__PURE__ */I("div",{className:`h-full ${Ye} transition-all`,style:{width:`${He}%`}})}),
66
- /* @__PURE__ */X("span",{className:"text-2xs text-ink-faint tabular-nums whitespace-nowrap",children:[o(de.used)," / ",o(de.limit)]})]})]})]}),
67
- /* @__PURE__ */I("div",{className:"flex-1 overflow-auto",children:"object"==typeof ge?0===Ce.length?/* @__PURE__ */I("div",{className:"p-10 text-center text-sm text-ink-faintest",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */X("table",{className:"w-full text-sm",children:[
68
- /* @__PURE__ */I("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */X("tr",{children:[
69
- /* @__PURE__ */I("th",{className:`${A} text-left font-medium px-3 h-8`,children:"Name"}),
70
- /* @__PURE__ */I("th",{className:`${A} text-left font-medium px-3 h-8 w-28`,children:"Type"}),
71
- /* @__PURE__ */I("th",{className:`${A} w-56`})]})}),
72
- /* @__PURE__ */I("tbody",{children:Ce.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
73
- return X("tr",{onClick:()=>ie(t),onDoubleClick:()=>We(e),className:"cursor-default border-b border-line-subtle "+(re===t?"bg-accent-tint":"hover:bg-row-hover"),children:[
74
- /* @__PURE__ */X("td",{className:"px-3 h-8 flex items-center gap-2",children:[
75
- /* @__PURE__ */I(C,{item:e}),
76
- /* @__PURE__ */I("span",{className:"truncate",title:e.label,children:e.label})]}),
77
- /* @__PURE__ */I("td",{className:"px-3 h-8 text-xs text-ink-faint",children:D(e)}),
78
- /* @__PURE__ */X("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
79
- /* @__PURE__ */I("button",{onClick:t=>{t.stopPropagation(),We(e)},className:"px-2 py-0.5 rounded hover:bg-row-hover text-accent-text text-2xs",children:"Open"}),
80
- /* @__PURE__ */I("button",{onClick:t=>{t.stopPropagation(),ve?.moveToDesktop([e])},className:"px-2 py-0.5 rounded hover:bg-row-hover text-ink-faint text-2xs ml-1",children:"Move to desktop"}),
81
- /* @__PURE__ */I("button",{onClick:t=>{t.stopPropagation(),ve?.removeShortcuts([e])},className:"px-2 py-0.5 rounded hover:bg-status-danger-soft text-danger-text text-2xs ml-1",children:"Remove"})]})]},t)})})]}):"shared"===ge?se&&0===ne.length?/* @__PURE__ */I(P,{size:"sm",padding:"p-6",label:"Loading"}):0===ne.length?/* @__PURE__ */I("div",{className:"p-10 text-center text-sm text-ink-faintest",children:"Nothing has been shared with you yet. Files and folders colleagues share with you show here."}):/* @__PURE__ */X("table",{className:"w-full text-sm",children:[
82
- /* @__PURE__ */I("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */X("tr",{children:[
83
- /* @__PURE__ */I("th",{className:`${A} text-left font-medium px-3 h-8`,children:"Name"}),
84
- /* @__PURE__ */I("th",{className:`${A} text-left font-medium px-3 h-8 w-40`,children:"Owner"}),
85
- /* @__PURE__ */I("th",{className:`${A} text-left font-medium px-3 h-8 w-24`,children:"Access"}),
86
- /* @__PURE__ */I("th",{className:`${A} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
87
- /* @__PURE__ */I("th",{className:`${A} w-32`})]})}),
88
- /* @__PURE__ */I("tbody",{children:ne.map(e=>/* @__PURE__ */X("tr",{onClick:()=>ot(e),onDoubleClick:()=>lt(e),onContextMenu:t=>xe.open(t,e),className:`cursor-default border-b border-line-subtle ${rt(e)} ${re===e.id?"bg-accent-tint":"hover:bg-row-hover"}`,children:[
89
- /* @__PURE__ */X("td",{className:"px-3 h-8 flex items-center gap-2",children:[nt(e.kind),
90
- /* @__PURE__ */I("span",{className:"truncate",title:e.name,children:e.name})]}),
91
- /* @__PURE__ */I("td",{className:"px-3 h-8 text-ink-faint truncate",children:e.owner?.name??"—"}),
92
- /* @__PURE__ */I("td",{className:"px-3 h-8 text-ink-faint",children:"editor"===e.role?"Editor":"Viewer"}),
93
- /* @__PURE__ */I("td",{className:"px-3 h-8 text-right tabular-nums text-ink-faint",children:"folder"===e.kind?"—":o(e.size)}),
94
- /* @__PURE__ */X("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
95
- /* @__PURE__ */I("button",{onClick:t=>{t.stopPropagation(),lt(e)},className:"px-2 py-0.5 rounded hover:bg-row-hover text-accent-text text-2xs",children:"Open"}),"file"===e.kind&&/* @__PURE__ */I("button",{onClick:t=>{t.stopPropagation(),Ve(e)},className:at,children:"Download"})]})]},e.id))})]}):"trash"===ge?se&&0===Ne.length?/* @__PURE__ */I(P,{size:"sm",padding:"p-6",label:"Loading"}):0===Ne.length?/* @__PURE__ */I("div",{className:"p-10 text-center text-sm text-ink-faintest",children:"Trash is empty."}):/* @__PURE__ */X("table",{className:"w-full text-sm",children:[
96
- /* @__PURE__ */I("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */X("tr",{children:[
97
- /* @__PURE__ */I("th",{className:`${A} text-left font-medium px-3 h-8`,children:"Name"}),
98
- /* @__PURE__ */I("th",{className:`${A} text-left font-medium px-3 h-8`,children:"Original location"}),
99
- /* @__PURE__ */I("th",{className:`${A} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
100
- /* @__PURE__ */I("th",{className:`${A} text-right font-medium px-3 h-8 w-40`,children:"Deleted"}),
101
- /* @__PURE__ */I("th",{className:`${A} w-44`})]})}),
102
- /* @__PURE__ */I("tbody",{children:Ne.map(e=>/* @__PURE__ */X("tr",{className:"border-b border-line-subtle hover:bg-row-hover",children:[
103
- /* @__PURE__ */X("td",{className:"px-3 h-8 flex items-center gap-2",children:[nt(e.kind),
104
- /* @__PURE__ */I("span",{className:"truncate",title:e.name,children:e.name})]}),
105
- /* @__PURE__ */I("td",{className:"px-3 h-8 text-ink-faint text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
106
- /* @__PURE__ */I("td",{className:"px-3 h-8 text-right tabular-nums text-ink-faint",children:o(e.size)}),
107
- /* @__PURE__ */I("td",{className:"px-3 h-8 text-right text-ink-faint tabular-nums",children:e.deletedAt?G(e.deletedAt):"—"}),
108
- /* @__PURE__ */X("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
109
- /* @__PURE__ */I("button",{onClick:()=>{return t=e,Ae(async()=>{await n.restore(t.id),V.success(`Restored "${t.name}"`)},"Restore failed");var t},className:"px-2 py-0.5 rounded hover:bg-row-hover text-accent-text text-2xs",children:"Restore"}),
110
- /* @__PURE__ */I("button",{onClick:()=>(async e=>{await W({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"})&&Ae(()=>n.purge(e.id),"Delete failed")})(e),className:"px-2 py-0.5 rounded hover:bg-status-danger-soft text-danger-text text-2xs ml-1",children:"Delete forever"})]})]},e.id))})]}):se&&0===Ze.length?/* @__PURE__ */I(P,{size:"sm",padding:"p-6",label:"Loading"}):0===Ze.length?/* @__PURE__ */X("div",{className:"p-10 text-center text-sm text-ink-faintest",children:["Empty folder.",Be&&/* @__PURE__ */X(B,{children:[" Drop files here or click ",
111
- /* @__PURE__ */I("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */X("table",{className:"w-full text-sm",children:[
112
- /* @__PURE__ */I("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */X("tr",{children:[
113
- /* @__PURE__ */I("th",{className:`${A} text-left font-medium px-3 h-8`,children:"Name"}),
114
- /* @__PURE__ */I("th",{className:`${A} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
115
- /* @__PURE__ */I("th",{className:`${A} text-right font-medium px-3 h-8 w-40`,children:"Modified"}),l&&!Ie&&/* @__PURE__ */I("th",{className:`${A} text-left font-medium px-3 h-8 w-28`,children:"Shared"}),
116
- /* @__PURE__ */I("th",{className:`${A} w-48`})]})}),
117
- /* @__PURE__ */I("tbody",{children:Ze.map(e=>{const t=e.role??Xe,n="owner"===t,a=Be&&"viewer"!==t;/* @__PURE__ */
118
- return X("tr",{onClick:()=>ot(e),onDoubleClick:()=>lt(e),onContextMenu:t=>{r||xe.open(t,e)},className:`cursor-default border-b border-line-subtle ${rt(e)} ${re===e.id?"bg-accent-tint":"hover:bg-row-hover"}`,children:[
119
- /* @__PURE__ */X("td",{className:"px-3 h-8 flex items-center gap-2",children:[nt(e.kind),
120
- /* @__PURE__ */I("span",{className:"truncate",title:e.name,children:e.name})]}),
121
- /* @__PURE__ */I("td",{className:"px-3 h-8 text-right tabular-nums text-ink-faint whitespace-nowrap",children:"folder"===e.kind?"—":ke&&!it(e)&&ke.request.otherLabel?ke.request.otherLabel:o(e.size)}),
122
- /* @__PURE__ */I("td",{className:"px-3 h-8 text-right text-ink-faint tabular-nums whitespace-nowrap",children:G(e.modifiedAt)}),l&&!Ie&&/* @__PURE__ */I("td",{className:"px-3 h-8",children:e.shareCount?/* @__PURE__ */I("span",{className:"inline-flex rounded-full bg-accent-tint px-2 py-0.5 text-2xs text-accent-text whitespace-nowrap",children:1===e.shareCount?"1 person":`${e.shareCount} people`}):/* @__PURE__ */I("span",{className:"text-ink-faintest",children:"—"})}),
123
- /* @__PURE__ */I("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:!r&&!ke&&/* @__PURE__ */X(B,{children:["file"===e.kind&&/* @__PURE__ */I("button",{onClick:t=>{t.stopPropagation(),Ve(e)},className:at,children:"Download"}),l&&n&&/* @__PURE__ */I("button",{onClick:t=>{t.stopPropagation(),fe(e)},className:at,children:"Share"}),a&&/* @__PURE__ */X(B,{children:[
124
- /* @__PURE__ */I("button",{onClick:t=>{t.stopPropagation(),Ue(e)},className:at,children:"Rename"}),
125
- /* @__PURE__ */I("button",{onClick:t=>{t.stopPropagation(),Ke(e)},className:"px-2 py-0.5 rounded hover:bg-status-danger-soft text-danger-text text-2xs ml-1",children:"Delete"})]})]})})]},e.id)})})]})})]})})}),xe.state&&(()=>{const e=xe.state.data,t=e.role??("shared"===ge?"viewer":Xe),n=Be&&"viewer"!==t;/* @__PURE__ */
126
- return I(s,{...xe.props,items:dt(e,n,"owner"===t)})})(),l&&/* @__PURE__ */I(H,{store:n,entry:ue,onClose:()=>fe(null),onChanged:()=>Re(R)}),me&&/* @__PURE__ */I("div",{className:"absolute inset-0 bg-accent-tint border-4 border-dashed border-accent-border pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */I("div",{className:"px-4 py-2 rounded-md bg-accent-fill text-on-accent text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{_ as default,z as quotaExceededMessage};
@@ -1,91 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-7Q4DE4CT.js";import{subscribePomo as o,getPomoSnapshot as a,setPomoDurations as n,setPomoAlarm as r,setPomoAlarmConfig as s,setPomoBehaviour as i,setPomoFocusSound as l,useTodoTasks as c,migratePomodoroTasksOnce as u,pomoSwitchMode as d,pomoPause as m,pomoStart as h,ALARM_OPTIONS as p,playAlarm as g,FOCUS_SOUND_OPTIONS as k,previewFocusSound as f}from"./chunk-GBEDLYND.js";import{PLACEHOLDER_INK as b}from"./chunk-AYZY3YNC.js";import{pad2 as x}from"./chunk-LF27WIN2.js";import{useWidgetSettings as v}from"./chunk-RAQBZUU2.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-5QVCBAK2.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-W5B7UNMJ.js";import"./chunk-6BK3KRT5.js";import"./chunk-OSNHRKX6.js";import"./chunk-KWTK6TGH.js";import"./chunk-3DVNXNTF.js";import"./chunk-MBXCXFQO.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-UD4NESX7.js";import"./chunk-NV7QRWQJ.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import{useShellPrefs as y}from"./chunk-KC3EX26K.js";import"./chunk-CDAJKLGL.js";import"./chunk-JMGDGNM7.js";import"./chunk-CRRC72EE.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import{Icon as N}from"./chunk-T3NLFOLW.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-JTZVUO3I.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-TJSJVC6P.js";import"./chunk-C3QOHMR6.js";import{useSyncExternalStore as C,useEffect as w,useMemo as S,useState as j,useRef as B,useCallback as M}from"react";import{jsxs as T,Fragment as P,jsx as D}from"react/jsx-runtime";var A="pomodoro_appearance",I="pomodoro_active_task_id",V={focus:"Pomodoro",short:"Short Break",long:"Long Break"},L={focus:"#0f172a",short:"#508a52",long:"#5b7898"};var R=25,W=5,$=15,E=!1,J=!1,K=4,Q=!0,U=!0,F="bell",O=100,G=1,X="none",Z=50,_=(e,t,o,a)=>"number"==typeof e&&isFinite(e)?Math.max(t,Math.min(o,Math.round(e))):a;function H(){const t=C(o,a,a),{prefs:g,save:f}=y(),b=function(e){const t=e&&"object"==typeof e?e:{};return{focusMinutes:_(t.focusMinutes,1,120,R),shortBreakMinutes:_(t.shortBreakMinutes,1,120,W),longBreakMinutes:_(t.longBreakMinutes,1,120,$),autoStartBreaks:"boolean"==typeof t.autoStartBreaks?t.autoStartBreaks:E,autoStartPomodoros:"boolean"==typeof t.autoStartPomodoros?t.autoStartPomodoros:J,longBreakInterval:_(t.longBreakInterval,1,20,K),autoCheckTasks:"boolean"==typeof t.autoCheckTasks?t.autoCheckTasks:Q,checkToBottom:"boolean"==typeof t.checkToBottom?t.checkToBottom:U,alarmSound:p.some(e=>e.id===t.alarmSound)?t.alarmSound:F,alarmVolume:_(t.alarmVolume,0,100,O),alarmRepeat:_(t.alarmRepeat,1,5,G),focusSound:k.some(e=>e.id===t.focusSound)?t.focusSound:X,focusVolume:_(t.focusVolume,0,100,Z)}}(g.pomodoro_settings);w(()=>{n({focus:60*b.focusMinutes,short:60*b.shortBreakMinutes,long:60*b.longBreakMinutes})},[b.focusMinutes,b.shortBreakMinutes,b.longBreakMinutes]),w(()=>{r(b.alarmSound),s(b.alarmVolume,b.alarmRepeat)},[b.alarmSound,b.alarmVolume,b.alarmRepeat]),w(()=>{i({autoStartBreaks:b.autoStartBreaks,autoStartPomodoros:b.autoStartPomodoros,longBreakInterval:b.longBreakInterval})},[b.autoStartBreaks,b.autoStartPomodoros,b.longBreakInterval]),w(()=>{l(b.focusSound,b.focusVolume)},[b.focusSound,b.focusVolume]),w(()=>{if("undefined"!=typeof Notification&&"default"===Notification.permission)try{Notification.requestPermission()}catch{}},[]);const H=c(),z=H.tasks,q=S(()=>/* @__PURE__ */(new Date).toISOString().slice(0,10),[]),ee=function(e,t){return S(()=>t?(e=>{const t=[],o=[];for(const a of e)(a.done?o:t).push(a);return[...t,...o]})(e):e,[e,t])}(S(()=>z.filter(e=>!!e.dueDate&&(e.dueDate===q||e.dueDate<q&&!e.done)),[z,q]),b.checkToBottom),[te,oe]=j(()=>localStorage.getItem(I)),[ae,ne]=j(!1),[re,se]=j(null),ie=B(!1);w(()=>{ie.current||(ie.current=!0,u(z,H.setAllTasks))},[]),w(()=>{try{te?localStorage.setItem(I,te):localStorage.removeItem(I)}catch{}},[te]),w(()=>{if(!re)return;const e=()=>se(null),t=setTimeout(()=>document.addEventListener("click",e),0);return()=>{clearTimeout(t),document.removeEventListener("click",e)}},[re]);const le=B(t.streak);w(()=>{if(t.streak>le.current&&te){const e=z.find(e=>e.id===te);if(e){const t=(e.completed??0)+1,o=e.estimated??0,a=b.autoCheckTasks&&o>0&&t>=o;H.updateTask(te,{completed:t,done:e.done||a})}}le.current=t.streak},[t.streak,te,b.autoCheckTasks,z,H]);const ue=ee.reduce((e,t)=>e+(t.completed??0),0),de=ee.reduce((e,t)=>e+Math.max(t.estimated??0,t.completed??0),0),me=ee.reduce((e,t)=>t.done?e:e+Math.max(0,(t.estimated??0)-(t.completed??0)),0),he=t.running&&"focus"===t.mode?t.remaining:0,pe=me*b.focusMinutes*60+he,ge=new Date(Date.now()+1e3*pe).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}),ke=(pe/3600).toFixed(1),fe=te?z.find(e=>e.id===te)??null:null,be=x(Math.floor(t.remaining/60)),xe=x(t.remaining%60),[ve,ye]=j(()=>e(A)),[Ne,Ce]=j(!1),[we,Se]=j(ve),[je,Be]=j(b);v(M(()=>{Se({...ve}),Be({...b}),Ce(!0)},[ve,b]));const Me="focus"!==t.mode,Te=L[t.mode],Pe=Me?(De=Te,Ae=ve.activeOpacity/100,`rgba(${parseInt(De.slice(1,3),16)}, ${parseInt(De.slice(3,5),16)}, ${parseInt(De.slice(5,7),16)}, ${Ae})`):`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${ve.activeOpacity/100})`;var De,Ae;const Ie={primary:Me?"text-white":"text-gray-900",secondary:Me?"text-white/85":"text-gray-700",muted:Me?"text-white/65":"text-gray-500",tabActive:Me?"bg-white/15 text-white":"bg-gray-200 text-gray-900",tabInactive:Me?"text-white/75 hover:bg-white/10":"text-gray-500 hover:bg-gray-200",divider:Me?"border-white/30":"border-gray-200",softDivider:Me?"border-white/20":"border-gray-200",iconBtn:Me?"bg-black/15 hover:bg-black/25 text-white/85":"bg-gray-200 hover:bg-gray-300 text-gray-600",addTaskBtn:Me?"border-white/45 text-white/90 hover:bg-white/[0.06]":"border-gray-300 text-gray-500 hover:bg-gray-200/50"},Ve=Me?Te:"#0f172a";/* @__PURE__ */
2
- return T(P,{children:[
3
- /* @__PURE__ */T("div",{className:`flex flex-col h-full select-none transition-colors duration-300 ${Ie.primary}`,style:{backgroundColor:Pe,backdropFilter:ve.activeBlur>0?`blur(${ve.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */D("div",{className:"px-3 pt-3 flex justify-center gap-2",children:["focus","short","long"].map(e=>/* @__PURE__ */D("button",{onClick:()=>d(e),className:`px-3 py-1 text-sm font-bold rounded transition-colors ${t.mode===e?Ie.tabActive:Ie.tabInactive}`,children:V[e]},e))}),
5
- /* @__PURE__ */T("div",{className:"text-center font-bold tabular-nums leading-none tracking-tight mt-3",style:{fontSize:"4.5rem"},children:[be,":",xe]}),
6
- /* @__PURE__ */D("div",{className:"flex justify-center mt-3 mb-2",children:/* @__PURE__ */D("button",{onClick:()=>t.running?m():h(),className:"bg-surface px-12 py-3 rounded-md font-bold text-base shadow-[0_4px_0_rgba(0,0,0,0.12)] hover:shadow-[0_3px_0_rgba(0,0,0,0.12)] active:translate-y-1 active:shadow-none transition-all",style:{color:Ve,letterSpacing:"0.08em"},children:t.running?"PAUSE":"START"})}),
7
- /* @__PURE__ */D("div",{className:"px-3 py-3 text-center",children:fe?/* @__PURE__ */T(P,{children:[
8
- /* @__PURE__ */T("div",{className:`text-xs leading-tight ${Ie.muted}`,children:["#",(fe.completed??0)+1]}),
9
- /* @__PURE__ */D("div",{className:`text-base font-medium leading-tight truncate mt-0.5 ${Ie.primary}`,children:fe.name})]}):/* @__PURE__ */D("div",{className:`text-xs italic ${Ie.muted}`,children:"No task selected"})}),
10
- /* @__PURE__ */T("div",{className:"px-3 mt-1 flex items-center justify-between",children:[
11
- /* @__PURE__ */D("h3",{className:`text-base font-bold tracking-tight ${Ie.primary}`,children:"Tasks"}),
12
- /* @__PURE__ */D("button",{className:`rounded p-1 transition-colors ${Ie.iconBtn}`,"aria-label":"Tasks menu",tabIndex:-1,children:/* @__PURE__ */D(N,{name:"more-vertical",look:"solid",className:"h-4 w-4"})})]}),
13
- /* @__PURE__ */D("div",{className:`border-t mx-3 mt-2 ${Ie.divider}`}),
14
- /* @__PURE__ */T("div",{className:"flex-1 px-3 py-3 space-y-2 overflow-y-auto",children:[ee.map(e=>{const t=e.id===te;/* @__PURE__ */
15
- return T("div",{onClick:()=>oe(e.id),className:"bg-surface text-ink-strong rounded-md flex items-center pr-2 py-3 shadow-sm cursor-pointer transition-shadow hover:shadow-(--elevation-panel) "+(t?"border-l-4 border-gray-700 pl-2":"pl-3 border-l-4 border-transparent"),children:[
16
- /* @__PURE__ */D("button",{onClick:t=>{var o;t.stopPropagation(),o=e.id,H.toggleDone(o)},className:"shrink-0",children:e.done?/* @__PURE__ */D("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",style:{color:Ve},children:/* @__PURE__ */D("path",{d:"M10 0a10 10 0 100 20 10 10 0 000-20zm-1 14.5l-4.5-4.5 1.4-1.4 3.1 3.1 6.1-6.1 1.4 1.4z"})}):/* @__PURE__ */D("svg",{className:"h-5 w-5 text-gray-300",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:/* @__PURE__ */D("circle",{cx:"12",cy:"12",r:"10"})})}),
17
- /* @__PURE__ */D("span",{className:"ml-3 flex-1 font-semibold truncate "+(e.done?"line-through text-gray-400":"text-gray-800"),children:e.name}),
18
- /* @__PURE__ */T("span",{className:"text-sm tabular-nums mr-2 shrink-0",children:[
19
- /* @__PURE__ */D("span",{className:"font-bold text-gray-500",children:e.completed??0}),
20
- /* @__PURE__ */D("span",{className:"text-gray-400",children:" / "}),
21
- /* @__PURE__ */D("span",{className:"text-gray-400",children:e.estimated??"–"})]}),
22
- /* @__PURE__ */T("div",{className:"relative",children:[
23
- /* @__PURE__ */D("button",{onClick:t=>{t.stopPropagation(),se(re===e.id?null:e.id)},className:"rounded p-1 bg-gray-100 hover:bg-gray-200",children:/* @__PURE__ */D(N,{name:"more-vertical",look:"solid",className:"h-4 w-4 text-ink-faint"})}),re===e.id&&/* @__PURE__ */D("div",{className:"absolute right-0 top-full mt-1 bg-white text-gray-800 rounded shadow-lg border border-gray-200 z-10 min-w-[110px] overflow-hidden",onClick:e=>e.stopPropagation(),children:/* @__PURE__ */D("button",{onClick:t=>{var o;t.stopPropagation(),o=e.id,H.removeTask(o),te===o&&oe(null),se(null)},className:"block w-full px-3 h-8 text-sm text-left hover:bg-red-50 text-red-600",children:"Delete"})})]})]},e.id)}),ae?/* @__PURE__ */D(ce,{onSubmit:(e,t)=>{const o=e.trim();if(!o)return;const a=H.addTask({name:o,estimated:t,completed:0,dueDate:q});te||oe(a),ne(!1)},onCancel:()=>ne(!1),accentColor:Ve}):/* @__PURE__ */T("button",{onClick:()=>ne(!0),className:`w-full border-2 border-dashed rounded-md py-3 font-semibold flex items-center justify-center gap-2 transition-colors ${Ie.addTaskBtn}`,children:[
24
- /* @__PURE__ */D(N,{name:"add-circle",className:"h-5 w-5",strokeWidth:2}),"Add Task"]})]}),
25
- /* @__PURE__ */T("div",{className:`border-t px-3 py-3 flex items-center justify-center gap-5 text-sm ${Ie.softDivider}`,children:[
26
- /* @__PURE__ */T("span",{className:Ie.secondary,children:["Pomos: ",
27
- /* @__PURE__ */D("span",{className:`font-bold ${Ie.primary}`,children:ue}),
28
- /* @__PURE__ */D("span",{className:Ie.muted,children:" / "}),
29
- /* @__PURE__ */D("span",{className:`font-bold ${Ie.primary}`,children:de})]}),pe>0&&/* @__PURE__ */T("span",{className:Ie.secondary,children:["Finish At: ",
30
- /* @__PURE__ */D("span",{className:`font-bold ${Ie.primary}`,children:ge}),
31
- /* @__PURE__ */T("span",{className:Ie.muted,children:[" (",ke,"h)"]})]})]})]}),
32
- /* @__PURE__ */D(Y,{open:Ne,onClose:()=>Ce(!1),onSave:()=>{ye(we),localStorage.setItem(A,JSON.stringify(we)),f({pomodoro_settings:je}),Ce(!1)},configAppearance:we,setConfigAppearance:Se,configPrefs:je,setConfigPrefs:Be})]})}function Y({open:e,onClose:o,onSave:a,configAppearance:n,setConfigAppearance:r,configPrefs:s,setConfigPrefs:i}){const l=(e,t)=>i(o=>({...o,[e]:t}));/* @__PURE__ */
33
- return T(t,{open:e,onClose:o,title:"Pomodoro Settings",appearance:n,onAppearanceChange:r,onSave:a,children:[
34
- /* @__PURE__ */T(z,{icon:/* @__PURE__ */D(se,{}),label:"TIMER",children:[
35
- /* @__PURE__ */T("div",{children:[
36
- /* @__PURE__ */D("p",{className:"text-sm font-bold text-gray-800 mb-2",children:"Time (minutes)"}),
37
- /* @__PURE__ */T("div",{className:"grid grid-cols-3 gap-3",children:[
38
- /* @__PURE__ */D(te,{label:"Pomodoro",value:s.focusMinutes,onChange:e=>l("focusMinutes",e),max:120}),
39
- /* @__PURE__ */D(te,{label:"Short Break",value:s.shortBreakMinutes,onChange:e=>l("shortBreakMinutes",e),max:120}),
40
- /* @__PURE__ */D(te,{label:"Long Break",value:s.longBreakMinutes,onChange:e=>l("longBreakMinutes",e),max:120})]})]}),
41
- /* @__PURE__ */D(q,{label:"Auto Start Breaks",children:/* @__PURE__ */D(ne,{checked:s.autoStartBreaks,onChange:e=>l("autoStartBreaks",e)})}),
42
- /* @__PURE__ */D(q,{label:"Auto Start Pomodoros",children:/* @__PURE__ */D(ne,{checked:s.autoStartPomodoros,onChange:e=>l("autoStartPomodoros",e)})}),
43
- /* @__PURE__ */D(q,{label:"Long Break interval",children:/* @__PURE__ */D(oe,{value:s.longBreakInterval,onChange:e=>l("longBreakInterval",e),min:1,max:20,className:"w-14 text-center"})})]}),
44
- /* @__PURE__ */T(z,{icon:/* @__PURE__ */D(ie,{}),label:"TASK",children:[
45
- /* @__PURE__ */D(q,{label:"Auto Check Tasks",info:'If you enable "Auto Check Tasks", the active task will be automatically checked when the actual pomodoro count reaches the estimated count.',children:/* @__PURE__ */D(ne,{checked:s.autoCheckTasks,onChange:e=>l("autoCheckTasks",e)})}),
46
- /* @__PURE__ */D(q,{label:"Check to Bottom",info:'If you enable "Check to Bottom", the checked task will be automatically moved to the bottom of the task list.',children:/* @__PURE__ */D(ne,{checked:s.checkToBottom,onChange:e=>l("checkToBottom",e)})})]}),
47
- /* @__PURE__ */T(z,{icon:/* @__PURE__ */D(le,{}),label:"SOUND",children:[
48
- /* @__PURE__ */D(q,{label:"Alarm Sound",children:/* @__PURE__ */T("div",{className:"flex items-center gap-2",children:[
49
- /* @__PURE__ */D(ae,{value:s.alarmSound,onChange:e=>l("alarmSound",e),options:p.map(e=>({id:e.id,label:e.label}))}),"off"!==s.alarmSound&&/* @__PURE__ */D("button",{type:"button",onClick:()=>g(s.alarmSound,{volume:s.alarmVolume,repeat:1}),className:"px-2 py-1 text-2xs rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
50
- /* @__PURE__ */D(ee,{value:s.alarmVolume,onChange:e=>l("alarmVolume",e)}),
51
- /* @__PURE__ */D(q,{label:"repeat",children:/* @__PURE__ */D(oe,{value:s.alarmRepeat,onChange:e=>l("alarmRepeat",e),min:1,max:5,className:"w-14 text-center"})}),
52
- /* @__PURE__ */D(q,{label:"Focus Sound",children:/* @__PURE__ */T("div",{className:"flex items-center gap-2",children:[
53
- /* @__PURE__ */D(ae,{value:s.focusSound,onChange:e=>l("focusSound",e),options:k}),"none"!==s.focusSound&&/* @__PURE__ */D("button",{type:"button",onClick:()=>f(s.focusSound,s.focusVolume),className:"px-2 py-1 text-2xs rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
54
- /* @__PURE__ */D(ee,{value:s.focusVolume,onChange:e=>l("focusVolume",e)})]})]})}function z({icon:e,label:t,children:o}){/* @__PURE__ */
55
- return T("div",{className:"border-t border-gray-200 pt-3 first:border-0 first:pt-0",children:[
56
- /* @__PURE__ */T("div",{className:"flex items-center gap-2 mb-3 text-ink-faintest",children:[e,
57
- /* @__PURE__ */D("span",{className:"text-xs font-bold tracking-[0.15em]",children:t})]}),
58
- /* @__PURE__ */D("div",{className:"space-y-3",children:o})]})}function q({label:e,info:t,children:o}){/* @__PURE__ */
59
- return T("div",{className:"flex items-center justify-between gap-3",children:[
60
- /* @__PURE__ */T("div",{className:"flex items-center gap-2 min-w-0",children:[
61
- /* @__PURE__ */D("span",{className:"text-sm font-semibold text-gray-800",children:e}),t&&/* @__PURE__ */D(re,{title:t})]}),
62
- /* @__PURE__ */D("div",{className:"shrink-0",children:o})]})}function ee({value:e,onChange:t}){/* @__PURE__ */
63
- return T("div",{className:"flex items-center justify-end gap-3",children:[
64
- /* @__PURE__ */D("span",{className:"text-xs text-gray-400 w-7 text-right tabular-nums",children:e}),
65
- /* @__PURE__ */D("input",{type:"range",min:0,max:100,value:e,onChange:e=>t(parseInt(e.target.value,10)),className:"w-40 accent-blue-500"})]})}function te({label:e,value:t,onChange:o,min:a=1,max:n=99}){/* @__PURE__ */
66
- return T("label",{className:"flex flex-col",children:[
67
- /* @__PURE__ */D("span",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),
68
- /* @__PURE__ */D(oe,{value:t,onChange:o,min:a,max:n})]})}function oe({value:e,onChange:t,min:o=1,max:a=99,className:n=""}){/* @__PURE__ */
69
- return D("input",{type:"number",min:o,max:a,value:e,onChange:e=>t(Math.max(o,Math.min(a,parseInt(e.target.value,10)||o))),className:`bg-gray-100 border-0 rounded-md px-2 h-8 text-sm font-medium text-ink-strong focus:outline-none focus:ring-2 focus:ring-blue-500 w-full ${n}`})}function ae({value:e,onChange:t,options:o}){/* @__PURE__ */
70
- return T("div",{className:"relative",children:[
71
- /* @__PURE__ */D("select",{value:e,onChange:e=>t(e.target.value),className:"appearance-none bg-gray-100 border-0 rounded-md pl-3 pr-8 h-8 text-sm font-medium text-ink-strong focus:outline-none focus:ring-2 focus:ring-blue-500 cursor-pointer",children:o.map(e=>/* @__PURE__ */D("option",{value:e.id,children:e.label},e.id))}),
72
- /* @__PURE__ */D(N,{name:"chevron-down",className:`absolute right-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 pointer-events-none ${b}`,strokeWidth:2.5})]})}function ne({checked:e,onChange:t}){/* @__PURE__ */
73
- return D("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>t(!e),className:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors "+(e?"bg-emerald-500":"bg-gray-300"),children:/* @__PURE__ */D("span",{className:"absolute h-5 w-5 rounded-full bg-white shadow transition-transform "+(e?"translate-x-[22px]":"translate-x-0.5")})})}function re({title:e}){/* @__PURE__ */
74
- return D("span",{title:e,className:"inline-flex items-center justify-center w-4 h-4 rounded-full bg-gray-300 text-on-accent text-3xs font-bold cursor-help",children:"i"})}function se(){/* @__PURE__ */
75
- return T("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
76
- /* @__PURE__ */D("circle",{cx:"12",cy:"12",r:"9"}),
77
- /* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7v5l3 2"})]})}function ie(){/* @__PURE__ */
78
- return T("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
79
- /* @__PURE__ */D("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),
80
- /* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4"})]})}function le(){/* @__PURE__ */
81
- return T("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
82
- /* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5L6 9H2v6h4l5 4V5z"}),
83
- /* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 8.5a5 5 0 010 7M19 5a9 9 0 010 14"})]})}function ce({onSubmit:e,onCancel:t,accentColor:o}){const[a,n]=j(""),[r,s]=j(1),i=()=>e(a,r);/* @__PURE__ */
84
- return T("div",{className:"bg-surface text-ink-strong rounded-md p-3 shadow-(--elevation-panel)",children:[
85
- /* @__PURE__ */D("input",{autoFocus:!0,value:a,onChange:e=>n(e.target.value),placeholder:"What are you working on?",onKeyDown:e=>{"Enter"===e.key&&i(),"Escape"===e.key&&t()},className:"w-full text-base font-medium bg-transparent border-0 outline-none placeholder-gray-400"}),
86
- /* @__PURE__ */T("div",{className:"flex items-center justify-between mt-2",children:[
87
- /* @__PURE__ */D("span",{className:"text-xs font-semibold text-gray-500",children:"Est Pomodoros"}),
88
- /* @__PURE__ */D("input",{type:"number",min:1,max:20,value:r,onChange:e=>s(Math.max(1,Math.min(20,parseInt(e.target.value,10)||1))),className:"w-16 bg-gray-100 rounded px-2 py-1 text-sm text-right border-0 focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),
89
- /* @__PURE__ */T("div",{className:"flex gap-2 mt-3 justify-end",children:[
90
- /* @__PURE__ */D("button",{onClick:t,className:"px-3 py-1 text-sm text-gray-500 hover:bg-gray-100 rounded",children:"Cancel"}),
91
- /* @__PURE__ */D("button",{onClick:i,className:"px-4 py-1 text-sm font-semibold text-white rounded shadow-sm",style:{backgroundColor:o},children:"Save"})]})]})}export{H as default};
@@ -1,6 +0,0 @@
1
- import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-J4IT5C3A.js";import{IconButton_default as a}from"./chunk-SV5RRBVA.js";import{Icon as o}from"./chunk-T3NLFOLW.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as s}from"./chunk-TJSJVC6P.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":A,windows:S,className:T="",layout:j="grid"}){const I=s().textToolbar,L=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!L.words&&!L.paragraph)return null;const R=m(n,k,x,L.cells.paragraph),q=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,B=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:q(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:q(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,$=l(I),J=e.map(e=>[e,$[e],r(e)]),K=C?e.filter(e=>C.allow.includes(e)):[],O=C&&K.includes(C.value)?C.value:K[0],U=[["none",I.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",I.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",I.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],V=x&&R?g(I.clear,/* @__PURE__ */i(a,{className:q(!1),"aria-label":I.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,W=/* @__PURE__ */t(d,{children:[B("bold",I.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),B("italic",I.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),B("underline",I.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),B("strike",I.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(I.color,/* @__PURE__ */i(a,{pressed:k.open,className:q(k.open,"rosh-tb-color"),"aria-label":I.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,B("link",I.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),B("sup",I.sup,/* @__PURE__ */i(o,{name:"superscript"})),B("sub",I.sub,/* @__PURE__ */i(o,{name:"subscript"})),B("code",I.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===R?V:null]}),E=/* @__PURE__ */t(d,{children:[C&&K.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":I.alignment,onKeyDown:e=>p(e,K,e=>C.onChange(e)),children:J.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:q(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===O?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,D&&n.has("bullet")?g(I.bullet,/* @__PURE__ */i(a,{className:q("bullet"===D.pressed),"aria-label":I.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(I.number,/* @__PURE__ */i(a,{className:q("number"===D.pressed),"aria-label":I.number,"aria-pressed":"number"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,B("quote",I.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":I.letterCase,onKeyDown:e=>p(e,U.map(([e])=>e),e=>M.onChange(e)),children:U.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:q(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?V:null]}),F="row"===j,H=F?" is-row":L.flow?" is-flow":L.oneRow?" is-one-row":L.words&&void 0===N&&"words"!==R?" is-eight":"",P=b(n,Boolean(k)),Z={"--rosh-tb-color-col":String(P.color),"--rosh-tb-link-col":String(P.link),...F?{"--rosh-tb-cells":String(L.cells.words+L.cells.paragraph),"--rosh-tb-groupgap":L.words&&L.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let z;return z=F?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[L.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:W}):null,L.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:E}):null]}):L.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[W,
3
- /* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),E]}):L.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
4
- /* @__PURE__ */i("div",{className:"rosh-tb-words",children:W}),
5
- /* @__PURE__ */i("div",{className:"rosh-tb-para",children:E})]}):/* @__PURE__ */t(d,{children:[L.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==R?" is-eight":""),children:W}):null,L.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:E}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${H} ${T}`.trim(),style:Z,children:[
6
- /* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":A??I.formatting,children:z}),S]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
@@ -1,14 +0,0 @@
1
- import{SearchableSelect as e}from"./chunk-BR7L5NE3.js";import{Select_default as a}from"./chunk-PY7GHIYF.js";import{labelClasses as l}from"./chunk-EQKUFYX6.js";import{isSafeLinkHref as t}from"./chunk-Q5Z3KHT2.js";import{Input_default as r}from"./chunk-HRDR56SK.js";import{INPUT_SIZES as n}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-EVYD6UFQ.js";import{Icon as o}from"./chunk-T3NLFOLW.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-TJSJVC6P.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:n,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:j="",tidyAddress:O,addressAddon:E}=t,T=void 0!==t.onApply,$=u().link,Y=y.isSafe??k,z=d(),A=c(null),D=c(null),[K,L]=p({url:n}),P=T?K.url:n,[R,U]=p(!1),[H,Q]=p(null),[S,W]=p(null),[B,V]=p(!1),J=c(null),M=c(()=>{});M.current=T?t.onCancel:()=>{},m(()=>{if(T)return s(e=>{const a=A.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(M.current(),!0)},()=>A.current)},[T]),m(()=>{if(!T)return;const e=D.current;e?(e.focus(),e.select()):A.current?.querySelector("button, input")?.focus()},[]);const Z=o??[{value:b,label:$.address,target:{type:"text"}}],q=H&&H.against===P?H.kind:y.kindOf(P),G=Z.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===q),I=G.find(e=>"text"===e.target.type),X=G.find(e=>e.value===q)??I??G[0];if(!X)return null;const _="text"!==X.target.type,ee=_?y.targetOf(P):P,ae=h(X.target),le=ae.find(e=>e.value===ee),te=e=>({value:e,label:$.unavailable(e)}),re="select"===X.target.type&&ee&&w?w(ee):null,ne=re?y.readFilter(P):null,ie=ne?re?.find(e=>e.param===ne.param):void 0,oe=S&&S.against===P?S.text:P,se=_?P:O?O(oe.trim()).trim():oe.trim(),ue=T&&O?se:oe,de=!_&&""!==ue.trim()&&!Y(ue),ce=de&&(!T||R);_&&B&&V(!1);const pe=(e,a)=>{T?L({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},me=(e,a)=>{Q(a=>a?{...a,against:e}:a),pe(e,a)},fe=e=>{if(!e)return me("");const a=ae.find(a=>a.value===e);me(e,a?.label)},ve=e=>{U(!1);const a=e.trim();a?Y(e)?(W({text:e,against:a}),me(a)):W({text:e,against:P}):(W({text:e,against:""}),me(""))},ge=e=>{const a=e.relatedTarget;if(a&&(a===D.current||J.current?.contains(a)))return;if(V(!1),T||!O||C)return;const l=O(oe.trim());l.trim()!==oe.trim()&&ve(l)},he=()=>{if(!T||!se)return;if(!_&&de)return void U(!0);const e=_&&K.url===se?K.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},be=(e,a)=>a&&!e.some(e=>e.value===a)?[te(a),...e]:[...e],xe=(l,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const a=r.some(e=>""===e.value);/* @__PURE__ */
2
- return f(e,{"aria-label":l,value:t,options:o,disabled:C,clearable:a,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
3
- return f(a,{size:"sm","aria-label":l,value:t,options:o,readOnly:C,onChange:n})};let ke;if("text"===X.target.type)ke=/* @__PURE__ */f(r,{ref:D,id:`${z}-address`,size:"sm",type:"text",invalid:ce,"aria-label":$.address,"aria-describedby":ce?`${z}-why`:void 0,placeholder:F??$.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:oe,readOnly:C,onChange:e=>ve(e.target.value),onFocus:()=>V(!0),onBlur:ge,onKeyDown:O&&!T?e=>{"Enter"===e.key&&e.currentTarget.blur()}:void 0});else{const e="groups"===X.target.type?X.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):X.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:X.target.placeholder},...be(e,ee)];ke=xe(X.label,ee,a,fe,e.length>10)}const ye=/* @__PURE__ */v(g,{children:[o&&xe($.linkType,X.value,G.map(e=>({value:e.value,label:e.label})),e=>{W(null),U(!1);const a=G.find(a=>a.value===e);if(!a||"text"===a.target.type)return void Q({kind:e,against:P});const l=h(a.target)[0];Q({kind:e,against:l?l.value:""}),l?pe(l.value,l.label):pe("")},!1),ke,E&&B&&!C&&"text"===X.target.type&&/* @__PURE__ */f("div",{ref:J,onBlur:ge,children:E({url:oe,onChange:ve})}),re&&xe($.filter,ne?.param??"",[{value:"",label:$.noFilter},...ne&&!ie?[te(ne.param)]:[],...re.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return me(ee,le?.label);const a=re?.find(a=>a.param===e),l=a?.values[0];l&&me(y.withFilter(ee,{param:e,value:l.value}),l.label)},!1),re&&ne&&xe($.value,ne.value,be((ie?.values??[]).map(e=>({value:e.value,label:e.label})),ne.value),e=>{if(!ne)return;const a=ie?.values.find(a=>a.value===e);me(y.withFilter(ee,{param:ne.param,value:e}),a?.label)},(ie?.values.length??0)>10),ce&&/* @__PURE__ */f("p",{id:`${z}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:$.unsafe}),X.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:X.hint}),re&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:$.filterHint})]});if(!T)/* @__PURE__ */
4
- return f("div",{ref:A,className:`flex min-w-0 flex-auto flex-col gap-2 ${j}`.trim(),role:N?"group":void 0,"aria-label":N,children:ye});const we=t.onRemove;/* @__PURE__ */
5
- return v("div",{ref:A,role:"dialog","aria-label":N??$.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${j}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),he())},children:[_?/* @__PURE__ */f("span",{className:l({inline:!0}),children:$.title}):/* @__PURE__ */f("label",{htmlFor:`${z}-address`,className:l({inline:!0}),children:$.title}),ye,
6
- /* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[we?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:we,children:$.remove}):null,
7
- /* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
8
- /* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>M.current(),children:$.cancel}),
9
- /* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:he,disabled:C||""===se,children:$.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,N]=p(!1),C=c(null),F=d(),j=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
10
- return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
11
- /* @__PURE__ */f(r,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
12
- /* @__PURE__ */v("button",{ref:C,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?F:void 0,disabled:b,onClick:()=>N(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${n.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
13
- /* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(t?"text-blue-600":"text-ink-faintest")}),
14
- /* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:F,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),j()},onRemove:t?()=>{i(""),j()}:void 0,onCancel:j})})]})}export{y as LinkPicker,w as TextLinkField};
@@ -1,3 +0,0 @@
1
- import{DropdownMenu as e}from"./chunk-KVU5IQOZ.js";import{Button_default as i}from"./chunk-EVYD6UFQ.js";import{Icon as n}from"./chunk-T3NLFOLW.js";import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{iconButtonClasses as a}from"./chunk-UQYNPYF4.js";import{forwardRef as l,useId as o}from"react";import{jsxs as s,jsx as t}from"react/jsx-runtime";var d="relative focus-visible:z-10",m={secondary:"border-l-0",primary:"border-l border-white/30",warning:"border-l border-white/30"},c=l(function({children:l,onClick:c,type:b="button",items:h,menuLabel:u,variant:f="primary",size:p="md",loading:v=!1,leftIcon:k,disabled:g=!1,disabledReason:N,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:C,menuFooterLabel:W,align:F="end",side:L="bottom",menuMinWidth:O,linkAs:z,block:I=!1,className:D=""},Q){const R=g&&(null!=N&&""!==N&&!1!==N)&&!v,U=x&&null!=j&&""!==j&&!1!==j,Y=o(),$=/* @__PURE__ */t(i,{ref:Q,type:b,variant:f,size:p,loading:v,leftIcon:k,block:I,disabled:g&&!R,"aria-disabled":!!R||void 0,disabledReason:R?N:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),A=I?"relative flex min-w-0 flex-1":"relative inline-flex",M=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
2
- return s("div",{className:[I?"flex w-full":"inline-flex","items-stretch",D].filter(Boolean).join(" "),children:[null==w||""===w||R?$:/* @__PURE__ */t(r,{content:w,className:A,children:$}),
3
- /* @__PURE__ */t(r,{content:U?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":U?Y:void 0,items:h,align:F,side:L,minWidth:O,linkAs:z,disabled:x&&!U,"aria-disabled":U,onOpenChange:y,footer:C,footerLabel:W,triggerClassName:a({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(n,{name:"chevron-down",className:M,strokeWidth:2,"aria-hidden":"true"})})}),U&&/* @__PURE__ */t("span",{id:Y,className:"sr-only",children:j})]})});export{c as SplitButton_default};
@@ -1,13 +0,0 @@
1
- import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-Q3RJMQYE.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-HRDR56SK.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-EVYD6UFQ.js";import{Icon as p}from"./chunk-T3NLFOLW.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{GLASS_DIVIDER as k,glassStyle as j}from"./chunk-5FYDNH4Y.js";import{useShellStrings as $}from"./chunk-TJSJVC6P.js";import{useState as N,useId as D,useRef as C,useMemo as S,useEffect as W}from"react";import{createPortal as R}from"react-dom";import{jsxs as E,jsx as F}from"react/jsx-runtime";function M(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var T=["right-2","right-8","right-16"],L=[8,32,64];function z(z){const{options:O,placeholder:A,emptyOptionLabel:Y,className:H="",disabled:J,id:U,filter:I=!1,allowFreeText:B=!1,freeTextOption:Q,onSearchChange:V,loading:K=!1,error:Z,onRetry:G,rightAdornment:P,endAction:X,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=z,re=!0===z.multiple,le=z.multiple?z.value:z.value?[z.value]:[],oe=z.multiple?"":z.value,ie=e=>{z.multiple?z.onChange(e):z.onChange(e[0]??"")},ae=le.length>0,se=I&&ae&&!J,ce=re||I,ue=null!=Q,de=B||ue,[he,pe]=N(!1),[me,fe]=N(-1),be=D(),ge=U??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=N(""),ke=$(),je=Y??ke.select.none,$e=e=>{xe(e),fe(-1),V?.(e)},Ne=C(null),De=C(null),Ce=C(null),Se=C(null),We=C(he);We.current=he;const Re=C(!1),Ee=e=>{We.current&&(We.current=!1,e&&B&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),$e(""))},Fe=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?$e(""):fe(t));ie([e.value]),Ee(!1)}},[Me,Te]=N(null);y(()=>{if(!P||he)return void Te(null);const e=Se.current?.offsetWidth??0;Te(e?e+L[Je]+6:null)});const Le=v(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),ze=S(()=>t(O),[O]),Oe=le.join("\0"),Ae=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of ze)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[ze,Oe,de]),Ye=Ae.join(", "),He=_&&ae&&!J,Je=(He?1:0)+(X?1:0),[Ue,Ie]=N(null),Be=C(null),Qe=C(""),Ve=C(()=>{});Ve.current=()=>{const e=De.current,t=Be.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Ae.join("\0")}`;if(o===Qe.current)return;Qe.current=o;let i=null;r>0&&Ae.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=M(Ae,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Ie(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Ve.current()}),W(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ve.current());return t.observe(e),()=>t.disconnect()},[re]);const Ke=Ae.length,Ze=!re||!Ue||Ue.shown>=Ke?Ye:0===Ue.shown?ke.select.selectedCount(Ke):`${Ae.slice(0,Ue.shown).join(", ")} +${Ke-Ue.shown}`,Ge=re&&null!==Ue&&(Ue.shown<Ke||Ue.cut),Pe=he&&ae&&ce;W(()=>{if(!he)return;const e=e=>{const t=e.target;Ne.current?.contains(t)||Ce.current?.contains(t)||Ee(!0)};document.addEventListener("mousedown",e);const t=b(()=>Ee(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,B,ye,Oe,z.onChange]),W(()=>{if(he)return x(e=>!("Escape"!==e.key||!We.current)&&(Ee(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Xe=S(()=>{const e=/* @__PURE__ */new Set;return n(O,t=>!e.has(t.value)&&(e.add(t.value),!0))},[O]),qe=S(()=>{if(V)return Xe;const e=ye.trim().toLowerCase();return e?n(Xe,t=>r(t,e)):Xe},[Xe,ye,V]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?ze.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,ze,Oe]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
2
- return E("div",{ref:Ne,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(Ne.current?.contains(t)||Ce.current?.contains(t))||Re.current||document.activeElement!==De.current&&Ee(!0)},children:[(rt=/* @__PURE__ */F("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Ze,onChange:e=>{$e(e.target.value),pe(!0)},onFocus:()=>{J||($e(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(J)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Fe(nt[me],me):1!==_e.length||_e[0].disabled?B&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),$e("")):(ie([et]),Ee(!1),De.current?.blur())):Fe(_e[0],0)):"Escape"===t.key?(Ee(!1),De.current?.blur()):"Tab"===t.key&&Ee(!0)},placeholder:Pe?Ze:A||je,className:`${se?u:d} ${H} ${a[Je]}${J?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Pe?" rosh-field-shows-choice":""}`,style:Me?{paddingRight:Me}:void 0,disabled:J}),re?/* @__PURE__ */F(f,{content:!he&&Ge?Ye:null,className:"block",children:rt}):rt),re&&
3
- /* @__PURE__ */F("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */F("span",{ref:Be,className:"whitespace-pre"})}),Je>0&&
4
- /* @__PURE__ */E(s,{children:[He&&
5
- /* @__PURE__ */F("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */F(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */F(p,{name:"close"}),onClick:()=>{ie([]),Ee(!1)}}})}),X&&/* @__PURE__ */F("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */F(c,{action:X})})]}),P&&!he&&/* @__PURE__ */F("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${T[Je]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:P}),he&&R(
6
- /* @__PURE__ */E("div",{ref:Ce,onMouseDownCapture:()=>{Re.current=!0,setTimeout(()=>{Re.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:Le?.left,right:Le?.right,top:Le?.top,bottom:Le?.bottom,minWidth:Le?.minWidth,width:Le?.width,...ce&&{maxWidth:Le?.maxWidth},visibility:Le?void 0:"hidden",...j()},children:[re&&ae&&_&&!J&&
7
- /* @__PURE__ */F("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${k}`,children:ke.select.clearAll}),K?
8
- /* @__PURE__ */F(m,{size:"sm",padding:"py-2",label:ke.search.searching}):Z?/* @__PURE__ */E("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
9
- /* @__PURE__ */F("span",{className:"min-w-0 flex-1",children:Z}),G&&/* @__PURE__ */F(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:G,className:"shrink-0",children:ke.list.retry})]}):null,
10
- /* @__PURE__ */E("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Le?.maxHeight??w},children:[0===nt.length?K||Z?null:/* @__PURE__ */F("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
11
- return E("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Fe(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */F(o,{selected:n}),
12
- /* @__PURE__ */F("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */F(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&Q&&
13
- /* @__PURE__ */F("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Fe(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${k}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */F("span",{className:"min-w-0 flex-1 truncate",children:Q(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{z as SearchableSelect,M as fitChoice};