@overvis/hmi-workspace-ui 0.0.0-stage → 0.1.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 (1023) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +84 -2
  3. package/THIRD_PARTY_NOTICES +151 -0
  4. package/dist/OFL-1.1.txt +93 -0
  5. package/dist/alarm-list-BL3xQ5Lf.js +423 -0
  6. package/dist/alarm-rule-dialog-S1ZUg-74.js +423 -0
  7. package/dist/alarm-rule-lists-C5v1Kf7A.js +344 -0
  8. package/dist/alarm-rules-page-CqFzofPd.js +121 -0
  9. package/dist/alert-B8MAoIO8.js +45 -0
  10. package/dist/alert-dialog-CYkuMg5D.js +129 -0
  11. package/dist/api-error-9rQmUN5L.js +93 -0
  12. package/dist/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  13. package/dist/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  14. package/dist/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  15. package/dist/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  16. package/dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  17. package/dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  18. package/dist/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  19. package/dist/base-revision-YCO27zR4.js +106 -0
  20. package/dist/breadcrumb-DzVL1yHa.js +74 -0
  21. package/dist/breadcrumbs-0cjsV2cq.js +21 -0
  22. package/dist/button-6SxPBYMz.js +44 -0
  23. package/dist/catalog-list-DjZojYLJ.js +77 -0
  24. package/dist/code-editor-BVimvjDV.js +143 -0
  25. package/dist/context-u9KJQmdB.js +102 -0
  26. package/dist/copyable-id-DYGiAcnq.js +40 -0
  27. package/dist/dashboard-bindings.js +26 -0
  28. package/dist/dashboard-context-CBfG6DoT.js +191 -0
  29. package/dist/dashboards-page-BlrJguNz.js +1064 -0
  30. package/dist/date-time-picker-C3FhMXk6.js +266 -0
  31. package/dist/de-14WdmJxZ.js +4578 -0
  32. package/dist/diagnostic-text-BAkzW0SE.js +111 -0
  33. package/dist/diagnostic-text-DiKd2i1w.js +76 -0
  34. package/dist/dialog-BIhQXcZC.js +237 -0
  35. package/dist/dialog-BqyIxMD-.js +54 -0
  36. package/dist/dialogs-B6BRnf3Q.js +730 -0
  37. package/dist/dialogs-D_v1LeH4.js +7820 -0
  38. package/dist/display-DmOo23mi.js +79 -0
  39. package/dist/dropdown-menu-DSzbBq3v.js +136 -0
  40. package/dist/editor-language-To9MxloY.js +437 -0
  41. package/dist/editor-page-BiSZJz5b.js +1353 -0
  42. package/dist/empty-B-QJ-06w.js +59 -0
  43. package/dist/en-BgercpT0.js +4578 -0
  44. package/dist/entity-controls-D1K4Ot3O.js +76 -0
  45. package/dist/errors-CcsvDHu8.js +26 -0
  46. package/dist/footer-DC-Q0052.js +10675 -0
  47. package/dist/history-page-sAAhG54V.js +1400 -0
  48. package/dist/host.js +1523 -0
  49. package/dist/i18n-BgzakKoC.js +401 -0
  50. package/dist/i18n.js +2 -0
  51. package/dist/icon-D-pR9htW.js +57 -0
  52. package/dist/index-page-DMH82fZe.js +214 -0
  53. package/dist/index.js +19118 -0
  54. package/dist/item-B5SaTFQU.js +120 -0
  55. package/dist/lat-lng-B12P7QyY.js +11 -0
  56. package/dist/list-page-CvsdZb86.js +363 -0
  57. package/dist/location-map-renderer-DO5yfdSU.js +145 -0
  58. package/dist/location-picker-renderer-CjCxg6ai.js +105 -0
  59. package/dist/model-B8gGi4OK.js +9 -0
  60. package/dist/mutation-form-validators-BNz5bsv1.js +2408 -0
  61. package/dist/mutations-THtGG6Ai.js +240 -0
  62. package/dist/notice-card-DyGywFsW.js +246 -0
  63. package/dist/page-2KPemaAj.js +328 -0
  64. package/dist/page-6rIoTg2L.js +459 -0
  65. package/dist/page-C6giEoEd.js +1935 -0
  66. package/dist/page-DCbTxKsi.js +313 -0
  67. package/dist/page-DWO427hT.js +208 -0
  68. package/dist/page-LXu_2zm3.js +137 -0
  69. package/dist/page-aaUiVOnk.js +513 -0
  70. package/dist/page-header-RB2YFWlE.js +55 -0
  71. package/dist/page-title-CdCbiLt8.js +14 -0
  72. package/dist/page-v6LCwswN.js +304 -0
  73. package/dist/panel-DDy8tUNR.js +338 -0
  74. package/dist/parameter-values.js +215 -0
  75. package/dist/pl-lQ9HXV9k.js +4578 -0
  76. package/dist/presence-code-BfSXr50g.js +83 -0
  77. package/dist/progress-C7cxNJA1.js +83 -0
  78. package/dist/provider-BOeYHi0n.js +134 -0
  79. package/dist/provider-DoEpKcQ-.js +29015 -0
  80. package/dist/query-gate-DVhNIkge.js +33 -0
  81. package/dist/quick-report-CUVJnbKP.js +416 -0
  82. package/dist/radio-group-CZGqVbkJ.js +26 -0
  83. package/dist/retention-BYXNpYmR.js +62 -0
  84. package/dist/retention-note-CHhA6gjY.js +42 -0
  85. package/dist/rolldown-runtime-Dy4uBu1J.js +11 -0
  86. package/dist/ru-qTKINoUj.js +4578 -0
  87. package/dist/run-text-DvaO8LDF.js +113 -0
  88. package/dist/search-D4rDnE9T.js +265 -0
  89. package/dist/sections-kCOyc4NR.js +77 -0
  90. package/dist/select-BKiOWdSr.js +539 -0
  91. package/dist/select-eNgZdZ30.js +521 -0
  92. package/dist/skeleton-6yk8Tdh5.js +19 -0
  93. package/dist/slider-DorDsoF8.js +37 -0
  94. package/dist/spinner-C-HPNxOc.js +530 -0
  95. package/dist/src/audit/checkpoint-presentation.d.ts +2 -0
  96. package/dist/src/audit/checkpoints.d.ts +23 -0
  97. package/dist/src/audit/history-model.d.ts +3 -0
  98. package/dist/src/audit/history-page.d.ts +13 -0
  99. package/dist/src/audit/history-presentation.d.ts +21 -0
  100. package/dist/src/audit/history-search.d.ts +6 -0
  101. package/dist/src/audit/revert-checkpoint-dialog.d.ts +29 -0
  102. package/dist/src/audit/revert-device-confirmation.d.ts +20 -0
  103. package/dist/src/audit/setup-change-list.d.ts +5 -0
  104. package/dist/src/brand/brand-link.d.ts +7 -0
  105. package/dist/src/brand/local-brand-link.d.ts +11 -0
  106. package/dist/src/brand/overvis-logo.d.ts +10 -0
  107. package/dist/src/brand/workspace-brand-link.d.ts +10 -0
  108. package/dist/src/brand/workspace-favicon.d.ts +4 -0
  109. package/dist/src/chrome/language-switcher.d.ts +3 -0
  110. package/dist/src/chrome/mode-toggle.d.ts +1 -0
  111. package/dist/src/chrome/text-link.d.ts +8 -0
  112. package/dist/src/code-editor/code-editor.d.ts +55 -0
  113. package/dist/src/code-editor/formula-input.d.ts +20 -0
  114. package/dist/src/code-editor/json-positions.d.ts +26 -0
  115. package/dist/src/code-editor/language-features.d.ts +122 -0
  116. package/dist/src/code-editor/taskfile-language.d.ts +10 -0
  117. package/dist/src/dev-fatal/error-boundary.d.ts +10 -0
  118. package/dist/src/dev-fatal/format-console-error.d.ts +5 -0
  119. package/dist/src/dev-fatal/install.d.ts +6 -0
  120. package/dist/src/dev-fatal/is-enabled.d.ts +7 -0
  121. package/dist/src/dev-fatal/overlay.d.ts +8 -0
  122. package/dist/src/dev-fatal/report-render-error.d.ts +6 -0
  123. package/dist/src/dev-fatal/should-ignore.d.ts +5 -0
  124. package/dist/src/entry/host/index.d.ts +43 -0
  125. package/dist/src/entry/ui/index.d.ts +80 -0
  126. package/dist/src/form/api-error.d.ts +11 -0
  127. package/dist/src/form/fields/checkbox-field.d.ts +9 -0
  128. package/dist/src/form/fields/dashboard-picker-field.d.ts +13 -0
  129. package/dist/src/form/fields/formula-field.d.ts +11 -0
  130. package/dist/src/form/fields/otp-field.d.ts +14 -0
  131. package/dist/src/form/fields/parameter-picker-field.d.ts +3 -0
  132. package/dist/src/form/fields/text-field.d.ts +9 -0
  133. package/dist/src/form/fields/textarea-field.d.ts +6 -0
  134. package/dist/src/form/focus-first-invalid-field.d.ts +4 -0
  135. package/dist/src/form/form-contexts.d.ts +1 -0
  136. package/dist/src/form/form-error-banner.d.ts +4 -0
  137. package/dist/src/form/form-root.d.ts +18 -0
  138. package/dist/src/form/format-field-errors.d.ts +10 -0
  139. package/dist/src/form/index.d.ts +36 -0
  140. package/dist/src/form/map-trpc-to-form-errors.d.ts +34 -0
  141. package/dist/src/form/message.d.ts +5 -0
  142. package/dist/src/form/mutation-form-validators.d.ts +41 -0
  143. package/dist/src/form/submit-button.d.ts +13 -0
  144. package/dist/src/form/trpc-error-data.d.ts +19 -0
  145. package/dist/src/form/use-app-form.d.ts +89 -0
  146. package/dist/src/hooks/use-closed-minute.d.ts +6 -0
  147. package/dist/src/hooks/use-media-query.d.ts +2 -0
  148. package/dist/src/hooks/use-mobile.d.ts +1 -0
  149. package/dist/src/hooks/use-now.d.ts +5 -0
  150. package/dist/src/i18n/catalogs/de/action.d.ts +14 -0
  151. package/dist/src/i18n/catalogs/de/alarm.d.ts +79 -0
  152. package/dist/src/i18n/catalogs/de/api-error.d.ts +261 -0
  153. package/dist/src/i18n/catalogs/de/audit.d.ts +133 -0
  154. package/dist/src/i18n/catalogs/de/automation-editor.d.ts +220 -0
  155. package/dist/src/i18n/catalogs/de/automation-language.d.ts +249 -0
  156. package/dist/src/i18n/catalogs/de/automation.d.ts +59 -0
  157. package/dist/src/i18n/catalogs/de/brand.d.ts +4 -0
  158. package/dist/src/i18n/catalogs/de/cold-room.d.ts +26 -0
  159. package/dist/src/i18n/catalogs/de/copyable.d.ts +6 -0
  160. package/dist/src/i18n/catalogs/de/dashboard.d.ts +92 -0
  161. package/dist/src/i18n/catalogs/de/device-preset.d.ts +71 -0
  162. package/dist/src/i18n/catalogs/de/document.d.ts +52 -0
  163. package/dist/src/i18n/catalogs/de/edge-program-language.d.ts +165 -0
  164. package/dist/src/i18n/catalogs/de/edge-program.d.ts +238 -0
  165. package/dist/src/i18n/catalogs/de/endpoint.d.ts +112 -0
  166. package/dist/src/i18n/catalogs/de/error.d.ts +34 -0
  167. package/dist/src/i18n/catalogs/de/fleet.d.ts +247 -0
  168. package/dist/src/i18n/catalogs/de/formula.d.ts +35 -0
  169. package/dist/src/i18n/catalogs/de/graphics.d.ts +417 -0
  170. package/dist/src/i18n/catalogs/de/language.d.ts +10 -0
  171. package/dist/src/i18n/catalogs/de/messages.d.ts +19 -0
  172. package/dist/src/i18n/catalogs/de/parameter.d.ts +373 -0
  173. package/dist/src/i18n/catalogs/de/pull.d.ts +11 -0
  174. package/dist/src/i18n/catalogs/de/report.d.ts +377 -0
  175. package/dist/src/i18n/catalogs/de/setup.d.ts +65 -0
  176. package/dist/src/i18n/catalogs/de/starter.d.ts +38 -0
  177. package/dist/src/i18n/catalogs/de/storage.d.ts +124 -0
  178. package/dist/src/i18n/catalogs/de/symbols-hvac.d.ts +142 -0
  179. package/dist/src/i18n/catalogs/de/symbols-power.d.ts +122 -0
  180. package/dist/src/i18n/catalogs/de/symbols-quarry.d.ts +81 -0
  181. package/dist/src/i18n/catalogs/de/symbols.d.ts +676 -0
  182. package/dist/src/i18n/catalogs/de/theme.d.ts +4 -0
  183. package/dist/src/i18n/catalogs/de/ui.d.ts +37 -0
  184. package/dist/src/i18n/catalogs/de/workspace.d.ts +19 -0
  185. package/dist/src/i18n/catalogs/de.d.ts +4510 -0
  186. package/dist/src/i18n/catalogs/en/action.d.ts +14 -0
  187. package/dist/src/i18n/catalogs/en/alarm.d.ts +79 -0
  188. package/dist/src/i18n/catalogs/en/api-error.d.ts +261 -0
  189. package/dist/src/i18n/catalogs/en/audit.d.ts +133 -0
  190. package/dist/src/i18n/catalogs/en/automation-editor.d.ts +220 -0
  191. package/dist/src/i18n/catalogs/en/automation-language.d.ts +249 -0
  192. package/dist/src/i18n/catalogs/en/automation.d.ts +59 -0
  193. package/dist/src/i18n/catalogs/en/brand.d.ts +4 -0
  194. package/dist/src/i18n/catalogs/en/cold-room.d.ts +26 -0
  195. package/dist/src/i18n/catalogs/en/copyable.d.ts +6 -0
  196. package/dist/src/i18n/catalogs/en/dashboard.d.ts +92 -0
  197. package/dist/src/i18n/catalogs/en/device-preset.d.ts +71 -0
  198. package/dist/src/i18n/catalogs/en/document.d.ts +52 -0
  199. package/dist/src/i18n/catalogs/en/edge-program-language.d.ts +165 -0
  200. package/dist/src/i18n/catalogs/en/edge-program.d.ts +238 -0
  201. package/dist/src/i18n/catalogs/en/endpoint.d.ts +112 -0
  202. package/dist/src/i18n/catalogs/en/error.d.ts +34 -0
  203. package/dist/src/i18n/catalogs/en/fleet.d.ts +247 -0
  204. package/dist/src/i18n/catalogs/en/formula.d.ts +35 -0
  205. package/dist/src/i18n/catalogs/en/graphics.d.ts +417 -0
  206. package/dist/src/i18n/catalogs/en/language.d.ts +10 -0
  207. package/dist/src/i18n/catalogs/en/messages.d.ts +19 -0
  208. package/dist/src/i18n/catalogs/en/parameter.d.ts +373 -0
  209. package/dist/src/i18n/catalogs/en/pull.d.ts +11 -0
  210. package/dist/src/i18n/catalogs/en/report.d.ts +377 -0
  211. package/dist/src/i18n/catalogs/en/setup.d.ts +65 -0
  212. package/dist/src/i18n/catalogs/en/starter.d.ts +38 -0
  213. package/dist/src/i18n/catalogs/en/storage.d.ts +124 -0
  214. package/dist/src/i18n/catalogs/en/symbols-hvac.d.ts +142 -0
  215. package/dist/src/i18n/catalogs/en/symbols-power.d.ts +122 -0
  216. package/dist/src/i18n/catalogs/en/symbols-quarry.d.ts +81 -0
  217. package/dist/src/i18n/catalogs/en/symbols.d.ts +676 -0
  218. package/dist/src/i18n/catalogs/en/theme.d.ts +4 -0
  219. package/dist/src/i18n/catalogs/en/ui.d.ts +37 -0
  220. package/dist/src/i18n/catalogs/en/workspace.d.ts +19 -0
  221. package/dist/src/i18n/catalogs/en.d.ts +4510 -0
  222. package/dist/src/i18n/catalogs/pl/action.d.ts +14 -0
  223. package/dist/src/i18n/catalogs/pl/alarm.d.ts +79 -0
  224. package/dist/src/i18n/catalogs/pl/api-error.d.ts +261 -0
  225. package/dist/src/i18n/catalogs/pl/audit.d.ts +133 -0
  226. package/dist/src/i18n/catalogs/pl/automation-editor.d.ts +220 -0
  227. package/dist/src/i18n/catalogs/pl/automation-language.d.ts +249 -0
  228. package/dist/src/i18n/catalogs/pl/automation.d.ts +59 -0
  229. package/dist/src/i18n/catalogs/pl/brand.d.ts +4 -0
  230. package/dist/src/i18n/catalogs/pl/cold-room.d.ts +26 -0
  231. package/dist/src/i18n/catalogs/pl/copyable.d.ts +6 -0
  232. package/dist/src/i18n/catalogs/pl/dashboard.d.ts +92 -0
  233. package/dist/src/i18n/catalogs/pl/device-preset.d.ts +71 -0
  234. package/dist/src/i18n/catalogs/pl/document.d.ts +52 -0
  235. package/dist/src/i18n/catalogs/pl/edge-program-language.d.ts +165 -0
  236. package/dist/src/i18n/catalogs/pl/edge-program.d.ts +238 -0
  237. package/dist/src/i18n/catalogs/pl/endpoint.d.ts +112 -0
  238. package/dist/src/i18n/catalogs/pl/error.d.ts +34 -0
  239. package/dist/src/i18n/catalogs/pl/fleet.d.ts +247 -0
  240. package/dist/src/i18n/catalogs/pl/formula.d.ts +35 -0
  241. package/dist/src/i18n/catalogs/pl/graphics.d.ts +417 -0
  242. package/dist/src/i18n/catalogs/pl/language.d.ts +10 -0
  243. package/dist/src/i18n/catalogs/pl/messages.d.ts +19 -0
  244. package/dist/src/i18n/catalogs/pl/parameter.d.ts +373 -0
  245. package/dist/src/i18n/catalogs/pl/pull.d.ts +11 -0
  246. package/dist/src/i18n/catalogs/pl/report.d.ts +377 -0
  247. package/dist/src/i18n/catalogs/pl/setup.d.ts +65 -0
  248. package/dist/src/i18n/catalogs/pl/starter.d.ts +38 -0
  249. package/dist/src/i18n/catalogs/pl/storage.d.ts +124 -0
  250. package/dist/src/i18n/catalogs/pl/symbols-hvac.d.ts +142 -0
  251. package/dist/src/i18n/catalogs/pl/symbols-power.d.ts +122 -0
  252. package/dist/src/i18n/catalogs/pl/symbols-quarry.d.ts +81 -0
  253. package/dist/src/i18n/catalogs/pl/symbols.d.ts +676 -0
  254. package/dist/src/i18n/catalogs/pl/theme.d.ts +4 -0
  255. package/dist/src/i18n/catalogs/pl/ui.d.ts +37 -0
  256. package/dist/src/i18n/catalogs/pl/workspace.d.ts +19 -0
  257. package/dist/src/i18n/catalogs/pl.d.ts +4510 -0
  258. package/dist/src/i18n/catalogs/ru/action.d.ts +14 -0
  259. package/dist/src/i18n/catalogs/ru/alarm.d.ts +79 -0
  260. package/dist/src/i18n/catalogs/ru/api-error.d.ts +261 -0
  261. package/dist/src/i18n/catalogs/ru/audit.d.ts +133 -0
  262. package/dist/src/i18n/catalogs/ru/automation-editor.d.ts +220 -0
  263. package/dist/src/i18n/catalogs/ru/automation-language.d.ts +249 -0
  264. package/dist/src/i18n/catalogs/ru/automation.d.ts +59 -0
  265. package/dist/src/i18n/catalogs/ru/brand.d.ts +4 -0
  266. package/dist/src/i18n/catalogs/ru/cold-room.d.ts +26 -0
  267. package/dist/src/i18n/catalogs/ru/copyable.d.ts +6 -0
  268. package/dist/src/i18n/catalogs/ru/dashboard.d.ts +92 -0
  269. package/dist/src/i18n/catalogs/ru/device-preset.d.ts +71 -0
  270. package/dist/src/i18n/catalogs/ru/document.d.ts +52 -0
  271. package/dist/src/i18n/catalogs/ru/edge-program-language.d.ts +165 -0
  272. package/dist/src/i18n/catalogs/ru/edge-program.d.ts +238 -0
  273. package/dist/src/i18n/catalogs/ru/endpoint.d.ts +112 -0
  274. package/dist/src/i18n/catalogs/ru/error.d.ts +34 -0
  275. package/dist/src/i18n/catalogs/ru/fleet.d.ts +247 -0
  276. package/dist/src/i18n/catalogs/ru/formula.d.ts +35 -0
  277. package/dist/src/i18n/catalogs/ru/graphics.d.ts +417 -0
  278. package/dist/src/i18n/catalogs/ru/language.d.ts +10 -0
  279. package/dist/src/i18n/catalogs/ru/messages.d.ts +19 -0
  280. package/dist/src/i18n/catalogs/ru/parameter.d.ts +373 -0
  281. package/dist/src/i18n/catalogs/ru/pull.d.ts +11 -0
  282. package/dist/src/i18n/catalogs/ru/report.d.ts +377 -0
  283. package/dist/src/i18n/catalogs/ru/setup.d.ts +65 -0
  284. package/dist/src/i18n/catalogs/ru/starter.d.ts +38 -0
  285. package/dist/src/i18n/catalogs/ru/storage.d.ts +124 -0
  286. package/dist/src/i18n/catalogs/ru/symbols-hvac.d.ts +142 -0
  287. package/dist/src/i18n/catalogs/ru/symbols-power.d.ts +122 -0
  288. package/dist/src/i18n/catalogs/ru/symbols-quarry.d.ts +81 -0
  289. package/dist/src/i18n/catalogs/ru/symbols.d.ts +676 -0
  290. package/dist/src/i18n/catalogs/ru/theme.d.ts +4 -0
  291. package/dist/src/i18n/catalogs/ru/ui.d.ts +37 -0
  292. package/dist/src/i18n/catalogs/ru/workspace.d.ts +19 -0
  293. package/dist/src/i18n/catalogs/ru.d.ts +4510 -0
  294. package/dist/src/i18n/catalogs/uk/action.d.ts +14 -0
  295. package/dist/src/i18n/catalogs/uk/alarm.d.ts +79 -0
  296. package/dist/src/i18n/catalogs/uk/api-error.d.ts +261 -0
  297. package/dist/src/i18n/catalogs/uk/audit.d.ts +133 -0
  298. package/dist/src/i18n/catalogs/uk/automation-editor.d.ts +220 -0
  299. package/dist/src/i18n/catalogs/uk/automation-language.d.ts +249 -0
  300. package/dist/src/i18n/catalogs/uk/automation.d.ts +59 -0
  301. package/dist/src/i18n/catalogs/uk/brand.d.ts +4 -0
  302. package/dist/src/i18n/catalogs/uk/cold-room.d.ts +26 -0
  303. package/dist/src/i18n/catalogs/uk/copyable.d.ts +6 -0
  304. package/dist/src/i18n/catalogs/uk/dashboard.d.ts +92 -0
  305. package/dist/src/i18n/catalogs/uk/device-preset.d.ts +71 -0
  306. package/dist/src/i18n/catalogs/uk/document.d.ts +52 -0
  307. package/dist/src/i18n/catalogs/uk/edge-program-language.d.ts +165 -0
  308. package/dist/src/i18n/catalogs/uk/edge-program.d.ts +238 -0
  309. package/dist/src/i18n/catalogs/uk/endpoint.d.ts +112 -0
  310. package/dist/src/i18n/catalogs/uk/error.d.ts +34 -0
  311. package/dist/src/i18n/catalogs/uk/fleet.d.ts +247 -0
  312. package/dist/src/i18n/catalogs/uk/formula.d.ts +35 -0
  313. package/dist/src/i18n/catalogs/uk/graphics.d.ts +417 -0
  314. package/dist/src/i18n/catalogs/uk/language.d.ts +10 -0
  315. package/dist/src/i18n/catalogs/uk/messages.d.ts +19 -0
  316. package/dist/src/i18n/catalogs/uk/parameter.d.ts +373 -0
  317. package/dist/src/i18n/catalogs/uk/pull.d.ts +11 -0
  318. package/dist/src/i18n/catalogs/uk/report.d.ts +377 -0
  319. package/dist/src/i18n/catalogs/uk/setup.d.ts +65 -0
  320. package/dist/src/i18n/catalogs/uk/starter.d.ts +38 -0
  321. package/dist/src/i18n/catalogs/uk/storage.d.ts +124 -0
  322. package/dist/src/i18n/catalogs/uk/symbols-hvac.d.ts +142 -0
  323. package/dist/src/i18n/catalogs/uk/symbols-power.d.ts +122 -0
  324. package/dist/src/i18n/catalogs/uk/symbols-quarry.d.ts +81 -0
  325. package/dist/src/i18n/catalogs/uk/symbols.d.ts +676 -0
  326. package/dist/src/i18n/catalogs/uk/theme.d.ts +4 -0
  327. package/dist/src/i18n/catalogs/uk/ui.d.ts +37 -0
  328. package/dist/src/i18n/catalogs/uk/workspace.d.ts +19 -0
  329. package/dist/src/i18n/catalogs/uk.d.ts +4510 -0
  330. package/dist/src/i18n/index.d.ts +4 -0
  331. package/dist/src/i18n/locale.d.ts +11 -0
  332. package/dist/src/i18n/messages.d.ts +12 -0
  333. package/dist/src/i18n/use-language-change.d.ts +5 -0
  334. package/dist/src/i18n/use-locale.d.ts +1 -0
  335. package/dist/src/index.d.ts +151 -0
  336. package/dist/src/lib/utils.d.ts +2 -0
  337. package/dist/src/theme-provider.d.ts +16 -0
  338. package/dist/src/trpc.d.ts +37 -0
  339. package/dist/src/ui/accordion.d.ts +6 -0
  340. package/dist/src/ui/alert-dialog.d.ts +20 -0
  341. package/dist/src/ui/alert.d.ts +10 -0
  342. package/dist/src/ui/aspect-ratio.d.ts +6 -0
  343. package/dist/src/ui/attachment.d.ts +23 -0
  344. package/dist/src/ui/avatar.d.ts +11 -0
  345. package/dist/src/ui/badge.d.ts +6 -0
  346. package/dist/src/ui/breadcrumb.d.ts +10 -0
  347. package/dist/src/ui/bubble.d.ts +16 -0
  348. package/dist/src/ui/button-group.d.ts +10 -0
  349. package/dist/src/ui/button.d.ts +8 -0
  350. package/dist/src/ui/calendar.d.ts +10 -0
  351. package/dist/src/ui/card.d.ts +11 -0
  352. package/dist/src/ui/carousel.d.ts +28 -0
  353. package/dist/src/ui/chart.d.ts +60 -0
  354. package/dist/src/ui/checkbox.d.ts +3 -0
  355. package/dist/src/ui/collapsible.d.ts +5 -0
  356. package/dist/src/ui/combobox.d.ts +24 -0
  357. package/dist/src/ui/command.d.ts +19 -0
  358. package/dist/src/ui/content-overlay/dismiss.d.ts +10 -0
  359. package/dist/src/ui/content-overlay/region.d.ts +37 -0
  360. package/dist/src/ui/content-overlay/root.d.ts +3 -0
  361. package/dist/src/ui/content-overlay/tab-wrap.d.ts +6 -0
  362. package/dist/src/ui/context-menu.d.ts +28 -0
  363. package/dist/src/ui/data-table.d.ts +38 -0
  364. package/dist/src/ui/date-time-picker.d.ts +30 -0
  365. package/dist/src/ui/dialog.d.ts +19 -0
  366. package/dist/src/ui/direction.d.ts +3 -0
  367. package/dist/src/ui/drawer.d.ts +18 -0
  368. package/dist/src/ui/dropdown-menu.d.ts +29 -0
  369. package/dist/src/ui/empty.d.ts +11 -0
  370. package/dist/src/ui/field.d.ts +24 -0
  371. package/dist/src/ui/gauge-bar.d.ts +43 -0
  372. package/dist/src/ui/gauge.d.ts +24 -0
  373. package/dist/src/ui/hover-card.d.ts +5 -0
  374. package/dist/src/ui/input-group.d.ts +18 -0
  375. package/dist/src/ui/input-otp.d.ts +11 -0
  376. package/dist/src/ui/input.d.ts +3 -0
  377. package/dist/src/ui/item.d.ts +22 -0
  378. package/dist/src/ui/kbd.d.ts +3 -0
  379. package/dist/src/ui/label.d.ts +3 -0
  380. package/dist/src/ui/marker.d.ts +10 -0
  381. package/dist/src/ui/menubar.d.ts +28 -0
  382. package/dist/src/ui/message-history/context.d.ts +51 -0
  383. package/dist/src/ui/message-history/emit.d.ts +27 -0
  384. package/dist/src/ui/message-history/legacy-content.d.ts +6 -0
  385. package/dist/src/ui/message-history/legacy.d.ts +7 -0
  386. package/dist/src/ui/message-history/model.d.ts +22 -0
  387. package/dist/src/ui/message-history/panel.d.ts +6 -0
  388. package/dist/src/ui/message-history/store.d.ts +26 -0
  389. package/dist/src/ui/message-history/toast.d.ts +7 -0
  390. package/dist/src/ui/message-scroller.d.ts +20 -0
  391. package/dist/src/ui/message.d.ts +10 -0
  392. package/dist/src/ui/native-select.d.ts +8 -0
  393. package/dist/src/ui/navigation-menu.d.ts +11 -0
  394. package/dist/src/ui/notice-card.d.ts +61 -0
  395. package/dist/src/ui/page-header.d.ts +21 -0
  396. package/dist/src/ui/page-title.d.ts +5 -0
  397. package/dist/src/ui/pagination.d.ts +17 -0
  398. package/dist/src/ui/popover.d.ts +9 -0
  399. package/dist/src/ui/progress.d.ts +7 -0
  400. package/dist/src/ui/questionnaire.d.ts +19 -0
  401. package/dist/src/ui/radio-group.d.ts +5 -0
  402. package/dist/src/ui/resizable.d.ts +7 -0
  403. package/dist/src/ui/scroll-area.d.ts +5 -0
  404. package/dist/src/ui/select.d.ts +11 -0
  405. package/dist/src/ui/separator.d.ts +3 -0
  406. package/dist/src/ui/sheet.d.ts +14 -0
  407. package/dist/src/ui/sidebar.d.ts +63 -0
  408. package/dist/src/ui/skeleton.d.ts +7 -0
  409. package/dist/src/ui/slider.d.ts +3 -0
  410. package/dist/src/ui/sonner.d.ts +9 -0
  411. package/dist/src/ui/sparkline.d.ts +31 -0
  412. package/dist/src/ui/spinner.d.ts +2 -0
  413. package/dist/src/ui/svg-diagram/dom.d.ts +6 -0
  414. package/dist/src/ui/svg-diagram/types.d.ts +13 -0
  415. package/dist/src/ui/svg-diagram.d.ts +8 -0
  416. package/dist/src/ui/switch.d.ts +5 -0
  417. package/dist/src/ui/table.d.ts +10 -0
  418. package/dist/src/ui/tabs.d.ts +11 -0
  419. package/dist/src/ui/textarea.d.ts +3 -0
  420. package/dist/src/ui/theme-scope.d.ts +11 -0
  421. package/dist/src/ui/toggle-group.d.ts +11 -0
  422. package/dist/src/ui/toggle.d.ts +8 -0
  423. package/dist/src/ui/tooltip.d.ts +6 -0
  424. package/dist/src/version.d.ts +2 -0
  425. package/dist/src/workspace/access-label.d.ts +2 -0
  426. package/dist/src/workspace/alarms/actions.d.ts +19 -0
  427. package/dist/src/workspace/alarms/alarm-list.d.ts +65 -0
  428. package/dist/src/workspace/alarms/history.d.ts +17 -0
  429. package/dist/src/workspace/alarms/model.d.ts +29 -0
  430. package/dist/src/workspace/alarms/nav.d.ts +15 -0
  431. package/dist/src/workspace/alarms/page.d.ts +10 -0
  432. package/dist/src/workspace/alarms/provider.d.ts +30 -0
  433. package/dist/src/workspace/alarms/search.d.ts +8 -0
  434. package/dist/src/workspace/alarms/sound.d.ts +9 -0
  435. package/dist/src/workspace/automations/diagnostic-text.d.ts +6 -0
  436. package/dist/src/workspace/automations/editor-language.d.ts +13 -0
  437. package/dist/src/workspace/automations/item-descriptions.d.ts +3 -0
  438. package/dist/src/workspace/automations/parameter-names.d.ts +2 -0
  439. package/dist/src/workspace/automations/run-text.d.ts +18 -0
  440. package/dist/src/workspace/automations/trace-view.d.ts +24 -0
  441. package/dist/src/workspace/automations/use-catalog.d.ts +10 -0
  442. package/dist/src/workspace/caches.d.ts +41 -0
  443. package/dist/src/workspace/context.d.ts +71 -0
  444. package/dist/src/workspace/copyable-id.d.ts +4 -0
  445. package/dist/src/workspace/dashboards/actions-menu.d.ts +4 -0
  446. package/dist/src/workspace/dashboards/anchor-scroll.d.ts +11 -0
  447. package/dist/src/workspace/dashboards/bindings.d.ts +26 -0
  448. package/dist/src/workspace/dashboards/configuration-rename-dialog.d.ts +10 -0
  449. package/dist/src/workspace/dashboards/configuration-required.d.ts +10 -0
  450. package/dist/src/workspace/dashboards/configuration-update-queue.d.ts +2 -0
  451. package/dist/src/workspace/dashboards/copy-dialog.d.ts +7 -0
  452. package/dist/src/workspace/dashboards/document/blocks.d.ts +42 -0
  453. package/dist/src/workspace/dashboards/document/chart-data.d.ts +13 -0
  454. package/dist/src/workspace/dashboards/document/chart.d.ts +10 -0
  455. package/dist/src/workspace/dashboards/document/layout.d.ts +29 -0
  456. package/dist/src/workspace/dashboards/document/markdown.d.ts +7 -0
  457. package/dist/src/workspace/dashboards/document/sources.d.ts +32 -0
  458. package/dist/src/workspace/dashboards/document/tiles/chart.d.ts +23 -0
  459. package/dist/src/workspace/dashboards/document/tiles/context.d.ts +23 -0
  460. package/dist/src/workspace/dashboards/document/tiles/controls.d.ts +23 -0
  461. package/dist/src/workspace/dashboards/document/tiles/frame.d.ts +28 -0
  462. package/dist/src/workspace/dashboards/document/tiles/gauge-model.d.ts +4 -0
  463. package/dist/src/workspace/dashboards/document/tiles/gauge.d.ts +11 -0
  464. package/dist/src/workspace/dashboards/document/tiles/presentation.d.ts +29 -0
  465. package/dist/src/workspace/dashboards/document/tiles/reading.d.ts +14 -0
  466. package/dist/src/workspace/dashboards/document/tiles/sparkline.d.ts +7 -0
  467. package/dist/src/workspace/dashboards/document/tiles/tile.d.ts +8 -0
  468. package/dist/src/workspace/dashboards/document/tiles/tones.d.ts +44 -0
  469. package/dist/src/workspace/dashboards/document/tiles/use-tile-tone.d.ts +19 -0
  470. package/dist/src/workspace/dashboards/document/tiles/value.d.ts +8 -0
  471. package/dist/src/workspace/dashboards/document/view.d.ts +16 -0
  472. package/dist/src/workspace/dashboards/enabled-switch.d.ts +10 -0
  473. package/dist/src/workspace/dashboards/entrypoint.d.ts +15 -0
  474. package/dist/src/workspace/dashboards/icon.d.ts +6 -0
  475. package/dist/src/workspace/dashboards/load-module.d.ts +40 -0
  476. package/dist/src/workspace/dashboards/locale.d.ts +8 -0
  477. package/dist/src/workspace/dashboards/module-cache.d.ts +9 -0
  478. package/dist/src/workspace/dashboards/mount-diagnostics.d.ts +23 -0
  479. package/dist/src/workspace/dashboards/mount.d.ts +39 -0
  480. package/dist/src/workspace/dashboards/name.d.ts +11 -0
  481. package/dist/src/workspace/dashboards/navigation.d.ts +51 -0
  482. package/dist/src/workspace/dashboards/page-paths.d.ts +7 -0
  483. package/dist/src/workspace/dashboards/page-tabs.d.ts +23 -0
  484. package/dist/src/workspace/dashboards/page.d.ts +4 -0
  485. package/dist/src/workspace/dashboards/rotation.d.ts +26 -0
  486. package/dist/src/workspace/dashboards/search-params.d.ts +7 -0
  487. package/dist/src/workspace/dashboards/sortable-grid.d.ts +79 -0
  488. package/dist/src/workspace/dashboards/stylesheet.d.ts +9 -0
  489. package/dist/src/workspace/dashboards/use-configuration-mutation.d.ts +40 -0
  490. package/dist/src/workspace/device-api/errors.d.ts +6 -0
  491. package/dist/src/workspace/device-api/use-device-api.d.ts +75 -0
  492. package/dist/src/workspace/device-presets/cold-room-card.d.ts +17 -0
  493. package/dist/src/workspace/device-presets/cold-room-commands.d.ts +19 -0
  494. package/dist/src/workspace/device-presets/cold-room-labels.d.ts +5 -0
  495. package/dist/src/workspace/device-presets/cold-room-model.d.ts +141 -0
  496. package/dist/src/workspace/device-presets/command-button.d.ts +34 -0
  497. package/dist/src/workspace/device-presets/endpoint-unavailable.d.ts +15 -0
  498. package/dist/src/workspace/device-presets/gauge-scale.d.ts +23 -0
  499. package/dist/src/workspace/device-presets/gauges.d.ts +52 -0
  500. package/dist/src/workspace/device-presets/header.d.ts +14 -0
  501. package/dist/src/workspace/device-presets/layout.d.ts +52 -0
  502. package/dist/src/workspace/device-presets/overview.d.ts +103 -0
  503. package/dist/src/workspace/device-presets/quantity.d.ts +5 -0
  504. package/dist/src/workspace/device-presets/relay-test-panel.d.ts +37 -0
  505. package/dist/src/workspace/device-presets/relay-test.d.ts +164 -0
  506. package/dist/src/workspace/device-presets/series-colors.d.ts +58 -0
  507. package/dist/src/workspace/device-presets/settings-choice.d.ts +20 -0
  508. package/dist/src/workspace/device-presets/settings-fields.d.ts +39 -0
  509. package/dist/src/workspace/device-presets/settings-form.d.ts +35 -0
  510. package/dist/src/workspace/device-presets/settings-page.d.ts +29 -0
  511. package/dist/src/workspace/device-presets/settings-rows.d.ts +25 -0
  512. package/dist/src/workspace/device-presets/settings-section.d.ts +78 -0
  513. package/dist/src/workspace/device-presets/settings-text.d.ts +5 -0
  514. package/dist/src/workspace/device-presets/settings-types.d.ts +122 -0
  515. package/dist/src/workspace/device-presets/settings-write-dialog.d.ts +27 -0
  516. package/dist/src/workspace/device-presets/settings-write.d.ts +73 -0
  517. package/dist/src/workspace/device-presets/state-text.d.ts +17 -0
  518. package/dist/src/workspace/device-presets/trend-chart.d.ts +51 -0
  519. package/dist/src/workspace/device-presets/trend-model.d.ts +45 -0
  520. package/dist/src/workspace/device-presets/unsupported.d.ts +14 -0
  521. package/dist/src/workspace/device-presets/values.d.ts +56 -0
  522. package/dist/src/workspace/edge-programs/deploy-status.d.ts +12 -0
  523. package/dist/src/workspace/edge-programs/diagnostic-text.d.ts +9 -0
  524. package/dist/src/workspace/edge-programs/editor-language.d.ts +15 -0
  525. package/dist/src/workspace/edge-programs/item-descriptions.d.ts +3 -0
  526. package/dist/src/workspace/edge-programs/live-state.d.ts +12 -0
  527. package/dist/src/workspace/endpoint-status/provider.d.ts +16 -0
  528. package/dist/src/workspace/endpoint-status/store.d.ts +18 -0
  529. package/dist/src/workspace/errors.d.ts +1 -0
  530. package/dist/src/workspace/fleet/alarms.d.ts +27 -0
  531. package/dist/src/workspace/fleet/binding-editor.d.ts +65 -0
  532. package/dist/src/workspace/fleet/board-editor.d.ts +118 -0
  533. package/dist/src/workspace/fleet/command-buttons.d.ts +19 -0
  534. package/dist/src/workspace/fleet/command-entry.d.ts +25 -0
  535. package/dist/src/workspace/fleet/command-steps.d.ts +65 -0
  536. package/dist/src/workspace/fleet/control-mode.d.ts +30 -0
  537. package/dist/src/workspace/fleet/counter-bars.d.ts +109 -0
  538. package/dist/src/workspace/fleet/counter-notices.d.ts +23 -0
  539. package/dist/src/workspace/fleet/counter-period.d.ts +35 -0
  540. package/dist/src/workspace/fleet/counter-shares.d.ts +34 -0
  541. package/dist/src/workspace/fleet/counter-total.d.ts +43 -0
  542. package/dist/src/workspace/fleet/counter-totals.d.ts +77 -0
  543. package/dist/src/workspace/fleet/due-dates.d.ts +18 -0
  544. package/dist/src/workspace/fleet/duplicate-dialog.d.ts +63 -0
  545. package/dist/src/workspace/fleet/editor-dialog.d.ts +26 -0
  546. package/dist/src/workspace/fleet/equipment-setup.d.ts +44 -0
  547. package/dist/src/workspace/fleet/equipment-view.d.ts +31 -0
  548. package/dist/src/workspace/fleet/figure.d.ts +18 -0
  549. package/dist/src/workspace/fleet/form-types.d.ts +15 -0
  550. package/dist/src/workspace/fleet/group-command-dialogs.d.ts +43 -0
  551. package/dist/src/workspace/fleet/group-command.d.ts +83 -0
  552. package/dist/src/workspace/fleet/indicator-lights.d.ts +23 -0
  553. package/dist/src/workspace/fleet/map.d.ts +41 -0
  554. package/dist/src/workspace/fleet/mode-badge.d.ts +7 -0
  555. package/dist/src/workspace/fleet/operations.d.ts +23 -0
  556. package/dist/src/workspace/fleet/order-editor.d.ts +13 -0
  557. package/dist/src/workspace/fleet/overview-model.d.ts +43 -0
  558. package/dist/src/workspace/fleet/overview.d.ts +93 -0
  559. package/dist/src/workspace/fleet/page-header.d.ts +27 -0
  560. package/dist/src/workspace/fleet/parameters.d.ts +65 -0
  561. package/dist/src/workspace/fleet/period-settings.d.ts +66 -0
  562. package/dist/src/workspace/fleet/placement-fields.d.ts +104 -0
  563. package/dist/src/workspace/fleet/position.d.ts +13 -0
  564. package/dist/src/workspace/fleet/readings.d.ts +64 -0
  565. package/dist/src/workspace/fleet/section.d.ts +7 -0
  566. package/dist/src/workspace/fleet/site-page.d.ts +150 -0
  567. package/dist/src/workspace/fleet/slot-fields.d.ts +53 -0
  568. package/dist/src/workspace/fleet/starter-fields.d.ts +63 -0
  569. package/dist/src/workspace/fleet/status-badge.d.ts +23 -0
  570. package/dist/src/workspace/fleet/status.d.ts +85 -0
  571. package/dist/src/workspace/formulas/diagnostic-text.d.ts +7 -0
  572. package/dist/src/workspace/graphics/actions/details.d.ts +49 -0
  573. package/dist/src/workspace/graphics/actions/dialog.d.ts +12 -0
  574. package/dist/src/workspace/graphics/actions/selection.d.ts +1352 -0
  575. package/dist/src/workspace/graphics/binding-value.d.ts +19 -0
  576. package/dist/src/workspace/graphics/bindings.d.ts +847 -0
  577. package/dist/src/workspace/graphics/canvas.d.ts +47 -0
  578. package/dist/src/workspace/graphics/commands/fields.d.ts +7 -0
  579. package/dist/src/workspace/graphics/commands/model.d.ts +10 -0
  580. package/dist/src/workspace/graphics/commands/provider.d.ts +285 -0
  581. package/dist/src/workspace/graphics/dashboard-graphics.d.ts +12 -0
  582. package/dist/src/workspace/graphics/editor-session.d.ts +47 -0
  583. package/dist/src/workspace/graphics/framing.d.ts +28 -0
  584. package/dist/src/workspace/graphics/generated-drawing.d.ts +47 -0
  585. package/dist/src/workspace/graphics/geometry.d.ts +41 -0
  586. package/dist/src/workspace/graphics/image-cache.d.ts +18 -0
  587. package/dist/src/workspace/graphics/image-dialog.d.ts +5 -0
  588. package/dist/src/workspace/graphics/image-picker.d.ts +5 -0
  589. package/dist/src/workspace/graphics/inspector/bindings.d.ts +17 -0
  590. package/dist/src/workspace/graphics/inspector/element.d.ts +10 -0
  591. package/dist/src/workspace/graphics/inspector/fields.d.ts +69 -0
  592. package/dist/src/workspace/graphics/inspector/item.d.ts +862 -0
  593. package/dist/src/workspace/graphics/inspector/multi.d.ts +10 -0
  594. package/dist/src/workspace/graphics/inspector/panel.d.ts +27 -0
  595. package/dist/src/workspace/graphics/inspector/ports.d.ts +2 -0
  596. package/dist/src/workspace/graphics/inspector/section.d.ts +14 -0
  597. package/dist/src/workspace/graphics/inspector/slots.d.ts +7 -0
  598. package/dist/src/workspace/graphics/inspector/symbol.d.ts +11 -0
  599. package/dist/src/workspace/graphics/line-geometry.d.ts +26 -0
  600. package/dist/src/workspace/graphics/lines.d.ts +14 -0
  601. package/dist/src/workspace/graphics/node-memo.d.ts +3 -0
  602. package/dist/src/workspace/graphics/node.d.ts +3 -0
  603. package/dist/src/workspace/graphics/placement.d.ts +23 -0
  604. package/dist/src/workspace/graphics/quality-indicator.d.ts +6 -0
  605. package/dist/src/workspace/graphics/resize-handles.d.ts +8 -0
  606. package/dist/src/workspace/graphics/source-picker.d.ts +35 -0
  607. package/dist/src/workspace/graphics/symbol-issues.d.ts +26 -0
  608. package/dist/src/workspace/graphics/symbols/agriculture/fertigation.d.ts +1 -0
  609. package/dist/src/workspace/graphics/symbols/agriculture/index.d.ts +2 -0
  610. package/dist/src/workspace/graphics/symbols/agriculture/soil-sensor.d.ts +1 -0
  611. package/dist/src/workspace/graphics/symbols/agriculture/soil.d.ts +9 -0
  612. package/dist/src/workspace/graphics/symbols/agriculture/sprinkler.d.ts +1 -0
  613. package/dist/src/workspace/graphics/symbols/agriculture/zone.d.ts +1 -0
  614. package/dist/src/workspace/graphics/symbols/bindings.d.ts +34 -0
  615. package/dist/src/workspace/graphics/symbols/browser.d.ts +28 -0
  616. package/dist/src/workspace/graphics/symbols/builtins.d.ts +2 -0
  617. package/dist/src/workspace/graphics/symbols/button.d.ts +2 -0
  618. package/dist/src/workspace/graphics/symbols/catalog.d.ts +41 -0
  619. package/dist/src/workspace/graphics/symbols/compressed-air/compressor.d.ts +1 -0
  620. package/dist/src/workspace/graphics/symbols/compressed-air/drain.d.ts +15 -0
  621. package/dist/src/workspace/graphics/symbols/compressed-air/index.d.ts +1 -0
  622. package/dist/src/workspace/graphics/symbols/compressed-air/receiver.d.ts +1 -0
  623. package/dist/src/workspace/graphics/symbols/compressed-air/treatment.d.ts +2 -0
  624. package/dist/src/workspace/graphics/symbols/definition.d.ts +115 -0
  625. package/dist/src/workspace/graphics/symbols/electrical/breaker.d.ts +2 -0
  626. package/dist/src/workspace/graphics/symbols/electrical/compensation.d.ts +1 -0
  627. package/dist/src/workspace/graphics/symbols/electrical/index.d.ts +5 -0
  628. package/dist/src/workspace/graphics/symbols/electrical/loads.d.ts +3 -0
  629. package/dist/src/workspace/graphics/symbols/electrical/machines.d.ts +3 -0
  630. package/dist/src/workspace/graphics/symbols/electrical/metering.d.ts +8 -0
  631. package/dist/src/workspace/graphics/symbols/electrical/presentation.d.ts +132 -0
  632. package/dist/src/workspace/graphics/symbols/electrical/renewables.d.ts +2 -0
  633. package/dist/src/workspace/graphics/symbols/electrical/storage.d.ts +2 -0
  634. package/dist/src/workspace/graphics/symbols/electrical/supply.d.ts +2 -0
  635. package/dist/src/workspace/graphics/symbols/electrical/switchgear.d.ts +61 -0
  636. package/dist/src/workspace/graphics/symbols/food/filling.d.ts +1 -0
  637. package/dist/src/workspace/graphics/symbols/food/index.d.ts +1 -0
  638. package/dist/src/workspace/graphics/symbols/food/vessel.d.ts +1 -0
  639. package/dist/src/workspace/graphics/symbols/fuel-gas/gas-detector.d.ts +1 -0
  640. package/dist/src/workspace/graphics/symbols/fuel-gas/index.d.ts +1 -0
  641. package/dist/src/workspace/graphics/symbols/handles.d.ts +6 -0
  642. package/dist/src/workspace/graphics/symbols/hvac/air-handling.d.ts +4 -0
  643. package/dist/src/workspace/graphics/symbols/hvac/air-section.d.ts +60 -0
  644. package/dist/src/workspace/graphics/symbols/hvac/air-terminals.d.ts +2 -0
  645. package/dist/src/workspace/graphics/symbols/hvac/air-treatment.d.ts +2 -0
  646. package/dist/src/workspace/graphics/symbols/hvac/circuit.d.ts +45 -0
  647. package/dist/src/workspace/graphics/symbols/hvac/cooling-plant.d.ts +2 -0
  648. package/dist/src/workspace/graphics/symbols/hvac/firing.d.ts +2 -0
  649. package/dist/src/workspace/graphics/symbols/hvac/hydronic.d.ts +5 -0
  650. package/dist/src/workspace/graphics/symbols/hvac/index.d.ts +2 -0
  651. package/dist/src/workspace/graphics/symbols/hvac/instruments.d.ts +5 -0
  652. package/dist/src/workspace/graphics/symbols/hvac/presentation.d.ts +162 -0
  653. package/dist/src/workspace/graphics/symbols/manufacturing/actuators.d.ts +20 -0
  654. package/dist/src/workspace/graphics/symbols/manufacturing/conveyor.d.ts +26 -0
  655. package/dist/src/workspace/graphics/symbols/manufacturing/index.d.ts +3 -0
  656. package/dist/src/workspace/graphics/symbols/manufacturing/indicators.d.ts +2 -0
  657. package/dist/src/workspace/graphics/symbols/manufacturing/stations.d.ts +3 -0
  658. package/dist/src/workspace/graphics/symbols/ports.d.ts +12 -0
  659. package/dist/src/workspace/graphics/symbols/preferences.d.ts +27 -0
  660. package/dist/src/workspace/graphics/symbols/preview.d.ts +8 -0
  661. package/dist/src/workspace/graphics/symbols/properties.d.ts +46 -0
  662. package/dist/src/workspace/graphics/symbols/provider.d.ts +12 -0
  663. package/dist/src/workspace/graphics/symbols/pump-status-icon.d.ts +5 -0
  664. package/dist/src/workspace/graphics/symbols/pump.d.ts +2 -0
  665. package/dist/src/workspace/graphics/symbols/quality.d.ts +63 -0
  666. package/dist/src/workspace/graphics/symbols/quarry/belt-scale.d.ts +1 -0
  667. package/dist/src/workspace/graphics/symbols/quarry/chute.d.ts +1 -0
  668. package/dist/src/workspace/graphics/symbols/quarry/crusher.d.ts +2 -0
  669. package/dist/src/workspace/graphics/symbols/quarry/diverter-gate.d.ts +2 -0
  670. package/dist/src/workspace/graphics/symbols/quarry/dust-collector.d.ts +1 -0
  671. package/dist/src/workspace/graphics/symbols/quarry/feeder.d.ts +1 -0
  672. package/dist/src/workspace/graphics/symbols/quarry/hopper.d.ts +1 -0
  673. package/dist/src/workspace/graphics/symbols/quarry/index.d.ts +1 -0
  674. package/dist/src/workspace/graphics/symbols/quarry/parts.d.ts +18 -0
  675. package/dist/src/workspace/graphics/symbols/quarry/screen.d.ts +2 -0
  676. package/dist/src/workspace/graphics/symbols/quarry/spray-suppression.d.ts +1 -0
  677. package/dist/src/workspace/graphics/symbols/quarry/stockpile.d.ts +1 -0
  678. package/dist/src/workspace/graphics/symbols/quarry/trommel.d.ts +1 -0
  679. package/dist/src/workspace/graphics/symbols/reading.d.ts +3 -0
  680. package/dist/src/workspace/graphics/symbols/render.d.ts +12 -0
  681. package/dist/src/workspace/graphics/symbols/reservoir.d.ts +2 -0
  682. package/dist/src/workspace/graphics/symbols/serialize.d.ts +7 -0
  683. package/dist/src/workspace/graphics/symbols/status.d.ts +47 -0
  684. package/dist/src/workspace/graphics/symbols/thermal/furnace.d.ts +28 -0
  685. package/dist/src/workspace/graphics/symbols/thermal/heater.d.ts +6 -0
  686. package/dist/src/workspace/graphics/symbols/thermal/index.d.ts +1 -0
  687. package/dist/src/workspace/graphics/symbols/thermal/kiln.d.ts +1 -0
  688. package/dist/src/workspace/graphics/symbols/upright.d.ts +68 -0
  689. package/dist/src/workspace/graphics/symbols/variant-field.d.ts +17 -0
  690. package/dist/src/workspace/graphics/symbols/variants.d.ts +30 -0
  691. package/dist/src/workspace/graphics/symbols/viewport.d.ts +43 -0
  692. package/dist/src/workspace/graphics/symbols/warehouse/agv.d.ts +4 -0
  693. package/dist/src/workspace/graphics/symbols/warehouse/cold-room.d.ts +2 -0
  694. package/dist/src/workspace/graphics/symbols/warehouse/cooling-unit.d.ts +19 -0
  695. package/dist/src/workspace/graphics/symbols/warehouse/door.d.ts +61 -0
  696. package/dist/src/workspace/graphics/symbols/warehouse/index.d.ts +1 -0
  697. package/dist/src/workspace/graphics/symbols/warehouse/loading-dock.d.ts +2 -0
  698. package/dist/src/workspace/graphics/symbols/warehouse/pallet.d.ts +2 -0
  699. package/dist/src/workspace/graphics/symbols/warehouse/rack.d.ts +25 -0
  700. package/dist/src/workspace/graphics/symbols/warehouse/stacker-crane.d.ts +12 -0
  701. package/dist/src/workspace/graphics/symbols/warehouse/storage-zone.d.ts +34 -0
  702. package/dist/src/workspace/graphics/symbols/waste/baler.d.ts +5 -0
  703. package/dist/src/workspace/graphics/symbols/waste/compactor.d.ts +1 -0
  704. package/dist/src/workspace/graphics/symbols/waste/container.d.ts +7 -0
  705. package/dist/src/workspace/graphics/symbols/waste/index.d.ts +2 -0
  706. package/dist/src/workspace/graphics/symbols/waste/parts.d.ts +32 -0
  707. package/dist/src/workspace/graphics/symbols/waste/separator.d.ts +1 -0
  708. package/dist/src/workspace/graphics/symbols/waste/shredder.d.ts +1 -0
  709. package/dist/src/workspace/graphics/symbols/waste/vehicle.d.ts +1 -0
  710. package/dist/src/workspace/graphics/symbols/waste/weighbridge.d.ts +1 -0
  711. package/dist/src/workspace/graphics/symbols/water/aeration.d.ts +8 -0
  712. package/dist/src/workspace/graphics/symbols/water/artwork.d.ts +42 -0
  713. package/dist/src/workspace/graphics/symbols/water/clarifier.d.ts +1 -0
  714. package/dist/src/workspace/graphics/symbols/water/disinfection.d.ts +1 -0
  715. package/dist/src/workspace/graphics/symbols/water/dosing.d.ts +30 -0
  716. package/dist/src/workspace/graphics/symbols/water/filter.d.ts +1 -0
  717. package/dist/src/workspace/graphics/symbols/water/index.d.ts +8 -0
  718. package/dist/src/workspace/graphics/symbols/water/instruments.d.ts +3 -0
  719. package/dist/src/workspace/graphics/symbols/water/pumps.d.ts +7 -0
  720. package/dist/src/workspace/graphics/symbols/water/tank.d.ts +1 -0
  721. package/dist/src/workspace/graphics/symbols/water/treatment-state.d.ts +15 -0
  722. package/dist/src/workspace/graphics/symbols/water/valves.d.ts +8 -0
  723. package/dist/src/workspace/graphics/symbols/well.d.ts +2 -0
  724. package/dist/src/workspace/graphics/toolbar.d.ts +58 -0
  725. package/dist/src/workspace/graphics/use-images.d.ts +13 -0
  726. package/dist/src/workspace/graphics/view-frame.d.ts +31 -0
  727. package/dist/src/workspace/graphics/viewport-passthrough.d.ts +8 -0
  728. package/dist/src/workspace/index-page.d.ts +3 -0
  729. package/dist/src/workspace/layout.d.ts +3 -0
  730. package/dist/src/workspace/live-changes.d.ts +16 -0
  731. package/dist/src/workspace/local-message-identity.d.ts +2 -0
  732. package/dist/src/workspace/local-setup-link.d.ts +16 -0
  733. package/dist/src/workspace/local-workspace-app.d.ts +21 -0
  734. package/dist/src/workspace/maps/auth-failure.d.ts +5 -0
  735. package/dist/src/workspace/maps/error-boundary.d.ts +21 -0
  736. package/dist/src/workspace/maps/lat-lng.d.ts +8 -0
  737. package/dist/src/workspace/maps/location-map-renderer.d.ts +10 -0
  738. package/dist/src/workspace/maps/location-map.d.ts +40 -0
  739. package/dist/src/workspace/maps/location-picker-renderer.d.ts +20 -0
  740. package/dist/src/workspace/maps/location-picker.d.ts +31 -0
  741. package/dist/src/workspace/maps/use-browser-config.d.ts +11 -0
  742. package/dist/src/workspace/maps/use-reverse-geocode.d.ts +15 -0
  743. package/dist/src/workspace/mobile-nav.d.ts +13 -0
  744. package/dist/src/workspace/mutations.d.ts +10634 -0
  745. package/dist/src/workspace/no-access.d.ts +1 -0
  746. package/dist/src/workspace/page-navigation.d.ts +67 -0
  747. package/dist/src/workspace/page-state/branch-path.d.ts +7 -0
  748. package/dist/src/workspace/page-state/context.d.ts +14 -0
  749. package/dist/src/workspace/page-state/dashboard-context.d.ts +37 -0
  750. package/dist/src/workspace/page-state/dashboard.d.ts +65 -0
  751. package/dist/src/workspace/page-state/model.d.ts +48 -0
  752. package/dist/src/workspace/page-state/parameters.d.ts +11 -0
  753. package/dist/src/workspace/page-state/report.d.ts +16 -0
  754. package/dist/src/workspace/page-state/store.d.ts +10 -0
  755. package/dist/src/workspace/parameters/defaults.d.ts +7 -0
  756. package/dist/src/workspace/parameters/display.d.ts +28 -0
  757. package/dist/src/workspace/parameters/distinct-names.d.ts +12 -0
  758. package/dist/src/workspace/parameters/errors.d.ts +15 -0
  759. package/dist/src/workspace/parameters/form/shared-fields.d.ts +49 -0
  760. package/dist/src/workspace/parameters/form/values.d.ts +33 -0
  761. package/dist/src/workspace/parameters/geo-value.d.ts +9 -0
  762. package/dist/src/workspace/parameters/icon.d.ts +8 -0
  763. package/dist/src/workspace/parameters/inventory-options.d.ts +9 -0
  764. package/dist/src/workspace/parameters/live/condition.d.ts +4 -0
  765. package/dist/src/workspace/parameters/live/control-button.d.ts +13 -0
  766. package/dist/src/workspace/parameters/live/controls.d.ts +14 -0
  767. package/dist/src/workspace/parameters/live/coordinator.d.ts +87 -0
  768. package/dist/src/workspace/parameters/live/deadline.d.ts +13 -0
  769. package/dist/src/workspace/parameters/live/diagnostic-copy.d.ts +26 -0
  770. package/dist/src/workspace/parameters/live/diagnostic-links.d.ts +5 -0
  771. package/dist/src/workspace/parameters/live/diagnostics.d.ts +9 -0
  772. package/dist/src/workspace/parameters/live/history-windows.d.ts +53 -0
  773. package/dist/src/workspace/parameters/live/metric.d.ts +29 -0
  774. package/dist/src/workspace/parameters/live/model.d.ts +133 -0
  775. package/dist/src/workspace/parameters/live/provider.d.ts +49 -0
  776. package/dist/src/workspace/parameters/live/read-once.d.ts +13 -0
  777. package/dist/src/workspace/parameters/live/stale-note.d.ts +8 -0
  778. package/dist/src/workspace/parameters/live/use-history.d.ts +30 -0
  779. package/dist/src/workspace/parameters/live/use-stored-history.d.ts +85 -0
  780. package/dist/src/workspace/parameters/live/value-display.d.ts +25 -0
  781. package/dist/src/workspace/parameters/live/value-editor.d.ts +24 -0
  782. package/dist/src/workspace/parameters/live/write-review-dialog.d.ts +41 -0
  783. package/dist/src/workspace/parameters/live/write-review-form.d.ts +18 -0
  784. package/dist/src/workspace/parameters/live/write-sequence-dialog.d.ts +80 -0
  785. package/dist/src/workspace/parameters/metadata.d.ts +37 -0
  786. package/dist/src/workspace/parameters/option-labels.d.ts +14 -0
  787. package/dist/src/workspace/parameters/picker/browser.d.ts +41 -0
  788. package/dist/src/workspace/parameters/picker/model.d.ts +91 -0
  789. package/dist/src/workspace/parameters/picker/picker.d.ts +380 -0
  790. package/dist/src/workspace/parameters/runtime-errors.d.ts +23 -0
  791. package/dist/src/workspace/parameters/source-fields.d.ts +22 -0
  792. package/dist/src/workspace/parameters/value/cells.d.ts +21 -0
  793. package/dist/src/workspace/parameters/value/edit-draft.d.ts +24 -0
  794. package/dist/src/workspace/parameters/value/reads.d.ts +54 -0
  795. package/dist/src/workspace/parameters/value/state.d.ts +96 -0
  796. package/dist/src/workspace/parameters/value/type/datetime-parts.d.ts +12 -0
  797. package/dist/src/workspace/parameters/value/type/fields.d.ts +5 -0
  798. package/dist/src/workspace/parameters/value/type/geo.d.ts +10 -0
  799. package/dist/src/workspace/parameters/value/type/int-repr.d.ts +9 -0
  800. package/dist/src/workspace/parameters/writability.d.ts +26 -0
  801. package/dist/src/workspace/pull-instructions.d.ts +4 -0
  802. package/dist/src/workspace/query-gate.d.ts +40 -0
  803. package/dist/src/workspace/reports/aggregate-fetch.d.ts +25 -0
  804. package/dist/src/workspace/reports/bar-legend.d.ts +12 -0
  805. package/dist/src/workspace/reports/bar-path.d.ts +25 -0
  806. package/dist/src/workspace/reports/cadence-fetch.d.ts +25 -0
  807. package/dist/src/workspace/reports/calendar/demand.d.ts +46 -0
  808. package/dist/src/workspace/reports/calendar/layout.d.ts +98 -0
  809. package/dist/src/workspace/reports/calendar/representation.d.ts +7 -0
  810. package/dist/src/workspace/reports/cell-title.d.ts +11 -0
  811. package/dist/src/workspace/reports/chart/axes.d.ts +17 -0
  812. package/dist/src/workspace/reports/chart/build.d.ts +208 -0
  813. package/dist/src/workspace/reports/chart/caches.d.ts +57 -0
  814. package/dist/src/workspace/reports/chart/colors.d.ts +17 -0
  815. package/dist/src/workspace/reports/chart/comment-gutter.d.ts +44 -0
  816. package/dist/src/workspace/reports/chart/demand.d.ts +50 -0
  817. package/dist/src/workspace/reports/chart/paint.d.ts +17 -0
  818. package/dist/src/workspace/reports/chart/pan-zoom.d.ts +19 -0
  819. package/dist/src/workspace/reports/chart/payload.d.ts +57 -0
  820. package/dist/src/workspace/reports/chart/plot-interactions.d.ts +13 -0
  821. package/dist/src/workspace/reports/chart/plot-tooltip.d.ts +10 -0
  822. package/dist/src/workspace/reports/chart/plot.d.ts +29 -0
  823. package/dist/src/workspace/reports/chart/realtime.d.ts +96 -0
  824. package/dist/src/workspace/reports/chart/representation.d.ts +40 -0
  825. package/dist/src/workspace/reports/chart/tooltip.d.ts +36 -0
  826. package/dist/src/workspace/reports/chart/use-realtime.d.ts +44 -0
  827. package/dist/src/workspace/reports/color/cascade.d.ts +3 -0
  828. package/dist/src/workspace/reports/color/css.d.ts +5 -0
  829. package/dist/src/workspace/reports/color/select.d.ts +11 -0
  830. package/dist/src/workspace/reports/comments/author.d.ts +2 -0
  831. package/dist/src/workspace/reports/comments/errors.d.ts +11 -0
  832. package/dist/src/workspace/reports/comments/footer.d.ts +1 -0
  833. package/dist/src/workspace/reports/comments/use-comments.d.ts +9 -0
  834. package/dist/src/workspace/reports/csv/build.d.ts +29 -0
  835. package/dist/src/workspace/reports/csv/columns.d.ts +18 -0
  836. package/dist/src/workspace/reports/csv/fetch.d.ts +29 -0
  837. package/dist/src/workspace/reports/csv/use-export.d.ts +7 -0
  838. package/dist/src/workspace/reports/data/context.d.ts +79 -0
  839. package/dist/src/workspace/reports/data/extent.d.ts +40 -0
  840. package/dist/src/workspace/reports/data/provider.d.ts +20 -0
  841. package/dist/src/workspace/reports/data/report-caches.d.ts +56 -0
  842. package/dist/src/workspace/reports/data/specs.d.ts +38 -0
  843. package/dist/src/workspace/reports/demand-cache.d.ts +76 -0
  844. package/dist/src/workspace/reports/element-size.d.ts +7 -0
  845. package/dist/src/workspace/reports/generated.d.ts +46 -0
  846. package/dist/src/workspace/reports/histogram/build.d.ts +1 -0
  847. package/dist/src/workspace/reports/histogram/demand.d.ts +26 -0
  848. package/dist/src/workspace/reports/histogram/plot.d.ts +42 -0
  849. package/dist/src/workspace/reports/histogram/representation.d.ts +8 -0
  850. package/dist/src/workspace/reports/histogram/slots.d.ts +19 -0
  851. package/dist/src/workspace/reports/hourly-matrix/demand.d.ts +28 -0
  852. package/dist/src/workspace/reports/hourly-matrix/layout.d.ts +36 -0
  853. package/dist/src/workspace/reports/hourly-matrix/model.d.ts +66 -0
  854. package/dist/src/workspace/reports/hourly-matrix/representation.d.ts +7 -0
  855. package/dist/src/workspace/reports/html/build.d.ts +57 -0
  856. package/dist/src/workspace/reports/html/cache-clone.d.ts +36 -0
  857. package/dist/src/workspace/reports/html/calendar.d.ts +15 -0
  858. package/dist/src/workspace/reports/html/comments.d.ts +13 -0
  859. package/dist/src/workspace/reports/html/css.d.ts +2 -0
  860. package/dist/src/workspace/reports/html/document.d.ts +5 -0
  861. package/dist/src/workspace/reports/html/escape.d.ts +6 -0
  862. package/dist/src/workspace/reports/html/matrix.d.ts +13 -0
  863. package/dist/src/workspace/reports/html/mounted.d.ts +19 -0
  864. package/dist/src/workspace/reports/html/png.d.ts +39 -0
  865. package/dist/src/workspace/reports/html/ready.d.ts +56 -0
  866. package/dist/src/workspace/reports/html/table.d.ts +3 -0
  867. package/dist/src/workspace/reports/html/use-render.d.ts +8 -0
  868. package/dist/src/workspace/reports/html/widgets.d.ts +31 -0
  869. package/dist/src/workspace/reports/page.d.ts +4 -0
  870. package/dist/src/workspace/reports/preset/errors.d.ts +5 -0
  871. package/dist/src/workspace/reports/preset/form-helpers.d.ts +65 -0
  872. package/dist/src/workspace/reports/preset/submit.d.ts +43 -0
  873. package/dist/src/workspace/reports/quick-report.d.ts +17 -0
  874. package/dist/src/workspace/reports/readings-client.d.ts +23 -0
  875. package/dist/src/workspace/reports/runtime-chrome.d.ts +15 -0
  876. package/dist/src/workspace/reports/sankey/demand.d.ts +47 -0
  877. package/dist/src/workspace/reports/sankey/graph.d.ts +28 -0
  878. package/dist/src/workspace/reports/sankey/layout.d.ts +80 -0
  879. package/dist/src/workspace/reports/sankey/representation.d.ts +7 -0
  880. package/dist/src/workspace/reports/sankey/use-caches.d.ts +16 -0
  881. package/dist/src/workspace/reports/session/init.d.ts +9 -0
  882. package/dist/src/workspace/reports/session/storage.d.ts +24 -0
  883. package/dist/src/workspace/reports/state-duration/demand.d.ts +39 -0
  884. package/dist/src/workspace/reports/state-duration/reduce.d.ts +27 -0
  885. package/dist/src/workspace/reports/state-duration/representation.d.ts +7 -0
  886. package/dist/src/workspace/reports/state-duration/use-caches.d.ts +15 -0
  887. package/dist/src/workspace/reports/table/cache-fetch.d.ts +8 -0
  888. package/dist/src/workspace/reports/table/chunk.d.ts +31 -0
  889. package/dist/src/workspace/reports/table/demand.d.ts +83 -0
  890. package/dist/src/workspace/reports/table/fetch.d.ts +42 -0
  891. package/dist/src/workspace/reports/table/format.d.ts +7 -0
  892. package/dist/src/workspace/reports/table/representation.d.ts +10 -0
  893. package/dist/src/workspace/reports/table/rows.d.ts +31 -0
  894. package/dist/src/workspace/reports/table/snapshot.d.ts +40 -0
  895. package/dist/src/workspace/reports/table/totals.d.ts +4 -0
  896. package/dist/src/workspace/reports/time-buckets/build.d.ts +40 -0
  897. package/dist/src/workspace/reports/time-buckets/demand.d.ts +52 -0
  898. package/dist/src/workspace/reports/time-buckets/navigate.d.ts +26 -0
  899. package/dist/src/workspace/reports/time-buckets/plot.d.ts +58 -0
  900. package/dist/src/workspace/reports/time-buckets/representation.d.ts +8 -0
  901. package/dist/src/workspace/reports/time-buckets/slots.d.ts +23 -0
  902. package/dist/src/workspace/reports/time-nav.d.ts +1 -0
  903. package/dist/src/workspace/reports/use-demand-cache.d.ts +29 -0
  904. package/dist/src/workspace/reports/use-quick-report.d.ts +45 -0
  905. package/dist/src/workspace/reports/view.d.ts +6 -0
  906. package/dist/src/workspace/routes.d.ts +23 -0
  907. package/dist/src/workspace/setup/automations/alarm-rule-dialog.d.ts +7 -0
  908. package/dist/src/workspace/setup/automations/alarm-rule-lists.d.ts +61 -0
  909. package/dist/src/workspace/setup/automations/alarm-rules-page.d.ts +4 -0
  910. package/dist/src/workspace/setup/automations/document.d.ts +39 -0
  911. package/dist/src/workspace/setup/automations/dry-run.d.ts +12 -0
  912. package/dist/src/workspace/setup/automations/editor-form.d.ts +22 -0
  913. package/dist/src/workspace/setup/automations/editor-page.d.ts +14 -0
  914. package/dist/src/workspace/setup/automations/editor-tab.d.ts +6 -0
  915. package/dist/src/workspace/setup/automations/entity-controls.d.ts +22 -0
  916. package/dist/src/workspace/setup/automations/history.d.ts +15 -0
  917. package/dist/src/workspace/setup/automations/list-page.d.ts +28 -0
  918. package/dist/src/workspace/setup/automations/starter-dialog.d.ts +10 -0
  919. package/dist/src/workspace/setup/automations/starter-handoff.d.ts +17 -0
  920. package/dist/src/workspace/setup/base-revision.d.ts +64 -0
  921. package/dist/src/workspace/setup/breadcrumbs.d.ts +10 -0
  922. package/dist/src/workspace/setup/catalog-list.d.ts +21 -0
  923. package/dist/src/workspace/setup/dashboards-order.d.ts +10 -0
  924. package/dist/src/workspace/setup/dashboards-page.d.ts +24 -0
  925. package/dist/src/workspace/setup/dashboards-reorder-queue.d.ts +13 -0
  926. package/dist/src/workspace/setup/dashboards-sortable-list.d.ts +6 -0
  927. package/dist/src/workspace/setup/endpoints/connection-error.d.ts +3 -0
  928. package/dist/src/workspace/setup/endpoints/connection-indicator.d.ts +4 -0
  929. package/dist/src/workspace/setup/endpoints/device-log-clock.d.ts +7 -0
  930. package/dist/src/workspace/setup/endpoints/display.d.ts +12 -0
  931. package/dist/src/workspace/setup/endpoints/edit-dialog.d.ts +5 -0
  932. package/dist/src/workspace/setup/endpoints/enabled-switch.d.ts +10 -0
  933. package/dist/src/workspace/setup/endpoints/form-problem.d.ts +5 -0
  934. package/dist/src/workspace/setup/endpoints/page.d.ts +11 -0
  935. package/dist/src/workspace/setup/endpoints/presence-challenge.d.ts +34 -0
  936. package/dist/src/workspace/setup/endpoints/presence-code.d.ts +6 -0
  937. package/dist/src/workspace/setup/endpoints/programs/deploy-status-bar.d.ts +13 -0
  938. package/dist/src/workspace/setup/endpoints/programs/device-log.d.ts +15 -0
  939. package/dist/src/workspace/setup/endpoints/programs/dialogs.d.ts +16 -0
  940. package/dist/src/workspace/setup/endpoints/programs/live-state-pane.d.ts +7 -0
  941. package/dist/src/workspace/setup/endpoints/programs/program-editor.d.ts +79 -0
  942. package/dist/src/workspace/setup/endpoints/programs/programs-tab.d.ts +14 -0
  943. package/dist/src/workspace/setup/endpoints/programs/settings-dialog.d.ts +9 -0
  944. package/dist/src/workspace/setup/endpoints/programs/starter-dialog.d.ts +17 -0
  945. package/dist/src/workspace/setup/endpoints/programs/tasks-table.d.ts +5 -0
  946. package/dist/src/workspace/setup/endpoints/sharing.d.ts +9 -0
  947. package/dist/src/workspace/setup/endpoints/status-connection.d.ts +8 -0
  948. package/dist/src/workspace/setup/endpoints/status-device-ui-progress.d.ts +9 -0
  949. package/dist/src/workspace/setup/endpoints/status-device-ui.d.ts +8 -0
  950. package/dist/src/workspace/setup/endpoints/status-page.d.ts +14 -0
  951. package/dist/src/workspace/setup/endpoints/status-recorded.d.ts +13 -0
  952. package/dist/src/workspace/setup/endpoints/status-tab.d.ts +12 -0
  953. package/dist/src/workspace/setup/endpoints/wireguard-docs.d.ts +11 -0
  954. package/dist/src/workspace/setup/files/errors.d.ts +1 -0
  955. package/dist/src/workspace/setup/files/http.d.ts +21 -0
  956. package/dist/src/workspace/setup/files/page.d.ts +3 -0
  957. package/dist/src/workspace/setup/menu.d.ts +14 -0
  958. package/dist/src/workspace/setup/nav.d.ts +11 -0
  959. package/dist/src/workspace/setup/parameters/dialogs.d.ts +32 -0
  960. package/dist/src/workspace/setup/parameters/edit/create-branch-form.d.ts +10 -0
  961. package/dist/src/workspace/setup/parameters/edit/dialog-body.d.ts +13 -0
  962. package/dist/src/workspace/setup/parameters/edit/form.d.ts +22 -0
  963. package/dist/src/workspace/setup/parameters/page.d.ts +3 -0
  964. package/dist/src/workspace/setup/parameters/recorded.d.ts +14 -0
  965. package/dist/src/workspace/setup/parameters/selection.d.ts +45 -0
  966. package/dist/src/workspace/setup/parameters/stamp-from-template-form.d.ts +10 -0
  967. package/dist/src/workspace/setup/parameters/toolbar.d.ts +32 -0
  968. package/dist/src/workspace/setup/parameters/tree/expand.d.ts +10 -0
  969. package/dist/src/workspace/setup/parameters/tree/model.d.ts +61 -0
  970. package/dist/src/workspace/setup/parameters/tree/rows.d.ts +38 -0
  971. package/dist/src/workspace/setup/parameters/tree/storage.d.ts +13 -0
  972. package/dist/src/workspace/setup/parameters/use-tree-selection.d.ts +21 -0
  973. package/dist/src/workspace/setup/parameters/use-tree-view.d.ts +22 -0
  974. package/dist/src/workspace/setup/report/add-parameters-dialog.d.ts +8 -0
  975. package/dist/src/workspace/setup/report/calendar-editor.d.ts +9 -0
  976. package/dist/src/workspace/setup/report/chart-editor.d.ts +14 -0
  977. package/dist/src/workspace/setup/report/edit/confirm-removal-dialog.d.ts +9 -0
  978. package/dist/src/workspace/setup/report/edit/dialog-body.d.ts +10 -0
  979. package/dist/src/workspace/setup/report/edit/form.d.ts +14 -0
  980. package/dist/src/workspace/setup/report/edit/representations-section.d.ts +11 -0
  981. package/dist/src/workspace/setup/report/edit/sections.d.ts +23 -0
  982. package/dist/src/workspace/setup/report/edit/state.d.ts +29 -0
  983. package/dist/src/workspace/setup/report/foldable-item-card.d.ts +47 -0
  984. package/dist/src/workspace/setup/report/histogram-editor.d.ts +9 -0
  985. package/dist/src/workspace/setup/report/hourly-matrix-editor.d.ts +9 -0
  986. package/dist/src/workspace/setup/report/includes-literal.d.ts +1 -0
  987. package/dist/src/workspace/setup/report/layout-editor.d.ts +6 -0
  988. package/dist/src/workspace/setup/report/number-draft-input.d.ts +23 -0
  989. package/dist/src/workspace/setup/report/page.d.ts +3 -0
  990. package/dist/src/workspace/setup/report/sankey-editor.d.ts +9 -0
  991. package/dist/src/workspace/setup/report/state-duration-editor.d.ts +9 -0
  992. package/dist/src/workspace/setup/report/table-editor.d.ts +9 -0
  993. package/dist/src/workspace/setup/report/time-buckets-editor.d.ts +9 -0
  994. package/dist/src/workspace/setup/route/dialog.d.ts +33 -0
  995. package/dist/src/workspace/setup/route/dialogs.d.ts +41 -0
  996. package/dist/src/workspace/setup/sections.d.ts +17 -0
  997. package/dist/src/workspace/setup/starters/starter-fields.d.ts +45 -0
  998. package/dist/src/workspace/setup/starters/starter-form.d.ts +50 -0
  999. package/dist/src/workspace/setup/storage/dialogs.d.ts +77 -0
  1000. package/dist/src/workspace/setup/storage/format.d.ts +6 -0
  1001. package/dist/src/workspace/setup/storage/page.d.ts +3 -0
  1002. package/dist/src/workspace/setup/storage/retention-note.d.ts +11 -0
  1003. package/dist/src/workspace/setup/storage/retention.d.ts +21 -0
  1004. package/dist/src/workspace/shell.d.ts +21 -0
  1005. package/dist/src/workspace/sidebar-nav-link.d.ts +13 -0
  1006. package/dist/src/workspace/suspended.d.ts +8 -0
  1007. package/dist/starter-fields-BRLX0z-v.js +586 -0
  1008. package/dist/starter-handoff-BA3ucMKL.js +19 -0
  1009. package/dist/status-page-DAHiKM9P.js +3286 -0
  1010. package/dist/styles-reference.css +54 -0
  1011. package/dist/styles.css +2 -0
  1012. package/dist/switch-BqD0RH_G.js +18 -0
  1013. package/dist/table-Q2-voLuw.js +65 -0
  1014. package/dist/tabs-CSIucYFP.js +57 -0
  1015. package/dist/theme-provider-BkRohQFU.js +61 -0
  1016. package/dist/toggle-group-9Bs0Mm3r.js +82 -0
  1017. package/dist/trpc-CvJUuUXp.js +153 -0
  1018. package/dist/ui.js +2174 -0
  1019. package/dist/uk-CwpJAxmx.js +4578 -0
  1020. package/dist/utils-CX-Pz5p6.js +8 -0
  1021. package/dist/wireguard-docs-AfU6NzTL.js +81 -0
  1022. package/dist/writability-BuH-spxv.js +57 -0
  1023. package/package.json +149 -3
@@ -0,0 +1,2408 @@
1
+ import { r as e } from "./trpc-CvJUuUXp.js";
2
+ import { f as t, h as n, m as r, v as i } from "./i18n-BgzakKoC.js";
3
+ import { t as a } from "./utils-CX-Pz5p6.js";
4
+ import { A as o, B as s, D as c, E as l, F as u, H as d, I as f, L as p, M as m, N as h, O as g, P as _, R as v, S as y, Y as b, _ as x, a as ee, c as S, d as C, f as w, g as T, i as te, l as E, n as ne, r as re, y as D, z as O } from "./spinner-C-HPNxOc.js";
5
+ import { t as ie } from "./button-6SxPBYMz.js";
6
+ import { f as k } from "./dialog-BIhQXcZC.js";
7
+ import { n as A, t as j } from "./skeleton-6yk8Tdh5.js";
8
+ import { aggregateParameterValues as M, isCurrentParameterValue as ae, isParameterValuePending as N, noDemandParameterValueState as P, parameterDiagnosticFromResult as F, parameterValueBoolean as oe, parameterValueFlag as se } from "./parameter-values.js";
9
+ import { i as ce } from "./context-u9KJQmdB.js";
10
+ import { n as le, r as ue, t as de } from "./api-error-9rQmUN5L.js";
11
+ import { createContext as fe, createElement as pe, useCallback as I, useContext as me, useEffect as L, useId as he, useMemo as R, useRef as z, useState as B, useSyncExternalStore as ge } from "react";
12
+ import { createFormHook as _e, createFormHookContexts as ve } from "@tanstack/react-form";
13
+ import { Fragment as ye, jsx as V, jsxs as H } from "react/jsx-runtime";
14
+ import { CheckIcon as be, ChevronRightIcon as xe, ChevronsUpDownIcon as Se, SearchIcon as Ce, XIcon as we } from "lucide-react";
15
+ import { REGEXP_ONLY_DIGITS as Te } from "input-otp";
16
+ import { API_INPUT_INVALID_CODE as Ee, formatAppDateTime as De, localizedStringValues as Oe, resolveLocalized as U, searchMatches as ke, searchRelevance as Ae, searchWords as je } from "@overvis/hmi-shared";
17
+ import { defaultKeymap as Me, history as Ne, historyKeymap as Pe } from "@codemirror/commands";
18
+ import { Compartment as Fe, EditorState as Ie, Prec as Le, StateEffect as Re, StateField as ze } from "@codemirror/state";
19
+ import { Decoration as Be, EditorView as W, ViewPlugin as Ve, WidgetType as He, drawSelection as Ue, hoverTooltip as We, keymap as G, placeholder as Ge, showTooltip as Ke } from "@codemirror/view";
20
+ import { acceptCompletion as qe, autocompletion as Je, pickedCompletion as Ye, snippet as Xe, startCompletion as Ze } from "@codemirror/autocomplete";
21
+ import { canWriteParameterValues as Qe } from "@overvis/hmi-shared/workspace";
22
+ //#region src/form/form-contexts.ts
23
+ var { fieldContext: $e, formContext: et, useFieldContext: K, useFormContext: tt } = ve(), q = class {
24
+ read;
25
+ constructor(e) {
26
+ this.read = e;
27
+ }
28
+ };
29
+ //#endregion
30
+ //#region src/form/format-field-errors.ts
31
+ function nt(e) {
32
+ if (!("keyword" in e)) return null;
33
+ let t = Reflect.get(e, "keyword");
34
+ return typeof t == "string" ? t : null;
35
+ }
36
+ function rt(e) {
37
+ if (!("params" in e)) return null;
38
+ let t = Reflect.get(e, "params");
39
+ return typeof t != "object" || !t || Array.isArray(t) ? null : Object.fromEntries(Object.entries(t));
40
+ }
41
+ function it(e, t) {
42
+ if (!e || !(t in e)) return null;
43
+ let n = Reflect.get(e, t);
44
+ return typeof n == "number" && Number.isFinite(n) ? n : null;
45
+ }
46
+ function at(e, t) {
47
+ if (!e || !(t in e)) return null;
48
+ let n = Reflect.get(e, t);
49
+ return typeof n == "string" ? n : null;
50
+ }
51
+ function ot(e) {
52
+ return e.toLowerCase().includes("password");
53
+ }
54
+ function st(e) {
55
+ return e.toLowerCase().includes("email");
56
+ }
57
+ function J(e) {
58
+ return String(e);
59
+ }
60
+ function ct(e, n, r) {
61
+ switch (n) {
62
+ case "minLength": {
63
+ let n = it(r, "limit");
64
+ return n === null ? t("error_field_required") : n <= 1 ? ot(e) ? t("error_password_required") : t("error_field_required") : ot(e) ? t("error_password_too_short", { limit: J(n) }) : st(e) ? t("error_invalid_email") : t("error_field_too_short", { limit: J(n) });
65
+ }
66
+ case "maxLength": {
67
+ let n = it(r, "limit");
68
+ return n === null ? t("error_field_invalid") : ot(e) ? t("error_password_too_long", { limit: J(n) }) : t("error_field_too_long", { limit: J(n) });
69
+ }
70
+ case "minimum":
71
+ case "exclusiveMinimum": {
72
+ let e = it(r, "limit");
73
+ return e === null ? t("error_field_invalid") : t("error_field_min", { limit: J(e) });
74
+ }
75
+ case "maximum":
76
+ case "exclusiveMaximum": {
77
+ let e = it(r, "limit");
78
+ return e === null ? t("error_field_invalid") : t("error_field_max", { limit: J(e) });
79
+ }
80
+ case "format": return at(r, "format") === "email" || st(e) ? t("error_invalid_email") : t("error_field_invalid_format");
81
+ case "pattern": return e === "port" ? t("error_endpoint_port_invalid") : e === "hostname" ? t("error_endpoint_hostname_invalid") : e === "publicKey" ? t("error_endpoint_public_key_invalid") : e === "pinCode" ? t("error_endpoint_pin_invalid") : ["^0*[1-9][0-9]*$", "^(?:|0*[1-9][0-9]*)$"].includes(at(r, "pattern") ?? "") ? t("error_endpoint_tcp_positive_integer") : ["^[0-9]+$", "^[0-9]*$"].includes(at(r, "pattern") ?? "") ? t("error_endpoint_tcp_invalid") : t("error_field_invalid_format");
82
+ case "from_after_to": return t("report_runtime_range_invalid");
83
+ case "type":
84
+ case "invalid":
85
+ case "multipleOf":
86
+ case "const":
87
+ case "enum":
88
+ case "anyOf":
89
+ case "oneOf":
90
+ case "allOf":
91
+ case "not":
92
+ case "minItems":
93
+ case "maxItems":
94
+ case "uniqueItems":
95
+ case "minProperties":
96
+ case "maxProperties":
97
+ case "additionalProperties":
98
+ case "unevaluatedProperties":
99
+ case "unevaluatedItems":
100
+ case "contains":
101
+ case "minContains":
102
+ case "maxContains":
103
+ case "propertyNames":
104
+ case "dependentRequired":
105
+ case "dependentSchemas":
106
+ case "if":
107
+ case "then":
108
+ case "else": return t("error_field_invalid");
109
+ case "required": return ot(e) ? t("error_password_required") : t("error_field_required");
110
+ default: break;
111
+ }
112
+ return t("error_field_invalid");
113
+ }
114
+ function Y(e, n) {
115
+ return e.flatMap((e) => {
116
+ if (e == null) return [];
117
+ if (e instanceof q) return [{ message: e.read() }];
118
+ if (typeof e == "string") return e === t("error_generic") ? [{ message: t("error_field_invalid") }] : [{ message: e }];
119
+ if (typeof e != "object") return [{ message: t("error_field_invalid") }];
120
+ let r = nt(e);
121
+ return r ? [{ message: ct(n, r, rt(e)) }] : [{ message: t("error_field_invalid") }];
122
+ });
123
+ }
124
+ //#endregion
125
+ //#region src/form/fields/checkbox-field.tsx
126
+ function lt({ label: e, id: t, description: r, disabled: i }) {
127
+ n();
128
+ let a = K(), o = t ?? a.name, c = !a.state.meta.isValid, l = Y(a.state.meta.errors, a.name);
129
+ return /* @__PURE__ */ H(p, {
130
+ orientation: "horizontal",
131
+ "data-invalid": c ? !0 : void 0,
132
+ children: [/* @__PURE__ */ V(b, {
133
+ id: o,
134
+ name: a.name,
135
+ checked: a.state.value,
136
+ onCheckedChange: (e) => {
137
+ a.handleChange(e);
138
+ },
139
+ onBlur: a.handleBlur,
140
+ "aria-invalid": c || void 0,
141
+ ...i == null ? {} : { disabled: i }
142
+ }), /* @__PURE__ */ H(v, { children: [
143
+ /* @__PURE__ */ V(d, {
144
+ htmlFor: o,
145
+ children: e
146
+ }),
147
+ r == null ? null : /* @__PURE__ */ V(O, { children: r }),
148
+ /* @__PURE__ */ V(s, { errors: l })
149
+ ] })]
150
+ });
151
+ }
152
+ //#endregion
153
+ //#region src/form/fields/otp-field.tsx
154
+ function ut({ label: e, id: t, description: r, length: i = 6, disabled: a, autoFocus: o, onComplete: c }) {
155
+ n();
156
+ let l = K(), m = t ?? l.name, g = !l.state.meta.isValid, v = Y(l.state.meta.errors, l.name), y = Math.ceil(i / 2), b = Array.from({ length: i }, (e, t) => t);
157
+ return /* @__PURE__ */ H(p, {
158
+ "data-invalid": g ? !0 : void 0,
159
+ children: [
160
+ /* @__PURE__ */ V(d, {
161
+ htmlFor: m,
162
+ children: e
163
+ }),
164
+ /* @__PURE__ */ H(h, {
165
+ id: m,
166
+ name: l.name,
167
+ maxLength: i,
168
+ pattern: Te,
169
+ inputMode: "numeric",
170
+ autoComplete: "one-time-code",
171
+ value: l.state.value,
172
+ onChange: l.handleChange,
173
+ onBlur: l.handleBlur,
174
+ ...c ? { onComplete: c } : {},
175
+ ...a == null ? {} : { disabled: a },
176
+ ...o == null ? {} : { autoFocus: o },
177
+ "aria-invalid": g || void 0,
178
+ children: [
179
+ /* @__PURE__ */ V(_, { children: b.slice(0, y).map((e) => /* @__PURE__ */ V(f, {
180
+ index: e,
181
+ className: "size-10 text-base"
182
+ }, e)) }),
183
+ /* @__PURE__ */ V(u, {}),
184
+ /* @__PURE__ */ V(_, { children: b.slice(y).map((e) => /* @__PURE__ */ V(f, {
185
+ index: e,
186
+ className: "size-10 text-base"
187
+ }, e)) })
188
+ ]
189
+ }),
190
+ r == null ? null : /* @__PURE__ */ V(O, { children: r }),
191
+ /* @__PURE__ */ V(s, { errors: v })
192
+ ]
193
+ });
194
+ }
195
+ //#endregion
196
+ //#region src/form/fields/dashboard-picker-field.tsx
197
+ function dt({ label: t, workspaceId: i, allowEmpty: a = !0, exclude: c = [], description: l }) {
198
+ let u = r(), f = n(), h = K(), g = e.dashboard.list.useQuery({ workspaceId: i }), _ = he(), v = !h.state.meta.isValid, y = Y(h.state.meta.errors, h.name), b = (g.data?.dashboards ?? []).filter((e) => !c.includes(e.id)), x = h.state.value, ee = x !== "" && !b.some((e) => e.id === x);
199
+ return /* @__PURE__ */ H(p, {
200
+ "data-invalid": v ? !0 : void 0,
201
+ children: [
202
+ /* @__PURE__ */ V(d, {
203
+ htmlFor: _,
204
+ children: t
205
+ }),
206
+ /* @__PURE__ */ V(o, {
207
+ id: _,
208
+ name: h.name,
209
+ value: x,
210
+ disabled: g.isPending,
211
+ "aria-invalid": v || void 0,
212
+ onBlur: h.handleBlur,
213
+ onChange: (e) => {
214
+ h.handleChange(e.target.value);
215
+ },
216
+ children: g.isPending ? /* @__PURE__ */ V(m, {
217
+ value: x,
218
+ children: u("dashboard_picker_loading")
219
+ }) : /* @__PURE__ */ H(ye, { children: [
220
+ a || x === "" ? /* @__PURE__ */ V(m, {
221
+ value: "",
222
+ children: u("dashboard_picker_none")
223
+ }) : null,
224
+ ee ? /* @__PURE__ */ V(m, {
225
+ value: x,
226
+ children: g.isError ? u("dashboard_picker_error") : u("dashboard_picker_missing")
227
+ }) : null,
228
+ b.map((e) => /* @__PURE__ */ V(m, {
229
+ value: e.id,
230
+ children: U(e.name, f)
231
+ }, e.id))
232
+ ] })
233
+ }),
234
+ g.isError ? /* @__PURE__ */ V(O, { children: u("dashboard_picker_error") }) : l == null ? null : /* @__PURE__ */ V(O, { children: l }),
235
+ /* @__PURE__ */ V(s, { errors: y })
236
+ ]
237
+ });
238
+ }
239
+ //#endregion
240
+ //#region src/code-editor/language-features.ts
241
+ var ft = {
242
+ property: "property",
243
+ value: "enum",
244
+ kind: "type",
245
+ snippet: "class",
246
+ function: "function",
247
+ variable: "variable",
248
+ constant: "constant",
249
+ keyword: "keyword",
250
+ operator: "keyword",
251
+ literal: "constant",
252
+ entity: "namespace",
253
+ procedure: "method",
254
+ key: "text"
255
+ };
256
+ function X(e, t, n) {
257
+ let r = document.createElement(e);
258
+ return r.className = t, n !== void 0 && (r.textContent = n), r;
259
+ }
260
+ function pt(e, t) {
261
+ let n = X("a", "text-xs font-medium text-primary underline-offset-4 hover:underline", t);
262
+ return n.href = e, n.target = "_blank", n.rel = "noreferrer", n;
263
+ }
264
+ function mt(e, t, n) {
265
+ let r = X("div", "flex max-w-[min(28rem,85vw)] flex-col gap-1.5 px-3 py-2 text-sm");
266
+ for (let t of e.code) r.append(X("code", "font-mono text-xs break-words whitespace-pre-wrap", t));
267
+ e.description !== void 0 && r.append(X("p", "text-muted-foreground", e.description));
268
+ let i = X("div", "flex flex-wrap items-center gap-x-3 gap-y-1");
269
+ e.docsUrl !== void 0 && i.append(pt(e.docsUrl, t));
270
+ for (let t of n === void 0 ? [] : e.actions ?? []) {
271
+ let e = X("button", "text-xs font-medium text-primary underline-offset-4 hover:underline", t.label);
272
+ e.type = "button", e.addEventListener("click", () => {
273
+ n !== void 0 && t.run(n);
274
+ }), i.append(e);
275
+ }
276
+ return i.childElementCount > 0 && r.append(i), r;
277
+ }
278
+ function ht(e) {
279
+ let t = e.completions;
280
+ return (n) => {
281
+ if (t === void 0) return null;
282
+ let r = n.state.doc.toString(), i = t(r, n.pos);
283
+ if (i === null) return null;
284
+ let a = Math.max(0, i.to - n.pos), o = r[i.from] === "\"" && i.from < n.pos;
285
+ if (!n.explicit && i.from === n.pos && /\s/.test(r[n.pos - 1] ?? "")) return null;
286
+ let s = i.items.map((t) => ({
287
+ label: o && !t.label.startsWith("\"") ? `"${t.label}` : t.label,
288
+ displayLabel: t.label,
289
+ type: ft[t.kind] ?? "text",
290
+ ...t.detail === void 0 ? {} : { detail: t.detail },
291
+ ...t.boost === void 0 ? {} : { boost: Math.max(-99, Math.min(99, t.boost)) },
292
+ ...t.description === void 0 && t.docsUrl === void 0 ? {} : { info: () => mt({
293
+ from: 0,
294
+ to: 0,
295
+ code: [],
296
+ ...t.description === void 0 ? {} : { description: t.description },
297
+ ...t.docsUrl === void 0 ? {} : { docsUrl: t.docsUrl }
298
+ }, e.docsLabel) },
299
+ apply: (e, n, r, i) => {
300
+ let o = Math.min(e.state.doc.length, i + a);
301
+ t.snippet === !0 ? Xe(t.insert)(e, n, r, o) : e.dispatch({
302
+ changes: {
303
+ from: r,
304
+ to: o,
305
+ insert: t.insert
306
+ },
307
+ selection: { anchor: r + t.insert.length },
308
+ annotations: Ye.of(n),
309
+ userEvent: "input.complete"
310
+ }), t.additionalEdits !== void 0 && t.additionalEdits.length > 0 && e.dispatch({
311
+ changes: t.additionalEdits.map((e) => ({ ...e })),
312
+ userEvent: "input.complete"
313
+ }), t.snippet !== !0 && t.insert.endsWith(" ") && Ze(e);
314
+ }
315
+ }));
316
+ return i.filtered ? {
317
+ from: i.from,
318
+ to: n.pos,
319
+ options: s,
320
+ filter: !1
321
+ } : {
322
+ from: i.from,
323
+ to: n.pos,
324
+ options: s,
325
+ validFor: /^["\w$.:/-]*$/
326
+ };
327
+ };
328
+ }
329
+ var Z = Re.define(), gt = ze.define({
330
+ create: () => null,
331
+ update(e, t) {
332
+ for (let e of t.effects) if (e.is(Z)) return e.value;
333
+ return t.docChanged || t.selection !== void 0 ? null : e;
334
+ },
335
+ provide: (e) => Ke.from(e)
336
+ });
337
+ function _t(e, t, n) {
338
+ let r = t.doc.toString(), i = e.info?.(r, n);
339
+ if (i == null) return null;
340
+ let a = [...i.actions ?? []], { referencesLabel: o, renameLabel: s } = e;
341
+ return o !== void 0 && (e.references?.(r, n)?.length ?? 0) > 0 && a.push({
342
+ label: o,
343
+ run: (t) => {
344
+ yt(e, t, n);
345
+ }
346
+ }), s !== void 0 && !t.readOnly && e.rename?.prepare(r, n) != null && a.push({
347
+ label: s,
348
+ run: (t) => {
349
+ bt(e, t, n);
350
+ }
351
+ }), {
352
+ pos: i.from,
353
+ end: i.to,
354
+ above: !0,
355
+ create: (t) => ({ dom: mt({
356
+ ...i,
357
+ actions: a
358
+ }, e.docsLabel, t) })
359
+ };
360
+ }
361
+ function vt(e, t) {
362
+ if ("open" in t) {
363
+ t.open();
364
+ return;
365
+ }
366
+ e.dispatch({
367
+ selection: {
368
+ anchor: t.from,
369
+ head: t.to
370
+ },
371
+ effects: W.scrollIntoView(t.from, { y: "center" })
372
+ }), e.focus();
373
+ }
374
+ function yt(e, t, n) {
375
+ let r = e.references?.(t.state.doc.toString(), n);
376
+ if (r == null || r.length === 0) return !1;
377
+ let i = {
378
+ pos: n,
379
+ above: !1,
380
+ create: () => {
381
+ let n = X("div", "flex max-h-72 w-[min(32rem,90vw)] flex-col overflow-y-auto py-1 text-sm");
382
+ e.referencesLabel !== void 0 && n.append(X("p", "px-3 py-1 text-xs font-medium text-muted-foreground", `${e.referencesLabel} (${String(r.length)})`));
383
+ for (let e of r) {
384
+ let r = X("button", "flex w-full min-w-0 items-baseline gap-2 px-3 py-1 text-left hover:bg-muted focus-visible:bg-muted focus-visible:outline-none");
385
+ r.type = "button", r.append(X("span", e.definition === !0 ? "shrink-0 text-xs font-medium text-foreground" : "shrink-0 text-xs text-muted-foreground", e.location), X("code", "min-w-0 truncate font-mono text-xs", e.text)), r.title = e.text, r.addEventListener("click", () => {
386
+ t.dispatch({ effects: Z.of(null) }), vt(t, e.target);
387
+ }), n.append(r);
388
+ }
389
+ return n.addEventListener("keydown", (e) => {
390
+ e.key === "Escape" && (e.preventDefault(), t.dispatch({ effects: Z.of(null) }), t.focus());
391
+ }), {
392
+ dom: n,
393
+ mount: () => {
394
+ n.querySelector("button")?.focus();
395
+ }
396
+ };
397
+ }
398
+ };
399
+ return t.dispatch({ effects: Z.of(i) }), !0;
400
+ }
401
+ function bt(e, t, n) {
402
+ if (t.state.readOnly) return !1;
403
+ let r = e.rename, i = r?.prepare(t.state.doc.toString(), n);
404
+ if (r === void 0 || i == null) return !1;
405
+ let a = {
406
+ pos: i.from,
407
+ end: i.to,
408
+ above: !1,
409
+ create: () => {
410
+ let a = X("div", "flex w-64 max-w-[85vw] flex-col gap-1 p-2"), o = X("input", "h-8 w-full rounded-md border border-input bg-transparent px-2 font-mono text-sm shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive");
411
+ o.value = i.name, o.spellcheck = !1, o.autocomplete = "off", e.renameLabel !== void 0 && o.setAttribute("aria-label", e.renameLabel);
412
+ let s = X("p", "text-xs text-destructive");
413
+ s.hidden = !0, s.id = `cm-rename-problem-${String(i.from)}`, o.setAttribute("aria-describedby", s.id), a.append(o, s);
414
+ let c = () => {
415
+ t.dispatch({ effects: Z.of(null) }), t.focus();
416
+ }, l = () => {
417
+ if (t.state.readOnly) {
418
+ c();
419
+ return;
420
+ }
421
+ let e = r.apply(t.state.doc.toString(), n, o.value.trim());
422
+ if ("problem" in e) {
423
+ s.textContent = e.problem, s.hidden = !1, o.setAttribute("aria-invalid", "true");
424
+ return;
425
+ }
426
+ t.dispatch({
427
+ changes: e.edits.map((e) => ({ ...e })),
428
+ effects: Z.of(null),
429
+ userEvent: "input.rename"
430
+ }), t.focus();
431
+ };
432
+ return o.addEventListener("keydown", (e) => {
433
+ e.key !== "Enter" && e.key !== "Escape" || (e.preventDefault(), e.stopPropagation(), e.key === "Enter" ? l() : c());
434
+ }), {
435
+ dom: a,
436
+ mount: () => {
437
+ o.focus(), o.select();
438
+ }
439
+ };
440
+ }
441
+ };
442
+ return t.dispatch({ effects: Z.of(a) }), !0;
443
+ }
444
+ function xt(e) {
445
+ return (t) => {
446
+ let n = _t(e, t.state, t.state.selection.main.head);
447
+ return t.dispatch({ effects: Z.of(n) }), n !== null;
448
+ };
449
+ }
450
+ function St(e, t, n) {
451
+ let r = t.definition?.(e.state.doc.toString(), n);
452
+ return r == null ? !1 : (vt(e, r), !0);
453
+ }
454
+ function Ct(e) {
455
+ let t = (t) => {
456
+ let n = t.selection.main;
457
+ if (!n.empty || e.signatureHelp === void 0) return null;
458
+ let r = e.signatureHelp(t.doc.toString(), n.head);
459
+ return r === null ? null : {
460
+ pos: n.head,
461
+ above: !0,
462
+ strictSide: !0,
463
+ create: () => {
464
+ let t = X("div", "flex max-w-[min(28rem,85vw)] flex-col gap-1 px-3 py-2 text-sm"), n = r.signatures[r.active];
465
+ if (n !== void 0) {
466
+ let e = X("code", "font-mono text-xs break-words whitespace-pre-wrap"), i = n.parameters[r.parameter];
467
+ i === void 0 ? e.textContent = n.label : (e.append(n.label.slice(0, i.from)), e.append(X("strong", "font-semibold text-foreground underline", n.label.slice(i.from, i.to))), e.append(n.label.slice(i.to))), t.append(e);
468
+ }
469
+ return r.signatures.length > 1 && t.append(X("span", "text-xs text-muted-foreground", `${String(r.active + 1)}/${String(r.signatures.length)}`)), r.description !== void 0 && t.append(X("p", "text-muted-foreground", r.description)), r.docsUrl !== void 0 && t.append(pt(r.docsUrl, e.docsLabel)), { dom: t };
470
+ }
471
+ };
472
+ };
473
+ return ze.define({
474
+ create: t,
475
+ update: (e, n) => n.docChanged || n.selection !== void 0 ? t(n.state) : e,
476
+ provide: (e) => Ke.from(e)
477
+ });
478
+ }
479
+ var wt = class extends He {
480
+ text;
481
+ unknown;
482
+ constructor(e, t) {
483
+ super(), this.text = e, this.unknown = t;
484
+ }
485
+ eq(e) {
486
+ return e.text === this.text && e.unknown === this.unknown;
487
+ }
488
+ toDOM() {
489
+ let e = X("span", this.unknown ? "cm-name-hint ml-1.5 inline-block max-w-40 truncate align-bottom font-sans text-xs text-destructive sm:max-w-64" : "cm-name-hint ml-1.5 inline-block max-w-40 truncate align-bottom font-sans text-xs text-muted-foreground sm:max-w-64", this.text);
490
+ return e.title = this.text, e.setAttribute("aria-hidden", "true"), e;
491
+ }
492
+ ignoreEvent() {
493
+ return !1;
494
+ }
495
+ };
496
+ function Tt(e) {
497
+ let t = e.nameHints, n = (e) => {
498
+ if (t === void 0) return Be.none;
499
+ let n = e.state.doc.length, r = t(e.state.doc.toString()).filter((e) => e.offset <= n).map((e) => Be.widget({
500
+ widget: new wt(e.text, e.unknown === !0),
501
+ side: 1
502
+ }).range(e.offset));
503
+ return Be.set(r, !0);
504
+ };
505
+ return Ve.fromClass(class {
506
+ decorations;
507
+ timer;
508
+ view;
509
+ constructor(e) {
510
+ this.view = e, this.decorations = n(e);
511
+ }
512
+ update(e) {
513
+ e.docChanged && (this.decorations = this.decorations.map(e.changes), clearTimeout(this.timer), this.timer = setTimeout(() => {
514
+ this.decorations = n(this.view), this.view.dispatch({});
515
+ }, 150));
516
+ }
517
+ destroy() {
518
+ clearTimeout(this.timer);
519
+ }
520
+ }, { decorations: (e) => e.decorations });
521
+ }
522
+ function Et(e) {
523
+ let t = [];
524
+ return e.completions !== void 0 && t.push(Je({
525
+ override: [ht(e)],
526
+ icons: !0,
527
+ closeOnBlur: !0,
528
+ tooltipClass: () => "cm-language-completions"
529
+ }), Le.highest(G.of([{
530
+ key: "Tab",
531
+ run: qe
532
+ }]))), e.info !== void 0 && t.push(gt, We((t, n) => _t(e, t.state, n), { hideOnChange: !0 }), G.of([{
533
+ key: "Mod-k Mod-i",
534
+ run: xt(e)
535
+ }]), W.domEventHandlers({ pointerup(t, n) {
536
+ return t.pointerType === "touch" && setTimeout(() => {
537
+ xt(e)(n);
538
+ }, 0), !1;
539
+ } })), e.signatureHelp !== void 0 && t.push(Ct(e)), e.nameHints !== void 0 && t.push(Tt(e)), e.definition !== void 0 && t.push(G.of([{
540
+ key: "F12",
541
+ run: (t) => St(t, e, t.state.selection.main.head)
542
+ }]), W.domEventHandlers({ mousedown(t, n) {
543
+ if (!(t.ctrlKey || t.metaKey) || t.button !== 0) return !1;
544
+ let r = n.posAtCoords({
545
+ x: t.clientX,
546
+ y: t.clientY
547
+ });
548
+ return r === null || !St(n, e, r) ? !1 : (t.preventDefault(), !0);
549
+ } })), (e.references !== void 0 || e.rename !== void 0) && t.push(gt, G.of([{
550
+ key: "Shift-F12",
551
+ run: (t) => yt(e, t, t.state.selection.main.head)
552
+ }, {
553
+ key: "F2",
554
+ run: (t) => bt(e, t, t.state.selection.main.head)
555
+ }])), t;
556
+ }
557
+ var Dt = Ze, Ot = "\n flex h-8 w-full min-w-0 items-center rounded-lg border border-input bg-transparent text-base\n transition-colors\n focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50\n md:text-sm\n dark:bg-input/30\n [&_.cm-content]:px-2.5 [&_.cm-content]:py-1 [&_.cm-content]:font-mono\n [&_.cm-content]:caret-foreground!\n [&_.cm-cursor]:border-foreground!\n [&_.cm-editor]:w-full [&_.cm-editor]:outline-none\n [&_.cm-line]:p-0\n [&_.cm-placeholder]:text-muted-foreground!\n [&_.cm-scroller]:overflow-x-auto [&_.cm-scroller]:font-mono [&_.cm-scroller]:leading-normal\n [&_.cm-selectionBackground]:bg-primary/20!\n [&_.cm-tooltip]:rounded-md [&_.cm-tooltip]:border! [&_.cm-tooltip]:border-border!\n [&_.cm-tooltip]:bg-popover! [&_.cm-tooltip]:text-popover-foreground [&_.cm-tooltip]:shadow-md\n [&_.cm-tooltip-autocomplete_ul]:max-h-[min(18rem,45vh)]! [&_.cm-tooltip-autocomplete_ul]:font-mono!\n [&_.cm-tooltip-autocomplete_ul_li]:px-2! [&_.cm-tooltip-autocomplete_ul_li]:py-1!\n [&_.cm-tooltip-autocomplete_ul_li[aria-selected]]:bg-accent!\n [&_.cm-tooltip-autocomplete_ul_li[aria-selected]]:text-accent-foreground!\n [&_.cm-completionDetail]:ml-2 [&_.cm-completionDetail]:text-xs\n [&_.cm-completionDetail]:text-muted-foreground [&_.cm-completionDetail]:not-italic!\n [&_.cm-completionInfo]:rounded-md [&_.cm-completionInfo]:border!\n [&_.cm-completionInfo]:border-border! [&_.cm-completionInfo]:bg-popover!\n [&_.cm-completionInfo]:p-0! [&_.cm-completionInfo]:shadow-md\n max-sm:[&_.cm-completionInfo]:hidden!\n [&_.cm-completionMatchedText]:font-semibold [&_.cm-completionMatchedText]:no-underline!\n";
558
+ function kt(e) {
559
+ return {
560
+ get docsLabel() {
561
+ return e.current.docsLabel;
562
+ },
563
+ completions: (t, n) => e.current.completions?.(t, n) ?? null,
564
+ info: (t, n) => e.current.info?.(t, n) ?? null,
565
+ signatureHelp: (t, n) => e.current.signatureHelp?.(t, n) ?? null
566
+ };
567
+ }
568
+ var At = Ie.transactionFilter.of((e) => {
569
+ if (!e.docChanged || e.newDoc.lines === 1) return e;
570
+ let t = e.newDoc.toString().replace(/\r?\n/g, " ");
571
+ return [e, {
572
+ changes: {
573
+ from: 0,
574
+ to: e.newDoc.length,
575
+ insert: t
576
+ },
577
+ sequential: !0
578
+ }];
579
+ });
580
+ function jt({ id: e, labelId: t, value: n, onChange: r, language: i, invalid: o = !1, placeholder: s, ariaDescribedBy: c, className: l }) {
581
+ let u = z(null), d = z(null), f = z(r), p = z(new Fe()), m = z(n), h = z(i);
582
+ return L(() => {
583
+ f.current = r;
584
+ }, [r]), L(() => {
585
+ h.current = i;
586
+ }, [i]), L(() => {
587
+ let e = u.current;
588
+ if (e === null) return;
589
+ let t = new W({
590
+ parent: e,
591
+ state: Ie.create({
592
+ doc: m.current,
593
+ extensions: [
594
+ Ue(),
595
+ Ne(),
596
+ At,
597
+ G.of([
598
+ {
599
+ key: "Enter",
600
+ run: (e) => (e.contentDOM.closest("form")?.requestSubmit(), !0)
601
+ },
602
+ ...Me,
603
+ ...Pe
604
+ ]),
605
+ W.updateListener.of((e) => {
606
+ e.docChanged && f.current(e.state.doc.toString());
607
+ }),
608
+ p.current.of([]),
609
+ Et(kt(h))
610
+ ]
611
+ })
612
+ });
613
+ return d.current = t, () => {
614
+ t.destroy(), d.current = null;
615
+ };
616
+ }, []), L(() => {
617
+ d.current?.dispatch({ effects: p.current.reconfigure([W.contentAttributes.of({
618
+ id: e,
619
+ spellcheck: "false",
620
+ autocapitalize: "off",
621
+ autocorrect: "off",
622
+ "aria-labelledby": t,
623
+ ...c === void 0 ? {} : { "aria-describedby": c },
624
+ ...o ? { "aria-invalid": "true" } : {}
625
+ }), ...s === void 0 ? [] : [Ge(s)]]) });
626
+ }, [
627
+ e,
628
+ t,
629
+ c,
630
+ o,
631
+ s
632
+ ]), L(() => {
633
+ let e = document.getElementById(t);
634
+ if (e === null) return;
635
+ let n = () => {
636
+ d.current?.focus();
637
+ };
638
+ return e.addEventListener("click", n), () => {
639
+ e.removeEventListener("click", n);
640
+ };
641
+ }, [t]), L(() => {
642
+ let e = d.current;
643
+ e === null || e.state.doc.toString() === n || e.dispatch({ changes: {
644
+ from: 0,
645
+ to: e.state.doc.length,
646
+ insert: n
647
+ } });
648
+ }, [n]), /* @__PURE__ */ V("div", {
649
+ ref: u,
650
+ "data-invalid": o ? !0 : void 0,
651
+ className: a(Ot, o && "\n border-destructive ring-3 ring-destructive/20\n dark:border-destructive/50 dark:ring-destructive/40\n ", l)
652
+ });
653
+ }
654
+ //#endregion
655
+ //#region src/form/fields/formula-field.tsx
656
+ function Mt({ label: e, language: t, id: r, description: i }) {
657
+ n();
658
+ let a = K(), o = r ?? a.name, c = !a.state.meta.isValid, l = Y(a.state.meta.errors, a.name);
659
+ return /* @__PURE__ */ H(p, {
660
+ "data-invalid": c ? !0 : void 0,
661
+ children: [
662
+ /* @__PURE__ */ V(d, {
663
+ id: `${o}-label`,
664
+ htmlFor: o,
665
+ children: e
666
+ }),
667
+ /* @__PURE__ */ V(jt, {
668
+ id: o,
669
+ labelId: `${o}-label`,
670
+ value: a.state.value,
671
+ onChange: a.handleChange,
672
+ language: t,
673
+ invalid: c
674
+ }),
675
+ i == null ? null : /* @__PURE__ */ V(O, { children: i }),
676
+ /* @__PURE__ */ V(s, { errors: l })
677
+ ]
678
+ });
679
+ }
680
+ //#endregion
681
+ //#region src/workspace/device-presets/quantity.ts
682
+ function Nt(e, t, n, r = 2) {
683
+ let i = new Intl.NumberFormat(n, {
684
+ maximumFractionDigits: r,
685
+ useGrouping: !1
686
+ }).format(e);
687
+ return t.length === 0 ? i : `${i} ${t}`;
688
+ }
689
+ function Pt(e, t, n) {
690
+ return new Intl.NumberFormat(t, {
691
+ minimumFractionDigits: n,
692
+ maximumFractionDigits: n,
693
+ useGrouping: !1
694
+ }).format(e);
695
+ }
696
+ //#endregion
697
+ //#region src/workspace/parameters/live/stale-note.ts
698
+ function Q(e) {
699
+ return t("parameter_value_stale_since", { when: De(e) });
700
+ }
701
+ function Ft(e) {
702
+ return e?.status === "value" && e.freshness === "stale" ? Q(e.snapshot.receivedAt) : void 0;
703
+ }
704
+ //#endregion
705
+ //#region src/workspace/parameters/live/value-display.tsx
706
+ function It({ state: e, locale: n, children: r, skeletonClassName: i = "h-6 w-20", unavailable: a = t("parameter_value_unavailable") }) {
707
+ if (N(e)) return /* @__PURE__ */ V(j, { className: i });
708
+ if (e.status === "idle" || e.status === "error") return /* @__PURE__ */ V("span", {
709
+ className: "text-muted-foreground",
710
+ children: a
711
+ });
712
+ let o = e.freshness === "stale" ? Q(e.snapshot.receivedAt) : void 0;
713
+ return /* @__PURE__ */ H("span", {
714
+ className: "inline-flex min-w-0 items-center gap-2",
715
+ children: [/* @__PURE__ */ V("span", {
716
+ className: o == null ? "truncate" : "truncate text-muted-foreground",
717
+ title: o,
718
+ children: r == null ? U(e.snapshot.value, n) : r(e.snapshot)
719
+ }), o == null ? null : /* @__PURE__ */ V("span", {
720
+ className: "sr-only",
721
+ children: o
722
+ })]
723
+ });
724
+ }
725
+ function Lt({ state: e, trueLabel: t, falseLabel: n, trueVariant: r = "destructive", falseVariant: i = "success", flag: a = !1 }) {
726
+ let o = a ? se(e) : oe(e);
727
+ if (o == null) return N(e) ? /* @__PURE__ */ V(j, { className: "h-5 w-16" }) : /* @__PURE__ */ V(E, {
728
+ variant: "outline",
729
+ children: "—"
730
+ });
731
+ let s = e.status === "value" && e.freshness === "stale" ? Q(e.snapshot.receivedAt) : void 0;
732
+ return /* @__PURE__ */ H("span", {
733
+ className: "inline-flex flex-wrap items-center gap-2",
734
+ children: [/* @__PURE__ */ V(E, {
735
+ variant: o ? r : i,
736
+ className: s == null ? void 0 : "opacity-60",
737
+ title: s,
738
+ children: o ? t : n
739
+ }), s == null ? null : /* @__PURE__ */ V("span", {
740
+ className: "sr-only",
741
+ children: s
742
+ })]
743
+ });
744
+ }
745
+ //#endregion
746
+ //#region src/workspace/parameters/live/metric.tsx
747
+ function Rt({ state: e, locale: t, unit: n = "", fractionDigits: i, unavailable: a, skeletonClassName: o }) {
748
+ let s = r();
749
+ return /* @__PURE__ */ H("span", {
750
+ className: "inline-flex max-w-full items-baseline gap-1 tabular-nums",
751
+ children: [/* @__PURE__ */ V(It, {
752
+ state: e,
753
+ locale: t,
754
+ unavailable: a ?? /* @__PURE__ */ V("span", {
755
+ className: "text-sm font-normal wrap-anywhere",
756
+ children: s("parameter_value_unavailable")
757
+ }),
758
+ ...o == null ? {} : { skeletonClassName: o },
759
+ ...i == null ? {} : { children: (e) => e.numberValue == null ? "—" : Pt(e.numberValue, t, i) }
760
+ }), e.status === "value" && n ? /* @__PURE__ */ V("span", {
761
+ className: "shrink-0 text-xs font-normal text-muted-foreground",
762
+ children: n
763
+ }) : null]
764
+ });
765
+ }
766
+ function zt({ label: e, icon: t, state: n, locale: r, unit: i = "", compact: a = !1, marker: o }) {
767
+ return /* @__PURE__ */ H("div", {
768
+ className: "flex min-w-0 items-start gap-2.5",
769
+ children: [t == null ? null : /* @__PURE__ */ V("span", {
770
+ "aria-hidden": "true",
771
+ className: "\n size-4 shrink-0 text-muted-foreground\n [&_svg]:size-4\n ",
772
+ children: t
773
+ }), /* @__PURE__ */ H("div", {
774
+ className: "min-w-0",
775
+ children: [/* @__PURE__ */ V("div", {
776
+ title: e,
777
+ className: a ? "text-xs text-muted-foreground" : "min-h-8 text-xs text-muted-foreground",
778
+ children: e
779
+ }), /* @__PURE__ */ H("div", {
780
+ className: a ? "mt-0.5 text-lg font-semibold tracking-tight" : "mt-1 text-2xl font-semibold tracking-tight",
781
+ children: [/* @__PURE__ */ V(Rt, {
782
+ state: n,
783
+ locale: r,
784
+ unit: i
785
+ }), o]
786
+ })]
787
+ })]
788
+ });
789
+ }
790
+ //#endregion
791
+ //#region src/workspace/parameters/live/coordinator.ts
792
+ var Bt = 1e4, Vt = 250, Ht = 6e4, Ut = 3e4;
793
+ function Wt(e) {
794
+ return (typeof DOMException < "u" && e instanceof DOMException || e instanceof Error) && e.name === "AbortError";
795
+ }
796
+ function Gt(e, t) {
797
+ if (typeof e != "object" || !e) return null;
798
+ let n = Reflect.get(e, t);
799
+ return typeof n == "string" ? n : null;
800
+ }
801
+ function Kt(e, t) {
802
+ if (typeof e != "object" || !e) return null;
803
+ let n = Reflect.get(e, t);
804
+ return typeof n == "number" && Number.isFinite(n) ? n : null;
805
+ }
806
+ function qt(e, t) {
807
+ if (typeof e != "object" || !e) return null;
808
+ let n = Reflect.get(e, t);
809
+ return typeof n == "object" && n ? n : null;
810
+ }
811
+ function Jt(e, t) {
812
+ let n = qt(e, "data"), r = Gt(n, "code") ?? Gt(e, "code") ?? "", i = Kt(n, "retryAfterMs") ?? Kt(n, "tryAgainIn") ?? Kt(e, "retryAfterMs") ?? Kt(e, "tryAgainIn");
813
+ return r === "FORBIDDEN" || r === "UNAUTHORIZED" ? {
814
+ kind: "permission",
815
+ code: "permission_denied",
816
+ parameterIds: t
817
+ } : r === "TOO_MANY_REQUESTS" ? {
818
+ kind: "capacity",
819
+ code: "request_failed",
820
+ parameterIds: t,
821
+ ...i != null && i > 0 ? { retryAfterMs: i } : {}
822
+ } : {
823
+ kind: "internal",
824
+ code: "request_failed",
825
+ parameterIds: t
826
+ };
827
+ }
828
+ function Yt(e, t) {
829
+ if (e.kind === "permission") return null;
830
+ if (e.kind === "configuration") return Ht;
831
+ if (e.kind === "capacity" && e.retryAfterMs != null) return Math.max(Vt, e.retryAfterMs);
832
+ let n = [
833
+ 2e3,
834
+ 5e3,
835
+ 1e4,
836
+ Ut
837
+ ], r = n[Math.min(t, n.length - 1)] ?? Ut, i = Math.round(r * .08 * (t % 3 - 1));
838
+ return Math.max(Vt, r + i);
839
+ }
840
+ function Xt(e, t) {
841
+ return {
842
+ value: e.value,
843
+ rawHex: e.rawHex,
844
+ ...e.numberValue === void 0 ? {} : { numberValue: e.numberValue },
845
+ ...e.boolValue === void 0 ? {} : { boolValue: e.boolValue },
846
+ receivedAt: e.acquiredAt == null ? t : Date.parse(e.acquiredAt)
847
+ };
848
+ }
849
+ var Zt = class {
850
+ transport;
851
+ access;
852
+ visible = !0;
853
+ states = /* @__PURE__ */ new Map();
854
+ listenersByParameter = /* @__PURE__ */ new Map();
855
+ allListeners = /* @__PURE__ */ new Set();
856
+ demands = /* @__PURE__ */ new Map();
857
+ activeIntervals = /* @__PURE__ */ new Map();
858
+ manualIds = /* @__PURE__ */ new Set();
859
+ dueAt = /* @__PURE__ */ new Map();
860
+ failureAttempts = /* @__PURE__ */ new Map();
861
+ suspendedIds = /* @__PURE__ */ new Set();
862
+ versions = /* @__PURE__ */ new Map();
863
+ pendingWrites = /* @__PURE__ */ new Map();
864
+ timer = null;
865
+ inFlight = null;
866
+ revision = 0;
867
+ notificationTimer = null;
868
+ stopped = !1;
869
+ sequenceTail = Promise.resolve();
870
+ constructor(e) {
871
+ this.transport = e.transport, this.access = e.access;
872
+ }
873
+ setTransport(e) {
874
+ this.transport = e;
875
+ }
876
+ setAccess(e) {
877
+ e !== this.access && (this.access = e, this.notifyAll());
878
+ }
879
+ setVisible(e) {
880
+ if (e !== this.visible) {
881
+ if (this.visible = e, e) {
882
+ let e = Date.now();
883
+ for (let t of this.demandedIntervals().keys()) this.dueAt.set(t, e);
884
+ this.schedule();
885
+ } else {
886
+ for (let e of this.demandedIntervals().keys()) this.markStale(e);
887
+ this.cancelRead(), this.clearTimer();
888
+ }
889
+ this.notifyAll();
890
+ }
891
+ }
892
+ isPaused() {
893
+ return !this.visible;
894
+ }
895
+ getRevision = () => this.revision;
896
+ subscribeAll = (e) => (this.allListeners.add(e), () => this.allListeners.delete(e));
897
+ subscribeParameter(e, t) {
898
+ let n = this.listenersByParameter.get(e);
899
+ return n ?? (n = /* @__PURE__ */ new Set(), this.listenersByParameter.set(e, n)), n.add(t), () => {
900
+ n.delete(t), n.size === 0 && this.listenersByParameter.delete(e);
901
+ };
902
+ }
903
+ getState(e) {
904
+ return this.states.get(e) ?? P;
905
+ }
906
+ registerDemand(e, t) {
907
+ let n = new Set(t.parameterIds);
908
+ this.demands.set(e, {
909
+ parameterIds: n,
910
+ intervalMs: Math.max(Vt, Math.round(t.intervalMs)),
911
+ enabled: t.enabled
912
+ }), this.reconcileDemand();
913
+ }
914
+ unregisterDemand(e) {
915
+ this.demands.delete(e), this.reconcileDemand();
916
+ }
917
+ refresh(e) {
918
+ let t = Date.now();
919
+ for (let n of new Set(e)) {
920
+ this.bumpVersion(n), this.manualIds.add(n), this.suspendedIds.delete(n), this.dueAt.set(n, t);
921
+ let e = this.states.get(n);
922
+ (e == null || e.status === "idle") && this.setState(n, { status: "loading" });
923
+ }
924
+ this.schedule();
925
+ }
926
+ readNow(e) {
927
+ let t = Date.now(), n = this.demandedIntervals(), r = /* @__PURE__ */ new Set();
928
+ for (let i of new Set(e)) !n.has(i) || this.suspendedIds.has(i) || (this.dueAt.set(i, t), r.add(i));
929
+ return this.schedule(), r;
930
+ }
931
+ retry(e) {
932
+ for (let t of e) this.failureAttempts.delete(t), this.suspendedIds.delete(t);
933
+ this.refresh(e);
934
+ }
935
+ runSequence(e) {
936
+ let t = this.sequenceTail.then(e, e);
937
+ return this.sequenceTail = t.catch(() => void 0), t;
938
+ }
939
+ async writeValues(e, t = {}) {
940
+ if (!Qe(this.access)) throw Error("workspace_not_operator");
941
+ let n = [...new Set(e.items.map((e) => e.paramId))], r = Symbol();
942
+ for (let e of n) this.bumpVersion(e), this.pendingWrites.set(e, r), this.updateSaving(e);
943
+ try {
944
+ let t = await this.transport.write(e);
945
+ for (let e of n) {
946
+ if (this.pendingWrites.get(e) !== r) continue;
947
+ let n = t.results[e];
948
+ if (n == null) this.applyDiagnostic(e, {
949
+ kind: "internal",
950
+ code: "request_failed",
951
+ parameterIds: [e]
952
+ });
953
+ else if (n.status === "ok") {
954
+ let t = this.getState(e);
955
+ t.status === "value" && this.setState(e, {
956
+ ...t,
957
+ freshness: "stale"
958
+ });
959
+ } else this.applyDiagnostic(e, F(e, n));
960
+ }
961
+ return t;
962
+ } catch (e) {
963
+ let t = Jt(e, n);
964
+ for (let e of n) this.pendingWrites.get(e) === r && this.applyDiagnostic(e, {
965
+ ...t,
966
+ parameterIds: [e]
967
+ });
968
+ throw e;
969
+ } finally {
970
+ let e = n.filter((e) => this.pendingWrites.get(e) === r);
971
+ for (let t of e) this.pendingWrites.delete(t), this.updateSaving(t);
972
+ let i = new Set(t.writeOnly);
973
+ this.refresh(e.filter((e) => !i.has(e)));
974
+ }
975
+ }
976
+ stop() {
977
+ this.stopped = !0, this.notificationTimer !== null && clearTimeout(this.notificationTimer), this.notificationTimer = null, this.clearTimer(), this.cancelRead(), this.demands.clear(), this.activeIntervals.clear(), this.manualIds.clear(), this.suspendedIds.clear();
978
+ }
979
+ start() {
980
+ this.stopped && (this.stopped = !1, this.reconcileDemand());
981
+ }
982
+ reconcileDemand() {
983
+ let e = this.demandedIntervals(), t = Date.now();
984
+ for (let n of e.keys()) {
985
+ this.activeIntervals.get(n) === e.get(n) ? this.dueAt.has(n) || this.dueAt.set(n, t) : (this.bumpVersion(n), this.dueAt.set(n, t));
986
+ let r = this.states.get(n);
987
+ (r == null || r.status === "idle") && this.setState(n, { status: "loading" });
988
+ }
989
+ for (let t of this.activeIntervals.keys()) !e.has(t) && !this.manualIds.has(t) && (this.bumpVersion(t), this.dueAt.delete(t), this.markStale(t));
990
+ for (let t of [...this.dueAt.keys()]) !e.has(t) && !this.manualIds.has(t) && (this.dueAt.delete(t), this.markStale(t));
991
+ this.activeIntervals = e, e.size === 0 && this.manualIds.size === 0 ? (this.clearTimer(), this.cancelRead()) : this.schedule(), this.notifyAll();
992
+ }
993
+ demandedIntervals() {
994
+ let e = /* @__PURE__ */ new Map();
995
+ for (let t of this.demands.values()) if (t.enabled) for (let n of t.parameterIds) e.set(n, Math.min(e.get(n) ?? Infinity, t.intervalMs));
996
+ return e;
997
+ }
998
+ schedule() {
999
+ if (this.stopped || !this.visible || this.inFlight != null) return;
1000
+ this.clearTimer();
1001
+ let e = this.demandedIntervals(), t = new Set([...e.keys(), ...this.manualIds].filter((e) => !this.suspendedIds.has(e)));
1002
+ if (t.size === 0) return;
1003
+ let n = Date.now(), r = Infinity;
1004
+ for (let e of t) r = Math.min(r, this.dueAt.get(e) ?? n);
1005
+ let i = Math.max(0, r - n);
1006
+ this.timer = setTimeout(() => {
1007
+ this.timer = null, this.runDueRead();
1008
+ }, i);
1009
+ }
1010
+ async runDueRead() {
1011
+ if (this.inFlight != null || this.stopped || !this.visible) return;
1012
+ let e = Date.now(), t = this.demandedIntervals(), n = [...new Set([...t.keys(), ...this.manualIds].filter((e) => !this.suspendedIds.has(e)))].filter((t) => (this.dueAt.get(t) ?? e) <= e).sort((t, n) => (this.dueAt.get(t) ?? e) - (this.dueAt.get(n) ?? e)).slice(0, Bt);
1013
+ if (n.length === 0) {
1014
+ this.schedule();
1015
+ return;
1016
+ }
1017
+ let r = new AbortController(), i = /* @__PURE__ */ new Map();
1018
+ for (let e of n) i.set(e, this.versions.get(e) ?? 0), this.markRefreshing(e), this.dueAt.delete(e);
1019
+ let a = {
1020
+ controller: r,
1021
+ versions: i,
1022
+ parameterIds: n
1023
+ };
1024
+ this.inFlight = a;
1025
+ let o = /* @__PURE__ */ new Set();
1026
+ try {
1027
+ let e = await this.transport.read(n, r.signal);
1028
+ for await (let n of e) {
1029
+ if (r.signal.aborted || this.inFlight !== a) break;
1030
+ if (n.type === "ping") continue;
1031
+ o.add(n.paramId);
1032
+ let e = i.get(n.paramId);
1033
+ e == null || e !== (this.versions.get(n.paramId) ?? 0) || this.applyReadResult(n.paramId, n.result, t);
1034
+ }
1035
+ if (!r.signal.aborted) for (let e of n) o.has(e) || (this.applyDiagnostic(e, {
1036
+ kind: "internal",
1037
+ code: "request_failed",
1038
+ parameterIds: [e]
1039
+ }), this.manualIds.delete(e), this.setNextDue(e, t));
1040
+ } catch (e) {
1041
+ if (!r.signal.aborted && !Wt(e)) {
1042
+ let r = Jt(e, n);
1043
+ for (let e of n) o.has(e) || (this.applyDiagnostic(e, {
1044
+ ...r,
1045
+ parameterIds: [e]
1046
+ }), this.manualIds.delete(e), this.setNextDue(e, t));
1047
+ }
1048
+ } finally {
1049
+ if (this.inFlight === a && (this.inFlight = null), r.signal.aborted) for (let e of n) this.clearRefreshing(e);
1050
+ this.schedule();
1051
+ }
1052
+ }
1053
+ applyReadResult(e, t, n) {
1054
+ t.status === "ok" ? (this.failureAttempts.delete(e), this.suspendedIds.delete(e), this.setState(e, {
1055
+ status: "value",
1056
+ snapshot: Xt(t, Date.now()),
1057
+ freshness: "fresh",
1058
+ refreshing: !1,
1059
+ saving: this.pendingWrites.has(e)
1060
+ }), this.setNextDue(e, n)) : (this.applyDiagnostic(e, F(e, t)), this.setNextDue(e, n)), this.manualIds.delete(e);
1061
+ }
1062
+ setNextDue(e, t) {
1063
+ let n = t.get(e), r = this.states.get(e);
1064
+ if (r?.status === "value" && r.freshness === "fresh" && n != null) {
1065
+ this.dueAt.set(e, Date.now() + n);
1066
+ return;
1067
+ }
1068
+ let i = r?.status === "error" || r?.status === "value" ? r.diagnostic : void 0;
1069
+ if (i == null) return;
1070
+ let a = this.failureAttempts.get(e) ?? 0, o = Yt(i, a);
1071
+ if (this.failureAttempts.set(e, a + 1), o != null && n != null) {
1072
+ let t = Date.now() + o;
1073
+ this.dueAt.set(e, t), r?.status === "error" && this.setState(e, {
1074
+ ...r,
1075
+ retryAt: t
1076
+ });
1077
+ } else o == null && n != null && this.suspendedIds.add(e);
1078
+ }
1079
+ applyDiagnostic(e, t) {
1080
+ let n = this.states.get(e);
1081
+ if (n?.status === "value" && t.kind !== "unavailable") {
1082
+ this.setState(e, {
1083
+ ...n,
1084
+ freshness: "stale",
1085
+ refreshing: !1,
1086
+ saving: this.pendingWrites.has(e),
1087
+ diagnostic: t
1088
+ });
1089
+ return;
1090
+ }
1091
+ this.setState(e, {
1092
+ status: "error",
1093
+ diagnostic: t,
1094
+ refreshing: !1,
1095
+ saving: this.pendingWrites.has(e)
1096
+ });
1097
+ }
1098
+ markStale(e) {
1099
+ let t = this.states.get(e);
1100
+ t?.status === "value" && t.freshness === "fresh" && this.setState(e, {
1101
+ ...t,
1102
+ freshness: "stale",
1103
+ refreshing: !1
1104
+ });
1105
+ }
1106
+ markRefreshing(e) {
1107
+ let t = this.states.get(e);
1108
+ t?.status === "value" || t?.status === "error" ? this.setState(e, {
1109
+ ...t,
1110
+ refreshing: !0
1111
+ }) : this.setState(e, { status: "loading" });
1112
+ }
1113
+ clearRefreshing(e) {
1114
+ let t = this.states.get(e);
1115
+ (t?.status === "value" || t?.status === "error") && this.setState(e, {
1116
+ ...t,
1117
+ refreshing: !1
1118
+ });
1119
+ }
1120
+ updateSaving(e) {
1121
+ let t = this.states.get(e);
1122
+ (t?.status === "value" || t?.status === "error") && this.setState(e, {
1123
+ ...t,
1124
+ saving: this.pendingWrites.has(e)
1125
+ });
1126
+ }
1127
+ setState(e, t) {
1128
+ this.states.set(e, t);
1129
+ let n = this.listenersByParameter.get(e);
1130
+ if (n != null) for (let e of n) e();
1131
+ this.notifyAll();
1132
+ }
1133
+ notifyAll() {
1134
+ this.stopped || this.notificationTimer !== null || (this.notificationTimer = setTimeout(() => {
1135
+ this.notificationTimer = null, this.revision += 1;
1136
+ for (let e of this.allListeners) e();
1137
+ }, 16));
1138
+ }
1139
+ bumpVersion(e) {
1140
+ this.versions.set(e, (this.versions.get(e) ?? 0) + 1);
1141
+ }
1142
+ clearTimer() {
1143
+ this.timer != null && (clearTimeout(this.timer), this.timer = null);
1144
+ }
1145
+ cancelRead() {
1146
+ this.inFlight?.controller.abort(), this.inFlight = null;
1147
+ }
1148
+ }, Qt = 8e3;
1149
+ function $t(e) {
1150
+ return N(e) ? !1 : e.status === "idle" ? !0 : e.refreshing ? !1 : e.status === "error" || e.freshness === "fresh" || e.diagnostic != null;
1151
+ }
1152
+ function en(e) {
1153
+ return e.status === "idle" ? e.reason !== "no-demand" : ae(e) && !e.refreshing;
1154
+ }
1155
+ function tn(e, t, n = Qt) {
1156
+ let r = [...new Set(t)], i = {};
1157
+ e.registerDemand(i, {
1158
+ parameterIds: r,
1159
+ intervalMs: n,
1160
+ enabled: !0
1161
+ });
1162
+ let a = new Map(r.map((t) => [t, e.getState(t)])), o = e.readNow(r);
1163
+ return new Promise((t) => {
1164
+ let s = !1, c = () => {
1165
+ if (s) return;
1166
+ s = !0, u(), clearTimeout(d);
1167
+ let n = new Map(r.map((t) => [t, e.getState(t)]));
1168
+ e.unregisterDemand(i), t(n);
1169
+ }, l = () => {
1170
+ r.every((t) => {
1171
+ let n = e.getState(t);
1172
+ return $t(n) && (!o.has(t) || n !== a.get(t) || en(n));
1173
+ }) && c();
1174
+ }, u = e.subscribeAll(l), d = setTimeout(c, n);
1175
+ l();
1176
+ });
1177
+ }
1178
+ //#endregion
1179
+ //#region src/workspace/parameters/live/provider.tsx
1180
+ var nn = fe(null);
1181
+ function $() {
1182
+ let e = me(nn);
1183
+ if (e == null) throw Error("Parameter value hooks require ParameterValuesProvider");
1184
+ return e;
1185
+ }
1186
+ function rn({ children: t, access: n }) {
1187
+ let r = ce(), i = n ?? r?.access ?? "view_only", a = e.useUtils(), o = R(() => ({
1188
+ read: (e, t) => a.client.parameter.readValuesStream.mutate({ paramIds: [...e] }, { signal: t }),
1189
+ write: (e) => a.client.parameter.writeValues.mutate(e)
1190
+ }), [a.client]), [s] = B(() => new Zt({
1191
+ transport: o,
1192
+ access: i
1193
+ }));
1194
+ return L(() => {
1195
+ s.setTransport(o);
1196
+ }, [s, o]), L(() => {
1197
+ s.setAccess(i);
1198
+ }, [s, i]), L(() => {
1199
+ let e = () => {
1200
+ s.setVisible(document.visibilityState === "visible");
1201
+ };
1202
+ return e(), document.addEventListener("visibilitychange", e), () => {
1203
+ document.removeEventListener("visibilitychange", e);
1204
+ };
1205
+ }, [s]), L(() => (s.start(), () => {
1206
+ s.stop();
1207
+ }), [s]), pe(nn.Provider, { value: s }, t);
1208
+ }
1209
+ function an({ children: e }) {
1210
+ return me(nn) == null ? pe(rn, null, e) : e;
1211
+ }
1212
+ function on(e) {
1213
+ return [...new Set(e)].sort().join("\0");
1214
+ }
1215
+ function sn(e) {
1216
+ return e.length === 0 ? [] : e.split("\0");
1217
+ }
1218
+ function cn() {
1219
+ return () => void 0;
1220
+ }
1221
+ function ln() {
1222
+ return 0;
1223
+ }
1224
+ function un({ parameterIds: e, intervalMs: t, enabled: n = !0 }) {
1225
+ let r = $(), i = z({}), a = on(e), o = R(() => sn(a), [a]), s = o.length > 0;
1226
+ ge(s ? r.subscribeAll : cn, s ? r.getRevision : ln, s ? r.getRevision : ln), L(() => {
1227
+ let e = i.current;
1228
+ return r.registerDemand(e, {
1229
+ parameterIds: o,
1230
+ intervalMs: t,
1231
+ enabled: n
1232
+ }), () => {
1233
+ r.unregisterDemand(e);
1234
+ };
1235
+ }, [
1236
+ r,
1237
+ n,
1238
+ o,
1239
+ t
1240
+ ]);
1241
+ let c = I(() => {
1242
+ r.retry(o);
1243
+ }, [r, o]);
1244
+ return {
1245
+ ...M({
1246
+ parameterIds: o,
1247
+ getState: (e) => r.getState(e),
1248
+ enabled: n,
1249
+ paused: r.isPaused()
1250
+ }),
1251
+ retry: c
1252
+ };
1253
+ }
1254
+ function dn(e) {
1255
+ let t = me(nn), n = I(() => t != null && e.some((e) => {
1256
+ let n = t.getState(e);
1257
+ return n.status === "loading" || (n.status === "value" || n.status === "error") && n.refreshing;
1258
+ }), [t, e]);
1259
+ return ge(t == null ? cn : t.subscribeAll, n, n);
1260
+ }
1261
+ function fn(e) {
1262
+ let t = $(), n = I((n) => t.subscribeParameter(e, n), [t, e]), r = I(() => t.getState(e), [t, e]);
1263
+ return ge(n, r, r);
1264
+ }
1265
+ function pn() {
1266
+ let e = $(), t = I((t) => {
1267
+ e.refresh(t);
1268
+ }, [e]), n = I((t, n) => e.writeValues(t, n), [e]), r = I((t) => e.runSequence(t), [e]);
1269
+ return R(() => ({
1270
+ refreshValues: t,
1271
+ writeValues: n,
1272
+ runSequence: r
1273
+ }), [
1274
+ t,
1275
+ n,
1276
+ r
1277
+ ]);
1278
+ }
1279
+ function mn() {
1280
+ let e = $();
1281
+ return I((t, n) => tn(e, t, n), [e]);
1282
+ }
1283
+ function hn() {
1284
+ return $();
1285
+ }
1286
+ //#endregion
1287
+ //#region src/workspace/parameters/option-labels.ts
1288
+ function gn(e) {
1289
+ switch (e) {
1290
+ case "holding-register": return t("parameter_option_table_holding_register");
1291
+ case "input-register": return t("parameter_option_table_input_register");
1292
+ case "coil": return t("parameter_option_table_coil");
1293
+ case "discrete-input": return t("parameter_option_table_discrete_input");
1294
+ }
1295
+ }
1296
+ function _n(e) {
1297
+ switch (e) {
1298
+ case "none": return t("parameter_option_write_none");
1299
+ case "single-write": return t("parameter_option_write_single");
1300
+ case "multi-or-single-write": return t("parameter_option_write_multi_or_single");
1301
+ case "always-multi-write": return t("parameter_option_write_always_multi");
1302
+ }
1303
+ }
1304
+ function vn(e) {
1305
+ switch (e) {
1306
+ case "float": return t("parameter_option_return_float");
1307
+ case "int": return t("parameter_option_return_int");
1308
+ }
1309
+ }
1310
+ function yn(e) {
1311
+ switch (e) {
1312
+ case "bytes": return t("parameter_option_swap_bytes");
1313
+ case "words": return t("parameter_option_swap_words");
1314
+ }
1315
+ }
1316
+ function bn(e) {
1317
+ switch (e) {
1318
+ case "leave-first-byte-in-word": return t("parameter_option_filter_leave_first");
1319
+ case "leave-last-byte-in-word": return t("parameter_option_filter_leave_last");
1320
+ }
1321
+ }
1322
+ function xn(e) {
1323
+ switch (e) {
1324
+ case "str": return t("parameter_option_value_type_str");
1325
+ case "num": return t("parameter_option_value_type_num");
1326
+ case "int": return t("parameter_option_value_type_int");
1327
+ case "bool": return t("parameter_option_value_type_bool");
1328
+ case "bigint": return t("parameter_option_value_type_bigint");
1329
+ case "datetime": return t("parameter_option_value_type_datetime");
1330
+ case "ipaddr": return t("parameter_option_value_type_ipaddr");
1331
+ case "macaddr": return t("parameter_option_value_type_macaddr");
1332
+ case "geo": return t("parameter_option_value_type_geo");
1333
+ }
1334
+ }
1335
+ function Sn(e) {
1336
+ switch (e) {
1337
+ case "ascii": return t("parameter_option_encoding_ascii");
1338
+ case "utf8": return t("parameter_option_encoding_utf8");
1339
+ case "utf16le": return t("parameter_option_encoding_utf16le");
1340
+ case "base64": return t("parameter_option_encoding_base64");
1341
+ case "hex": return t("parameter_option_encoding_hex");
1342
+ }
1343
+ }
1344
+ function Cn(e) {
1345
+ switch (e) {
1346
+ case "unsigned-int": return t("parameter_option_packing_unsigned_int");
1347
+ case "signed-int": return t("parameter_option_packing_signed_int");
1348
+ case "bcd-int": return t("parameter_option_packing_bcd_int");
1349
+ case "bcd": return t("parameter_option_packing_bcd");
1350
+ case "float16": return t("parameter_option_packing_float16");
1351
+ case "float32": return t("parameter_option_packing_float32");
1352
+ case "float64": return t("parameter_option_packing_float64");
1353
+ case "decimal16": return t("parameter_option_packing_decimal16");
1354
+ case "decimal32": return t("parameter_option_packing_decimal32");
1355
+ case "decimal64": return t("parameter_option_packing_decimal64");
1356
+ }
1357
+ }
1358
+ function wn(e) {
1359
+ switch (e) {
1360
+ case "timestamp-sec-32": return t("parameter_option_datetime_kind_timestamp_sec_32");
1361
+ case "timestamp-msec-32": return t("parameter_option_datetime_kind_timestamp_msec_32");
1362
+ case "timestamp-days-32": return t("parameter_option_datetime_kind_timestamp_days_32");
1363
+ case "timestamp-days-16": return t("parameter_option_datetime_kind_timestamp_days_16");
1364
+ case "iso-8601-string": return t("parameter_option_datetime_kind_iso_8601");
1365
+ case "datetime": return t("parameter_option_datetime_kind_datetime");
1366
+ }
1367
+ }
1368
+ function Tn(e) {
1369
+ switch (e) {
1370
+ case "ipv4": return t("parameter_option_ip_ipv4");
1371
+ case "ipv6": return t("parameter_option_ip_ipv6");
1372
+ }
1373
+ }
1374
+ function En(e) {
1375
+ switch (e) {
1376
+ case "hours": return t("parameter_option_tz_hours");
1377
+ case "minutes": return t("parameter_option_tz_minutes");
1378
+ case "seconds": return t("parameter_option_tz_seconds");
1379
+ }
1380
+ }
1381
+ //#endregion
1382
+ //#region src/workspace/parameters/display.ts
1383
+ function Dn(e) {
1384
+ if (e.length === 0) return "0";
1385
+ let t = e[0] ?? 0;
1386
+ if (e.length === 1) return String(t);
1387
+ let n = e[e.length - 1] ?? t;
1388
+ return e.every((t, n) => n === 0 || t === (e[n - 1] ?? 0) + 1) ? `${String(t)}-${String(n)}` : e.join(",");
1389
+ }
1390
+ function On(e) {
1391
+ switch (e) {
1392
+ case "coil": return t("parameter_list_modbus_table_coil");
1393
+ case "discrete-input": return t("parameter_list_modbus_table_discrete_input");
1394
+ case "holding-register": return t("parameter_list_modbus_table_holding_register");
1395
+ case "input-register": return t("parameter_list_modbus_table_input_register");
1396
+ }
1397
+ }
1398
+ function kn(e, t) {
1399
+ let n = t.get(e);
1400
+ return n != null && n.length > 0 ? n : e.slice(0, 8);
1401
+ }
1402
+ function An(e, t) {
1403
+ if (e == null) return null;
1404
+ let n = U(e, t).trim();
1405
+ return n.length > 0 ? n : null;
1406
+ }
1407
+ function jn(e, t = i()) {
1408
+ return {
1409
+ mnemonic: An(e.mnemonic, t),
1410
+ name: U(e.name, t),
1411
+ units: An(e.units, t)
1412
+ };
1413
+ }
1414
+ function Mn(e, t) {
1415
+ return e || t == null ? null : t;
1416
+ }
1417
+ function Nn(e) {
1418
+ let t = Math.floor(e / 1e3);
1419
+ return t % 3600 == 0 ? {
1420
+ n: t / 3600,
1421
+ unit: "h"
1422
+ } : t % 60 == 0 ? {
1423
+ n: t / 60,
1424
+ unit: "m"
1425
+ } : {
1426
+ n: t,
1427
+ unit: "s"
1428
+ };
1429
+ }
1430
+ function Pn(e) {
1431
+ let { n, unit: r } = Nn(e), i = String(n);
1432
+ switch (r) {
1433
+ case "h": return t("parameter_background_reading_period_compact_hours", { n: i });
1434
+ case "m": return t("parameter_background_reading_period_compact_minutes", { n: i });
1435
+ case "s": return t("parameter_background_reading_period_compact_seconds", { n: i });
1436
+ }
1437
+ }
1438
+ function Fn(e) {
1439
+ return t("parameter_background_reading_period_aria", { seconds: String(Math.floor(e / 1e3)) });
1440
+ }
1441
+ function In(e, n) {
1442
+ let r = i(), a = e.valueType.name, o = xn(a), s = An(e.description, r), c, l = e.source;
1443
+ if (l.kind === "const") c = [
1444
+ t("parameter_list_source_const"),
1445
+ l.key,
1446
+ o
1447
+ ].join(" · ");
1448
+ else if (l.kind === "calc") c = [
1449
+ t("parameter_list_source_calc"),
1450
+ t("parameter_details_calc_inputs", { count: String(l.inputParamIds.length) }),
1451
+ o
1452
+ ].join(" · ");
1453
+ else {
1454
+ let e = `${On(l.table)} ${Dn(l.addresses)}`;
1455
+ c = [
1456
+ kn(l.endpointId, n),
1457
+ t("parameter_details_unit", { id: String(l.unitId) }),
1458
+ e,
1459
+ o
1460
+ ].join(" · ");
1461
+ }
1462
+ return {
1463
+ description: s,
1464
+ metaLine: c,
1465
+ tags: [...e.tags]
1466
+ };
1467
+ }
1468
+ function Ln(e, t) {
1469
+ return e != null && Oe(e).some((e) => e.toLowerCase().includes(t));
1470
+ }
1471
+ //#endregion
1472
+ //#region src/workspace/parameters/picker/model.ts
1473
+ function Rn(e, t) {
1474
+ if (e == null) return null;
1475
+ let n = U(e, t).trim();
1476
+ return n.length > 0 ? n : null;
1477
+ }
1478
+ function zn(e) {
1479
+ switch (e.kind) {
1480
+ case "modbus-tcp": return `${On(e.table)} ${Dn(e.addresses)}`;
1481
+ case "const": return e.key;
1482
+ case "calc": return null;
1483
+ }
1484
+ }
1485
+ function Bn(e) {
1486
+ let t = /* @__PURE__ */ new Map();
1487
+ for (let n of e.branches) t.set(n.id, n);
1488
+ let n = /* @__PURE__ */ new Map(), r = (r) => {
1489
+ let i = n.get(r);
1490
+ if (i != null) return i;
1491
+ let a = [], o = /* @__PURE__ */ new Set(), s = r;
1492
+ for (; s != null && !o.has(s);) {
1493
+ o.add(s);
1494
+ let n = t.get(s);
1495
+ if (n == null) break;
1496
+ a.unshift(U(n.name, e.locale)), s = n.parentId;
1497
+ }
1498
+ return n.set(r, a), a;
1499
+ }, i = [...e.branches].sort((e, t) => e.sortOrder - t.sortOrder || e.id.localeCompare(t.id)), a = [...e.parameters].sort((e, t) => e.sortOrder - t.sortOrder || e.id.localeCompare(t.id)), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
1500
+ for (let t of a) {
1501
+ let n = U(t.name, e.locale), i = Rn(t.mnemonic, e.locale), a = zn(t.source), c = r(t.branchId), l = {
1502
+ id: t.id,
1503
+ branchId: t.branchId,
1504
+ name: n,
1505
+ mnemonic: i,
1506
+ units: Rn(t.units, e.locale),
1507
+ address: a,
1508
+ path: c,
1509
+ disabled: t.disabledSince != null,
1510
+ valueTypeName: t.valueType.name,
1511
+ order: 0,
1512
+ haystack: [
1513
+ ...Oe(t.name),
1514
+ ...t.mnemonic == null ? [] : Oe(t.mnemonic),
1515
+ ...c,
1516
+ a ?? "",
1517
+ ...t.source.kind === "modbus-tcp" ? t.source.addresses.map(String) : []
1518
+ ].join("\n").toLowerCase()
1519
+ };
1520
+ if (o.set(t.id, l), l.disabled && e.includeDisabled !== !0 || e.include != null && !e.include(t)) continue;
1521
+ let u = s.get(t.branchId) ?? [];
1522
+ u.push(l), s.set(t.branchId, u);
1523
+ }
1524
+ let c = /* @__PURE__ */ new Map();
1525
+ for (let e of i) {
1526
+ let n = e.parentId != null && t.has(e.parentId) ? e.parentId : null, r = c.get(n) ?? [];
1527
+ r.push(e), c.set(n, r);
1528
+ }
1529
+ let l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), p = [], m = /* @__PURE__ */ new Set(), h = (t, n) => {
1530
+ if (m.has(t.id)) return [];
1531
+ m.add(t.id);
1532
+ let r = [], i = {
1533
+ id: t.id,
1534
+ parentId: n,
1535
+ name: U(t.name, e.locale)
1536
+ }, a = [];
1537
+ for (let e of c.get(t.id) ?? []) {
1538
+ let n = h(e, t.id), i = l.get(e.id);
1539
+ n.length === 0 || i == null || (r.push(...n), a.push(i));
1540
+ }
1541
+ let o = s.get(t.id) ?? [];
1542
+ for (let e of o) p.push(e), r.push(e.id);
1543
+ return r.length === 0 ? r : (l.set(t.id, i), a.length > 0 && u.set(t.id, a), o.length > 0 && d.set(t.id, o), f.set(t.id, r), r);
1544
+ }, g = [];
1545
+ for (let e of c.get(null) ?? []) {
1546
+ if (h(e, null).length === 0) continue;
1547
+ let t = l.get(e.id);
1548
+ t != null && g.push(t);
1549
+ }
1550
+ return g.length > 0 && u.set(null, g), p.forEach((e, t) => {
1551
+ e.order = t;
1552
+ }), {
1553
+ parameters: o,
1554
+ listed: p,
1555
+ branches: l,
1556
+ childBranches: u,
1557
+ branchParameters: d,
1558
+ subtreeParameterIds: f
1559
+ };
1560
+ }
1561
+ function Vn(e, t) {
1562
+ let n = [], r = (i, a) => {
1563
+ for (let o of e.childBranches.get(i) ?? []) {
1564
+ let i = t.has(o.id);
1565
+ if (n.push({
1566
+ kind: "branch",
1567
+ key: `b:${o.id}`,
1568
+ id: o.id,
1569
+ name: o.name,
1570
+ depth: a,
1571
+ count: e.subtreeParameterIds.get(o.id)?.length ?? 0,
1572
+ open: i
1573
+ }), i) {
1574
+ r(o.id, a + 1);
1575
+ for (let t of e.branchParameters.get(o.id) ?? []) n.push({
1576
+ kind: "parameter",
1577
+ key: `p:${t.id}`,
1578
+ parameter: t,
1579
+ depth: a + 1
1580
+ });
1581
+ }
1582
+ }
1583
+ };
1584
+ return r(null, 0), n;
1585
+ }
1586
+ function Hn(e, t) {
1587
+ let n = e.parameters.get(t);
1588
+ if (n == null) return [];
1589
+ let r = [], i = n.branchId;
1590
+ for (; i != null && !r.includes(i);) {
1591
+ let t = e.branches.get(i);
1592
+ if (t == null) break;
1593
+ r.unshift(i), i = t.parentId;
1594
+ }
1595
+ return r;
1596
+ }
1597
+ function Un(e, t) {
1598
+ return [t, ...(e.childBranches.get(t) ?? []).flatMap((t) => Un(e, t.id))];
1599
+ }
1600
+ function Wn(e, t, n) {
1601
+ let r = je(t);
1602
+ if (r.length === 0) return {
1603
+ rows: [],
1604
+ hidden: 0,
1605
+ matchIds: []
1606
+ };
1607
+ let i = [];
1608
+ for (let t of e.listed) ke(t.haystack, r) && i.push({
1609
+ parameter: t,
1610
+ preferred: n.preferred == null || n.preferred(t.id),
1611
+ score: Ae(t.name, t.mnemonic, r)
1612
+ });
1613
+ i.sort((e, t) => Number(t.preferred) - Number(e.preferred) || t.score - e.score || (e.score > 0 ? e.parameter.name.length - t.parameter.name.length : 0) || e.parameter.order - t.parameter.order);
1614
+ let a = i.slice(0, n.limit);
1615
+ return {
1616
+ rows: a.map(({ parameter: e }) => ({
1617
+ kind: "parameter",
1618
+ key: `p:${e.id}`,
1619
+ parameter: e,
1620
+ depth: 0
1621
+ })),
1622
+ hidden: i.length - a.length,
1623
+ matchIds: i.map(({ parameter: e }) => e.id)
1624
+ };
1625
+ }
1626
+ function Gn(e, t) {
1627
+ if (t.length === 0 || e.length === 0) return [{
1628
+ text: e,
1629
+ match: !1
1630
+ }];
1631
+ let n = e.toLowerCase(), r = Array(e.length).fill(!1);
1632
+ for (let e of t) {
1633
+ let t = 0;
1634
+ for (;;) {
1635
+ let i = n.indexOf(e, t);
1636
+ if (i < 0) break;
1637
+ r.fill(!0, i, i + e.length), t = i + e.length;
1638
+ }
1639
+ }
1640
+ let i = [], a = 0;
1641
+ for (let t = 1; t <= e.length; t += 1) (t === e.length || r[t] !== r[a]) && (i.push({
1642
+ text: e.slice(a, t),
1643
+ match: r[a] === !0
1644
+ }), a = t);
1645
+ return i;
1646
+ }
1647
+ function Kn(e, t, n) {
1648
+ let r = e.subtreeParameterIds.get(t) ?? [], i = !1, a = r.length > 0;
1649
+ for (let e of r) n.has(e) ? i = !0 : a = !1;
1650
+ return a ? !0 : i ? "indeterminate" : !1;
1651
+ }
1652
+ //#endregion
1653
+ //#region src/workspace/parameters/picker/browser.tsx
1654
+ var qn = 200, Jn = 8, Yn = [
1655
+ "pl-1",
1656
+ "pl-5",
1657
+ "pl-9",
1658
+ "pl-13",
1659
+ "pl-17",
1660
+ "pl-21",
1661
+ "pl-25",
1662
+ "pl-29",
1663
+ "pl-33"
1664
+ ];
1665
+ function Xn(e) {
1666
+ return Yn[Math.min(e, Yn.length - 1)] ?? "pl-33";
1667
+ }
1668
+ function Zn(e, t) {
1669
+ if (t != null && e.parameters.has(t)) return new Set(Hn(e, t));
1670
+ let n = /* @__PURE__ */ new Set(), r = e.childBranches.get(null) ?? [];
1671
+ for (; r.length === 1;) {
1672
+ let t = r[0];
1673
+ if (t == null || (n.add(t.id), (e.branchParameters.get(t.id)?.length ?? 0) > 0)) break;
1674
+ r = e.childBranches.get(t.id) ?? [];
1675
+ }
1676
+ return n;
1677
+ }
1678
+ function Qn({ text: e, tokens: t }) {
1679
+ return Gn(e, t).map((e, t) => e.match ? /* @__PURE__ */ V("mark", {
1680
+ className: "rounded-xs bg-primary/20 text-inherit",
1681
+ children: e.text
1682
+ }, t) : /* @__PURE__ */ V("span", { children: e.text }, t));
1683
+ }
1684
+ function $n({ path: e, tokens: t = [], className: n }) {
1685
+ return /* @__PURE__ */ V("span", {
1686
+ className: a("flex min-w-0 items-baseline text-xs text-muted-foreground", n),
1687
+ title: e.join(" › "),
1688
+ children: e.map((n, r) => /* @__PURE__ */ H("span", {
1689
+ className: a("flex min-w-0 items-baseline", r === e.length - 1 ? "shrink" : "shrink-4"),
1690
+ children: [r === 0 ? null : /* @__PURE__ */ V("span", {
1691
+ className: "shrink-0 px-1",
1692
+ "aria-hidden": !0,
1693
+ children: "›"
1694
+ }), /* @__PURE__ */ V("span", {
1695
+ className: "min-w-0 truncate",
1696
+ children: /* @__PURE__ */ V(Qn, {
1697
+ text: n,
1698
+ tokens: t
1699
+ })
1700
+ })]
1701
+ }, r))
1702
+ });
1703
+ }
1704
+ function er({ parameter: e, tokens: t }) {
1705
+ let n = r();
1706
+ return e.mnemonic == null && e.address == null && !e.disabled ? null : /* @__PURE__ */ H("span", {
1707
+ className: "flex shrink-0 items-baseline gap-2 text-xs text-muted-foreground",
1708
+ children: [
1709
+ e.disabled ? /* @__PURE__ */ V("span", { children: n("parameter_picker_disabled") }) : null,
1710
+ e.mnemonic == null ? null : /* @__PURE__ */ V("span", {
1711
+ className: "max-w-32 truncate font-mono",
1712
+ children: /* @__PURE__ */ V(Qn, {
1713
+ text: e.mnemonic,
1714
+ tokens: t
1715
+ })
1716
+ }),
1717
+ e.address == null ? null : /* @__PURE__ */ V("span", {
1718
+ className: "\n hidden max-w-28 truncate font-mono tabular-nums\n sm:inline\n ",
1719
+ children: /* @__PURE__ */ V(Qn, {
1720
+ text: e.address,
1721
+ tokens: t
1722
+ })
1723
+ })
1724
+ ]
1725
+ });
1726
+ }
1727
+ function tr({ index: e, loading: t, selectedIds: n, multiple: i = !1, preferred: o, onPick: s, onToggle: c, emptyText: l, inputRef: u, className: d, footer: f }) {
1728
+ let p = r(), m = he(), [h, g] = B(""), _ = n.values().next().value ?? null, [v, y] = B(null), x = R(() => v ?? Zn(e, i ? null : _), [
1729
+ v,
1730
+ e,
1731
+ i,
1732
+ _
1733
+ ]), S = R(() => je(h), [h]), C = S.length > 0, w = R(() => C ? Wn(e, h, {
1734
+ limit: qn,
1735
+ preferred: o
1736
+ }) : null, [
1737
+ e,
1738
+ o,
1739
+ h,
1740
+ C
1741
+ ]), T = R(() => w?.rows ?? Vn(e, x), [
1742
+ e,
1743
+ x,
1744
+ w
1745
+ ]), [E, D] = B(null), O = R(() => {
1746
+ let e = E == null ? -1 : T.findIndex((e) => e.key === E);
1747
+ if (e >= 0) return e;
1748
+ if (!C && _ != null) {
1749
+ let e = T.findIndex((e) => e.key === `p:${_}`);
1750
+ if (e >= 0) return e;
1751
+ }
1752
+ return T.length > 0 ? 0 : -1;
1753
+ }, [
1754
+ E,
1755
+ T,
1756
+ C,
1757
+ _
1758
+ ]), k = O >= 0 ? T[O] : void 0, j = z(null), M = (e) => `${m}-${e.key}`, ae = (e, t) => {
1759
+ let n = j.current, r = n?.ownerDocument.getElementById(M(e));
1760
+ if (n == null || r == null) return;
1761
+ let i = r.offsetTop, a = i + r.offsetHeight;
1762
+ t === "center" ? n.scrollTop = i - (n.clientHeight - r.offsetHeight) / 2 : i < n.scrollTop ? n.scrollTop = i : a > n.scrollTop + n.clientHeight && (n.scrollTop = a - n.clientHeight);
1763
+ }, N = z(!1);
1764
+ L(() => {
1765
+ let e = j.current;
1766
+ if (e == null || t || k == null) return;
1767
+ let n = () => {
1768
+ N.current || e.scrollHeight <= e.clientHeight || (N.current = !0, ae(k, "center"));
1769
+ }, r = new ResizeObserver(n);
1770
+ return r.observe(e), n(), () => {
1771
+ r.disconnect();
1772
+ };
1773
+ });
1774
+ let P = (e) => {
1775
+ if (N.current = !0, T.length === 0) return;
1776
+ let t = Math.max(0, Math.min(T.length - 1, e)), n = T[t];
1777
+ n != null && (D(n.key), ae(n, "nearest"));
1778
+ }, F = (t, n, r = !1) => {
1779
+ N.current = !0, y(() => {
1780
+ let i = new Set(x);
1781
+ for (let a of r ? Un(e, t) : [t]) n ? i.add(a) : i.delete(a);
1782
+ return i;
1783
+ });
1784
+ }, oe = (e) => {
1785
+ i ? c?.([e], !n.has(e)) : s?.(e);
1786
+ }, se = (t) => {
1787
+ let r = e.subtreeParameterIds.get(t) ?? [];
1788
+ c?.(r, Kn(e, t, n) !== !0);
1789
+ }, ce = (e, t = !1) => {
1790
+ D(e.key), e.kind === "branch" ? F(e.id, !e.open, t) : oe(e.parameter.id);
1791
+ }, le = (t) => {
1792
+ if (!t.nativeEvent.isComposing) switch (t.key) {
1793
+ case "ArrowDown":
1794
+ t.preventDefault(), P(O + 1);
1795
+ return;
1796
+ case "ArrowUp":
1797
+ t.preventDefault(), P(O - 1);
1798
+ return;
1799
+ case "PageDown":
1800
+ t.preventDefault(), P(O + Jn);
1801
+ return;
1802
+ case "PageUp":
1803
+ t.preventDefault(), P(O - Jn);
1804
+ return;
1805
+ case "Enter":
1806
+ if (k == null) return;
1807
+ t.preventDefault(), ce(k, t.shiftKey);
1808
+ return;
1809
+ case " ":
1810
+ if (!i || h.length > 0 || k == null) return;
1811
+ t.preventDefault(), k.kind === "branch" ? se(k.id) : oe(k.parameter.id);
1812
+ break;
1813
+ case "ArrowRight":
1814
+ if (C || k?.kind !== "branch") return;
1815
+ t.preventDefault(), k.open ? P(O + 1) : F(k.id, !0);
1816
+ return;
1817
+ case "ArrowLeft": {
1818
+ if (C || k == null) return;
1819
+ if (t.preventDefault(), k.kind === "branch" && k.open) {
1820
+ F(k.id, !1);
1821
+ return;
1822
+ }
1823
+ let n = k.kind === "branch" ? e.branches.get(k.id)?.parentId ?? null : k.parameter.branchId;
1824
+ n != null && P(T.findIndex((e) => e.key === `b:${n}`));
1825
+ break;
1826
+ }
1827
+ }
1828
+ }, ue = w != null && w.matchIds.length > 0 && w.matchIds.every((e) => n.has(e)), de;
1829
+ return de = t ? /* @__PURE__ */ H("div", {
1830
+ className: "space-y-2 p-2",
1831
+ children: [
1832
+ /* @__PURE__ */ V(A, { className: "h-7 w-full" }),
1833
+ /* @__PURE__ */ V(A, { className: "h-7 w-4/5" }),
1834
+ /* @__PURE__ */ V(A, { className: "h-7 w-3/5" })
1835
+ ]
1836
+ }) : e.listed.length === 0 ? /* @__PURE__ */ V("p", {
1837
+ className: "px-3 py-6 text-center text-sm text-muted-foreground",
1838
+ children: l ?? p("parameter_picker_none")
1839
+ }) : T.length === 0 ? /* @__PURE__ */ V("p", {
1840
+ className: "px-3 py-6 text-center text-sm text-muted-foreground",
1841
+ children: p("parameter_picker_empty")
1842
+ }) : /* @__PURE__ */ V("div", {
1843
+ className: "flex flex-col",
1844
+ children: T.map((t, r) => {
1845
+ let o = r === O, s = {
1846
+ id: M(t),
1847
+ "data-active": o ? "" : void 0,
1848
+ className: a("\n flex w-full shrink-0 cursor-default items-center gap-2 rounded-md pr-2 text-sm\n outline-none select-none\n data-active:bg-accent data-active:text-accent-foreground\n ", C ? "h-13 pl-2" : `
1849
+ h-9
1850
+ ${Xn(t.depth)}
1851
+ `),
1852
+ onPointerMove: () => {
1853
+ o || D(t.key);
1854
+ },
1855
+ onPointerDown: (e) => {
1856
+ e.preventDefault();
1857
+ }
1858
+ };
1859
+ if (t.kind === "branch") {
1860
+ let r = i ? Kn(e, t.id, n) : !1;
1861
+ return /* @__PURE__ */ H("div", {
1862
+ ...s,
1863
+ role: "treeitem",
1864
+ "aria-level": t.depth + 1,
1865
+ "aria-expanded": t.open,
1866
+ ...i ? { "aria-checked": r === "indeterminate" ? "mixed" : r } : {},
1867
+ onClick: (e) => {
1868
+ ce(t, e.shiftKey);
1869
+ },
1870
+ children: [
1871
+ /* @__PURE__ */ V(xe, {
1872
+ className: a("size-4 shrink-0 text-muted-foreground transition-transform", t.open && "rotate-90"),
1873
+ "aria-hidden": !0
1874
+ }),
1875
+ i ? /* @__PURE__ */ V(b, {
1876
+ tabIndex: -1,
1877
+ "aria-hidden": !0,
1878
+ checked: r === !0,
1879
+ indeterminate: r === "indeterminate",
1880
+ onClick: (e) => {
1881
+ e.stopPropagation();
1882
+ },
1883
+ onCheckedChange: () => {
1884
+ D(t.key), se(t.id);
1885
+ }
1886
+ }) : null,
1887
+ /* @__PURE__ */ V("span", {
1888
+ className: "min-w-0 truncate font-medium",
1889
+ children: t.name
1890
+ }),
1891
+ /* @__PURE__ */ V("span", {
1892
+ className: "shrink-0 text-xs text-muted-foreground tabular-nums",
1893
+ children: t.count
1894
+ })
1895
+ ]
1896
+ }, t.key);
1897
+ }
1898
+ let c = t.parameter, l = n.has(c.id);
1899
+ return /* @__PURE__ */ H("div", {
1900
+ ...s,
1901
+ role: C ? "option" : "treeitem",
1902
+ ...C ? {} : { "aria-level": t.depth + 1 },
1903
+ ...i ? { "aria-checked": l } : { "aria-selected": l },
1904
+ onClick: () => {
1905
+ ce(t);
1906
+ },
1907
+ children: [
1908
+ C ? null : /* @__PURE__ */ V("span", {
1909
+ className: "size-4 shrink-0",
1910
+ "aria-hidden": !0
1911
+ }),
1912
+ i ? /* @__PURE__ */ V(b, {
1913
+ tabIndex: -1,
1914
+ "aria-hidden": !0,
1915
+ checked: l
1916
+ }) : null,
1917
+ C ? /* @__PURE__ */ H("span", {
1918
+ className: "flex min-w-0 flex-1 flex-col",
1919
+ children: [/* @__PURE__ */ H("span", {
1920
+ className: "flex min-w-0 items-baseline gap-2",
1921
+ children: [/* @__PURE__ */ V("span", {
1922
+ className: "min-w-0 flex-1 truncate",
1923
+ children: /* @__PURE__ */ V(Qn, {
1924
+ text: c.name,
1925
+ tokens: S
1926
+ })
1927
+ }), /* @__PURE__ */ V(er, {
1928
+ parameter: c,
1929
+ tokens: S
1930
+ })]
1931
+ }), /* @__PURE__ */ V($n, {
1932
+ path: c.path,
1933
+ tokens: S
1934
+ })]
1935
+ }) : /* @__PURE__ */ H(ye, { children: [/* @__PURE__ */ V("span", {
1936
+ className: "min-w-0 flex-1 truncate",
1937
+ children: c.name
1938
+ }), /* @__PURE__ */ V(er, {
1939
+ parameter: c,
1940
+ tokens: S
1941
+ })] }),
1942
+ !i && l ? /* @__PURE__ */ V(be, {
1943
+ className: "size-4 shrink-0 text-primary",
1944
+ "aria-hidden": !0
1945
+ }) : null
1946
+ ]
1947
+ }, t.key);
1948
+ })
1949
+ }), /* @__PURE__ */ H("div", {
1950
+ className: a("flex min-h-0 flex-col gap-1", d),
1951
+ children: [
1952
+ /* @__PURE__ */ H(ne, { children: [
1953
+ /* @__PURE__ */ V(re, { children: /* @__PURE__ */ V(Ce, { "aria-hidden": !0 }) }),
1954
+ /* @__PURE__ */ V(ee, {
1955
+ role: "combobox",
1956
+ "aria-label": p("parameter_picker_placeholder"),
1957
+ "aria-controls": m,
1958
+ "aria-expanded": !0,
1959
+ "aria-autocomplete": "list",
1960
+ "aria-activedescendant": k == null ? void 0 : M(k),
1961
+ placeholder: p("parameter_picker_placeholder"),
1962
+ autoComplete: "off",
1963
+ spellCheck: !1,
1964
+ ...u == null ? {} : { ref: u },
1965
+ value: h,
1966
+ onChange: (e) => {
1967
+ N.current = !0, g(e.target.value), D(null), j.current?.scrollTo({ top: 0 });
1968
+ },
1969
+ onKeyDown: le
1970
+ }),
1971
+ h.length > 0 ? /* @__PURE__ */ V(re, {
1972
+ align: "inline-end",
1973
+ children: /* @__PURE__ */ V(te, {
1974
+ size: "icon-xs",
1975
+ "aria-label": p("parameter_picker_clear_search"),
1976
+ onClick: () => {
1977
+ g(""), D(null);
1978
+ },
1979
+ children: /* @__PURE__ */ V(we, {})
1980
+ })
1981
+ }) : null
1982
+ ] }),
1983
+ i && w != null && w.matchIds.length > 0 ? /* @__PURE__ */ V(ie, {
1984
+ type: "button",
1985
+ variant: "ghost",
1986
+ size: "sm",
1987
+ className: "justify-start",
1988
+ onClick: () => {
1989
+ c?.(w.matchIds, !ue);
1990
+ },
1991
+ children: p(ue ? "parameter_picker_deselect_matches" : "parameter_picker_select_matches", { count: String(w.matchIds.length) })
1992
+ }) : null,
1993
+ /* @__PURE__ */ V("div", {
1994
+ ref: j,
1995
+ id: m,
1996
+ role: C ? "listbox" : "tree",
1997
+ "aria-label": p("parameter_picker_list"),
1998
+ ...i ? { "aria-multiselectable": !0 } : {},
1999
+ className: "relative min-h-0 flex-1 overflow-y-auto overscroll-contain",
2000
+ children: de
2001
+ }),
2002
+ w != null && w.hidden > 0 ? /* @__PURE__ */ V("p", {
2003
+ className: "px-2 text-xs text-muted-foreground",
2004
+ children: p("parameter_picker_more", { count: String(w.hidden) })
2005
+ }) : null,
2006
+ f
2007
+ ]
2008
+ });
2009
+ }
2010
+ //#endregion
2011
+ //#region src/workspace/parameters/picker/picker.tsx
2012
+ function nr(t, r = {}) {
2013
+ let { include: i, includeDisabled: a } = r, o = n(), s = e.parameter.listTree.useQuery({ workspaceId: t });
2014
+ return {
2015
+ index: R(() => Bn({
2016
+ branches: s.data?.branches ?? [],
2017
+ parameters: s.data?.parameters ?? [],
2018
+ locale: o,
2019
+ include: i,
2020
+ includeDisabled: a
2021
+ }), [
2022
+ s.data,
2023
+ o,
2024
+ i,
2025
+ a
2026
+ ]),
2027
+ loading: s.isPending,
2028
+ parameters: s.data?.parameters
2029
+ };
2030
+ }
2031
+ function rr({ parameterId: e, units: t }) {
2032
+ let r = n(), i = mn(), [a, o] = B({ status: "loading" });
2033
+ return L(() => {
2034
+ let t = !0, n = () => {
2035
+ i([e]).then((n) => {
2036
+ if (!t) return;
2037
+ let r = n.get(e);
2038
+ o(r == null || N(r) ? P : r);
2039
+ });
2040
+ }, r = () => {
2041
+ document.visibilityState === "visible" && (document.removeEventListener("visibilitychange", r), n());
2042
+ };
2043
+ return document.visibilityState === "visible" ? n() : document.addEventListener("visibilitychange", r), () => {
2044
+ t = !1, document.removeEventListener("visibilitychange", r);
2045
+ };
2046
+ }, [e, i]), /* @__PURE__ */ V(Rt, {
2047
+ state: a,
2048
+ locale: r,
2049
+ unit: t ?? "",
2050
+ skeletonClassName: "h-4 w-12",
2051
+ unavailable: /* @__PURE__ */ V("span", {
2052
+ className: "text-xs font-normal text-muted-foreground",
2053
+ children: "—"
2054
+ })
2055
+ });
2056
+ }
2057
+ function ir({ parameter: e }) {
2058
+ return /* @__PURE__ */ H(ye, { children: [/* @__PURE__ */ H("span", {
2059
+ className: "@container flex min-w-0 flex-1 flex-col",
2060
+ children: [/* @__PURE__ */ H("span", {
2061
+ className: "flex min-w-0 items-baseline gap-2",
2062
+ children: [/* @__PURE__ */ V("span", {
2063
+ className: "min-w-0 truncate",
2064
+ children: e.name
2065
+ }), e.mnemonic == null ? null : /* @__PURE__ */ V("span", {
2066
+ className: "\n hidden max-w-24 shrink-0 truncate font-mono text-xs text-muted-foreground\n @xs:inline\n ",
2067
+ children: e.mnemonic
2068
+ })]
2069
+ }), e.path.length === 0 ? null : /* @__PURE__ */ V($n, { path: e.path })]
2070
+ }), /* @__PURE__ */ V("span", {
2071
+ className: "max-w-[40%] shrink-0 text-sm font-medium",
2072
+ children: /* @__PURE__ */ V(an, { children: /* @__PURE__ */ V(rr, {
2073
+ parameterId: e.id,
2074
+ units: e.units
2075
+ }, e.id) })
2076
+ })] });
2077
+ }
2078
+ function ar({ label: e, workspaceId: t, allowEmpty: n = !0, preferred: i, description: o, labelHidden: u = !1, labelSuffix: f, name: m, value: h, onChange: _, onBlur: v, invalid: b = !1, errors: ee = [] }) {
2079
+ let S = r(), te = g(), [E, ne] = B(!1), { index: re, loading: k } = nr(t), A = he(), j = z(null), M = h === "" ? void 0 : re.parameters.get(h), ae = R(() => new Set(h === "" ? [] : [h]), [h]), N = (e) => {
2080
+ ne(e), e || v?.();
2081
+ }, P = /* @__PURE__ */ V("button", {
2082
+ type: "button",
2083
+ id: A,
2084
+ ...m === void 0 ? {} : { name: m },
2085
+ "aria-invalid": b || void 0,
2086
+ className: a("\n flex min-h-11 w-full min-w-0 cursor-pointer items-center gap-2 rounded-lg border\n border-input bg-background py-1 pl-2.5 text-left text-sm shadow-xs transition-colors\n outline-none\n focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50\n disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\n aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20\n dark:bg-input/20\n dark:hover:bg-input/40\n dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\n ", n && h !== "" ? "pr-16" : "pr-9"),
2087
+ children: h === "" ? /* @__PURE__ */ V("span", {
2088
+ className: "flex-1 truncate text-muted-foreground",
2089
+ children: S("parameter_picker_choose")
2090
+ }) : M == null ? /* @__PURE__ */ V("span", {
2091
+ className: "flex-1 truncate text-muted-foreground",
2092
+ children: k ? "…" : S("parameter_picker_missing")
2093
+ }) : /* @__PURE__ */ V(ir, { parameter: M })
2094
+ }), F = /* @__PURE__ */ V(tr, {
2095
+ index: re,
2096
+ loading: k,
2097
+ selectedIds: ae,
2098
+ preferred: i,
2099
+ inputRef: j,
2100
+ className: "h-full",
2101
+ onPick: (e) => {
2102
+ _(e), N(!1);
2103
+ }
2104
+ });
2105
+ return /* @__PURE__ */ H(p, {
2106
+ "data-invalid": b ? !0 : void 0,
2107
+ children: [
2108
+ /* @__PURE__ */ H(d, {
2109
+ htmlFor: A,
2110
+ className: u ? "sr-only" : void 0,
2111
+ children: [e, f]
2112
+ }),
2113
+ /* @__PURE__ */ H("div", {
2114
+ className: "relative min-w-0",
2115
+ children: [
2116
+ te ? /* @__PURE__ */ H(x, {
2117
+ open: E,
2118
+ onOpenChange: N,
2119
+ children: [/* @__PURE__ */ V(c, { render: P }), /* @__PURE__ */ H(D, {
2120
+ className: "h-[85dvh]",
2121
+ initialFocus: j,
2122
+ children: [/* @__PURE__ */ V(y, {
2123
+ className: "pb-2",
2124
+ children: /* @__PURE__ */ V(l, { children: e })
2125
+ }), /* @__PURE__ */ V("div", {
2126
+ className: "min-h-0 flex-1 px-3 pb-3",
2127
+ children: F
2128
+ })]
2129
+ })]
2130
+ }) : /* @__PURE__ */ H(C, {
2131
+ open: E,
2132
+ onOpenChange: N,
2133
+ children: [/* @__PURE__ */ V(T, { render: P }), /* @__PURE__ */ V(w, {
2134
+ align: "start",
2135
+ "aria-label": e,
2136
+ initialFocus: j,
2137
+ className: "\n h-[min(28rem,var(--available-height))] w-[min(36rem,calc(100vw-2rem))]\n min-w-(--anchor-width) p-1.5\n ",
2138
+ children: F
2139
+ })]
2140
+ }),
2141
+ n && h !== "" ? /* @__PURE__ */ V(ie, {
2142
+ type: "button",
2143
+ variant: "ghost",
2144
+ size: "icon-xs",
2145
+ className: "absolute top-1/2 right-8 -translate-y-1/2 text-muted-foreground",
2146
+ "aria-label": S("ui_clear_selection"),
2147
+ onClick: () => {
2148
+ _(""), v?.();
2149
+ },
2150
+ children: /* @__PURE__ */ V(we, {})
2151
+ }) : null,
2152
+ /* @__PURE__ */ V(Se, {
2153
+ className: "\n pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2\n text-muted-foreground\n ",
2154
+ "aria-hidden": !0
2155
+ })
2156
+ ]
2157
+ }),
2158
+ o != null && /* @__PURE__ */ V(O, { children: o }),
2159
+ /* @__PURE__ */ V(s, { errors: [...ee] })
2160
+ ]
2161
+ });
2162
+ }
2163
+ //#endregion
2164
+ //#region src/form/fields/parameter-picker-field.tsx
2165
+ function or(e) {
2166
+ let t = K();
2167
+ return /* @__PURE__ */ V(ar, {
2168
+ ...e,
2169
+ name: t.name,
2170
+ value: t.state.value,
2171
+ onChange: t.handleChange,
2172
+ onBlur: t.handleBlur,
2173
+ invalid: !t.state.meta.isValid,
2174
+ errors: Y(t.state.meta.errors, t.name)
2175
+ });
2176
+ }
2177
+ //#endregion
2178
+ //#region src/form/fields/textarea-field.tsx
2179
+ function sr({ label: e, id: t, ...r }) {
2180
+ n();
2181
+ let i = K(), a = t ?? i.name, o = !i.state.meta.isValid, c = Y(i.state.meta.errors, i.name);
2182
+ return /* @__PURE__ */ H(p, {
2183
+ "data-invalid": o ? !0 : void 0,
2184
+ children: [
2185
+ /* @__PURE__ */ V(d, {
2186
+ htmlFor: a,
2187
+ children: e
2188
+ }),
2189
+ /* @__PURE__ */ V(k, {
2190
+ id: a,
2191
+ name: i.name,
2192
+ value: i.state.value,
2193
+ onBlur: i.handleBlur,
2194
+ onChange: (e) => {
2195
+ i.handleChange(e.target.value);
2196
+ },
2197
+ "aria-invalid": o || void 0,
2198
+ ...r
2199
+ }),
2200
+ /* @__PURE__ */ V(s, { errors: c })
2201
+ ]
2202
+ });
2203
+ }
2204
+ //#endregion
2205
+ //#region src/form/fields/text-field.tsx
2206
+ function cr({ label: e, hideLabel: t = !1, id: r, description: i, ...a }) {
2207
+ n();
2208
+ let o = K(), c = r ?? o.name, l = !o.state.meta.isValid, u = Y(o.state.meta.errors, o.name);
2209
+ return /* @__PURE__ */ H(p, {
2210
+ "data-invalid": l ? !0 : void 0,
2211
+ children: [
2212
+ /* @__PURE__ */ V(d, {
2213
+ htmlFor: c,
2214
+ className: t ? "sr-only" : void 0,
2215
+ children: e
2216
+ }),
2217
+ /* @__PURE__ */ V(S, {
2218
+ id: c,
2219
+ name: o.name,
2220
+ value: o.state.value,
2221
+ onBlur: o.handleBlur,
2222
+ onChange: (e) => {
2223
+ o.handleChange(e.target.value);
2224
+ },
2225
+ "aria-invalid": l || void 0,
2226
+ ...a
2227
+ }),
2228
+ i == null ? null : /* @__PURE__ */ V(O, { children: i }),
2229
+ /* @__PURE__ */ V(s, { errors: u })
2230
+ ]
2231
+ });
2232
+ }
2233
+ //#endregion
2234
+ //#region src/form/form-error-banner.tsx
2235
+ function lr(e) {
2236
+ if (e instanceof q) return e.read();
2237
+ if (typeof e == "string") return e;
2238
+ if (typeof e != "object" || !e || !("form" in e)) return null;
2239
+ let t = e.form;
2240
+ return t instanceof q ? t.read() : typeof t == "string" ? t : null;
2241
+ }
2242
+ function ur({ className: e }) {
2243
+ return n(), /* @__PURE__ */ V(tt().Subscribe, {
2244
+ selector: (e) => e.errorMap.onSubmit,
2245
+ children: (t) => {
2246
+ let n = lr(t);
2247
+ return n == null ? null : /* @__PURE__ */ V(s, {
2248
+ className: e,
2249
+ children: n
2250
+ });
2251
+ }
2252
+ });
2253
+ }
2254
+ //#endregion
2255
+ //#region src/form/focus-first-invalid-field.ts
2256
+ var dr = "foldable:open";
2257
+ function fr() {
2258
+ if (typeof document > "u") return;
2259
+ let e = document.querySelector("[aria-invalid=\"true\"]");
2260
+ if (e == null) return;
2261
+ let t = e;
2262
+ for (; t != null;) t.hasAttribute("data-foldable-card") && t.dispatchEvent(new Event(dr)), t = t.parentElement;
2263
+ requestAnimationFrame(() => {
2264
+ requestAnimationFrame(() => {
2265
+ e.focus();
2266
+ });
2267
+ });
2268
+ }
2269
+ //#endregion
2270
+ //#region src/form/form-root.tsx
2271
+ function pr(e) {
2272
+ if (typeof document > "u") return;
2273
+ let t = document.activeElement;
2274
+ !(t instanceof HTMLElement) || !e.contains(t) || t.blur();
2275
+ }
2276
+ function mr({ children: e, className: t, layout: n, banner: r = !0 }) {
2277
+ let i = tt();
2278
+ function o(e) {
2279
+ e.preventDefault(), e.stopPropagation(), pr(e.currentTarget);
2280
+ for (let t of e.currentTarget.elements) if (t instanceof HTMLInputElement && t.validity.customError) {
2281
+ t.reportValidity(), fr();
2282
+ return;
2283
+ }
2284
+ i.setErrorMap({ onSubmit: { fields: {} } }), i.handleSubmit();
2285
+ }
2286
+ return /* @__PURE__ */ H("form", {
2287
+ onSubmit: o,
2288
+ noValidate: !0,
2289
+ className: a(n === "dialog" && "contents", n === "dialog-fill" && "flex min-h-0 flex-1 flex-col overflow-hidden", t),
2290
+ children: [n === "dialog-fill" || !r ? null : /* @__PURE__ */ V(ur, { ...n === "dialog" ? { className: "order-1" } : {} }), e]
2291
+ });
2292
+ }
2293
+ //#endregion
2294
+ //#region src/form/submit-button.tsx
2295
+ function hr({ label: e, pendingLabel: t, className: n, variant: r, size: i, disabled: a = !1 }) {
2296
+ return /* @__PURE__ */ V(tt().Subscribe, {
2297
+ selector: (e) => e.isSubmitting,
2298
+ children: (o) => /* @__PURE__ */ V(ie, {
2299
+ type: "submit",
2300
+ disabled: a || o,
2301
+ className: n,
2302
+ variant: r,
2303
+ size: i,
2304
+ children: o ? t ?? e : e
2305
+ })
2306
+ });
2307
+ }
2308
+ //#endregion
2309
+ //#region src/form/use-app-form.ts
2310
+ var { useAppForm: gr, withForm: _r, withFieldGroup: vr } = _e({
2311
+ fieldContext: $e,
2312
+ formContext: et,
2313
+ fieldComponents: {
2314
+ TextField: cr,
2315
+ TextAreaField: sr,
2316
+ OtpField: ut,
2317
+ CheckboxField: lt,
2318
+ ParameterPickerField: or,
2319
+ DashboardPickerField: dt,
2320
+ FormulaField: Mt
2321
+ },
2322
+ formComponents: {
2323
+ FormRoot: mr,
2324
+ FormErrorBanner: ur,
2325
+ SubmitButton: hr
2326
+ }
2327
+ });
2328
+ //#endregion
2329
+ //#region src/form/map-trpc-to-form-errors.ts
2330
+ function yr(e) {
2331
+ return {
2332
+ form: e,
2333
+ fields: {}
2334
+ };
2335
+ }
2336
+ function br(e, t) {
2337
+ return { fields: { [e.field]: () => t(e) } };
2338
+ }
2339
+ function xr(e) {
2340
+ return typeof e != "object" || !e || Array.isArray(e) ? /* @__PURE__ */ new Set() : new Set(Object.keys(e));
2341
+ }
2342
+ function Sr(e, t, n) {
2343
+ if (e.length === 0) return null;
2344
+ let r = e.join("."), i = null, a = -1;
2345
+ for (let [e, o] of Object.entries(n ?? {})) (r === e || r.startsWith(`${e}.`)) && e.length > a && t.has(o) && (i = o, a = e.length);
2346
+ if (i != null) return i;
2347
+ let o = e[0];
2348
+ if (o != null && t.has(o)) return o;
2349
+ let s = e[e.length - 1];
2350
+ return s != null && t.has(s) ? s : null;
2351
+ }
2352
+ function Cr(e, n, r) {
2353
+ let i = {}, a = !1;
2354
+ for (let o of e) {
2355
+ let e = Sr(o.path, n, r);
2356
+ e == null ? a = !0 : i[e] ??= Y([o], e)[0]?.message ?? t("error_field_invalid");
2357
+ }
2358
+ return a || Object.keys(i).length === 0 ? {
2359
+ fields: i,
2360
+ form: t("error_input_invalid")
2361
+ } : { fields: i };
2362
+ }
2363
+ function wr(e, t, n = {}) {
2364
+ let r = ue(e), i = xr(t);
2365
+ if (r.message === Ee) return Cr(r.issues ?? [], i, n.fieldMap);
2366
+ let a = n.message?.(e) ?? le(e), o = r.details?.field, s = typeof o == "string" ? Sr(o.split("."), i, n.fieldMap) : null;
2367
+ if (s == null) {
2368
+ let t = de(e) ?? r.message, a = t == null ? void 0 : n.codeFields?.[t];
2369
+ s = a != null && i.has(a) ? a : null;
2370
+ }
2371
+ return s == null ? yr(a) : { fields: { [s]: a } };
2372
+ }
2373
+ //#endregion
2374
+ //#region src/form/mutation-form-validators.ts
2375
+ function Tr(e, t = () => e) {
2376
+ let n = e.form;
2377
+ return {
2378
+ ...n === void 0 ? {} : { form: new q(() => {
2379
+ let e = t().form ?? n;
2380
+ return typeof e == "function" ? e() : e;
2381
+ }) },
2382
+ fields: Object.fromEntries(Object.entries(e.fields).map(([e, n]) => [e, new q(() => {
2383
+ let r = t().fields[e] ?? n;
2384
+ return typeof r == "function" ? r() : r;
2385
+ })]))
2386
+ };
2387
+ }
2388
+ function Er(e) {
2389
+ return {
2390
+ ...e.schema === void 0 ? {} : { onSubmit: e.schema },
2391
+ onSubmitAsync: async ({ value: t }) => {
2392
+ try {
2393
+ let n = await e.submit(t);
2394
+ return n == null ? null : (queueMicrotask(() => {
2395
+ fr();
2396
+ }), Tr(n));
2397
+ } catch (n) {
2398
+ e.onError?.(n), queueMicrotask(() => {
2399
+ fr();
2400
+ });
2401
+ let r = e.mapError ?? wr;
2402
+ return Tr(r(n, t), () => r(n, t));
2403
+ }
2404
+ }
2405
+ };
2406
+ }
2407
+ //#endregion
2408
+ export { jt as $, Tn as A, un as B, jn as C, vn as D, yn as E, En as F, Rt as G, dn as H, xn as I, Ft as J, Lt as K, rn as L, _n as M, Cn as N, wn as O, Sn as P, Mt as Q, fn as R, In as S, On as T, mn as U, hn as V, zt as W, Pt as X, Q as Y, Nt as Z, nr as _, gr as a, Y as at, Mn as b, hr as c, fr as d, Et as et, ur as f, ar as g, or as h, wr as i, lt as it, gn as j, bn as k, mr as l, sr as m, br as n, dt as nt, vr as o, K as ot, cr as p, It as q, yr as r, ut as rt, _r as s, tt as st, Er as t, Dt as tt, dr as u, tr as v, Ln as w, Pn as x, Fn as y, pn as z };