@xyo-network/react-typedoc 2.63.1 → 2.64.0-rc.2

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 (296) hide show
  1. package/dist/CommentViewer.d.mts.map +1 -0
  2. package/dist/CommentViewer.d.ts +8 -0
  3. package/dist/CommentViewer.d.ts.map +1 -0
  4. package/dist/JsonViewerButton.d.mts.map +1 -0
  5. package/dist/JsonViewerButton.d.ts +9 -0
  6. package/dist/JsonViewerButton.d.ts.map +1 -0
  7. package/dist/ProjectTwoPanelReflectionViewer.d.mts.map +1 -0
  8. package/dist/ProjectTwoPanelReflectionViewer.d.ts +5 -0
  9. package/dist/ProjectTwoPanelReflectionViewer.d.ts.map +1 -0
  10. package/dist/ProjectTwoPanelReflectionViewer.stories.d.mts +5 -0
  11. package/dist/ProjectTwoPanelReflectionViewer.stories.d.mts.map +1 -0
  12. package/dist/ProjectTwoPanelReflectionViewer.stories.d.ts +5 -0
  13. package/dist/ProjectTwoPanelReflectionViewer.stories.d.ts.map +1 -0
  14. package/dist/ReflectionLookup.d.mts.map +1 -0
  15. package/dist/ReflectionLookup.d.ts +3 -0
  16. package/dist/ReflectionLookup.d.ts.map +1 -0
  17. package/dist/ReflectionViewer/Container.d.mts.map +1 -0
  18. package/dist/ReflectionViewer/Container.d.ts +8 -0
  19. package/dist/ReflectionViewer/Container.d.ts.map +1 -0
  20. package/dist/ReflectionViewer/Declaration.d.mts.map +1 -0
  21. package/dist/ReflectionViewer/Declaration.d.ts +5 -0
  22. package/dist/ReflectionViewer/Declaration.d.ts.map +1 -0
  23. package/dist/ReflectionViewer/DeclarationContainer.d.mts.map +1 -0
  24. package/dist/ReflectionViewer/DeclarationContainer.d.ts +8 -0
  25. package/dist/ReflectionViewer/DeclarationContainer.d.ts.map +1 -0
  26. package/dist/ReflectionViewer/NameViewer.d.mts.map +1 -0
  27. package/dist/ReflectionViewer/NameViewer.d.ts +12 -0
  28. package/dist/ReflectionViewer/NameViewer.d.ts.map +1 -0
  29. package/dist/ReflectionViewer/Project.d.mts.map +1 -0
  30. package/dist/ReflectionViewer/Project.d.ts +5 -0
  31. package/dist/ReflectionViewer/Project.d.ts.map +1 -0
  32. package/dist/ReflectionViewer/ReflectionGroupViewer.d.mts.map +1 -0
  33. package/dist/ReflectionViewer/ReflectionGroupViewer.d.ts +11 -0
  34. package/dist/ReflectionViewer/ReflectionGroupViewer.d.ts.map +1 -0
  35. package/dist/ReflectionViewer/ReflectionViewer.d.mts.map +1 -0
  36. package/dist/ReflectionViewer/ReflectionViewer.d.ts +4 -0
  37. package/dist/ReflectionViewer/ReflectionViewer.d.ts.map +1 -0
  38. package/dist/ReflectionViewer/ReflectionViewerProps.d.mts.map +1 -0
  39. package/dist/ReflectionViewer/ReflectionViewerProps.d.ts +15 -0
  40. package/dist/ReflectionViewer/ReflectionViewerProps.d.ts.map +1 -0
  41. package/dist/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.d.mts.map +1 -0
  42. package/dist/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.d.ts +11 -0
  43. package/dist/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.d.ts.map +1 -0
  44. package/dist/ReflectionViewer/SomeTypeViewer/TypeBuilder.d.mts.map +1 -0
  45. package/dist/ReflectionViewer/SomeTypeViewer/TypeBuilder.d.ts +5 -0
  46. package/dist/ReflectionViewer/SomeTypeViewer/TypeBuilder.d.ts.map +1 -0
  47. package/dist/ReflectionViewer/SomeTypeViewer/buildArrayString.d.mts.map +1 -0
  48. package/dist/ReflectionViewer/SomeTypeViewer/buildArrayString.d.ts +5 -0
  49. package/dist/ReflectionViewer/SomeTypeViewer/buildArrayString.d.ts.map +1 -0
  50. package/dist/ReflectionViewer/SomeTypeViewer/buildIntersectionString.d.mts.map +1 -0
  51. package/dist/ReflectionViewer/SomeTypeViewer/buildIntersectionString.d.ts +5 -0
  52. package/dist/ReflectionViewer/SomeTypeViewer/buildIntersectionString.d.ts.map +1 -0
  53. package/dist/ReflectionViewer/SomeTypeViewer/buildReferenceString.d.mts.map +1 -0
  54. package/dist/ReflectionViewer/SomeTypeViewer/buildReferenceString.d.ts +5 -0
  55. package/dist/ReflectionViewer/SomeTypeViewer/buildReferenceString.d.ts.map +1 -0
  56. package/dist/ReflectionViewer/SomeTypeViewer/buildReflectionString.d.mts.map +1 -0
  57. package/dist/ReflectionViewer/SomeTypeViewer/buildReflectionString.d.ts +4 -0
  58. package/dist/ReflectionViewer/SomeTypeViewer/buildReflectionString.d.ts.map +1 -0
  59. package/dist/ReflectionViewer/SomeTypeViewer/buildTypeString.d.mts.map +1 -0
  60. package/dist/ReflectionViewer/SomeTypeViewer/buildTypeString.d.ts +3 -0
  61. package/dist/ReflectionViewer/SomeTypeViewer/buildTypeString.d.ts.map +1 -0
  62. package/dist/ReflectionViewer/SomeTypeViewer/buildUnionString.d.mts.map +1 -0
  63. package/dist/ReflectionViewer/SomeTypeViewer/buildUnionString.d.ts +5 -0
  64. package/dist/ReflectionViewer/SomeTypeViewer/buildUnionString.d.ts.map +1 -0
  65. package/dist/ReflectionViewer/SomeTypeViewer/index.d.mts.map +1 -0
  66. package/dist/ReflectionViewer/SomeTypeViewer/index.d.ts +2 -0
  67. package/dist/ReflectionViewer/SomeTypeViewer/index.d.ts.map +1 -0
  68. package/dist/ReflectionViewer/index.d.mts.map +1 -0
  69. package/dist/{esm/ReflectionViewer/index.js → ReflectionViewer/index.d.ts} +1 -1
  70. package/dist/ReflectionViewer/index.d.ts.map +1 -0
  71. package/dist/SomeReflection.d.mts.map +1 -0
  72. package/dist/SomeReflection.d.ts +9 -0
  73. package/dist/SomeReflection.d.ts.map +1 -0
  74. package/dist/SourceViewer.d.mts.map +1 -0
  75. package/dist/SourceViewer.d.ts +8 -0
  76. package/dist/SourceViewer.d.ts.map +1 -0
  77. package/dist/TreeViewer/Reflection.d.mts.map +1 -0
  78. package/dist/TreeViewer/Reflection.d.ts +13 -0
  79. package/dist/TreeViewer/Reflection.d.ts.map +1 -0
  80. package/dist/TreeViewer/ReflectionGroup.d.mts.map +1 -0
  81. package/dist/TreeViewer/ReflectionGroup.d.ts +4 -0
  82. package/dist/TreeViewer/ReflectionGroup.d.ts.map +1 -0
  83. package/dist/TreeViewer/index.d.mts.map +1 -0
  84. package/dist/{esm/TreeViewer/index.js → TreeViewer/index.d.ts} +1 -1
  85. package/dist/TreeViewer/index.d.ts.map +1 -0
  86. package/dist/TwoPanelReflectionViewer.d.mts.map +1 -0
  87. package/dist/TwoPanelReflectionViewer.d.ts +4 -0
  88. package/dist/TwoPanelReflectionViewer.d.ts.map +1 -0
  89. package/dist/createLookup.d.mts.map +1 -0
  90. package/dist/createLookup.d.ts +3 -0
  91. package/dist/createLookup.d.ts.map +1 -0
  92. package/dist/index.d.mts.map +1 -0
  93. package/dist/{esm/index.js → index.d.ts} +1 -1
  94. package/dist/index.d.ts.map +1 -0
  95. package/dist/index.js +3440 -0
  96. package/dist/index.js.map +1 -0
  97. package/dist/index.mjs +3418 -0
  98. package/dist/index.mjs.map +1 -0
  99. package/dist/resolveChildren.d.mts.map +1 -0
  100. package/dist/resolveChildren.d.ts +9 -0
  101. package/dist/resolveChildren.d.ts.map +1 -0
  102. package/dist/trimFlagLabel.d.mts.map +1 -0
  103. package/dist/trimFlagLabel.d.ts +2 -0
  104. package/dist/trimFlagLabel.d.ts.map +1 -0
  105. package/package.json +26 -18
  106. package/src/TreeViewer/Reflection.tsx +1 -1
  107. package/dist/cjs/CommentViewer.js +0 -14
  108. package/dist/cjs/CommentViewer.js.map +0 -1
  109. package/dist/cjs/JsonViewerButton.js +0 -16
  110. package/dist/cjs/JsonViewerButton.js.map +0 -1
  111. package/dist/cjs/ProjectTwoPanelReflectionViewer.js +0 -15
  112. package/dist/cjs/ProjectTwoPanelReflectionViewer.js.map +0 -1
  113. package/dist/cjs/ReflectionLookup.js +0 -3
  114. package/dist/cjs/ReflectionLookup.js.map +0 -1
  115. package/dist/cjs/ReflectionViewer/Container.js +0 -18
  116. package/dist/cjs/ReflectionViewer/Container.js.map +0 -1
  117. package/dist/cjs/ReflectionViewer/Declaration.js +0 -22
  118. package/dist/cjs/ReflectionViewer/Declaration.js.map +0 -1
  119. package/dist/cjs/ReflectionViewer/DeclarationContainer.js +0 -17
  120. package/dist/cjs/ReflectionViewer/DeclarationContainer.js.map +0 -1
  121. package/dist/cjs/ReflectionViewer/NameViewer.js +0 -20
  122. package/dist/cjs/ReflectionViewer/NameViewer.js.map +0 -1
  123. package/dist/cjs/ReflectionViewer/Project.js +0 -21
  124. package/dist/cjs/ReflectionViewer/Project.js.map +0 -1
  125. package/dist/cjs/ReflectionViewer/ReflectionGroupViewer.js +0 -45
  126. package/dist/cjs/ReflectionViewer/ReflectionGroupViewer.js.map +0 -1
  127. package/dist/cjs/ReflectionViewer/ReflectionViewer.js +0 -27
  128. package/dist/cjs/ReflectionViewer/ReflectionViewer.js.map +0 -1
  129. package/dist/cjs/ReflectionViewer/ReflectionViewerProps.js +0 -3
  130. package/dist/cjs/ReflectionViewer/ReflectionViewerProps.js.map +0 -1
  131. package/dist/cjs/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.js +0 -17
  132. package/dist/cjs/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.js.map +0 -1
  133. package/dist/cjs/ReflectionViewer/SomeTypeViewer/TypeBuilder.js +0 -3
  134. package/dist/cjs/ReflectionViewer/SomeTypeViewer/TypeBuilder.js.map +0 -1
  135. package/dist/cjs/ReflectionViewer/SomeTypeViewer/buildArrayString.js +0 -14
  136. package/dist/cjs/ReflectionViewer/SomeTypeViewer/buildArrayString.js.map +0 -1
  137. package/dist/cjs/ReflectionViewer/SomeTypeViewer/buildIntersectionString.js +0 -16
  138. package/dist/cjs/ReflectionViewer/SomeTypeViewer/buildIntersectionString.js.map +0 -1
  139. package/dist/cjs/ReflectionViewer/SomeTypeViewer/buildReferenceString.js +0 -19
  140. package/dist/cjs/ReflectionViewer/SomeTypeViewer/buildReferenceString.js.map +0 -1
  141. package/dist/cjs/ReflectionViewer/SomeTypeViewer/buildReflectionString.js +0 -11
  142. package/dist/cjs/ReflectionViewer/SomeTypeViewer/buildReflectionString.js.map +0 -1
  143. package/dist/cjs/ReflectionViewer/SomeTypeViewer/buildTypeString.js +0 -47
  144. package/dist/cjs/ReflectionViewer/SomeTypeViewer/buildTypeString.js.map +0 -1
  145. package/dist/cjs/ReflectionViewer/SomeTypeViewer/buildUnionString.js +0 -16
  146. package/dist/cjs/ReflectionViewer/SomeTypeViewer/buildUnionString.js.map +0 -1
  147. package/dist/cjs/ReflectionViewer/SomeTypeViewer/index.js +0 -5
  148. package/dist/cjs/ReflectionViewer/SomeTypeViewer/index.js.map +0 -1
  149. package/dist/cjs/ReflectionViewer/index.js +0 -12
  150. package/dist/cjs/ReflectionViewer/index.js.map +0 -1
  151. package/dist/cjs/SomeReflection.js +0 -3
  152. package/dist/cjs/SomeReflection.js.map +0 -1
  153. package/dist/cjs/SourceViewer.js +0 -13
  154. package/dist/cjs/SourceViewer.js.map +0 -1
  155. package/dist/cjs/TreeViewer/Reflection.js +0 -27
  156. package/dist/cjs/TreeViewer/Reflection.js.map +0 -1
  157. package/dist/cjs/TreeViewer/ReflectionGroup.js +0 -20
  158. package/dist/cjs/TreeViewer/ReflectionGroup.js.map +0 -1
  159. package/dist/cjs/TreeViewer/index.js +0 -6
  160. package/dist/cjs/TreeViewer/index.js.map +0 -1
  161. package/dist/cjs/TwoPanelReflectionViewer.js +0 -38
  162. package/dist/cjs/TwoPanelReflectionViewer.js.map +0 -1
  163. package/dist/cjs/createLookup.js +0 -11
  164. package/dist/cjs/createLookup.js.map +0 -1
  165. package/dist/cjs/index.js +0 -13
  166. package/dist/cjs/index.js.map +0 -1
  167. package/dist/cjs/resolveChildren.js +0 -23
  168. package/dist/cjs/resolveChildren.js.map +0 -1
  169. package/dist/cjs/trimFlagLabel.js +0 -11
  170. package/dist/cjs/trimFlagLabel.js.map +0 -1
  171. package/dist/docs.json +0 -188407
  172. package/dist/esm/CommentViewer.js +0 -7
  173. package/dist/esm/CommentViewer.js.map +0 -1
  174. package/dist/esm/JsonViewerButton.js +0 -10
  175. package/dist/esm/JsonViewerButton.js.map +0 -1
  176. package/dist/esm/ProjectTwoPanelReflectionViewer.js +0 -9
  177. package/dist/esm/ProjectTwoPanelReflectionViewer.js.map +0 -1
  178. package/dist/esm/ReflectionLookup.js +0 -2
  179. package/dist/esm/ReflectionLookup.js.map +0 -1
  180. package/dist/esm/ReflectionViewer/Container.js +0 -11
  181. package/dist/esm/ReflectionViewer/Container.js.map +0 -1
  182. package/dist/esm/ReflectionViewer/Declaration.js +0 -15
  183. package/dist/esm/ReflectionViewer/Declaration.js.map +0 -1
  184. package/dist/esm/ReflectionViewer/DeclarationContainer.js +0 -11
  185. package/dist/esm/ReflectionViewer/DeclarationContainer.js.map +0 -1
  186. package/dist/esm/ReflectionViewer/NameViewer.js +0 -14
  187. package/dist/esm/ReflectionViewer/NameViewer.js.map +0 -1
  188. package/dist/esm/ReflectionViewer/Project.js +0 -14
  189. package/dist/esm/ReflectionViewer/Project.js.map +0 -1
  190. package/dist/esm/ReflectionViewer/ReflectionGroupViewer.js +0 -37
  191. package/dist/esm/ReflectionViewer/ReflectionGroupViewer.js.map +0 -1
  192. package/dist/esm/ReflectionViewer/ReflectionViewer.js +0 -20
  193. package/dist/esm/ReflectionViewer/ReflectionViewer.js.map +0 -1
  194. package/dist/esm/ReflectionViewer/ReflectionViewerProps.js +0 -2
  195. package/dist/esm/ReflectionViewer/ReflectionViewerProps.js.map +0 -1
  196. package/dist/esm/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.js +0 -11
  197. package/dist/esm/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.js.map +0 -1
  198. package/dist/esm/ReflectionViewer/SomeTypeViewer/TypeBuilder.js +0 -2
  199. package/dist/esm/ReflectionViewer/SomeTypeViewer/TypeBuilder.js.map +0 -1
  200. package/dist/esm/ReflectionViewer/SomeTypeViewer/buildArrayString.js +0 -10
  201. package/dist/esm/ReflectionViewer/SomeTypeViewer/buildArrayString.js.map +0 -1
  202. package/dist/esm/ReflectionViewer/SomeTypeViewer/buildIntersectionString.js +0 -12
  203. package/dist/esm/ReflectionViewer/SomeTypeViewer/buildIntersectionString.js.map +0 -1
  204. package/dist/esm/ReflectionViewer/SomeTypeViewer/buildReferenceString.js +0 -15
  205. package/dist/esm/ReflectionViewer/SomeTypeViewer/buildReferenceString.js.map +0 -1
  206. package/dist/esm/ReflectionViewer/SomeTypeViewer/buildReflectionString.js +0 -7
  207. package/dist/esm/ReflectionViewer/SomeTypeViewer/buildReflectionString.js.map +0 -1
  208. package/dist/esm/ReflectionViewer/SomeTypeViewer/buildTypeString.js +0 -43
  209. package/dist/esm/ReflectionViewer/SomeTypeViewer/buildTypeString.js.map +0 -1
  210. package/dist/esm/ReflectionViewer/SomeTypeViewer/buildUnionString.js +0 -12
  211. package/dist/esm/ReflectionViewer/SomeTypeViewer/buildUnionString.js.map +0 -1
  212. package/dist/esm/ReflectionViewer/SomeTypeViewer/index.js +0 -2
  213. package/dist/esm/ReflectionViewer/SomeTypeViewer/index.js.map +0 -1
  214. package/dist/esm/ReflectionViewer/index.js.map +0 -1
  215. package/dist/esm/SomeReflection.js +0 -2
  216. package/dist/esm/SomeReflection.js.map +0 -1
  217. package/dist/esm/SourceViewer.js +0 -7
  218. package/dist/esm/SourceViewer.js.map +0 -1
  219. package/dist/esm/TreeViewer/Reflection.js +0 -19
  220. package/dist/esm/TreeViewer/Reflection.js.map +0 -1
  221. package/dist/esm/TreeViewer/ReflectionGroup.js +0 -14
  222. package/dist/esm/TreeViewer/ReflectionGroup.js.map +0 -1
  223. package/dist/esm/TreeViewer/index.js.map +0 -1
  224. package/dist/esm/TwoPanelReflectionViewer.js +0 -31
  225. package/dist/esm/TwoPanelReflectionViewer.js.map +0 -1
  226. package/dist/esm/createLookup.js +0 -6
  227. package/dist/esm/createLookup.js.map +0 -1
  228. package/dist/esm/index.js.map +0 -1
  229. package/dist/esm/resolveChildren.js +0 -18
  230. package/dist/esm/resolveChildren.js.map +0 -1
  231. package/dist/esm/trimFlagLabel.js +0 -7
  232. package/dist/esm/trimFlagLabel.js.map +0 -1
  233. package/dist/types/CommentViewer.d.ts.map +0 -1
  234. package/dist/types/JsonViewerButton.d.ts.map +0 -1
  235. package/dist/types/ProjectTwoPanelReflectionViewer.d.ts.map +0 -1
  236. package/dist/types/ReflectionLookup.d.ts.map +0 -1
  237. package/dist/types/ReflectionViewer/Container.d.ts.map +0 -1
  238. package/dist/types/ReflectionViewer/Declaration.d.ts.map +0 -1
  239. package/dist/types/ReflectionViewer/DeclarationContainer.d.ts.map +0 -1
  240. package/dist/types/ReflectionViewer/NameViewer.d.ts.map +0 -1
  241. package/dist/types/ReflectionViewer/Project.d.ts.map +0 -1
  242. package/dist/types/ReflectionViewer/ReflectionGroupViewer.d.ts.map +0 -1
  243. package/dist/types/ReflectionViewer/ReflectionViewer.d.ts.map +0 -1
  244. package/dist/types/ReflectionViewer/ReflectionViewerProps.d.ts.map +0 -1
  245. package/dist/types/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.d.ts.map +0 -1
  246. package/dist/types/ReflectionViewer/SomeTypeViewer/TypeBuilder.d.ts.map +0 -1
  247. package/dist/types/ReflectionViewer/SomeTypeViewer/buildArrayString.d.ts.map +0 -1
  248. package/dist/types/ReflectionViewer/SomeTypeViewer/buildIntersectionString.d.ts.map +0 -1
  249. package/dist/types/ReflectionViewer/SomeTypeViewer/buildReferenceString.d.ts.map +0 -1
  250. package/dist/types/ReflectionViewer/SomeTypeViewer/buildReflectionString.d.ts.map +0 -1
  251. package/dist/types/ReflectionViewer/SomeTypeViewer/buildTypeString.d.ts.map +0 -1
  252. package/dist/types/ReflectionViewer/SomeTypeViewer/buildUnionString.d.ts.map +0 -1
  253. package/dist/types/ReflectionViewer/SomeTypeViewer/index.d.ts.map +0 -1
  254. package/dist/types/ReflectionViewer/index.d.ts.map +0 -1
  255. package/dist/types/SomeReflection.d.ts.map +0 -1
  256. package/dist/types/SourceViewer.d.ts.map +0 -1
  257. package/dist/types/TreeViewer/Reflection.d.ts.map +0 -1
  258. package/dist/types/TreeViewer/ReflectionGroup.d.ts.map +0 -1
  259. package/dist/types/TreeViewer/index.d.ts.map +0 -1
  260. package/dist/types/TwoPanelReflectionViewer.d.ts.map +0 -1
  261. package/dist/types/createLookup.d.ts.map +0 -1
  262. package/dist/types/index.d.ts.map +0 -1
  263. package/dist/types/resolveChildren.d.ts.map +0 -1
  264. package/dist/types/trimFlagLabel.d.ts.map +0 -1
  265. /package/dist/{types/CommentViewer.d.ts → CommentViewer.d.mts} +0 -0
  266. /package/dist/{types/JsonViewerButton.d.ts → JsonViewerButton.d.mts} +0 -0
  267. /package/dist/{types/ProjectTwoPanelReflectionViewer.d.ts → ProjectTwoPanelReflectionViewer.d.mts} +0 -0
  268. /package/dist/{types/ReflectionLookup.d.ts → ReflectionLookup.d.mts} +0 -0
  269. /package/dist/{types/ReflectionViewer/Container.d.ts → ReflectionViewer/Container.d.mts} +0 -0
  270. /package/dist/{types/ReflectionViewer/Declaration.d.ts → ReflectionViewer/Declaration.d.mts} +0 -0
  271. /package/dist/{types/ReflectionViewer/DeclarationContainer.d.ts → ReflectionViewer/DeclarationContainer.d.mts} +0 -0
  272. /package/dist/{types/ReflectionViewer/NameViewer.d.ts → ReflectionViewer/NameViewer.d.mts} +0 -0
  273. /package/dist/{types/ReflectionViewer/Project.d.ts → ReflectionViewer/Project.d.mts} +0 -0
  274. /package/dist/{types/ReflectionViewer/ReflectionGroupViewer.d.ts → ReflectionViewer/ReflectionGroupViewer.d.mts} +0 -0
  275. /package/dist/{types/ReflectionViewer/ReflectionViewer.d.ts → ReflectionViewer/ReflectionViewer.d.mts} +0 -0
  276. /package/dist/{types/ReflectionViewer/ReflectionViewerProps.d.ts → ReflectionViewer/ReflectionViewerProps.d.mts} +0 -0
  277. /package/dist/{types/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.d.ts → ReflectionViewer/SomeTypeViewer/SomeTypeViewer.d.mts} +0 -0
  278. /package/dist/{types/ReflectionViewer/SomeTypeViewer/TypeBuilder.d.ts → ReflectionViewer/SomeTypeViewer/TypeBuilder.d.mts} +0 -0
  279. /package/dist/{types/ReflectionViewer/SomeTypeViewer/buildArrayString.d.ts → ReflectionViewer/SomeTypeViewer/buildArrayString.d.mts} +0 -0
  280. /package/dist/{types/ReflectionViewer/SomeTypeViewer/buildIntersectionString.d.ts → ReflectionViewer/SomeTypeViewer/buildIntersectionString.d.mts} +0 -0
  281. /package/dist/{types/ReflectionViewer/SomeTypeViewer/buildReferenceString.d.ts → ReflectionViewer/SomeTypeViewer/buildReferenceString.d.mts} +0 -0
  282. /package/dist/{types/ReflectionViewer/SomeTypeViewer/buildReflectionString.d.ts → ReflectionViewer/SomeTypeViewer/buildReflectionString.d.mts} +0 -0
  283. /package/dist/{types/ReflectionViewer/SomeTypeViewer/buildTypeString.d.ts → ReflectionViewer/SomeTypeViewer/buildTypeString.d.mts} +0 -0
  284. /package/dist/{types/ReflectionViewer/SomeTypeViewer/buildUnionString.d.ts → ReflectionViewer/SomeTypeViewer/buildUnionString.d.mts} +0 -0
  285. /package/dist/{types/ReflectionViewer/SomeTypeViewer/index.d.ts → ReflectionViewer/SomeTypeViewer/index.d.mts} +0 -0
  286. /package/dist/{types/ReflectionViewer/index.d.ts → ReflectionViewer/index.d.mts} +0 -0
  287. /package/dist/{types/SomeReflection.d.ts → SomeReflection.d.mts} +0 -0
  288. /package/dist/{types/SourceViewer.d.ts → SourceViewer.d.mts} +0 -0
  289. /package/dist/{types/TreeViewer/Reflection.d.ts → TreeViewer/Reflection.d.mts} +0 -0
  290. /package/dist/{types/TreeViewer/ReflectionGroup.d.ts → TreeViewer/ReflectionGroup.d.mts} +0 -0
  291. /package/dist/{types/TreeViewer/index.d.ts → TreeViewer/index.d.mts} +0 -0
  292. /package/dist/{types/TwoPanelReflectionViewer.d.ts → TwoPanelReflectionViewer.d.mts} +0 -0
  293. /package/dist/{types/createLookup.d.ts → createLookup.d.mts} +0 -0
  294. /package/dist/{types/index.d.ts → index.d.mts} +0 -0
  295. /package/dist/{types/resolveChildren.d.ts → resolveChildren.d.mts} +0 -0
  296. /package/dist/{types/trimFlagLabel.d.ts → trimFlagLabel.d.mts} +0 -0
package/dist/index.mjs ADDED
@@ -0,0 +1,3418 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __esm = (fn, res) => function __init() {
8
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
+ };
10
+ var __commonJS = (cb, mod) => function __require() {
11
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
+ };
13
+ var __export = (target, all) => {
14
+ for (var name in all)
15
+ __defProp(target, name, { get: all[name], enumerable: true });
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") {
19
+ for (let key of __getOwnPropNames(from))
20
+ if (!__hasOwnProp.call(to, key) && key !== except)
21
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ // If the importer is in node compatibility mode or this is not an ESM
27
+ // file that has been converted to a CommonJS file using a Babel-
28
+ // compatible transform (i.e. "__esModule" has not been set), then set
29
+ // "default" to the CommonJS "module.exports" for node compatibility.
30
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
+ mod
32
+ ));
33
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
+
35
+ // ../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
36
+ var require_react_is_production_min = __commonJS({
37
+ "../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
38
+ "use strict";
39
+ var b = "function" === typeof Symbol && Symbol.for;
40
+ var c = b ? Symbol.for("react.element") : 60103;
41
+ var d = b ? Symbol.for("react.portal") : 60106;
42
+ var e = b ? Symbol.for("react.fragment") : 60107;
43
+ var f = b ? Symbol.for("react.strict_mode") : 60108;
44
+ var g = b ? Symbol.for("react.profiler") : 60114;
45
+ var h = b ? Symbol.for("react.provider") : 60109;
46
+ var k = b ? Symbol.for("react.context") : 60110;
47
+ var l = b ? Symbol.for("react.async_mode") : 60111;
48
+ var m = b ? Symbol.for("react.concurrent_mode") : 60111;
49
+ var n = b ? Symbol.for("react.forward_ref") : 60112;
50
+ var p = b ? Symbol.for("react.suspense") : 60113;
51
+ var q = b ? Symbol.for("react.suspense_list") : 60120;
52
+ var r2 = b ? Symbol.for("react.memo") : 60115;
53
+ var t = b ? Symbol.for("react.lazy") : 60116;
54
+ var v = b ? Symbol.for("react.block") : 60121;
55
+ var w = b ? Symbol.for("react.fundamental") : 60117;
56
+ var x = b ? Symbol.for("react.responder") : 60118;
57
+ var y = b ? Symbol.for("react.scope") : 60119;
58
+ function z(a) {
59
+ if ("object" === typeof a && null !== a) {
60
+ var u = a.$$typeof;
61
+ switch (u) {
62
+ case c:
63
+ switch (a = a.type, a) {
64
+ case l:
65
+ case m:
66
+ case e:
67
+ case g:
68
+ case f:
69
+ case p:
70
+ return a;
71
+ default:
72
+ switch (a = a && a.$$typeof, a) {
73
+ case k:
74
+ case n:
75
+ case t:
76
+ case r2:
77
+ case h:
78
+ return a;
79
+ default:
80
+ return u;
81
+ }
82
+ }
83
+ case d:
84
+ return u;
85
+ }
86
+ }
87
+ }
88
+ function A(a) {
89
+ return z(a) === m;
90
+ }
91
+ exports.AsyncMode = l;
92
+ exports.ConcurrentMode = m;
93
+ exports.ContextConsumer = k;
94
+ exports.ContextProvider = h;
95
+ exports.Element = c;
96
+ exports.ForwardRef = n;
97
+ exports.Fragment = e;
98
+ exports.Lazy = t;
99
+ exports.Memo = r2;
100
+ exports.Portal = d;
101
+ exports.Profiler = g;
102
+ exports.StrictMode = f;
103
+ exports.Suspense = p;
104
+ exports.isAsyncMode = function(a) {
105
+ return A(a) || z(a) === l;
106
+ };
107
+ exports.isConcurrentMode = A;
108
+ exports.isContextConsumer = function(a) {
109
+ return z(a) === k;
110
+ };
111
+ exports.isContextProvider = function(a) {
112
+ return z(a) === h;
113
+ };
114
+ exports.isElement = function(a) {
115
+ return "object" === typeof a && null !== a && a.$$typeof === c;
116
+ };
117
+ exports.isForwardRef = function(a) {
118
+ return z(a) === n;
119
+ };
120
+ exports.isFragment = function(a) {
121
+ return z(a) === e;
122
+ };
123
+ exports.isLazy = function(a) {
124
+ return z(a) === t;
125
+ };
126
+ exports.isMemo = function(a) {
127
+ return z(a) === r2;
128
+ };
129
+ exports.isPortal = function(a) {
130
+ return z(a) === d;
131
+ };
132
+ exports.isProfiler = function(a) {
133
+ return z(a) === g;
134
+ };
135
+ exports.isStrictMode = function(a) {
136
+ return z(a) === f;
137
+ };
138
+ exports.isSuspense = function(a) {
139
+ return z(a) === p;
140
+ };
141
+ exports.isValidElementType = function(a) {
142
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
143
+ };
144
+ exports.typeOf = z;
145
+ }
146
+ });
147
+
148
+ // ../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js
149
+ var require_react_is_development = __commonJS({
150
+ "../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"(exports) {
151
+ "use strict";
152
+ if (process.env.NODE_ENV !== "production") {
153
+ (function() {
154
+ "use strict";
155
+ var hasSymbol = typeof Symbol === "function" && Symbol.for;
156
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
157
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
158
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
159
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
160
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
161
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
162
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
163
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
164
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
165
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
166
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
167
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
168
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
169
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
170
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
171
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
172
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
173
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
174
+ function isValidElementType(type) {
175
+ return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
176
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
177
+ }
178
+ function typeOf(object) {
179
+ if (typeof object === "object" && object !== null) {
180
+ var $$typeof = object.$$typeof;
181
+ switch ($$typeof) {
182
+ case REACT_ELEMENT_TYPE:
183
+ var type = object.type;
184
+ switch (type) {
185
+ case REACT_ASYNC_MODE_TYPE:
186
+ case REACT_CONCURRENT_MODE_TYPE:
187
+ case REACT_FRAGMENT_TYPE:
188
+ case REACT_PROFILER_TYPE:
189
+ case REACT_STRICT_MODE_TYPE:
190
+ case REACT_SUSPENSE_TYPE:
191
+ return type;
192
+ default:
193
+ var $$typeofType = type && type.$$typeof;
194
+ switch ($$typeofType) {
195
+ case REACT_CONTEXT_TYPE:
196
+ case REACT_FORWARD_REF_TYPE:
197
+ case REACT_LAZY_TYPE:
198
+ case REACT_MEMO_TYPE:
199
+ case REACT_PROVIDER_TYPE:
200
+ return $$typeofType;
201
+ default:
202
+ return $$typeof;
203
+ }
204
+ }
205
+ case REACT_PORTAL_TYPE:
206
+ return $$typeof;
207
+ }
208
+ }
209
+ return void 0;
210
+ }
211
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
212
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
213
+ var ContextConsumer = REACT_CONTEXT_TYPE;
214
+ var ContextProvider = REACT_PROVIDER_TYPE;
215
+ var Element = REACT_ELEMENT_TYPE;
216
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
217
+ var Fragment5 = REACT_FRAGMENT_TYPE;
218
+ var Lazy = REACT_LAZY_TYPE;
219
+ var Memo = REACT_MEMO_TYPE;
220
+ var Portal = REACT_PORTAL_TYPE;
221
+ var Profiler = REACT_PROFILER_TYPE;
222
+ var StrictMode = REACT_STRICT_MODE_TYPE;
223
+ var Suspense2 = REACT_SUSPENSE_TYPE;
224
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
225
+ function isAsyncMode(object) {
226
+ {
227
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
228
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
229
+ console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
230
+ }
231
+ }
232
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
233
+ }
234
+ function isConcurrentMode(object) {
235
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
236
+ }
237
+ function isContextConsumer(object) {
238
+ return typeOf(object) === REACT_CONTEXT_TYPE;
239
+ }
240
+ function isContextProvider(object) {
241
+ return typeOf(object) === REACT_PROVIDER_TYPE;
242
+ }
243
+ function isElement(object) {
244
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
245
+ }
246
+ function isForwardRef(object) {
247
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
248
+ }
249
+ function isFragment(object) {
250
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
251
+ }
252
+ function isLazy(object) {
253
+ return typeOf(object) === REACT_LAZY_TYPE;
254
+ }
255
+ function isMemo(object) {
256
+ return typeOf(object) === REACT_MEMO_TYPE;
257
+ }
258
+ function isPortal(object) {
259
+ return typeOf(object) === REACT_PORTAL_TYPE;
260
+ }
261
+ function isProfiler(object) {
262
+ return typeOf(object) === REACT_PROFILER_TYPE;
263
+ }
264
+ function isStrictMode(object) {
265
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
266
+ }
267
+ function isSuspense(object) {
268
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
269
+ }
270
+ exports.AsyncMode = AsyncMode;
271
+ exports.ConcurrentMode = ConcurrentMode;
272
+ exports.ContextConsumer = ContextConsumer;
273
+ exports.ContextProvider = ContextProvider;
274
+ exports.Element = Element;
275
+ exports.ForwardRef = ForwardRef;
276
+ exports.Fragment = Fragment5;
277
+ exports.Lazy = Lazy;
278
+ exports.Memo = Memo;
279
+ exports.Portal = Portal;
280
+ exports.Profiler = Profiler;
281
+ exports.StrictMode = StrictMode;
282
+ exports.Suspense = Suspense2;
283
+ exports.isAsyncMode = isAsyncMode;
284
+ exports.isConcurrentMode = isConcurrentMode;
285
+ exports.isContextConsumer = isContextConsumer;
286
+ exports.isContextProvider = isContextProvider;
287
+ exports.isElement = isElement;
288
+ exports.isForwardRef = isForwardRef;
289
+ exports.isFragment = isFragment;
290
+ exports.isLazy = isLazy;
291
+ exports.isMemo = isMemo;
292
+ exports.isPortal = isPortal;
293
+ exports.isProfiler = isProfiler;
294
+ exports.isStrictMode = isStrictMode;
295
+ exports.isSuspense = isSuspense;
296
+ exports.isValidElementType = isValidElementType;
297
+ exports.typeOf = typeOf;
298
+ })();
299
+ }
300
+ }
301
+ });
302
+
303
+ // ../../../../node_modules/prop-types/node_modules/react-is/index.js
304
+ var require_react_is = __commonJS({
305
+ "../../../../node_modules/prop-types/node_modules/react-is/index.js"(exports, module) {
306
+ "use strict";
307
+ if (process.env.NODE_ENV === "production") {
308
+ module.exports = require_react_is_production_min();
309
+ } else {
310
+ module.exports = require_react_is_development();
311
+ }
312
+ }
313
+ });
314
+
315
+ // ../../../../node_modules/object-assign/index.js
316
+ var require_object_assign = __commonJS({
317
+ "../../../../node_modules/object-assign/index.js"(exports, module) {
318
+ "use strict";
319
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
320
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
321
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
322
+ function toObject(val) {
323
+ if (val === null || val === void 0) {
324
+ throw new TypeError("Object.assign cannot be called with null or undefined");
325
+ }
326
+ return Object(val);
327
+ }
328
+ function shouldUseNative() {
329
+ try {
330
+ if (!Object.assign) {
331
+ return false;
332
+ }
333
+ var test1 = new String("abc");
334
+ test1[5] = "de";
335
+ if (Object.getOwnPropertyNames(test1)[0] === "5") {
336
+ return false;
337
+ }
338
+ var test2 = {};
339
+ for (var i = 0; i < 10; i++) {
340
+ test2["_" + String.fromCharCode(i)] = i;
341
+ }
342
+ var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
343
+ return test2[n];
344
+ });
345
+ if (order2.join("") !== "0123456789") {
346
+ return false;
347
+ }
348
+ var test3 = {};
349
+ "abcdefghijklmnopqrst".split("").forEach(function(letter) {
350
+ test3[letter] = letter;
351
+ });
352
+ if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
353
+ return false;
354
+ }
355
+ return true;
356
+ } catch (err) {
357
+ return false;
358
+ }
359
+ }
360
+ module.exports = shouldUseNative() ? Object.assign : function(target, source) {
361
+ var from;
362
+ var to = toObject(target);
363
+ var symbols;
364
+ for (var s = 1; s < arguments.length; s++) {
365
+ from = Object(arguments[s]);
366
+ for (var key in from) {
367
+ if (hasOwnProperty.call(from, key)) {
368
+ to[key] = from[key];
369
+ }
370
+ }
371
+ if (getOwnPropertySymbols) {
372
+ symbols = getOwnPropertySymbols(from);
373
+ for (var i = 0; i < symbols.length; i++) {
374
+ if (propIsEnumerable.call(from, symbols[i])) {
375
+ to[symbols[i]] = from[symbols[i]];
376
+ }
377
+ }
378
+ }
379
+ }
380
+ return to;
381
+ };
382
+ }
383
+ });
384
+
385
+ // ../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js
386
+ var require_ReactPropTypesSecret = __commonJS({
387
+ "../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module) {
388
+ "use strict";
389
+ var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
390
+ module.exports = ReactPropTypesSecret;
391
+ }
392
+ });
393
+
394
+ // ../../../../node_modules/prop-types/lib/has.js
395
+ var require_has = __commonJS({
396
+ "../../../../node_modules/prop-types/lib/has.js"(exports, module) {
397
+ "use strict";
398
+ module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
399
+ }
400
+ });
401
+
402
+ // ../../../../node_modules/prop-types/checkPropTypes.js
403
+ var require_checkPropTypes = __commonJS({
404
+ "../../../../node_modules/prop-types/checkPropTypes.js"(exports, module) {
405
+ "use strict";
406
+ var printWarning = function() {
407
+ };
408
+ if (process.env.NODE_ENV !== "production") {
409
+ ReactPropTypesSecret = require_ReactPropTypesSecret();
410
+ loggedTypeFailures = {};
411
+ has = require_has();
412
+ printWarning = function(text) {
413
+ var message = "Warning: " + text;
414
+ if (typeof console !== "undefined") {
415
+ console.error(message);
416
+ }
417
+ try {
418
+ throw new Error(message);
419
+ } catch (x) {
420
+ }
421
+ };
422
+ }
423
+ var ReactPropTypesSecret;
424
+ var loggedTypeFailures;
425
+ var has;
426
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
427
+ if (process.env.NODE_ENV !== "production") {
428
+ for (var typeSpecName in typeSpecs) {
429
+ if (has(typeSpecs, typeSpecName)) {
430
+ var error;
431
+ try {
432
+ if (typeof typeSpecs[typeSpecName] !== "function") {
433
+ var err = Error(
434
+ (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
435
+ );
436
+ err.name = "Invariant Violation";
437
+ throw err;
438
+ }
439
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
440
+ } catch (ex) {
441
+ error = ex;
442
+ }
443
+ if (error && !(error instanceof Error)) {
444
+ printWarning(
445
+ (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
446
+ );
447
+ }
448
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
449
+ loggedTypeFailures[error.message] = true;
450
+ var stack = getStack ? getStack() : "";
451
+ printWarning(
452
+ "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
453
+ );
454
+ }
455
+ }
456
+ }
457
+ }
458
+ }
459
+ checkPropTypes.resetWarningCache = function() {
460
+ if (process.env.NODE_ENV !== "production") {
461
+ loggedTypeFailures = {};
462
+ }
463
+ };
464
+ module.exports = checkPropTypes;
465
+ }
466
+ });
467
+
468
+ // ../../../../node_modules/prop-types/factoryWithTypeCheckers.js
469
+ var require_factoryWithTypeCheckers = __commonJS({
470
+ "../../../../node_modules/prop-types/factoryWithTypeCheckers.js"(exports, module) {
471
+ "use strict";
472
+ var ReactIs = require_react_is();
473
+ var assign = require_object_assign();
474
+ var ReactPropTypesSecret = require_ReactPropTypesSecret();
475
+ var has = require_has();
476
+ var checkPropTypes = require_checkPropTypes();
477
+ var printWarning = function() {
478
+ };
479
+ if (process.env.NODE_ENV !== "production") {
480
+ printWarning = function(text) {
481
+ var message = "Warning: " + text;
482
+ if (typeof console !== "undefined") {
483
+ console.error(message);
484
+ }
485
+ try {
486
+ throw new Error(message);
487
+ } catch (x) {
488
+ }
489
+ };
490
+ }
491
+ function emptyFunctionThatReturnsNull() {
492
+ return null;
493
+ }
494
+ module.exports = function(isValidElement, throwOnDirectAccess) {
495
+ var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
496
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
497
+ function getIteratorFn(maybeIterable) {
498
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
499
+ if (typeof iteratorFn === "function") {
500
+ return iteratorFn;
501
+ }
502
+ }
503
+ var ANONYMOUS = "<<anonymous>>";
504
+ var ReactPropTypes = {
505
+ array: createPrimitiveTypeChecker("array"),
506
+ bigint: createPrimitiveTypeChecker("bigint"),
507
+ bool: createPrimitiveTypeChecker("boolean"),
508
+ func: createPrimitiveTypeChecker("function"),
509
+ number: createPrimitiveTypeChecker("number"),
510
+ object: createPrimitiveTypeChecker("object"),
511
+ string: createPrimitiveTypeChecker("string"),
512
+ symbol: createPrimitiveTypeChecker("symbol"),
513
+ any: createAnyTypeChecker(),
514
+ arrayOf: createArrayOfTypeChecker,
515
+ element: createElementTypeChecker(),
516
+ elementType: createElementTypeTypeChecker(),
517
+ instanceOf: createInstanceTypeChecker,
518
+ node: createNodeChecker(),
519
+ objectOf: createObjectOfTypeChecker,
520
+ oneOf: createEnumTypeChecker,
521
+ oneOfType: createUnionTypeChecker,
522
+ shape: createShapeTypeChecker,
523
+ exact: createStrictShapeTypeChecker
524
+ };
525
+ function is(x, y) {
526
+ if (x === y) {
527
+ return x !== 0 || 1 / x === 1 / y;
528
+ } else {
529
+ return x !== x && y !== y;
530
+ }
531
+ }
532
+ function PropTypeError(message, data) {
533
+ this.message = message;
534
+ this.data = data && typeof data === "object" ? data : {};
535
+ this.stack = "";
536
+ }
537
+ PropTypeError.prototype = Error.prototype;
538
+ function createChainableTypeChecker(validate) {
539
+ if (process.env.NODE_ENV !== "production") {
540
+ var manualPropTypeCallCache = {};
541
+ var manualPropTypeWarningCount = 0;
542
+ }
543
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
544
+ componentName = componentName || ANONYMOUS;
545
+ propFullName = propFullName || propName;
546
+ if (secret !== ReactPropTypesSecret) {
547
+ if (throwOnDirectAccess) {
548
+ var err = new Error(
549
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
550
+ );
551
+ err.name = "Invariant Violation";
552
+ throw err;
553
+ } else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
554
+ var cacheKey = componentName + ":" + propName;
555
+ if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
556
+ manualPropTypeWarningCount < 3) {
557
+ printWarning(
558
+ "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
559
+ );
560
+ manualPropTypeCallCache[cacheKey] = true;
561
+ manualPropTypeWarningCount++;
562
+ }
563
+ }
564
+ }
565
+ if (props[propName] == null) {
566
+ if (isRequired) {
567
+ if (props[propName] === null) {
568
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
569
+ }
570
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
571
+ }
572
+ return null;
573
+ } else {
574
+ return validate(props, propName, componentName, location, propFullName);
575
+ }
576
+ }
577
+ var chainedCheckType = checkType.bind(null, false);
578
+ chainedCheckType.isRequired = checkType.bind(null, true);
579
+ return chainedCheckType;
580
+ }
581
+ function createPrimitiveTypeChecker(expectedType) {
582
+ function validate(props, propName, componentName, location, propFullName, secret) {
583
+ var propValue = props[propName];
584
+ var propType = getPropType(propValue);
585
+ if (propType !== expectedType) {
586
+ var preciseType = getPreciseType(propValue);
587
+ return new PropTypeError(
588
+ "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
589
+ { expectedType }
590
+ );
591
+ }
592
+ return null;
593
+ }
594
+ return createChainableTypeChecker(validate);
595
+ }
596
+ function createAnyTypeChecker() {
597
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
598
+ }
599
+ function createArrayOfTypeChecker(typeChecker) {
600
+ function validate(props, propName, componentName, location, propFullName) {
601
+ if (typeof typeChecker !== "function") {
602
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
603
+ }
604
+ var propValue = props[propName];
605
+ if (!Array.isArray(propValue)) {
606
+ var propType = getPropType(propValue);
607
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
608
+ }
609
+ for (var i = 0; i < propValue.length; i++) {
610
+ var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
611
+ if (error instanceof Error) {
612
+ return error;
613
+ }
614
+ }
615
+ return null;
616
+ }
617
+ return createChainableTypeChecker(validate);
618
+ }
619
+ function createElementTypeChecker() {
620
+ function validate(props, propName, componentName, location, propFullName) {
621
+ var propValue = props[propName];
622
+ if (!isValidElement(propValue)) {
623
+ var propType = getPropType(propValue);
624
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
625
+ }
626
+ return null;
627
+ }
628
+ return createChainableTypeChecker(validate);
629
+ }
630
+ function createElementTypeTypeChecker() {
631
+ function validate(props, propName, componentName, location, propFullName) {
632
+ var propValue = props[propName];
633
+ if (!ReactIs.isValidElementType(propValue)) {
634
+ var propType = getPropType(propValue);
635
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
636
+ }
637
+ return null;
638
+ }
639
+ return createChainableTypeChecker(validate);
640
+ }
641
+ function createInstanceTypeChecker(expectedClass) {
642
+ function validate(props, propName, componentName, location, propFullName) {
643
+ if (!(props[propName] instanceof expectedClass)) {
644
+ var expectedClassName = expectedClass.name || ANONYMOUS;
645
+ var actualClassName = getClassName(props[propName]);
646
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
647
+ }
648
+ return null;
649
+ }
650
+ return createChainableTypeChecker(validate);
651
+ }
652
+ function createEnumTypeChecker(expectedValues) {
653
+ if (!Array.isArray(expectedValues)) {
654
+ if (process.env.NODE_ENV !== "production") {
655
+ if (arguments.length > 1) {
656
+ printWarning(
657
+ "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
658
+ );
659
+ } else {
660
+ printWarning("Invalid argument supplied to oneOf, expected an array.");
661
+ }
662
+ }
663
+ return emptyFunctionThatReturnsNull;
664
+ }
665
+ function validate(props, propName, componentName, location, propFullName) {
666
+ var propValue = props[propName];
667
+ for (var i = 0; i < expectedValues.length; i++) {
668
+ if (is(propValue, expectedValues[i])) {
669
+ return null;
670
+ }
671
+ }
672
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
673
+ var type = getPreciseType(value);
674
+ if (type === "symbol") {
675
+ return String(value);
676
+ }
677
+ return value;
678
+ });
679
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
680
+ }
681
+ return createChainableTypeChecker(validate);
682
+ }
683
+ function createObjectOfTypeChecker(typeChecker) {
684
+ function validate(props, propName, componentName, location, propFullName) {
685
+ if (typeof typeChecker !== "function") {
686
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
687
+ }
688
+ var propValue = props[propName];
689
+ var propType = getPropType(propValue);
690
+ if (propType !== "object") {
691
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
692
+ }
693
+ for (var key in propValue) {
694
+ if (has(propValue, key)) {
695
+ var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
696
+ if (error instanceof Error) {
697
+ return error;
698
+ }
699
+ }
700
+ }
701
+ return null;
702
+ }
703
+ return createChainableTypeChecker(validate);
704
+ }
705
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
706
+ if (!Array.isArray(arrayOfTypeCheckers)) {
707
+ process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
708
+ return emptyFunctionThatReturnsNull;
709
+ }
710
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
711
+ var checker = arrayOfTypeCheckers[i];
712
+ if (typeof checker !== "function") {
713
+ printWarning(
714
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
715
+ );
716
+ return emptyFunctionThatReturnsNull;
717
+ }
718
+ }
719
+ function validate(props, propName, componentName, location, propFullName) {
720
+ var expectedTypes = [];
721
+ for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
722
+ var checker2 = arrayOfTypeCheckers[i2];
723
+ var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
724
+ if (checkerResult == null) {
725
+ return null;
726
+ }
727
+ if (checkerResult.data && has(checkerResult.data, "expectedType")) {
728
+ expectedTypes.push(checkerResult.data.expectedType);
729
+ }
730
+ }
731
+ var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
732
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
733
+ }
734
+ return createChainableTypeChecker(validate);
735
+ }
736
+ function createNodeChecker() {
737
+ function validate(props, propName, componentName, location, propFullName) {
738
+ if (!isNode(props[propName])) {
739
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
740
+ }
741
+ return null;
742
+ }
743
+ return createChainableTypeChecker(validate);
744
+ }
745
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
746
+ return new PropTypeError(
747
+ (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
748
+ );
749
+ }
750
+ function createShapeTypeChecker(shapeTypes) {
751
+ function validate(props, propName, componentName, location, propFullName) {
752
+ var propValue = props[propName];
753
+ var propType = getPropType(propValue);
754
+ if (propType !== "object") {
755
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
756
+ }
757
+ for (var key in shapeTypes) {
758
+ var checker = shapeTypes[key];
759
+ if (typeof checker !== "function") {
760
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
761
+ }
762
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
763
+ if (error) {
764
+ return error;
765
+ }
766
+ }
767
+ return null;
768
+ }
769
+ return createChainableTypeChecker(validate);
770
+ }
771
+ function createStrictShapeTypeChecker(shapeTypes) {
772
+ function validate(props, propName, componentName, location, propFullName) {
773
+ var propValue = props[propName];
774
+ var propType = getPropType(propValue);
775
+ if (propType !== "object") {
776
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
777
+ }
778
+ var allKeys = assign({}, props[propName], shapeTypes);
779
+ for (var key in allKeys) {
780
+ var checker = shapeTypes[key];
781
+ if (has(shapeTypes, key) && typeof checker !== "function") {
782
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
783
+ }
784
+ if (!checker) {
785
+ return new PropTypeError(
786
+ "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
787
+ );
788
+ }
789
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
790
+ if (error) {
791
+ return error;
792
+ }
793
+ }
794
+ return null;
795
+ }
796
+ return createChainableTypeChecker(validate);
797
+ }
798
+ function isNode(propValue) {
799
+ switch (typeof propValue) {
800
+ case "number":
801
+ case "string":
802
+ case "undefined":
803
+ return true;
804
+ case "boolean":
805
+ return !propValue;
806
+ case "object":
807
+ if (Array.isArray(propValue)) {
808
+ return propValue.every(isNode);
809
+ }
810
+ if (propValue === null || isValidElement(propValue)) {
811
+ return true;
812
+ }
813
+ var iteratorFn = getIteratorFn(propValue);
814
+ if (iteratorFn) {
815
+ var iterator = iteratorFn.call(propValue);
816
+ var step;
817
+ if (iteratorFn !== propValue.entries) {
818
+ while (!(step = iterator.next()).done) {
819
+ if (!isNode(step.value)) {
820
+ return false;
821
+ }
822
+ }
823
+ } else {
824
+ while (!(step = iterator.next()).done) {
825
+ var entry = step.value;
826
+ if (entry) {
827
+ if (!isNode(entry[1])) {
828
+ return false;
829
+ }
830
+ }
831
+ }
832
+ }
833
+ } else {
834
+ return false;
835
+ }
836
+ return true;
837
+ default:
838
+ return false;
839
+ }
840
+ }
841
+ function isSymbol(propType, propValue) {
842
+ if (propType === "symbol") {
843
+ return true;
844
+ }
845
+ if (!propValue) {
846
+ return false;
847
+ }
848
+ if (propValue["@@toStringTag"] === "Symbol") {
849
+ return true;
850
+ }
851
+ if (typeof Symbol === "function" && propValue instanceof Symbol) {
852
+ return true;
853
+ }
854
+ return false;
855
+ }
856
+ function getPropType(propValue) {
857
+ var propType = typeof propValue;
858
+ if (Array.isArray(propValue)) {
859
+ return "array";
860
+ }
861
+ if (propValue instanceof RegExp) {
862
+ return "object";
863
+ }
864
+ if (isSymbol(propType, propValue)) {
865
+ return "symbol";
866
+ }
867
+ return propType;
868
+ }
869
+ function getPreciseType(propValue) {
870
+ if (typeof propValue === "undefined" || propValue === null) {
871
+ return "" + propValue;
872
+ }
873
+ var propType = getPropType(propValue);
874
+ if (propType === "object") {
875
+ if (propValue instanceof Date) {
876
+ return "date";
877
+ } else if (propValue instanceof RegExp) {
878
+ return "regexp";
879
+ }
880
+ }
881
+ return propType;
882
+ }
883
+ function getPostfixForTypeWarning(value) {
884
+ var type = getPreciseType(value);
885
+ switch (type) {
886
+ case "array":
887
+ case "object":
888
+ return "an " + type;
889
+ case "boolean":
890
+ case "date":
891
+ case "regexp":
892
+ return "a " + type;
893
+ default:
894
+ return type;
895
+ }
896
+ }
897
+ function getClassName(propValue) {
898
+ if (!propValue.constructor || !propValue.constructor.name) {
899
+ return ANONYMOUS;
900
+ }
901
+ return propValue.constructor.name;
902
+ }
903
+ ReactPropTypes.checkPropTypes = checkPropTypes;
904
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
905
+ ReactPropTypes.PropTypes = ReactPropTypes;
906
+ return ReactPropTypes;
907
+ };
908
+ }
909
+ });
910
+
911
+ // ../../../../node_modules/prop-types/factoryWithThrowingShims.js
912
+ var require_factoryWithThrowingShims = __commonJS({
913
+ "../../../../node_modules/prop-types/factoryWithThrowingShims.js"(exports, module) {
914
+ "use strict";
915
+ var ReactPropTypesSecret = require_ReactPropTypesSecret();
916
+ function emptyFunction() {
917
+ }
918
+ function emptyFunctionWithReset() {
919
+ }
920
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
921
+ module.exports = function() {
922
+ function shim(props, propName, componentName, location, propFullName, secret) {
923
+ if (secret === ReactPropTypesSecret) {
924
+ return;
925
+ }
926
+ var err = new Error(
927
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
928
+ );
929
+ err.name = "Invariant Violation";
930
+ throw err;
931
+ }
932
+ ;
933
+ shim.isRequired = shim;
934
+ function getShim() {
935
+ return shim;
936
+ }
937
+ ;
938
+ var ReactPropTypes = {
939
+ array: shim,
940
+ bigint: shim,
941
+ bool: shim,
942
+ func: shim,
943
+ number: shim,
944
+ object: shim,
945
+ string: shim,
946
+ symbol: shim,
947
+ any: shim,
948
+ arrayOf: getShim,
949
+ element: shim,
950
+ elementType: shim,
951
+ instanceOf: getShim,
952
+ node: shim,
953
+ objectOf: getShim,
954
+ oneOf: getShim,
955
+ oneOfType: getShim,
956
+ shape: getShim,
957
+ exact: getShim,
958
+ checkPropTypes: emptyFunctionWithReset,
959
+ resetWarningCache: emptyFunction
960
+ };
961
+ ReactPropTypes.PropTypes = ReactPropTypes;
962
+ return ReactPropTypes;
963
+ };
964
+ }
965
+ });
966
+
967
+ // ../../../../node_modules/prop-types/index.js
968
+ var require_prop_types = __commonJS({
969
+ "../../../../node_modules/prop-types/index.js"(exports, module) {
970
+ "use strict";
971
+ if (process.env.NODE_ENV !== "production") {
972
+ ReactIs = require_react_is();
973
+ throwOnDirectAccess = true;
974
+ module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
975
+ } else {
976
+ module.exports = require_factoryWithThrowingShims()();
977
+ }
978
+ var ReactIs;
979
+ var throwOnDirectAccess;
980
+ }
981
+ });
982
+
983
+ // ../../../../node_modules/@mui/utils/unsupportedProp.js
984
+ var require_unsupportedProp = __commonJS({
985
+ "../../../../node_modules/@mui/utils/unsupportedProp.js"(exports) {
986
+ "use strict";
987
+ Object.defineProperty(exports, "__esModule", {
988
+ value: true
989
+ });
990
+ exports.default = unsupportedProp2;
991
+ function unsupportedProp2(props, propName, componentName, location, propFullName) {
992
+ if (process.env.NODE_ENV === "production") {
993
+ return null;
994
+ }
995
+ const propFullNameSafe = propFullName || propName;
996
+ if (typeof props[propName] !== "undefined") {
997
+ return new Error(`The prop \`${propFullNameSafe}\` is not supported. Please remove it.`);
998
+ }
999
+ return null;
1000
+ }
1001
+ }
1002
+ });
1003
+
1004
+ // ../../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js
1005
+ var require_interopRequireDefault = __commonJS({
1006
+ "../../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"(exports, module) {
1007
+ "use strict";
1008
+ function _interopRequireDefault(obj) {
1009
+ return obj && obj.__esModule ? obj : {
1010
+ "default": obj
1011
+ };
1012
+ }
1013
+ module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
1014
+ }
1015
+ });
1016
+
1017
+ // ../../../../node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js
1018
+ function chainPropTypes(propType1, propType2) {
1019
+ if (process.env.NODE_ENV === "production") {
1020
+ return () => null;
1021
+ }
1022
+ return function validate(...args) {
1023
+ return propType1(...args) || propType2(...args);
1024
+ };
1025
+ }
1026
+ var init_chainPropTypes = __esm({
1027
+ "../../../../node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js"() {
1028
+ "use strict";
1029
+ }
1030
+ });
1031
+
1032
+ // ../../../../node_modules/@mui/utils/esm/chainPropTypes/index.js
1033
+ var chainPropTypes_exports = {};
1034
+ __export(chainPropTypes_exports, {
1035
+ default: () => chainPropTypes
1036
+ });
1037
+ var init_chainPropTypes2 = __esm({
1038
+ "../../../../node_modules/@mui/utils/esm/chainPropTypes/index.js"() {
1039
+ "use strict";
1040
+ init_chainPropTypes();
1041
+ }
1042
+ });
1043
+
1044
+ // ../../../../node_modules/@mui/utils/elementTypeAcceptingRef.js
1045
+ var require_elementTypeAcceptingRef = __commonJS({
1046
+ "../../../../node_modules/@mui/utils/elementTypeAcceptingRef.js"(exports) {
1047
+ "use strict";
1048
+ var _interopRequireDefault = require_interopRequireDefault();
1049
+ Object.defineProperty(exports, "__esModule", {
1050
+ value: true
1051
+ });
1052
+ exports.default = void 0;
1053
+ var _propTypes = _interopRequireDefault(require_prop_types());
1054
+ var _chainPropTypes = _interopRequireDefault((init_chainPropTypes2(), __toCommonJS(chainPropTypes_exports)));
1055
+ function isClassComponent(elementType) {
1056
+ const {
1057
+ prototype = {}
1058
+ } = elementType;
1059
+ return Boolean(prototype.isReactComponent);
1060
+ }
1061
+ function elementTypeAcceptingRef2(props, propName, componentName, location, propFullName) {
1062
+ const propValue = props[propName];
1063
+ const safePropName = propFullName || propName;
1064
+ if (propValue == null || // When server-side rendering React doesn't warn either.
1065
+ // This is not an accurate check for SSR.
1066
+ // This is only in place for emotion compat.
1067
+ // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
1068
+ typeof window === "undefined") {
1069
+ return null;
1070
+ }
1071
+ let warningHint;
1072
+ if (typeof propValue === "function" && !isClassComponent(propValue)) {
1073
+ warningHint = "Did you accidentally provide a plain function component instead?";
1074
+ }
1075
+ if (warningHint !== void 0) {
1076
+ return new Error(`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. Expected an element type that can hold a ref. ${warningHint} For more information see https://mui.com/r/caveat-with-refs-guide`);
1077
+ }
1078
+ return null;
1079
+ }
1080
+ var _default = (0, _chainPropTypes.default)(_propTypes.default.elementType, elementTypeAcceptingRef2);
1081
+ exports.default = _default;
1082
+ }
1083
+ });
1084
+
1085
+ // src/CommentViewer.tsx
1086
+ import { Typography } from "@mui/material";
1087
+ import { FlexCol } from "@xylabs/react-flexbox";
1088
+ import { jsx } from "react/jsx-runtime";
1089
+ var CommentViewer = ({ comment, ...props }) => {
1090
+ return /* @__PURE__ */ jsx(FlexCol, { alignItems: "stretch", ...props, children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: comment.summary[0]?.text }) });
1091
+ };
1092
+
1093
+ // src/JsonViewerButton.tsx
1094
+ import { Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
1095
+ import { ButtonEx } from "@xylabs/react-button";
1096
+ import { lazy, Suspense, useState } from "react";
1097
+ import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
1098
+ var JsonView = lazy(() => import(
1099
+ /* webpackChunkName: "jsonView" */
1100
+ "react-json-view"
1101
+ ));
1102
+ var JsonViewerButton = ({ jsonViewProps, src, title, ...props }) => {
1103
+ const [open, setOpen] = useState(false);
1104
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1105
+ /* @__PURE__ */ jsx2(ButtonEx, { onClick: () => setOpen(!open), ...props, children: "JSON" }),
1106
+ /* @__PURE__ */ jsxs(Dialog, { open, onClose: () => setOpen(false), children: [
1107
+ title ? /* @__PURE__ */ jsx2(DialogTitle, { children: title }) : null,
1108
+ /* @__PURE__ */ jsx2(DialogContent, { children: /* @__PURE__ */ jsx2(Suspense, { fallback: /* @__PURE__ */ jsx2("div", {}), children: /* @__PURE__ */ jsx2(JsonView, { src, ...jsonViewProps }) }) }),
1109
+ /* @__PURE__ */ jsx2(DialogActions, { children: /* @__PURE__ */ jsx2(ButtonEx, { onClick: () => setOpen(false), children: "Close" }) })
1110
+ ] })
1111
+ ] });
1112
+ };
1113
+
1114
+ // src/ProjectTwoPanelReflectionViewer.tsx
1115
+ import { assertEx } from "@xylabs/assert";
1116
+
1117
+ // src/createLookup.ts
1118
+ var createLookup = (reflection) => {
1119
+ const lookup = {};
1120
+ reflection.children?.forEach((item) => lookup[item.id] = item);
1121
+ return lookup;
1122
+ };
1123
+
1124
+ // src/ReflectionViewer/ReflectionGroupViewer.tsx
1125
+ import { Typography as Typography4 } from "@mui/material";
1126
+ import { FlexCol as FlexCol3, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
1127
+ import { useEffect } from "react";
1128
+ import { useLocation } from "react-router-dom";
1129
+
1130
+ // src/resolveChildren.ts
1131
+ var resolveChildren = (reflection, lookup = {}) => {
1132
+ return reflection.children?.map((child) => {
1133
+ switch (typeof child) {
1134
+ case "object":
1135
+ return child;
1136
+ case "number": {
1137
+ const childObj = lookup[child];
1138
+ if (childObj === void 0) {
1139
+ throw Error(`Child Reference Not Found [${child}]`);
1140
+ }
1141
+ return childObj;
1142
+ }
1143
+ default:
1144
+ throw Error(`Invalid Child Type [${typeof child}, ${child}]`);
1145
+ }
1146
+ }) ?? [];
1147
+ };
1148
+
1149
+ // src/ReflectionViewer/ReflectionViewer.tsx
1150
+ import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
1151
+
1152
+ // src/ReflectionViewer/NameViewer.tsx
1153
+ import { Chip, Stack, Typography as Typography3 } from "@mui/material";
1154
+ import { FlexRow } from "@xylabs/react-flexbox";
1155
+
1156
+ // src/trimFlagLabel.ts
1157
+ var trimFlagLabel = (label) => {
1158
+ if (label.startsWith("is")) {
1159
+ return label.substring(2);
1160
+ }
1161
+ return label;
1162
+ };
1163
+
1164
+ // src/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.tsx
1165
+ import { Typography as Typography2 } from "@mui/material";
1166
+
1167
+ // src/ReflectionViewer/SomeTypeViewer/buildArrayString.tsx
1168
+ var buildArrayString = (typeObj, reflectionViewer, typeBuilder) => {
1169
+ const parts = [];
1170
+ const typeString = typeBuilder(typeObj.elementType, reflectionViewer);
1171
+ if (typeof typeString === "string") {
1172
+ parts.push(typeString);
1173
+ }
1174
+ parts.push("[]");
1175
+ return parts;
1176
+ };
1177
+
1178
+ // src/ReflectionViewer/SomeTypeViewer/buildIntersectionString.tsx
1179
+ var buildIntersectionString = (typeObj, reflectionViewer, typeBuilder) => {
1180
+ const parts = [];
1181
+ if (typeObj.types) {
1182
+ parts.push(
1183
+ typeObj.types.map((arg) => {
1184
+ return typeBuilder(arg, reflectionViewer);
1185
+ }).join(" & ")
1186
+ );
1187
+ }
1188
+ return parts;
1189
+ };
1190
+
1191
+ // src/ReflectionViewer/SomeTypeViewer/buildReferenceString.ts
1192
+ var buildReferenceString = (typeObj, reflectionViewer, typeBuilder) => {
1193
+ const parts = [];
1194
+ parts.push(typeObj.name);
1195
+ if (typeObj.typeArguments) {
1196
+ parts.push("<");
1197
+ parts.push(
1198
+ typeObj.typeArguments.map((arg) => {
1199
+ return typeBuilder(arg, reflectionViewer);
1200
+ }).join(", ")
1201
+ );
1202
+ parts.push(">");
1203
+ }
1204
+ return parts;
1205
+ };
1206
+
1207
+ // src/ReflectionViewer/SomeTypeViewer/buildReflectionString.tsx
1208
+ import { Fragment as Fragment2, jsx as jsx3 } from "react/jsx-runtime";
1209
+ var buildRelfectionString = (typeObj, reflectionViewer) => {
1210
+ if (typeObj.declaration) {
1211
+ return /* @__PURE__ */ jsx3(Fragment2, { children: reflectionViewer({ reflection: typeObj.declaration }) });
1212
+ }
1213
+ };
1214
+
1215
+ // src/ReflectionViewer/SomeTypeViewer/buildUnionString.tsx
1216
+ var buildUnionString = (typeObj, reflectionViewer, typeBuilder) => {
1217
+ const parts = [];
1218
+ if (typeObj.types) {
1219
+ parts.push(
1220
+ typeObj.types.map((arg) => {
1221
+ return typeBuilder(arg, reflectionViewer);
1222
+ }).join(" | ")
1223
+ );
1224
+ }
1225
+ return parts;
1226
+ };
1227
+
1228
+ // src/ReflectionViewer/SomeTypeViewer/buildTypeString.tsx
1229
+ var buildTypeString = (type, reflectionViewer) => {
1230
+ const someType = type;
1231
+ const parts = [];
1232
+ switch (someType.type) {
1233
+ case "intrinsic":
1234
+ parts.push(someType.name);
1235
+ break;
1236
+ case "intersection": {
1237
+ parts.push(...buildIntersectionString(someType, reflectionViewer, buildTypeString));
1238
+ break;
1239
+ }
1240
+ case "literal":
1241
+ parts.push(JSON.stringify(someType.value));
1242
+ break;
1243
+ case "array": {
1244
+ parts.push(...buildArrayString(someType, reflectionViewer, buildTypeString));
1245
+ break;
1246
+ }
1247
+ case "reference": {
1248
+ parts.push(...buildReferenceString(someType, reflectionViewer, buildTypeString));
1249
+ break;
1250
+ }
1251
+ case "union": {
1252
+ parts.push(...buildUnionString(someType, reflectionViewer, buildTypeString));
1253
+ break;
1254
+ }
1255
+ case "reflection": {
1256
+ return buildRelfectionString(someType, reflectionViewer);
1257
+ }
1258
+ default:
1259
+ parts.push("#");
1260
+ parts.push(someType.type);
1261
+ parts.push("#");
1262
+ break;
1263
+ }
1264
+ return parts.join("");
1265
+ };
1266
+
1267
+ // src/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.tsx
1268
+ import { Fragment as Fragment3, jsx as jsx4 } from "react/jsx-runtime";
1269
+ var SomeTypeViewer = ({ opacity = 0.5, reflection, reflectionViewer, ...props }) => {
1270
+ const typeReactNode = reflection.type ? buildTypeString(reflection.type, reflectionViewer) : "";
1271
+ if (typeof typeReactNode === "string") {
1272
+ return /* @__PURE__ */ jsx4(Typography2, { title: "SomeTypeViewer", style: { opacity }, ...props, children: typeReactNode });
1273
+ }
1274
+ return /* @__PURE__ */ jsx4(Fragment3, { children: typeReactNode });
1275
+ };
1276
+
1277
+ // src/ReflectionViewer/NameViewer.tsx
1278
+ import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
1279
+ var NameViewer = ({ reflectionViewer, variant, reflection, ...props }) => {
1280
+ return /* @__PURE__ */ jsxs2(FlexRow, { justifyContent: "flex-start", ...props, children: [
1281
+ /* @__PURE__ */ jsxs2(FlexRow, { marginRight: 1, children: [
1282
+ /* @__PURE__ */ jsxs2(Typography3, { variant, noWrap: true, children: [
1283
+ reflection.name,
1284
+ reflection.type ? /* @__PURE__ */ jsx5(Fragment4, { children: ":\xA0" }) : null
1285
+ ] }),
1286
+ /* @__PURE__ */ jsx5(SomeTypeViewer, { reflection, reflectionViewer })
1287
+ ] }),
1288
+ /* @__PURE__ */ jsxs2(Stack, { direction: "row", spacing: 1, children: [
1289
+ /* @__PURE__ */ jsx5(Chip, { size: "small", label: reflection.kind }),
1290
+ reflection.flags ? Object.entries(reflection.flags).map(([flag, value]) => {
1291
+ return value ? /* @__PURE__ */ jsx5(Chip, { size: "small", label: trimFlagLabel(flag), variant: "outlined" }, flag) : null;
1292
+ }) : null
1293
+ ] }),
1294
+ document && document?.location.hostname === "localhost" && /* @__PURE__ */ jsx5(JsonViewerButton, { jsonViewProps: { collapsed: 1 }, size: "small", variant: "contained", padding: 0, marginX: 1, src: reflection })
1295
+ ] });
1296
+ };
1297
+
1298
+ // src/ReflectionViewer/ReflectionViewer.tsx
1299
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
1300
+ var hide = (flags, hiddenFlags = []) => {
1301
+ let hide2 = false;
1302
+ hiddenFlags.map((hiddenFlag) => {
1303
+ if (flags?.[hiddenFlag]) {
1304
+ hide2 = true;
1305
+ }
1306
+ });
1307
+ return hide2;
1308
+ };
1309
+ var ReflectionViewer = ({ variant, nameViewer, children, reflection, hiddenFlags, ...props }) => {
1310
+ const someReflection = reflection;
1311
+ return hide(reflection?.flags, hiddenFlags) ? null : /* @__PURE__ */ jsxs3(FlexCol2, { title: "ReflectionViewer", alignItems: "stretch", ...props, children: [
1312
+ nameViewer === void 0 ? /* @__PURE__ */ jsx6(NameViewer, { marginY: 0.25, variant, reflection: someReflection, reflectionViewer: ReflectionViewer }) : nameViewer,
1313
+ reflection.comment ? /* @__PURE__ */ jsx6(CommentViewer, { comment: reflection.comment }) : null,
1314
+ someReflection.parameters?.map((parameter) => {
1315
+ return /* @__PURE__ */ jsx6(ReflectionViewer, { hiddenFlags, marginY: 0.25, marginX: 1, reflection: parameter }, parameter.id);
1316
+ }) ?? null,
1317
+ children
1318
+ ] });
1319
+ };
1320
+
1321
+ // src/ReflectionViewer/ReflectionGroupViewer.tsx
1322
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
1323
+ var ReflectionGroupViewer = ({
1324
+ autoscroll = false,
1325
+ children,
1326
+ hiddenFlags,
1327
+ group,
1328
+ lookup,
1329
+ renderer = ReflectionViewer,
1330
+ variant,
1331
+ ...props
1332
+ }) => {
1333
+ const hide2 = (flags, hiddenFlags2 = []) => {
1334
+ let hide3 = false;
1335
+ hiddenFlags2.map((hiddenFlag) => {
1336
+ if (flags?.[hiddenFlag]) {
1337
+ hide3 = true;
1338
+ }
1339
+ });
1340
+ return hide3;
1341
+ };
1342
+ const resolvedChildern = resolveChildren(group, lookup) ?? [];
1343
+ const visibleChildren = hiddenFlags ? resolvedChildern.reduce((acc, item) => {
1344
+ return acc + (hide2(item.flags, hiddenFlags) ? 0 : 1);
1345
+ }, 0) : 1;
1346
+ const { hash } = useLocation();
1347
+ useEffect(() => {
1348
+ if (hash && autoscroll) {
1349
+ document.querySelector(hash)?.scrollIntoView({ behavior: "smooth" });
1350
+ }
1351
+ }, [hash, autoscroll]);
1352
+ return visibleChildren > 0 ? /* @__PURE__ */ jsxs4(FlexCol3, { title: "ReflectionGroupViewer", ...props, children: [
1353
+ /* @__PURE__ */ jsxs4(FlexRow2, { marginY: 1, justifyContent: "flex-start", children: [
1354
+ /* @__PURE__ */ jsx7(Typography4, { variant, children: group.title }),
1355
+ /* @__PURE__ */ jsx7(
1356
+ JsonViewerButton,
1357
+ {
1358
+ jsonViewProps: { collapsed: 1 },
1359
+ size: "small",
1360
+ variant: "contained",
1361
+ padding: 0,
1362
+ marginX: 1,
1363
+ src: resolveChildren(group, lookup)
1364
+ }
1365
+ )
1366
+ ] }),
1367
+ resolveChildren(group, lookup).map((reflection) => {
1368
+ return reflection ? (
1369
+ // I wrap this in a div since React does not understand that they have keys using the Renderer
1370
+ /* @__PURE__ */ jsx7("div", { id: reflection.name, children: renderer({ hiddenFlags, lookup, margin: 1, padding: 1, reflection }) }, reflection.id)
1371
+ ) : null;
1372
+ }),
1373
+ children
1374
+ ] }) : null;
1375
+ };
1376
+
1377
+ // src/ReflectionViewer/Container.tsx
1378
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
1379
+ var ContainerReflectionViewer = ({
1380
+ children,
1381
+ reflection,
1382
+ hiddenFlags,
1383
+ itemRenderer = ReflectionViewer,
1384
+ ...props
1385
+ }) => {
1386
+ const lookup = createLookup(reflection);
1387
+ return /* @__PURE__ */ jsxs5(ReflectionViewer, { title: "ContainerReflectionViewer", sources: true, reflection, lookup, ...props, children: [
1388
+ reflection.groups?.map((group) => {
1389
+ return /* @__PURE__ */ jsx8(
1390
+ ReflectionGroupViewer,
1391
+ {
1392
+ margin: 1,
1393
+ lookup,
1394
+ renderer: itemRenderer,
1395
+ group,
1396
+ reflection,
1397
+ hiddenFlags,
1398
+ alignItems: "stretch"
1399
+ },
1400
+ group.title
1401
+ );
1402
+ }),
1403
+ children
1404
+ ] });
1405
+ };
1406
+
1407
+ // src/ReflectionViewer/Declaration.tsx
1408
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
1409
+ var DeclarationReflectionViewer = ({ reflection, hiddenFlags, ...props }) => {
1410
+ const safeSignatures = (signatures) => {
1411
+ return Array.isArray(signatures) ? signatures : signatures ? [signatures] : void 0;
1412
+ };
1413
+ return /* @__PURE__ */ jsxs6(
1414
+ ReflectionViewer,
1415
+ {
1416
+ nameViewer: reflection.signatures || reflection.getSignature || reflection.setSignature ? null : void 0,
1417
+ title: "DeclarationReflectionViewer",
1418
+ hiddenFlags,
1419
+ reflection,
1420
+ ...props,
1421
+ children: [
1422
+ reflection.signatures?.map((signature) => {
1423
+ return /* @__PURE__ */ jsx9(ReflectionViewer, { hiddenFlags, reflection: signature }, signature.id);
1424
+ }),
1425
+ safeSignatures(reflection.getSignature)?.map((signature) => {
1426
+ return /* @__PURE__ */ jsx9(ReflectionViewer, { marginX: 1, hiddenFlags, reflection: signature }, signature.id);
1427
+ }),
1428
+ safeSignatures(reflection.setSignature)?.map((signature) => {
1429
+ return /* @__PURE__ */ jsx9(ReflectionViewer, { marginX: 1, hiddenFlags, reflection: signature }, signature.id);
1430
+ })
1431
+ ]
1432
+ }
1433
+ );
1434
+ };
1435
+
1436
+ // src/ReflectionViewer/DeclarationContainer.tsx
1437
+ import { useTheme } from "@mui/material";
1438
+ import { useLocation as useLocation2 } from "react-router-dom";
1439
+ import { jsx as jsx10 } from "react/jsx-runtime";
1440
+ var DeclarationContainerReflectionViewer = ({
1441
+ reflection,
1442
+ lookup,
1443
+ itemRenderer = DeclarationReflectionViewer,
1444
+ ...props
1445
+ }) => {
1446
+ const { hash } = useLocation2();
1447
+ const theme = useTheme();
1448
+ return /* @__PURE__ */ jsx10(
1449
+ ContainerReflectionViewer,
1450
+ {
1451
+ title: "DeclarationContainerReflectionViewer",
1452
+ paper: hash.substring(1) === reflection.name,
1453
+ bgcolor: hash.substring(1) === reflection.name ? theme.palette.background.default : void 0,
1454
+ lookup,
1455
+ itemRenderer,
1456
+ reflection,
1457
+ ...props
1458
+ }
1459
+ );
1460
+ };
1461
+
1462
+ // src/ReflectionViewer/Project.tsx
1463
+ import { useMemo } from "react";
1464
+ import { jsx as jsx11 } from "react/jsx-runtime";
1465
+ var ProjectReflectionViewer = ({
1466
+ reflection,
1467
+ hiddenFlags,
1468
+ itemRenderer = ReflectionViewer,
1469
+ ...props
1470
+ }) => {
1471
+ const lookup = useMemo(() => createLookup(reflection), [reflection]);
1472
+ return /* @__PURE__ */ jsx11(ReflectionViewer, { title: "ProjectReflectionViewer", hiddenFlags, reflection, ...props, children: useMemo(() => {
1473
+ return reflection.groups?.map((group) => {
1474
+ return /* @__PURE__ */ jsx11(
1475
+ ReflectionGroupViewer,
1476
+ {
1477
+ autoscroll: true,
1478
+ variant: "h6",
1479
+ lookup,
1480
+ renderer: itemRenderer,
1481
+ group,
1482
+ reflection,
1483
+ alignItems: "stretch",
1484
+ hiddenFlags
1485
+ },
1486
+ group.title
1487
+ );
1488
+ });
1489
+ }, [lookup, reflection, hiddenFlags, itemRenderer]) });
1490
+ };
1491
+
1492
+ // src/TwoPanelReflectionViewer.tsx
1493
+ import { Search } from "@mui/icons-material";
1494
+ import { TextField, useTheme as useTheme3 } from "@mui/material";
1495
+ import { FlexCol as FlexCol6, FlexGrowCol, FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
1496
+ import { useMemo as useMemo5, useState as useState7 } from "react";
1497
+
1498
+ // src/TreeViewer/Reflection.tsx
1499
+ import { Add, Remove } from "@mui/icons-material";
1500
+ import { Typography as Typography5 } from "@mui/material";
1501
+
1502
+ // ../../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
1503
+ function _objectWithoutPropertiesLoose(source, excluded) {
1504
+ if (source == null)
1505
+ return {};
1506
+ var target = {};
1507
+ var sourceKeys = Object.keys(source);
1508
+ var key, i;
1509
+ for (i = 0; i < sourceKeys.length; i++) {
1510
+ key = sourceKeys[i];
1511
+ if (excluded.indexOf(key) >= 0)
1512
+ continue;
1513
+ target[key] = source[key];
1514
+ }
1515
+ return target;
1516
+ }
1517
+
1518
+ // ../../../../node_modules/@babel/runtime/helpers/esm/extends.js
1519
+ function _extends() {
1520
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
1521
+ for (var i = 1; i < arguments.length; i++) {
1522
+ var source = arguments[i];
1523
+ for (var key in source) {
1524
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
1525
+ target[key] = source[key];
1526
+ }
1527
+ }
1528
+ }
1529
+ return target;
1530
+ };
1531
+ return _extends.apply(this, arguments);
1532
+ }
1533
+
1534
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/TreeItem.js
1535
+ var import_prop_types3 = __toESM(require_prop_types());
1536
+ import * as React9 from "react";
1537
+
1538
+ // ../../../../node_modules/clsx/dist/clsx.mjs
1539
+ function r(e) {
1540
+ var t, f, n = "";
1541
+ if ("string" == typeof e || "number" == typeof e)
1542
+ n += e;
1543
+ else if ("object" == typeof e)
1544
+ if (Array.isArray(e))
1545
+ for (t = 0; t < e.length; t++)
1546
+ e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
1547
+ else
1548
+ for (t in e)
1549
+ e[t] && (n && (n += " "), n += t);
1550
+ return n;
1551
+ }
1552
+ function clsx() {
1553
+ for (var e, t, f = 0, n = ""; f < arguments.length; )
1554
+ (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
1555
+ return n;
1556
+ }
1557
+ var clsx_default = clsx;
1558
+
1559
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/TreeItem.js
1560
+ import Collapse from "@mui/material/Collapse";
1561
+ import { alpha, styled, useThemeProps } from "@mui/material/styles";
1562
+
1563
+ // ../../../../node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js
1564
+ function ownerDocument(node) {
1565
+ return node && node.ownerDocument || document;
1566
+ }
1567
+
1568
+ // ../../../../node_modules/@mui/utils/esm/useForkRef/useForkRef.js
1569
+ import * as React from "react";
1570
+
1571
+ // ../../../../node_modules/@mui/utils/esm/setRef.js
1572
+ function setRef(ref, value) {
1573
+ if (typeof ref === "function") {
1574
+ ref(value);
1575
+ } else if (ref) {
1576
+ ref.current = value;
1577
+ }
1578
+ }
1579
+
1580
+ // ../../../../node_modules/@mui/utils/esm/useForkRef/useForkRef.js
1581
+ function useForkRef(...refs) {
1582
+ return React.useMemo(() => {
1583
+ if (refs.every((ref) => ref == null)) {
1584
+ return null;
1585
+ }
1586
+ return (instance) => {
1587
+ refs.forEach((ref) => {
1588
+ setRef(ref, instance);
1589
+ });
1590
+ };
1591
+ }, refs);
1592
+ }
1593
+
1594
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/TreeItem.js
1595
+ var import_unsupportedProp = __toESM(require_unsupportedProp());
1596
+ var import_elementTypeAcceptingRef = __toESM(require_elementTypeAcceptingRef());
1597
+
1598
+ // ../../../../node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js
1599
+ import * as React2 from "react";
1600
+ var useEnhancedEffect = typeof window !== "undefined" ? React2.useLayoutEffect : React2.useEffect;
1601
+ var useEnhancedEffect_default = useEnhancedEffect;
1602
+
1603
+ // ../../../../node_modules/@mui/utils/esm/useId/useId.js
1604
+ import * as React3 from "react";
1605
+ var globalId = 0;
1606
+ function useGlobalId(idOverride) {
1607
+ const [defaultId, setDefaultId] = React3.useState(idOverride);
1608
+ const id = idOverride || defaultId;
1609
+ React3.useEffect(() => {
1610
+ if (defaultId == null) {
1611
+ globalId += 1;
1612
+ setDefaultId(`mui-${globalId}`);
1613
+ }
1614
+ }, [defaultId]);
1615
+ return id;
1616
+ }
1617
+ var maybeReactUseId = React3["useId".toString()];
1618
+ function useId(idOverride) {
1619
+ if (maybeReactUseId !== void 0) {
1620
+ const reactId = maybeReactUseId();
1621
+ return idOverride != null ? idOverride : reactId;
1622
+ }
1623
+ return useGlobalId(idOverride);
1624
+ }
1625
+
1626
+ // ../../../../node_modules/@mui/utils/esm/useControlled/useControlled.js
1627
+ import * as React4 from "react";
1628
+ function useControlled({
1629
+ controlled,
1630
+ default: defaultProp,
1631
+ name,
1632
+ state = "value"
1633
+ }) {
1634
+ const {
1635
+ current: isControlled
1636
+ } = React4.useRef(controlled !== void 0);
1637
+ const [valueState, setValue] = React4.useState(defaultProp);
1638
+ const value = isControlled ? controlled : valueState;
1639
+ if (process.env.NODE_ENV !== "production") {
1640
+ React4.useEffect(() => {
1641
+ if (isControlled !== (controlled !== void 0)) {
1642
+ console.error([`MUI: A component is changing the ${isControlled ? "" : "un"}controlled ${state} state of ${name} to be ${isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${name} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join("\n"));
1643
+ }
1644
+ }, [state, name, controlled]);
1645
+ const {
1646
+ current: defaultValue
1647
+ } = React4.useRef(defaultProp);
1648
+ React4.useEffect(() => {
1649
+ if (!isControlled && defaultValue !== defaultProp) {
1650
+ console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. To suppress this warning opt to use a controlled ${name}.`].join("\n"));
1651
+ }
1652
+ }, [JSON.stringify(defaultProp)]);
1653
+ }
1654
+ const setValueIfUncontrolled = React4.useCallback((newValue) => {
1655
+ if (!isControlled) {
1656
+ setValue(newValue);
1657
+ }
1658
+ }, []);
1659
+ return [value, setValueIfUncontrolled];
1660
+ }
1661
+
1662
+ // ../../../../node_modules/@mui/utils/esm/composeClasses/composeClasses.js
1663
+ function composeClasses(slots, getUtilityClass, classes = void 0) {
1664
+ const output = {};
1665
+ Object.keys(slots).forEach(
1666
+ // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
1667
+ // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
1668
+ (slot) => {
1669
+ output[slot] = slots[slot].reduce((acc, key) => {
1670
+ if (key) {
1671
+ const utilityClass = getUtilityClass(key);
1672
+ if (utilityClass !== "") {
1673
+ acc.push(utilityClass);
1674
+ }
1675
+ if (classes && classes[key]) {
1676
+ acc.push(classes[key]);
1677
+ }
1678
+ }
1679
+ return acc;
1680
+ }, []).join(" ");
1681
+ }
1682
+ );
1683
+ return output;
1684
+ }
1685
+
1686
+ // ../../../../node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js
1687
+ var defaultGenerator = (componentName) => componentName;
1688
+ var createClassNameGenerator = () => {
1689
+ let generate = defaultGenerator;
1690
+ return {
1691
+ configure(generator) {
1692
+ generate = generator;
1693
+ },
1694
+ generate(componentName) {
1695
+ return generate(componentName);
1696
+ },
1697
+ reset() {
1698
+ generate = defaultGenerator;
1699
+ }
1700
+ };
1701
+ };
1702
+ var ClassNameGenerator = createClassNameGenerator();
1703
+ var ClassNameGenerator_default = ClassNameGenerator;
1704
+
1705
+ // ../../../../node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js
1706
+ var globalStateClassesMapping = {
1707
+ active: "active",
1708
+ checked: "checked",
1709
+ completed: "completed",
1710
+ disabled: "disabled",
1711
+ error: "error",
1712
+ expanded: "expanded",
1713
+ focused: "focused",
1714
+ focusVisible: "focusVisible",
1715
+ open: "open",
1716
+ readOnly: "readOnly",
1717
+ required: "required",
1718
+ selected: "selected"
1719
+ };
1720
+ function generateUtilityClass(componentName, slot, globalStatePrefix = "Mui") {
1721
+ const globalStateClass = globalStateClassesMapping[slot];
1722
+ return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator_default.generate(componentName)}-${slot}`;
1723
+ }
1724
+
1725
+ // ../../../../node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js
1726
+ function generateUtilityClasses(componentName, slots, globalStatePrefix = "Mui") {
1727
+ const result = {};
1728
+ slots.forEach((slot) => {
1729
+ result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
1730
+ });
1731
+ return result;
1732
+ }
1733
+
1734
+ // ../../../../node_modules/@mui/x-tree-view/TreeView/TreeViewContext.js
1735
+ import * as React5 from "react";
1736
+ var TreeViewContext = /* @__PURE__ */ React5.createContext({
1737
+ registerNode: () => {
1738
+ },
1739
+ unregisterNode: () => {
1740
+ },
1741
+ isFocused: () => false,
1742
+ isSelected: () => false,
1743
+ isExpanded: () => false,
1744
+ isExpandable: () => false,
1745
+ isDisabled: () => false,
1746
+ mapFirstChar: () => {
1747
+ },
1748
+ unMapFirstChar: () => {
1749
+ },
1750
+ focus: () => {
1751
+ },
1752
+ toggleExpansion: () => {
1753
+ },
1754
+ selectNode: () => {
1755
+ },
1756
+ selectRange: () => {
1757
+ },
1758
+ multiSelect: false,
1759
+ disabledItemsFocusable: false,
1760
+ treeId: void 0,
1761
+ icons: {
1762
+ defaultCollapseIcon: null,
1763
+ defaultExpandIcon: null,
1764
+ defaultParentIcon: null,
1765
+ defaultEndIcon: null
1766
+ }
1767
+ });
1768
+ if (process.env.NODE_ENV !== "production") {
1769
+ TreeViewContext.displayName = "TreeViewContext";
1770
+ }
1771
+
1772
+ // ../../../../node_modules/@mui/x-tree-view/TreeView/descendants.js
1773
+ var import_prop_types = __toESM(require_prop_types());
1774
+ import * as React6 from "react";
1775
+ import { jsx as _jsx } from "react/jsx-runtime";
1776
+ var _excluded = ["element"];
1777
+ function findIndex(array, comp) {
1778
+ for (let i = 0; i < array.length; i += 1) {
1779
+ if (comp(array[i])) {
1780
+ return i;
1781
+ }
1782
+ }
1783
+ return -1;
1784
+ }
1785
+ function binaryFindElement(array, element) {
1786
+ let start = 0;
1787
+ let end = array.length - 1;
1788
+ while (start <= end) {
1789
+ const middle = Math.floor((start + end) / 2);
1790
+ if (array[middle].element === element) {
1791
+ return middle;
1792
+ }
1793
+ if (array[middle].element.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_PRECEDING) {
1794
+ end = middle - 1;
1795
+ } else {
1796
+ start = middle + 1;
1797
+ }
1798
+ }
1799
+ return start;
1800
+ }
1801
+ var DescendantContext = /* @__PURE__ */ React6.createContext({});
1802
+ if (process.env.NODE_ENV !== "production") {
1803
+ DescendantContext.displayName = "DescendantContext";
1804
+ }
1805
+ function usePrevious(value) {
1806
+ const ref = React6.useRef(null);
1807
+ React6.useEffect(() => {
1808
+ ref.current = value;
1809
+ }, [value]);
1810
+ return ref.current;
1811
+ }
1812
+ var noop = () => {
1813
+ };
1814
+ function useDescendant(descendant) {
1815
+ const [, forceUpdate] = React6.useState();
1816
+ const {
1817
+ registerDescendant = noop,
1818
+ unregisterDescendant = noop,
1819
+ descendants = [],
1820
+ parentId = null
1821
+ } = React6.useContext(DescendantContext);
1822
+ const index = findIndex(descendants, (item) => item.element === descendant.element);
1823
+ const previousDescendants = usePrevious(descendants);
1824
+ const someDescendantsHaveChanged = descendants.some((newDescendant, position) => {
1825
+ return previousDescendants && previousDescendants[position] && previousDescendants[position].element !== newDescendant.element;
1826
+ });
1827
+ useEnhancedEffect_default(() => {
1828
+ if (descendant.element) {
1829
+ registerDescendant(_extends({}, descendant, {
1830
+ index
1831
+ }));
1832
+ return () => {
1833
+ unregisterDescendant(descendant.element);
1834
+ };
1835
+ }
1836
+ forceUpdate({});
1837
+ return void 0;
1838
+ }, [registerDescendant, unregisterDescendant, index, someDescendantsHaveChanged, descendant]);
1839
+ return {
1840
+ parentId,
1841
+ index
1842
+ };
1843
+ }
1844
+ function DescendantProvider(props) {
1845
+ const {
1846
+ children,
1847
+ id
1848
+ } = props;
1849
+ const [items, set] = React6.useState([]);
1850
+ const registerDescendant = React6.useCallback((_ref) => {
1851
+ let {
1852
+ element
1853
+ } = _ref, other = _objectWithoutPropertiesLoose(_ref, _excluded);
1854
+ set((oldItems) => {
1855
+ if (oldItems.length === 0) {
1856
+ return [_extends({}, other, {
1857
+ element,
1858
+ index: 0
1859
+ })];
1860
+ }
1861
+ const index = binaryFindElement(oldItems, element);
1862
+ let newItems;
1863
+ if (oldItems[index] && oldItems[index].element === element) {
1864
+ newItems = oldItems;
1865
+ } else {
1866
+ const newItem = _extends({}, other, {
1867
+ element,
1868
+ index
1869
+ });
1870
+ newItems = oldItems.slice();
1871
+ newItems.splice(index, 0, newItem);
1872
+ }
1873
+ newItems.forEach((item, position) => {
1874
+ item.index = position;
1875
+ });
1876
+ return newItems;
1877
+ });
1878
+ }, []);
1879
+ const unregisterDescendant = React6.useCallback((element) => {
1880
+ set((oldItems) => oldItems.filter((item) => element !== item.element));
1881
+ }, []);
1882
+ const value = React6.useMemo(() => ({
1883
+ descendants: items,
1884
+ registerDescendant,
1885
+ unregisterDescendant,
1886
+ parentId: id
1887
+ }), [items, registerDescendant, unregisterDescendant, id]);
1888
+ return /* @__PURE__ */ _jsx(DescendantContext.Provider, {
1889
+ value,
1890
+ children
1891
+ });
1892
+ }
1893
+ process.env.NODE_ENV !== "production" ? DescendantProvider.propTypes = {
1894
+ children: import_prop_types.default.node,
1895
+ id: import_prop_types.default.string
1896
+ } : void 0;
1897
+
1898
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/TreeItemContent.js
1899
+ var import_prop_types2 = __toESM(require_prop_types());
1900
+ import * as React8 from "react";
1901
+
1902
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/useTreeItem.js
1903
+ import * as React7 from "react";
1904
+ function useTreeItem(nodeId) {
1905
+ const {
1906
+ focus,
1907
+ isExpanded,
1908
+ isExpandable,
1909
+ isFocused,
1910
+ isDisabled,
1911
+ isSelected,
1912
+ multiSelect,
1913
+ selectNode,
1914
+ selectRange,
1915
+ toggleExpansion
1916
+ } = React7.useContext(TreeViewContext);
1917
+ const expandable = isExpandable ? isExpandable(nodeId) : false;
1918
+ const expanded = isExpanded ? isExpanded(nodeId) : false;
1919
+ const focused = isFocused ? isFocused(nodeId) : false;
1920
+ const disabled = isDisabled ? isDisabled(nodeId) : false;
1921
+ const selected = isSelected ? isSelected(nodeId) : false;
1922
+ const handleExpansion = (event) => {
1923
+ if (!disabled) {
1924
+ if (!focused) {
1925
+ focus(event, nodeId);
1926
+ }
1927
+ const multiple = multiSelect && (event.shiftKey || event.ctrlKey || event.metaKey);
1928
+ if (expandable && !(multiple && isExpanded(nodeId))) {
1929
+ toggleExpansion(event, nodeId);
1930
+ }
1931
+ }
1932
+ };
1933
+ const handleSelection = (event) => {
1934
+ if (!disabled) {
1935
+ if (!focused) {
1936
+ focus(event, nodeId);
1937
+ }
1938
+ const multiple = multiSelect && (event.shiftKey || event.ctrlKey || event.metaKey);
1939
+ if (multiple) {
1940
+ if (event.shiftKey) {
1941
+ selectRange(event, {
1942
+ end: nodeId
1943
+ });
1944
+ } else {
1945
+ selectNode(event, nodeId, true);
1946
+ }
1947
+ } else {
1948
+ selectNode(event, nodeId);
1949
+ }
1950
+ }
1951
+ };
1952
+ const preventSelection = (event) => {
1953
+ if (event.shiftKey || event.ctrlKey || event.metaKey || disabled) {
1954
+ event.preventDefault();
1955
+ }
1956
+ };
1957
+ return {
1958
+ disabled,
1959
+ expanded,
1960
+ selected,
1961
+ focused,
1962
+ handleExpansion,
1963
+ handleSelection,
1964
+ preventSelection
1965
+ };
1966
+ }
1967
+
1968
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/TreeItemContent.js
1969
+ import { jsx as _jsx2 } from "react/jsx-runtime";
1970
+ import { jsxs as _jsxs } from "react/jsx-runtime";
1971
+ var _excluded2 = ["classes", "className", "displayIcon", "expansionIcon", "icon", "label", "nodeId", "onClick", "onMouseDown"];
1972
+ var TreeItemContent = /* @__PURE__ */ React8.forwardRef(function TreeItemContent2(props, ref) {
1973
+ const {
1974
+ classes,
1975
+ className,
1976
+ displayIcon,
1977
+ expansionIcon,
1978
+ icon: iconProp,
1979
+ label,
1980
+ nodeId,
1981
+ onClick,
1982
+ onMouseDown
1983
+ } = props, other = _objectWithoutPropertiesLoose(props, _excluded2);
1984
+ const {
1985
+ disabled,
1986
+ expanded,
1987
+ selected,
1988
+ focused,
1989
+ handleExpansion,
1990
+ handleSelection,
1991
+ preventSelection
1992
+ } = useTreeItem(nodeId);
1993
+ const icon = iconProp || expansionIcon || displayIcon;
1994
+ const handleMouseDown = (event) => {
1995
+ preventSelection(event);
1996
+ if (onMouseDown) {
1997
+ onMouseDown(event);
1998
+ }
1999
+ };
2000
+ const handleClick = (event) => {
2001
+ handleExpansion(event);
2002
+ handleSelection(event);
2003
+ if (onClick) {
2004
+ onClick(event);
2005
+ }
2006
+ };
2007
+ return (
2008
+ /* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
2009
+ /* @__PURE__ */ _jsxs("div", _extends({}, other, {
2010
+ className: clsx_default(className, classes.root, expanded && classes.expanded, selected && classes.selected, focused && classes.focused, disabled && classes.disabled),
2011
+ onClick: handleClick,
2012
+ onMouseDown: handleMouseDown,
2013
+ ref,
2014
+ children: [/* @__PURE__ */ _jsx2("div", {
2015
+ className: classes.iconContainer,
2016
+ children: icon
2017
+ }), /* @__PURE__ */ _jsx2("div", {
2018
+ className: classes.label,
2019
+ children: label
2020
+ })]
2021
+ }))
2022
+ );
2023
+ });
2024
+ process.env.NODE_ENV !== "production" ? TreeItemContent.propTypes = {
2025
+ // ----------------------------- Warning --------------------------------
2026
+ // | These PropTypes are generated from the TypeScript type definitions |
2027
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
2028
+ // ----------------------------------------------------------------------
2029
+ /**
2030
+ * Override or extend the styles applied to the component.
2031
+ */
2032
+ classes: import_prop_types2.default.object.isRequired,
2033
+ /**
2034
+ * className applied to the root element.
2035
+ */
2036
+ className: import_prop_types2.default.string,
2037
+ /**
2038
+ * The icon to display next to the tree node's label. Either a parent or end icon.
2039
+ */
2040
+ displayIcon: import_prop_types2.default.node,
2041
+ /**
2042
+ * The icon to display next to the tree node's label. Either an expansion or collapse icon.
2043
+ */
2044
+ expansionIcon: import_prop_types2.default.node,
2045
+ /**
2046
+ * The icon to display next to the tree node's label.
2047
+ */
2048
+ icon: import_prop_types2.default.node,
2049
+ /**
2050
+ * The tree node label.
2051
+ */
2052
+ label: import_prop_types2.default.node,
2053
+ /**
2054
+ * The id of the node.
2055
+ */
2056
+ nodeId: import_prop_types2.default.string.isRequired
2057
+ } : void 0;
2058
+
2059
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/treeItemClasses.js
2060
+ function getTreeItemUtilityClass(slot) {
2061
+ return generateUtilityClass("MuiTreeItem", slot);
2062
+ }
2063
+ var treeItemClasses = generateUtilityClasses("MuiTreeItem", ["root", "group", "content", "expanded", "selected", "focused", "disabled", "iconContainer", "label"]);
2064
+
2065
+ // ../../../../node_modules/@mui/x-tree-view/TreeItem/TreeItem.js
2066
+ import { jsx as _jsx3 } from "react/jsx-runtime";
2067
+ import { jsxs as _jsxs2 } from "react/jsx-runtime";
2068
+ var _excluded3 = ["children", "className", "collapseIcon", "ContentComponent", "ContentProps", "endIcon", "expandIcon", "disabled", "icon", "id", "label", "nodeId", "onClick", "onMouseDown", "TransitionComponent", "TransitionProps"];
2069
+ var useUtilityClasses = (ownerState) => {
2070
+ const {
2071
+ classes
2072
+ } = ownerState;
2073
+ const slots = {
2074
+ root: ["root"],
2075
+ content: ["content"],
2076
+ expanded: ["expanded"],
2077
+ selected: ["selected"],
2078
+ focused: ["focused"],
2079
+ disabled: ["disabled"],
2080
+ iconContainer: ["iconContainer"],
2081
+ label: ["label"],
2082
+ group: ["group"]
2083
+ };
2084
+ return composeClasses(slots, getTreeItemUtilityClass, classes);
2085
+ };
2086
+ var TreeItemRoot = styled("li", {
2087
+ name: "MuiTreeItem",
2088
+ slot: "Root",
2089
+ overridesResolver: (props, styles) => styles.root
2090
+ })({
2091
+ listStyle: "none",
2092
+ margin: 0,
2093
+ padding: 0,
2094
+ outline: 0
2095
+ });
2096
+ var StyledTreeItemContent = styled(TreeItemContent, {
2097
+ name: "MuiTreeItem",
2098
+ slot: "Content",
2099
+ overridesResolver: (props, styles) => {
2100
+ return [styles.content, styles.iconContainer && {
2101
+ [`& .${treeItemClasses.iconContainer}`]: styles.iconContainer
2102
+ }, styles.label && {
2103
+ [`& .${treeItemClasses.label}`]: styles.label
2104
+ }];
2105
+ }
2106
+ })(({
2107
+ theme
2108
+ }) => ({
2109
+ padding: "0 8px",
2110
+ width: "100%",
2111
+ boxSizing: "border-box",
2112
+ // prevent width + padding to overflow
2113
+ display: "flex",
2114
+ alignItems: "center",
2115
+ cursor: "pointer",
2116
+ WebkitTapHighlightColor: "transparent",
2117
+ "&:hover": {
2118
+ backgroundColor: (theme.vars || theme).palette.action.hover,
2119
+ // Reset on touch devices, it doesn't add specificity
2120
+ "@media (hover: none)": {
2121
+ backgroundColor: "transparent"
2122
+ }
2123
+ },
2124
+ [`&.${treeItemClasses.disabled}`]: {
2125
+ opacity: (theme.vars || theme).palette.action.disabledOpacity,
2126
+ backgroundColor: "transparent"
2127
+ },
2128
+ [`&.${treeItemClasses.focused}`]: {
2129
+ backgroundColor: (theme.vars || theme).palette.action.focus
2130
+ },
2131
+ [`&.${treeItemClasses.selected}`]: {
2132
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
2133
+ "&:hover": {
2134
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
2135
+ // Reset on touch devices, it doesn't add specificity
2136
+ "@media (hover: none)": {
2137
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
2138
+ }
2139
+ },
2140
+ [`&.${treeItemClasses.focused}`]: {
2141
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
2142
+ }
2143
+ },
2144
+ [`& .${treeItemClasses.iconContainer}`]: {
2145
+ marginRight: 4,
2146
+ width: 15,
2147
+ display: "flex",
2148
+ flexShrink: 0,
2149
+ justifyContent: "center",
2150
+ "& svg": {
2151
+ fontSize: 18
2152
+ }
2153
+ },
2154
+ [`& .${treeItemClasses.label}`]: _extends({
2155
+ paddingLeft: 4,
2156
+ width: "100%",
2157
+ boxSizing: "border-box",
2158
+ // prevent width + padding to overflow
2159
+ // fixes overflow - see https://github.com/mui/material-ui/issues/27372
2160
+ minWidth: 0,
2161
+ position: "relative"
2162
+ }, theme.typography.body1)
2163
+ }));
2164
+ var TreeItemGroup = styled(Collapse, {
2165
+ name: "MuiTreeItem",
2166
+ slot: "Group",
2167
+ overridesResolver: (props, styles) => styles.group
2168
+ })({
2169
+ margin: 0,
2170
+ padding: 0,
2171
+ marginLeft: 17
2172
+ });
2173
+ var TreeItem = /* @__PURE__ */ React9.forwardRef(function TreeItem2(inProps, ref) {
2174
+ const props = useThemeProps({
2175
+ props: inProps,
2176
+ name: "MuiTreeItem"
2177
+ });
2178
+ const {
2179
+ children,
2180
+ className,
2181
+ collapseIcon,
2182
+ ContentComponent = TreeItemContent,
2183
+ ContentProps,
2184
+ endIcon,
2185
+ expandIcon,
2186
+ disabled: disabledProp,
2187
+ icon,
2188
+ id: idProp,
2189
+ label,
2190
+ nodeId,
2191
+ onClick,
2192
+ onMouseDown,
2193
+ TransitionComponent = Collapse,
2194
+ TransitionProps
2195
+ } = props, other = _objectWithoutPropertiesLoose(props, _excluded3);
2196
+ const {
2197
+ icons: contextIcons,
2198
+ focus,
2199
+ isExpanded,
2200
+ isFocused,
2201
+ isSelected,
2202
+ isDisabled,
2203
+ multiSelect,
2204
+ disabledItemsFocusable,
2205
+ mapFirstChar,
2206
+ unMapFirstChar,
2207
+ registerNode,
2208
+ unregisterNode,
2209
+ treeId
2210
+ } = React9.useContext(TreeViewContext);
2211
+ let id;
2212
+ if (idProp != null) {
2213
+ id = idProp;
2214
+ } else if (treeId && nodeId) {
2215
+ id = `${treeId}-${nodeId}`;
2216
+ }
2217
+ const [treeItemElement, setTreeItemElement] = React9.useState(null);
2218
+ const contentRef = React9.useRef(null);
2219
+ const handleRef = useForkRef(setTreeItemElement, ref);
2220
+ const descendant = React9.useMemo(() => ({
2221
+ element: treeItemElement,
2222
+ id: nodeId
2223
+ }), [nodeId, treeItemElement]);
2224
+ const {
2225
+ index,
2226
+ parentId
2227
+ } = useDescendant(descendant);
2228
+ const expandable = Boolean(Array.isArray(children) ? children.length : children);
2229
+ const expanded = isExpanded ? isExpanded(nodeId) : false;
2230
+ const focused = isFocused ? isFocused(nodeId) : false;
2231
+ const selected = isSelected ? isSelected(nodeId) : false;
2232
+ const disabled = isDisabled ? isDisabled(nodeId) : false;
2233
+ const ownerState = _extends({}, props, {
2234
+ expanded,
2235
+ focused,
2236
+ selected,
2237
+ disabled
2238
+ });
2239
+ const classes = useUtilityClasses(ownerState);
2240
+ let displayIcon;
2241
+ let expansionIcon;
2242
+ if (expandable) {
2243
+ if (!expanded) {
2244
+ expansionIcon = expandIcon || contextIcons.defaultExpandIcon;
2245
+ } else {
2246
+ expansionIcon = collapseIcon || contextIcons.defaultCollapseIcon;
2247
+ }
2248
+ }
2249
+ if (expandable) {
2250
+ displayIcon = contextIcons.defaultParentIcon;
2251
+ } else {
2252
+ displayIcon = endIcon || contextIcons.defaultEndIcon;
2253
+ }
2254
+ React9.useEffect(() => {
2255
+ if (registerNode && unregisterNode && index !== -1) {
2256
+ registerNode({
2257
+ id: nodeId,
2258
+ idAttribute: id,
2259
+ index,
2260
+ parentId,
2261
+ expandable,
2262
+ disabled: disabledProp
2263
+ });
2264
+ return () => {
2265
+ unregisterNode(nodeId);
2266
+ };
2267
+ }
2268
+ return void 0;
2269
+ }, [registerNode, unregisterNode, parentId, index, nodeId, expandable, disabledProp, id]);
2270
+ React9.useEffect(() => {
2271
+ if (mapFirstChar && unMapFirstChar && label) {
2272
+ var _contentRef$current$t, _contentRef$current;
2273
+ mapFirstChar(nodeId, ((_contentRef$current$t = (_contentRef$current = contentRef.current) == null ? void 0 : _contentRef$current.textContent) != null ? _contentRef$current$t : "").substring(0, 1).toLowerCase());
2274
+ return () => {
2275
+ unMapFirstChar(nodeId);
2276
+ };
2277
+ }
2278
+ return void 0;
2279
+ }, [mapFirstChar, unMapFirstChar, nodeId, label]);
2280
+ let ariaSelected;
2281
+ if (multiSelect) {
2282
+ ariaSelected = selected;
2283
+ } else if (selected) {
2284
+ ariaSelected = true;
2285
+ }
2286
+ function handleFocus(event) {
2287
+ if (event.target === event.currentTarget) {
2288
+ let rootElement;
2289
+ if (typeof event.target.getRootNode === "function") {
2290
+ rootElement = event.target.getRootNode();
2291
+ } else {
2292
+ rootElement = ownerDocument(event.target);
2293
+ }
2294
+ rootElement.getElementById(treeId).focus({
2295
+ preventScroll: true
2296
+ });
2297
+ }
2298
+ const unfocusable = !disabledItemsFocusable && disabled;
2299
+ if (!focused && event.currentTarget === event.target && !unfocusable) {
2300
+ focus(event, nodeId);
2301
+ }
2302
+ }
2303
+ return /* @__PURE__ */ _jsxs2(TreeItemRoot, _extends({
2304
+ className: clsx_default(classes.root, className),
2305
+ role: "treeitem",
2306
+ "aria-expanded": expandable ? expanded : void 0,
2307
+ "aria-selected": ariaSelected,
2308
+ "aria-disabled": disabled || void 0,
2309
+ id,
2310
+ tabIndex: -1
2311
+ }, other, {
2312
+ ownerState,
2313
+ onFocus: handleFocus,
2314
+ ref: handleRef,
2315
+ children: [/* @__PURE__ */ _jsx3(StyledTreeItemContent, _extends({
2316
+ as: ContentComponent,
2317
+ ref: contentRef,
2318
+ classes: {
2319
+ root: classes.content,
2320
+ expanded: classes.expanded,
2321
+ selected: classes.selected,
2322
+ focused: classes.focused,
2323
+ disabled: classes.disabled,
2324
+ iconContainer: classes.iconContainer,
2325
+ label: classes.label
2326
+ },
2327
+ label,
2328
+ nodeId,
2329
+ onClick,
2330
+ onMouseDown,
2331
+ icon,
2332
+ expansionIcon,
2333
+ displayIcon,
2334
+ ownerState
2335
+ }, ContentProps)), children && /* @__PURE__ */ _jsx3(DescendantProvider, {
2336
+ id: nodeId,
2337
+ children: /* @__PURE__ */ _jsx3(TreeItemGroup, _extends({
2338
+ as: TransitionComponent,
2339
+ unmountOnExit: true,
2340
+ className: classes.group,
2341
+ in: expanded,
2342
+ component: "ul",
2343
+ role: "group"
2344
+ }, TransitionProps, {
2345
+ children
2346
+ }))
2347
+ })]
2348
+ }));
2349
+ });
2350
+ process.env.NODE_ENV !== "production" ? TreeItem.propTypes = {
2351
+ // ----------------------------- Warning --------------------------------
2352
+ // | These PropTypes are generated from the TypeScript type definitions |
2353
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
2354
+ // ----------------------------------------------------------------------
2355
+ /**
2356
+ * The content of the component.
2357
+ */
2358
+ children: import_prop_types3.default.node,
2359
+ /**
2360
+ * Override or extend the styles applied to the component.
2361
+ */
2362
+ classes: import_prop_types3.default.object,
2363
+ /**
2364
+ * className applied to the root element.
2365
+ */
2366
+ className: import_prop_types3.default.string,
2367
+ /**
2368
+ * The icon used to collapse the node.
2369
+ */
2370
+ collapseIcon: import_prop_types3.default.node,
2371
+ /**
2372
+ * The component used for the content node.
2373
+ * @default TreeItemContent
2374
+ */
2375
+ ContentComponent: import_elementTypeAcceptingRef.default,
2376
+ /**
2377
+ * Props applied to ContentComponent.
2378
+ */
2379
+ ContentProps: import_prop_types3.default.object,
2380
+ /**
2381
+ * If `true`, the node is disabled.
2382
+ * @default false
2383
+ */
2384
+ disabled: import_prop_types3.default.bool,
2385
+ /**
2386
+ * The icon displayed next to an end node.
2387
+ */
2388
+ endIcon: import_prop_types3.default.node,
2389
+ /**
2390
+ * The icon used to expand the node.
2391
+ */
2392
+ expandIcon: import_prop_types3.default.node,
2393
+ /**
2394
+ * The icon to display next to the tree node's label.
2395
+ */
2396
+ icon: import_prop_types3.default.node,
2397
+ /**
2398
+ * The tree node label.
2399
+ */
2400
+ label: import_prop_types3.default.node,
2401
+ /**
2402
+ * The id of the node.
2403
+ */
2404
+ nodeId: import_prop_types3.default.string.isRequired,
2405
+ /**
2406
+ * This prop isn't supported.
2407
+ * Use the `onNodeFocus` callback on the tree if you need to monitor a node's focus.
2408
+ */
2409
+ onFocus: import_unsupportedProp.default,
2410
+ /**
2411
+ * The system prop that allows defining system overrides as well as additional CSS styles.
2412
+ */
2413
+ sx: import_prop_types3.default.oneOfType([import_prop_types3.default.arrayOf(import_prop_types3.default.oneOfType([import_prop_types3.default.func, import_prop_types3.default.object, import_prop_types3.default.bool])), import_prop_types3.default.func, import_prop_types3.default.object]),
2414
+ /**
2415
+ * The component used for the transition.
2416
+ * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
2417
+ * @default Collapse
2418
+ */
2419
+ TransitionComponent: import_prop_types3.default.elementType,
2420
+ /**
2421
+ * Props applied to the transition element.
2422
+ * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
2423
+ */
2424
+ TransitionProps: import_prop_types3.default.object
2425
+ } : void 0;
2426
+
2427
+ // ../../../../node_modules/@mui/x-tree-view/TreeView/TreeView.js
2428
+ var import_prop_types4 = __toESM(require_prop_types());
2429
+ import * as React10 from "react";
2430
+ import { styled as styled2, useTheme as useTheme2, useThemeProps as useThemeProps2 } from "@mui/material/styles";
2431
+
2432
+ // ../../../../node_modules/@mui/x-tree-view/TreeView/treeViewClasses.js
2433
+ function getTreeViewUtilityClass(slot) {
2434
+ return generateUtilityClass("MuiTreeView", slot);
2435
+ }
2436
+ var treeViewClasses = generateUtilityClasses("MuiTreeView", ["root"]);
2437
+
2438
+ // ../../../../node_modules/@mui/x-tree-view/TreeView/TreeView.js
2439
+ import { jsx as _jsx4 } from "react/jsx-runtime";
2440
+ var _excluded4 = ["children", "className", "defaultCollapseIcon", "defaultEndIcon", "defaultExpanded", "defaultExpandIcon", "defaultParentIcon", "defaultSelected", "disabledItemsFocusable", "disableSelection", "expanded", "id", "multiSelect", "onBlur", "onFocus", "onKeyDown", "onNodeFocus", "onNodeSelect", "onNodeToggle", "selected"];
2441
+ var useUtilityClasses2 = (ownerState) => {
2442
+ const {
2443
+ classes
2444
+ } = ownerState;
2445
+ const slots = {
2446
+ root: ["root"]
2447
+ };
2448
+ return composeClasses(slots, getTreeViewUtilityClass, classes);
2449
+ };
2450
+ var TreeViewRoot = styled2("ul", {
2451
+ name: "MuiTreeView",
2452
+ slot: "Root",
2453
+ overridesResolver: (props, styles) => styles.root
2454
+ })({
2455
+ padding: 0,
2456
+ margin: 0,
2457
+ listStyle: "none",
2458
+ outline: 0
2459
+ });
2460
+ function isPrintableCharacter(string) {
2461
+ return string && string.length === 1 && string.match(/\S/);
2462
+ }
2463
+ function findNextFirstChar(firstChars, startIndex, char) {
2464
+ for (let i = startIndex; i < firstChars.length; i += 1) {
2465
+ if (char === firstChars[i]) {
2466
+ return i;
2467
+ }
2468
+ }
2469
+ return -1;
2470
+ }
2471
+ function noopSelection() {
2472
+ return false;
2473
+ }
2474
+ var defaultDefaultExpanded = [];
2475
+ var defaultDefaultSelected = [];
2476
+ var TreeView = /* @__PURE__ */ React10.forwardRef(function TreeView2(inProps, ref) {
2477
+ var _themeProps$disabledI, _themeProps$disableSe, _themeProps$multiSele, _themeProps$defaultEx, _themeProps$defaultSe;
2478
+ const themeProps = useThemeProps2({
2479
+ props: inProps,
2480
+ name: "MuiTreeView"
2481
+ });
2482
+ const props = _extends({}, themeProps, {
2483
+ disabledItemsFocusable: (_themeProps$disabledI = themeProps.disabledItemsFocusable) != null ? _themeProps$disabledI : false,
2484
+ disableSelection: (_themeProps$disableSe = themeProps.disableSelection) != null ? _themeProps$disableSe : false,
2485
+ multiSelect: (_themeProps$multiSele = themeProps.multiSelect) != null ? _themeProps$multiSele : false,
2486
+ defaultExpanded: (_themeProps$defaultEx = themeProps.defaultExpanded) != null ? _themeProps$defaultEx : defaultDefaultExpanded,
2487
+ defaultSelected: (_themeProps$defaultSe = themeProps.defaultSelected) != null ? _themeProps$defaultSe : defaultDefaultSelected
2488
+ });
2489
+ const {
2490
+ children,
2491
+ className,
2492
+ defaultCollapseIcon,
2493
+ defaultEndIcon,
2494
+ defaultExpanded,
2495
+ defaultExpandIcon,
2496
+ defaultParentIcon,
2497
+ defaultSelected,
2498
+ disabledItemsFocusable,
2499
+ disableSelection,
2500
+ expanded: expandedProp,
2501
+ id: idProp,
2502
+ multiSelect,
2503
+ onBlur,
2504
+ onFocus,
2505
+ onKeyDown,
2506
+ onNodeFocus,
2507
+ onNodeSelect,
2508
+ onNodeToggle,
2509
+ selected: selectedProp
2510
+ } = props, other = _objectWithoutPropertiesLoose(props, _excluded4);
2511
+ const theme = useTheme2();
2512
+ const isRtl = theme.direction === "rtl";
2513
+ const classes = useUtilityClasses2(props);
2514
+ const treeId = useId(idProp);
2515
+ const treeRef = React10.useRef(null);
2516
+ const handleRef = useForkRef(treeRef, ref);
2517
+ const [focusedNodeId, setFocusedNodeId] = React10.useState(null);
2518
+ const nodeMap = React10.useRef({});
2519
+ const firstCharMap = React10.useRef({});
2520
+ const [expanded, setExpandedState] = useControlled({
2521
+ controlled: expandedProp,
2522
+ default: defaultExpanded,
2523
+ name: "TreeView",
2524
+ state: "expanded"
2525
+ });
2526
+ const [selected, setSelectedState] = useControlled({
2527
+ controlled: selectedProp,
2528
+ default: defaultSelected,
2529
+ name: "TreeView",
2530
+ state: "selected"
2531
+ });
2532
+ const isExpanded = React10.useCallback((nodeId) => Array.isArray(expanded) ? expanded.indexOf(nodeId) !== -1 : false, [expanded]);
2533
+ const isExpandable = React10.useCallback((nodeId) => nodeMap.current[nodeId] && nodeMap.current[nodeId].expandable, []);
2534
+ const isSelected = React10.useCallback((nodeId) => Array.isArray(selected) ? selected.indexOf(nodeId) !== -1 : selected === nodeId, [selected]);
2535
+ const isDisabled = React10.useCallback((nodeId) => {
2536
+ if (nodeId == null) {
2537
+ return false;
2538
+ }
2539
+ let node = nodeMap.current[nodeId];
2540
+ if (!node) {
2541
+ return false;
2542
+ }
2543
+ if (node.disabled) {
2544
+ return true;
2545
+ }
2546
+ while (node.parentId != null) {
2547
+ node = nodeMap.current[node.parentId];
2548
+ if (node.disabled) {
2549
+ return true;
2550
+ }
2551
+ }
2552
+ return false;
2553
+ }, []);
2554
+ const isFocused = (nodeId) => focusedNodeId === nodeId;
2555
+ const getChildrenIds = (nodeId) => Object.keys(nodeMap.current).map((key) => {
2556
+ return nodeMap.current[key];
2557
+ }).filter((node) => node.parentId === nodeId).sort((a, b) => a.index - b.index).map((child) => child.id);
2558
+ const getNavigableChildrenIds = (nodeId) => {
2559
+ let childrenIds = getChildrenIds(nodeId);
2560
+ if (!disabledItemsFocusable) {
2561
+ childrenIds = childrenIds.filter((node) => !isDisabled(node));
2562
+ }
2563
+ return childrenIds;
2564
+ };
2565
+ const getNextNode = (nodeId) => {
2566
+ if (isExpanded(nodeId) && getNavigableChildrenIds(nodeId).length > 0) {
2567
+ return getNavigableChildrenIds(nodeId)[0];
2568
+ }
2569
+ let node = nodeMap.current[nodeId];
2570
+ while (node != null) {
2571
+ const siblings = getNavigableChildrenIds(node.parentId);
2572
+ const nextSibling = siblings[siblings.indexOf(node.id) + 1];
2573
+ if (nextSibling) {
2574
+ return nextSibling;
2575
+ }
2576
+ node = nodeMap.current[node.parentId];
2577
+ }
2578
+ return null;
2579
+ };
2580
+ const getPreviousNode = (nodeId) => {
2581
+ const node = nodeMap.current[nodeId];
2582
+ const siblings = getNavigableChildrenIds(node.parentId);
2583
+ const nodeIndex = siblings.indexOf(nodeId);
2584
+ if (nodeIndex === 0) {
2585
+ return node.parentId;
2586
+ }
2587
+ let currentNode = siblings[nodeIndex - 1];
2588
+ while (isExpanded(currentNode) && getNavigableChildrenIds(currentNode).length > 0) {
2589
+ currentNode = getNavigableChildrenIds(currentNode).pop();
2590
+ }
2591
+ return currentNode;
2592
+ };
2593
+ const getLastNode = () => {
2594
+ let lastNode = getNavigableChildrenIds(null).pop();
2595
+ while (isExpanded(lastNode)) {
2596
+ lastNode = getNavigableChildrenIds(lastNode).pop();
2597
+ }
2598
+ return lastNode;
2599
+ };
2600
+ const getFirstNode = () => getNavigableChildrenIds(null)[0];
2601
+ const getParent = (nodeId) => nodeMap.current[nodeId].parentId;
2602
+ const findOrderInTremauxTree = (nodeAId, nodeBId) => {
2603
+ if (nodeAId === nodeBId) {
2604
+ return [nodeAId, nodeBId];
2605
+ }
2606
+ const nodeA = nodeMap.current[nodeAId];
2607
+ const nodeB = nodeMap.current[nodeBId];
2608
+ if (nodeA.parentId === nodeB.id || nodeB.parentId === nodeA.id) {
2609
+ return nodeB.parentId === nodeA.id ? [nodeA.id, nodeB.id] : [nodeB.id, nodeA.id];
2610
+ }
2611
+ const aFamily = [nodeA.id];
2612
+ const bFamily = [nodeB.id];
2613
+ let aAncestor = nodeA.parentId;
2614
+ let bAncestor = nodeB.parentId;
2615
+ let aAncestorIsCommon = bFamily.indexOf(aAncestor) !== -1;
2616
+ let bAncestorIsCommon = aFamily.indexOf(bAncestor) !== -1;
2617
+ let continueA = true;
2618
+ let continueB = true;
2619
+ while (!bAncestorIsCommon && !aAncestorIsCommon) {
2620
+ if (continueA) {
2621
+ aFamily.push(aAncestor);
2622
+ aAncestorIsCommon = bFamily.indexOf(aAncestor) !== -1;
2623
+ continueA = aAncestor !== null;
2624
+ if (!aAncestorIsCommon && continueA) {
2625
+ aAncestor = nodeMap.current[aAncestor].parentId;
2626
+ }
2627
+ }
2628
+ if (continueB && !aAncestorIsCommon) {
2629
+ bFamily.push(bAncestor);
2630
+ bAncestorIsCommon = aFamily.indexOf(bAncestor) !== -1;
2631
+ continueB = bAncestor !== null;
2632
+ if (!bAncestorIsCommon && continueB) {
2633
+ bAncestor = nodeMap.current[bAncestor].parentId;
2634
+ }
2635
+ }
2636
+ }
2637
+ const commonAncestor = aAncestorIsCommon ? aAncestor : bAncestor;
2638
+ const ancestorFamily = getChildrenIds(commonAncestor);
2639
+ const aSide = aFamily[aFamily.indexOf(commonAncestor) - 1];
2640
+ const bSide = bFamily[bFamily.indexOf(commonAncestor) - 1];
2641
+ return ancestorFamily.indexOf(aSide) < ancestorFamily.indexOf(bSide) ? [nodeAId, nodeBId] : [nodeBId, nodeAId];
2642
+ };
2643
+ const getNodesInRange = (nodeAId, nodeBId) => {
2644
+ const [first, last] = findOrderInTremauxTree(nodeAId, nodeBId);
2645
+ const nodes = [first];
2646
+ let current = first;
2647
+ while (current !== last) {
2648
+ current = getNextNode(current);
2649
+ nodes.push(current);
2650
+ }
2651
+ return nodes;
2652
+ };
2653
+ const focus = (event, nodeId) => {
2654
+ if (nodeId) {
2655
+ setFocusedNodeId(nodeId);
2656
+ if (onNodeFocus) {
2657
+ onNodeFocus(event, nodeId);
2658
+ }
2659
+ }
2660
+ };
2661
+ const focusNextNode = (event, nodeId) => focus(event, getNextNode(nodeId));
2662
+ const focusPreviousNode = (event, nodeId) => focus(event, getPreviousNode(nodeId));
2663
+ const focusFirstNode = (event) => focus(event, getFirstNode());
2664
+ const focusLastNode = (event) => focus(event, getLastNode());
2665
+ const focusByFirstCharacter = (event, nodeId, firstChar) => {
2666
+ let start;
2667
+ let index;
2668
+ const lowercaseChar = firstChar.toLowerCase();
2669
+ const firstCharIds = [];
2670
+ const firstChars = [];
2671
+ Object.keys(firstCharMap.current).forEach((mapNodeId) => {
2672
+ const map = nodeMap.current[mapNodeId];
2673
+ const visible = map.parentId ? isExpanded(map.parentId) : true;
2674
+ const shouldBeSkipped = disabledItemsFocusable ? false : isDisabled(mapNodeId);
2675
+ if (visible && !shouldBeSkipped) {
2676
+ firstCharIds.push(mapNodeId);
2677
+ firstChars.push(firstCharMap.current[mapNodeId]);
2678
+ }
2679
+ });
2680
+ start = firstCharIds.indexOf(nodeId) + 1;
2681
+ if (start >= firstCharIds.length) {
2682
+ start = 0;
2683
+ }
2684
+ index = findNextFirstChar(firstChars, start, lowercaseChar);
2685
+ if (index === -1) {
2686
+ index = findNextFirstChar(firstChars, 0, lowercaseChar);
2687
+ }
2688
+ if (index > -1) {
2689
+ focus(event, firstCharIds[index]);
2690
+ }
2691
+ };
2692
+ const toggleExpansion = (event, value = focusedNodeId) => {
2693
+ if (value == null) {
2694
+ return;
2695
+ }
2696
+ let newExpanded;
2697
+ if (expanded.indexOf(value) !== -1) {
2698
+ newExpanded = expanded.filter((id) => id !== value);
2699
+ } else {
2700
+ newExpanded = [value].concat(expanded);
2701
+ }
2702
+ if (onNodeToggle) {
2703
+ onNodeToggle(event, newExpanded);
2704
+ }
2705
+ setExpandedState(newExpanded);
2706
+ };
2707
+ const expandAllSiblings = (event, nodeId) => {
2708
+ const map = nodeMap.current[nodeId];
2709
+ const siblings = getChildrenIds(map.parentId);
2710
+ const diff = siblings.filter((child) => isExpandable(child) && !isExpanded(child));
2711
+ const newExpanded = expanded.concat(diff);
2712
+ if (diff.length > 0) {
2713
+ setExpandedState(newExpanded);
2714
+ if (onNodeToggle) {
2715
+ onNodeToggle(event, newExpanded);
2716
+ }
2717
+ }
2718
+ };
2719
+ const lastSelectedNode = React10.useRef(null);
2720
+ const lastSelectionWasRange = React10.useRef(false);
2721
+ const currentRangeSelection = React10.useRef([]);
2722
+ const handleRangeArrowSelect = (event, nodes) => {
2723
+ let base = selected.slice();
2724
+ const {
2725
+ start,
2726
+ next,
2727
+ current
2728
+ } = nodes;
2729
+ if (!next || !current) {
2730
+ return;
2731
+ }
2732
+ if (currentRangeSelection.current.indexOf(current) === -1) {
2733
+ currentRangeSelection.current = [];
2734
+ }
2735
+ if (lastSelectionWasRange.current) {
2736
+ if (currentRangeSelection.current.indexOf(next) !== -1) {
2737
+ base = base.filter((id) => id === start || id !== current);
2738
+ currentRangeSelection.current = currentRangeSelection.current.filter((id) => id === start || id !== current);
2739
+ } else {
2740
+ base.push(next);
2741
+ currentRangeSelection.current.push(next);
2742
+ }
2743
+ } else {
2744
+ base.push(next);
2745
+ currentRangeSelection.current.push(current, next);
2746
+ }
2747
+ if (onNodeSelect) {
2748
+ onNodeSelect(event, base);
2749
+ }
2750
+ setSelectedState(base);
2751
+ };
2752
+ const handleRangeSelect = (event, nodes) => {
2753
+ let base = selected.slice();
2754
+ const {
2755
+ start,
2756
+ end
2757
+ } = nodes;
2758
+ if (lastSelectionWasRange.current) {
2759
+ base = base.filter((id) => currentRangeSelection.current.indexOf(id) === -1);
2760
+ }
2761
+ let range = getNodesInRange(start, end);
2762
+ range = range.filter((node) => !isDisabled(node));
2763
+ currentRangeSelection.current = range;
2764
+ let newSelected = base.concat(range);
2765
+ newSelected = newSelected.filter((id, i) => newSelected.indexOf(id) === i);
2766
+ if (onNodeSelect) {
2767
+ onNodeSelect(event, newSelected);
2768
+ }
2769
+ setSelectedState(newSelected);
2770
+ };
2771
+ const handleMultipleSelect = (event, nodeId) => {
2772
+ if (!Array.isArray(selected)) {
2773
+ return;
2774
+ }
2775
+ let newSelected;
2776
+ if (selected.indexOf(nodeId) !== -1) {
2777
+ newSelected = selected.filter((id) => id !== nodeId);
2778
+ } else {
2779
+ newSelected = [nodeId].concat(selected);
2780
+ }
2781
+ if (onNodeSelect) {
2782
+ onNodeSelect(event, newSelected);
2783
+ }
2784
+ setSelectedState(newSelected);
2785
+ };
2786
+ const handleSingleSelect = (event, nodeId) => {
2787
+ const newSelected = multiSelect ? [nodeId] : nodeId;
2788
+ if (onNodeSelect) {
2789
+ onNodeSelect(event, newSelected);
2790
+ }
2791
+ setSelectedState(newSelected);
2792
+ };
2793
+ const selectNode = (event, nodeId, multiple = false) => {
2794
+ if (nodeId) {
2795
+ if (multiple) {
2796
+ handleMultipleSelect(event, nodeId);
2797
+ } else {
2798
+ handleSingleSelect(event, nodeId);
2799
+ }
2800
+ lastSelectedNode.current = nodeId;
2801
+ lastSelectionWasRange.current = false;
2802
+ currentRangeSelection.current = [];
2803
+ return true;
2804
+ }
2805
+ return false;
2806
+ };
2807
+ const selectRange = (event, nodes, stacked = false) => {
2808
+ const {
2809
+ start = lastSelectedNode.current,
2810
+ end,
2811
+ current
2812
+ } = nodes;
2813
+ if (stacked) {
2814
+ handleRangeArrowSelect(event, {
2815
+ start,
2816
+ next: end,
2817
+ current
2818
+ });
2819
+ } else if (start != null && end != null) {
2820
+ handleRangeSelect(event, {
2821
+ start,
2822
+ end
2823
+ });
2824
+ }
2825
+ lastSelectionWasRange.current = true;
2826
+ };
2827
+ const rangeSelectToFirst = (event, id) => {
2828
+ if (!lastSelectedNode.current) {
2829
+ lastSelectedNode.current = id;
2830
+ }
2831
+ const start = lastSelectionWasRange.current ? lastSelectedNode.current : id;
2832
+ selectRange(event, {
2833
+ start,
2834
+ end: getFirstNode()
2835
+ });
2836
+ };
2837
+ const rangeSelectToLast = (event, id) => {
2838
+ if (!lastSelectedNode.current) {
2839
+ lastSelectedNode.current = id;
2840
+ }
2841
+ const start = lastSelectionWasRange.current ? lastSelectedNode.current : id;
2842
+ selectRange(event, {
2843
+ start,
2844
+ end: getLastNode()
2845
+ });
2846
+ };
2847
+ const selectNextNode = (event, id) => {
2848
+ if (!isDisabled(getNextNode(id))) {
2849
+ selectRange(event, {
2850
+ end: getNextNode(id),
2851
+ current: id
2852
+ }, true);
2853
+ }
2854
+ };
2855
+ const selectPreviousNode = (event, id) => {
2856
+ if (!isDisabled(getPreviousNode(id))) {
2857
+ selectRange(event, {
2858
+ end: getPreviousNode(id),
2859
+ current: id
2860
+ }, true);
2861
+ }
2862
+ };
2863
+ const selectAllNodes = (event) => {
2864
+ selectRange(event, {
2865
+ start: getFirstNode(),
2866
+ end: getLastNode()
2867
+ });
2868
+ };
2869
+ const registerNode = React10.useCallback((node) => {
2870
+ const {
2871
+ id,
2872
+ index,
2873
+ parentId,
2874
+ expandable,
2875
+ idAttribute,
2876
+ disabled
2877
+ } = node;
2878
+ nodeMap.current[id] = {
2879
+ id,
2880
+ index,
2881
+ parentId,
2882
+ expandable,
2883
+ idAttribute,
2884
+ disabled
2885
+ };
2886
+ }, []);
2887
+ const unregisterNode = React10.useCallback((nodeId) => {
2888
+ const newMap = _extends({}, nodeMap.current);
2889
+ delete newMap[nodeId];
2890
+ nodeMap.current = newMap;
2891
+ setFocusedNodeId((oldFocusedNodeId) => {
2892
+ if (oldFocusedNodeId === nodeId && treeRef.current === ownerDocument(treeRef.current).activeElement) {
2893
+ return getChildrenIds(null)[0];
2894
+ }
2895
+ return oldFocusedNodeId;
2896
+ });
2897
+ }, []);
2898
+ const mapFirstChar = React10.useCallback((nodeId, firstChar) => {
2899
+ firstCharMap.current[nodeId] = firstChar;
2900
+ }, []);
2901
+ const unMapFirstChar = React10.useCallback((nodeId) => {
2902
+ const newMap = _extends({}, firstCharMap.current);
2903
+ delete newMap[nodeId];
2904
+ firstCharMap.current = newMap;
2905
+ }, []);
2906
+ const handleNextArrow = (event) => {
2907
+ if (focusedNodeId != null && isExpandable(focusedNodeId)) {
2908
+ if (isExpanded(focusedNodeId)) {
2909
+ focusNextNode(event, focusedNodeId);
2910
+ } else if (!isDisabled(focusedNodeId)) {
2911
+ toggleExpansion(event);
2912
+ }
2913
+ }
2914
+ return true;
2915
+ };
2916
+ const handlePreviousArrow = (event) => {
2917
+ if (focusedNodeId == null) {
2918
+ return false;
2919
+ }
2920
+ if (isExpanded(focusedNodeId) && !isDisabled(focusedNodeId)) {
2921
+ toggleExpansion(event, focusedNodeId);
2922
+ return true;
2923
+ }
2924
+ const parent = getParent(focusedNodeId);
2925
+ if (parent) {
2926
+ focus(event, parent);
2927
+ return true;
2928
+ }
2929
+ return false;
2930
+ };
2931
+ const handleKeyDown = (event) => {
2932
+ let flag = false;
2933
+ const key = event.key;
2934
+ if (event.altKey || event.currentTarget !== event.target || !focusedNodeId) {
2935
+ return;
2936
+ }
2937
+ const ctrlPressed = event.ctrlKey || event.metaKey;
2938
+ switch (key) {
2939
+ case " ":
2940
+ if (!disableSelection && focusedNodeId != null && !isDisabled(focusedNodeId)) {
2941
+ if (multiSelect && event.shiftKey) {
2942
+ selectRange(event, {
2943
+ end: focusedNodeId
2944
+ });
2945
+ flag = true;
2946
+ } else if (multiSelect) {
2947
+ flag = selectNode(event, focusedNodeId, true);
2948
+ } else {
2949
+ flag = selectNode(event, focusedNodeId);
2950
+ }
2951
+ }
2952
+ event.stopPropagation();
2953
+ break;
2954
+ case "Enter":
2955
+ if (!isDisabled(focusedNodeId)) {
2956
+ if (isExpandable(focusedNodeId)) {
2957
+ toggleExpansion(event);
2958
+ flag = true;
2959
+ } else if (multiSelect) {
2960
+ flag = selectNode(event, focusedNodeId, true);
2961
+ } else {
2962
+ flag = selectNode(event, focusedNodeId);
2963
+ }
2964
+ }
2965
+ event.stopPropagation();
2966
+ break;
2967
+ case "ArrowDown":
2968
+ if (multiSelect && event.shiftKey && !disableSelection) {
2969
+ selectNextNode(event, focusedNodeId);
2970
+ }
2971
+ focusNextNode(event, focusedNodeId);
2972
+ flag = true;
2973
+ break;
2974
+ case "ArrowUp":
2975
+ if (multiSelect && event.shiftKey && !disableSelection) {
2976
+ selectPreviousNode(event, focusedNodeId);
2977
+ }
2978
+ focusPreviousNode(event, focusedNodeId);
2979
+ flag = true;
2980
+ break;
2981
+ case "ArrowRight":
2982
+ if (isRtl) {
2983
+ flag = handlePreviousArrow(event);
2984
+ } else {
2985
+ flag = handleNextArrow(event);
2986
+ }
2987
+ break;
2988
+ case "ArrowLeft":
2989
+ if (isRtl) {
2990
+ flag = handleNextArrow(event);
2991
+ } else {
2992
+ flag = handlePreviousArrow(event);
2993
+ }
2994
+ break;
2995
+ case "Home":
2996
+ if (multiSelect && ctrlPressed && event.shiftKey && !disableSelection && !isDisabled(focusedNodeId)) {
2997
+ rangeSelectToFirst(event, focusedNodeId);
2998
+ }
2999
+ focusFirstNode(event);
3000
+ flag = true;
3001
+ break;
3002
+ case "End":
3003
+ if (multiSelect && ctrlPressed && event.shiftKey && !disableSelection && !isDisabled(focusedNodeId)) {
3004
+ rangeSelectToLast(event, focusedNodeId);
3005
+ }
3006
+ focusLastNode(event);
3007
+ flag = true;
3008
+ break;
3009
+ default:
3010
+ if (key === "*") {
3011
+ expandAllSiblings(event, focusedNodeId);
3012
+ flag = true;
3013
+ } else if (multiSelect && ctrlPressed && key.toLowerCase() === "a" && !disableSelection) {
3014
+ selectAllNodes(event);
3015
+ flag = true;
3016
+ } else if (!ctrlPressed && !event.shiftKey && isPrintableCharacter(key)) {
3017
+ focusByFirstCharacter(event, focusedNodeId, key);
3018
+ flag = true;
3019
+ }
3020
+ }
3021
+ if (flag) {
3022
+ event.preventDefault();
3023
+ event.stopPropagation();
3024
+ }
3025
+ if (onKeyDown) {
3026
+ onKeyDown(event);
3027
+ }
3028
+ };
3029
+ const handleFocus = (event) => {
3030
+ if (event.target === event.currentTarget) {
3031
+ const firstSelected = Array.isArray(selected) ? selected[0] : selected;
3032
+ focus(event, firstSelected || getNavigableChildrenIds(null)[0]);
3033
+ }
3034
+ if (onFocus) {
3035
+ onFocus(event);
3036
+ }
3037
+ };
3038
+ const handleBlur = (event) => {
3039
+ setFocusedNodeId(null);
3040
+ if (onBlur) {
3041
+ onBlur(event);
3042
+ }
3043
+ };
3044
+ const activeDescendant = nodeMap.current[focusedNodeId] ? nodeMap.current[focusedNodeId].idAttribute : null;
3045
+ return /* @__PURE__ */ _jsx4(TreeViewContext.Provider, {
3046
+ // TODO: fix this lint error
3047
+ // eslint-disable-next-line react/jsx-no-constructed-context-values
3048
+ value: {
3049
+ icons: {
3050
+ defaultCollapseIcon,
3051
+ defaultExpandIcon,
3052
+ defaultParentIcon,
3053
+ defaultEndIcon
3054
+ },
3055
+ focus,
3056
+ toggleExpansion,
3057
+ isExpanded,
3058
+ isExpandable,
3059
+ isFocused,
3060
+ isSelected,
3061
+ isDisabled,
3062
+ selectNode: disableSelection ? noopSelection : selectNode,
3063
+ selectRange: disableSelection ? noopSelection : selectRange,
3064
+ multiSelect,
3065
+ disabledItemsFocusable,
3066
+ mapFirstChar,
3067
+ unMapFirstChar,
3068
+ registerNode,
3069
+ unregisterNode,
3070
+ treeId
3071
+ },
3072
+ children: /* @__PURE__ */ _jsx4(DescendantProvider, {
3073
+ children: /* @__PURE__ */ _jsx4(TreeViewRoot, _extends({
3074
+ role: "tree",
3075
+ id: treeId,
3076
+ "aria-activedescendant": activeDescendant != null ? activeDescendant : void 0,
3077
+ "aria-multiselectable": multiSelect,
3078
+ className: clsx_default(classes.root, className),
3079
+ tabIndex: 0,
3080
+ onKeyDown: handleKeyDown,
3081
+ onFocus: handleFocus,
3082
+ onBlur: handleBlur,
3083
+ ownerState: props
3084
+ }, other, {
3085
+ ref: handleRef,
3086
+ children
3087
+ }))
3088
+ })
3089
+ });
3090
+ });
3091
+ process.env.NODE_ENV !== "production" ? TreeView.propTypes = {
3092
+ // ----------------------------- Warning --------------------------------
3093
+ // | These PropTypes are generated from the TypeScript type definitions |
3094
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
3095
+ // ----------------------------------------------------------------------
3096
+ /**
3097
+ * The content of the component.
3098
+ */
3099
+ children: import_prop_types4.default.node,
3100
+ /**
3101
+ * Override or extend the styles applied to the component.
3102
+ */
3103
+ classes: import_prop_types4.default.object,
3104
+ /**
3105
+ * className applied to the root element.
3106
+ */
3107
+ className: import_prop_types4.default.string,
3108
+ /**
3109
+ * The default icon used to collapse the node.
3110
+ */
3111
+ defaultCollapseIcon: import_prop_types4.default.node,
3112
+ /**
3113
+ * The default icon displayed next to a end node. This is applied to all
3114
+ * tree nodes and can be overridden by the TreeItem `icon` prop.
3115
+ */
3116
+ defaultEndIcon: import_prop_types4.default.node,
3117
+ /**
3118
+ * Expanded node ids.
3119
+ * Used when the item's expansion are not controlled.
3120
+ * @default []
3121
+ */
3122
+ defaultExpanded: import_prop_types4.default.arrayOf(import_prop_types4.default.string),
3123
+ /**
3124
+ * The default icon used to expand the node.
3125
+ */
3126
+ defaultExpandIcon: import_prop_types4.default.node,
3127
+ /**
3128
+ * The default icon displayed next to a parent node. This is applied to all
3129
+ * parent nodes and can be overridden by the TreeItem `icon` prop.
3130
+ */
3131
+ defaultParentIcon: import_prop_types4.default.node,
3132
+ /**
3133
+ * Selected node ids. (Uncontrolled)
3134
+ * When `multiSelect` is true this takes an array of strings; when false (default) a string.
3135
+ * @default []
3136
+ */
3137
+ defaultSelected: import_prop_types4.default.oneOfType([import_prop_types4.default.arrayOf(import_prop_types4.default.string), import_prop_types4.default.string]),
3138
+ /**
3139
+ * If `true`, will allow focus on disabled items.
3140
+ * @default false
3141
+ */
3142
+ disabledItemsFocusable: import_prop_types4.default.bool,
3143
+ /**
3144
+ * If `true` selection is disabled.
3145
+ * @default false
3146
+ */
3147
+ disableSelection: import_prop_types4.default.bool,
3148
+ /**
3149
+ * Expanded node ids.
3150
+ * Used when the item's expansion are controlled.
3151
+ */
3152
+ expanded: import_prop_types4.default.arrayOf(import_prop_types4.default.string),
3153
+ /**
3154
+ * This prop is used to help implement the accessibility logic.
3155
+ * If you don't provide this prop. It falls back to a randomly generated id.
3156
+ */
3157
+ id: import_prop_types4.default.string,
3158
+ /**
3159
+ * If true `ctrl` and `shift` will trigger multiselect.
3160
+ * @default false
3161
+ */
3162
+ multiSelect: import_prop_types4.default.bool,
3163
+ /**
3164
+ * Callback fired when tree items are focused.
3165
+ * @param {React.SyntheticEvent} event The event source of the callback **Warning**: This is a generic event not a focus event.
3166
+ * @param {string} nodeId The id of the node focused.
3167
+ * @param {string} value of the focused node.
3168
+ */
3169
+ onNodeFocus: import_prop_types4.default.func,
3170
+ /**
3171
+ * Callback fired when tree items are selected/unselected.
3172
+ * @param {React.SyntheticEvent} event The event source of the callback
3173
+ * @param {string[] | string} nodeIds Ids of the selected nodes. When `multiSelect` is true
3174
+ * this is an array of strings; when false (default) a string.
3175
+ */
3176
+ onNodeSelect: import_prop_types4.default.func,
3177
+ /**
3178
+ * Callback fired when tree items are expanded/collapsed.
3179
+ * @param {React.SyntheticEvent} event The event source of the callback.
3180
+ * @param {array} nodeIds The ids of the expanded nodes.
3181
+ */
3182
+ onNodeToggle: import_prop_types4.default.func,
3183
+ /**
3184
+ * Selected node ids. (Controlled)
3185
+ * When `multiSelect` is true this takes an array of strings; when false (default) a string.
3186
+ */
3187
+ selected: import_prop_types4.default.oneOfType([import_prop_types4.default.arrayOf(import_prop_types4.default.string), import_prop_types4.default.string]),
3188
+ /**
3189
+ * The system prop that allows defining system overrides as well as additional CSS styles.
3190
+ */
3191
+ sx: import_prop_types4.default.oneOfType([import_prop_types4.default.arrayOf(import_prop_types4.default.oneOfType([import_prop_types4.default.func, import_prop_types4.default.object, import_prop_types4.default.bool])), import_prop_types4.default.func, import_prop_types4.default.object])
3192
+ } : void 0;
3193
+
3194
+ // src/TreeViewer/Reflection.tsx
3195
+ import { FlexCol as FlexCol4 } from "@xylabs/react-flexbox";
3196
+ import { useNavigate } from "react-router-dom";
3197
+ import { jsx as jsx12 } from "react/jsx-runtime";
3198
+ var ReflectionTreeViewer = ({ lookup, reflection, searchTerm, ...props }) => {
3199
+ const navigate = useNavigate();
3200
+ return /* @__PURE__ */ jsx12(FlexCol4, { alignItems: "stretch", ...props, children: /* @__PURE__ */ jsx12(
3201
+ TreeView,
3202
+ {
3203
+ "aria-label": "XYO SDK Documentation",
3204
+ defaultExpandIcon: /* @__PURE__ */ jsx12(Add, {}),
3205
+ defaultCollapseIcon: /* @__PURE__ */ jsx12(Remove, {}),
3206
+ defaultExpanded: reflection.groups ? [reflection.groups[0].title] : [],
3207
+ children: reflection.groups?.map((group, index) => /* @__PURE__ */ jsx12(TreeItem, { nodeId: group.title, label: /* @__PURE__ */ jsx12(Typography5, { variant: "h6", children: group.title }), children: group.children.map((child, jndex) => {
3208
+ const searchTermTrimmed = searchTerm?.trim().toLowerCase();
3209
+ const childReflection = typeof child === "number" ? lookup?.[child] : child;
3210
+ return childReflection && (!searchTermTrimmed || childReflection.name.toLowerCase().indexOf(searchTermTrimmed) !== -1) ? /* @__PURE__ */ jsx12(
3211
+ TreeItem,
3212
+ {
3213
+ nodeId: `declaration-${childReflection?.id}`,
3214
+ label: childReflection.name,
3215
+ onClick: () => {
3216
+ const hash = `#${childReflection.name}`;
3217
+ navigate({ hash });
3218
+ document.querySelector(hash)?.scrollIntoView({ behavior: "smooth" });
3219
+ }
3220
+ },
3221
+ `secondary-${index}- ${jndex}`
3222
+ ) : null;
3223
+ }) }, `primary-${index}`))
3224
+ }
3225
+ ) });
3226
+ };
3227
+
3228
+ // src/TreeViewer/ReflectionGroup.tsx
3229
+ import { Typography as Typography6 } from "@mui/material";
3230
+ import { FlexCol as FlexCol5, FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
3231
+ import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
3232
+ var ReflectionGroupTreeViewer = ({
3233
+ variant,
3234
+ group,
3235
+ children,
3236
+ lookup,
3237
+ renderer = ReflectionViewer,
3238
+ ...props
3239
+ }) => {
3240
+ return /* @__PURE__ */ jsxs7(FlexCol5, { ...props, children: [
3241
+ /* @__PURE__ */ jsxs7(FlexRow3, { marginY: 1, justifyContent: "flex-start", children: [
3242
+ /* @__PURE__ */ jsx13(Typography6, { variant, children: group.title }),
3243
+ /* @__PURE__ */ jsx13(
3244
+ JsonViewerButton,
3245
+ {
3246
+ jsonViewProps: { collapsed: 1 },
3247
+ size: "small",
3248
+ variant: "contained",
3249
+ padding: 0,
3250
+ marginX: 1,
3251
+ src: resolveChildren(group, lookup)
3252
+ }
3253
+ )
3254
+ ] }),
3255
+ resolveChildren(group, lookup).map((reflection) => {
3256
+ return reflection ? (
3257
+ // I wrap this in a div since React does not understand that they have keys using the Renderer
3258
+ /* @__PURE__ */ jsx13("div", { children: renderer({ lookup, margin: 1, reflection }) }, reflection.id)
3259
+ ) : null;
3260
+ }),
3261
+ children
3262
+ ] });
3263
+ };
3264
+
3265
+ // src/TwoPanelReflectionViewer.tsx
3266
+ import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
3267
+ var TwoPanelReflectionViewer = ({
3268
+ reflection,
3269
+ itemRenderer = ReflectionViewer,
3270
+ hiddenFlags,
3271
+ ...props
3272
+ }) => {
3273
+ const lookup = useMemo5(() => createLookup(reflection), [reflection]);
3274
+ const theme = useTheme3();
3275
+ const [searchTerm, setSearchTerm] = useState7();
3276
+ const onSearchTermChange = (e) => {
3277
+ setSearchTerm(e.target.value);
3278
+ };
3279
+ const reflectionGroups = useMemo5(() => {
3280
+ return reflection.groups?.map((group) => {
3281
+ return /* @__PURE__ */ jsx14(
3282
+ ReflectionGroupViewer,
3283
+ {
3284
+ autoscroll: true,
3285
+ variant: "h6",
3286
+ lookup,
3287
+ renderer: itemRenderer,
3288
+ group,
3289
+ reflection,
3290
+ alignItems: "stretch",
3291
+ hiddenFlags
3292
+ },
3293
+ group.title
3294
+ );
3295
+ });
3296
+ }, [itemRenderer, lookup, reflection, hiddenFlags]);
3297
+ const NavigationCol = (props2) => {
3298
+ return /* @__PURE__ */ jsxs8(FlexCol6, { ...props2, children: [
3299
+ /* @__PURE__ */ jsx14(
3300
+ TextField,
3301
+ {
3302
+ fullWidth: true,
3303
+ InputProps: {
3304
+ startAdornment: /* @__PURE__ */ jsx14(Search, {})
3305
+ },
3306
+ onChange: onSearchTermChange
3307
+ }
3308
+ ),
3309
+ /* @__PURE__ */ jsx14(FlexGrowCol, { marginTop: 1, alignItems: "stretch", children: /* @__PURE__ */ jsx14(
3310
+ ReflectionTreeViewer,
3311
+ {
3312
+ justifyContent: "flex-start",
3313
+ position: "absolute",
3314
+ top: 0,
3315
+ left: 0,
3316
+ right: 0,
3317
+ bottom: 0,
3318
+ overflow: "scroll",
3319
+ searchTerm,
3320
+ hiddenFlags,
3321
+ reflection,
3322
+ lookup,
3323
+ border: `1px solid ${theme.palette.grey["300"]}`,
3324
+ borderRadius: 1,
3325
+ paddingY: 1
3326
+ }
3327
+ ) })
3328
+ ] });
3329
+ };
3330
+ const DetailsCol = (props2) => {
3331
+ return /* @__PURE__ */ jsx14(FlexGrowCol, { ...props2, children: /* @__PURE__ */ jsx14(FlexGrowCol, { alignItems: "stretch", children: /* @__PURE__ */ jsx14(
3332
+ FlexCol6,
3333
+ {
3334
+ alignItems: "stretch",
3335
+ justifyContent: "flex-start",
3336
+ position: "absolute",
3337
+ top: 0,
3338
+ left: 0,
3339
+ right: 0,
3340
+ bottom: 0,
3341
+ overflow: "scroll",
3342
+ borderRadius: 1,
3343
+ padding: 1,
3344
+ border: `1px solid ${theme.palette.grey["300"]}`,
3345
+ children: reflectionGroups
3346
+ }
3347
+ ) }) });
3348
+ };
3349
+ return /* @__PURE__ */ jsxs8(FlexRow4, { alignItems: "stretch", justifyContent: "start", sx: { overflowY: "scroll" }, ...props, children: [
3350
+ /* @__PURE__ */ jsx14(NavigationCol, { minWidth: 320, alignItems: "stretch", justifyContent: "flex-start", overflow: "hidden" }),
3351
+ /* @__PURE__ */ jsx14(DetailsCol, { marginLeft: 1, alignItems: "stretch", justifyContent: "flex-start", overflow: "hidden" })
3352
+ ] });
3353
+ };
3354
+
3355
+ // src/ProjectTwoPanelReflectionViewer.tsx
3356
+ import { jsx as jsx15 } from "react/jsx-runtime";
3357
+ var ProjectTwoPanelReflectionViewer = ({
3358
+ reflection,
3359
+ itemRenderer = DeclarationContainerReflectionViewer,
3360
+ ...props
3361
+ }) => {
3362
+ assertEx(reflection.isProject, "Project expected to be Project");
3363
+ return /* @__PURE__ */ jsx15(TwoPanelReflectionViewer, { itemRenderer, reflection, ...props });
3364
+ };
3365
+
3366
+ // src/SourceViewer.tsx
3367
+ import { Typography as Typography7 } from "@mui/material";
3368
+ import { FlexCol as FlexCol7 } from "@xylabs/react-flexbox";
3369
+ import { jsx as jsx16 } from "react/jsx-runtime";
3370
+ var SourceViewer = ({ source, ...props }) => {
3371
+ return /* @__PURE__ */ jsx16(FlexCol7, { alignItems: "stretch", ...props, children: /* @__PURE__ */ jsx16(Typography7, { style: { opacity: 0.5 }, variant: "body2", children: /* @__PURE__ */ jsx16("i", { children: source.fileName }) }) });
3372
+ };
3373
+ export {
3374
+ CommentViewer,
3375
+ ContainerReflectionViewer,
3376
+ DeclarationContainerReflectionViewer,
3377
+ DeclarationReflectionViewer,
3378
+ JsonViewerButton,
3379
+ ProjectReflectionViewer,
3380
+ ProjectTwoPanelReflectionViewer,
3381
+ ReflectionGroupTreeViewer,
3382
+ ReflectionGroupViewer,
3383
+ ReflectionTreeViewer,
3384
+ ReflectionViewer,
3385
+ SomeTypeViewer,
3386
+ SourceViewer,
3387
+ TwoPanelReflectionViewer
3388
+ };
3389
+ /*! Bundled license information:
3390
+
3391
+ react-is/cjs/react-is.production.min.js:
3392
+ (** @license React v16.13.1
3393
+ * react-is.production.min.js
3394
+ *
3395
+ * Copyright (c) Facebook, Inc. and its affiliates.
3396
+ *
3397
+ * This source code is licensed under the MIT license found in the
3398
+ * LICENSE file in the root directory of this source tree.
3399
+ *)
3400
+
3401
+ react-is/cjs/react-is.development.js:
3402
+ (** @license React v16.13.1
3403
+ * react-is.development.js
3404
+ *
3405
+ * Copyright (c) Facebook, Inc. and its affiliates.
3406
+ *
3407
+ * This source code is licensed under the MIT license found in the
3408
+ * LICENSE file in the root directory of this source tree.
3409
+ *)
3410
+
3411
+ object-assign/index.js:
3412
+ (*
3413
+ object-assign
3414
+ (c) Sindre Sorhus
3415
+ @license MIT
3416
+ *)
3417
+ */
3418
+ //# sourceMappingURL=index.mjs.map