@synnaxlabs/pluto 0.48.0 → 0.50.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 (718) hide show
  1. package/dist/{Animated--SNIwznU.cjs → Animated-Bm-WM4BW.cjs} +1 -1
  2. package/dist/Animated-DpzwlYqX.cjs +1 -0
  3. package/dist/{Animated-CC7iS0zH.js → Animated-DxBr38YY.js} +100 -104
  4. package/dist/{Animated-DfDp0-ep.js → Animated-eavjaVoD.js} +3 -3
  5. package/dist/Box-D27bV7QJ.cjs +1 -0
  6. package/dist/{Box-CoQUaJk2.js → Box-DLO7l9hM.js} +16 -16
  7. package/dist/Button-Cj2hR9EM.cjs +1 -0
  8. package/dist/Button-DulIBpNI.js +308 -0
  9. package/dist/{Dialog-CBDFqieV.js → Dialog-CwTHvHHD.js} +14 -14
  10. package/dist/Dialog-DJJQBUgw.cjs +1 -0
  11. package/dist/Editable-C-z-stcD.cjs +1 -0
  12. package/dist/Editable-DjQORuR1.js +201 -0
  13. package/dist/Haul-CofQrOeX.js +132 -0
  14. package/dist/Haul-gTF4QDh3.cjs +1 -0
  15. package/dist/{Items-mikdEpyC.js → Items-B5aeU-Pt.js} +276 -214
  16. package/dist/Items-DjAwxhhi.cjs +4 -0
  17. package/dist/Menu-Bjfeoaln.js +135 -0
  18. package/dist/Menu-BqfIul2o.cjs +1 -0
  19. package/dist/{Provider-DScd3hYf.js → Provider-BoQtgQtU.js} +388 -307
  20. package/dist/Provider-CKROy_xK.cjs +1 -0
  21. package/dist/Tags-B3m_Kzbp.cjs +1 -0
  22. package/dist/{Tags-DvPUmH2r.js → Tags-C38F7I5z.js} +466 -455
  23. package/dist/Text-IFQH97iK.cjs +1 -0
  24. package/dist/{Text-BbbqH88W.js → Text-TzKJ38En.js} +1015 -933
  25. package/dist/{Video-_DrutSeT.js → Video-C56z7qvH.js} +1 -1
  26. package/dist/{Video-DRSEX8t7.cjs → Video-CBPTBLTB.cjs} +1 -1
  27. package/dist/button.cjs +1 -1
  28. package/dist/button.js +1 -1
  29. package/dist/color.cjs +1 -1
  30. package/dist/color.js +1 -1
  31. package/dist/{css-Cn63X_Yv.js → css-BkBrZtKZ.js} +2063 -1585
  32. package/dist/css-D3NdC2sx.cjs +8 -0
  33. package/dist/css.cjs +1 -1
  34. package/dist/css.js +2 -2
  35. package/dist/dialog.cjs +1 -1
  36. package/dist/dialog.js +1 -1
  37. package/dist/dimensions-C7b02rFi.cjs +1 -0
  38. package/dist/{dimensions-Dclfavlh.js → dimensions-qj2CkPTy.js} +9 -9
  39. package/dist/{eraser-Bpl4bpBx.js → eraser-Bd14L_5k.js} +27 -27
  40. package/dist/eraser-DZxY0pWe.cjs +11 -0
  41. package/dist/ether.cjs +1 -1
  42. package/dist/ether.js +66 -65
  43. package/dist/{external-Bq4gfE5e.js → external-6HkYP0wd.js} +12 -12
  44. package/dist/external-B0R_yw6F.cjs +84 -0
  45. package/dist/{external-DUGcSVbJ.cjs → external-B3o5P8Yw.cjs} +1 -1
  46. package/dist/{external-CJFfVl_u.cjs → external-BIW55htp.cjs} +1 -1
  47. package/dist/external-BKkDVUP_.js +92 -0
  48. package/dist/{external-CFdDgpzj.cjs → external-BU5fnKG8.cjs} +1 -1
  49. package/dist/external-BWI-FZRf.cjs +1 -0
  50. package/dist/{external-y1Apm7j1.js → external-Bl8zTvKt.js} +105 -112
  51. package/dist/{external-BOWnCKIe.js → external-BoAcV4dI.js} +3 -3
  52. package/dist/{external-6rS2YiWR.js → external-BsdKmL37.js} +13386 -12955
  53. package/dist/external-CUHCzUJE.cjs +1 -0
  54. package/dist/{external-C0_sN1J0.js → external-CVzhqlPH.js} +1 -1
  55. package/dist/external-CkwpcNCW.cjs +1 -0
  56. package/dist/{external-B3jTkhc4.cjs → external-D4rp1QBE.cjs} +5 -5
  57. package/dist/external-D7qXEQQM.cjs +1 -0
  58. package/dist/{external-CFZ33YbY.cjs → external-DAmwuDsu.cjs} +1 -1
  59. package/dist/external-DCZMzNZX.js +70 -0
  60. package/dist/{external-8H4eB7TN.js → external-DKc3PiyN.js} +34 -35
  61. package/dist/external-DPow1FDR.cjs +1 -0
  62. package/dist/external-DlHNhR1y.cjs +1 -0
  63. package/dist/{external-D6TsHpoG.js → external-DqaHmzvp.js} +116 -113
  64. package/dist/{external-1uZLLxz-.js → external-DrcMI5oa.js} +712 -713
  65. package/dist/{external-X_eFMRtE.js → external-MvcifV4O.js} +3 -3
  66. package/dist/{external-Caetm5fI.js → external-gDa9Z0SY.js} +16 -16
  67. package/dist/flex.cjs +1 -1
  68. package/dist/flex.js +1 -1
  69. package/dist/{fontString-D7EMGjIw.js → fontString-BtjO8Met.js} +3 -3
  70. package/dist/{fontString-BcSXNOgW.cjs → fontString-CeR_vHX_.cjs} +1 -1
  71. package/dist/header.cjs +1 -1
  72. package/dist/header.js +1 -1
  73. package/dist/hooks-Ddqh5NVY.js +73 -0
  74. package/dist/hooks-Dxvxse16.cjs +1 -0
  75. package/dist/index.cjs +23 -15
  76. package/dist/index.js +24445 -23560
  77. package/dist/input.cjs +1 -1
  78. package/dist/input.js +1 -1
  79. package/dist/list.cjs +1 -1
  80. package/dist/list.js +1 -1
  81. package/dist/menu.cjs +1 -1
  82. package/dist/menu.js +1 -1
  83. package/dist/pluto.css +1 -1
  84. package/dist/provider-BmDwHwF4.cjs +78 -0
  85. package/dist/{provider-B6SgG_sT.js → provider-CfFukcDe.js} +5570 -5065
  86. package/dist/src/access/aether/external.d.ts +3 -0
  87. package/dist/src/access/aether/external.d.ts.map +1 -0
  88. package/dist/src/access/aether/index.d.ts +2 -0
  89. package/dist/src/access/aether/index.d.ts.map +1 -0
  90. package/dist/src/access/external.d.ts +4 -0
  91. package/dist/src/access/external.d.ts.map +1 -0
  92. package/dist/src/access/index.d.ts +2 -0
  93. package/dist/src/access/index.d.ts.map +1 -0
  94. package/dist/src/access/policy/CreateIcon.d.ts.map +1 -0
  95. package/dist/src/access/policy/Select.d.ts +12 -0
  96. package/dist/src/access/policy/Select.d.ts.map +1 -0
  97. package/dist/src/access/policy/aether/index.d.ts +2 -0
  98. package/dist/src/access/policy/aether/index.d.ts.map +1 -0
  99. package/dist/src/access/policy/aether/queries.d.ts +18 -0
  100. package/dist/src/access/policy/aether/queries.d.ts.map +1 -0
  101. package/dist/src/access/policy/external.d.ts +5 -0
  102. package/dist/src/access/policy/external.d.ts.map +1 -0
  103. package/dist/src/access/policy/index.d.ts +2 -0
  104. package/dist/src/access/policy/index.d.ts.map +1 -0
  105. package/dist/src/access/policy/queries.d.ts +104 -0
  106. package/dist/src/access/policy/queries.d.ts.map +1 -0
  107. package/dist/src/access/policy/queries.spec.d.ts.map +1 -0
  108. package/dist/src/access/policy/types.d.ts +2 -0
  109. package/dist/src/access/policy/types.d.ts.map +1 -0
  110. package/dist/src/access/queries.d.ts +36 -0
  111. package/dist/src/access/queries.d.ts.map +1 -0
  112. package/dist/src/access/queries.spec.d.ts.map +1 -0
  113. package/dist/src/access/role/CreateIcon.d.ts +3 -0
  114. package/dist/src/{status/core → access/role}/CreateIcon.d.ts.map +1 -1
  115. package/dist/src/access/role/Select.d.ts +9 -0
  116. package/dist/src/access/role/Select.d.ts.map +1 -0
  117. package/dist/src/access/role/aether/index.d.ts +2 -0
  118. package/dist/src/access/role/aether/index.d.ts.map +1 -0
  119. package/dist/src/access/role/aether/queries.d.ts +14 -0
  120. package/dist/src/access/role/aether/queries.d.ts.map +1 -0
  121. package/dist/src/access/role/external.d.ts +4 -0
  122. package/dist/src/access/role/external.d.ts.map +1 -0
  123. package/dist/src/access/role/index.d.ts +2 -0
  124. package/dist/src/access/role/index.d.ts.map +1 -0
  125. package/dist/src/access/role/queries.d.ts +57 -0
  126. package/dist/src/access/role/queries.d.ts.map +1 -0
  127. package/dist/src/access/role/queries.spec.d.ts.map +1 -0
  128. package/dist/src/aether/aether/aether.d.ts +86 -10
  129. package/dist/src/aether/aether/aether.d.ts.map +1 -1
  130. package/dist/src/aether/aether/aether.spec.d.ts.map +1 -1
  131. package/dist/src/aether/main.d.ts +34 -12
  132. package/dist/src/aether/main.d.ts.map +1 -1
  133. package/dist/src/aether/message.d.ts +31 -6
  134. package/dist/src/aether/message.d.ts.map +1 -1
  135. package/dist/src/aether/test/index.d.ts +2 -0
  136. package/dist/src/aether/test/index.d.ts.map +1 -0
  137. package/dist/src/aether/test/provider.d.ts +4 -0
  138. package/dist/src/aether/test/provider.d.ts.map +1 -0
  139. package/dist/src/aether/test/provider.spec.d.ts +2 -0
  140. package/dist/src/aether/test/provider.spec.d.ts.map +1 -0
  141. package/dist/src/alamos/Provider.d.ts +0 -5
  142. package/dist/src/alamos/Provider.d.ts.map +1 -1
  143. package/dist/src/alamos/aether/alamos.d.ts +4 -4
  144. package/dist/src/arc/handle/Base.d.ts +8 -0
  145. package/dist/src/arc/handle/{Core.d.ts.map → Base.d.ts.map} +1 -1
  146. package/dist/src/arc/handle/Sink.d.ts +2 -2
  147. package/dist/src/arc/handle/Source.d.ts +2 -2
  148. package/dist/src/arc/queries.d.ts +33 -10
  149. package/dist/src/arc/queries.d.ts.map +1 -1
  150. package/dist/src/button/Button.d.ts +2 -2
  151. package/dist/src/button/Button.d.ts.map +1 -1
  152. package/dist/src/button/Toggle.d.ts.map +1 -1
  153. package/dist/src/channel/LinePlot.d.ts +7 -6
  154. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  155. package/dist/src/channel/Select.d.ts.map +1 -1
  156. package/dist/src/channel/queries.d.ts +27 -26
  157. package/dist/src/channel/queries.d.ts.map +1 -1
  158. package/dist/src/color/BaseSwatch.d.ts.map +1 -1
  159. package/dist/src/color/Picker.d.ts.map +1 -1
  160. package/dist/src/color/Provider.d.ts +2 -1
  161. package/dist/src/color/Provider.d.ts.map +1 -1
  162. package/dist/src/color/Swatch.d.ts.map +1 -1
  163. package/dist/src/component/SelectSize.d.ts.map +1 -1
  164. package/dist/src/context/context.d.ts +28 -0
  165. package/dist/src/context/context.d.ts.map +1 -0
  166. package/dist/src/context/context.spec.d.ts +2 -0
  167. package/dist/src/context/context.spec.d.ts.map +1 -0
  168. package/dist/src/context/index.d.ts +2 -0
  169. package/dist/src/context/index.d.ts.map +1 -0
  170. package/dist/src/css/bem.d.ts +2 -2
  171. package/dist/src/css/css.d.ts +1 -1
  172. package/dist/src/{hardware/device → device}/Select.d.ts +2 -2
  173. package/dist/src/device/Select.d.ts.map +1 -0
  174. package/dist/src/{hardware/device → device}/StatusIndicator.d.ts +1 -1
  175. package/dist/src/device/StatusIndicator.d.ts.map +1 -0
  176. package/dist/src/device/external.d.ts.map +1 -0
  177. package/dist/src/device/index.d.ts.map +1 -0
  178. package/dist/src/{hardware/device → device}/queries.d.ts +13 -17
  179. package/dist/src/device/queries.d.ts.map +1 -0
  180. package/dist/src/device/queries.spec.d.ts +2 -0
  181. package/dist/src/device/queries.spec.d.ts.map +1 -0
  182. package/dist/src/dialog/Frame.d.ts +8 -7
  183. package/dist/src/dialog/Frame.d.ts.map +1 -1
  184. package/dist/src/direction/Select.d.ts +2 -2
  185. package/dist/src/direction/Select.d.ts.map +1 -1
  186. package/dist/src/errors/Boundary.d.ts +29 -0
  187. package/dist/src/errors/Boundary.d.ts.map +1 -0
  188. package/dist/src/errors/Fallback.d.ts +32 -0
  189. package/dist/src/errors/Fallback.d.ts.map +1 -0
  190. package/dist/src/errors/errors.spec.d.ts +2 -0
  191. package/dist/src/errors/errors.spec.d.ts.map +1 -0
  192. package/dist/src/errors/external.d.ts +3 -0
  193. package/dist/src/errors/external.d.ts.map +1 -0
  194. package/dist/src/errors/index.d.ts +2 -0
  195. package/dist/src/errors/index.d.ts.map +1 -0
  196. package/dist/src/flex/Box.d.ts +4 -4
  197. package/dist/src/flux/Provider.d.ts +2 -2
  198. package/dist/src/flux/Provider.d.ts.map +1 -1
  199. package/dist/src/flux/aether/external.d.ts +4 -4
  200. package/dist/src/flux/aether/provider.d.ts +7 -7
  201. package/dist/src/flux/{core → base}/client.d.ts.map +1 -1
  202. package/dist/src/flux/{core → base}/external.d.ts.map +1 -1
  203. package/dist/src/flux/base/index.d.ts +2 -0
  204. package/dist/src/flux/base/index.d.ts.map +1 -0
  205. package/dist/src/flux/{core → base}/store.d.ts +7 -7
  206. package/dist/src/flux/base/store.d.ts.map +1 -0
  207. package/dist/src/flux/base/store.spec.d.ts.map +1 -0
  208. package/dist/src/flux/{core → base}/streamer.d.ts +3 -3
  209. package/dist/src/flux/{core → base}/streamer.d.ts.map +1 -1
  210. package/dist/src/flux/base/streamer.spec.d.ts.map +1 -0
  211. package/dist/src/flux/{core → base}/types.d.ts.map +1 -1
  212. package/dist/src/flux/external.d.ts +3 -3
  213. package/dist/src/flux/form.d.ts +15 -15
  214. package/dist/src/flux/form.d.ts.map +1 -1
  215. package/dist/src/flux/list.d.ts +14 -14
  216. package/dist/src/flux/list.d.ts.map +1 -1
  217. package/dist/src/flux/retrieve.d.ts +22 -22
  218. package/dist/src/flux/retrieve.d.ts.map +1 -1
  219. package/dist/src/flux/update.d.ts +34 -32
  220. package/dist/src/flux/update.d.ts.map +1 -1
  221. package/dist/src/form/Context.d.ts +4 -3
  222. package/dist/src/form/Context.d.ts.map +1 -1
  223. package/dist/src/form/Field.d.ts +2 -2
  224. package/dist/src/form/Field.d.ts.map +1 -1
  225. package/dist/src/form/external.d.ts +0 -1
  226. package/dist/src/form/external.d.ts.map +1 -1
  227. package/dist/src/form/use.d.ts.map +1 -1
  228. package/dist/src/form/useField.d.ts.map +1 -1
  229. package/dist/src/group/queries.d.ts +5 -5
  230. package/dist/src/group/queries.d.ts.map +1 -1
  231. package/dist/src/haul/Haul.d.ts +10 -10
  232. package/dist/src/haul/Haul.d.ts.map +1 -1
  233. package/dist/src/header/ButtonTitle.d.ts.map +1 -1
  234. package/dist/src/header/Header.d.ts +2 -1
  235. package/dist/src/header/Header.d.ts.map +1 -1
  236. package/dist/src/hooks/index.d.ts +0 -1
  237. package/dist/src/hooks/index.d.ts.map +1 -1
  238. package/dist/src/hooks/useAsyncEffect.d.ts +2 -2
  239. package/dist/src/hooks/useAsyncEffect.d.ts.map +1 -1
  240. package/dist/src/hooks/useDestructors.d.ts +2 -2
  241. package/dist/src/hooks/useDestructors.d.ts.map +1 -1
  242. package/dist/src/icon/Icon.d.ts +1 -1
  243. package/dist/src/icon/Icon.d.ts.map +1 -1
  244. package/dist/src/icon/registry.d.ts +19 -0
  245. package/dist/src/icon/registry.d.ts.map +1 -1
  246. package/dist/src/index.d.ts +7 -4
  247. package/dist/src/index.d.ts.map +1 -1
  248. package/dist/src/input/Boolean.d.ts.map +1 -1
  249. package/dist/src/input/Date.d.ts.map +1 -1
  250. package/dist/src/input/DateTime.d.ts.map +1 -1
  251. package/dist/src/input/DragButton.d.ts.map +1 -1
  252. package/dist/src/input/HelpText.d.ts.map +1 -1
  253. package/dist/src/input/Label.d.ts.map +1 -1
  254. package/dist/src/input/Numeric.d.ts.map +1 -1
  255. package/dist/src/input/Text.d.ts +1 -1
  256. package/dist/src/input/Text.d.ts.map +1 -1
  257. package/dist/src/input/Time.d.ts.map +1 -1
  258. package/dist/src/label/Select.d.ts.map +1 -1
  259. package/dist/src/label/queries.d.ts +8 -8
  260. package/dist/src/label/queries.d.ts.map +1 -1
  261. package/dist/src/lineplot/Axis.d.ts.map +1 -1
  262. package/dist/src/lineplot/Legend.d.ts +4 -4
  263. package/dist/src/lineplot/Legend.d.ts.map +1 -1
  264. package/dist/src/lineplot/Line.d.ts +2 -2
  265. package/dist/src/lineplot/LinePlot.d.ts +14 -8
  266. package/dist/src/lineplot/LinePlot.d.ts.map +1 -1
  267. package/dist/src/lineplot/Viewport.d.ts +2 -2
  268. package/dist/src/lineplot/aether/LinePlot.d.ts +25 -13
  269. package/dist/src/lineplot/aether/LinePlot.d.ts.map +1 -1
  270. package/dist/src/lineplot/aether/XAxis.d.ts +28 -28
  271. package/dist/src/lineplot/aether/YAxis.d.ts +30 -30
  272. package/dist/src/lineplot/aether/axis.d.ts +17 -17
  273. package/dist/src/lineplot/aether/external.d.ts +0 -1
  274. package/dist/src/lineplot/aether/external.d.ts.map +1 -1
  275. package/dist/src/lineplot/external.d.ts +0 -1
  276. package/dist/src/lineplot/external.d.ts.map +1 -1
  277. package/dist/src/lineplot/queries.d.ts +3 -3
  278. package/dist/src/lineplot/queries.d.ts.map +1 -1
  279. package/dist/src/lineplot/range/Annotation.d.ts.map +1 -1
  280. package/dist/src/lineplot/range/aether/annotation.d.ts +4 -4
  281. package/dist/src/lineplot/range/aether/provider.d.ts +2 -2
  282. package/dist/src/lineplot/range/aether/provider.d.ts.map +1 -1
  283. package/dist/src/lineplot/tooltip/Tooltip.d.ts.map +1 -1
  284. package/dist/src/lineplot/tooltip/aether/tooltip.d.ts +26 -26
  285. package/dist/src/list/Frame.d.ts +4 -3
  286. package/dist/src/list/Frame.d.ts.map +1 -1
  287. package/dist/src/list/Items.d.ts.map +1 -1
  288. package/dist/src/list/useKeysData.d.ts.map +1 -1
  289. package/dist/src/log/Log.d.ts +2 -2
  290. package/dist/src/log/Log.d.ts.map +1 -1
  291. package/dist/src/log/aether/Log.d.ts +32 -32
  292. package/dist/src/log/aether/Log.d.ts.map +1 -1
  293. package/dist/src/log/queries.d.ts +3 -3
  294. package/dist/src/log/queries.d.ts.map +1 -1
  295. package/dist/src/menu/ContextMenu.d.ts +3 -2
  296. package/dist/src/menu/ContextMenu.d.ts.map +1 -1
  297. package/dist/src/menu/Divider.d.ts +3 -0
  298. package/dist/src/menu/Divider.d.ts.map +1 -0
  299. package/dist/src/menu/Menu.d.ts +2 -2
  300. package/dist/src/menu/Menu.d.ts.map +1 -1
  301. package/dist/src/menu/external.d.ts +1 -0
  302. package/dist/src/menu/external.d.ts.map +1 -1
  303. package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
  304. package/dist/src/nav/Bar.d.ts +3 -3
  305. package/dist/src/nav/Drawer.d.ts.map +1 -1
  306. package/dist/src/notation/Select.d.ts +2 -2
  307. package/dist/src/notation/Select.d.ts.map +1 -1
  308. package/dist/src/ontology/aether/queries.d.ts.map +1 -1
  309. package/dist/src/ontology/queries.d.ts +8 -8
  310. package/dist/src/ontology/queries.d.ts.map +1 -1
  311. package/dist/src/pluto/Pluto.d.ts +11 -5
  312. package/dist/src/pluto/Pluto.d.ts.map +1 -1
  313. package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
  314. package/dist/src/{hardware/rack → rack}/Select.d.ts +3 -3
  315. package/dist/src/rack/Select.d.ts.map +1 -0
  316. package/dist/src/{hardware/rack → rack}/StatusIndicator.d.ts +1 -1
  317. package/dist/src/rack/StatusIndicator.d.ts.map +1 -0
  318. package/dist/src/rack/external.d.ts.map +1 -0
  319. package/dist/src/rack/index.d.ts.map +1 -0
  320. package/dist/src/{hardware/rack → rack}/queries.d.ts +7 -9
  321. package/dist/src/rack/queries.d.ts.map +1 -0
  322. package/dist/src/rack/queries.spec.d.ts +2 -0
  323. package/dist/src/rack/queries.spec.d.ts.map +1 -0
  324. package/dist/src/ranger/Breadcrumb.d.ts +2 -2
  325. package/dist/src/ranger/Select.d.ts +2 -2
  326. package/dist/src/ranger/Select.d.ts.map +1 -1
  327. package/dist/src/ranger/SelectStage.d.ts.map +1 -1
  328. package/dist/src/ranger/queries.d.ts +7 -7
  329. package/dist/src/ranger/queries.d.ts.map +1 -1
  330. package/dist/src/resize/{Core.d.ts → Base.d.ts} +3 -3
  331. package/dist/src/resize/{Core.d.ts.map → Base.d.ts.map} +1 -1
  332. package/dist/src/resize/Single.d.ts +2 -2
  333. package/dist/src/resize/Single.d.ts.map +1 -1
  334. package/dist/src/resize/external.d.ts +1 -1
  335. package/dist/src/schematic/Schematic.d.ts.map +1 -1
  336. package/dist/src/schematic/edge/paths.d.ts.map +1 -1
  337. package/dist/src/schematic/queries.d.ts +5 -5
  338. package/dist/src/schematic/queries.d.ts.map +1 -1
  339. package/dist/src/schematic/symbol/Primitives.d.ts +7 -7
  340. package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -1
  341. package/dist/src/schematic/symbol/SelectOrientation.d.ts +2 -2
  342. package/dist/src/schematic/symbol/SelectOrientation.d.ts.map +1 -1
  343. package/dist/src/schematic/symbol/Symbols.d.ts +13 -13
  344. package/dist/src/schematic/symbol/Symbols.d.ts.map +1 -1
  345. package/dist/src/schematic/symbol/external.d.ts +1 -0
  346. package/dist/src/schematic/symbol/external.d.ts.map +1 -1
  347. package/dist/src/schematic/symbol/queries.d.ts +12 -10
  348. package/dist/src/schematic/symbol/queries.d.ts.map +1 -1
  349. package/dist/src/schematic/symbol/registry.d.ts +3 -3
  350. package/dist/src/select/Button.d.ts +3 -3
  351. package/dist/src/select/Button.d.ts.map +1 -1
  352. package/dist/src/select/Dialog.d.ts +3 -3
  353. package/dist/src/select/Dialog.d.ts.map +1 -1
  354. package/dist/src/select/Frame.d.ts +1 -1
  355. package/dist/src/select/Frame.d.ts.map +1 -1
  356. package/dist/src/select/Multiple.d.ts +3 -3
  357. package/dist/src/select/Multiple.d.ts.map +1 -1
  358. package/dist/src/select/MultipleTrigger.d.ts.map +1 -1
  359. package/dist/src/select/Single.d.ts.map +1 -1
  360. package/dist/src/select/Static.d.ts +2 -2
  361. package/dist/src/select/Static.d.ts.map +1 -1
  362. package/dist/src/select/flex/Alignment.d.ts.map +1 -1
  363. package/dist/src/select/text/Level.d.ts +1 -1
  364. package/dist/src/select/text/Weight.d.ts +1 -1
  365. package/dist/src/select/use.d.ts +2 -2
  366. package/dist/src/select/use.d.ts.map +1 -1
  367. package/dist/src/showcase/InputShowcase.d.ts +7 -7
  368. package/dist/src/showcase/InputShowcase.d.ts.map +1 -1
  369. package/dist/src/showcase/TagShowcase.d.ts.map +1 -1
  370. package/dist/src/state/state.d.ts +2 -1
  371. package/dist/src/state/state.d.ts.map +1 -1
  372. package/dist/src/state/state.spec.d.ts +2 -0
  373. package/dist/src/state/state.spec.d.ts.map +1 -0
  374. package/dist/src/status/Select.d.ts +2 -2
  375. package/dist/src/status/Select.d.ts.map +1 -1
  376. package/dist/src/status/SelectVariant.d.ts +2 -2
  377. package/dist/src/status/SelectVariant.d.ts.map +1 -1
  378. package/dist/src/status/aether/aggregator.d.ts +1 -1
  379. package/dist/src/status/aether/errorHandler.d.ts.map +1 -1
  380. package/dist/src/status/{core → base}/Aggregator.d.ts +2 -2
  381. package/dist/src/status/base/Aggregator.d.ts.map +1 -0
  382. package/dist/src/status/base/Aggregator.spec.d.ts.map +1 -0
  383. package/dist/src/status/base/CreateIcon.d.ts +3 -0
  384. package/dist/src/status/base/CreateIcon.d.ts.map +1 -0
  385. package/dist/src/status/{core → base}/Indicator.d.ts.map +1 -1
  386. package/dist/src/status/{core → base}/Notification.d.ts.map +1 -1
  387. package/dist/src/status/base/Notification.spec.d.ts.map +1 -0
  388. package/dist/src/status/{core → base}/Summary.d.ts.map +1 -1
  389. package/dist/src/status/{core → base}/colors.d.ts.map +1 -1
  390. package/dist/src/status/{core → base}/external.d.ts.map +1 -1
  391. package/dist/src/status/base/index.d.ts.map +1 -0
  392. package/dist/src/status/external.d.ts +1 -1
  393. package/dist/src/status/queries.d.ts +13 -13
  394. package/dist/src/status/queries.d.ts.map +1 -1
  395. package/dist/src/steps/Steps.d.ts.map +1 -1
  396. package/dist/src/store/store.d.ts +2 -2
  397. package/dist/src/store/store.d.ts.map +1 -1
  398. package/dist/src/synnax/Provider.d.ts.map +1 -1
  399. package/dist/src/synnax/aether/provider.d.ts +3 -3
  400. package/dist/src/table/Table.d.ts.map +1 -1
  401. package/dist/src/table/aether/Table.d.ts +12 -12
  402. package/dist/src/table/cells/Cells.d.ts +7 -7
  403. package/dist/src/table/cells/Forms.d.ts.map +1 -1
  404. package/dist/src/table/queries.d.ts +3 -3
  405. package/dist/src/table/queries.d.ts.map +1 -1
  406. package/dist/src/tabs/Selector.d.ts.map +1 -1
  407. package/dist/src/tabs/Tabs.d.ts.map +1 -1
  408. package/dist/src/tabs/useContext.d.ts +4 -4
  409. package/dist/src/tabs/useContext.d.ts.map +1 -1
  410. package/dist/src/tag/Tag.d.ts +2 -2
  411. package/dist/src/tag/Tag.d.ts.map +1 -1
  412. package/dist/src/task/index.d.ts.map +1 -0
  413. package/dist/src/{hardware/task → task}/queries.d.ts +17 -35
  414. package/dist/src/task/queries.d.ts.map +1 -0
  415. package/dist/src/task/queries.spec.d.ts +2 -0
  416. package/dist/src/task/queries.spec.d.ts.map +1 -0
  417. package/dist/src/telem/SelectDataType.d.ts.map +1 -1
  418. package/dist/src/telem/aether/context.d.ts +4 -4
  419. package/dist/src/telem/aether/context.d.ts.map +1 -1
  420. package/dist/src/telem/aether/factory.d.ts +2 -2
  421. package/dist/src/telem/aether/factory.d.ts.map +1 -1
  422. package/dist/src/telem/aether/pipeline.d.ts +2 -2
  423. package/dist/src/telem/aether/pipeline.d.ts.map +1 -1
  424. package/dist/src/telem/aether/provider.d.ts +4 -14
  425. package/dist/src/telem/aether/provider.d.ts.map +1 -1
  426. package/dist/src/telem/aether/remote.d.ts +4 -4
  427. package/dist/src/telem/aether/remote.d.ts.map +1 -1
  428. package/dist/src/telem/aether/static.d.ts +11 -11
  429. package/dist/src/telem/aether/telem.d.ts +2 -2
  430. package/dist/src/telem/aether/telem.d.ts.map +1 -1
  431. package/dist/src/telem/aether/test/external.d.ts +4 -0
  432. package/dist/src/telem/aether/test/external.d.ts.map +1 -0
  433. package/dist/src/telem/aether/test/factory.d.ts +11 -0
  434. package/dist/src/telem/aether/test/factory.d.ts.map +1 -0
  435. package/dist/src/telem/aether/test/factory.spec.d.ts +2 -0
  436. package/dist/src/telem/aether/test/factory.spec.d.ts.map +1 -0
  437. package/dist/src/telem/aether/test/index.d.ts +2 -0
  438. package/dist/src/telem/aether/test/index.d.ts.map +1 -0
  439. package/dist/src/telem/aether/test/sink.d.ts +18 -0
  440. package/dist/src/telem/aether/test/sink.d.ts.map +1 -0
  441. package/dist/src/telem/aether/test/sink.spec.d.ts +2 -0
  442. package/dist/src/telem/aether/test/sink.spec.d.ts.map +1 -0
  443. package/dist/src/telem/aether/test/source.d.ts +17 -0
  444. package/dist/src/telem/aether/test/source.d.ts.map +1 -0
  445. package/dist/src/telem/aether/test/source.spec.d.ts +2 -0
  446. package/dist/src/telem/aether/test/source.spec.d.ts.map +1 -0
  447. package/dist/src/telem/aether/transformers.d.ts +30 -30
  448. package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
  449. package/dist/src/telem/client/client.d.ts +4 -4
  450. package/dist/src/telem/client/client.d.ts.map +1 -1
  451. package/dist/src/telem/client/streamer.d.ts +2 -2
  452. package/dist/src/telem/client/streamer.d.ts.map +1 -1
  453. package/dist/src/telem/control/Chip.d.ts.map +1 -1
  454. package/dist/src/telem/control/Controller.d.ts +4 -1
  455. package/dist/src/telem/control/Controller.d.ts.map +1 -1
  456. package/dist/src/telem/control/Indicator.d.ts.map +1 -1
  457. package/dist/src/telem/control/Legend.d.ts +2 -2
  458. package/dist/src/telem/control/aether/chip.d.ts +10 -10
  459. package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
  460. package/dist/src/telem/control/aether/controller.d.ts +20 -9
  461. package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
  462. package/dist/src/telem/control/aether/indicator.d.ts +13 -13
  463. package/dist/src/telem/control/aether/legend.d.ts +4 -4
  464. package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
  465. package/dist/src/telem/control/aether/state.d.ts +3 -3
  466. package/dist/src/telem/control/aether/state.d.ts.map +1 -1
  467. package/dist/src/telem/test/external.d.ts +2 -0
  468. package/dist/src/telem/test/external.d.ts.map +1 -0
  469. package/dist/src/telem/test/index.d.ts +2 -0
  470. package/dist/src/telem/test/index.d.ts.map +1 -0
  471. package/dist/src/telem/test/wrapper.d.ts +9 -0
  472. package/dist/src/telem/test/wrapper.d.ts.map +1 -0
  473. package/dist/src/telem/text/TimeRange.d.ts.map +1 -1
  474. package/dist/src/testutil/Synnax.d.ts +0 -5
  475. package/dist/src/testutil/Synnax.d.ts.map +1 -1
  476. package/dist/src/text/Text.d.ts +3 -2
  477. package/dist/src/text/Text.d.ts.map +1 -1
  478. package/dist/src/text/{core → base}/dimensions.d.ts +5 -5
  479. package/dist/src/text/{core → base}/dimensions.d.ts.map +1 -1
  480. package/dist/src/text/base/dimensions.spec.d.ts.map +1 -0
  481. package/dist/src/text/base/external.d.ts.map +1 -0
  482. package/dist/src/text/base/index.d.ts.map +1 -0
  483. package/dist/src/text/{core → base}/types.d.ts +2 -2
  484. package/dist/src/text/{core → base}/types.d.ts.map +1 -1
  485. package/dist/src/text/external.d.ts +2 -2
  486. package/dist/src/theming/Provider.d.ts +2 -1
  487. package/dist/src/theming/Provider.d.ts.map +1 -1
  488. package/dist/src/theming/aether/external.d.ts +2 -2
  489. package/dist/src/theming/aether/provider.d.ts +142 -142
  490. package/dist/src/theming/{core → base}/fontString.d.ts +1 -1
  491. package/dist/src/theming/{core → base}/fontString.d.ts.map +1 -1
  492. package/dist/src/theming/{core → base}/theme.d.ts +135 -135
  493. package/dist/src/theming/{core → base}/theme.d.ts.map +1 -1
  494. package/dist/src/theming/css.d.ts +1 -1
  495. package/dist/src/theming/external.d.ts +1 -1
  496. package/dist/src/tooltip/Config.d.ts +4 -3
  497. package/dist/src/tooltip/Config.d.ts.map +1 -1
  498. package/dist/src/tree/Context.d.ts +2 -12
  499. package/dist/src/tree/Context.d.ts.map +1 -1
  500. package/dist/src/tree/Tree.d.ts +1 -1
  501. package/dist/src/tree/Tree.d.ts.map +1 -1
  502. package/dist/src/tree/{core.d.ts → base.d.ts} +1 -1
  503. package/dist/src/tree/{core.d.ts.map → base.d.ts.map} +1 -1
  504. package/dist/src/tree/base.spec.d.ts +2 -0
  505. package/dist/src/tree/base.spec.d.ts.map +1 -0
  506. package/dist/src/tree/external.d.ts +1 -1
  507. package/dist/src/triggers/Provider.d.ts +4 -3
  508. package/dist/src/triggers/Provider.d.ts.map +1 -1
  509. package/dist/src/triggers/Text.d.ts +2 -2
  510. package/dist/src/triggers/triggers.d.ts +21 -21
  511. package/dist/src/user/CreateIcon.d.ts +3 -0
  512. package/dist/src/user/CreateIcon.d.ts.map +1 -0
  513. package/dist/src/user/external.d.ts +1 -0
  514. package/dist/src/user/external.d.ts.map +1 -1
  515. package/dist/src/user/queries.d.ts +6 -4
  516. package/dist/src/user/queries.d.ts.map +1 -1
  517. package/dist/src/view/index.d.ts +2 -0
  518. package/dist/src/view/index.d.ts.map +1 -0
  519. package/dist/src/view/queries.d.ts +35 -0
  520. package/dist/src/view/queries.d.ts.map +1 -0
  521. package/dist/src/view/queries.spec.d.ts +2 -0
  522. package/dist/src/view/queries.spec.d.ts.map +1 -0
  523. package/dist/src/viewport/Mask.d.ts.map +1 -1
  524. package/dist/src/viewport/SelectMode.d.ts.map +1 -1
  525. package/dist/src/viewport/use.d.ts +1 -1
  526. package/dist/src/vis/axis/axis.d.ts +5 -5
  527. package/dist/src/vis/axis/ticks.d.ts +2 -2
  528. package/dist/src/vis/button/aether/button.d.ts +23 -14
  529. package/dist/src/vis/button/aether/button.d.ts.map +1 -1
  530. package/dist/src/vis/button/aether/button.spec.d.ts +2 -0
  531. package/dist/src/vis/button/aether/button.spec.d.ts.map +1 -0
  532. package/dist/src/vis/button/use.d.ts +1 -1
  533. package/dist/src/vis/button/use.d.ts.map +1 -1
  534. package/dist/src/vis/canvas/aether/canvas.d.ts +4 -4
  535. package/dist/src/vis/diagram/Diagram.d.ts +8 -12
  536. package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
  537. package/dist/src/vis/diagram/aether/Diagram.d.ts +9 -9
  538. package/dist/src/vis/diagram/aether/types.d.ts +2 -2
  539. package/dist/src/vis/diagram/align.d.ts +7 -2
  540. package/dist/src/vis/diagram/align.d.ts.map +1 -1
  541. package/dist/src/vis/draw2d/canvas.d.ts +2 -2
  542. package/dist/src/vis/draw2d/canvas.d.ts.map +1 -1
  543. package/dist/src/vis/draw2d/index.d.ts +1 -1
  544. package/dist/src/vis/draw2d/index.d.ts.map +1 -1
  545. package/dist/src/vis/eraser/aether/eraser.d.ts +2 -2
  546. package/dist/src/vis/gauge/aether/gauge.d.ts +61 -61
  547. package/dist/src/vis/gauge/use.d.ts +20 -20
  548. package/dist/src/vis/input/aether/input.d.ts +11 -6
  549. package/dist/src/vis/input/aether/input.d.ts.map +1 -1
  550. package/dist/src/vis/input/use.d.ts.map +1 -1
  551. package/dist/src/vis/legend/Container.d.ts +3 -29
  552. package/dist/src/vis/legend/Container.d.ts.map +1 -1
  553. package/dist/src/vis/legend/Entries.d.ts +2 -2
  554. package/dist/src/vis/legend/Entries.d.ts.map +1 -1
  555. package/dist/src/vis/legend/Grouped.d.ts.map +1 -1
  556. package/dist/src/vis/legend/Simple.d.ts +2 -2
  557. package/dist/src/vis/legend/Simple.d.ts.map +1 -1
  558. package/dist/src/vis/light/aether/light.d.ts +6 -6
  559. package/dist/src/vis/light/aether/light.d.ts.map +1 -1
  560. package/dist/src/vis/line/Line.d.ts +2 -2
  561. package/dist/src/vis/line/Line.d.ts.map +1 -1
  562. package/dist/src/vis/line/aether/line.d.ts +5 -5
  563. package/dist/src/vis/line/aether/line.d.ts.map +1 -1
  564. package/dist/src/vis/measure/aether/measure.d.ts +29 -29
  565. package/dist/src/vis/render/GLProgram.d.ts +2 -2
  566. package/dist/src/vis/render/GLProgram.d.ts.map +1 -1
  567. package/dist/src/vis/render/context.d.ts +2 -2
  568. package/dist/src/vis/render/context.d.ts.map +1 -1
  569. package/dist/src/vis/render/loop.d.ts +1 -1
  570. package/dist/src/vis/render/performance.d.ts +2 -2
  571. package/dist/src/vis/render/performance.d.ts.map +1 -1
  572. package/dist/src/vis/rule/Rule.d.ts.map +1 -1
  573. package/dist/src/vis/rule/aether/aether.d.ts +6 -6
  574. package/dist/src/vis/setpoint/aether/setpoint.d.ts +21 -16
  575. package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
  576. package/dist/src/vis/setpoint/use.d.ts.map +1 -1
  577. package/dist/src/vis/text/atlas.d.ts.map +1 -1
  578. package/dist/src/vis/toggle/aether/toggle.d.ts +22 -13
  579. package/dist/src/vis/toggle/aether/toggle.d.ts.map +1 -1
  580. package/dist/src/vis/toggle/aether/toggle.spec.d.ts +2 -0
  581. package/dist/src/vis/toggle/aether/toggle.spec.d.ts.map +1 -0
  582. package/dist/src/vis/toggle/use.d.ts +1 -1
  583. package/dist/src/vis/toggle/use.d.ts.map +1 -1
  584. package/dist/src/vis/value/aether/value.d.ts +75 -75
  585. package/dist/src/vis/value/use.d.ts +25 -25
  586. package/dist/src/worker/Context.d.ts +2 -0
  587. package/dist/src/worker/Context.d.ts.map +1 -1
  588. package/dist/src/workspace/queries.d.ts +10 -8
  589. package/dist/src/workspace/queries.d.ts.map +1 -1
  590. package/dist/tabs.cjs +1 -1
  591. package/dist/tabs.js +1 -1
  592. package/dist/text.cjs +1 -1
  593. package/dist/text.js +2 -2
  594. package/dist/theme.css +1 -1
  595. package/dist/theming.cjs +1 -1
  596. package/dist/theming.js +2 -2
  597. package/dist/tree.cjs +1 -1
  598. package/dist/tree.js +1 -1
  599. package/dist/triggers.cjs +1 -1
  600. package/dist/triggers.js +1 -1
  601. package/dist/types-B5-Tni3G.js +82 -0
  602. package/dist/types-C0tUDfsz.cjs +1 -0
  603. package/dist/units-Bd_mf9Ye.cjs +1 -0
  604. package/dist/{units-cBd5OJg4.js → units-CEfK1L7C.js} +1 -1
  605. package/dist/value-0g5Cxim9.cjs +53 -0
  606. package/dist/{value-UJNdARAu.js → value-C-e017qO.js} +2745 -2725
  607. package/dist/video.cjs +1 -1
  608. package/dist/video.js +1 -1
  609. package/package.json +23 -21
  610. package/dist/Animated-TMpTdCqK.cjs +0 -1
  611. package/dist/Box-Ds_D3xR_.cjs +0 -1
  612. package/dist/Button-BaMa3eGI.cjs +0 -1
  613. package/dist/Button-NgDHbsf8.js +0 -306
  614. package/dist/Dialog-BL8T9CVw.cjs +0 -1
  615. package/dist/Editable-C7KPD0hC.js +0 -193
  616. package/dist/Editable-CWt3zqDm.cjs +0 -1
  617. package/dist/Haul-Be1j5BU3.js +0 -128
  618. package/dist/Haul-D1WaI_xE.cjs +0 -1
  619. package/dist/Items-BYlg9bb-.cjs +0 -4
  620. package/dist/Menu-CcWs0t21.js +0 -156
  621. package/dist/Menu-DJoh8bH7.cjs +0 -1
  622. package/dist/Provider-fx1wTnXk.cjs +0 -5
  623. package/dist/Tags-KHafaGjR.cjs +0 -1
  624. package/dist/Text-CZrjPRjJ.cjs +0 -1
  625. package/dist/css-C_YE-5Xa.cjs +0 -8
  626. package/dist/debounce-CW9Q-DsR.js +0 -17
  627. package/dist/debounce-heEWeOqL.cjs +0 -1
  628. package/dist/deep-7SxmCL0x.cjs +0 -1
  629. package/dist/deep-szN5DCOH.js +0 -349
  630. package/dist/dimensions-DFDTcQRG.cjs +0 -1
  631. package/dist/eraser-Bqibt23a.cjs +0 -11
  632. package/dist/external-19BIaQc6.cjs +0 -1
  633. package/dist/external-AInsIJp-.cjs +0 -1
  634. package/dist/external-B8hxM_jw.cjs +0 -79
  635. package/dist/external-Bi-OQCBH.js +0 -45
  636. package/dist/external-CN15E8ls.cjs +0 -1
  637. package/dist/external-CfEVFfhL.cjs +0 -1
  638. package/dist/external-D7WE6Leo.cjs +0 -1
  639. package/dist/external-DwhfVdFp.js +0 -88
  640. package/dist/external-pRQzznIG.cjs +0 -1
  641. package/dist/hooks-BmUn8s1r.js +0 -74
  642. package/dist/hooks-CutQY1o9.cjs +0 -1
  643. package/dist/provider-C9Beoajx.cjs +0 -72
  644. package/dist/src/arc/handle/Core.d.ts +0 -8
  645. package/dist/src/flux/core/index.d.ts +0 -2
  646. package/dist/src/flux/core/index.d.ts.map +0 -1
  647. package/dist/src/flux/core/store.d.ts.map +0 -1
  648. package/dist/src/flux/core/store.spec.d.ts.map +0 -1
  649. package/dist/src/flux/core/streamer.spec.d.ts.map +0 -1
  650. package/dist/src/form/synced.d.ts +0 -26
  651. package/dist/src/form/synced.d.ts.map +0 -1
  652. package/dist/src/hardware/device/Select.d.ts.map +0 -1
  653. package/dist/src/hardware/device/StatusIndicator.d.ts.map +0 -1
  654. package/dist/src/hardware/device/external.d.ts.map +0 -1
  655. package/dist/src/hardware/device/index.d.ts.map +0 -1
  656. package/dist/src/hardware/device/queries.d.ts.map +0 -1
  657. package/dist/src/hardware/device/queries.spec.d.ts.map +0 -1
  658. package/dist/src/hardware/rack/Select.d.ts.map +0 -1
  659. package/dist/src/hardware/rack/StatusIndicator.d.ts.map +0 -1
  660. package/dist/src/hardware/rack/external.d.ts.map +0 -1
  661. package/dist/src/hardware/rack/index.d.ts.map +0 -1
  662. package/dist/src/hardware/rack/queries.d.ts.map +0 -1
  663. package/dist/src/hardware/rack/queries.spec.d.ts.map +0 -1
  664. package/dist/src/hardware/task/index.d.ts.map +0 -1
  665. package/dist/src/hardware/task/queries.d.ts.map +0 -1
  666. package/dist/src/hardware/task/queries.spec.d.ts.map +0 -1
  667. package/dist/src/hooks/useRequiredContext.d.ts +0 -2
  668. package/dist/src/hooks/useRequiredContext.d.ts.map +0 -1
  669. package/dist/src/hooks/useRequiredContext.spec.d.ts +0 -2
  670. package/dist/src/hooks/useRequiredContext.spec.d.ts.map +0 -1
  671. package/dist/src/lineplot/aether/BoundQuerier.d.ts +0 -35
  672. package/dist/src/lineplot/aether/BoundQuerier.d.ts.map +0 -1
  673. package/dist/src/lineplot/useBoundQuerier.d.ts +0 -11
  674. package/dist/src/lineplot/useBoundQuerier.d.ts.map +0 -1
  675. package/dist/src/observe/index.d.ts +0 -2
  676. package/dist/src/observe/index.d.ts.map +0 -1
  677. package/dist/src/observe/use.d.ts +0 -8
  678. package/dist/src/observe/use.d.ts.map +0 -1
  679. package/dist/src/status/core/Aggregator.d.ts.map +0 -1
  680. package/dist/src/status/core/Aggregator.spec.d.ts.map +0 -1
  681. package/dist/src/status/core/Notification.spec.d.ts.map +0 -1
  682. package/dist/src/status/core/index.d.ts.map +0 -1
  683. package/dist/src/testutil/Aether.d.ts +0 -4
  684. package/dist/src/testutil/Aether.d.ts.map +0 -1
  685. package/dist/src/text/core/dimensions.spec.d.ts.map +0 -1
  686. package/dist/src/text/core/external.d.ts.map +0 -1
  687. package/dist/src/text/core/index.d.ts.map +0 -1
  688. package/dist/src/tree/core.spec.d.ts +0 -2
  689. package/dist/src/tree/core.spec.d.ts.map +0 -1
  690. package/dist/types-BNX_Jj6k.js +0 -80
  691. package/dist/types-D-yz1qsT.cjs +0 -1
  692. package/dist/units-zxke9Ng2.cjs +0 -1
  693. package/dist/value-Ce4T858D.cjs +0 -53
  694. /package/dist/src/{status/core → access/policy}/CreateIcon.d.ts +0 -0
  695. /package/dist/src/{hardware/device → access/policy}/queries.spec.d.ts +0 -0
  696. /package/dist/src/{hardware/rack → access}/queries.spec.d.ts +0 -0
  697. /package/dist/src/{hardware/task → access/role}/queries.spec.d.ts +0 -0
  698. /package/dist/src/{hardware/device → device}/external.d.ts +0 -0
  699. /package/dist/src/{hardware/device → device}/index.d.ts +0 -0
  700. /package/dist/src/flux/{core → base}/client.d.ts +0 -0
  701. /package/dist/src/flux/{core → base}/external.d.ts +0 -0
  702. /package/dist/src/flux/{core → base}/store.spec.d.ts +0 -0
  703. /package/dist/src/flux/{core → base}/streamer.spec.d.ts +0 -0
  704. /package/dist/src/flux/{core → base}/types.d.ts +0 -0
  705. /package/dist/src/{hardware/rack → rack}/external.d.ts +0 -0
  706. /package/dist/src/{hardware/rack → rack}/index.d.ts +0 -0
  707. /package/dist/src/status/{core → base}/Aggregator.spec.d.ts +0 -0
  708. /package/dist/src/status/{core → base}/Indicator.d.ts +0 -0
  709. /package/dist/src/status/{core → base}/Notification.d.ts +0 -0
  710. /package/dist/src/status/{core → base}/Notification.spec.d.ts +0 -0
  711. /package/dist/src/status/{core → base}/Summary.d.ts +0 -0
  712. /package/dist/src/status/{core → base}/colors.d.ts +0 -0
  713. /package/dist/src/status/{core → base}/external.d.ts +0 -0
  714. /package/dist/src/status/{core → base}/index.d.ts +0 -0
  715. /package/dist/src/{hardware/task → task}/index.d.ts +0 -0
  716. /package/dist/src/text/{core → base}/dimensions.spec.d.ts +0 -0
  717. /package/dist/src/text/{core → base}/external.d.ts +0 -0
  718. /package/dist/src/text/{core → base}/index.d.ts +0 -0
@@ -0,0 +1,8 @@
1
+ "use strict";const a=require("zod"),cr=t=>a.union([a.union([a.null(),a.undefined()]).transform(()=>[]),t.array()]),Dn=t=>Array.isArray(t)?t:t==null?[]:[t],hr=(t,e)=>{if(Array.isArray(e))return e.reduce((s,i)=>hr(s,i),t??[]);if(t==null)return[e];const r=t.findIndex(s=>s==e),n=[...t];return r===-1?n.push(e):n[r]=e,n},Pn=((t,e)=>{if(t!=null)return Array.isArray(e)?t.filter(r=>!e.includes(r)):t.filter(r=>r!=e)}),fr=(t,e)=>{if(Array.isArray(e))return e.reduce((s,i)=>fr(s,i),t??[]);if(t==null)return[e];const r=t.findIndex(s=>s.key===e.key),n=[...t];return r===-1?n.push(e):n[r]=e,n},qn=((t,e)=>{if(t!=null)return Array.isArray(e)?t.filter(r=>!e.includes(r.key)):t.filter(r=>r.key!==e)}),Zn=Object.freeze(Object.defineProperty({__proto__:null,nullableZ:cr,remove:Pn,removeKeyed:qn,toArray:Dn,upsert:hr,upsertKeyed:fr},Symbol.toStringTag,{value:"Module"})),Fn=t=>{const e=t.replace(/_[a-z]/g,r=>r[1].toUpperCase());return e.length>1&&e[0]===e[0].toUpperCase()&&e[1]===e[1].toUpperCase()||e.length===0?e:e[0].toLowerCase()+e.slice(1)},Fe=t=>{const e=(r,n=it)=>{if(typeof r=="string")return t(r);if(Array.isArray(r))return r.map(o=>e(o,n));if(!_e(r))return r;n=Wn(n);const s={},i=r;return"toJSON"in i&&typeof i.toJSON=="function"?e(i.toJSON(),n):(Object.keys(i).forEach(o=>{let u=i[o];const l=t(o);n.recursive&&(_e(u)?er(u)||(u=e(u,n)):n.recursiveInArray&&_t(u)&&(u=[...u].map(h=>{let f=h;return _e(h)?er(f)||(f=e(h,n)):_t(h)&&(f=e({key:h},n).key),f}))),s[l]=u}),s)};return e},St=Fe(Fn),Yn=t=>t.replace(/([a-z0-9])([A-Z])/g,(e,r,n)=>`${r}_${n.toLowerCase()}`),dr=Fe(Yn),gr=t=>t.length===0?t:t[0].toUpperCase()+t.slice(1),Vn=[Number,String,Uint8Array],it={recursive:!0,recursiveInArray:!0},Wn=(t=it)=>(t.recursive==null?t=it:t.recursiveInArray??=!1,t),_t=t=>t!=null&&Array.isArray(t),_e=t=>t!=null&&typeof t=="object"&&!Array.isArray(t),er=t=>Vn.some(e=>t instanceof e),Gn=t=>t.replace(/[\s_]+/g,"-").replace(/([a-z0-9])([A-Z])/g,(e,r,n)=>`${r}-${n.toLowerCase()}`).toLowerCase(),Hn=Fe(Gn),Xn=t=>{if(t.length===0)return t;let e=t.replace(/[_-]/g," ");return e=e.replace(/([a-z0-9])([A-Z])/g,(r,n,s)=>`${n} ${s}`),e=e.replace(/([A-Z]+)([A-Z][a-z])/g,(r,n,s)=>`${n} ${s}`),e=e.replace(/\s+/g," ").trim(),e=e.replace(/\b\w/g,r=>r.toUpperCase()),e},Jn=Fe(Xn),Kn=Object.freeze(Object.defineProperty({__proto__:null,camelToSnake:dr,capitalize:gr,snakeToCamel:St,toKebab:Hn,toProperNoun:Jn},Symbol.toStringTag,{value:"Module"})),Ue=t=>t!=null&&typeof t=="object"&&!Array.isArray(t),Qn=Object.freeze(Object.defineProperty({__proto__:null,isObject:Ue},Symbol.toStringTag,{value:"Module"}));class _n{contentType="application/json";decoder;encoder;constructor(){this.decoder=new TextDecoder,this.encoder=new TextEncoder}encode(e){return this.encoder.encode(this.encodeString(e))}decode(e,r){return this.decodeString(this.decoder.decode(e),r)}decodeString(e,r){const n=JSON.parse(e),s=St(n);return r!=null?r.parse(s):s}encodeString(e){const r=dr(e);return JSON.stringify(r,(n,s)=>ArrayBuffer.isView(s)?Array.from(s):typeof s=="bigint"?s.toString():s)}}const ot=new _n,B=t=>t!=null&&typeof t=="object"&&"value"in t;class re{value;constructor(e){this.value=e}valueOf(){return this.value}toJSON(){return this.value}toString(){return this.value.toString()}}const Nt=t=>t!=null&&typeof t=="object"&&"toString"in t,pr=t=>{if(Nt(t))return t?.toString().length===0;switch(typeof t){case"string":return t.length===0;case"number":return t===0;case"bigint":return t===0n;case"boolean":return!t;case"undefined":return!0;case"object":return t==null;default:return!1}},es=t=>!pr(t),ts=Object.freeze(Object.defineProperty({__proto__:null,ValueExtension:re,isCrudeValueExtension:B,isNonZero:es,isStringer:Nt,isZero:pr},Symbol.toStringTag,{value:"Module"})),at=t=>[...new Set(t)],rs=(t,e,r=!0)=>{const n=new Map;return t.forEach(s=>{const i=e(s);if(n.has(i)){if(r)return;n.delete(i)}n.set(i,s)}),Array.from(n.values())},ns=Object.freeze(Object.defineProperty({__proto__:null,by:rs,unique:at},Symbol.toStringTag,{value:"Module"})),Se=(t,e=!1)=>{const r=Nt(t)?"stringer":typeof t;let n;switch(r){case"string":n=(s,i)=>s.localeCompare(i);break;case"stringer":n=(s,i)=>s.toString().localeCompare(i.toString());break;case"number":n=(s,i)=>Number(s)-Number(i);break;case"bigint":n=(s,i)=>BigInt(s)-BigInt(i)>0n?1:-1;break;case"boolean":n=(s,i)=>Number(s)-Number(i);break;case"undefined":n=()=>0;break;default:return console.warn(`sortFunc: unknown type ${r}`),()=>-1}return e?mr(n):n},ss=(t,e,r)=>{const n=Se(e[t],r);return(s,i)=>n(s[t],i[t])},is=(t,e)=>t.length!==e.length?t.length-e.length:t.every((r,n)=>r===e[n])?0:-1,yr=(t,e)=>{if(t.length!==e.length)return t.length-e.length;if(t.length===0)return 0;const r=Se(t[0]),n=[...t].sort(r),s=[...e].sort(r);return n.every((i,o)=>i===s[o])?0:-1},os=(t,e)=>{const r=at(t),n=at(e);return yr(r,n)},as=(t,e)=>t===e?0:t==="first"&&e==="last"?1:-1,mr=t=>(e,r)=>t(r,e),ne=0,Y=-1,V=1,br=t=>t<ne,wr=t=>t>ne,us=t=>t>=ne,Or=t=>t===ne,ls=(t,e)=>{const r=/([a-zA-Z]+)|(\d+)/g,n=t.replace(/[\s_.-]+/g,"").match(r),s=e.replace(/[\s_.-]+/g,"").match(r);if(!n||!s)return 0;for(let i=0;i<Math.min(n.length,s.length);i++){const o=n[i],u=s[i];if(isNaN(Number(o))&&isNaN(Number(u))){const l=o.localeCompare(u);if(l!==0)return l}else if(!isNaN(Number(o))&&!isNaN(Number(u))){const l=Number(o)-Number(u);if(l!==0)return l}else return isNaN(Number(o))?-1:1}return n.length-s.length},vr=(t,e,r)=>{let n=0,s=t.length;const i=r??Se(e);for(;n<s;){const o=Math.floor((n+s)/2),u=i(t[o],e);if(u===0)return o;u<0?n=o+1:s=o}return n},cs=(t,e,r)=>{const n=vr(t,e,r);t.splice(n,0,e)},hs=Object.freeze(Object.defineProperty({__proto__:null,EQUAL:ne,GREATER_THAN:V,LESS_THAN:Y,insert:cs,isEqualTo:Or,isGreaterThan:wr,isGreaterThanEqual:us,isLessThan:br,newF:Se,newFieldF:ss,order:as,primitiveArrays:is,reverseF:mr,search:vr,stringsWithNumbers:ls,uniqueUnorderedPrimitiveArrays:os,unorderedPrimitiveArrays:yr},Symbol.toStringTag,{value:"Module"}));let Tr=(t,e=21)=>(r=e)=>{let n="",s=r|0;for(;s--;)n+=t[Math.random()*t.length|0];return n};const xr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",fs=`0123456789${xr}`,Sr=11,ds=Tr(xr,1),gs=Tr(fs,Sr-1),It=()=>`${ds()}${gs()}`,ps=Object.freeze(Object.defineProperty({__proto__:null,LENGTH:Sr,create:It},Symbol.toStringTag,{value:"Module"})),ys=(t,e)=>r=>r instanceof e||typeof r=="object"&&r!==null&&"discriminator"in r&&r.discriminator===t,ms=2**8-1,Nr=2**12-1,bs=2**16-1,ws=2**32-1,Os=2n**64n-1n,vs=2**64-1,Ts=-128,xs=2**7-1,Ss=-32768,Ns=2**15-1,Is=-2147483648,Ms=2**31-1,As=-(2n**63n),ke=2n**63n-1n,zs=-9223372036854776e3,Ir=2**63-1,ue=t=>(e,r)=>{if(typeof e=="bigint"){if(De(r))return t(e,BigInt(r));const n=t(Number(e),Number(r));return typeof n=="number"?BigInt(Math.round(n)):n}return t(Number(e),Number(r))},q=ue((t,e)=>t-e),W=ue((t,e)=>t+e),Es=(t,e,r=1e-4)=>Math.abs(t-e)<r,ut=(t,e)=>{const r=typeof t=="bigint",n=typeof e=="bigint";return r&&n?t===e:r&&De(e)?t===BigInt(e):n&&De(t)?e===BigInt(t):t===e},js=t=>{const e=10**Math.floor(Math.log10(t));return Math.round(t/e)*e},Mr=ue((t,e)=>t<=e?t:e),De=t=>typeof t=="bigint"?!0:Number.isInteger(t),Us=ue((t,e)=>t>=e?t:e),Ar=t=>typeof t=="bigint"?t<0n?-t:t:t<0?-t:t,R=ue((t,e)=>t*e),Ne=ue((t,e)=>t/e),zr=a.z.tuple([a.z.number(),a.z.number()]),Mt=a.z.object({width:a.z.number(),height:a.z.number()}),Bs=a.z.object({signedWidth:a.z.number(),signedHeight:a.z.number()}),$s=["start","center","end"],ae=a.z.object({x:a.z.number(),y:a.z.number()}),Er=a.z.object({clientX:a.z.number(),clientY:a.z.number()}),Ye=["x","y"],At=a.z.enum(Ye),zt=["top","right","bottom","left"],Cs=a.z.enum(zt),Ve=["left","right"],Et=a.z.enum(Ve),We=["top","bottom"],jt=a.z.enum(We),Ut=["center"],lt=a.z.enum(Ut),Rs=[...zt,...Ut],Bt=a.z.enum(Rs);a.z.enum($s);const Ls=["first","last"];a.z.enum(Ls);const ks=a.z.object({lower:a.z.number(),upper:a.z.number()}),Ds=a.z.enum([...At.options,...Bt.options]),Ps=a.z.union([At,Bt,a.z.instanceof(String)]),w=(t,e,r)=>{const n={};if(typeof e=="object"&&(r=e,e=void 0),r={makeValid:!0,...r},typeof t=="number"||typeof t=="bigint")e!=null?(n.lower=t,n.upper=e):(n.lower=typeof t=="bigint"?0n:0,n.upper=t);else if(Array.isArray(t)){if(t.length!==2)throw new Error("bounds: expected array of length 2");[n.lower,n.upper]=t}else n.lower=t.lower,n.upper=t.upper;return r?.makeValid?jr(n):n},qs=Object.freeze({lower:0,upper:0}),Zs=Object.freeze({lower:-1/0,upper:1/0}),Fs=Object.freeze({lower:0,upper:1}),Ys=Object.freeze({lower:-1,upper:1}),Vs=(t,e)=>{if(t==null&&e==null)return!0;if(t==null||e==null)return!1;const r=w(t),n=w(e);return r?.lower===n?.lower&&r?.upper===n?.upper},jr=t=>t.lower>t.upper?{lower:t.upper,upper:t.lower}:t,ct=(t,e)=>{const r=w(t);return e<r.lower?r.lower:e>=r.upper?r.upper-(typeof r.upper=="number"?1:1n):e},k=(t,e)=>{const r=w(t);if(typeof e=="number"||typeof e=="bigint")return e>=r.lower&&e<r.upper;const n=w(e);return n.lower>=r.lower&&n.upper<=r.upper},Ws=(t,e)=>{const r=w(t),n=w(e);return r.lower===n.lower?!0:n.upper===r.lower||n.lower===r.upper?!1:k(r,n.upper)||k(r,n.lower)||k(n,r.upper)||k(n,r.lower)},le=t=>{const e=w(t);return e.upper-e.lower},Gs=t=>{const e=w(t);return typeof e.lower=="bigint"?e.lower===0n&&e.upper===0n:e.lower===0&&e.upper===0},Hs=t=>{const e=le(t);return typeof e=="number"?e===0:e===0n},Xs=t=>{const e=w(t);return typeof e.lower=="bigint"?!0:Number.isFinite(e.lower)&&Number.isFinite(e.upper)},Js=t=>{const e=w(t);return(e.upper+e.lower)/2},Ur=t=>({lower:Math.min(...t.map(e=>w(e).lower)),upper:Math.max(...t.map(e=>w(e).upper))}),Ks=t=>({lower:Math.max(...t.map(e=>w(e).lower)),upper:Math.min(...t.map(e=>w(e).upper))}),Qs=t=>{const e=w(t),r=typeof e.lower=="bigint";return Array.from({length:Number(le(t))},(n,s)=>r?e.lower+BigInt(s):e.lower+s)},ht=(t,e)=>{const r=t.map(i=>w(i)),n=r.findIndex(i=>k(i,e)||e<i.lower);if(n===-1)return{index:t.length,position:0};const s=r[n];return k(s,e)?{index:n,position:Number(e-s.lower)}:{index:n,position:0}},et={removeBefore:0,removeAfter:0,insertInto:0,deleteInBetween:0},_s=(t,e)=>{const r=t.map(h=>w(h)),n=w(e);if(r.length===0)return et;const s=ht(r,n.lower),i=ht(r,n.upper);if(s.index===t.length)return{...et,insertInto:t.length};if(i.index===0)return{...et,removeAfter:i.position};if(s.index===i.index)return s.position!==0&&i.position!==0?null:{removeAfter:i.position,removeBefore:s.position,insertInto:s.index,deleteInBetween:0};let o=i.index-s.index,u=s.index,l=q(Number(le(r[s.index])),s.position);return s.position!==0?(o-=1,u+=1):l=0,{removeBefore:l,removeAfter:i.position,insertInto:u,deleteInBetween:o}},Br=(t,e,r)=>{const n=t.map(u=>w(u)),s=r>0?1:r<0?-1:0;if(s===0)return e;let i=r,o=e;for(;ut(i,0)===!1;){const u=n.findIndex(l=>s>0?o>=l.lower&&o<l.upper:o>l.lower&&o<=l.upper);if(u!==-1){const l=n[u];let h;if(s>0?h=q(l.upper,o):h=q(o,l.lower),h>0){const f=Mr(Ar(i),h);if(o=W(o,s>0?f:-f),i=q(i,s>0?f:-f),ut(i,0))return o;continue}}if(s>0){const l=n.filter(h=>h.lower>o);if(l.length>0)o=l[0].lower;else return o}else{const l=n.filter(h=>h.upper<o);if(l.length>0)o=l[l.length-1].upper;else return o}}return o},$r=(t,e,r)=>{const n=t.map(o=>w(o));if(e===r)return typeof e=="bigint"?0n:0;const s=e<r?w([e,r]):w([r,e]);let i=typeof e=="bigint"?0n:0;for(const o of n){const u=o.lower>s.lower?o.lower:s.lower,l=o.upper<s.upper?o.upper:s.upper;if(u<l){const h=l-u;i=i+h}}return i},ei=Object.freeze(Object.defineProperty({__proto__:null,CLIP:Ys,DECIMAL:Fs,INFINITE:Zs,ZERO:qs,bounds:ks,buildInsertionPlan:_s,clamp:ct,construct:w,contains:k,distance:$r,equals:Vs,findInsertPosition:ht,isFinite:Xs,isZero:Gs,linspace:Qs,makeValid:jr,max:Ur,mean:Js,min:Ks,overlapsWith:Ws,span:le,spanIsZero:Hs,traverse:Br},Symbol.toStringTag,{value:"Module"})),ft=2,dt=3,Cr=2,ti=(t,e)=>{if(Number.isNaN(t)||!Number.isFinite(t))return t;const r=le(e);if(r==0)return t;let n;r>=1e3?n=ft:r>=1?n=dt:n=Math.ceil(-Math.log10(r))+Cr;const s=10**n;return Math.round(t*s)/s},ri=5,ni=1e-10,si=(t,e)=>{if(Number.isNaN(t)||!Number.isFinite(t))return t;const r=Math.abs(t);if(r===0)return 0;let n=!1,s=0;if(e!=null){s=le(e);const u=s/r;n=s>0&&u>ni}if(n){let u;s>=1e3?u=ft:s>=1?u=dt:u=Math.ceil(-Math.log10(s))+Cr;const l=10**u;return Math.round(t*l)/l}if(r>=1e3){const u=10**ft;return Math.round(t*u)/u}if(r>=1){const u=10**dt;return Math.round(t*u)/u}const i=Math.floor(Math.log10(r)),o=10**(ri-i-1);return Math.round(t*o)/o},ii=Object.freeze(Object.defineProperty({__proto__:null,MAX_INT16:Ns,MAX_INT32:Ms,MAX_INT64:ke,MAX_INT64_NUMBER:Ir,MAX_INT8:xs,MAX_UINT12:Nr,MAX_UINT16:bs,MAX_UINT32:ws,MAX_UINT64:Os,MAX_UINT64_NUMBER:vs,MAX_UINT8:ms,MIN_INT16:Ss,MIN_INT32:Is,MIN_INT64:As,MIN_INT64_NUMBER:zs,MIN_INT8:Ts,abs:Ar,add:W,closeTo:Es,div:Ne,equal:ut,isInteger:De,max:Us,min:Mr,mult:R,roundBySpan:ti,roundToNearestMagnitude:js,smartRound:si,sub:q},Symbol.toStringTag,{value:"Module"})),Rr=Ds,P=t=>Ye.includes(t)?t:We.includes(t)?"y":"x",oi=t=>P(t)==="x"?"y":"x",ai=t=>P(t)==="x"?"width":"height",ui=t=>P(t)==="x"?"left":"top",li=t=>Rr.safeParse(t).success,ci=t=>P(t)==="x"?"signedWidth":"signedHeight",hi=t=>t==="center"?!1:P(t)==="x",fi=t=>P(t)==="y",Lr=Object.freeze(Object.defineProperty({__proto__:null,DIRECTIONS:Ye,construct:P,crude:Rr,dimension:ai,direction:At,isDirection:li,isX:hi,isY:fi,location:ui,signedDimension:ci,swap:oi},Symbol.toStringTag,{value:"Module"})),di=Et,gi=jt,pi=lt,yi={top:"bottom",right:"left",bottom:"top",left:"right",center:"center"},mi={top:{clockwise:"left",counterclockwise:"right"},right:{clockwise:"top",counterclockwise:"bottom"},bottom:{clockwise:"right",counterclockwise:"left"},left:{clockwise:"bottom",counterclockwise:"top"}},bi=Ps,ee=t=>t instanceof String||!Ye.includes(t)?t:t==="x"?"left":"top",wi=t=>yi[ee(t)],Oi=(t,e)=>mi[t][e],Oe=t=>{const e=ee(t);return e==="top"||e==="bottom"?"y":"x"},vi=a.z.object({x:Et.or(lt),y:jt.or(lt)}),$t=a.z.object({x:Et,y:jt}),ce=Object.freeze({x:"left",y:"top"}),Ct=Object.freeze({x:"right",y:"top"}),Ge=Object.freeze({x:"left",y:"bottom"}),Rt=Object.freeze({x:"right",y:"bottom"}),Lt=Object.freeze({x:"center",y:"center"}),kt=Object.freeze({x:"center",y:"top"}),Dt=Object.freeze({x:"center",y:"bottom"}),Pt=Object.freeze({x:"right",y:"center"}),qt=Object.freeze({x:"left",y:"center"}),Ti=Object.freeze([qt,Pt,kt,Dt,ce,Ct,Ge,Rt,Lt]),Zt=(t,e)=>t.x===e.x&&t.y===e.y,xi=(t,e)=>{if(typeof e=="object"){let r=!0;return"x"in e&&(t.x===e.x||(r=!1)),"y"in e&&(t.y===e.y||(r=!1)),r}return t.x===e||t.y===e},kr=t=>[t.x,t.y],Be=t=>Oe(ee(t))==="x",Si=t=>Oe(ee(t))==="y",Ni=t=>`${t.x}${gr(t.y)}`,Ii=(t,e)=>{let r,n;if(typeof t=="object"&&"x"in t?(r=t.x,n=t.y):(r=ee(t),n=ee(e??t)),Oe(r)===Oe(n)&&r!=="center"&&n!=="center")throw new Error(`[XYLocation] - encountered two locations with the same direction: ${r.toString()} - ${n.toString()}`);const s={...Lt};return r==="center"?Be(n)?[s.x,s.y]=[n,r]:[s.x,s.y]=[r,n]:n==="center"?Be(r)?[s.x,s.y]=[r,n]:[s.x,s.y]=[n,r]:Be(r)?[s.x,s.y]=[r,n]:[s.x,s.y]=[n,r],s},Dr=Object.freeze(Object.defineProperty({__proto__:null,BOTTOM_CENTER:Dt,BOTTOM_LEFT:Ge,BOTTOM_RIGHT:Rt,CENTER:Lt,CENTER_LEFT:qt,CENTER_LOCATIONS:Ut,CENTER_RIGHT:Pt,OUTER_LOCATIONS:zt,TOP_CENTER:kt,TOP_LEFT:ce,TOP_RIGHT:Ct,XY_LOCATIONS:Ti,X_LOCATIONS:Ve,Y_LOCATIONS:We,center:pi,construct:ee,constructXY:Ii,corner:$t,crude:bi,direction:Oe,isX:Be,isY:Si,location:Bt,outer:Cs,rotate:Oi,swap:wi,x:di,xy:vi,xyCouple:kr,xyEquals:Zt,xyMatches:xi,xyToString:Ni,y:gi},Symbol.toStringTag,{value:"Module"})),gt=a.z.union([a.z.number(),ae,zr,Mt,Bs,Er]),v=(t,e)=>{if(typeof t=="string"){if(e===void 0)throw new Error("The y coordinate must be given.");return t==="x"?{x:e,y:0}:{x:0,y:e}}return typeof t=="number"?{x:t,y:e??t}:Array.isArray(t)?{x:t[0],y:t[1]}:"signedWidth"in t?{x:t.signedWidth,y:t.signedHeight}:"clientX"in t?{x:t.clientX,y:t.clientY}:"width"in t?{x:t.width,y:t.height}:{x:t.x,y:t.y}},Z=Object.freeze({x:0,y:0}),Pr=Object.freeze({x:1,y:1}),Mi=Object.freeze({x:1/0,y:1/0}),Ai=Object.freeze({x:NaN,y:NaN}),Pe=(t,e,r=0)=>{const n=v(t),s=v(e);return r===0?n.x===s.x&&n.y===s.y:Math.abs(n.x-s.x)<=r&&Math.abs(n.y-s.y)<=r},zi=t=>Pe(t,Z),Ft=(t,e,r)=>{const n=v(t),s=v(e,r);return{x:n.x*s.x,y:n.y*s.y}},qr=(t,e)=>{const r=v(t);return{x:r.x+e,y:r.y}},Zr=(t,e)=>{const r=v(t);return{x:r.x,y:r.y+e}},ve=(t,e,r,...n)=>{if(typeof e=="string"){if(typeof r!="number")throw new Error("The value must be a number.");return e==="x"?qr(t,r):Zr(t,r)}if(typeof e=="object"&&"x"in e&&typeof e.x=="string"){const s=v(r),i=v(t);return e.x==="left"?s.x=-s.x:e.x==="center"&&(s.x=0),e.y==="top"?s.y=-s.y:e.y==="center"&&(s.y=0),{x:i.x+s.x,y:i.y+s.y}}return[t,e,r??Z,...n].reduce((s,i)=>{const o=v(i);return{x:s.x+o.x,y:s.y+o.y}},Z)},Ei=(t,e,r)=>{const n=v(t);return P(e)==="x"?{x:r,y:n.y}:{x:n.x,y:r}},ji=(t,e)=>{const r=v(t),n=v(e);return Math.sqrt((r.x-n.x)**2+(r.y-n.y)**2)},Ui=(t,e)=>{const r=v(t),n=v(e);return{x:n.x-r.x,y:n.y-r.y}},Bi=t=>{const e=v(t);return Number.isNaN(e.x)||Number.isNaN(e.y)},$i=t=>{const e=v(t);return Number.isFinite(e.x)&&Number.isFinite(e.y)},Ci=t=>{const e=v(t);return[e.x,e.y]},Ri=t=>{const e=v(t);return{left:e.x,top:e.y}},qe=(t,e=0)=>{const r=v(t);return{x:Number(r.x.toFixed(e)),y:Number(r.y.toFixed(e))}},de=(t,e)=>{const r=v(t),n=v(e);return{x:r.x-n.x,y:r.y-n.y}},ge=t=>{const e=v(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:-e.y/r,y:e.x/r}},Fr=t=>{const e=v(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:e.x/r,y:e.y/r}},Yr=(...t)=>{const e=t.reduce((r,n)=>ve(r,n),Z);return Ft(e,1/t.length)},Li=(t,e)=>{const r=[];for(let n=0;n<t.length;n++){const s=t[n];let i,o,u,l;if(n===0){const h=t[n+1],f=de(h,s);o=ge(f),u=o,l=e}else if(n===t.length-1){const h=t[n-1],f=de(s,h);i=ge(f),u=i,l=e}else{const h=t[n-1],f=t[n+1],y=de(s,h),p=de(f,s);i=ge(y),o=ge(p);const I=Math.acos((y.x*p.x+y.y*p.y)/(Math.hypot(y.x,y.y)*Math.hypot(p.x,p.y))),A=Math.sin(I/2);A===0?l=e:l=e/A,u=Fr(Yr(i,o))}r.push(Ft(u,l))}return r},ki=t=>{const e=v(t);return{x:e.y,y:e.x}},pt=t=>{const e=v(t);return{x:Math.round(e.x),y:Math.round(e.y)}},Di=t=>{const e=v(t);return{x:1/e.x,y:1/e.y}},Pi=(t,e,r)=>{const n=v(t),s=v(e),i=r==="clockwise"?Math.PI/2:-Math.PI/2,o=n.x-s.x,u=n.y-s.y,l=o*Math.cos(i)-u*Math.sin(i),h=o*Math.sin(i)+u*Math.cos(i);return{x:l+s.x,y:h+s.y}},qi=Object.freeze(Object.defineProperty({__proto__:null,INFINITY:Mi,NAN:Ai,ONE:Pr,ZERO:Z,average:Yr,calculateMiters:Li,clientXY:Er,construct:v,couple:Ci,crudeZ:gt,css:Ri,distance:ji,equals:Pe,isFinite:$i,isNan:Bi,isZero:zi,normal:ge,normalize:Fr,reciprocal:Di,rotate:Pi,round:pt,scale:Ft,set:Ei,sub:de,swap:ki,translate:ve,translateX:qr,translateY:Zr,translation:Ui,truncate:qe,xy:ae},Symbol.toStringTag,{value:"Module"})),Me=a.z.union([a.z.number(),a.z.string()]),Zi=a.z.object({top:Me,left:Me,width:Me,height:Me}),Fi=a.z.object({left:a.z.number(),top:a.z.number(),right:a.z.number(),bottom:a.z.number()}),Yi=a.z.object({one:ae,two:ae,root:$t}),Vr={one:Z,two:Z,root:ce},Vi={one:Z,two:Pr,root:Ge},Wr=(t,e)=>({one:t.one,two:t.two,root:e??t.root}),x=(t,e,r=0,n=0,s)=>{const i={one:{...Z},two:{...Z},root:s??ce};if(typeof t=="number"){if(typeof e!="number")throw new Error("Box constructor called with invalid arguments");return i.one={x:t,y:e},i.two={x:i.one.x+r,y:i.one.y+n},i}return"one"in t&&"two"in t&&"root"in t?{...t,root:s??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(i.one={x:t.left,y:t.top},i.two={x:t.right,y:t.bottom},i):(i.one=t,e==null?i.two={x:i.one.x+r,y:i.one.y+n}:typeof e=="number"?i.two={x:i.one.x+e,y:i.one.y+r}:"width"in e?i.two={x:i.one.x+e.width,y:i.one.y+e.height}:"signedWidth"in e?i.two={x:i.one.x+e.signedWidth,y:i.one.y+e.signedHeight}:i.two=e,i))},Wi=(t,e,r)=>{const n=x(t);if(typeof e=="string"){if(r==null)throw new Error("Invalid arguments for resize");const s=P(e);return x(n.one,void 0,s==="x"?r:E(n),s==="y"?r:j(n),n.root)}return x(n.one,e,void 0,void 0,n.root)},Gi=(t,e,r=!0)=>{const n=x(t);let s=(i,o)=>i<o;return r&&(s=(i,o)=>i<=o),"one"in e?s(X(n),X(e))&&s(Q(e),Q(n))&&s(J(n),J(e))&&s(_(e),_(n)):s(X(n),e.x)&&s(e.x,Q(n))&&s(J(n),e.y)&&s(e.y,_(n))},Hi=(t,e)=>Pe(t.one,e.one)&&Pe(t.two,e.two)&&Zt(t.root,e.root),Gr=t=>({width:E(t),height:j(t)}),Xi=t=>({signedWidth:He(t),signedHeight:Xe(t)}),Ji=t=>({top:J(t),left:X(t),width:E(t),height:j(t)}),Yt=(t,e,r=!1)=>{const n=P(e)==="y"?Xe(t):He(t);return r?n:Math.abs(n)},G=(t,e)=>{const r=x(t);return{x:e.x==="center"?yt(r).x:te(r,e.x),y:e.y==="center"?yt(r).y:te(r,e.y)}},te=(t,e)=>{const r=x(t),n=kr(r.root).includes(e)?Math.min:Math.max;return Ve.includes(e)?n(r.one.x,r.two.x):n(r.one.y,r.two.y)},Ki=t=>Jr(t)===0,E=t=>Yt(t,"x"),j=t=>Yt(t,"y"),He=t=>{const e=x(t);return e.two.x-e.one.x},Xe=t=>{const e=x(t);return e.two.y-e.one.y},Hr=t=>G(t,ce),Qi=t=>G(t,kt),_i=t=>G(t,Ct),eo=t=>G(t,Ge),to=t=>G(t,Dt),ro=t=>G(t,Rt),no=t=>G(t,qt),so=t=>G(t,Pt),Q=t=>te(t,"right"),_=t=>te(t,"bottom"),X=t=>te(t,"left"),J=t=>te(t,"top"),yt=t=>ve(Hr(t),{x:He(t)/2,y:Xe(t)/2}),Vt=t=>{const e=x(t);return e.root.x==="left"?X(e):Q(e)},Wt=t=>{const e=x(t);return e.root.y==="top"?J(e):_(e)},io=t=>({x:Vt(t),y:Wt(t)}),$e=t=>{const e=x(t);return{lower:e.one.x,upper:e.two.x}},Ce=t=>{const e=x(t);return{lower:e.one.y,upper:e.two.y}},oo=(t,e)=>Wr(t,e),ao=(t,e)=>{const r=x(t),n=Ve.includes(e)?"x":We.includes(e)?"y":null;if(n===null)throw new Error(`Invalid location: ${e}`);const s=e==="top"||e==="left"?Math.min:Math.max,i={...r.one},o={...r.two};return i[n]=s(r.one[n],r.two[n]),o[n]=s(r.one[n],r.two[n]),[i,o]},uo=(t,e)=>{const r=x(t),n=x(e),s=Vt(n)+(E(n)-E(r))/2,i=Wt(n)+(j(n)-j(r))/2;return x({x:s,y:i},Gr(r))},Xr=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,lo=t=>E(t)/j(t),co=(t,e,r)=>{if(typeof e=="string"){if(r==null)throw new Error("Undefined amount passed into box.translate");const s=P(e);e=v(s,r)}const n=x(t);return x(ve(n.one,e),ve(n.two,e),void 0,void 0,n.root)},ho=(t,e)=>{const r=Math.max(X(t),X(e)),n=Math.max(J(t),J(e)),s=Math.min(Q(t),Q(e)),i=Math.min(_(t),_(e));return r>s||n>i?Vr:x({x:r,y:n},{x:s,y:i},void 0,void 0,t.root)},Jr=t=>E(t)*j(t),fo=(t,e)=>{const r=x(t);return x(qe(r.one,e),qe(r.two,e),void 0,void 0,r.root)},go=(t,e,r,n,s,i)=>{const o={x:t,y:e},u={x:t+r,y:e+n};return s.x!==i.x&&(s.x==="center"?(o.x-=r/2,u.x-=r/2):(o.x-=r,u.x-=r)),s.y!==i.y&&(s.y==="center"?(o.y-=n/2,u.y-=n/2):(o.y-=n,u.y-=n)),x(o,u,void 0,void 0,i)},po=t=>{const e=x(t);return x(pt(e.one),pt(e.two),void 0,void 0,e.root)},yo=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:Vi,ZERO:Vr,area:Jr,areaIsZero:Ki,aspect:lo,bottom:_,bottomCenter:to,bottomLeft:eo,bottomRight:ro,box:Yi,center:yt,centerLeft:no,centerRight:so,construct:x,constructWithAlternateRoot:go,contains:Gi,copy:Wr,css:Ji,cssBox:Zi,dim:Yt,dims:Gr,domRect:Fi,edgePoints:ao,equals:Hi,height:j,intersection:ho,isBox:Xr,left:X,loc:te,positionInCenter:uo,reRoot:oo,resize:Wi,right:Q,root:io,round:po,signedDims:Xi,signedHeight:Xe,signedWidth:He,top:J,topCenter:Qi,topLeft:Hr,topRight:_i,translate:co,truncate:fo,width:E,x:Vt,xBounds:$e,xyLoc:G,y:Wt,yBounds:Ce},Symbol.toStringTag,{value:"Module"})),Kr=a.z.object({signedWidth:a.z.number(),signedHeight:a.z.number()}),mo=a.z.union([Mt,Kr,ae,zr]),bo={width:0,height:0},wo={width:1,height:1},D=(t,e)=>typeof t=="number"?{width:t,height:e??t}:Array.isArray(t)?{width:t[0],height:t[1]}:"x"in t?{width:t.x,height:t.y}:"signedWidth"in t?{width:t.signedWidth,height:t.signedHeight}:{...t},Oo=(t,e)=>{if(e==null)return!1;const r=D(t),n=D(e);return r.width===n.width&&r.height===n.height},vo=t=>{const e=D(t);return{width:e.height,height:e.width}},To=t=>{const e=D(t);return`0 0 ${e.width} ${e.height}`},xo=t=>{const e=D(t);return[e.width,e.height]},So=t=>({width:Math.max(...t.map(e=>D(e).width)),height:Math.max(...t.map(e=>D(e).height))}),No=t=>({width:Math.min(...t.map(e=>D(e).width)),height:Math.min(...t.map(e=>D(e).height))}),Io=(t,e)=>{const r=D(t);return{width:r.width*e,height:r.height*e}},Mo=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:wo,ZERO:bo,construct:D,couple:xo,crude:mo,dimensions:Mt,equals:Oo,max:So,min:No,scale:Io,signed:Kr,svgViewBox:To,swap:vo},Symbol.toStringTag,{value:"Module"})),Qr=(t,e,r)=>e!==void 0&&t<e?e:r!==void 0&&t>r?r:t,Ao=a.z.object({offset:gt,scale:gt}),zo=a.z.object({offset:a.z.number(),scale:a.z.number()}),Eo=t=>(e,r,n,s)=>r==="dimension"?[e,n]:[e,s?n-t:n+t],jo=t=>(e,r,n,s)=>[e,s?n/t:n*t],Uo=t=>(e,r,n)=>{if(e===null)return[t,n];const{lower:s,upper:i}=e,{lower:o,upper:u}=t,l=i-s,h=u-o;if(r==="dimension")return[t,n*(h/l)];const f=(n-s)*(h/l)+o;return[t,f]},Bo=t=>(e,r,n)=>[t,n],$o=()=>(t,e,r)=>{if(t===null)throw new Error("cannot invert without bounds");if(e==="dimension")return[t,r];const{lower:n,upper:s}=t;return[t,s-(r-n)]},Co=t=>(e,r,n)=>{const{lower:s,upper:i}=t;return n=Qr(n,s,i),[e,n]};class F{ops=[];currBounds=null;currType=null;reversed=!1;constructor(){this.ops=[]}static translate(e){return new F().translate(e)}static magnify(e){return new F().magnify(e)}static scale(e,r){return new F().scale(e,r)}translate(e){const r=this.new(),n=Eo(e);return n.type="translate",r.ops.push(n),r}magnify(e){const r=this.new(),n=jo(e);return n.type="magnify",r.ops.push(n),r}scale(e,r){const n=w(e,r),s=this.new(),i=Uo(n);return i.type="scale",s.ops.push(i),s}clamp(e,r){const n=w(e,r),s=this.new(),i=Co(n);return i.type="clamp",s.ops.push(i),s}reBound(e,r){const n=w(e,r),s=this.new(),i=Bo(n);return i.type="re-bound",s.ops.push(i),s}invert(){const e=$o();e.type="invert";const r=this.new();return r.ops.push(e),r}pos(e){return this.exec("position",e)}dim(e){return this.exec("dimension",e)}new(){const e=new F;return e.ops=this.ops.slice(),e.reversed=this.reversed,e}exec(e,r){return this.currBounds=null,this.ops.reduce(([n,s],i)=>i(n,e,s,this.reversed),[null,r])[1]}reverse(){const e=this.new();e.ops.reverse();const r=[];return e.ops.forEach((n,s)=>{if(n.type==="scale"||r.some(([o,u])=>s>=o&&s<=u))return;const i=e.ops.findIndex((o,u)=>o.type==="scale"&&u>s);i!==-1&&r.push([s,i])}),r.forEach(([n,s])=>{const i=e.ops.slice(n,s);i.unshift(e.ops[s]),e.ops.splice(n,s-n+1,...i)}),e.reversed=!e.reversed,e}get transform(){return{scale:this.dim(1),offset:this.pos(0)}}static IDENTITY=new F}class C{x;y;currRoot;constructor(e=new F,r=new F,n=null){this.x=e,this.y=r,this.currRoot=n}static translate(e,r){return new C().translate(e,r)}static translateX(e){return new C().translateX(e)}static translateY(e){return new C().translateY(e)}static clamp(e){return new C().clamp(e)}static magnify(e){return new C().magnify(e)}static scale(e){return new C().scale(e)}static reBound(e){return new C().reBound(e)}translate(e,r){const n=v(e,r),s=this.copy();return s.x=this.x.translate(n.x),s.y=this.y.translate(n.y),s}translateX(e){const r=this.copy();return r.x=this.x.translate(e),r}translateY(e){const r=this.copy();return r.y=this.y.translate(e),r}magnify(e){const r=this.copy();return r.x=this.x.magnify(e.x),r.y=this.y.magnify(e.y),r}scale(e){const r=this.copy();if(Xr(e)){const n=this.currRoot;return r.currRoot=e.root,n!=null&&!Zt(n,e.root)&&(n.x!==e.root.x&&(r.x=r.x.invert()),n.y!==e.root.y&&(r.y=r.y.invert())),r.x=r.x.scale($e(e)),r.y=r.y.scale(Ce(e)),r}return r.x=r.x.scale(e.width),r.y=r.y.scale(e.height),r}reBound(e){const r=this.copy();return r.x=this.x.reBound($e(e)),r.y=this.y.reBound(Ce(e)),r}clamp(e){const r=this.copy();return r.x=this.x.clamp($e(e)),r.y=this.y.clamp(Ce(e)),r}copy(){const e=new C;return e.currRoot=this.currRoot,e.x=this.x,e.y=this.y,e}reverse(){const e=this.copy();return e.x=this.x.reverse(),e.y=this.y.reverse(),e}pos(e){return{x:this.x.pos(e.x),y:this.y.pos(e.y)}}dim(e){return{x:this.x.dim(e.x),y:this.y.dim(e.y)}}box(e){return x(this.pos(e.one),this.pos(e.two),0,0,this.currRoot??e.root)}get transform(){return{scale:this.dim({x:1,y:1}),offset:this.pos({x:0,y:0})}}static IDENTITY=new C}const Ro=Object.freeze(Object.defineProperty({__proto__:null,Scale:F,XY:C,crudeXYTransform:Ao,transform:zo},Symbol.toStringTag,{value:"Module"})),_r=ae.extend({root:$t,units:a.object({x:a.enum(["px","decimal"]),y:a.enum(["px","decimal"])})}),Lo=_r.partial({root:!0,units:!0}),ko=t=>{const e={};return e[t.root?.x??"left"]=t?.units?.x==="px"?`${t.x}px`:`${t.x*100}%`,e[t.root?.y??"top"]=t?.units?.y==="px"?`${t.y}px`:`${t.y*100}%`,e},Do=({position:t,element:e,container:r})=>{const n={x:t.x,y:t.y};return t.units?.x==="decimal"?t.root?.x==="right"&&(n.x=1-t.x):t.root?.x==="right"?n.x=1-(t.x+E(e))/E(r):n.x/=E(r),t.units?.y==="decimal"?t.root?.y==="bottom"&&(n.y=1-t.y):t.root?.y==="bottom"?n.y=1-(t.y+j(e))/j(r):n.y/=j(r),n},Po=({position:t,element:e,container:r,lowerThreshold:n=.2,upperThreshold:s=.8})=>{const i={x:t.x,y:t.y,root:{...ce},units:{x:"px",y:"px"}};return t.x>s?(i.x=(1-t.x)*E(r)-E(e),i.root.x="right"):t.x<n?i.x=t.x*E(r):i.units.x="decimal",t.y>s?(i.y=(1-t.y)*j(r)-j(e),i.root.y="bottom"):t.y<n?i.y=t.y*j(r):i.units.y="decimal",i.x=Math.round(i.x*100)/100,{...i,...qe(i,3)}},qo=Object.freeze(Object.defineProperty({__proto__:null,calculate:Po,completeXY:_r,toCSS:ko,toDecimal:Do,xy:Lo},Symbol.toStringTag,{value:"Module"})),Zo=a.z.enum(["static","dynamic"]),tr=365,Ae=30,Fo=a.z.union([a.z.tuple([a.z.int()]),a.z.tuple([a.z.int(),a.z.int().min(1).max(12)]),a.z.tuple([a.z.int(),a.z.int().min(1).max(12),a.z.int().min(1).max(31)])]),en=(t,e)=>{const r=new d(e);if(![g.DAY,g.HOUR,g.MINUTE,g.SECOND,g.MILLISECOND,g.MICROSECOND,g.NANOSECOND].some(s=>s.equals(r)))throw new Error("Invalid argument for remainder. Must be an even TimeSpan or Timestamp");const n=t.valueOf()%r.valueOf();return t instanceof d?new d(n):new g(n)};class d extends re{constructor(e,r="UTC"){if(e==null)super(d.now().valueOf());else if(e instanceof Date)super(BigInt(e.getTime())*d.MILLISECOND.valueOf());else if(typeof e=="string")super(d.parseDateTimeString(e,r).valueOf());else if(Array.isArray(e))super(d.parseDate(e));else{let n=0n;e instanceof Number&&(e=e.valueOf()),r==="local"&&(n=d.utcOffset.valueOf()),typeof e=="number"&&(isFinite(e)?e===Ir?e=ke:e=Math.trunc(e):(isNaN(e)&&(e=0),e===1/0?e=d.MAX:e=d.MIN)),B(e)&&(e=e.value),super(BigInt(e.valueOf())+n)}}static parseDate([e=1970,r=1,n=1]){const s=new Date(e,r-1,n,0,0,0,0);return new d(BigInt(s.getTime())*d.MILLISECOND.valueOf()).truncate(d.DAY).valueOf()}valueOf(){return this.value}static parseTimeString(e,r="UTC"){const[n,s,i]=e.split(":");let o="00",u="00";i!=null&&([o,u]=i.split("."));let l=d.hours(parseInt(n??"00")).add(d.minutes(parseInt(s??"00"))).add(d.seconds(parseInt(o??"00"))).add(d.milliseconds(parseInt(u??"00")));return r==="local"&&(l=l.add(d.utcOffset)),l.valueOf()}static parseDateTimeString(e,r="UTC"){if(!e.includes("/")&&!e.includes("-"))return d.parseTimeString(e,r);if(e.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?$/)!=null){let s=e,i=0;if(e.includes(".")){const h=e.split(".");s=h[0];const f=h[1]||"0";i=parseInt(f.padEnd(3,"0").slice(0,3))}const o=r==="local"?new Date(s.replace("T"," ")):new Date(`${s}Z`),u=BigInt(o.getTime())*d.MILLISECOND.valueOf(),l=BigInt(i)*d.MILLISECOND.valueOf();return u+l}const n=new Date(e);return e.includes(":")||n.setUTCHours(0,0,0,0),new d(BigInt(n.getTime())*d.MILLISECOND.valueOf(),r).valueOf()}toISOString(e="UTC"){return e==="UTC"?this.date().toISOString():this.sub(d.utcOffset).date().toISOString()}timeString(e=!1,r="UTC"){const n=this.toISOString(r);return e?n.slice(11,23):n.slice(11,19)}dateString(){const e=this.date(),r=e.toLocaleString("default",{month:"short"}),n=e.toLocaleString("default",{day:"numeric"});return`${r} ${n}`}static get utcOffset(){return new g(BigInt(new Date().getTimezoneOffset())*d.MINUTE.valueOf())}static since(e){return new d().span(e)}date(){return new Date(this.milliseconds)}equals(e){return this.valueOf()===new d(e).valueOf()}span(e){return this.range(e).span}range(e){return new N(this,e).makeValid()}spanRange(e){return this.range(this.add(e)).makeValid()}get isZero(){return this.valueOf()===0n}after(e){return this.valueOf()>new d(e).valueOf()}afterEq(e){return this.valueOf()>=new d(e).valueOf()}before(e){return this.valueOf()<new d(e).valueOf()}beforeEq(e){return this.valueOf()<=new d(e).valueOf()}add(e){return new d(W(this.valueOf(),new g(e).valueOf()))}sub(e){return new d(q(this.valueOf(),new g(e).valueOf()))}get hours(){return Number(this.valueOf())/Number(g.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(g.MINUTE.valueOf())}get days(){return Number(this.valueOf())/Number(g.DAY.valueOf())}get seconds(){return Number(this.valueOf())/Number(g.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(d.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(d.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get year(){return this.date().getUTCFullYear()}setYear(e){const r=this.date();return r.setUTCFullYear(e),new d(r)}get month(){return this.date().getUTCMonth()}setMonth(e){const r=this.date();return r.setUTCMonth(e),new d(r)}get day(){return this.date().getUTCDate()}setDay(e){const r=this.date();return r.setUTCDate(e),new d(r)}get hour(){return this.date().getUTCHours()}get localHour(){return this.date().getHours()}setLocalHour(e){const r=this.date();return r.setHours(e),new d(r)}setHour(e){const r=this.date();return r.setUTCHours(e),new d(r)}get minute(){return this.date().getUTCMinutes()}setMinute(e){const r=this.date();return r.setUTCMinutes(e),new d(r)}get second(){return this.date().getUTCSeconds()}setSecond(e){const r=this.date();return r.setUTCSeconds(e),new d(r)}get millisecond(){return this.date().getUTCMilliseconds()}setMillisecond(e){const r=this.date();return r.setUTCMilliseconds(e),new d(r)}toString(e="ISO",r="UTC"){switch(e){case"ISODate":return this.toISOString(r).slice(0,10);case"ISOTime":return this.toISOString(r).slice(11,23);case"time":return this.timeString(!1,r);case"preciseTime":return this.timeString(!0,r);case"date":return this.dateString();case"preciseDate":return`${this.dateString()} ${this.timeString(!0,r)}`;case"dateTime":return`${this.dateString()} ${this.timeString(!1,r)}`;default:return this.toISOString(r)}}remainder(e){return en(this,e)}get isToday(){return this.truncate(g.DAY).equals(d.now().truncate(g.DAY))}truncate(e){return this.sub(this.remainder(e))}formatBySpan(e){return e.greaterThanOrEqual(g.days(30))?"shortDate":e.greaterThanOrEqual(g.DAY)?"dateTime":e.greaterThanOrEqual(g.HOUR)?"time":e.greaterThanOrEqual(g.SECOND)?"preciseTime":"ISOTime"}static now(){return new d(new Date)}static max(...e){let r=d.MIN;for(const n of e){const s=new d(n);s.after(r)&&(r=s)}return r}static min(...e){let r=d.MAX;for(const n of e){const s=new d(n);s.before(r)&&(r=s)}return r}static nanoseconds(e,r="UTC"){return new d(e,r)}static NANOSECOND=d.nanoseconds(1);static microseconds(e,r="UTC"){return d.nanoseconds(e*1e3,r)}static MICROSECOND=d.microseconds(1);static milliseconds(e,r="UTC"){return d.microseconds(e*1e3,r)}static MILLISECOND=d.milliseconds(1);static seconds(e,r="UTC"){return d.milliseconds(e*1e3,r)}static SECOND=d.seconds(1);static minutes(e,r="UTC"){return d.seconds(e*60,r)}static MINUTE=d.minutes(1);static hours(e,r="UTC"){return d.minutes(e*60,r)}static HOUR=d.hours(1);static days(e,r="UTC"){return d.hours(e*24,r)}static DAY=d.days(1);static MAX=new d(ke);static MIN=new d(0);static ZERO=new d(0);static z=a.z.union([a.z.instanceof(d),a.z.object({value:a.z.bigint()}).transform(e=>new d(e.value)),a.z.string().transform(e=>new d(BigInt(e))),a.z.number().transform(e=>new d(e)),a.z.bigint().transform(e=>new d(e)),a.z.date().transform(e=>new d(e)),a.z.custom(e=>e instanceof g).transform(e=>new d(e)),Fo.transform(e=>new d(e))]);static sort(e,r){return Number(e.valueOf()-r.valueOf())}}class g extends re{constructor(e){typeof e=="number"&&(e=Math.trunc(e.valueOf())),B(e)&&(e=e.value),super(BigInt(e.valueOf()))}static fromSeconds(e){return e instanceof g?e:e instanceof z?e.period:e instanceof d?new g(e):(B(e)&&(e=e.value),["number","bigint"].includes(typeof e)?g.seconds(e):new g(e))}static fromMilliseconds(e){return e instanceof g?e:e instanceof z?e.period:e instanceof d?new g(e):(B(e)&&(e=e.value),["number","bigint"].includes(typeof e)?g.milliseconds(e):new g(e))}valueOf(){return this.value}lessThan(e){return this.valueOf()<new g(e).valueOf()}greaterThan(e){return this.valueOf()>new g(e).valueOf()}lessThanOrEqual(e){return this.valueOf()<=new g(e).valueOf()}greaterThanOrEqual(e){return this.valueOf()>=new g(e).valueOf()}remainder(e){return en(this,e)}truncate(e){return new g(BigInt(Math.trunc(Number(this.valueOf()/e.valueOf())))*e.valueOf())}toString(e="full"){if(e==="semantic")return this.toSemanticString();const r=this.truncate(g.DAY),n=this.truncate(g.HOUR),s=this.truncate(g.MINUTE),i=this.truncate(g.SECOND),o=this.truncate(g.MILLISECOND),u=this.truncate(g.MICROSECOND),l=this.truncate(g.NANOSECOND),h=r,f=n.sub(r),y=s.sub(n),p=i.sub(s),I=o.sub(i),A=u.sub(o),$=l.sub(u);let O="";return h.isZero||(O+=`${h.days}d `),f.isZero||(O+=`${f.hours}h `),y.isZero||(O+=`${y.minutes}m `),p.isZero||(O+=`${p.seconds}s `),I.isZero||(O+=`${I.milliseconds}ms `),A.isZero||(O+=`${A.microseconds}µs `),$.isZero||(O+=`${$.nanoseconds}ns`),O.trim()}toSemanticString(){const e=this.valueOf()<0n?-this.valueOf():this.valueOf(),r=new g(e),n=this.valueOf()<0n;if(r.valueOf()===0n)return"0s";if(r.lessThan(g.SECOND))return"< 1s";const s=r.days,i=r.hours,o=r.minutes,u=r.seconds,l=Math.floor(s/tr),h=Math.floor(s/Ae),f=Math.floor(s/7),y=Math.floor(s),p=Math.floor(i),I=Math.floor(o),A=Math.floor(u),$=n?"-":"";if(l>=1){let O=`${l}y`;if(l<2){const S=Math.floor(s%tr/Ae);S>0&&(O+=` ${S}mo`)}return $+O}if(f>=1&&s<Ae&&s%7===0){let O=`${f}w`;const S=Math.floor(s%7),K=Math.floor(i-f*7*24);return f<2&&(S>0?O+=` ${S}d`:K>0&&K<24&&(O+=` ${K}h`)),$+O}if(h>=1){let O=`${h}mo`;if(h<3){const S=Math.floor(s%Ae);S>0&&(O+=` ${S}d`)}return $+O}if(f>=1){let O=`${f}w`;const S=Math.floor(s%7),K=Math.floor(i-f*7*24);return f<2&&(S>0?O+=` ${S}d`:K>0&&K<24&&(O+=` ${K}h`)),$+O}if(y>=1){let O=`${y}d`;const S=Math.floor(i-y*24);return y<2&&S>0&&(O+=` ${S}h`),$+O}if(p>=1){let O=`${p}h`;if(p<3){const S=Math.floor(o-p*60);S>0&&(O+=` ${S}m`)}return $+O}if(I>=1){let O=`${I}m`;if(I<5){const S=Math.floor(u-I*60);S>0&&(O+=` ${S}s`)}return $+O}return`${$}${A}s`}mult(e){return new g(R(this.valueOf(),e))}div(e){return new g(Ne(this.valueOf(),e))}get days(){return Number(this.valueOf())/Number(g.DAY.valueOf())}get hours(){return Number(this.valueOf())/Number(g.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(g.MINUTE.valueOf())}get seconds(){return Number(this.valueOf())/Number(g.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(g.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(g.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get isZero(){return this.valueOf()===0n}equals(e){return this.valueOf()===new g(e).valueOf()}add(e){return new g(this.valueOf()+new g(e).valueOf())}sub(e){return new g(this.valueOf()-new g(e).valueOf())}static nanoseconds(e=1){return new g(e)}static NANOSECOND=g.nanoseconds(1);static microseconds(e=1){return g.nanoseconds(R(e,1e3))}static MICROSECOND=g.microseconds(1);static milliseconds(e=1){return g.microseconds(R(e,1e3))}static MILLISECOND=g.milliseconds(1);static seconds(e=1){return g.milliseconds(R(e,1e3))}static SECOND=g.seconds(1);static minutes(e=1){return g.seconds(R(e,60))}static MINUTE=g.minutes(1);static hours(e){return g.minutes(R(e,60))}static HOUR=g.hours(1);static days(e){return g.hours(R(e,24))}static DAY=g.days(1);static MAX=new g(ke);static MIN=new g(0);static ZERO=new g(0);static z=a.z.union([a.z.object({value:a.z.bigint()}).transform(e=>new g(e.value)),a.z.string().transform(e=>new g(BigInt(e))),a.z.number().transform(e=>new g(e)),a.z.bigint().transform(e=>new g(e)),a.z.instanceof(g),a.z.instanceof(d).transform(e=>new g(e)),a.z.custom(e=>e instanceof z).transform(e=>new g(e))])}class z extends re{constructor(e){B(e)&&(e=e.value),super(e.valueOf())}toString(){return`${this.valueOf()} Hz`}equals(e){return this.valueOf()===new z(e).valueOf()}get period(){return g.seconds(1/this.valueOf())}sampleCount(e){return new g(e).seconds*this.valueOf()}byteCount(e,r){return this.sampleCount(e)*new b(r).valueOf()}span(e){return g.seconds(e/this.valueOf())}byteSpan(e,r){return this.span(e.valueOf()/new b(r).valueOf())}add(e){return new z(W(this.valueOf(),new z(e).valueOf()))}sub(e){return new z(q(this.valueOf(),new z(e).valueOf()))}mult(e){return new z(R(this.valueOf(),e))}div(e){return new z(Ne(this.valueOf(),e))}static hz(e){return new z(e)}static khz(e){return z.hz(e*1e3)}static z=a.z.union([a.z.number().transform(e=>new z(e)),a.z.instanceof(z)])}class b extends re{constructor(e){B(e)&&(e=e.value),super(e.valueOf())}length(e){return e.valueOf()/this.valueOf()}size(e){return new m(e*this.valueOf())}add(e){return new b(W(this.valueOf(),new b(e).valueOf()))}sub(e){return new b(q(this.valueOf(),new b(e).valueOf()))}mult(e){return new b(R(this.valueOf(),e))}div(e){return new b(Ne(this.valueOf(),e))}static UNKNOWN=new b(0);static BIT128=new b(16);static BIT64=new b(8);static BIT32=new b(4);static BIT16=new b(2);static BIT8=new b(1);static z=a.z.union([a.z.number().transform(e=>new b(e)),a.z.instanceof(b)])}class N{start;end;constructor(e,r){typeof e=="object"&&"start"in e?(this.start=new d(e.start),this.end=new d(e.end)):(this.start=new d(e),this.end=new d(r))}get span(){return new g(this.end.valueOf()-this.start.valueOf())}get isValid(){return this.start.valueOf()<=this.end.valueOf()}makeValid(){return this.isValid?this:this.swap()}get isZero(){return this.start.isZero&&this.end.isZero}get numeric(){return{start:Number(this.start.valueOf()),end:Number(this.end.valueOf())}}swap(){return new N(this.end,this.start)}get numericBounds(){return{lower:Number(this.start.valueOf()),upper:Number(this.end.valueOf())}}equals(e,r=g.ZERO){if(r.isZero)return this.start.equals(e.start)&&this.end.equals(e.end);let n=this.start.sub(e.start).valueOf(),s=this.end.sub(e.end).valueOf();return n<0&&(n=-n),s<0&&(s=-s),n<=r.valueOf()&&s<=r.valueOf()}toString(){return`${this.start.toString()} - ${this.end.toString()}`}toPrettyString(){return`${this.start.toString("preciseDate")} - ${this.span.toString()}`}overlapsWith(e,r=g.ZERO){e=e.makeValid();const n=this.makeValid();if(this.equals(e))return!0;if(e.end.equals(n.start)||n.end.equals(e.start))return!1;const s=d.max(n.start,e.start),i=d.min(n.end,e.end);return i.before(s)?!1:new g(i.sub(s)).greaterThanOrEqual(r)}contains(e){return e instanceof N?this.contains(e.start)&&this.contains(e.end):this.start.beforeEq(e)&&this.end.after(e)}boundBy(e){const r=new N(this.start,this.end);return e.start.after(this.start)&&(r.start=e.start),e.start.after(this.end)&&(r.end=e.start),e.end.before(this.end)&&(r.end=e.end),e.end.before(this.start)&&(r.start=e.end),r}static max(...e){return new N(d.min(...e.map(r=>r.start)),d.max(...e.map(r=>r.end)))}static MAX=new N(d.MIN,d.MAX);static ZERO=new N(d.ZERO,d.ZERO);static z=a.z.union([a.z.object({start:d.z,end:d.z}).transform(e=>new N(e.start,e.end)),a.z.instanceof(N)]);static sort(e,r){return d.sort(e.start,r.start)||d.sort(e.end,r.end)}static merge(...e){return N.max(...e.map(r=>new N(r).makeValid()))}}class c extends re{constructor(e){if(B(e)&&(e=e.value),e instanceof c||typeof e=="string"||typeof e.valueOf()=="string")super(e.valueOf());else{const r=c.ARRAY_CONSTRUCTOR_DATA_TYPES.get(e.constructor.name);if(r==null)throw new Error(`unable to find data type for ${e.toString()}`);super(r.valueOf())}}get Array(){const e=c.ARRAY_CONSTRUCTORS.get(this.toString());if(e==null)throw new Error(`unable to find array constructor for ${this.valueOf()}`);return e}equals(e){return this.valueOf()===e.valueOf()}matches(...e){return e.some(r=>this.equals(r))}toString(e=!1){return e?c.SHORT_STRINGS.get(this.valueOf())??this.valueOf():this.valueOf()}get isVariable(){return this.equals(c.JSON)||this.equals(c.STRING)}get isNumeric(){return!this.isVariable&&!this.equals(c.UUID)}get isInteger(){const e=this.toString();return e.startsWith("int")||e.startsWith("uint")}get isFloat(){return this.toString().startsWith("float")}get density(){const e=c.DENSITIES.get(this.toString());if(e==null)throw new Error(`unable to find density for ${this.valueOf()}`);return e}get isUnsignedInteger(){return this.equals(c.UINT8)||this.equals(c.UINT16)||this.equals(c.UINT32)||this.equals(c.UINT64)}get isSignedInteger(){return this.equals(c.INT8)||this.equals(c.INT16)||this.equals(c.INT32)||this.equals(c.INT64)}canSafelyCastTo(e){return this.equals(e)?!0:!this.isNumeric||!e.isNumeric||this.isVariable||e.isVariable||this.isUnsignedInteger&&e.isSignedInteger?!1:this.isFloat?e.isFloat&&this.density.valueOf()<=e.density.valueOf():this.equals(c.INT32)&&e.equals(c.FLOAT64)||this.equals(c.INT8)&&e.equals(c.FLOAT32)?!0:this.isInteger&&e.isInteger?this.density.valueOf()<=e.density.valueOf()&&this.isUnsignedInteger===e.isUnsignedInteger:!1}canCastTo(e){return this.isNumeric&&e.isNumeric?!0:this.equals(e)}checkArray(e){return e.constructor===this.Array}get usesBigInt(){return c.BIG_INT_TYPES.some(e=>e.equals(this))}static UNKNOWN=new c("unknown");static FLOAT64=new c("float64");static FLOAT32=new c("float32");static INT64=new c("int64");static INT32=new c("int32");static INT16=new c("int16");static INT8=new c("int8");static UINT64=new c("uint64");static UINT32=new c("uint32");static UINT16=new c("uint16");static UINT8=new c("uint8");static BOOLEAN=new c("boolean");static TIMESTAMP=new c("timestamp");static UUID=new c("uuid");static STRING=new c("string");static JSON=new c("json");static ARRAY_CONSTRUCTORS=new Map([[c.UINT8.toString(),Uint8Array],[c.UINT16.toString(),Uint16Array],[c.UINT32.toString(),Uint32Array],[c.UINT64.toString(),BigUint64Array],[c.FLOAT32.toString(),Float32Array],[c.FLOAT64.toString(),Float64Array],[c.INT8.toString(),Int8Array],[c.INT16.toString(),Int16Array],[c.INT32.toString(),Int32Array],[c.INT64.toString(),BigInt64Array],[c.TIMESTAMP.toString(),BigInt64Array],[c.STRING.toString(),Uint8Array],[c.JSON.toString(),Uint8Array],[c.UUID.toString(),Uint8Array]]);static ARRAY_CONSTRUCTOR_DATA_TYPES=new Map([[Uint8Array.name,c.UINT8],[Uint16Array.name,c.UINT16],[Uint32Array.name,c.UINT32],[BigUint64Array.name,c.UINT64],[Float32Array.name,c.FLOAT32],[Float64Array.name,c.FLOAT64],[Int8Array.name,c.INT8],[Int16Array.name,c.INT16],[Int32Array.name,c.INT32],[BigInt64Array.name,c.INT64]]);static DENSITIES=new Map([[c.UINT8.toString(),b.BIT8],[c.UINT16.toString(),b.BIT16],[c.UINT32.toString(),b.BIT32],[c.UINT64.toString(),b.BIT64],[c.FLOAT32.toString(),b.BIT32],[c.FLOAT64.toString(),b.BIT64],[c.INT8.toString(),b.BIT8],[c.INT16.toString(),b.BIT16],[c.INT32.toString(),b.BIT32],[c.INT64.toString(),b.BIT64],[c.TIMESTAMP.toString(),b.BIT64],[c.STRING.toString(),b.UNKNOWN],[c.JSON.toString(),b.UNKNOWN],[c.UUID.toString(),b.BIT128]]);static ALL=[c.UNKNOWN,c.FLOAT64,c.FLOAT32,c.INT64,c.INT32,c.INT16,c.INT8,c.UINT64,c.UINT32,c.UINT16,c.UINT8,c.TIMESTAMP,c.UUID,c.STRING,c.JSON];static SHORT_STRINGS=new Map([[c.UINT8.toString(),"u8"],[c.UINT16.toString(),"u16"],[c.UINT32.toString(),"u32"],[c.UINT64.toString(),"u64"],[c.INT8.toString(),"i8"],[c.INT16.toString(),"i16"],[c.INT32.toString(),"i32"],[c.INT64.toString(),"i64"],[c.FLOAT32.toString(),"f32"],[c.FLOAT64.toString(),"f64"],[c.BOOLEAN.toString(),"bool"],[c.TIMESTAMP.toString(),"ts"],[c.UUID.toString(),"uuid"],[c.STRING.toString(),"str"],[c.JSON.toString(),"json"]]);static BIG_INT_TYPES=[c.INT64,c.UINT64,c.TIMESTAMP];static z=a.z.union([a.z.string().transform(e=>new c(e)),a.z.instanceof(c)])}class m extends re{constructor(e){B(e)&&(e=e.value),super(e.valueOf())}largerThan(e){return B(e)&&(e=e.value),this.valueOf()>e.valueOf()}smallerThan(e){return B(e)&&(e=e.value),this.valueOf()<e.valueOf()}add(e){return B(e)&&(e=e.value),new m(W(this.valueOf(),e.valueOf()))}sub(e){return B(e)&&(e=e.value),new m(q(this.valueOf(),e.valueOf()))}mult(e){return new m(R(this.valueOf(),e))}div(e){return new m(Ne(this.valueOf(),e))}truncate(e){return new m(Math.trunc(this.valueOf()/new m(e).valueOf())*new m(e).valueOf())}remainder(e){return m.bytes(this.valueOf()%new m(e).valueOf())}get gigabytes(){return this.valueOf()/m.GIGABYTE.valueOf()}get megabytes(){return this.valueOf()/m.MEGABYTE.valueOf()}get kilobytes(){return this.valueOf()/m.KILOBYTE.valueOf()}get terabytes(){return this.valueOf()/m.TERABYTE.valueOf()}toString(){const e=this.truncate(m.TERABYTE),r=this.truncate(m.GIGABYTE),n=this.truncate(m.MEGABYTE),s=this.truncate(m.KILOBYTE),i=this.truncate(m.BYTE),o=e,u=r.sub(e),l=n.sub(r),h=s.sub(n),f=i.sub(s);let y="";return o.isZero||(y+=`${o.terabytes}TB `),u.isZero||(y+=`${u.gigabytes}GB `),l.isZero||(y+=`${l.megabytes}MB `),h.isZero||(y+=`${h.kilobytes}KB `),(!f.isZero||y==="")&&(y+=`${f.valueOf()}B`),y.trim()}static bytes(e=1){return new m(e)}static BYTE=new m(1);static kilobytes(e=1){return m.bytes(new m(e).valueOf()*1e3)}static KILOBYTE=m.kilobytes(1);static megabytes(e=1){return m.kilobytes(new m(e).valueOf()*1e3)}static MEGABYTE=m.megabytes(1);static gigabytes(e=1){return m.megabytes(new m(e).valueOf()*1e3)}static GIGABYTE=m.gigabytes(1);static terabytes(e){return m.gigabytes(new m(e).valueOf()*1e3)}static TERABYTE=m.terabytes(1);static ZERO=new m(0);static z=a.z.union([a.z.number().transform(e=>new m(e)),a.z.instanceof(m)]);get isZero(){return this.valueOf()===0}}a.z.object({start:a.z.number(),end:a.z.number()});const Yo=a.z.union([a.z.instanceof(Uint8Array),a.z.instanceof(Uint16Array),a.z.instanceof(Uint32Array),a.z.instanceof(BigUint64Array),a.z.instanceof(Float32Array),a.z.instanceof(Float64Array),a.z.instanceof(Int8Array),a.z.instanceof(Int16Array),a.z.instanceof(Int32Array),a.z.instanceof(BigInt64Array)]),tn=t=>{const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e==="bigint"||t instanceof d||t instanceof g||t instanceof Date},Vo=(t,e,r,n=0)=>t.usesBigInt&&!e.usesBigInt?Number(r)-Number(n):!t.usesBigInt&&e.usesBigInt?BigInt(r.valueOf())-BigInt(n.valueOf()):q(r,n),Wo="00000000-0000-0000-0000-000000000000",Go=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Ho(t){return typeof t=="string"&&Go.test(t)}const M=[];for(let t=0;t<256;++t)M.push((t+256).toString(16).slice(1));function rn(t,e=0){return(M[t[e+0]]+M[t[e+1]]+M[t[e+2]]+M[t[e+3]]+"-"+M[t[e+4]]+M[t[e+5]]+"-"+M[t[e+6]]+M[t[e+7]]+"-"+M[t[e+8]]+M[t[e+9]]+"-"+M[t[e+10]]+M[t[e+11]]+M[t[e+12]]+M[t[e+13]]+M[t[e+14]]+M[t[e+15]]).toLowerCase()}function Xo(t,e=0){const r=rn(t,e);if(!Ho(r))throw TypeError("Stringified UUID is invalid");return r}let tt;const Jo=new Uint8Array(16);function Ko(){if(!tt){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");tt=crypto.getRandomValues.bind(crypto)}return tt(Jo)}const Qo=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),rr={randomUUID:Qo};function _o(t,e,r){t=t||{};const n=t.random??t.rng?.()??Ko();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,rn(n)}function ea(t,e,r){return rr.randomUUID&&!t?rr.randomUUID():_o(t)}const ta=()=>ea(),Gt=(t,e)=>Xo(t,e),ra=Wo,na=Object.freeze(Object.defineProperty({__proto__:null,ZERO:ra,create:ta,parse:Gt},Symbol.toStringTag,{value:"Module"})),H=-1,mt={[Symbol.iterator]:()=>mt,next:()=>({done:!0,value:void 0})},sa=a.z.string().transform(t=>new Uint8Array(atob(t).split("").map(e=>e.charCodeAt(0))).buffer),ia=a.z.union([a.z.null(),a.z.undefined()]).transform(()=>new Uint8Array().buffer),bt=10,nn=(t,e)=>{if(t==="number"&&!e.isNumeric)throw new Error(`cannot convert series of type ${e.toString()} to number`);if(t==="bigint"&&!e.usesBigInt)throw new Error(`cannot convert series of type ${e.toString()} to bigint`)},sn="sy_x_telem_series";class L{key;discriminator=sn;dataType;sampleOffset;gl;_data;timeRange=N.ZERO;alignment=0n;alignmentMultiple=1n;cachedMin;cachedMax;writePos=H;_refCount=0;cachedLength;_cachedIndexes;static crudeZ=a.z.object({timeRange:N.z.optional(),dataType:c.z,alignment:a.z.coerce.bigint().optional(),data:a.z.union([sa,ia,a.z.instanceof(ArrayBuffer),a.z.instanceof(Uint8Array)]),glBufferUsage:Zo.default("static").optional()});static z=L.crudeZ.transform(e=>new L(e));constructor(e){oa(e)&&(e={data:e}),e.data??=[];const{dataType:r,timeRange:n,sampleOffset:s=0,glBufferUsage:i="static",alignment:o=0n,alignmentMultiple:u=1n,key:l=It(),data:h}=e;if(on(h)){const p=h;this.key=p.key,this.dataType=p.dataType,this.sampleOffset=p.sampleOffset,this.gl=p.gl,this._data=p._data,this.timeRange=p.timeRange,this.alignment=p.alignment,this.alignmentMultiple=p.alignmentMultiple,this.cachedMin=p.cachedMin,this.cachedMax=p.cachedMax,this.writePos=p.writePos,this._refCount=p._refCount,this.cachedLength=p.cachedLength;return}const f=tn(h),y=Array.isArray(h);if(r!=null)this.dataType=new c(r);else{if(h instanceof ArrayBuffer)throw new Error("cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type.");if(y||f){let p=h;if(!f){if(h.length===0)throw new Error("cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type.");p=h[0]}if(typeof p=="string")this.dataType=c.STRING;else if(typeof p=="number")this.dataType=c.FLOAT64;else if(typeof p=="bigint")this.dataType=c.INT64;else if(typeof p=="boolean")this.dataType=c.BOOLEAN;else if(p instanceof d||p instanceof Date||p instanceof d)this.dataType=c.TIMESTAMP;else if(typeof p=="object")this.dataType=c.JSON;else throw new Error(`cannot infer data type of ${typeof p} when constructing a Series from a JS array`)}else this.dataType=new c(h)}if(!y&&!f)this._data=h;else if(y&&h.length===0)this._data=new this.dataType.Array([]).buffer;else{let p=f?[h]:h;const I=p[0];(I instanceof d||I instanceof Date||I instanceof g)&&(p=p.map(A=>new d(A).valueOf())),this.dataType.equals(c.STRING)?(this.cachedLength=p.length,this._data=new TextEncoder().encode(`${p.join(`
2
+ `)}
3
+ `).buffer):this.dataType.equals(c.JSON)?(this.cachedLength=p.length,this._data=new TextEncoder().encode(`${p.map(A=>ot.encodeString(A)).join(`
4
+ `)}
5
+ `).buffer):this.dataType.usesBigInt&&typeof I=="number"?this._data=new this.dataType.Array(p.map(A=>BigInt(Math.round(A)))).buffer:!this.dataType.usesBigInt&&typeof I=="bigint"?this._data=new this.dataType.Array(p.map(Number)).buffer:this._data=new this.dataType.Array(p).buffer}this.key=l,this.alignment=o,this.alignmentMultiple=u,this.sampleOffset=s??0,this.timeRange=n??N.ZERO,this.gl={control:null,buffer:null,prevBuffer:0,bufferUsage:i}}static alloc({capacity:e,dataType:r,...n}){if(e===0)throw new Error("[Series] - cannot allocate an array of length 0");const s=new new c(r).Array(e),i=new L({data:s.buffer,dataType:r,...n});return i.writePos=0,i}get refCount(){return this._refCount}acquire(e){this._refCount++,e!=null&&this.updateGLBuffer(e)}release(){this._refCount--,this.refCount===0&&this.gl.control!=null?this.maybeGarbageCollectGLBuffer(this.gl.control):this.refCount<0&&console.warn("cannot release a series with a negative reference count")}write(e){if(!e.dataType.equals(this.dataType))throw new Error("buffer must be of the same type as this array");return this.dataType.isVariable?this.writeVariable(e):this.writeFixed(e)}writeVariable(e){if(this.writePos===H)return 0;const r=this.byteCapacity.valueOf()-this.writePos,n=e.subBytes(0,r);return this.writeToUnderlyingData(n),this.writePos+=n.byteLength.valueOf(),this.cachedLength!=null&&(this.cachedLength+=n.length,this.calculateCachedLength()),n.length}writeFixed(e){if(this.writePos===H)return 0;const r=this.capacity-this.writePos,n=e.sub(0,r);return this.writeToUnderlyingData(n),this.cachedLength=void 0,this.maybeRecomputeMinMax(n),this.writePos+=n.length,n.length}writeToUnderlyingData(e){this.underlyingData.set(e.data,this.writePos)}get buffer(){return typeof this._data=="object"&&"buffer"in this._data?this._data.buffer:this._data}get underlyingData(){return new this.dataType.Array(this._data)}get data(){return this.writePos===H?this.underlyingData:new this.dataType.Array(this._data,0,this.writePos)}toStrings(){return this.dataType.isVariable?new TextDecoder().decode(this.underlyingData).split(`
6
+ `).slice(0,-1):Array.from(this).map(e=>e.toString())}parseJSON(e){if(!this.dataType.equals(c.JSON))throw new Error("cannot parse non-JSON series as JSON");return this.toStrings().map(r=>e.parse(ot.decodeString(r)))}get byteCapacity(){return new m(this.underlyingData.byteLength)}get capacity(){return this.dataType.isVariable?this.byteCapacity.valueOf():this.dataType.density.length(this.byteCapacity)}get byteLength(){return this.writePos===H?this.byteCapacity:this.dataType.isVariable?new m(this.writePos):this.dataType.density.size(this.writePos)}get length(){return this.cachedLength!=null?this.cachedLength:this.dataType.isVariable?this.calculateCachedLength():this.writePos===H?this.byteCapacity.valueOf()/this.dataType.density.valueOf():this.writePos}calculateCachedLength(){if(!this.dataType.isVariable)throw new Error("cannot calculate length of a non-variable length data type");let e=0;const r=[0];return this.data.forEach((n,s)=>{n===bt&&(e++,r.push(s+1))}),this._cachedIndexes=r,this.cachedLength=e,e}convert(e,r=0){if(this.dataType.equals(e))return this;const n=new e.Array(this.length);for(let s=0;s<this.length;s++)n[s]=Vo(this.dataType,e,this.data[s],r);return new L({data:n.buffer,dataType:e,timeRange:this.timeRange,sampleOffset:r,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment})}calcRawMax(){if(this.length===0)return-1/0;if(this.dataType.equals(c.TIMESTAMP))this.cachedMax=this.data[this.data.length-1];else if(this.dataType.usesBigInt){const e=this.data;this.cachedMax=e.reduce((r,n)=>r>n?r:n)}else{const e=this.data;this.cachedMax=e.reduce((r,n)=>r>n?r:n)}return this.cachedMax}get max(){return this.calcMax()}calcMax(){if(this.dataType.isVariable)throw new Error("cannot calculate maximum on a variable length data type");return this.writePos===0?-1/0:(this.cachedMax??=this.calcRawMax(),W(this.cachedMax,this.sampleOffset))}calcRawMin(){if(this.length===0)return 1/0;if(this.dataType.equals(c.TIMESTAMP))this.cachedMin=this.data[0];else if(this.dataType.usesBigInt){const e=this.data;this.cachedMin=e.reduce((r,n)=>r<n?r:n)}else{const e=this.data;this.cachedMin=e.reduce((r,n)=>r<n?r:n)}return this.cachedMin}get min(){return this.calcMin()}calcMin(){if(this.dataType.isVariable)throw new Error("cannot calculate minimum on a variable length data type");return this.writePos===0?1/0:(this.cachedMin??=this.calcRawMin(),W(this.cachedMin,this.sampleOffset))}get bounds(){return w(Number(this.min),Number(this.max),{makeValid:!1})}maybeRecomputeMinMax(e){if(this.cachedMin!=null){const r=e.cachedMin??e.calcRawMin();r<this.cachedMin&&(this.cachedMin=r)}if(this.cachedMax!=null){const r=e.cachedMax??e.calcRawMax();r>this.cachedMax&&(this.cachedMax=r)}}atAlignment(e,r){const n=Number((e-this.alignment)/this.alignmentMultiple);if(n<0||n>=this.length){if(r===!0)throw new Error(`[series] - no value at index ${n}`);return}return this.at(n,r)}at(e,r=!1){if(this.dataType.isVariable)return this.atVariable(e,r??!1);if(this.dataType.equals(c.UUID))return this.atUUID(e,r);e<0&&(e=this.length+e);const n=this.data[e];if(n==null){if(r===!0)throw new Error(`[series] - no value at index ${e}`);return}return W(n,this.sampleOffset)}atUUID(e,r){e<0&&(e=this.length+e);const n=Gt(new Uint8Array(this.buffer,e*this.dataType.density.valueOf()));if(n==null){if(r)throw new Error(`[series] - no value at index ${e}`);return}return n}atVariable(e,r){let n=0,s=0;if(this._cachedIndexes!=null)n=this._cachedIndexes[e],s=this._cachedIndexes[e+1]-1;else{e<0&&(e=this.length+e);for(let o=0;o<this.data.length;o++)if(this.data[o]===bt){if(e===0){s=o;break}n=o+1,e--}if(s===0&&(s=this.data.length),n>=s||e>0){if(r)throw new Error(`[series] - no value at index ${e}`);return}}const i=this.data.slice(n,s);return this.dataType.equals(c.STRING)?new TextDecoder().decode(i):St(JSON.parse(new TextDecoder().decode(i)))}binarySearch(e){let r=0,n=this.length-1;const s=Se(e);for(;r<=n;){const i=Math.floor((r+n)/2),o=s(this.at(i,!0),e);if(o===0)return i;o<0?r=i+1:n=i-1}return r}updateGLBuffer(e){if(this.gl.control=e,!this.dataType.equals(c.FLOAT32)&&!this.dataType.equals(c.UINT8))throw new Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");const{buffer:r,bufferUsage:n,prevBuffer:s}=this.gl;if(r==null&&(this.gl.buffer=e.createBuffer()),this.writePos!==s)if(e.bindBuffer(e.ARRAY_BUFFER,this.gl.buffer),this.writePos!==H){s===0&&e.bufferData(e.ARRAY_BUFFER,this.byteCapacity.valueOf(),e.STATIC_DRAW);const i=this.dataType.density.size(s).valueOf(),o=this.underlyingData.slice(this.gl.prevBuffer,this.writePos);e.bufferSubData(e.ARRAY_BUFFER,i,o.buffer),this.gl.prevBuffer=this.writePos}else e.bufferData(e.ARRAY_BUFFER,this.buffer,n==="static"?e.STATIC_DRAW:e.DYNAMIC_DRAW),this.gl.prevBuffer=H}as(e){return nn(e,this.dataType),this}get digest(){return{key:this.key,dataType:this.dataType.toString(),sampleOffset:this.sampleOffset,alignment:{lower:sr(this.alignmentBounds.lower),upper:sr(this.alignmentBounds.upper),multiple:this.alignmentMultiple},timeRange:this.timeRange.toString(),length:this.length,capacity:this.capacity}}get alignmentBounds(){return w(this.alignment,this.alignment+BigInt(this.length)*this.alignmentMultiple)}maybeGarbageCollectGLBuffer(e){this.gl.buffer!=null&&(e.deleteBuffer(this.gl.buffer),this.gl.buffer=null,this.gl.prevBuffer=0,this.gl.control=null)}get glBuffer(){if(this.gl.buffer==null)throw new Error("gl buffer not initialized");return this.gl.prevBuffer!==this.writePos&&console.warn("buffer not updated"),this.gl.buffer}[Symbol.iterator](){if(this.dataType.isVariable){const e=new aa(this);return this.dataType.equals(c.JSON)?new Ht(e):e}return this.dataType.equals(c.UUID)?new ua(this):new la(this)}slice(e,r){return this.sliceSub(!1,e,r)}sub(e,r){return this.sliceSub(!0,e,r)}subIterator(e,r){return new nr(this,e,r??this.length)}subAlignmentIterator(e,r){const n=Math.ceil(Number(e-this.alignment)/Number(this.alignmentMultiple)),s=Math.ceil(Number(r-this.alignment)/Number(this.alignmentMultiple));return new nr(this,n,s)}subBytes(e,r){if(e>=0&&(r==null||r>=this.byteLength.valueOf()))return this;const n=this.data.subarray(e,r);return new L({data:n,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(e)})}sliceSub(e,r,n){if(r<=0&&(n==null||n>=this.length))return this;let s;return e?s=this.data.subarray(r,n):s=this.data.slice(r,n),new L({data:s,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(r)})}reAlign(e){return new L({data:this.buffer,dataType:this.dataType,timeRange:N.ZERO,sampleOffset:this.sampleOffset,glBufferUsage:"static",alignment:e})}toString(){let e=`Series(${this.dataType.toString()} ${this.length} [`;if(this.length<=10)e+=Array.from(this).map(r=>r.toString());else{for(let r=0;r<5;r++)e+=`${this.at(r)?.toString()}`,e+=",";e+="...,";for(let r=-5;r<0;r++)e+=this.at(r)?.toString(),r<-1&&(e+=",")}return e+="])",e}}const oa=t=>t==null?!1:Array.isArray(t)||t instanceof ArrayBuffer||ArrayBuffer.isView(t)&&!(t instanceof DataView)||t instanceof L?!0:tn(t),on=ys(sn,L);class nr{series;end;index;constructor(e,r,n){this.series=e;const s=w(0,e.length+1);this.end=ct(s,n),this.index=ct(s,r)}next(){return this.index>=this.end?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}}class aa{series;index;decoder;constructor(e){if(!e.dataType.isVariable)throw new Error("cannot create a variable series iterator for a non-variable series");this.series=e,this.index=0,this.decoder=new TextDecoder}next(){const e=this.index,r=this.series.data;for(;this.index<r.length&&r[this.index]!==bt;)this.index++;const n=this.index;return e===n?{done:!0,value:void 0}:(this.index++,{done:!1,value:this.decoder.decode(this.series.buffer.slice(e,n))})}}class Ht{wrapped;static schema=a.z.record(a.z.string(),a.z.unknown());constructor(e){this.wrapped=e}next(){const e=this.wrapped.next();return e.done===!0?{done:!0,value:void 0}:{done:!1,value:ot.decodeString(e.value,Ht.schema)}}}class ua{series;index;data;density;constructor(e){if(!e.dataType.equals(c.UUID))throw new Error("cannot create a UUID series iterator for a non-UUID series");this.series=e,this.index=0,this.data=new Uint8Array(e.buffer),this.density=c.UUID.density.valueOf()}next(){if(this.index>=this.series.length)return{done:!0,value:void 0};const e=Gt(this.data,this.index*this.density);return this.index++,{done:!1,value:e}}}class la{series;index;constructor(e){this.series=e,this.index=0}next(){return this.index>=this.series.length?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}}class ca{series;constructor(e=[]){if(e.length!==0){const r=e[0].dataType;for(let n=1;n<e.length;n++)if(!e[n].dataType.equals(r))throw new Error("[multi-series] - series must have the same data type")}this.series=e}as(e){return nn(e,this.dataType),this}get dataType(){return this.series.length===0?c.UNKNOWN:this.series[0].dataType}get timeRange(){return this.series.length===0?N.ZERO:new N(this.series[0].timeRange.start,this.series[this.series.length-1].timeRange.end)}get alignment(){return this.series.length===0?0n:this.series[0].alignment}get alignmentBounds(){return this.series.length===0?w(0n,0n):w(this.series[0].alignmentBounds.lower,this.series[this.series.length-1].alignmentBounds.upper)}push(e){const r=()=>new Error(`cannot push a ${e.dataType.toString()} series to a ${this.dataType.toString()} multi-series`),n=e.dataType.equals(this.dataType);if(on(e)){if(this.series.length!==0&&!n)throw r();this.series.push(e)}else{if(this.series.length!==0&&e.series.length!==0&&!n)throw r();this.series.push(...e.series)}}get length(){return this.series.reduce((e,r)=>e+r.length,0)}atAlignment(e,r){for(const n of this.series)if(k(n.alignmentBounds,e))return n.atAlignment(e,r);if(r)throw new Error(`[series] - no value at alignment ${e}`)}at(e,r=!1){e<0&&(e=this.length+e);for(const n of this.series){if(e<n.length)return n.at(e,r);e-=n.length}if(r)throw new Error(`[series] - no value at index ${e}`)}subIterator(e,r){return new rt(this,e,r??this.length)}subAlignmentIterator(e,r){if(e>=this.alignmentBounds.upper||r<=this.alignmentBounds.lower)return mt;let n=0;for(let i=0;i<this.series.length;i++){const o=this.series[i];if(e<o.alignment)break;if(e>=o.alignmentBounds.upper)n+=o.length;else if(k(o.alignmentBounds,e)){n+=Math.ceil(Number(e-o.alignment)/Number(o.alignmentMultiple));break}}let s=0;for(let i=0;i<this.series.length;i++){const o=this.series[i];if(r<o.alignment)break;if(r>=o.alignmentBounds.upper)s+=o.length;else if(k(o.alignmentBounds,r)){s+=Math.ceil(Number(r-o.alignment)/Number(o.alignmentMultiple));break}}return new rt(this,n,s)}subAlignmentSpanIterator(e,r){if(e>=this.alignmentBounds.upper)return mt;r=Math.min(r,Number(this.distance(e,this.alignmentBounds.upper)));let n=0;for(let s=0;s<this.series.length;s++){const i=this.series[s];if(e<i.alignment)break;if(e>=i.alignmentBounds.upper)n+=i.length;else if(k(i.alignmentBounds,e)){n+=Number(e-i.alignment);break}}return new rt(this,n,n+r)}updateGLBuffer(e){this.series.forEach(r=>r.updateGLBuffer(e))}get bounds(){return Ur(this.series.map(e=>e.bounds))}get byteLength(){return new m(this.series.reduce((e,r)=>e+r.byteLength.valueOf(),0))}get data(){const e=new this.dataType.Array(this.length);let r=0;for(const n of this.series)e.set(n.data,r),r+=n.length;return new this.dataType.Array(e.buffer)}traverseAlignment(e,r){const n=this.series.map(s=>s.alignmentBounds);return Br(n,e,r)}acquire(e){this.series.forEach(r=>r.acquire(e))}release(){this.series.forEach(e=>e.release())}distance(e,r){const n=this.series.map(s=>s.alignmentBounds);return $r(n,e,r)}parseJSON(e){if(!this.dataType.equals(c.JSON))throw new Error("cannot parse non-JSON series as JSON");return this.series.flatMap(r=>r.parseJSON(e))}[Symbol.iterator](){return this.series.length===0?{next(){return{done:!0,value:void 0}}}:new ha(this.series)}toStrings(){return this.series.flatMap(e=>e.toStrings())}}class ha{series;seriesIndex;internal;constructor(e){this.series=e,this.seriesIndex=0,this.internal=e[0][Symbol.iterator]()}next(){const e=this.internal.next();return e.done===!1?e:this.seriesIndex===this.series.length-1?{done:!0,value:void 0}:(this.internal=this.series[++this.seriesIndex][Symbol.iterator](),this.next())}[Symbol.iterator](){return this}}class rt{series;index;end;constructor(e,r,n){this.series=e,this.end=n,this.index=r}next(){return this.index>=this.end?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}[Symbol.iterator](){return this}}const sr=t=>{const e=t>>32n,r=t&0xffffffffn;return{domain:e,sample:r}};a.z.object({baseInterval:g.z.optional(),maxRetries:a.z.number().optional(),scale:a.z.number().optional()});const fa=/^#?([0-9a-f]{6}|[0-9a-f]{8})$/i,Ze=a.z.string().regex(fa),oe=a.z.number().min(0).max(255),an=a.z.number().min(0).max(1),Je=a.z.tuple([oe,oe,oe,an]),da=a.z.tuple([oe,oe,oe]),ga=a.z.object({rgba255:Je}),pa=a.z.number().min(0).max(360),ya=a.z.number().min(0).max(100),ma=a.z.number().min(0).max(100),un=a.z.tuple([pa,ya,ma,an]),Ke=a.z.union([Ze,da,Je,un,ga]),Qe=Ke.transform(t=>T(t)),ba=t=>Qe.safeParse(t).success,wa=t=>Je.safeParse(t).success,Oa=(t=>{if(t==null)return;const e=Qe.safeParse(t);if(e.success)return cn(e.data);if(typeof t=="string")return t;throw e.error}),T=(t,e=1)=>{if(t=Ke.parse(t),typeof t=="string")return Re(t,e);if(Array.isArray(t)){if(t.length<3||t.length>4)throw new Error(`Invalid color: [${t.join(", ")}]`);return t.length===3?[...t,e]:t}return t.rgba255},ln=(t,e)=>{if(t==null||e==null)return t==e;const r=T(t),n=T(e);return r.every((s,i)=>s===n[i])},va=(t=>{if(t==null)return;const[e,r,n,s]=T(t);return`#${ze(e)}${ze(r)}${ze(n)}${s===1?"":ze(s*255)}`}),cn=t=>{const[e,r,n,s]=T(t);return`rgba(${e}, ${r}, ${n}, ${s})`},Ta=t=>`rgb(${hn(t)})`,hn=t=>{const[e,r,n]=T(t);return`${e}, ${r}, ${n}`},xa=t=>[...Xt(t),we(t)],Xt=t=>[ye(t)/255,me(t)/255,be(t)/255],ye=t=>T(t)[0],me=t=>T(t)[1],be=t=>T(t)[2],we=t=>T(t)[3],Sa=t=>ln(Jt,t),Na=t=>$a(T(t)),Ia=(t,e)=>{const[r,n,s]=T(t);if(e>100)throw new Error(`Color opacity must be between 0 and 100, got ${e}`);return e>1&&(e/=100),[r,n,s,e]},Te=t=>{const[e,r,n]=Xt(t).map(s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4);return Number((.2126*e+.7152*r+.0722*n).toFixed(3))},Ma=t=>{const[e,r,n]=Xt(t);return 1-(Math.max(e,r,n)-Math.min(e,r,n))},wt=(t,e)=>{const r=T(t),n=T(e),s=Te(r),i=Te(n);return(Math.max(s,i)+.5)/(Math.min(s,i)+.5)},Aa=(t,...e)=>{if(e.length===0)throw new Error("[Color.pickByContrast] - must provide at least one color");const r=T(t),[n]=e.sort((s,i)=>wt(r,i)-wt(r,s));return T(n)},za=t=>Te(t)<.5,Ea=t=>Te(t)>.5,Re=(t,e=1)=>(t=Ze.parse(t),t=ja(t),[Ee(t,0),Ee(t,2),Ee(t,4),t.length===8?Ee(t,6)/255:e]),Jt=[0,0,0,0],ze=t=>Math.floor(t).toString(16).padStart(2,"0"),Ee=(t,e)=>parseInt(t.slice(e,e+2),16),ja=t=>t.startsWith("#")?t.slice(1):t,ir={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",yellow:"#ffff00",cyan:"#00ffff",magenta:"#ff00ff",silver:"#c0c0c0",gray:"#808080",grey:"#808080",maroon:"#800000",olive:"#808000",lime:"#00ff00",aqua:"#00ffff",teal:"#008080",navy:"#000080",fuchsia:"#ff00ff",purple:"#800080",orange:"#ffa500",brown:"#a52a2a",tan:"#d2b48c",gold:"#ffd700",indigo:"#4b0082",violet:"#ee82ee",pink:"#ffc0cb",coral:"#ff7f50",salmon:"#fa8072",khaki:"#f0e68c",crimson:"#dc143c",transparent:"transparent"},Ua=t=>{if(!t)return;const e=t.trim().toLowerCase();if(!(e==="transparent"||e==="none")){if(e.startsWith("#")){if(e.length===4){const r=e[1],n=e[2],s=e[3],i=`#${r}${r}${n}${n}${s}${s}`;if(Ze.safeParse(i).success)return Re(i)}return(e.length===7||e.length===9)&&Ze.safeParse(e).success?Re(e):void 0}if(e.startsWith("rgb")){const r=e.match(/rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);if(r){const[,n,s,i,o]=r;return[parseInt(n),parseInt(s),parseInt(i),o?parseFloat(o):1]}}if(ir[e])return Re(ir[e])}},Ba=t=>{t=un.parse(t);let[e,r,n]=t;const s=t[3];e/=360,r/=100,n/=100;let i,o,u;if(r===0)i=o=u=n;else{const l=n<.5?n*(1+r):n+r-n*r,h=2*n-l;i=nt(h,l,e+1/3),o=nt(h,l,e),u=nt(h,l,e-1/3)}return[Math.round(i*255),Math.round(o*255),Math.round(u*255),s]},nt=(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),$a=t=>{t=Je.parse(t);let[e,r,n]=t;const s=t[3];e/=255,r/=255,n/=255;const i=Math.max(e,r,n),o=Math.min(e,r,n);let u,l,h=(i+o)/2;if(i===o)u=l=0;else{const f=i-o;l=h>.5?f/(2-i-o):f/(i+o),i===e?u=(r-n)/f+(r<n?6:0):i===r?u=(n-e)/f+2:u=(e-r)/f+4,u/=6}return u*=360,l*=100,h*=100,[Math.round(u),Math.round(l),Math.round(h),s]},Ca=T("#000000"),Ra=T("#ffffff"),fn=a.z.object({key:a.z.string(),color:Ke,position:a.z.number(),switched:a.z.boolean().optional()}),La=a.z.array(fn),ka=(t,e)=>{if(t.length===0)return Jt;if(t=t.slice().sort((r,n)=>r.position-n.position),e<=t[0].position)return T(t[0].color);if(e>=t[t.length-1].position)return T(t[t.length-1].color);for(let r=0;r<t.length-1;r++){const n=t[r],s=t[r+1];if(e<n.position||e>s.position)continue;if(e===n.position)return T(n.color);if(e===s.position)return T(s.color);const i=(e-n.position)/(s.position-n.position),o=T(n.color),u=T(s.color),l=Math.round(ye(o)+i*(ye(u)-ye(o))),h=Math.round(me(o)+i*(me(u)-me(o))),f=Math.round(be(o)+i*(be(u)-be(o))),y=we(o)+i*(we(u)-we(o));return T([l,h,f,y])}return T(t[t.length-1].color)},Da=a.z.object({key:a.z.string(),name:a.z.string(),color:Qe}),Pa=a.z.object({key:a.z.string(),name:a.z.string(),swatches:a.z.array(Da)}),dn=Object.freeze(Object.defineProperty({__proto__:null,BLACK:Ca,WHITE:Ra,ZERO:Jt,aValue:we,bValue:be,colorZ:Qe,construct:T,contrast:wt,crudeZ:Ke,cssString:Oa,equals:ln,fromCSS:Ua,fromGradient:ka,fromHSLA:Ba,gValue:me,gradientZ:La,grayness:Ma,hex:va,hsla:Na,isColor:wa,isCrude:ba,isDark:za,isLight:Ea,isZero:Sa,luminance:Te,paletteZ:Pa,pickByContrast:Aa,rValue:ye,rgbCSS:Ta,rgbString:hn,rgba1:xa,rgbaCSS:cn,setAlpha:Ia,stopZ:fn},Symbol.toStringTag,{value:"Module"})),gn=a.z.int().min(0).max(255),pn=255,yn=0,qa={lower:yn,upper:pn+1},mn=a.z.object({name:a.z.string(),key:a.z.string()}),xe=t=>a.z.object({subject:mn,resource:t,authority:gn}),Za=(...t)=>e=>e.filter(r=>{let n=!1;return r.to!=null&&(n=t.includes(r.to.resource)),r.from!=null&&!n&&(n=t.includes(r.from.resource)),n}),bn=t=>a.z.object({from:xe(t),to:a.z.null()}),wn=t=>a.z.object({from:a.z.null(),to:xe(t)}),Fa=t=>a.z.union([bn(t),wn(t),a.z.object({from:xe(t),to:xe(t)})]),Ya=Object.freeze(Object.defineProperty({__proto__:null,ABSOLUTE_AUTHORITY:pn,AUTHORITY_BOUNDS:qa,ZERO_AUTHORITY:yn,acquireZ:wn,authorityZ:gn,filterTransfersByChannelKey:Za,releaseZ:bn,stateZ:xe,subjectZ:mn,transferZ:Fa},Symbol.toStringTag,{value:"Module"})),Va=(t,e)=>{let r=null;return e===0?t:(...n)=>{r!==null&&(clearTimeout(r),r=null),r=setTimeout(()=>t(...n),e)}},Wa=(t,e)=>{let r=null;return e===0?t:(...n)=>{r===null&&(r=setTimeout(()=>{t(...n),r=null},e))}},Ga=t=>{try{return structuredClone(t)}catch{return console.warn("Failed to deep copy object, falling back to JSON.parse(JSON.stringify)",t),console.trace(),JSON.parse(JSON.stringify(t))}},Ha=(t,e,r="")=>{const n={},s=(i,o,u)=>{if(typeof i!=typeof o||i===null||o===null){n[u]=[i,o];return}if(typeof i=="object"&&typeof o=="object")if(Array.isArray(i)&&Array.isArray(o)){if(i.length!==o.length){n[u]=[i,o];return}for(let l=0;l<i.length;l++)s(i[l],o[l],`${u}[${l}]`)}else new Set([...Object.keys(i),...Object.keys(o)]).forEach(l=>{s(i[l],o[l],u!==""?`${u}.${l}`:l)});else i!==o&&(n[u]=[i,o])};return s(t,e,r),n},Ot=(t,e)=>{const r=Array.isArray(t),n=Array.isArray(e);if(r!==n)return!1;if(r&&n){const o=t,u=e;if(o.length!==u.length)return!1;for(let l=0;l<o.length;l++)if(!Ot(o[l],u[l]))return!1;return!0}if(t==null||e==null||typeof t!="object"||typeof e!="object")return t===e;if("equals"in t)return t.equals(e);const s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;for(const o of s){const u=t[o],l=e[o];if(typeof u=="object"&&typeof l=="object"){if(!Ot(u,l))return!1}else if(u!==l)return!1}return!0},On=(t,e)=>{if(typeof t!="object"||t==null)return t===e;const r=Object.keys(t),n=Object.keys(e);if(n.length>r.length)return!1;for(const s of n){const i=t[s],o=e[s];if(typeof i=="object"&&typeof o=="object"){if(!On(i,o))return!1}else if(i!==o)return!1}return!0},U=".",vn=(t,e,r=U)=>{const n=t.split(r);return n.map((s,i)=>{const o=e(s,i,n);return o==null?null:typeof o=="string"?o:o.join(r)}).filter(s=>s!=null).join(r)},he=(t,e)=>{if(!Array.isArray(t))return t[e];const r=t[e];if(r!=null||t.length==0)return r;const n=t[0];if(typeof n=="object"&&"key"in n)return t.find(s=>s.key===e)},Xa=(t,e)=>{const r=t.split(U);return r.forEach((n,s)=>{e=he(e,n),e!=null&&typeof e=="object"&&"key"in e&&(r[s]=e.key)}),r.join(U)},Ja=(t,e)=>{const r=t.split(U);return e<0?r[r.length+e]:r[e]},Ka=(t,e)=>{if(e.length===0)return!0;const r=t.split(U),n=e.split(U);if(n.length>r.length)return!1;for(let s=0;s<n.length;s++){const i=r[s],o=n[s];if(o!=="*"&&i!==o)return!1}return!0},ie=t=>{const e=parseInt(t);return isNaN(e)||e<0||e.toString()!==t?null:e},vt=(t,e)=>{for(let r=1;r<=e.length;r++){const n=e.slice(0,r).join(U);if(he(t,n)!=null)return[n,r]}return null},Kt=((t,e,r={optional:!1})=>{const{optional:n,getter:s=he}=r;if(e==="")return t;const i=e.split(U);if(i.length===1){const u=s(t,i[0]);if(u===void 0){if(n)return null;throw new Error(`Path ${e} does not exist. ${i[0]} is undefined`)}return u}const o=(u,l)=>{if(l>=i.length)return u;for(let h=i.length-l;h>=1;h--){const f=i.slice(l,l+h).join(U),y=s(u,f);if(y!==void 0){if(l+h===i.length)return y;if(y===null){if(n)return null;throw new Error(`Path ${e} does not exist. ${f} is null`)}return o(y,l+h)}}if(n)return null;throw new Error(`Path ${e} does not exist. ${i[l]} is undefined`)};return o(t,0)}),Qa=(t,e)=>Kt(t,e,{optional:!0})!==null,Tt=(t,...e)=>{if(e.length===0)return t;const r=e.shift();if(Ue(t)&&Ue(r))for(const n in r)try{Ue(r[n])?(n in t||Object.assign(t,{[n]:{}}),Tt(t[n],r[n])):Object.assign(t,{[n]:r[n]})}catch(s){throw s instanceof TypeError?new TypeError(`.${n}: ${s.message}`):s}return Tt(t,...e)},_a=(t,e,r)=>{const n=(s,i,o)=>{if(o.def?.type==="union")return o.def.options.reduce((u,l)=>n(u,i,l),s);if(o.def?.type==="intersection"){const u=n(s,i,o.def.left);return n(u,i,o.def.right)}for(const u in i){const l=i[u];let h=o?.shape;if(h!=null)for(;h!=null;){if(h[u]!=null){const f=h[u].safeParse(l);if(f.success){s[u]=f.data;break}}h=h.def?.shape}typeof l=="object"&&!Array.isArray(l)&&l!==null&&o&&o.shape&&o.shape[u]&&(s[u]||={},n(s[u],l,o.shape[u]))}return s};return n({...t},e,r)},eu=(t,e)=>{const r=e.split(U);let n=t,s=0;for(;s<r.length;){if(s===r.length-1){const o=r[s];if(Array.isArray(n)){const u=parseInt(o);if(!isNaN(u)&&u<n.length){n.splice(u,1);return}const l=n[0];if(typeof l=="object"&&"key"in l){const h=n.findIndex(f=>f.key===o);if(h!==-1){n.splice(h,1);return}}return}delete n[o];return}let i=!1;if(Array.isArray(n)&&n.length>0){const o=n[0];if(typeof o=="object"&&"key"in o)for(let u=r.length-s;u>=1;u--){const l=r.slice(s,s+u).join(U),h=n.find(f=>f.key===l);if(h!=null){if(s+u===r.length){const f=n.findIndex(y=>y.key===l);f!==-1&&n.splice(f,1);return}n=h,s+=u,i=!0;break}}}if(!i)for(let o=r.length-s;o>=1;o--){const u=r.slice(s,s+o).join(U);if(!Array.isArray(n)&&typeof n=="object"&&n!==null&&u in n){if(s+o===r.length){delete n[u];return}n=n[u],s+=o,i=!0;break}}if(!i){const o=he(n,r[s]);if(o==null)return;n=o,s++}}},tu=(t,e,r)=>{const n=e.split(U);let s=t,i=0;for(;i<n.length-1;){const o=vt(s,n.slice(i,n.length-1));let u;o!=null?[u,i]=[o[0],i+o[1]]:(u=n[i],i++);let l=he(s,u);if(l==null){const h=n[i];let f=ie(h);f==null&&h.startsWith("-")&&ie(h.substring(1))!=null&&(f=0),l=f!=null?[]:{},s[u]=l}s=l}try{const o=n[n.length-1];if(Array.isArray(s)){let l=ie(o);if(l==null){if(o.startsWith("-")){const h=ie(o.substring(1));h!=null&&(l=s.length-h)}if(l==null){if(s.length===0){const f=ie(o);if(f!=null){s[f]=r;return}}const h=s[0];if(typeof h=="object"&&"key"in h){const f=s.findIndex(y=>y.key===o);if(f!==-1){s[f]=r;return}}return}}s[l]=r;return}const u=vt(s,[o]);if(u!=null){s[u[0]]=r;return}s[o]=r}catch(o){throw console.error("failed to set value",r,"at path",e,"on object",t),o}},ru=Object.freeze(Object.defineProperty({__proto__:null,SEPARATOR:U,copy:Ga,defaultGetter:he,difference:Ha,element:Ja,equal:Ot,findBestKey:vt,get:Kt,getIndex:ie,has:Qa,override:Tt,overrideValidItems:_a,partialEqual:On,pathsMatch:Ka,remove:eu,resolvePath:Xa,set:tu,transformPath:vn},Symbol.toStringTag,{value:"Module"})),nu=t=>Object.getOwnPropertySymbols(globalThis).includes(t),su=(t,e)=>{const r=Symbol.for(t);if(!nu(r)){const n=e();Object.defineProperty(globalThis,r,{value:n})}return()=>globalThis[r]},Tn="sy_x_error",iu=t=>e=>e!=null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"?e.type.startsWith(t):e instanceof Error?e.message.startsWith(t):typeof e!="string"?!1:e.startsWith(t),xn=t=>class pe extends Error{static discriminator=Tn;discriminator=pe.discriminator;static TYPE=t;type=pe.TYPE;static matches=iu(t);matches=pe.matches;constructor(r,n){super(r,n),this.name=pe.TYPE}static sub(r){return xn(`${t}.${r}`)}},ou=t=>{if(t==null||typeof t!="object")return!1;const e=t;if(e.discriminator!==Tn)return!1;if(!("type"in e))throw new Error(`X Error is missing its type property: ${JSON.stringify(e)}`);return!0},fe="unknown",or="nil";class au{providers=[];register(e){this.providers.push(e)}encode(e){if(e==null)return{type:or,data:""};if(ou(e))for(const r of this.providers){const n=r.encode(e);if(n!=null)return n}if(e instanceof Error)return{type:fe,data:e.message};if(typeof e=="string")return{type:fe,data:e};try{return{type:fe,data:JSON.stringify(e)}}catch{return{type:fe,data:"unable to encode error information"}}}decode(e){if(e==null||e.type===or)return null;if(e.type===fe)return new ar(e.data);for(const r of this.providers){const n=r.decode(e);if(n!=null)return n}return new ar(e.data)}}su("synnax-error-registry",()=>new au);class ar extends xn("unknown"){}a.z.object({type:a.z.string(),data:a.z.string()});const uu=a.object({jsonrpc:a.literal("2.0"),method:a.string(),params:a.any().optional(),id:a.union([a.string(),a.number(),a.null()]).optional()}),Sn=a.object({jsonrpc:a.literal("2.0"),id:a.union([a.string(),a.number(),a.null()])}),lu=Sn.extend({result:a.json()}),cu=Sn.extend({error:a.object({code:a.number().int(),message:a.string().optional(),data:a.json().optional()})}),hu=a.union([lu,cu]);a.union([uu,hu]);a.z.object({key:a.z.string(),value:a.z.string()});const fu=a.uuid(),du=a.object({key:fu,name:a.string().min(1),color:a.string()}),gu=(t,e,r)=>{const n=t.get(e);return n===void 0?(t.set(e,r),r):n},pu=Object.freeze(Object.defineProperty({__proto__:null,getOrSetDefault:gu},Symbol.toStringTag,{value:"Module"})),xt=a.z.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/),yu=(t,e)=>{const r=t.split("."),n=e.split("."),s=Math.max(r.length,n.length);for(let i=0;i<s;i++){const o=r[i],u=n[i];if(o===void 0)return Y;if(u===void 0)return V;const l=/^\d+$/.test(o),h=/^\d+$/.test(u);if(l&&!h)return Y;if(!l&&h)return V;if(l&&h){const f=parseInt(o),y=parseInt(u);if(f<y)return Y;if(f>y)return V}else{if(o<u)return Y;if(o>u)return V}}return ne},Ie=((t,e,r={})=>{r.checkMajor??=!0,r.checkMinor??=!0,r.checkPatch??=!0;const n=xt.parse(t),s=xt.parse(e),[i,o]=n.split("-"),[u,l]=s.split("-"),[h,f,y]=i.split(".").map(Number),[p,I,A]=u.split(".").map(Number);if(r.checkMajor){if(h<p)return Y;if(h>p)return V}if(r.checkMinor){if(f<I)return Y;if(f>I)return V}if(r.checkPatch){if(y<A)return Y;if(y>A)return V}return o===void 0&&l===void 0?ne:o===void 0?V:l===void 0?Y:yu(o,l)}),mu=(t,e,r={})=>Or(Ie(t,e,r)),Nn=(t,e,r={})=>wr(Ie(t,e,r)),bu=(t,e,r={})=>br(Ie(t,e,r)),wu=({name:t,migrate:e})=>r=>{try{const n=e(r);return console.log(`${t} migrated: ${r.version} -> ${n.version}`),n}catch(n){throw console.log(`${t} failed to migrate from ${r.version}`),console.error(n),n}},Ou=({name:t,migrations:e,targetSchema:r,defaultVersion:n,def:s})=>{const i=Object.keys(e).sort(Ie).pop();if(i==null)return h=>{if(h.version??=n,h.version!==s.version)return console.log(`${t} version ${h.version} is newer than latest version of ${s.version}.
7
+ Returning default instead.
8
+ `),s;try{return r!=null?r.parse(h):h}catch(f){return console.log(`${t} failed to parse default. Exiting with default`),console.error(f),s}};const o=Object.keys(e).length;let u=!1;const l=h=>{try{if(o===0||Nn(h.version,i))return console.log(u?`${t} ${h.version} now up to date`:`${t} version ${h.version} is up to date with target version ${s.version}`),h;const f=h.version,y=e[f],p=y(h);return u=!0,l(p)}catch(f){return console.log(`${t} failed to migrate from ${h.version} to ${i}`),console.error(f),s}};return h=>{try{if(h.version==null)if(n!=null)console.log(`${t} version is null. Setting version to default of ${n}`),h.version=n;else return console.log(`${t} version is null and no default version set. Exiting with default`),s;return l(h)}catch(f){return console.log(`${t} failed to parse final result. Exiting with default`),console.error(f),s}}},vu=Object.freeze(Object.defineProperty({__proto__:null,compareSemVer:Ie,createMigration:wu,migrator:Ou,semVerNewer:Nn,semVerOlder:bu,semVerZ:xt,versionsEqual:mu},Symbol.toStringTag,{value:"Module"})),In=["standard","scientific","engineering"],Tu=a.z.enum(In),xu=(t,e,r)=>{if(Number.isNaN(t))return"NaN";if(t===1/0)return"∞";if(t===-1/0)return"-∞";if(r==="standard")return t.toFixed(e);if(t===0)return e===0?"0ᴇ0":`0.${"0".repeat(e)}ᴇ0`;let n;return r==="scientific"?n=Math.floor(Math.log10(Math.abs(t))):n=Math.floor(Math.log10(Math.abs(t))/3)*3,`${(t/10**n).toFixed(e)}ᴇ${n}`},Su=Object.freeze(Object.defineProperty({__proto__:null,NOTATIONS:In,notationZ:Tu,stringifyNumber:xu},Symbol.toStringTag,{value:"Module"}));class Nu{handlers;transform;closer;constructor(e,r){this.transform=e,this.handlers=r??new Map}onChange(e){return this.handlers.set(e,null),()=>this.handlers.delete(e)}notify(e){let r=e;if(this.transform!=null){const[n,s]=this.transform(e);if(!s)return;r=n}this.handlers.forEach((n,s)=>s(r))}setCloser(e){this.closer=e}async close(){return await this.closer?.()}}class Iu{handlers;constructor(e){this.handlers=e??new Map}onChange(e){return this.handlers.set(e,null),()=>this.handlers.delete(e)}notify(e){this.handlers.forEach((r,n)=>n(e))}}const Mu=Object.freeze(Object.defineProperty({__proto__:null,BaseObserver:Iu,Observer:Nu},Symbol.toStringTag,{value:"Module"})),Mn=a.z.union([a.z.string(),a.z.number()]),Au=a.z.record(Mn,a.z.unknown()),Qt=t=>Object.entries(t),zu=(t,e)=>Object.fromEntries(Qt(t).map(([r,n])=>[r,e(n,r)])),Eu=t=>Object.fromEntries(Qt(t).filter(([e,r])=>r!==void 0)),ju=(t,...e)=>{const r={...t};for(const n of e)delete r[n];return r},Uu=Object.freeze(Object.defineProperty({__proto__:null,entries:Qt,keyZ:Mn,map:zu,omit:ju,purgeUndefined:Eu,unknownZ:Au},Symbol.toStringTag,{value:"Module"})),An=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",Bu=An(),zn=["macOS","Windows","Linux"],$u=["macos","windows","linux"],Cu={macos:"macOS",windows:"Windows",linux:"Linux"},Ru=a.z.enum(zn).or(a.z.enum($u).transform(t=>Cu[t])),Lu=()=>{if(typeof window>"u")return;const t=window.navigator.userAgent.toLowerCase();if(t.includes("mac"))return"macOS";if(t.includes("win"))return"Windows";if(t.includes("linux"))return"Linux"};let st;const ku=((t={})=>{const{force:e,default:r}=t;return e??st??(st=Lu(),st??r)}),Du=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:zn,RUNTIME:Bu,detect:An,getOS:ku,osZ:Ru},Symbol.toStringTag,{value:"Module"})),Pu=()=>Promise.resolve(),qu=()=>new Promise(t=>setTimeout(t,0)),Zu=Object.freeze(Object.defineProperty({__proto__:null,flushMicrotasks:Pu,flushTaskQueue:qu},Symbol.toStringTag,{value:"Module"})),Fu=t=>Array.isArray(t)?[...t]:typeof t=="object"&&t!==null?{...t}:t,Yu=Object.freeze(Object.defineProperty({__proto__:null,copy:Fu},Symbol.toStringTag,{value:"Module"})),En=a.z.enum(["success","info","warning","error","loading","disabled"]),Vu=t=>a.z.object({key:a.z.string(),name:a.z.string().default(""),variant:En,message:a.z.string(),description:a.z.string().optional(),time:d.z,labels:cr(du).optional(),details:t??a.z.unknown().optional()}),Wu=a.z.object({stack:a.z.string(),error:a.z.instanceof(Error)}),Gu=(t,e)=>{if(!(t instanceof Error))throw t;return jn({variant:"error",message:e??t.message,description:e!=null?t.message:void 0,details:{stack:t.stack??"",error:t}})},jn=t=>({key:It(),time:d.now(),name:"",...t}),Hu=(t,e=[])=>{if(t!=null)return Array.isArray(e)?e.includes(t)?t:void 0:e===t?t:void 0},Xu=(t,e=[])=>{if(t!=null)return Array.isArray(e)?e.includes(t)?void 0:t:e===t?void 0:t},Ju=Object.freeze(Object.defineProperty({__proto__:null,create:jn,exceptionDetailsSchema:Wu,fromException:Gu,keepVariants:Hu,removeVariants:Xu,statusZ:Vu,variantZ:En},Symbol.toStringTag,{value:"Module"})),Ku=(t,e)=>{if(!e.has(t))return t;let r=t,n=1,s=t;for(;e.has(s);){const i=s.match(Qu);i?(r=s.slice(0,i.index).trim(),n=parseInt(i[1])+1):(r=s,n=1),s=`${r} (${n})`}return s},Qu=/\((\d+)\)$/,_u=(t,e="")=>{if(typeof t=="string")return t;const r=t.length;return r===0?e:r===1?t[0]:r===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[r-1]}`},el=t=>{const e=t.split(" "),r=new Set,n=e.map(o=>o.charAt(0).toLowerCase()).join("");r.add(n.replace(/-/g,"_")),r.add(n.replace(/(.)(.)/g,"$1_$2").replace(/-/g,"_"));const s=/\d+/g;t.match(s)&&e.forEach((o,u)=>{if(s.test(o)){const l=e.map((h,f)=>f!==u?h.charAt(0).toLowerCase():h).join("");r.add(l.replace(/-/g,"_")),r.add(l.replace(/(.)(.)/g,"$1_$2").replace(/-/g,"_"))}});const i=e.map(o=>(o.length>3?o.substring(0,3):o).toLowerCase());return r.add(i.join("").replace(/-/g,"_")),r.add(i.join("_").replace(/-/g,"_")),Array.from(r).filter(o=>o.length>=2&&o.length<=12&&!/^\d/.test(o))},tl=(t,e)=>t.startsWith(e)?t.slice(e.length):t,rl=Object.freeze(Object.defineProperty({__proto__:null,createShortIdentifiers:el,deduplicateFileName:Ku,naturalLanguageJoin:_u,trimPrefix:tl},Symbol.toStringTag,{value:"Module"})),nl=new Error("request for lock canceled");var sl=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function u(f){try{h(n.next(f))}catch(y){o(y)}}function l(f){try{h(n.throw(f))}catch(y){o(y)}}function h(f){f.done?i(f.value):s(f.value).then(u,l)}h((n=n.apply(t,e||[])).next())})};class il{constructor(e,r=nl){this._value=e,this._cancelError=r,this._queue=[],this._weightedWaiters=[]}acquire(e=1,r=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((n,s)=>{const i={resolve:n,reject:s,weight:e,priority:r},o=Un(this._queue,u=>r<=u.priority);o===-1&&e<=this._value?this._dispatchItem(i):this._queue.splice(o+1,0,i)})}runExclusive(e){return sl(this,arguments,void 0,function*(r,n=1,s=0){const[i,o]=yield this.acquire(n,s);try{return yield r(i)}finally{o()}})}waitForUnlock(e=1,r=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,r)?Promise.resolve():new Promise(n=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),ol(this._weightedWaiters[e-1],{resolve:n,priority:r})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const r=this._value;this._value-=e.weight,e.resolve([r,this._newReleaser(e.weight)])}_newReleaser(e){let r=!1;return()=>{r||(r=!0,this.release(e))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let e=this._value;e>0;e--){const r=this._weightedWaiters[e-1];r&&(r.forEach(n=>n.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let r=this._value;r>0;r--){const n=this._weightedWaiters[r-1];if(!n)continue;const s=n.findIndex(i=>i.priority<=e);(s===-1?n:n.splice(0,s)).forEach((i=>i.resolve()))}}}_couldLockImmediately(e,r){return(this._queue.length===0||this._queue[0].priority<r)&&e<=this._value}}function ol(t,e){const r=Un(t,n=>e.priority<=n.priority);t.splice(r+1,0,e)}function Un(t,e){for(let r=t.length-1;r>=0;r--)if(e(t[r]))return r;return-1}var al=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function u(f){try{h(n.next(f))}catch(y){o(y)}}function l(f){try{h(n.throw(f))}catch(y){o(y)}}function h(f){f.done?i(f.value):s(f.value).then(u,l)}h((n=n.apply(t,e||[])).next())})};class ul{constructor(e){this._semaphore=new il(1,e)}acquire(){return al(this,arguments,void 0,function*(e=0){const[,r]=yield this._semaphore.acquire(1,e);return r})}runExclusive(e,r=0){return this._semaphore.runExclusive(()=>e(),1,r)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}class Bn extends ul{constructor(e){super(),Object.assign(this,e)}}const ll=t=>new Bn(t),cl=Object.freeze(Object.defineProperty({__proto__:null,mutex:Bn,newMutex:ll},Symbol.toStringTag,{value:"Module"})),hl=(...t)=>t.map($n).join(""),$n=t=>(t.endsWith("/")||(t+="/"),t.startsWith("/")&&(t=t.slice(1)),t),fl=t=>t.endsWith("/")?t.slice(0,-1):t;class Le{protocol;host;port;path;constructor({host:e,port:r,protocol:n="",pathPrefix:s=""}){this.protocol=n,this.host=e,this.port=r,this.path=$n(s)}replace(e){return new Le({host:e.host??this.host,port:e.port??this.port,protocol:e.protocol??this.protocol,pathPrefix:e.pathPrefix??this.path})}child(e){return new Le({...this,pathPrefix:hl(this.path,e)})}toString(){return fl(`${this.protocol}://${this.host}:${this.port}/${this.path}`)}static UNKNOWN=new Le({host:"unknown",port:0})}class dl{sender;handlers;constructor(e){this.sender=e,this.handlers=new Map}handle({data:e}){const r=this.handlers.get(e.type)?.handler;r==null?console.warn(`No handler for ${e.type}`):r(e.payload)}route(e){const r=gl(e,this.sender),n=new pl(r);return this.handlers.set(e,n),n}}const gl=(t,e)=>(r,n)=>e({type:t,payload:r},n);class pl{_send;handler;constructor(e){this._send=e,this.handler=null}send(e,r=[]){this._send(e,r)}handle(e){this.handler=e}}const yl=t=>t.nullable().transform(e=>e===null?void 0:e).optional(),ml=a.z.int().min(0).max(Nr),bl=t=>a.array(t).or(t.transform(e=>[e])),wl=t=>t._zod.def.output,Cn=t=>vn(t,(e,r,n)=>{const s=r===n.length-1,i=!isNaN(parseInt(e)),o=!isNaN(parseInt(n[r+1]));return i&&(e="element"),s||o?e:[e,"shape"]}),ur=(t,e)=>{if(t==null)return null;const r=t[e];return r==null&&typeof t=="object"&&"sourceType"in t?t.sourceType()[e]:r},Ol=((t,e,r)=>e===""?t:Kt(ur(t,"shape"),Cn(e),{...r,getter:ur})),vl=Object.freeze(Object.defineProperty({__proto__:null,functionOutput:wl,getFieldSchema:Ol,getFieldSchemaPath:Cn,nullToUndefined:yl,toArray:bl,uint12:ml},Symbol.toStringTag,{value:"Module"}));function Rn(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Rn(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ln(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Rn(t))&&(n&&(n+=" "),n+=e);return n}const Tl=Ln,se="-",lr="__",je="--",kn=t=>{const e=(...r)=>Tl(...r);return e.B=(...r)=>t+se+r.join(se),e.E=r=>t+lr+r,e.M=(...r)=>t+je+r.join("-"),e.BM=(r,...n)=>e.B(r)+je+n.join("-"),e.BE=(r,...n)=>e.B(r)+lr+n.join(se),e.BEM=(r,n,...s)=>e.BE(r,n)+je+s.join(se),e.var=(...r)=>je+t+se+r.join(se),e};class xl{rows=[];columns=[];prefix;constructor(e=""){this.prefix=e}row(e,r,n){const{prefix:s}=this;return this.rows.push({startLabel:s+e,endLabel:s+r,size:n}),this}col(e,r,n){const{prefix:s}=this;return this.columns.push({startLabel:s+e,endLabel:s+r,size:n}),this}build(){return{display:"grid",gridTemplateRows:this.rows.map((e,r)=>{let n=r===0?"[":"";return n+=`${e.startLabel}] ${e.size}${typeof e.size=="number"?"px":""} [${e.endLabel}`,n+=r===this.rows.length-1?"]":"",n}).join(" "),gridTemplateColumns:this.columns.map((e,r)=>{let n=r===0?"[":"";return n+=`${e.startLabel}] ${e.size}${typeof e.size=="number"?"px":""} [${e.endLabel}`,n+=r===this.columns.length-1?"]":"",n}).join(" ")}}}const Sl=(t,e)=>Object.entries(e).forEach(([r,n])=>n!=null&&t.style.setProperty(r,`${n}`)),Nl=(t,e)=>Array.from(t.style).forEach(r=>{r.startsWith(e)&&t.style.removeProperty(r)}),Il=t=>{const e=kn(t);return e.visible=r=>e.M(r?"visible":"hidden"),e.expanded=r=>e.M(r?"expanded":"collapsed"),e.loc=r=>e.M("location",Dr.construct(r)),e.disabled=r=>r===!0&&e.M("disabled"),e.align=r=>e.M(r),e.dir=r=>r!=null&&e.M("direction",Lr.construct(r)),e.sharp=r=>r!==!1&&e.M("sharp"),e.rounded=r=>r!==!1&&e.M("rounded"),e.bordered=r=>typeof r=="boolean"?r&&e.M("bordered"):r!=null?e.M(`bordered-${r.toString()}`):e.M("bordered"),e.selected=r=>r&&e.M("selected"),e.altColor=r=>r&&e.M("alt-color"),e.editable=r=>r&&e.M("editable"),e.noSelect=e.M("no-select"),e.applyVars=Sl,e.removeVars=Nl,e.newGridBuilder=r=>new xl(r),e.dropRegion=r=>r&&e.B("haul-drop-region"),e.px=r=>`${r}px`,e.inheritDims=(r=!0)=>r&&e.M("inherit-dims"),e.shade=(r=>r!=null&&e.M(`shade-${r}`)),e.colorVar=r=>{if(!(r==null||r===!1))return typeof r=="number"?`var(--${t}-gray-l${r})`:dn.cssString(r)},e.levelSizeVar=r=>`var(--${t}-${r}-size)`,e.level=r=>e.M(`level-${r}`),e},Ml=Il("pluto");exports.$=z;exports.Au=qi;exports.Bu=na;exports.CSS=Ml;exports.Cu=Yo;exports.E=N;exports.Eu=yo;exports.Fu=Va;exports.Iu=ei;exports.Ku=vu;exports.Mu=Dr;exports.Nu=ii;exports.Ou=ps;exports.Qu=Su;exports.Ru=ca;exports.Su=Mo;exports.Tu=Ro;exports.Uu=qo;exports.Vu=ru;exports.Xu=pu;exports.Zu=dn;exports._u=Ya;exports.al=cl;exports.bu=ns;exports.cl=rl;exports.clsx=Ln;exports.d=d;exports.du=Zn;exports.f=c;exports.fn=dl;exports.g=g;exports.gu=Kn;exports.hl=vl;exports.il=Yu;exports.newBEM=kn;exports.nl=Uu;exports.ol=Ju;exports.p=m;exports.pu=ts;exports.q=L;exports.rl=Du;exports.sl=Zu;exports.tl=Mu;exports.vo=Qr;exports.vu=Lr;exports.wu=hs;exports.x=b;exports.yu=Qn;exports.zu=Wa;
package/dist/css.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./css-C_YE-5Xa.cjs"),t=require("./units-zxke9Ng2.cjs");exports.CSS=e.CSS;exports.newBEM=e.newBEM;exports.createHexOpacityVariants=t.createHexOpacityVariants;exports.unitProperty=t.unitProperty;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./css-D3NdC2sx.cjs"),t=require("./units-Bd_mf9Ye.cjs");exports.CSS=e.CSS;exports.newBEM=e.newBEM;exports.createHexOpacityVariants=t.createHexOpacityVariants;exports.unitProperty=t.unitProperty;
package/dist/css.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as e, n as t } from "./css-Cn63X_Yv.js";
2
- import { c as s, u as n } from "./units-cBd5OJg4.js";
1
+ import { C as e, n as t } from "./css-BkBrZtKZ.js";
2
+ import { c as s, u as n } from "./units-CEfK1L7C.js";
3
3
  export {
4
4
  e as CSS,
5
5
  s as createHexOpacityVariants,
package/dist/dialog.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-CJFfVl_u.cjs");exports.Dialog=e.external;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-BIW55htp.cjs");exports.Dialog=e.external;
package/dist/dialog.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e } from "./external-Bq4gfE5e.js";
1
+ import { e } from "./external-6HkYP0wd.js";
2
2
  export {
3
3
  e as Dialog
4
4
  };
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./css-D3NdC2sx.cjs");let e=null;const u=()=>(e??=document.createElement("canvas"),e),c=(t,a,n)=>{if(i.rl.RUNTIME==="node")return{width:0,height:0};n??=u().getContext("2d"),n.font=a;const o=n.measureText(t);return s(o)},s=t=>({width:Math.trunc(Math.abs(t.actualBoundingBoxLeft)+Math.abs(t.actualBoundingBoxRight)),height:Math.trunc(Math.abs(t.actualBoundingBoxAscent)+Math.abs(t.actualBoundingBoxDescent))});exports.dimensions=c;exports.dimensionsFromMetrics=s;
@@ -1,11 +1,11 @@
1
- import { S as s } from "./css-Cn63X_Yv.js";
2
- let a = null;
3
- const u = () => (a ??= document.createElement("canvas"), a), h = (t, e, n) => {
1
+ import { r as s } from "./css-BkBrZtKZ.js";
2
+ let n = null;
3
+ const u = () => (n ??= document.createElement("canvas"), n), c = (t, e, a) => {
4
4
  if (s.RUNTIME === "node") return { width: 0, height: 0 };
5
- n ??= u().getContext("2d"), n.font = e;
6
- const o = n.measureText(t);
7
- return i(o);
8
- }, i = (t) => ({
5
+ a ??= u().getContext("2d"), a.font = e;
6
+ const o = a.measureText(t);
7
+ return r(o);
8
+ }, r = (t) => ({
9
9
  width: Math.trunc(
10
10
  Math.abs(t.actualBoundingBoxLeft) + Math.abs(t.actualBoundingBoxRight)
11
11
  ),
@@ -14,6 +14,6 @@ const u = () => (a ??= document.createElement("canvas"), a), h = (t, e, n) => {
14
14
  )
15
15
  });
16
16
  export {
17
- i as a,
18
- h as d
17
+ r as a,
18
+ c as d
19
19
  };
@@ -1,15 +1,15 @@
1
- import { j as h, i as C, Q as d, o as B, z as y, c as z, C as X } from "./css-Cn63X_Yv.js";
1
+ import { E as h, T as C, A as d, S as B, Z as y, b as U, C as q } from "./css-BkBrZtKZ.js";
2
2
  import { z as _ } from "zod";
3
- import { h as x, C as U, q as K, j as W, k as H, L as V } from "./provider-B6SgG_sT.js";
4
- import { a as G } from "./dimensions-Dclfavlh.js";
5
- const Z = _.object({
3
+ import { g as x, C as z, h as K, j as W, k as Z, L as H } from "./provider-CfFukcDe.js";
4
+ import { a as G } from "./dimensions-qj2CkPTy.js";
5
+ const V = _.object({
6
6
  include: _.string().array().optional(),
7
7
  exclude: _.string().array().optional(),
8
- level: _.enum(x.LOG_LEVELS).optional().default("info")
8
+ level: _.enum(x.LOG_LEVELS).default("info")
9
9
  }), L = "alamos-provider";
10
- class v extends U {
10
+ class v extends z {
11
11
  static TYPE = "alamos.Provider";
12
- schema = Z;
12
+ schema = V;
13
13
  afterUpdate(t) {
14
14
  if (t.getOptional(L) != null) return;
15
15
  const s = [], { include: i, exclude: r, level: a } = this.state;
@@ -31,7 +31,7 @@ const J = (l, t) => {
31
31
  h.width(l) + t.x * 2,
32
32
  h.height(l) + t.y * 2
33
33
  );
34
- class R {
34
+ class E {
35
35
  scale_;
36
36
  wrapped;
37
37
  atlasRegistry;
@@ -91,7 +91,7 @@ class R {
91
91
  this.wrapped.reset();
92
92
  }
93
93
  applyScale(t) {
94
- return new R(
94
+ return new E(
95
95
  this,
96
96
  this.atlasRegistry,
97
97
  this.dpr,
@@ -548,12 +548,12 @@ class $ {
548
548
  return this.path;
549
549
  }
550
550
  }
551
- const j = `precision mediump float;
551
+ const Q = `precision mediump float;
552
552
 
553
553
  void main(void) {
554
554
  gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
555
555
  }
556
- `, Q = `attribute vec4 a_position;
556
+ `, j = `attribute vec4 a_position;
557
557
 
558
558
  void main(void) {
559
559
  gl_Position = a_position;
@@ -630,7 +630,7 @@ const st = new Float32Array([0, 0, 0, 0, 0, 0]);
630
630
  class it extends et {
631
631
  positionBuffer;
632
632
  constructor(t) {
633
- super(t, Q, j);
633
+ super(t, j, Q);
634
634
  const e = t.gl.createBuffer();
635
635
  if (e == null) throw new K("webgl: failed to create buffer");
636
636
  this.positionBuffer = e, t.gl.bindBuffer(t.gl.ARRAY_BUFFER, this.positionBuffer), t.gl.bufferData(t.gl.ARRAY_BUFFER, st, t.gl.STATIC_DRAW);
@@ -724,23 +724,23 @@ class b {
724
724
  // A map of characters to their index in the atlas.
725
725
  charMap;
726
726
  // The default characters to include in the atlas.
727
- static DEFAULT_CHARS = "0123456789.:-µmsNa∞ᴇABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz%";
727
+ static DEFAULT_CHARS = "0123456789.:-°µmsNa∞ᴇABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz%";
728
728
  constructor(t) {
729
729
  const { font: e, characters: s = b.DEFAULT_CHARS, textColor: i } = t;
730
730
  this.charMap = /* @__PURE__ */ new Map();
731
- const r = z.unique(Array.from(s)), n = new OffscreenCanvas(1, 1).getContext("2d");
731
+ const r = U.unique(Array.from(s)), n = new OffscreenCanvas(1, 1).getContext("2d");
732
732
  n.font = e;
733
733
  const o = n.measureText("0");
734
734
  this.charDims = G(o), this.charDims.width += S, this.charDims.height += S;
735
- const p = r.length, u = this.charDims.width, m = this.charDims.height, c = Math.ceil(Math.sqrt(p)), E = Math.ceil(p / c);
735
+ const p = r.length, u = this.charDims.width, m = this.charDims.height, c = Math.ceil(Math.sqrt(p)), R = Math.ceil(p / c);
736
736
  this.atlas = new OffscreenCanvas(
737
737
  u * c * g,
738
- m * (E + 1) * g
738
+ m * (R + 1) * g
739
739
  );
740
740
  const f = this.atlas.getContext("2d");
741
741
  f.scale(g, g), f.font = e, f.textBaseline = "alphabetic", f.textAlign = "left", f.fillStyle = y.hex(i), f.clearRect(0, 0, this.atlas.width, this.atlas.height), r.forEach((O, A) => {
742
- const M = A % c, Y = Math.floor(A / c), N = M * u, q = (Y + 1) * m;
743
- f.fillText(O, N, q), this.charMap.set(O, A);
742
+ const M = A % c, Y = Math.floor(A / c), N = M * u, X = (Y + 1) * m;
743
+ f.fillText(O, N, X), this.charMap.set(O, A);
744
744
  });
745
745
  }
746
746
  fillText(t, e, s, i) {
@@ -806,7 +806,7 @@ class w {
806
806
  /** See the @link{clear.Program} for why this is necessary. */
807
807
  clearProgram;
808
808
  os;
809
- static CONTEXT_KEY = X.B("render-context");
809
+ static CONTEXT_KEY = q.B("render-context");
810
810
  instrumentation;
811
811
  static create(t, e, s, i, r) {
812
812
  const a = J(t, "render_context"), n = new w(
@@ -816,7 +816,7 @@ class w {
816
816
  r,
817
817
  a,
818
818
  W(t),
819
- H(t)
819
+ Z(t)
820
820
  );
821
821
  return t.set(w.CONTEXT_KEY, n), n;
822
822
  }
@@ -826,12 +826,12 @@ class w {
826
826
  if (o == null) throw new Error("Could not get 2D context");
827
827
  const p = new at();
828
828
  this.lower2d = F(
829
- new R(o, p, this.dpr)
829
+ new E(o, p, this.dpr)
830
830
  );
831
831
  const u = this.upper2dCanvas.getContext("2d");
832
832
  if (u == null) throw new Error("Could not get 2D context");
833
833
  this.upper2d = F(
834
- new R(u, p, this.dpr)
834
+ new E(u, p, this.dpr)
835
835
  );
836
836
  const m = {
837
837
  preserveDrawingBuffer: !0,
@@ -844,11 +844,11 @@ class w {
844
844
  variant: "error",
845
845
  message: "WebGL context lost"
846
846
  });
847
- const E = () => {
847
+ const R = () => {
848
848
  this.gl.flush(), this.gl.finish();
849
849
  };
850
850
  this.loop = new rt({
851
- afterRender: E,
851
+ afterRender: R,
852
852
  instrumentation: this.instrumentation,
853
853
  handleError: n
854
854
  }), this.region = h.ZERO, this.os === "Windows" && (this.clearProgram = new it(this));
@@ -915,9 +915,9 @@ class w {
915
915
  }
916
916
  const ht = _.object({
917
917
  region: h.box,
918
- enabled: _.boolean().optional().default(!1)
918
+ enabled: _.boolean().default(!1)
919
919
  }), I = ["gl", "lower2d", "upper2d"];
920
- class k extends V {
920
+ class k extends H {
921
921
  static TYPE = "eraser";
922
922
  schema = ht;
923
923
  afterUpdate(t) {
@@ -950,6 +950,6 @@ export {
950
950
  ut as R,
951
951
  pt as a,
952
952
  ht as e,
953
- Z as p,
953
+ V as p,
954
954
  J as u
955
955
  };
@@ -0,0 +1,11 @@
1
+ "use strict";const a=require("./css-D3NdC2sx.cjs"),_=require("zod"),d=require("./provider-BmDwHwF4.cjs"),F=require("./dimensions-C7b02rFi.cjs"),I=_.z.object({include:_.z.string().array().optional(),exclude:_.z.string().array().optional(),level:_.z.enum(d.g.LOG_LEVELS).default("info")}),T="alamos-provider";class A extends d.Composite{static TYPE="alamos.Provider";schema=I;afterUpdate(t){if(t.getOptional(T)!=null)return;const s=[],{include:i,exclude:r,level:n}=this.state;(i!=null||r!=null)&&s.push(d.g.logLevelKeyFiler({include:i,exclude:r})),n!=null&&s.push(d.g.logThresholdFilter(n)),s.length===0&&s.push(()=>!1),this.internal.ins=new d.g.Instrumentation({key:"aether",logger:new d.g.Logger({filters:s})}),t.set(T,this.internal.ins)}}const B=(l,t)=>{const e=l.get(T);if(e==null)throw new Error("No instrumentation provider");return t==null?e:e.child(t)},Z={[A.TYPE]:A},y=(l,t)=>a.Eu.construct(a.Eu.left(l)-t.x,a.Eu.top(l)-t.y,a.Eu.width(l)+t.x*2,a.Eu.height(l)+t.y*2);class C{scale_;wrapped;atlasRegistry;cachedFont=null;cachedFillStyle=null;cachedStrokeStyle=null;cachedLineWidth=null;cachedGlobalAlpha=null;cachedTextAlign=null;cachedTextBaseline=null;cachedLineCap=null;cachedLineJoin=null;cachedMiterLimit=null;dpr;constructor(t,e,s,i=a.Tu.XY.IDENTITY){this.wrapped=t,this.scale_=i,this.atlasRegistry=e,this.dpr=s}get fontStretch(){return this.wrapped.fontStretch}set fontStretch(t){this.wrapped.fontStretch=t}get fontVariantCaps(){return this.wrapped.fontVariantCaps}set fontVariantCaps(t){this.wrapped.fontVariantCaps=t}isContextLost(){return this.wrapped.isContextLost()}get wordSpacing(){return this.wrapped.wordSpacing}set wordSpacing(t){this.wrapped.wordSpacing=t}get letterSpacing(){return this.wrapped.letterSpacing}set letterSpacing(t){this.wrapped.letterSpacing=t}get textRendering(){return this.wrapped.textRendering}set textRendering(t){this.wrapped.textRendering=t}checkAtlasFillStyle(t=!1){return t&&typeof this.fillStyle=="string"?[!0,this.fillStyle]:(t&&console.warn("attempted to use a text atlas with a gradient fill style. This is not supported. Falling back to default canvas fill."),[!1,null])}reset(){this.wrapped.reset()}applyScale(t){return new C(this,this.atlasRegistry,this.dpr,t)}get canvas(){return this.wrapped.canvas}get miterLimit(){return this.cachedMiterLimit??this.wrapped.miterLimit}set miterLimit(t){const e=this.scale_.x.dim(t);e!==this.cachedMiterLimit&&(this.cachedMiterLimit=e,this.wrapped.miterLimit=e)}get globalAlpha(){return this.cachedGlobalAlpha??this.wrapped.globalAlpha}set globalAlpha(t){t!==this.cachedGlobalAlpha&&(this.cachedGlobalAlpha=t,this.wrapped.globalAlpha=t)}get globalCompositeOperation(){return this.wrapped.globalCompositeOperation}set globalCompositeOperation(t){this.wrapped.globalCompositeOperation=t}get fillStyle(){return this.cachedFillStyle??this.wrapped.fillStyle}set fillStyle(t){t!==this.cachedFillStyle&&(this.cachedFillStyle=t,this.wrapped.fillStyle=t)}get strokeStyle(){return this.cachedStrokeStyle??this.wrapped.strokeStyle}set strokeStyle(t){t!==this.cachedStrokeStyle&&(this.cachedStrokeStyle=t,this.wrapped.strokeStyle=t)}drawImage(t,e,s,i,r,n,h,o,p){this.wrapped.drawImage(t,e,s,i,r,n!=null?this.scale_.x.pos(n):n,h!=null?this.scale_.y.pos(h):h,o!=null?this.scale_.x.dim(o):o,p!=null?this.scale_.y.dim(p):p)}beginPath(){this.wrapped.beginPath()}clip(t,e){this.wrapped.clip(t,e)}fill(t,e){if(t==null)return this.wrapped.fill();this.wrapped.fill(t,e)}isPointInPath(t,e,s,i){return this.wrapped.isPointInPath(t,e,s,i)}isPointInStroke(t,e,s){return this.wrapped.isPointInStroke(t,e,s)}stroke(t){if(t==null)return this.wrapped.stroke();this.wrapped.stroke(t)}createConicGradient(t,e,s){return this.wrapped.createConicGradient(t,e,s)}createLinearGradient(t,e,s,i){return this.wrapped.createLinearGradient(t,e,s,i)}createPattern(t,e){return this.wrapped.createPattern(t,e)}createRadialGradient(t,e,s,i,r,n){return this.wrapped.createRadialGradient(t,e,s,i,r,n)}get filter(){return this.wrapped.filter}set filter(t){this.wrapped.filter=t}createImageData(t,e,s){return this.wrapped.createImageData(t,e,s)}getImageData(t,e,s,i,r){return this.wrapped.getImageData(t,e,s,i,r)}putImageData(t,e,s,i,r,n,h){this.wrapped.putImageData(t,e,s,i,r,n,h)}get imageSmoothingEnabled(){return this.wrapped.imageSmoothingEnabled}set imageSmoothingEnabled(t){this.wrapped.imageSmoothingEnabled=t}get imageSmoothingQuality(){return this.wrapped.imageSmoothingQuality}set imageSmoothingQuality(t){this.wrapped.imageSmoothingQuality=t}arc(t,e,s,i,r,n){this.wrapped.arc(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),i,r,n)}arcTo(t,e,s,i,r){this.wrapped.arcTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.dim(r))}bezierCurveTo(t,e,s,i,r,n){this.wrapped.bezierCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.pos(r),this.scale_.y.pos(n))}closePath(){this.wrapped.closePath()}ellipse(t,e,s,i,r,n,h,o){this.wrapped.ellipse(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),r,n,h,o)}lineTo(t,e){this.wrapped.lineTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}moveTo(t,e){this.wrapped.moveTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}quadraticCurveTo(t,e,s,i){this.wrapped.quadraticCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i))}rect(t,e,s,i){this.wrapped.rect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}roundRect(t,e,s,i,r){this.wrapped.roundRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),typeof r=="number"?this.scale_.x.dim(r):r)}get lineCap(){return this.cachedLineCap??this.wrapped.lineCap}set lineCap(t){t!==this.cachedLineCap&&(this.cachedLineCap=t,this.wrapped.lineCap=t)}get lineDashOffset(){return this.wrapped.lineDashOffset}set lineDashOffset(t){this.wrapped.lineDashOffset=this.scale_.x.dim(t)}get lineJoin(){return this.cachedLineJoin??this.wrapped.lineJoin}set lineJoin(t){t!==this.cachedLineJoin&&(this.cachedLineJoin=t,this.wrapped.lineJoin=t)}get lineWidth(){return this.cachedLineWidth??this.wrapped.lineWidth}set lineWidth(t){const e=this.scale_.x.dim(t);e!==this.cachedLineWidth&&(this.cachedLineWidth=e,this.wrapped.lineWidth=e)}getLineDash(){return this.wrapped.getLineDash()}setLineDash(t){const e=Array.from(t).map(s=>this.scale_.x.dim(s));this.wrapped.setLineDash(e)}clearRect(t,e,s,i){this.wrapped.clearRect(t,e,s,i)}fillRect(t,e,s,i){this.wrapped.fillRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}strokeRect(t,e,s,i){this.wrapped.strokeRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}get shadowBlur(){return this.wrapped.shadowBlur}set shadowBlur(t){this.wrapped.shadowBlur=t}get shadowColor(){return this.wrapped.shadowColor}set shadowColor(t){this.wrapped.shadowColor=t}get shadowOffsetX(){return this.wrapped.shadowOffsetX}set shadowOffsetX(t){this.wrapped.shadowOffsetX=t}get shadowOffsetY(){return this.wrapped.shadowOffsetY}restore(){this.cachedFillStyle=null,this.cachedStrokeStyle=null,this.cachedLineWidth=null,this.cachedGlobalAlpha=null,this.cachedTextAlign=null,this.cachedTextBaseline=null,this.cachedLineCap=null,this.cachedLineJoin=null,this.cachedMiterLimit=null,this.cachedFont=null,this.wrapped.restore()}save(){this.wrapped.save()}fillText(t,e,s,i,r={}){const[n,h]=this.checkAtlasFillStyle(r.useAtlas);if(n){this.atlasRegistry.get({font:this.font,textColor:h}).fillText(this,t,e,s);return}this.wrapped.fillText(t,this.scale_.x.pos(e),this.scale_.y.pos(s),i!=null?this.scale_.x.dim(i):void 0)}measureText(t){return this.wrapped.measureText(t)}textDimensions(t,e={}){const[s,i]=this.checkAtlasFillStyle(e.useAtlas);return s?this.atlasRegistry.get({font:this.font,textColor:i}).measureText(t):F.dimensionsFromMetrics(this.measureText(t))}strokeText(t,e,s,i){this.wrapped.strokeText(t,this.scale_.x.pos(e),this.scale_.y.pos(s),i!=null?this.scale_.x.dim(i):void 0)}get direction(){return this.wrapped.direction}set direction(t){this.wrapped.direction=t}get font(){return this.cachedFont!=null?this.cachedFont:this.wrapped.font}set font(t){t!==this.cachedFont&&(this.cachedFont=t,this.wrapped.font=this.cachedFont)}get fontKerning(){return this.wrapped.fontKerning}set fontKerning(t){this.wrapped.fontKerning=t}get textAlign(){return this.cachedTextAlign??this.wrapped.textAlign}set textAlign(t){t!==this.cachedTextAlign&&(this.cachedTextAlign=t,this.wrapped.textAlign=t)}get textBaseline(){return this.cachedTextBaseline??this.wrapped.textBaseline}set textBaseline(t){t!==this.cachedTextBaseline&&(this.cachedTextBaseline=t,this.wrapped.textBaseline=t)}getTransform(){return this.wrapped.getTransform()}resetTransform(){this.wrapped.resetTransform()}rotate(t){this.wrapped.rotate(t)}scale(t,e){this.wrapped.scale(t,e),this.dpr=t}scissor(t,e=a.Au.ZERO){const s=new X(this.scale_);return t=y(t,e),s.rect(...a.Au.couple(a.Eu.topLeft(t)),...a.Su.couple(a.Eu.dims(t))),this.save(),this.clip(s.getPath()),()=>this.restore()}setTransform(t,e,s,i,r,n){this.wrapped.setTransform(t,e,s,i,r,n)}transform(t,e,s,i,r,n){this.wrapped.transform(t,e,s,i,r,n)}translate(t,e){this.wrapped.translate(t,e)}}class X{scale_;path;constructor(t=a.Tu.XY.IDENTITY,e){this.scale_=t,e instanceof Path2D||typeof e=="string"?this.path=new Path2D(e):this.path=new Path2D}addPath(t,e){this.path.addPath(t,e)}arc(t,e,s,i,r,n){this.path.arc(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),i,r,n)}arcTo(t,e,s,i,r){this.path.arcTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.dim(r))}bezierCurveTo(t,e,s,i,r,n){this.path.bezierCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.pos(r),this.scale_.y.pos(n))}closePath(){this.path.closePath()}ellipse(t,e,s,i,r,n,h,o){this.path.ellipse(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),r,n,h,o)}lineTo(t,e){this.path.lineTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}moveTo(t,e){this.path.moveTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}quadraticCurveTo(t,e,s,i){this.path.quadraticCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i))}rect(t,e,s,i){this.path.rect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}roundRect(t,e,s,i,r){const n=this.scaleRadii(r);this.path.roundRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),n)}scaleRadii(t){return t==null?t:typeof t=="number"?this.scale_.x.dim(t):Array.isArray(t)?t.map(e=>this.scaleRadius(e)):this.scaleRadius(t)}scaleRadius(t){return typeof t=="number"?this.scale_.x.dim(t):{x:this.scale_.x.dim(t.x??0),y:this.scale_.y.dim(t.y??0)}}getPath(){return this.path}}const U=`precision mediump float;
2
+
3
+ void main(void) {
4
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
5
+ }
6
+ `,K=`attribute vec4 a_position;
7
+
8
+ void main(void) {
9
+ gl_Position = a_position;
10
+ }
11
+ `,O=l=>new Error(`failed to compile webgl program: ${l}`),W=new Error("null shader encountered");let k=class{renderCtx;prog;vertShader;fragShader;uniformLocCache=new Map;constructor(t,e,s){this.renderCtx=t;const i=t.gl.createProgram();if(i==null)throw O("failed to create program");this.prog=i,this.vertShader=e,this.fragShader=s,this.compile()}setAsActive(){return this.renderCtx.gl.useProgram(this.prog),()=>this.renderCtx.gl.useProgram(null)}uniformXY(t,e){this.renderCtx.gl.uniform2fv(this.getUniformLoc(t),a.Au.couple(e))}uniformColor(t,e){this.renderCtx.gl.uniform4fv(this.getUniformLoc(t),a.Zu.rgba1(e))}getUniformLoc(t){const e=this.uniformLocCache.get(t);if(e!=null)return e;const s=this.renderCtx.gl.getUniformLocation(this.prog,t);if(s==null)throw new Error(`unexpected missing uniform ${t}`);return this.uniformLocCache.set(t,s),s}compile(){const t=this.renderCtx.gl;this.compileShader(this.vertShader,t.VERTEX_SHADER),this.compileShader(this.fragShader,t.FRAGMENT_SHADER),t.linkProgram(this.prog)}compileShader(t,e){const s=this.renderCtx.gl,i=s.createShader(e);if(i==null)throw W;if(s.shaderSource(i,t),s.compileShader(i),!s.getShaderParameter(i,s.COMPILE_STATUS)){const n=s.getShaderInfoLog(i);throw s.deleteShader(i),O(n??"unknown")}s.attachShader(this.prog,i)}};const H=new Float32Array([0,0,0,0,0,0]);class V extends k{positionBuffer;constructor(t){super(t,K,U);const e=t.gl.createBuffer();if(e==null)throw new d.St("webgl: failed to create buffer");this.positionBuffer=e,t.gl.bindBuffer(t.gl.ARRAY_BUFFER,this.positionBuffer),t.gl.bufferData(t.gl.ARRAY_BUFFER,H,t.gl.STATIC_DRAW)}exec(){const{gl:t}=this.renderCtx,e=t.getAttribLocation(this.prog,"a_position");t.bindBuffer(t.ARRAY_BUFFER,this.positionBuffer);const s=t.createVertexArray();t.bindVertexArray(s),t.enableVertexAttribArray(e),t.vertexAttribPointer(e,2,t.FLOAT,!1,0,0),this.setAsActive(),t.drawArrays(t.TRIANGLES,0,3)}}const v={high:1,low:0};class G{requests=new Map;cleanup=new Map;afterRender;instrumentation;handleError;constructor({afterRender:t,instrumentation:e=d.g.Instrumentation.NOOP,handleError:s}){this.afterRender=t,this.instrumentation=e,this.handleError=s,this.start()}set(t){const e=this.requests.get(t.key);if(e==null)this.requests.set(t.key,t);else{const s=v[t.priority]>=v[e.priority],i=t.canvases.length>=e.canvases.length;s&&i&&this.requests.set(t.key,t)}}render(){const{requests:t}=this;t.size!==0&&(this.runCleanupsSync(),this.renderSync(),this.requests.clear(),this.afterRender?.())}runCleanupsSync(){const{cleanup:t,requests:e}=this;t.forEach((s,i)=>{const r=e.get(i);r!=null&&(s(r),t.delete(i))})}renderSync(){const{requests:t}=this;t.forEach(e=>{try{const s=e.render();s!=null&&this.cleanup.set(e.key,s)}catch(s){this.handleError(s,"render loop failed")}})}start(){const t=()=>{try{this.render()}catch(e){this.handleError(e,"render loop failed")}requestAnimationFrame(t)};requestAnimationFrame(t)}}const x=2,g=2;class L{atlas;charDims;charMap;static DEFAULT_CHARS="0123456789.:-°µmsNa∞ᴇABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz%";constructor(t){const{font:e,characters:s=L.DEFAULT_CHARS,textColor:i}=t;this.charMap=new Map;const r=a.bu.unique(Array.from(s)),h=new OffscreenCanvas(1,1).getContext("2d");h.font=e;const o=h.measureText("0");this.charDims=F.dimensionsFromMetrics(o),this.charDims.width+=x,this.charDims.height+=x;const p=r.length,u=this.charDims.width,m=this.charDims.height,c=Math.ceil(Math.sqrt(p)),S=Math.ceil(p/c);this.atlas=new OffscreenCanvas(u*c*g,m*(S+1)*g);const w=this.atlas.getContext("2d");w.scale(g,g),w.font=e,w.textBaseline="alphabetic",w.textAlign="left",w.fillStyle=a.Zu.hex(i),w.clearRect(0,0,this.atlas.width,this.atlas.height),r.forEach((b,E)=>{const Y=E%c,z=Math.floor(E/c),q=Y*u,N=(z+1)*m;w.fillText(b,q,N),this.charMap.set(b,E)})}fillText(t,e,s,i){const{width:r,height:n}=this.charDims,h=Math.ceil(Math.sqrt(this.charMap.size));t.textAlign==="center"&&(s-=r*e.length/2),t.textBaseline==="middle"&&(i+=n/2);for(let o=0;o<e.length;o++){const p=e[o],u=this.charMap.get(p);if(u===void 0)continue;const m=u%h,c=Math.floor(u/h);t.drawImage(this.atlas,m*r*g,c*n*g+x,r*g,n*g,s+o*r,i-n-x/g,r,n)}}measureText(t){return{width:t.length*this.charDims.width,height:this.charDims.height}}}class J{atlases;constructor(){this.atlases=new Map}get(t){const e=`${t.font}-${a.Zu.hex(t.textColor)}-${t.characters}`;if(this.atlases.has(e))return this.atlases.get(e);const s=new L(t);return this.atlases.set(e,s),s}}const D=l=>(l.textRendering="optimizeSpeed",l.imageSmoothingEnabled=!1,l);class f{glCanvas;upper2dCanvas;lower2dCanvas;gl;lower2d;upper2d;region;dpr;loop;clearProgram;os;static CONTEXT_KEY=a.CSS.B("render-context");instrumentation;static create(t,e,s,i,r){const n=B(t,"render_context"),h=new f(e,s,i,r,n,d.useAdder(t),d.useErrorHandler(t));return t.set(f.CONTEXT_KEY,h),h}constructor(t,e,s,i,r,n,h){this.upper2dCanvas=s,this.lower2dCanvas=e,this.glCanvas=t,this.os=i,this.instrumentation=r,this.dpr=1;const o=this.lower2dCanvas.getContext("2d");if(o==null)throw new Error("Could not get 2D context");const p=new J;this.lower2d=D(new C(o,p,this.dpr));const u=this.upper2dCanvas.getContext("2d");if(u==null)throw new Error("Could not get 2D context");this.upper2d=D(new C(u,p,this.dpr));const m={preserveDrawingBuffer:!0,powerPreference:"high-performance",stencil:!1,depth:!1},c=this.glCanvas.getContext("webgl2",m);if(c==null)throw new Error("Could not get WebGL context");c.disable(c.DEPTH_TEST),c.disable(c.STENCIL_TEST),c.disable(c.CULL_FACE),c.disable(c.DITHER),this.gl=c,this.glCanvas.oncontextlost=()=>n({variant:"error",message:"WebGL context lost"});const S=()=>{this.gl.flush(),this.gl.finish()};this.loop=new G({afterRender:S,instrumentation:this.instrumentation,handleError:h}),this.region=a.Eu.ZERO,this.os==="Windows"&&(this.clearProgram=new V(this))}static useOptional(t){return t.getOptional(f.CONTEXT_KEY)}static use(t){return t.get(f.CONTEXT_KEY)}update(t){t.set(f.CONTEXT_KEY,this)}resize(t,e){a.Eu.equals(this.region,t)&&this.dpr===e||(this.region=t,this.dpr=e,this.resizeCanvas(this.glCanvas),this.resizeCanvas(this.upper2dCanvas),this.resizeCanvas(this.lower2dCanvas),this.lower2d.scale(this.dpr,this.dpr),this.upper2d.scale(this.dpr,this.dpr),this.gl.viewport(0,0,a.Eu.width(t)*e,a.Eu.height(t)*e))}resizeCanvas(t){t.width=a.Eu.width(this.region)*this.dpr,t.height=a.Eu.height(this.region)*this.dpr}get aspect(){return a.Eu.aspect(this.region)}scaleRegion(t){return new a.Tu.XY(a.Tu.Scale.scale(0,1).scale(a.Eu.width(t)).translate(a.Eu.left(t)).reBound(a.Eu.width(this.region)).scale(-1,1),a.Tu.Scale.scale(0,1).scale(a.Eu.height(t)).invert().translate(a.Eu.top(t)).reBound(a.Eu.height(this.region)).scale(-1,1).invert())}scissor(t,e=a.Au.ZERO,s){const i=[];return s.includes("upper2d")&&i.push(this.upper2d.scissor(t,e)),s.includes("lower2d")&&i.push(this.lower2d.scissor(t,e)),s.includes("gl")&&i.push(this.scissorGL(t,e)),()=>i.forEach(r=>r())}scissorGL(t,e=a.Au.ZERO){return this.gl.enable(this.gl.SCISSOR_TEST),t=y(t,e),this.gl.scissor(a.Eu.left(t)*this.dpr,(a.Eu.height(this.region)-a.Eu.bottom(t))*this.dpr,a.Eu.width(t)*this.dpr,a.Eu.height(t)*this.dpr),()=>this.gl.disable(this.gl.SCISSOR_TEST)}erase(t,e=a.Au.ZERO,...s){e=a.Au.construct(e),s.length===0&&(s=["upper2d","lower2d","gl"]),s.includes("upper2d")&&this.eraseCanvas(this.upper2d,t,e),s.includes("lower2d")&&this.eraseCanvas(this.lower2d,t,e),s.includes("gl")&&this.eraseGL(t,e)}eraseGL(t,e=a.Au.ZERO){const{gl:s}=this,i=this.scissorGL(y(t,e));s.clearColor(...a.Zu.rgba1(a.Zu.ZERO)),s.clear(s.COLOR_BUFFER_BIT),this.os==="Windows"&&this.clearProgram?.exec(),i()}eraseCanvas(t,e,s=a.Au.ZERO){const i=y(e,s);t.clearRect(...a.Au.couple(a.Eu.topLeft(i)),...a.Su.couple(a.Eu.dims(i)))}}const M=_.z.object({region:a.Eu.box,enabled:_.z.boolean().default(!1)}),P=["gl","lower2d","upper2d"];class R extends d.Leaf{static TYPE="eraser";schema=M;afterUpdate(t){this.deleted||(this.internal.renderCtx=f.use(t),this.renderOnLifecycleChange())}afterDelete(){this.renderOnLifecycleChange()}renderOnLifecycleChange(){this.internal.renderCtx.loop.set({key:`${this.type}-${this.key}`,render:this.render.bind(this),priority:"high",canvases:P})}render(){this.deleted||!this.state.enabled||this.internal.renderCtx.erase(this.state.region,a.Au.construct(0),...P)}}const $={[R.TYPE]:R};exports.Context=f;exports.Eraser=R;exports.GLProgram=k;exports.Loop=G;exports.Provider=A;exports.REGISTRY=$;exports.REGISTRY$1=Z;exports.eraserStateZ=M;exports.providerStateZ=I;exports.useInstrumentation=B;
package/dist/ether.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./provider-C9Beoajx.cjs"),e=require("./value-Ce4T858D.cjs");require("./css-C_YE-5Xa.cjs");const r=require("./eraser-Bqibt23a.cjs");require("react");require("./types-D-yz1qsT.cjs");const i=require("./fontString-BcSXNOgW.cjs"),s=Object.freeze(Object.defineProperty({__proto__:null,Provider:t.Provider,REGISTRY:t.REGISTRY,SYNNAX_DARK:t.SYNNAX_DARK,SYNNAX_LIGHT:t.SYNNAX_LIGHT,SYNNAX_THEMES:t.SYNNAX_THEMES,fontSpecZ:t.fontSpecZ,fontString:i.fontString,themeZ:t.themeZ,use:t.use},Symbol.toStringTag,{value:"Module"})),u=Object.freeze(Object.defineProperty({__proto__:null,Context:r.Context,GLProgram:r.GLProgram,Loop:r.Loop,control:e.control,request:e.request,useOptionalRequestor:e.useOptionalRequestor,useRequestor:e.useRequestor},Symbol.toStringTag,{value:"Module"})),l=Object.freeze(Object.defineProperty({__proto__:null,BoundQuerier:e.BoundQuerier,LinePlot:e.LinePlot,REGISTRY:e.REGISTRY,XAxis:e.XAxis,YAxis:e.YAxis,boundQuerierStateZ:e.boundQuerierStateZ,linePlotStateZ:e.linePlotStateZ,xAxisStateZ:e.xAxisStateZ,yAxisStateZ:e.yAxisStateZ},Symbol.toStringTag,{value:"Module"})),a={[e.FLUX_STORE_KEY]:e.FLUX_STORE_CONFIG,[e.RELATIONSHIPS_FLUX_STORE_KEY]:e.RELATIONSHIP_FLUX_STORE_CONFIG,[e.RESOURCES_FLUX_STORE_KEY]:e.RESOURCE_FLUX_STORE_CONFIG},E=()=>{const o=new t.d((S,n)=>postMessage(S,n));onmessage=o.handle.bind(o);const R={...r.REGISTRY$1,...e.REGISTRY$19,...e.REGISTRY$18,...e.REGISTRY$17,...e.REGISTRY$16,...r.REGISTRY,...e.REGISTRY$15,...e.REGISTRY$14,...e.REGISTRY$13,...e.REGISTRY,...e.REGISTRY$12,...e.REGISTRY$11,...e.REGISTRY$10,...e.REGISTRY$9,...t.REGISTRY$1,...e.REGISTRY$8,...e.REGISTRY$7,...t.REGISTRY,...e.REGISTRY$6,...e.REGISTRY$5,...e.REGISTRY$4,...e.REGISTRY$3,...e.REGISTRY$2,...e.REGISTRY$1,...e.createRegistry({storeConfig:a})};t.render({comms:o.route("vis"),registry:R,instrumentation:new t.O({logger:new t._({filters:[t.be("info")]})})})},T=Object.freeze(Object.defineProperty({__proto__:null,render:E},Symbol.toStringTag,{value:"Module"}));exports.aether=t.aether;exports.canvas=e.canvas;exports.diagram=e.Diagram;exports.measure=e.measure;exports.rule=e.aether;exports.synnax=e.provider;exports.telem=e.external;exports.tooltip=e.tooltip;exports.value=e.value;exports.lineplot=l;exports.pluto=T;exports.render=u;exports.theming=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./provider-BmDwHwF4.cjs"),e=require("./value-0g5Cxim9.cjs"),i=require("./css-D3NdC2sx.cjs"),o=require("./eraser-DZxY0pWe.cjs");require("react");require("./types-C0tUDfsz.cjs");const s=require("./fontString-CeR_vHX_.cjs"),l=Object.freeze(Object.defineProperty({__proto__:null,Provider:t.Provider,REGISTRY:t.REGISTRY,SYNNAX_DARK:t.SYNNAX_DARK,SYNNAX_LIGHT:t.SYNNAX_LIGHT,SYNNAX_THEMES:t.SYNNAX_THEMES,fontSpecZ:t.fontSpecZ,fontString:s.fontString,themeZ:t.themeZ,use:t.use},Symbol.toStringTag,{value:"Module"})),E=Object.freeze(Object.defineProperty({__proto__:null,Context:o.Context,GLProgram:o.GLProgram,Loop:o.Loop,control:e.control,request:e.request,useOptionalRequestor:e.useOptionalRequestor,useRequestor:e.useRequestor},Symbol.toStringTag,{value:"Module"})),T=Object.freeze(Object.defineProperty({__proto__:null,LinePlot:e.LinePlot,REGISTRY:e.REGISTRY,XAxis:e.XAxis,YAxis:e.YAxis,linePlotMethodsZ:e.linePlotMethodsZ,linePlotStateZ:e.linePlotStateZ,xAxisStateZ:e.xAxisStateZ,yAxisStateZ:e.yAxisStateZ},Symbol.toStringTag,{value:"Module"})),_={[e.FLUX_STORE_KEY$2]:e.FLUX_STORE_CONFIG$2,[e.RELATIONSHIPS_FLUX_STORE_KEY]:e.RELATIONSHIP_FLUX_STORE_CONFIG,[e.RESOURCES_FLUX_STORE_KEY]:e.RESOURCE_FLUX_STORE_CONFIG,[e.FLUX_STORE_KEY$1]:e.FLUX_STORE_CONFIG$1,[e.FLUX_STORE_KEY]:e.FLUX_STORE_CONFIG},a=()=>{const r=new i.fn((S,n)=>postMessage(S,n));onmessage=r.handle.bind(r);const R={...o.REGISTRY$1,...e.REGISTRY$19,...e.REGISTRY$18,...e.REGISTRY$17,...e.REGISTRY$16,...o.REGISTRY,...e.REGISTRY$15,...e.REGISTRY$14,...e.REGISTRY$13,...e.REGISTRY,...e.REGISTRY$12,...e.REGISTRY$11,...e.REGISTRY$10,...e.REGISTRY$9,...t.REGISTRY$1,...e.REGISTRY$8,...e.REGISTRY$7,...t.REGISTRY,...e.REGISTRY$6,...e.REGISTRY$5,...e.REGISTRY$4,...e.REGISTRY$3,...e.REGISTRY$2,...e.REGISTRY$1,...e.createRegistry({storeConfig:_})};t.render({comms:r.route("vis"),registry:R,instrumentation:new t.O({logger:new t._({filters:[t.be("info")]})})})},u=Object.freeze(Object.defineProperty({__proto__:null,render:a},Symbol.toStringTag,{value:"Module"}));exports.aether=t.aether;exports.canvas=e.canvas;exports.diagram=e.Diagram;exports.measure=e.measure;exports.rule=e.aether;exports.synnax=e.provider;exports.telem=e.external;exports.tooltip=e.tooltip;exports.value=e.value;exports.lineplot=T;exports.pluto=u;exports.render=E;exports.theming=l;