@semiont/cli 0.5.3 → 0.5.4

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 (320) hide show
  1. package/dist/cli.mjs +10 -11
  2. package/dist/frontend/dist/assets/ArrowsRightLeftIcon-eQUXtsyS.js +2 -0
  3. package/dist/frontend/dist/assets/ArrowsRightLeftIcon-eQUXtsyS.js.map +1 -0
  4. package/dist/frontend/dist/assets/ChevronLeftIcon-QLs1eT1j.js +2 -0
  5. package/dist/frontend/dist/assets/ChevronLeftIcon-QLs1eT1j.js.map +1 -0
  6. package/dist/frontend/dist/assets/CommandLineIcon-BEeeWFhQ.js +2 -0
  7. package/dist/frontend/dist/assets/CommandLineIcon-BEeeWFhQ.js.map +1 -0
  8. package/dist/frontend/dist/assets/CookiePreferences-CMgprW9V.js +2 -0
  9. package/dist/frontend/dist/assets/CookiePreferences-CMgprW9V.js.map +1 -0
  10. package/dist/frontend/dist/assets/KeyboardShortcutsContext-BRLeqQUj.js +2 -0
  11. package/dist/frontend/dist/assets/KeyboardShortcutsContext-BRLeqQUj.js.map +1 -0
  12. package/dist/frontend/dist/assets/PdfAnnotationCanvas.client-CN3C3S55-DsCya3j0.js +2 -0
  13. package/dist/frontend/dist/assets/PdfAnnotationCanvas.client-CN3C3S55-DsCya3j0.js.map +1 -0
  14. package/dist/frontend/dist/assets/ToolbarPanels-CRGQDX-L.js +2 -0
  15. package/dist/frontend/dist/assets/ToolbarPanels-CRGQDX-L.js.map +1 -0
  16. package/dist/frontend/dist/assets/XMarkIcon-CddZGiiz.js +2 -0
  17. package/dist/frontend/dist/assets/XMarkIcon-CddZGiiz.js.map +1 -0
  18. package/dist/frontend/dist/assets/ar-U2EXWUMQ-Ds9Pt3_I.js +2 -0
  19. package/dist/frontend/dist/assets/ar-U2EXWUMQ-Ds9Pt3_I.js.map +1 -0
  20. package/dist/frontend/dist/assets/bn-DRJGV772-BUYrNEk8.js +2 -0
  21. package/dist/frontend/dist/assets/bn-DRJGV772-BUYrNEk8.js.map +1 -0
  22. package/dist/frontend/dist/assets/chunk-GERSK2DY-D2Q8aVeK.js +2 -0
  23. package/dist/frontend/dist/assets/chunk-GERSK2DY-D2Q8aVeK.js.map +1 -0
  24. package/dist/frontend/dist/assets/chunk-K6BJDL2I-CcwOtHVB.js +2 -0
  25. package/dist/frontend/dist/assets/chunk-K6BJDL2I-CcwOtHVB.js.map +1 -0
  26. package/dist/frontend/dist/assets/client-DkMJxPA7.js +2 -0
  27. package/dist/frontend/dist/assets/client-DkMJxPA7.js.map +1 -0
  28. package/dist/frontend/dist/assets/client-DvALJ3DL.js +2 -0
  29. package/dist/frontend/dist/assets/client-DvALJ3DL.js.map +1 -0
  30. package/dist/frontend/dist/assets/client-DxlEW_QJ.js +2 -0
  31. package/dist/frontend/dist/assets/client-DxlEW_QJ.js.map +1 -0
  32. package/dist/frontend/dist/assets/client-uEoQ8iJO.js +2 -0
  33. package/dist/frontend/dist/assets/client-uEoQ8iJO.js.map +1 -0
  34. package/dist/frontend/dist/assets/cs-PTWDM23V-DfbMzFEw.js +2 -0
  35. package/dist/frontend/dist/assets/cs-PTWDM23V-DfbMzFEw.js.map +1 -0
  36. package/dist/frontend/dist/assets/da-KSNIKYSS-BMtq201F.js +2 -0
  37. package/dist/frontend/dist/assets/da-KSNIKYSS-BMtq201F.js.map +1 -0
  38. package/dist/frontend/dist/assets/de-F2XBEWFY-ChjoYEH0.js +2 -0
  39. package/dist/frontend/dist/assets/de-F2XBEWFY-ChjoYEH0.js.map +1 -0
  40. package/dist/frontend/dist/assets/el-DLD2GWAP-ClFunpNV.js +2 -0
  41. package/dist/frontend/dist/assets/el-DLD2GWAP-ClFunpNV.js.map +1 -0
  42. package/dist/frontend/dist/assets/en-L45VK7BS-C9ArL-E1.js +1 -0
  43. package/dist/frontend/dist/assets/es-WLPYWGB5-C53vYarX.js +2 -0
  44. package/dist/frontend/dist/assets/es-WLPYWGB5-C53vYarX.js.map +1 -0
  45. package/dist/frontend/dist/assets/fa-BAXHSDZG-DJia4XF_.js +2 -0
  46. package/dist/frontend/dist/assets/fa-BAXHSDZG-DJia4XF_.js.map +1 -0
  47. package/dist/frontend/dist/assets/fi-FCHSYVOT-D2etzjyC.js +2 -0
  48. package/dist/frontend/dist/assets/fi-FCHSYVOT-D2etzjyC.js.map +1 -0
  49. package/dist/frontend/dist/assets/fr-3UERBSL6-Bi8o9u26.js +2 -0
  50. package/dist/frontend/dist/assets/fr-3UERBSL6-Bi8o9u26.js.map +1 -0
  51. package/dist/frontend/dist/assets/he-F6F3FV2K-CwGkucCK.js +2 -0
  52. package/dist/frontend/dist/assets/he-F6F3FV2K-CwGkucCK.js.map +1 -0
  53. package/dist/frontend/dist/assets/hi-4BK6IK7Q-fsSpyO-Z.js +2 -0
  54. package/dist/frontend/dist/assets/hi-4BK6IK7Q-fsSpyO-Z.js.map +1 -0
  55. package/dist/frontend/dist/assets/i18n-B53Yefbh.js +2 -0
  56. package/dist/frontend/dist/assets/i18n-B53Yefbh.js.map +1 -0
  57. package/dist/frontend/dist/assets/id-7ECCWP3J-MhvUbYNG.js +2 -0
  58. package/dist/frontend/dist/assets/id-7ECCWP3J-MhvUbYNG.js.map +1 -0
  59. package/dist/frontend/dist/assets/index-95t-6XJg.css +1 -0
  60. package/dist/frontend/dist/assets/index-DjtRDlfn.js +141 -0
  61. package/dist/frontend/dist/assets/index-DjtRDlfn.js.map +1 -0
  62. package/dist/frontend/dist/assets/it-234Z6XK6-n-8MkFtz.js +2 -0
  63. package/dist/frontend/dist/assets/it-234Z6XK6-n-8MkFtz.js.map +1 -0
  64. package/dist/frontend/dist/assets/ja-PJWQI4OQ-CbrcVSYZ.js +2 -0
  65. package/dist/frontend/dist/assets/ja-PJWQI4OQ-CbrcVSYZ.js.map +1 -0
  66. package/dist/frontend/dist/assets/ko-APUEW2RS-CLubHAbf.js +2 -0
  67. package/dist/frontend/dist/assets/ko-APUEW2RS-CLubHAbf.js.map +1 -0
  68. package/dist/frontend/dist/assets/layout-BhnmJA6O.js +2 -0
  69. package/dist/frontend/dist/assets/layout-BhnmJA6O.js.map +1 -0
  70. package/dist/frontend/dist/assets/layout-DolG9tOf.js +2 -0
  71. package/dist/frontend/dist/assets/layout-DolG9tOf.js.map +1 -0
  72. package/dist/frontend/dist/assets/layout-e6QyrD0Y.js +2 -0
  73. package/dist/frontend/dist/assets/layout-e6QyrD0Y.js.map +1 -0
  74. package/dist/frontend/dist/assets/layout-xDEqzpvE.js +2 -0
  75. package/dist/frontend/dist/assets/layout-xDEqzpvE.js.map +1 -0
  76. package/dist/frontend/dist/assets/ms-PJBZWZWD-Bu45eJYe.js +2 -0
  77. package/dist/frontend/dist/assets/ms-PJBZWZWD-Bu45eJYe.js.map +1 -0
  78. package/dist/frontend/dist/assets/nl-L4C3ZBCU-bLU3oN_N.js +2 -0
  79. package/dist/frontend/dist/assets/nl-L4C3ZBCU-bLU3oN_N.js.map +1 -0
  80. package/dist/frontend/dist/assets/no-QE5N5KNG-BCG75Nm1.js +2 -0
  81. package/dist/frontend/dist/assets/no-QE5N5KNG-BCG75Nm1.js.map +1 -0
  82. package/dist/frontend/dist/assets/not-found-4iuCkpA7.js +2 -0
  83. package/dist/frontend/dist/assets/not-found-4iuCkpA7.js.map +1 -0
  84. package/dist/frontend/dist/assets/page-6YupxiP8.js +8 -0
  85. package/dist/frontend/dist/assets/page-6YupxiP8.js.map +1 -0
  86. package/dist/frontend/dist/assets/page-7cCGgkUd.js +2 -0
  87. package/dist/frontend/dist/assets/page-7cCGgkUd.js.map +1 -0
  88. package/dist/frontend/dist/assets/page-8sXDEos5.js +2 -0
  89. package/dist/frontend/dist/assets/page-8sXDEos5.js.map +1 -0
  90. package/dist/frontend/dist/assets/page-A6_MoyUb2.js +5 -0
  91. package/dist/frontend/dist/assets/page-A6_MoyUb2.js.map +1 -0
  92. package/dist/frontend/dist/assets/page-B9EYfbrY.js +2 -0
  93. package/dist/frontend/dist/assets/page-B9EYfbrY.js.map +1 -0
  94. package/dist/frontend/dist/assets/page-BOhOKDMk.js +2 -0
  95. package/dist/frontend/dist/assets/page-BOhOKDMk.js.map +1 -0
  96. package/dist/frontend/dist/assets/page-BioSV21A.js +2 -0
  97. package/dist/frontend/dist/assets/page-BioSV21A.js.map +1 -0
  98. package/dist/frontend/dist/assets/page-Bl8sZu8k.js +2 -0
  99. package/dist/frontend/dist/assets/page-Bl8sZu8k.js.map +1 -0
  100. package/dist/frontend/dist/assets/page-BrSlkHj9.js +2 -0
  101. package/dist/frontend/dist/assets/page-BrSlkHj9.js.map +1 -0
  102. package/dist/frontend/dist/assets/page-C5gTlI4M.js +2 -0
  103. package/dist/frontend/dist/assets/page-C5gTlI4M.js.map +1 -0
  104. package/dist/frontend/dist/assets/page-CXVPWK3i.js +20 -0
  105. package/dist/frontend/dist/assets/page-CXVPWK3i.js.map +1 -0
  106. package/dist/frontend/dist/assets/page-CXhfUrZM.js +2 -0
  107. package/dist/frontend/dist/assets/page-CXhfUrZM.js.map +1 -0
  108. package/dist/frontend/dist/assets/page-CkHE2rPM.js +2 -0
  109. package/dist/frontend/dist/assets/page-CkHE2rPM.js.map +1 -0
  110. package/dist/frontend/dist/assets/page-D0bYoQZI.js +2 -0
  111. package/dist/frontend/dist/assets/page-D0bYoQZI.js.map +1 -0
  112. package/dist/frontend/dist/assets/page-D1veR3Kp.js +2 -0
  113. package/dist/frontend/dist/assets/page-D1veR3Kp.js.map +1 -0
  114. package/dist/frontend/dist/assets/page-D6oe9LkY.js +2 -0
  115. package/dist/frontend/dist/assets/page-D6oe9LkY.js.map +1 -0
  116. package/dist/frontend/dist/assets/page-DVCVvH_S.js +2 -0
  117. package/dist/frontend/dist/assets/page-DVCVvH_S.js.map +1 -0
  118. package/dist/frontend/dist/assets/page-DbwiMF1N.js +2 -0
  119. package/dist/frontend/dist/assets/page-DbwiMF1N.js.map +1 -0
  120. package/dist/frontend/dist/assets/pl-5Q2D23PD-DgP2517z.js +2 -0
  121. package/dist/frontend/dist/assets/pl-5Q2D23PD-DgP2517z.js.map +1 -0
  122. package/dist/frontend/dist/assets/pt-AIGUOIOC-CN21pR38.js +2 -0
  123. package/dist/frontend/dist/assets/pt-AIGUOIOC-CN21pR38.js.map +1 -0
  124. package/dist/frontend/dist/assets/ro-T56CSHTY-mCdsn9QL.js +2 -0
  125. package/dist/frontend/dist/assets/ro-T56CSHTY-mCdsn9QL.js.map +1 -0
  126. package/dist/frontend/dist/assets/rolldown-runtime-jpDsebLB.js +1 -0
  127. package/dist/frontend/dist/assets/routing-Bcj1FhkC.js +2 -0
  128. package/dist/frontend/dist/assets/routing-Bcj1FhkC.js.map +1 -0
  129. package/dist/frontend/dist/assets/routing-DW1ehi64.js +2 -0
  130. package/dist/frontend/dist/assets/routing-DW1ehi64.js.map +1 -0
  131. package/dist/frontend/dist/assets/sv-L4TJQ2UH-Cj1jmTXz.js +2 -0
  132. package/dist/frontend/dist/assets/sv-L4TJQ2UH-Cj1jmTXz.js.map +1 -0
  133. package/dist/frontend/dist/assets/th-6O7Y6O2Q-Db0HgJLY.js +2 -0
  134. package/dist/frontend/dist/assets/th-6O7Y6O2Q-Db0HgJLY.js.map +1 -0
  135. package/dist/frontend/dist/assets/tr-D4CQCSNO-B0u3f4nL.js +2 -0
  136. package/dist/frontend/dist/assets/tr-D4CQCSNO-B0u3f4nL.js.map +1 -0
  137. package/dist/frontend/dist/assets/uk-2HMQG6ND-Dx2FfvV4.js +2 -0
  138. package/dist/frontend/dist/assets/uk-2HMQG6ND-Dx2FfvV4.js.map +1 -0
  139. package/dist/frontend/dist/assets/vendor-0HjOURbh.js +10 -0
  140. package/dist/frontend/dist/assets/vendor-0HjOURbh.js.map +1 -0
  141. package/dist/frontend/dist/assets/vi-XVJ4RUEJ-CeoZ1h3m.js +2 -0
  142. package/dist/frontend/dist/assets/vi-XVJ4RUEJ-CeoZ1h3m.js.map +1 -0
  143. package/dist/frontend/dist/assets/web-Dr6mdA1A.js +2 -0
  144. package/dist/frontend/dist/assets/web-Dr6mdA1A.js.map +1 -0
  145. package/dist/frontend/dist/assets/zh-K2KDPGHK-BriluvPe.js +2 -0
  146. package/dist/frontend/dist/assets/zh-K2KDPGHK-BriluvPe.js.map +1 -0
  147. package/dist/frontend/dist/index.html +7 -4
  148. package/dist/frontend/dist/messages/ar.json +0 -3
  149. package/dist/frontend/dist/messages/bn.json +0 -3
  150. package/dist/frontend/dist/messages/cs.json +0 -3
  151. package/dist/frontend/dist/messages/da.json +0 -3
  152. package/dist/frontend/dist/messages/de.json +0 -3
  153. package/dist/frontend/dist/messages/el.json +0 -3
  154. package/dist/frontend/dist/messages/en.json +1 -4
  155. package/dist/frontend/dist/messages/es.json +0 -3
  156. package/dist/frontend/dist/messages/fa.json +0 -3
  157. package/dist/frontend/dist/messages/fi.json +0 -3
  158. package/dist/frontend/dist/messages/fr.json +0 -3
  159. package/dist/frontend/dist/messages/he.json +0 -3
  160. package/dist/frontend/dist/messages/hi.json +0 -3
  161. package/dist/frontend/dist/messages/id.json +0 -3
  162. package/dist/frontend/dist/messages/it.json +0 -3
  163. package/dist/frontend/dist/messages/ja.json +0 -3
  164. package/dist/frontend/dist/messages/ko.json +0 -3
  165. package/dist/frontend/dist/messages/ms.json +0 -3
  166. package/dist/frontend/dist/messages/nl.json +0 -3
  167. package/dist/frontend/dist/messages/no.json +0 -3
  168. package/dist/frontend/dist/messages/pl.json +0 -3
  169. package/dist/frontend/dist/messages/pt.json +0 -3
  170. package/dist/frontend/dist/messages/ro.json +0 -3
  171. package/dist/frontend/dist/messages/sv.json +0 -3
  172. package/dist/frontend/dist/messages/th.json +0 -3
  173. package/dist/frontend/dist/messages/tr.json +0 -3
  174. package/dist/frontend/dist/messages/uk.json +0 -3
  175. package/dist/frontend/dist/messages/vi.json +0 -3
  176. package/dist/frontend/dist/messages/zh.json +0 -3
  177. package/dist/frontend/package.json +1 -1
  178. package/dist/templates/package.json +1 -1
  179. package/package.json +9 -9
  180. package/dist/frontend/dist/assets/ArrowsRightLeftIcon-BzLgl5o9.js +0 -2
  181. package/dist/frontend/dist/assets/ArrowsRightLeftIcon-BzLgl5o9.js.map +0 -1
  182. package/dist/frontend/dist/assets/ChevronLeftIcon-BLyRNZuL.js +0 -2
  183. package/dist/frontend/dist/assets/ChevronLeftIcon-BLyRNZuL.js.map +0 -1
  184. package/dist/frontend/dist/assets/CommandLineIcon-Ba4gpk8e.js +0 -2
  185. package/dist/frontend/dist/assets/CommandLineIcon-Ba4gpk8e.js.map +0 -1
  186. package/dist/frontend/dist/assets/CookiePreferences-BizeRUGG.js +0 -2
  187. package/dist/frontend/dist/assets/CookiePreferences-BizeRUGG.js.map +0 -1
  188. package/dist/frontend/dist/assets/PdfAnnotationCanvas.client-5QESNO5H-C_S4hy6Q.js +0 -2
  189. package/dist/frontend/dist/assets/PdfAnnotationCanvas.client-5QESNO5H-C_S4hy6Q.js.map +0 -1
  190. package/dist/frontend/dist/assets/ToolbarPanels-Cz2uv68j.js +0 -2
  191. package/dist/frontend/dist/assets/ToolbarPanels-Cz2uv68j.js.map +0 -1
  192. package/dist/frontend/dist/assets/XMarkIcon-KMKD47CF.js +0 -2
  193. package/dist/frontend/dist/assets/XMarkIcon-KMKD47CF.js.map +0 -1
  194. package/dist/frontend/dist/assets/ar-UUMMNQKF-xeh4Cwx2.js +0 -2
  195. package/dist/frontend/dist/assets/ar-UUMMNQKF-xeh4Cwx2.js.map +0 -1
  196. package/dist/frontend/dist/assets/bn-AL5BJSR3-Dz19S8vN.js +0 -2
  197. package/dist/frontend/dist/assets/bn-AL5BJSR3-Dz19S8vN.js.map +0 -1
  198. package/dist/frontend/dist/assets/browser-ponyfill-D2ngVqWO.js +0 -3
  199. package/dist/frontend/dist/assets/browser-ponyfill-D2ngVqWO.js.map +0 -1
  200. package/dist/frontend/dist/assets/client-BrB8xl9P.js +0 -2
  201. package/dist/frontend/dist/assets/client-BrB8xl9P.js.map +0 -1
  202. package/dist/frontend/dist/assets/client-C5p1ZZtM.js +0 -2
  203. package/dist/frontend/dist/assets/client-C5p1ZZtM.js.map +0 -1
  204. package/dist/frontend/dist/assets/client-D6q4B6bq.js +0 -2
  205. package/dist/frontend/dist/assets/client-D6q4B6bq.js.map +0 -1
  206. package/dist/frontend/dist/assets/client-SkLMw-j7.js +0 -2
  207. package/dist/frontend/dist/assets/client-SkLMw-j7.js.map +0 -1
  208. package/dist/frontend/dist/assets/cs-UMINALSU-HHT-dcWL.js +0 -2
  209. package/dist/frontend/dist/assets/cs-UMINALSU-HHT-dcWL.js.map +0 -1
  210. package/dist/frontend/dist/assets/da-FKUX6CDL-BpdJ67RW.js +0 -2
  211. package/dist/frontend/dist/assets/da-FKUX6CDL-BpdJ67RW.js.map +0 -1
  212. package/dist/frontend/dist/assets/de-XSJ3E25S-DJ6EvHYY.js +0 -2
  213. package/dist/frontend/dist/assets/de-XSJ3E25S-DJ6EvHYY.js.map +0 -1
  214. package/dist/frontend/dist/assets/el-UJXNRCBP-DhRdKHlx.js +0 -2
  215. package/dist/frontend/dist/assets/el-UJXNRCBP-DhRdKHlx.js.map +0 -1
  216. package/dist/frontend/dist/assets/es-VURP62BU-CgnB380t.js +0 -2
  217. package/dist/frontend/dist/assets/es-VURP62BU-CgnB380t.js.map +0 -1
  218. package/dist/frontend/dist/assets/fa-TIT5ZPZY-D28qBiUW.js +0 -2
  219. package/dist/frontend/dist/assets/fa-TIT5ZPZY-D28qBiUW.js.map +0 -1
  220. package/dist/frontend/dist/assets/fi-F7VTGT4H-BeG0kw0Q.js +0 -2
  221. package/dist/frontend/dist/assets/fi-F7VTGT4H-BeG0kw0Q.js.map +0 -1
  222. package/dist/frontend/dist/assets/fr-2ZR26VF7-BwamaA96.js +0 -2
  223. package/dist/frontend/dist/assets/fr-2ZR26VF7-BwamaA96.js.map +0 -1
  224. package/dist/frontend/dist/assets/he-BXP2KYVZ-DuKmwNm_.js +0 -2
  225. package/dist/frontend/dist/assets/he-BXP2KYVZ-DuKmwNm_.js.map +0 -1
  226. package/dist/frontend/dist/assets/hi-PSWTP3NC-B7v6ttqy.js +0 -2
  227. package/dist/frontend/dist/assets/hi-PSWTP3NC-B7v6ttqy.js.map +0 -1
  228. package/dist/frontend/dist/assets/i18n-BbpF47i1.js +0 -2
  229. package/dist/frontend/dist/assets/i18n-BbpF47i1.js.map +0 -1
  230. package/dist/frontend/dist/assets/id-HO6TXGTO-Dj1JW3-q.js +0 -2
  231. package/dist/frontend/dist/assets/id-HO6TXGTO-Dj1JW3-q.js.map +0 -1
  232. package/dist/frontend/dist/assets/index-Dg-Pampr.css +0 -1
  233. package/dist/frontend/dist/assets/index-QjYSiWWG.js +0 -169
  234. package/dist/frontend/dist/assets/index-QjYSiWWG.js.map +0 -1
  235. package/dist/frontend/dist/assets/it-AGTDMBL3-Bq_I1CA1.js +0 -2
  236. package/dist/frontend/dist/assets/it-AGTDMBL3-Bq_I1CA1.js.map +0 -1
  237. package/dist/frontend/dist/assets/ja-TTGOVF5K-CkAQueln.js +0 -2
  238. package/dist/frontend/dist/assets/ja-TTGOVF5K-CkAQueln.js.map +0 -1
  239. package/dist/frontend/dist/assets/ko-FF77IQ7N-fJgs5Roz.js +0 -2
  240. package/dist/frontend/dist/assets/ko-FF77IQ7N-fJgs5Roz.js.map +0 -1
  241. package/dist/frontend/dist/assets/layout-BO_gP65g.js +0 -2
  242. package/dist/frontend/dist/assets/layout-BO_gP65g.js.map +0 -1
  243. package/dist/frontend/dist/assets/layout-C-P8uUyx.js +0 -2
  244. package/dist/frontend/dist/assets/layout-C-P8uUyx.js.map +0 -1
  245. package/dist/frontend/dist/assets/layout-C7qxASOF.js +0 -2
  246. package/dist/frontend/dist/assets/layout-C7qxASOF.js.map +0 -1
  247. package/dist/frontend/dist/assets/layout-DVrTweI_.js +0 -2
  248. package/dist/frontend/dist/assets/layout-DVrTweI_.js.map +0 -1
  249. package/dist/frontend/dist/assets/ms-UPQWWIL4-DEDFniGv.js +0 -2
  250. package/dist/frontend/dist/assets/ms-UPQWWIL4-DEDFniGv.js.map +0 -1
  251. package/dist/frontend/dist/assets/nl-W75HEPFL-D2_VQYac.js +0 -2
  252. package/dist/frontend/dist/assets/nl-W75HEPFL-D2_VQYac.js.map +0 -1
  253. package/dist/frontend/dist/assets/no-R4W7W7ZU-Duk86nrT.js +0 -2
  254. package/dist/frontend/dist/assets/no-R4W7W7ZU-Duk86nrT.js.map +0 -1
  255. package/dist/frontend/dist/assets/not-found-CVsHHn2n.js +0 -2
  256. package/dist/frontend/dist/assets/not-found-CVsHHn2n.js.map +0 -1
  257. package/dist/frontend/dist/assets/page-3CgxsYbh.js +0 -2
  258. package/dist/frontend/dist/assets/page-3CgxsYbh.js.map +0 -1
  259. package/dist/frontend/dist/assets/page-8S-MQzsq.js +0 -2
  260. package/dist/frontend/dist/assets/page-8S-MQzsq.js.map +0 -1
  261. package/dist/frontend/dist/assets/page-B-leMN2k.js +0 -2
  262. package/dist/frontend/dist/assets/page-B-leMN2k.js.map +0 -1
  263. package/dist/frontend/dist/assets/page-B5Dz_Nh-.js +0 -2
  264. package/dist/frontend/dist/assets/page-B5Dz_Nh-.js.map +0 -1
  265. package/dist/frontend/dist/assets/page-BfKm2iQ2.js +0 -2
  266. package/dist/frontend/dist/assets/page-BfKm2iQ2.js.map +0 -1
  267. package/dist/frontend/dist/assets/page-Br5SeiDL.js +0 -2
  268. package/dist/frontend/dist/assets/page-Br5SeiDL.js.map +0 -1
  269. package/dist/frontend/dist/assets/page-C6_MlYjr.js +0 -2
  270. package/dist/frontend/dist/assets/page-C6_MlYjr.js.map +0 -1
  271. package/dist/frontend/dist/assets/page-CXE3Zhkq.js +0 -2
  272. package/dist/frontend/dist/assets/page-CXE3Zhkq.js.map +0 -1
  273. package/dist/frontend/dist/assets/page-Cg1IhnH2.js +0 -2
  274. package/dist/frontend/dist/assets/page-Cg1IhnH2.js.map +0 -1
  275. package/dist/frontend/dist/assets/page-CqV1yD4w.js +0 -2
  276. package/dist/frontend/dist/assets/page-CqV1yD4w.js.map +0 -1
  277. package/dist/frontend/dist/assets/page-D6saO7D3.js +0 -2
  278. package/dist/frontend/dist/assets/page-D6saO7D3.js.map +0 -1
  279. package/dist/frontend/dist/assets/page-D7ZN9Yo5.js +0 -2
  280. package/dist/frontend/dist/assets/page-D7ZN9Yo5.js.map +0 -1
  281. package/dist/frontend/dist/assets/page-DaL8x94G.js +0 -2
  282. package/dist/frontend/dist/assets/page-DaL8x94G.js.map +0 -1
  283. package/dist/frontend/dist/assets/page-Dj5UZ_d6.js +0 -5
  284. package/dist/frontend/dist/assets/page-Dj5UZ_d6.js.map +0 -1
  285. package/dist/frontend/dist/assets/page-DyGU2n2w.js +0 -2
  286. package/dist/frontend/dist/assets/page-DyGU2n2w.js.map +0 -1
  287. package/dist/frontend/dist/assets/page-E4A7Vkwl.js +0 -8
  288. package/dist/frontend/dist/assets/page-E4A7Vkwl.js.map +0 -1
  289. package/dist/frontend/dist/assets/page-OFxNMOoF.js +0 -20
  290. package/dist/frontend/dist/assets/page-OFxNMOoF.js.map +0 -1
  291. package/dist/frontend/dist/assets/page-RRMlL_4-.js +0 -2
  292. package/dist/frontend/dist/assets/page-RRMlL_4-.js.map +0 -1
  293. package/dist/frontend/dist/assets/pl-GQC2ELWO-CYs9xZGI.js +0 -2
  294. package/dist/frontend/dist/assets/pl-GQC2ELWO-CYs9xZGI.js.map +0 -1
  295. package/dist/frontend/dist/assets/privacy-Rbj4Ycw9.js +0 -2
  296. package/dist/frontend/dist/assets/privacy-Rbj4Ycw9.js.map +0 -1
  297. package/dist/frontend/dist/assets/pt-YGVT62RU-pnVyr-_6.js +0 -2
  298. package/dist/frontend/dist/assets/pt-YGVT62RU-pnVyr-_6.js.map +0 -1
  299. package/dist/frontend/dist/assets/ro-TST6XS6X-CRozzX2s.js +0 -2
  300. package/dist/frontend/dist/assets/ro-TST6XS6X-CRozzX2s.js.map +0 -1
  301. package/dist/frontend/dist/assets/routing-CUnWbO2L.js +0 -2
  302. package/dist/frontend/dist/assets/routing-CUnWbO2L.js.map +0 -1
  303. package/dist/frontend/dist/assets/routing-CxPkffyg.js +0 -2
  304. package/dist/frontend/dist/assets/routing-CxPkffyg.js.map +0 -1
  305. package/dist/frontend/dist/assets/sv-TQLF6HV7-DNDzEE6l.js +0 -2
  306. package/dist/frontend/dist/assets/sv-TQLF6HV7-DNDzEE6l.js.map +0 -1
  307. package/dist/frontend/dist/assets/th-HJUIETVR-C8TRIJwR.js +0 -2
  308. package/dist/frontend/dist/assets/th-HJUIETVR-C8TRIJwR.js.map +0 -1
  309. package/dist/frontend/dist/assets/tr-CW3C46TW-wpHSGdDw.js +0 -2
  310. package/dist/frontend/dist/assets/tr-CW3C46TW-wpHSGdDw.js.map +0 -1
  311. package/dist/frontend/dist/assets/uk-WTHZQB2U-3kAkt5-3.js +0 -2
  312. package/dist/frontend/dist/assets/uk-WTHZQB2U-3kAkt5-3.js.map +0 -1
  313. package/dist/frontend/dist/assets/vendor-DJo4KD8w.js +0 -29
  314. package/dist/frontend/dist/assets/vendor-DJo4KD8w.js.map +0 -1
  315. package/dist/frontend/dist/assets/vi-PHWHJLKP-DYHi4xUC.js +0 -2
  316. package/dist/frontend/dist/assets/vi-PHWHJLKP-DYHi4xUC.js.map +0 -1
  317. package/dist/frontend/dist/assets/web-C8yeWrxL.js +0 -2
  318. package/dist/frontend/dist/assets/web-C8yeWrxL.js.map +0 -1
  319. package/dist/frontend/dist/assets/zh-MO3FCUD6-CLkb7wBO.js +0 -2
  320. package/dist/frontend/dist/assets/zh-MO3FCUD6-CLkb7wBO.js.map +0 -1
@@ -1,169 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser-ponyfill-D2ngVqWO.js","assets/vendor-DJo4KD8w.js","assets/PdfAnnotationCanvas.client-5QESNO5H-C_S4hy6Q.js","assets/i18n-BbpF47i1.js","assets/layout-C-P8uUyx.js","assets/privacy-Rbj4Ycw9.js","assets/routing-CxPkffyg.js","assets/page-D6saO7D3.js","assets/page-E4A7Vkwl.js","assets/CookiePreferences-BizeRUGG.js","assets/XMarkIcon-KMKD47CF.js","assets/routing-CUnWbO2L.js","assets/page-OFxNMOoF.js","assets/page-Dj5UZ_d6.js","assets/page-BfKm2iQ2.js","assets/page-RRMlL_4-.js","assets/page-DyGU2n2w.js","assets/page-8S-MQzsq.js","assets/layout-BO_gP65g.js","assets/ToolbarPanels-Cz2uv68j.js","assets/ChevronLeftIcon-BLyRNZuL.js","assets/page-B-leMN2k.js","assets/page-3CgxsYbh.js","assets/page-B5Dz_Nh-.js","assets/page-CqV1yD4w.js","assets/layout-DVrTweI_.js","assets/ArrowsRightLeftIcon-BzLgl5o9.js","assets/CommandLineIcon-Ba4gpk8e.js","assets/page-C6_MlYjr.js","assets/client-BrB8xl9P.js","assets/client-D6q4B6bq.js","assets/client-C5p1ZZtM.js","assets/page-Br5SeiDL.js","assets/layout-C7qxASOF.js","assets/page-DaL8x94G.js","assets/page-D7ZN9Yo5.js","assets/page-Cg1IhnH2.js","assets/page-CXE3Zhkq.js","assets/client-SkLMw-j7.js","assets/not-found-CVsHHn2n.js","assets/web-C8yeWrxL.js"])))=>i.map(i=>d[i]);
2
- var sq=Object.defineProperty;var gj=e=>{throw TypeError(e)};var oq=(e,t,n)=>t in e?sq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var he=(e,t,n)=>oq(e,typeof t!="symbol"?t+"":t,n),UO=(e,t,n)=>t.has(e)||gj("Cannot "+n);var ue=(e,t,n)=>(UO(e,t,"read from private field"),n?n.call(e):t.get(e)),Wi=(e,t,n)=>t.has(e)?gj("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ti=(e,t,n,r)=>(UO(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),St=(e,t,n)=>(UO(e,t,"access private method"),n);var vj=(e,t,n,r)=>({set _(i){Ti(e,t,i,n)},get _(){return ue(e,t,r)}});import{e as QA,f as lq,g as NA,r as k,R as de,h as Vo,t as Oj,c as cq,i as uq,j as xt,N as RA,b as dq,O as fq,a as hq,B as mq}from"./vendor-DJo4KD8w.js";import{i as pq,a as gq,u as vq}from"./i18n-BbpF47i1.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();const Oq="modulepreload",bq=function(e){return"/"+e},bj={},Pe=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=function(d){return Promise.all(d.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),c=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=s(n.map(d=>{if(d=bq(d),d in bj)return;bj[d]=!0;const f=d.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${m}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":Oq,f||(p.as="script"),p.crossOrigin="",p.href=d,c&&p.setAttribute("nonce",c),document.head.appendChild(p),f)return new Promise((v,b)=>{p.addEventListener("load",v),p.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${d}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})};var YO={exports:{}},Ku={};/**
3
- * @license React
4
- * react-jsx-runtime.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var yj;function yq(){if(yj)return Ku;yj=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var s=null;if(a!==void 0&&(s=""+a),i.key!==void 0&&(s=""+i.key),"key"in i){a={};for(var o in i)o!=="key"&&(a[o]=i[o])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:s,ref:i!==void 0?i:null,props:a}}return Ku.Fragment=t,Ku.jsx=n,Ku.jsxs=n,Ku}var Sj;function Sq(){return Sj||(Sj=1,YO.exports=yq()),YO.exports}var g=Sq(),FO={exports:{}},Ju={},WO={exports:{}},HO={};/**
11
- * @license React
12
- * scheduler.production.js
13
- *
14
- * Copyright (c) Meta Platforms, Inc. and affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var xj;function xq(){return xj||(xj=1,(function(e){function t(q,I){var ee=q.length;q.push(I);e:for(;0<ee;){var W=ee-1>>>1,z=q[W];if(0<i(z,I))q[W]=I,q[ee]=z,ee=W;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var I=q[0],ee=q.pop();if(ee!==I){q[0]=ee;e:for(var W=0,z=q.length,ce=z>>>1;W<ce;){var se=2*(W+1)-1,N=q[se],le=se+1,pe=q[le];if(0>i(N,ee))le<z&&0>i(pe,N)?(q[W]=pe,q[le]=ee,W=le):(q[W]=N,q[se]=ee,W=se);else if(le<z&&0>i(pe,ee))q[W]=pe,q[le]=ee,W=le;else break e}}return I}function i(q,I){var ee=q.sortIndex-I.sortIndex;return ee!==0?ee:q.id-I.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var c=[],d=[],f=1,m=null,p=3,v=!1,b=!1,S=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function A(q){for(var I=n(d);I!==null;){if(I.callback===null)r(d);else if(I.startTime<=q)r(d),I.sortIndex=I.expirationTime,t(c,I);else break;I=n(d)}}function Q(q){if(S=!1,A(q),!b)if(n(c)!==null)b=!0,C||(C=!0,X());else{var I=n(d);I!==null&&H(Q,I.startTime-q)}}var C=!1,R=-1,D=5,L=-1;function P(){return x?!0:!(e.unstable_now()-L<D)}function Z(){if(x=!1,C){var q=e.unstable_now();L=q;var I=!0;try{e:{b=!1,S&&(S=!1,j(R),R=-1),v=!0;var ee=p;try{t:{for(A(q),m=n(c);m!==null&&!(m.expirationTime>q&&P());){var W=m.callback;if(typeof W=="function"){m.callback=null,p=m.priorityLevel;var z=W(m.expirationTime<=q);if(q=e.unstable_now(),typeof z=="function"){m.callback=z,A(q),I=!0;break t}m===n(c)&&r(c),A(q)}else r(c);m=n(c)}if(m!==null)I=!0;else{var ce=n(d);ce!==null&&H(Q,ce.startTime-q),I=!1}}break e}finally{m=null,p=ee,v=!1}I=void 0}}finally{I?X():C=!1}}}var X;if(typeof T=="function")X=function(){T(Z)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,Y=B.port2;B.port1.onmessage=Z,X=function(){Y.postMessage(null)}}else X=function(){w(Z,0)};function H(q,I){R=w(function(){q(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(q){switch(p){case 1:case 2:case 3:var I=3;break;default:I=p}var ee=p;p=I;try{return q()}finally{p=ee}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(q,I){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ee=p;p=q;try{return I()}finally{p=ee}},e.unstable_scheduleCallback=function(q,I,ee){var W=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?W+ee:W):ee=W,q){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=ee+z,q={id:f++,callback:I,priorityLevel:q,startTime:ee,expirationTime:z,sortIndex:-1},ee>W?(q.sortIndex=ee,t(d,q),n(c)===null&&q===n(d)&&(S?(j(R),R=-1):S=!0,H(Q,ee-W))):(q.sortIndex=z,t(c,q),b||v||(b=!0,C||(C=!0,X()))),q},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(q){var I=p;return function(){var ee=p;p=I;try{return q.apply(this,arguments)}finally{p=ee}}}})(HO)),HO}var _j;function _q(){return _j||(_j=1,WO.exports=xq()),WO.exports}/**
19
- * @license React
20
- * react-dom-client.production.js
21
- *
22
- * Copyright (c) Meta Platforms, Inc. and affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */var wj;function wq(){if(wj)return Ju;wj=1;var e=_q(),t=QA(),n=lq();function r(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function a(l){var u=l,h=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,(u.flags&4098)!==0&&(h=u.return),l=u.return;while(l)}return u.tag===3?h:null}function s(l){if(l.tag===13){var u=l.memoizedState;if(u===null&&(l=l.alternate,l!==null&&(u=l.memoizedState)),u!==null)return u.dehydrated}return null}function o(l){if(l.tag===31){var u=l.memoizedState;if(u===null&&(l=l.alternate,l!==null&&(u=l.memoizedState)),u!==null)return u.dehydrated}return null}function c(l){if(a(l)!==l)throw Error(r(188))}function d(l){var u=l.alternate;if(!u){if(u=a(l),u===null)throw Error(r(188));return u!==l?null:l}for(var h=l,O=u;;){var y=h.return;if(y===null)break;var _=y.alternate;if(_===null){if(O=y.return,O!==null){h=O;continue}break}if(y.child===_.child){for(_=y.child;_;){if(_===h)return c(y),l;if(_===O)return c(y),u;_=_.sibling}throw Error(r(188))}if(h.return!==O.return)h=y,O=_;else{for(var E=!1,M=y.child;M;){if(M===h){E=!0,h=y,O=_;break}if(M===O){E=!0,O=y,h=_;break}M=M.sibling}if(!E){for(M=_.child;M;){if(M===h){E=!0,h=_,O=y;break}if(M===O){E=!0,O=_,h=y;break}M=M.sibling}if(!E)throw Error(r(189))}}if(h.alternate!==O)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?l:u}function f(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(u=f(l),u!==null)return u;l=l.sibling}return null}var m=Object.assign,p=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),T=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function X(l){return l===null||typeof l!="object"?null:(l=Z&&l[Z]||l["@@iterator"],typeof l=="function"?l:null)}var B=Symbol.for("react.client.reference");function Y(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===B?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case S:return"Fragment";case w:return"Profiler";case x:return"StrictMode";case Q:return"Suspense";case C:return"SuspenseList";case L:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case b:return"Portal";case T:return l.displayName||"Context";case j:return(l._context.displayName||"Context")+".Consumer";case A:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case R:return u=l.displayName||null,u!==null?u:Y(l.type)||"Memo";case D:u=l._payload,l=l._init;try{return Y(l(u))}catch{}}return null}var H=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},W=[],z=-1;function ce(l){return{current:l}}function se(l){0>z||(l.current=W[z],W[z]=null,z--)}function N(l,u){z++,W[z]=l.current,l.current=u}var le=ce(null),pe=ce(null),Oe=ce(null),Be=ce(null);function Ae(l,u){switch(N(Oe,u),N(pe,l),N(le,null),u.nodeType){case 9:case 11:l=(l=u.documentElement)&&(l=l.namespaceURI)?I1(l):0;break;default:if(l=u.tagName,u=u.namespaceURI)u=I1(u),l=q1(u,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}se(le),N(le,l)}function Ze(){se(le),se(pe),se(Oe)}function xe(l){l.memoizedState!==null&&N(Be,l);var u=le.current,h=q1(u,l.type);u!==h&&(N(pe,l),N(le,h))}function Ye(l){pe.current===l&&(se(le),se(pe)),Be.current===l&&(se(Be),Fu._currentValue=ee)}var Ue,Qe;function De(l){if(Ue===void 0)try{throw Error()}catch(h){var u=h.stack.trim().match(/\n( *(at )?)/);Ue=u&&u[1]||"",Qe=-1<h.stack.indexOf(`
27
- at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
28
- `+Ue+l+Qe}var mt=!1;function Ve(l,u){if(!l||mt)return"";mt=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var O={DetermineComponentFrameRoot:function(){try{if(u){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ne){var te=ne}Reflect.construct(l,[],oe)}else{try{oe.call()}catch(ne){te=ne}l.call(oe.prototype)}}else{try{throw Error()}catch(ne){te=ne}(oe=l())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ne){if(ne&&te&&typeof ne.stack=="string")return[ne.stack,te.stack]}return[null,null]}};O.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(O.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(O.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=O.DetermineComponentFrameRoot(),E=_[0],M=_[1];if(E&&M){var U=E.split(`
29
- `),J=M.split(`
30
- `);for(y=O=0;O<U.length&&!U[O].includes("DetermineComponentFrameRoot");)O++;for(;y<J.length&&!J[y].includes("DetermineComponentFrameRoot");)y++;if(O===U.length||y===J.length)for(O=U.length-1,y=J.length-1;1<=O&&0<=y&&U[O]!==J[y];)y--;for(;1<=O&&0<=y;O--,y--)if(U[O]!==J[y]){if(O!==1||y!==1)do if(O--,y--,0>y||U[O]!==J[y]){var ie=`
31
- `+U[O].replace(" at new "," at ");return l.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",l.displayName)),ie}while(1<=O&&0<=y);break}}}finally{mt=!1,Error.prepareStackTrace=h}return(h=l?l.displayName||l.name:"")?De(h):""}function cn(l,u){switch(l.tag){case 26:case 27:case 5:return De(l.type);case 16:return De("Lazy");case 13:return l.child!==u&&u!==null?De("Suspense Fallback"):De("Suspense");case 19:return De("SuspenseList");case 0:case 15:return Ve(l.type,!1);case 11:return Ve(l.type.render,!1);case 1:return Ve(l.type,!0);case 31:return De("Activity");default:return""}}function je(l){try{var u="",h=null;do u+=cn(l,h),h=l,l=l.return;while(l);return u}catch(O){return`
32
- Error generating stack: `+O.message+`
33
- `+O.stack}}var We=Object.prototype.hasOwnProperty,ge=e.unstable_scheduleCallback,dt=e.unstable_cancelCallback,Et=e.unstable_shouldYield,Zt=e.unstable_requestPaint,et=e.unstable_now,Mn=e.unstable_getCurrentPriorityLevel,re=e.unstable_ImmediatePriority,fe=e.unstable_UserBlockingPriority,Te=e.unstable_NormalPriority,$e=e.unstable_LowPriority,rt=e.unstable_IdlePriority,Ct=e.log,Cn=e.unstable_setDisableYieldValue,Jt=null,Lt=null;function Ht(l){if(typeof Ct=="function"&&Cn(l),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(Jt,l)}catch{}}var lt=Math.clz32?Math.clz32:va,Vn=Math.log,mn=Math.LN2;function va(l){return l>>>=0,l===0?32:31-(Vn(l)/mn|0)|0}var Fr=256,Cr=262144,At=4194304;function Dt(l){var u=l&42;if(u!==0)return u;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function kt(l,u,h){var O=l.pendingLanes;if(O===0)return 0;var y=0,_=l.suspendedLanes,E=l.pingedLanes;l=l.warmLanes;var M=O&134217727;return M!==0?(O=M&~_,O!==0?y=Dt(O):(E&=M,E!==0?y=Dt(E):h||(h=M&~l,h!==0&&(y=Dt(h))))):(M=O&~_,M!==0?y=Dt(M):E!==0?y=Dt(E):h||(h=O&~l,h!==0&&(y=Dt(h)))),y===0?0:u!==0&&u!==y&&(u&_)===0&&(_=y&-y,h=u&-u,_>=h||_===32&&(h&4194048)!==0)?u:y}function pn(l,u){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&u)===0}function gn(l,u){switch(l){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function en(){var l=At;return At<<=1,(At&62914560)===0&&(At=4194304),l}function vn(l){for(var u=[],h=0;31>h;h++)u.push(l);return u}function An(l,u){l.pendingLanes|=u,u!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function Yt(l,u,h,O,y,_){var E=l.pendingLanes;l.pendingLanes=h,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=h,l.entangledLanes&=h,l.errorRecoveryDisabledLanes&=h,l.shellSuspendCounter=0;var M=l.entanglements,U=l.expirationTimes,J=l.hiddenUpdates;for(h=E&~h;0<h;){var ie=31-lt(h),oe=1<<ie;M[ie]=0,U[ie]=-1;var te=J[ie];if(te!==null)for(J[ie]=null,ie=0;ie<te.length;ie++){var ne=te[ie];ne!==null&&(ne.lane&=-536870913)}h&=~oe}O!==0&&Ln(l,O,0),_!==0&&y===0&&l.tag!==0&&(l.suspendedLanes|=_&~(E&~u))}function Ln(l,u,h){l.pendingLanes|=u,l.suspendedLanes&=~u;var O=31-lt(u);l.entangledLanes|=u,l.entanglements[O]=l.entanglements[O]|1073741824|h&261930}function _e(l,u){var h=l.entangledLanes|=u;for(l=l.entanglements;h;){var O=31-lt(h),y=1<<O;y&u|l[O]&u&&(l[O]|=u),h&=~y}}function He(l,u){var h=u&-u;return h=(h&42)!==0?1:nn(h),(h&(l.suspendedLanes|u))!==0?0:h}function nn(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function rr(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function Dn(){var l=I.p;return l!==0?l:(l=window.event,l===void 0?32:cj(l.type))}function dr(l,u){var h=I.p;try{return I.p=l,u()}finally{I.p=h}}var Un=Math.random().toString(36).slice(2),un="__reactFiber$"+Un,Pn="__reactProps$"+Un,Ii="__reactContainer$"+Un,po="__reactEvents$"+Un,tu="__reactListeners$"+Un,nu="__reactHandles$"+Un,bl="__reactResources$"+Un,Oa="__reactMarker$"+Un;function go(l){delete l[un],delete l[Pn],delete l[po],delete l[tu],delete l[nu]}function qi(l){var u=l[un];if(u)return u;for(var h=l.parentNode;h;){if(u=h[Ii]||h[un]){if(h=u.alternate,u.child!==null||h!==null&&h.child!==null)for(l=Y1(l);l!==null;){if(h=l[un])return h;l=Y1(l)}return u}l=h,h=l.parentNode}return null}function Bi(l){if(l=l[un]||l[Ii]){var u=l.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return l}return null}function ba(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l.stateNode;throw Error(r(33))}function Xi(l){var u=l[bl];return u||(u=l[bl]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function rn(l){l[Oa]=!0}var yl=new Set,Sl={};function bi(l,u){Zi(l,u),Zi(l+"Capture",u)}function Zi(l,u){for(Sl[l]=u,l=0;l<u.length;l++)yl.add(u[l])}var ru=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Jf={},eh={};function Zg(l){return We.call(eh,l)?!0:We.call(Jf,l)?!1:ru.test(l)?eh[l]=!0:(Jf[l]=!0,!1)}function xl(l,u,h){if(Zg(u))if(h===null)l.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":l.removeAttribute(u);return;case"boolean":var O=u.toLowerCase().slice(0,5);if(O!=="data-"&&O!=="aria-"){l.removeAttribute(u);return}}l.setAttribute(u,""+h)}}function _l(l,u,h){if(h===null)l.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":l.removeAttribute(u);return}l.setAttribute(u,""+h)}}function yi(l,u,h,O){if(O===null)l.removeAttribute(h);else{switch(typeof O){case"undefined":case"function":case"symbol":case"boolean":l.removeAttribute(h);return}l.setAttributeNS(u,h,""+O)}}function fr(l){switch(typeof l){case"bigint":case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function th(l){var u=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function $g(l,u,h){var O=Object.getOwnPropertyDescriptor(l.constructor.prototype,u);if(!l.hasOwnProperty(u)&&typeof O<"u"&&typeof O.get=="function"&&typeof O.set=="function"){var y=O.get,_=O.set;return Object.defineProperty(l,u,{configurable:!0,get:function(){return y.call(this)},set:function(E){h=""+E,_.call(this,E)}}),Object.defineProperty(l,u,{enumerable:O.enumerable}),{getValue:function(){return h},setValue:function(E){h=""+E},stopTracking:function(){l._valueTracker=null,delete l[u]}}}}function iu(l){if(!l._valueTracker){var u=th(l)?"checked":"value";l._valueTracker=$g(l,u,""+l[u])}}function nh(l){if(!l)return!1;var u=l._valueTracker;if(!u)return!0;var h=u.getValue(),O="";return l&&(O=th(l)?l.checked?"true":"false":l.value),l=O,l!==h?(u.setValue(l),!0):!1}function wl(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var Vg=/[\n"\\]/g;function hr(l){return l.replace(Vg,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function au(l,u,h,O,y,_,E,M){l.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?l.type=E:l.removeAttribute("type"),u!=null?E==="number"?(u===0&&l.value===""||l.value!=u)&&(l.value=""+fr(u)):l.value!==""+fr(u)&&(l.value=""+fr(u)):E!=="submit"&&E!=="reset"||l.removeAttribute("value"),u!=null?su(l,E,fr(u)):h!=null?su(l,E,fr(h)):O!=null&&l.removeAttribute("value"),y==null&&_!=null&&(l.defaultChecked=!!_),y!=null&&(l.checked=y&&typeof y!="function"&&typeof y!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?l.name=""+fr(M):l.removeAttribute("name")}function rh(l,u,h,O,y,_,E,M){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(l.type=_),u!=null||h!=null){if(!(_!=="submit"&&_!=="reset"||u!=null)){iu(l);return}h=h!=null?""+fr(h):"",u=u!=null?""+fr(u):h,M||u===l.value||(l.value=u),l.defaultValue=u}O=O??y,O=typeof O!="function"&&typeof O!="symbol"&&!!O,l.checked=M?l.checked:!!O,l.defaultChecked=!!O,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(l.name=E),iu(l)}function su(l,u,h){u==="number"&&wl(l.ownerDocument)===l||l.defaultValue===""+h||(l.defaultValue=""+h)}function as(l,u,h,O){if(l=l.options,u){u={};for(var y=0;y<h.length;y++)u["$"+h[y]]=!0;for(h=0;h<l.length;h++)y=u.hasOwnProperty("$"+l[h].value),l[h].selected!==y&&(l[h].selected=y),y&&O&&(l[h].defaultSelected=!0)}else{for(h=""+fr(h),u=null,y=0;y<l.length;y++){if(l[y].value===h){l[y].selected=!0,O&&(l[y].defaultSelected=!0);return}u!==null||l[y].disabled||(u=l[y])}u!==null&&(u.selected=!0)}}function ih(l,u,h){if(u!=null&&(u=""+fr(u),u!==l.value&&(l.value=u),h==null)){l.defaultValue!==u&&(l.defaultValue=u);return}l.defaultValue=h!=null?""+fr(h):""}function ah(l,u,h,O){if(u==null){if(O!=null){if(h!=null)throw Error(r(92));if(H(O)){if(1<O.length)throw Error(r(93));O=O[0]}h=O}h==null&&(h=""),u=h}h=fr(u),l.defaultValue=h,O=l.textContent,O===h&&O!==""&&O!==null&&(l.value=O),iu(l)}function ss(l,u){if(u){var h=l.firstChild;if(h&&h===l.lastChild&&h.nodeType===3){h.nodeValue=u;return}}l.textContent=u}var Ug=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function sh(l,u,h){var O=u.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?O?l.setProperty(u,""):u==="float"?l.cssFloat="":l[u]="":O?l.setProperty(u,h):typeof h!="number"||h===0||Ug.has(u)?u==="float"?l.cssFloat=h:l[u]=(""+h).trim():l[u]=h+"px"}function oh(l,u,h){if(u!=null&&typeof u!="object")throw Error(r(62));if(l=l.style,h!=null){for(var O in h)!h.hasOwnProperty(O)||u!=null&&u.hasOwnProperty(O)||(O.indexOf("--")===0?l.setProperty(O,""):O==="float"?l.cssFloat="":l[O]="");for(var y in u)O=u[y],u.hasOwnProperty(y)&&h[y]!==O&&sh(l,y,O)}else for(var _ in u)u.hasOwnProperty(_)&&sh(l,_,u[_])}function ou(l){if(l.indexOf("-")===-1)return!1;switch(l){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Yg=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Fg=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function kl(l){return Fg.test(""+l)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":l}function Si(){}var lu=null;function cu(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var os=null,ls=null;function lh(l){var u=Bi(l);if(u&&(l=u.stateNode)){var h=l[Pn]||null;e:switch(l=u.stateNode,u.type){case"input":if(au(l,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),u=h.name,h.type==="radio"&&u!=null){for(h=l;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+hr(""+u)+'"][type="radio"]'),u=0;u<h.length;u++){var O=h[u];if(O!==l&&O.form===l.form){var y=O[Pn]||null;if(!y)throw Error(r(90));au(O,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(u=0;u<h.length;u++)O=h[u],O.form===l.form&&nh(O)}break e;case"textarea":ih(l,h.value,h.defaultValue);break e;case"select":u=h.value,u!=null&&as(l,!!h.multiple,u,!1)}}}var uu=!1;function ch(l,u,h){if(uu)return l(u,h);uu=!0;try{var O=l(u);return O}finally{if(uu=!1,(os!==null||ls!==null)&&(Yh(),os&&(u=os,l=ls,ls=os=null,lh(u),l)))for(u=0;u<l.length;u++)lh(l[u])}}function vo(l,u){var h=l.stateNode;if(h===null)return null;var O=h[Pn]||null;if(O===null)return null;h=O[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(O=!O.disabled)||(l=l.type,O=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!O;break e;default:l=!1}if(l)return null;if(h&&typeof h!="function")throw Error(r(231,u,typeof h));return h}var xi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),du=!1;if(xi)try{var Oo={};Object.defineProperty(Oo,"passive",{get:function(){du=!0}}),window.addEventListener("test",Oo,Oo),window.removeEventListener("test",Oo,Oo)}catch{du=!1}var $i=null,fu=null,jl=null;function uh(){if(jl)return jl;var l,u=fu,h=u.length,O,y="value"in $i?$i.value:$i.textContent,_=y.length;for(l=0;l<h&&u[l]===y[l];l++);var E=h-l;for(O=1;O<=E&&u[h-O]===y[_-O];O++);return jl=y.slice(l,1<O?1-O:void 0)}function Tl(l){var u=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&u===13&&(l=13)):l=u,l===10&&(l=13),32<=l||l===13?l:0}function El(){return!0}function dh(){return!1}function Yn(l){function u(h,O,y,_,E){this._reactName=h,this._targetInst=y,this.type=O,this.nativeEvent=_,this.target=E,this.currentTarget=null;for(var M in l)l.hasOwnProperty(M)&&(h=l[M],this[M]=h?h(_):_[M]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?El:dh,this.isPropagationStopped=dh,this}return m(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=El)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=El)},persist:function(){},isPersistent:El}),u}var ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cl=Yn(ya),bo=m({},ya,{view:0,detail:0}),Wg=Yn(bo),hu,mu,yo,Al=m({},bo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gg,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==yo&&(yo&&l.type==="mousemove"?(hu=l.screenX-yo.screenX,mu=l.screenY-yo.screenY):mu=hu=0,yo=l),hu)},movementY:function(l){return"movementY"in l?l.movementY:mu}}),Sa=Yn(Al),cs=m({},Al,{dataTransfer:0}),_i=Yn(cs),xa=m({},bo,{relatedTarget:0}),Hg=Yn(xa),lz=m({},ya,{animationName:0,elapsedTime:0,pseudoElement:0}),cz=Yn(lz),uz=m({},ya,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),dz=Yn(uz),fz=m({},ya,{data:0}),Z_=Yn(fz),hz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mz={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},pz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gz(l){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(l):(l=pz[l])?!!u[l]:!1}function Gg(){return gz}var vz=m({},bo,{key:function(l){if(l.key){var u=hz[l.key]||l.key;if(u!=="Unidentified")return u}return l.type==="keypress"?(l=Tl(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?mz[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gg,charCode:function(l){return l.type==="keypress"?Tl(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?Tl(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),Oz=Yn(vz),bz=m({},Al,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$_=Yn(bz),yz=m({},bo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gg}),Sz=Yn(yz),xz=m({},ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),_z=Yn(xz),wz=m({},Al,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),kz=Yn(wz),jz=m({},ya,{newState:0,oldState:0}),Tz=Yn(jz),Ez=[9,13,27,32],Kg=xi&&"CompositionEvent"in window,pu=null;xi&&"documentMode"in document&&(pu=document.documentMode);var Cz=xi&&"TextEvent"in window&&!pu,V_=xi&&(!Kg||pu&&8<pu&&11>=pu),U_=" ",Y_=!1;function F_(l,u){switch(l){case"keyup":return Ez.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function W_(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Pl=!1;function Az(l,u){switch(l){case"compositionend":return W_(u);case"keypress":return u.which!==32?null:(Y_=!0,U_);case"textInput":return l=u.data,l===U_&&Y_?null:l;default:return null}}function Pz(l,u){if(Pl)return l==="compositionend"||!Kg&&F_(l,u)?(l=uh(),jl=fu=$i=null,Pl=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return V_&&u.locale!=="ko"?null:u.data;default:return null}}var Qz={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function H_(l){var u=l&&l.nodeName&&l.nodeName.toLowerCase();return u==="input"?!!Qz[l.type]:u==="textarea"}function G_(l,u,h,O){os?ls?ls.push(O):ls=[O]:os=O,u=em(u,"onChange"),0<u.length&&(h=new Cl("onChange","change",null,h,O),l.push({event:h,listeners:u}))}var gu=null,vu=null;function Nz(l){N1(l,0)}function fh(l){var u=ba(l);if(nh(u))return l}function K_(l,u){if(l==="change")return u}var J_=!1;if(xi){var Jg;if(xi){var ev="oninput"in document;if(!ev){var ew=document.createElement("div");ew.setAttribute("oninput","return;"),ev=typeof ew.oninput=="function"}Jg=ev}else Jg=!1;J_=Jg&&(!document.documentMode||9<document.documentMode)}function tw(){gu&&(gu.detachEvent("onpropertychange",nw),vu=gu=null)}function nw(l){if(l.propertyName==="value"&&fh(vu)){var u=[];G_(u,vu,l,cu(l)),ch(Nz,u)}}function Rz(l,u,h){l==="focusin"?(tw(),gu=u,vu=h,gu.attachEvent("onpropertychange",nw)):l==="focusout"&&tw()}function Mz(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return fh(vu)}function Lz(l,u){if(l==="click")return fh(u)}function Dz(l,u){if(l==="input"||l==="change")return fh(u)}function zz(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var Ar=typeof Object.is=="function"?Object.is:zz;function Ou(l,u){if(Ar(l,u))return!0;if(typeof l!="object"||l===null||typeof u!="object"||u===null)return!1;var h=Object.keys(l),O=Object.keys(u);if(h.length!==O.length)return!1;for(O=0;O<h.length;O++){var y=h[O];if(!We.call(u,y)||!Ar(l[y],u[y]))return!1}return!0}function rw(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function iw(l,u){var h=rw(l);l=0;for(var O;h;){if(h.nodeType===3){if(O=l+h.textContent.length,l<=u&&O>=u)return{node:h,offset:u-l};l=O}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=rw(h)}}function aw(l,u){return l&&u?l===u?!0:l&&l.nodeType===3?!1:u&&u.nodeType===3?aw(l,u.parentNode):"contains"in l?l.contains(u):l.compareDocumentPosition?!!(l.compareDocumentPosition(u)&16):!1:!1}function sw(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var u=wl(l.document);u instanceof l.HTMLIFrameElement;){try{var h=typeof u.contentWindow.location.href=="string"}catch{h=!1}if(h)l=u.contentWindow;else break;u=wl(l.document)}return u}function tv(l){var u=l&&l.nodeName&&l.nodeName.toLowerCase();return u&&(u==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||u==="textarea"||l.contentEditable==="true")}var Iz=xi&&"documentMode"in document&&11>=document.documentMode,Ql=null,nv=null,bu=null,rv=!1;function ow(l,u,h){var O=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;rv||Ql==null||Ql!==wl(O)||(O=Ql,"selectionStart"in O&&tv(O)?O={start:O.selectionStart,end:O.selectionEnd}:(O=(O.ownerDocument&&O.ownerDocument.defaultView||window).getSelection(),O={anchorNode:O.anchorNode,anchorOffset:O.anchorOffset,focusNode:O.focusNode,focusOffset:O.focusOffset}),bu&&Ou(bu,O)||(bu=O,O=em(nv,"onSelect"),0<O.length&&(u=new Cl("onSelect","select",null,u,h),l.push({event:u,listeners:O}),u.target=Ql)))}function So(l,u){var h={};return h[l.toLowerCase()]=u.toLowerCase(),h["Webkit"+l]="webkit"+u,h["Moz"+l]="moz"+u,h}var Nl={animationend:So("Animation","AnimationEnd"),animationiteration:So("Animation","AnimationIteration"),animationstart:So("Animation","AnimationStart"),transitionrun:So("Transition","TransitionRun"),transitionstart:So("Transition","TransitionStart"),transitioncancel:So("Transition","TransitionCancel"),transitionend:So("Transition","TransitionEnd")},iv={},lw={};xi&&(lw=document.createElement("div").style,"AnimationEvent"in window||(delete Nl.animationend.animation,delete Nl.animationiteration.animation,delete Nl.animationstart.animation),"TransitionEvent"in window||delete Nl.transitionend.transition);function xo(l){if(iv[l])return iv[l];if(!Nl[l])return l;var u=Nl[l],h;for(h in u)if(u.hasOwnProperty(h)&&h in lw)return iv[l]=u[h];return l}var cw=xo("animationend"),uw=xo("animationiteration"),dw=xo("animationstart"),qz=xo("transitionrun"),Bz=xo("transitionstart"),Xz=xo("transitioncancel"),fw=xo("transitionend"),hw=new Map,av="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");av.push("scrollEnd");function wi(l,u){hw.set(l,u),bi(u,[l])}var hh=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},Wr=[],Rl=0,sv=0;function mh(){for(var l=Rl,u=sv=Rl=0;u<l;){var h=Wr[u];Wr[u++]=null;var O=Wr[u];Wr[u++]=null;var y=Wr[u];Wr[u++]=null;var _=Wr[u];if(Wr[u++]=null,O!==null&&y!==null){var E=O.pending;E===null?y.next=y:(y.next=E.next,E.next=y),O.pending=y}_!==0&&mw(h,y,_)}}function ph(l,u,h,O){Wr[Rl++]=l,Wr[Rl++]=u,Wr[Rl++]=h,Wr[Rl++]=O,sv|=O,l.lanes|=O,l=l.alternate,l!==null&&(l.lanes|=O)}function ov(l,u,h,O){return ph(l,u,h,O),gh(l)}function _o(l,u){return ph(l,null,null,u),gh(l)}function mw(l,u,h){l.lanes|=h;var O=l.alternate;O!==null&&(O.lanes|=h);for(var y=!1,_=l.return;_!==null;)_.childLanes|=h,O=_.alternate,O!==null&&(O.childLanes|=h),_.tag===22&&(l=_.stateNode,l===null||l._visibility&1||(y=!0)),l=_,_=_.return;return l.tag===3?(_=l.stateNode,y&&u!==null&&(y=31-lt(h),l=_.hiddenUpdates,O=l[y],O===null?l[y]=[u]:O.push(u),u.lane=h|536870912),_):null}function gh(l){if(50<Bu)throw Bu=0,gO=null,Error(r(185));for(var u=l.return;u!==null;)l=u,u=l.return;return l.tag===3?l.stateNode:null}var Ml={};function Zz(l,u,h,O){this.tag=l,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=O,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pr(l,u,h,O){return new Zz(l,u,h,O)}function lv(l){return l=l.prototype,!(!l||!l.isReactComponent)}function _a(l,u){var h=l.alternate;return h===null?(h=Pr(l.tag,u,l.key,l.mode),h.elementType=l.elementType,h.type=l.type,h.stateNode=l.stateNode,h.alternate=l,l.alternate=h):(h.pendingProps=u,h.type=l.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=l.flags&65011712,h.childLanes=l.childLanes,h.lanes=l.lanes,h.child=l.child,h.memoizedProps=l.memoizedProps,h.memoizedState=l.memoizedState,h.updateQueue=l.updateQueue,u=l.dependencies,h.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},h.sibling=l.sibling,h.index=l.index,h.ref=l.ref,h.refCleanup=l.refCleanup,h}function pw(l,u){l.flags&=65011714;var h=l.alternate;return h===null?(l.childLanes=0,l.lanes=u,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=h.childLanes,l.lanes=h.lanes,l.child=h.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=h.memoizedProps,l.memoizedState=h.memoizedState,l.updateQueue=h.updateQueue,l.type=h.type,u=h.dependencies,l.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),l}function vh(l,u,h,O,y,_){var E=0;if(O=l,typeof l=="function")lv(l)&&(E=1);else if(typeof l=="string")E=FI(l,h,le.current)?26:l==="html"||l==="head"||l==="body"?27:5;else e:switch(l){case L:return l=Pr(31,h,u,y),l.elementType=L,l.lanes=_,l;case S:return wo(h.children,y,_,u);case x:E=8,y|=24;break;case w:return l=Pr(12,h,u,y|2),l.elementType=w,l.lanes=_,l;case Q:return l=Pr(13,h,u,y),l.elementType=Q,l.lanes=_,l;case C:return l=Pr(19,h,u,y),l.elementType=C,l.lanes=_,l;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case T:E=10;break e;case j:E=9;break e;case A:E=11;break e;case R:E=14;break e;case D:E=16,O=null;break e}E=29,h=Error(r(130,l===null?"null":typeof l,"")),O=null}return u=Pr(E,h,u,y),u.elementType=l,u.type=O,u.lanes=_,u}function wo(l,u,h,O){return l=Pr(7,l,O,u),l.lanes=h,l}function cv(l,u,h){return l=Pr(6,l,null,u),l.lanes=h,l}function gw(l){var u=Pr(18,null,null,0);return u.stateNode=l,u}function uv(l,u,h){return u=Pr(4,l.children!==null?l.children:[],l.key,u),u.lanes=h,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}var vw=new WeakMap;function Hr(l,u){if(typeof l=="object"&&l!==null){var h=vw.get(l);return h!==void 0?h:(u={value:l,source:u,stack:je(u)},vw.set(l,u),u)}return{value:l,source:u,stack:je(u)}}var Ll=[],Dl=0,Oh=null,yu=0,Gr=[],Kr=0,us=null,Vi=1,Ui="";function wa(l,u){Ll[Dl++]=yu,Ll[Dl++]=Oh,Oh=l,yu=u}function Ow(l,u,h){Gr[Kr++]=Vi,Gr[Kr++]=Ui,Gr[Kr++]=us,us=l;var O=Vi;l=Ui;var y=32-lt(O)-1;O&=~(1<<y),h+=1;var _=32-lt(u)+y;if(30<_){var E=y-y%5;_=(O&(1<<E)-1).toString(32),O>>=E,y-=E,Vi=1<<32-lt(u)+y|h<<y|O,Ui=_+l}else Vi=1<<_|h<<y|O,Ui=l}function dv(l){l.return!==null&&(wa(l,1),Ow(l,1,0))}function fv(l){for(;l===Oh;)Oh=Ll[--Dl],Ll[Dl]=null,yu=Ll[--Dl],Ll[Dl]=null;for(;l===us;)us=Gr[--Kr],Gr[Kr]=null,Ui=Gr[--Kr],Gr[Kr]=null,Vi=Gr[--Kr],Gr[Kr]=null}function bw(l,u){Gr[Kr++]=Vi,Gr[Kr++]=Ui,Gr[Kr++]=us,Vi=u.id,Ui=u.overflow,us=l}var zn=null,Ft=null,ft=!1,ds=null,Jr=!1,hv=Error(r(519));function fs(l){var u=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Su(Hr(u,l)),hv}function yw(l){var u=l.stateNode,h=l.type,O=l.memoizedProps;switch(u[un]=l,u[Pn]=O,h){case"dialog":at("cancel",u),at("close",u);break;case"iframe":case"object":case"embed":at("load",u);break;case"video":case"audio":for(h=0;h<Zu.length;h++)at(Zu[h],u);break;case"source":at("error",u);break;case"img":case"image":case"link":at("error",u),at("load",u);break;case"details":at("toggle",u);break;case"input":at("invalid",u),rh(u,O.value,O.defaultValue,O.checked,O.defaultChecked,O.type,O.name,!0);break;case"select":at("invalid",u);break;case"textarea":at("invalid",u),ah(u,O.value,O.defaultValue,O.children)}h=O.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||u.textContent===""+h||O.suppressHydrationWarning===!0||D1(u.textContent,h)?(O.popover!=null&&(at("beforetoggle",u),at("toggle",u)),O.onScroll!=null&&at("scroll",u),O.onScrollEnd!=null&&at("scrollend",u),O.onClick!=null&&(u.onclick=Si),u=!0):u=!1,u||fs(l,!0)}function Sw(l){for(zn=l.return;zn;)switch(zn.tag){case 5:case 31:case 13:Jr=!1;return;case 27:case 3:Jr=!0;return;default:zn=zn.return}}function zl(l){if(l!==zn)return!1;if(!ft)return Sw(l),ft=!0,!1;var u=l.tag,h;if((h=u!==3&&u!==27)&&((h=u===5)&&(h=l.type,h=!(h!=="form"&&h!=="button")||PO(l.type,l.memoizedProps)),h=!h),h&&Ft&&fs(l),Sw(l),u===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(317));Ft=U1(l)}else if(u===31){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(317));Ft=U1(l)}else u===27?(u=Ft,js(l.type)?(l=LO,LO=null,Ft=l):Ft=u):Ft=zn?ti(l.stateNode.nextSibling):null;return!0}function ko(){Ft=zn=null,ft=!1}function mv(){var l=ds;return l!==null&&(vr===null?vr=l:vr.push.apply(vr,l),ds=null),l}function Su(l){ds===null?ds=[l]:ds.push(l)}var pv=ce(null),jo=null,ka=null;function hs(l,u,h){N(pv,u._currentValue),u._currentValue=h}function ja(l){l._currentValue=pv.current,se(pv)}function gv(l,u,h){for(;l!==null;){var O=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,O!==null&&(O.childLanes|=u)):O!==null&&(O.childLanes&u)!==u&&(O.childLanes|=u),l===h)break;l=l.return}}function vv(l,u,h,O){var y=l.child;for(y!==null&&(y.return=l);y!==null;){var _=y.dependencies;if(_!==null){var E=y.child;_=_.firstContext;e:for(;_!==null;){var M=_;_=y;for(var U=0;U<u.length;U++)if(M.context===u[U]){_.lanes|=h,M=_.alternate,M!==null&&(M.lanes|=h),gv(_.return,h,l),O||(E=null);break e}_=M.next}}else if(y.tag===18){if(E=y.return,E===null)throw Error(r(341));E.lanes|=h,_=E.alternate,_!==null&&(_.lanes|=h),gv(E,h,l),E=null}else E=y.child;if(E!==null)E.return=y;else for(E=y;E!==null;){if(E===l){E=null;break}if(y=E.sibling,y!==null){y.return=E.return,E=y;break}E=E.return}y=E}}function Il(l,u,h,O){l=null;for(var y=u,_=!1;y!==null;){if(!_){if((y.flags&524288)!==0)_=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var E=y.alternate;if(E===null)throw Error(r(387));if(E=E.memoizedProps,E!==null){var M=y.type;Ar(y.pendingProps.value,E.value)||(l!==null?l.push(M):l=[M])}}else if(y===Be.current){if(E=y.alternate,E===null)throw Error(r(387));E.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(l!==null?l.push(Fu):l=[Fu])}y=y.return}l!==null&&vv(u,l,h,O),u.flags|=262144}function bh(l){for(l=l.firstContext;l!==null;){if(!Ar(l.context._currentValue,l.memoizedValue))return!0;l=l.next}return!1}function To(l){jo=l,ka=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function In(l){return xw(jo,l)}function yh(l,u){return jo===null&&To(l),xw(l,u)}function xw(l,u){var h=u._currentValue;if(u={context:u,memoizedValue:h,next:null},ka===null){if(l===null)throw Error(r(308));ka=u,l.dependencies={lanes:0,firstContext:u},l.flags|=524288}else ka=ka.next=u;return h}var $z=typeof AbortController<"u"?AbortController:function(){var l=[],u=this.signal={aborted:!1,addEventListener:function(h,O){l.push(O)}};this.abort=function(){u.aborted=!0,l.forEach(function(h){return h()})}},Vz=e.unstable_scheduleCallback,Uz=e.unstable_NormalPriority,On={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ov(){return{controller:new $z,data:new Map,refCount:0}}function xu(l){l.refCount--,l.refCount===0&&Vz(Uz,function(){l.controller.abort()})}var _u=null,bv=0,ql=0,Bl=null;function Yz(l,u){if(_u===null){var h=_u=[];bv=0,ql=xO(),Bl={status:"pending",value:void 0,then:function(O){h.push(O)}}}return bv++,u.then(_w,_w),u}function _w(){if(--bv===0&&_u!==null){Bl!==null&&(Bl.status="fulfilled");var l=_u;_u=null,ql=0,Bl=null;for(var u=0;u<l.length;u++)(0,l[u])()}}function Fz(l,u){var h=[],O={status:"pending",value:null,reason:null,then:function(y){h.push(y)}};return l.then(function(){O.status="fulfilled",O.value=u;for(var y=0;y<h.length;y++)(0,h[y])(u)},function(y){for(O.status="rejected",O.reason=y,y=0;y<h.length;y++)(0,h[y])(void 0)}),O}var ww=q.S;q.S=function(l,u){o1=et(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&Yz(l,u),ww!==null&&ww(l,u)};var Eo=ce(null);function yv(){var l=Eo.current;return l!==null?l:zt.pooledCache}function Sh(l,u){u===null?N(Eo,Eo.current):N(Eo,u.pool)}function kw(){var l=yv();return l===null?null:{parent:On._currentValue,pool:l}}var Xl=Error(r(460)),Sv=Error(r(474)),xh=Error(r(542)),_h={then:function(){}};function jw(l){return l=l.status,l==="fulfilled"||l==="rejected"}function Tw(l,u,h){switch(h=l[h],h===void 0?l.push(u):h!==u&&(u.then(Si,Si),u=h),u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,Cw(l),l;default:if(typeof u.status=="string")u.then(Si,Si);else{if(l=zt,l!==null&&100<l.shellSuspendCounter)throw Error(r(482));l=u,l.status="pending",l.then(function(O){if(u.status==="pending"){var y=u;y.status="fulfilled",y.value=O}},function(O){if(u.status==="pending"){var y=u;y.status="rejected",y.reason=O}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,Cw(l),l}throw Ao=u,Xl}}function Co(l){try{var u=l._init;return u(l._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(Ao=h,Xl):h}}var Ao=null;function Ew(){if(Ao===null)throw Error(r(459));var l=Ao;return Ao=null,l}function Cw(l){if(l===Xl||l===xh)throw Error(r(483))}var Zl=null,wu=0;function wh(l){var u=wu;return wu+=1,Zl===null&&(Zl=[]),Tw(Zl,l,u)}function ku(l,u){u=u.props.ref,l.ref=u!==void 0?u:null}function kh(l,u){throw u.$$typeof===p?Error(r(525)):(l=Object.prototype.toString.call(u),Error(r(31,l==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":l)))}function Aw(l){function u(G,F){if(l){var K=G.deletions;K===null?(G.deletions=[F],G.flags|=16):K.push(F)}}function h(G,F){if(!l)return null;for(;F!==null;)u(G,F),F=F.sibling;return null}function O(G){for(var F=new Map;G!==null;)G.key!==null?F.set(G.key,G):F.set(G.index,G),G=G.sibling;return F}function y(G,F){return G=_a(G,F),G.index=0,G.sibling=null,G}function _(G,F,K){return G.index=K,l?(K=G.alternate,K!==null?(K=K.index,K<F?(G.flags|=67108866,F):K):(G.flags|=67108866,F)):(G.flags|=1048576,F)}function E(G){return l&&G.alternate===null&&(G.flags|=67108866),G}function M(G,F,K,ae){return F===null||F.tag!==6?(F=cv(K,G.mode,ae),F.return=G,F):(F=y(F,K),F.return=G,F)}function U(G,F,K,ae){var Le=K.type;return Le===S?ie(G,F,K.props.children,ae,K.key):F!==null&&(F.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&Co(Le)===F.type)?(F=y(F,K.props),ku(F,K),F.return=G,F):(F=vh(K.type,K.key,K.props,null,G.mode,ae),ku(F,K),F.return=G,F)}function J(G,F,K,ae){return F===null||F.tag!==4||F.stateNode.containerInfo!==K.containerInfo||F.stateNode.implementation!==K.implementation?(F=uv(K,G.mode,ae),F.return=G,F):(F=y(F,K.children||[]),F.return=G,F)}function ie(G,F,K,ae,Le){return F===null||F.tag!==7?(F=wo(K,G.mode,ae,Le),F.return=G,F):(F=y(F,K),F.return=G,F)}function oe(G,F,K){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=cv(""+F,G.mode,K),F.return=G,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case v:return K=vh(F.type,F.key,F.props,null,G.mode,K),ku(K,F),K.return=G,K;case b:return F=uv(F,G.mode,K),F.return=G,F;case D:return F=Co(F),oe(G,F,K)}if(H(F)||X(F))return F=wo(F,G.mode,K,null),F.return=G,F;if(typeof F.then=="function")return oe(G,wh(F),K);if(F.$$typeof===T)return oe(G,yh(G,F),K);kh(G,F)}return null}function te(G,F,K,ae){var Le=F!==null?F.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return Le!==null?null:M(G,F,""+K,ae);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case v:return K.key===Le?U(G,F,K,ae):null;case b:return K.key===Le?J(G,F,K,ae):null;case D:return K=Co(K),te(G,F,K,ae)}if(H(K)||X(K))return Le!==null?null:ie(G,F,K,ae,null);if(typeof K.then=="function")return te(G,F,wh(K),ae);if(K.$$typeof===T)return te(G,F,yh(G,K),ae);kh(G,K)}return null}function ne(G,F,K,ae,Le){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return G=G.get(K)||null,M(F,G,""+ae,Le);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case v:return G=G.get(ae.key===null?K:ae.key)||null,U(F,G,ae,Le);case b:return G=G.get(ae.key===null?K:ae.key)||null,J(F,G,ae,Le);case D:return ae=Co(ae),ne(G,F,K,ae,Le)}if(H(ae)||X(ae))return G=G.get(K)||null,ie(F,G,ae,Le,null);if(typeof ae.then=="function")return ne(G,F,K,wh(ae),Le);if(ae.$$typeof===T)return ne(G,F,K,yh(F,ae),Le);kh(F,ae)}return null}function ke(G,F,K,ae){for(var Le=null,vt=null,Ee=F,Ge=F=0,ut=null;Ee!==null&&Ge<K.length;Ge++){Ee.index>Ge?(ut=Ee,Ee=null):ut=Ee.sibling;var Ot=te(G,Ee,K[Ge],ae);if(Ot===null){Ee===null&&(Ee=ut);break}l&&Ee&&Ot.alternate===null&&u(G,Ee),F=_(Ot,F,Ge),vt===null?Le=Ot:vt.sibling=Ot,vt=Ot,Ee=ut}if(Ge===K.length)return h(G,Ee),ft&&wa(G,Ge),Le;if(Ee===null){for(;Ge<K.length;Ge++)Ee=oe(G,K[Ge],ae),Ee!==null&&(F=_(Ee,F,Ge),vt===null?Le=Ee:vt.sibling=Ee,vt=Ee);return ft&&wa(G,Ge),Le}for(Ee=O(Ee);Ge<K.length;Ge++)ut=ne(Ee,G,Ge,K[Ge],ae),ut!==null&&(l&&ut.alternate!==null&&Ee.delete(ut.key===null?Ge:ut.key),F=_(ut,F,Ge),vt===null?Le=ut:vt.sibling=ut,vt=ut);return l&&Ee.forEach(function(Ps){return u(G,Ps)}),ft&&wa(G,Ge),Le}function Xe(G,F,K,ae){if(K==null)throw Error(r(151));for(var Le=null,vt=null,Ee=F,Ge=F=0,ut=null,Ot=K.next();Ee!==null&&!Ot.done;Ge++,Ot=K.next()){Ee.index>Ge?(ut=Ee,Ee=null):ut=Ee.sibling;var Ps=te(G,Ee,Ot.value,ae);if(Ps===null){Ee===null&&(Ee=ut);break}l&&Ee&&Ps.alternate===null&&u(G,Ee),F=_(Ps,F,Ge),vt===null?Le=Ps:vt.sibling=Ps,vt=Ps,Ee=ut}if(Ot.done)return h(G,Ee),ft&&wa(G,Ge),Le;if(Ee===null){for(;!Ot.done;Ge++,Ot=K.next())Ot=oe(G,Ot.value,ae),Ot!==null&&(F=_(Ot,F,Ge),vt===null?Le=Ot:vt.sibling=Ot,vt=Ot);return ft&&wa(G,Ge),Le}for(Ee=O(Ee);!Ot.done;Ge++,Ot=K.next())Ot=ne(Ee,G,Ge,Ot.value,ae),Ot!==null&&(l&&Ot.alternate!==null&&Ee.delete(Ot.key===null?Ge:Ot.key),F=_(Ot,F,Ge),vt===null?Le=Ot:vt.sibling=Ot,vt=Ot);return l&&Ee.forEach(function(aq){return u(G,aq)}),ft&&wa(G,Ge),Le}function Nt(G,F,K,ae){if(typeof K=="object"&&K!==null&&K.type===S&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case v:e:{for(var Le=K.key;F!==null;){if(F.key===Le){if(Le=K.type,Le===S){if(F.tag===7){h(G,F.sibling),ae=y(F,K.props.children),ae.return=G,G=ae;break e}}else if(F.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&Co(Le)===F.type){h(G,F.sibling),ae=y(F,K.props),ku(ae,K),ae.return=G,G=ae;break e}h(G,F);break}else u(G,F);F=F.sibling}K.type===S?(ae=wo(K.props.children,G.mode,ae,K.key),ae.return=G,G=ae):(ae=vh(K.type,K.key,K.props,null,G.mode,ae),ku(ae,K),ae.return=G,G=ae)}return E(G);case b:e:{for(Le=K.key;F!==null;){if(F.key===Le)if(F.tag===4&&F.stateNode.containerInfo===K.containerInfo&&F.stateNode.implementation===K.implementation){h(G,F.sibling),ae=y(F,K.children||[]),ae.return=G,G=ae;break e}else{h(G,F);break}else u(G,F);F=F.sibling}ae=uv(K,G.mode,ae),ae.return=G,G=ae}return E(G);case D:return K=Co(K),Nt(G,F,K,ae)}if(H(K))return ke(G,F,K,ae);if(X(K)){if(Le=X(K),typeof Le!="function")throw Error(r(150));return K=Le.call(K),Xe(G,F,K,ae)}if(typeof K.then=="function")return Nt(G,F,wh(K),ae);if(K.$$typeof===T)return Nt(G,F,yh(G,K),ae);kh(G,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,F!==null&&F.tag===6?(h(G,F.sibling),ae=y(F,K),ae.return=G,G=ae):(h(G,F),ae=cv(K,G.mode,ae),ae.return=G,G=ae),E(G)):h(G,F)}return function(G,F,K,ae){try{wu=0;var Le=Nt(G,F,K,ae);return Zl=null,Le}catch(Ee){if(Ee===Xl||Ee===xh)throw Ee;var vt=Pr(29,Ee,null,G.mode);return vt.lanes=ae,vt.return=G,vt}finally{}}}var Po=Aw(!0),Pw=Aw(!1),ms=!1;function xv(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _v(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function ps(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function gs(l,u,h){var O=l.updateQueue;if(O===null)return null;if(O=O.shared,(bt&2)!==0){var y=O.pending;return y===null?u.next=u:(u.next=y.next,y.next=u),O.pending=u,u=gh(l),mw(l,null,h),u}return ph(l,O,u,h),gh(l)}function ju(l,u,h){if(u=u.updateQueue,u!==null&&(u=u.shared,(h&4194048)!==0)){var O=u.lanes;O&=l.pendingLanes,h|=O,u.lanes=h,_e(l,h)}}function wv(l,u){var h=l.updateQueue,O=l.alternate;if(O!==null&&(O=O.updateQueue,h===O)){var y=null,_=null;if(h=h.firstBaseUpdate,h!==null){do{var E={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};_===null?y=_=E:_=_.next=E,h=h.next}while(h!==null);_===null?y=_=u:_=_.next=u}else y=_=u;h={baseState:O.baseState,firstBaseUpdate:y,lastBaseUpdate:_,shared:O.shared,callbacks:O.callbacks},l.updateQueue=h;return}l=h.lastBaseUpdate,l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=u}var kv=!1;function Tu(){if(kv){var l=Bl;if(l!==null)throw l}}function Eu(l,u,h,O){kv=!1;var y=l.updateQueue;ms=!1;var _=y.firstBaseUpdate,E=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var U=M,J=U.next;U.next=null,E===null?_=J:E.next=J,E=U;var ie=l.alternate;ie!==null&&(ie=ie.updateQueue,M=ie.lastBaseUpdate,M!==E&&(M===null?ie.firstBaseUpdate=J:M.next=J,ie.lastBaseUpdate=U))}if(_!==null){var oe=y.baseState;E=0,ie=J=U=null,M=_;do{var te=M.lane&-536870913,ne=te!==M.lane;if(ne?(ct&te)===te:(O&te)===te){te!==0&&te===ql&&(kv=!0),ie!==null&&(ie=ie.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var ke=l,Xe=M;te=u;var Nt=h;switch(Xe.tag){case 1:if(ke=Xe.payload,typeof ke=="function"){oe=ke.call(Nt,oe,te);break e}oe=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Xe.payload,te=typeof ke=="function"?ke.call(Nt,oe,te):ke,te==null)break e;oe=m({},oe,te);break e;case 2:ms=!0}}te=M.callback,te!==null&&(l.flags|=64,ne&&(l.flags|=8192),ne=y.callbacks,ne===null?y.callbacks=[te]:ne.push(te))}else ne={lane:te,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ie===null?(J=ie=ne,U=oe):ie=ie.next=ne,E|=te;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;ne=M,M=ne.next,ne.next=null,y.lastBaseUpdate=ne,y.shared.pending=null}}while(!0);ie===null&&(U=oe),y.baseState=U,y.firstBaseUpdate=J,y.lastBaseUpdate=ie,_===null&&(y.shared.lanes=0),Ss|=E,l.lanes=E,l.memoizedState=oe}}function Qw(l,u){if(typeof l!="function")throw Error(r(191,l));l.call(u)}function Nw(l,u){var h=l.callbacks;if(h!==null)for(l.callbacks=null,l=0;l<h.length;l++)Qw(h[l],u)}var $l=ce(null),jh=ce(0);function Rw(l,u){l=Ma,N(jh,l),N($l,u),Ma=l|u.baseLanes}function jv(){N(jh,Ma),N($l,$l.current)}function Tv(){Ma=jh.current,se($l),se(jh)}var Qr=ce(null),ei=null;function vs(l){var u=l.alternate;N(dn,dn.current&1),N(Qr,l),ei===null&&(u===null||$l.current!==null||u.memoizedState!==null)&&(ei=l)}function Ev(l){N(dn,dn.current),N(Qr,l),ei===null&&(ei=l)}function Mw(l){l.tag===22?(N(dn,dn.current),N(Qr,l),ei===null&&(ei=l)):Os()}function Os(){N(dn,dn.current),N(Qr,Qr.current)}function Nr(l){se(Qr),ei===l&&(ei=null),se(dn)}var dn=ce(0);function Th(l){for(var u=l;u!==null;){if(u.tag===13){var h=u.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||RO(h)||MO(h)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Ta=0,Fe=null,Pt=null,bn=null,Eh=!1,Vl=!1,Qo=!1,Ch=0,Cu=0,Ul=null,Wz=0;function an(){throw Error(r(321))}function Cv(l,u){if(u===null)return!1;for(var h=0;h<u.length&&h<l.length;h++)if(!Ar(l[h],u[h]))return!1;return!0}function Av(l,u,h,O,y,_){return Ta=_,Fe=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,q.H=l===null||l.memoizedState===null?Ok:Vv,Qo=!1,_=h(O,y),Qo=!1,Vl&&(_=Dw(u,h,O,y)),Lw(l),_}function Lw(l){q.H=Qu;var u=Pt!==null&&Pt.next!==null;if(Ta=0,bn=Pt=Fe=null,Eh=!1,Cu=0,Ul=null,u)throw Error(r(300));l===null||yn||(l=l.dependencies,l!==null&&bh(l)&&(yn=!0))}function Dw(l,u,h,O){Fe=l;var y=0;do{if(Vl&&(Ul=null),Cu=0,Vl=!1,25<=y)throw Error(r(301));if(y+=1,bn=Pt=null,l.updateQueue!=null){var _=l.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}q.H=bk,_=u(h,O)}while(Vl);return _}function Hz(){var l=q.H,u=l.useState()[0];return u=typeof u.then=="function"?Au(u):u,l=l.useState()[0],(Pt!==null?Pt.memoizedState:null)!==l&&(Fe.flags|=1024),u}function Pv(){var l=Ch!==0;return Ch=0,l}function Qv(l,u,h){u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~h}function Nv(l){if(Eh){for(l=l.memoizedState;l!==null;){var u=l.queue;u!==null&&(u.pending=null),l=l.next}Eh=!1}Ta=0,bn=Pt=Fe=null,Vl=!1,Cu=Ch=0,Ul=null}function ir(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bn===null?Fe.memoizedState=bn=l:bn=bn.next=l,bn}function fn(){if(Pt===null){var l=Fe.alternate;l=l!==null?l.memoizedState:null}else l=Pt.next;var u=bn===null?Fe.memoizedState:bn.next;if(u!==null)bn=u,Pt=l;else{if(l===null)throw Fe.alternate===null?Error(r(467)):Error(r(310));Pt=l,l={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},bn===null?Fe.memoizedState=bn=l:bn=bn.next=l}return bn}function Ah(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Au(l){var u=Cu;return Cu+=1,Ul===null&&(Ul=[]),l=Tw(Ul,l,u),u=Fe,(bn===null?u.memoizedState:bn.next)===null&&(u=u.alternate,q.H=u===null||u.memoizedState===null?Ok:Vv),l}function Ph(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return Au(l);if(l.$$typeof===T)return In(l)}throw Error(r(438,String(l)))}function Rv(l){var u=null,h=Fe.updateQueue;if(h!==null&&(u=h.memoCache),u==null){var O=Fe.alternate;O!==null&&(O=O.updateQueue,O!==null&&(O=O.memoCache,O!=null&&(u={data:O.data.map(function(y){return y.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),h===null&&(h=Ah(),Fe.updateQueue=h),h.memoCache=u,h=u.data[u.index],h===void 0)for(h=u.data[u.index]=Array(l),O=0;O<l;O++)h[O]=P;return u.index++,h}function Ea(l,u){return typeof u=="function"?u(l):u}function Qh(l){var u=fn();return Mv(u,Pt,l)}function Mv(l,u,h){var O=l.queue;if(O===null)throw Error(r(311));O.lastRenderedReducer=h;var y=l.baseQueue,_=O.pending;if(_!==null){if(y!==null){var E=y.next;y.next=_.next,_.next=E}u.baseQueue=y=_,O.pending=null}if(_=l.baseState,y===null)l.memoizedState=_;else{u=y.next;var M=E=null,U=null,J=u,ie=!1;do{var oe=J.lane&-536870913;if(oe!==J.lane?(ct&oe)===oe:(Ta&oe)===oe){var te=J.revertLane;if(te===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),oe===ql&&(ie=!0);else if((Ta&te)===te){J=J.next,te===ql&&(ie=!0);continue}else oe={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(M=U=oe,E=_):U=U.next=oe,Fe.lanes|=te,Ss|=te;oe=J.action,Qo&&h(_,oe),_=J.hasEagerState?J.eagerState:h(_,oe)}else te={lane:oe,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(M=U=te,E=_):U=U.next=te,Fe.lanes|=oe,Ss|=oe;J=J.next}while(J!==null&&J!==u);if(U===null?E=_:U.next=M,!Ar(_,l.memoizedState)&&(yn=!0,ie&&(h=Bl,h!==null)))throw h;l.memoizedState=_,l.baseState=E,l.baseQueue=U,O.lastRenderedState=_}return y===null&&(O.lanes=0),[l.memoizedState,O.dispatch]}function Lv(l){var u=fn(),h=u.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=l;var O=h.dispatch,y=h.pending,_=u.memoizedState;if(y!==null){h.pending=null;var E=y=y.next;do _=l(_,E.action),E=E.next;while(E!==y);Ar(_,u.memoizedState)||(yn=!0),u.memoizedState=_,u.baseQueue===null&&(u.baseState=_),h.lastRenderedState=_}return[_,O]}function zw(l,u,h){var O=Fe,y=fn(),_=ft;if(_){if(h===void 0)throw Error(r(407));h=h()}else h=u();var E=!Ar((Pt||y).memoizedState,h);if(E&&(y.memoizedState=h,yn=!0),y=y.queue,Iv(Bw.bind(null,O,y,l),[l]),y.getSnapshot!==u||E||bn!==null&&bn.memoizedState.tag&1){if(O.flags|=2048,Yl(9,{destroy:void 0},qw.bind(null,O,y,h,u),null),zt===null)throw Error(r(349));_||(Ta&127)!==0||Iw(O,u,h)}return h}function Iw(l,u,h){l.flags|=16384,l={getSnapshot:u,value:h},u=Fe.updateQueue,u===null?(u=Ah(),Fe.updateQueue=u,u.stores=[l]):(h=u.stores,h===null?u.stores=[l]:h.push(l))}function qw(l,u,h,O){u.value=h,u.getSnapshot=O,Xw(u)&&Zw(l)}function Bw(l,u,h){return h(function(){Xw(u)&&Zw(l)})}function Xw(l){var u=l.getSnapshot;l=l.value;try{var h=u();return!Ar(l,h)}catch{return!0}}function Zw(l){var u=_o(l,2);u!==null&&Or(u,l,2)}function Dv(l){var u=ir();if(typeof l=="function"){var h=l;if(l=h(),Qo){Ht(!0);try{h()}finally{Ht(!1)}}}return u.memoizedState=u.baseState=l,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:l},u}function $w(l,u,h,O){return l.baseState=h,Mv(l,Pt,typeof O=="function"?O:Ea)}function Gz(l,u,h,O,y){if(Mh(l))throw Error(r(485));if(l=u.action,l!==null){var _={payload:y,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){_.listeners.push(E)}};q.T!==null?h(!0):_.isTransition=!1,O(_),h=u.pending,h===null?(_.next=u.pending=_,Vw(u,_)):(_.next=h.next,u.pending=h.next=_)}}function Vw(l,u){var h=u.action,O=u.payload,y=l.state;if(u.isTransition){var _=q.T,E={};q.T=E;try{var M=h(y,O),U=q.S;U!==null&&U(E,M),Uw(l,u,M)}catch(J){zv(l,u,J)}finally{_!==null&&E.types!==null&&(_.types=E.types),q.T=_}}else try{_=h(y,O),Uw(l,u,_)}catch(J){zv(l,u,J)}}function Uw(l,u,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(O){Yw(l,u,O)},function(O){return zv(l,u,O)}):Yw(l,u,h)}function Yw(l,u,h){u.status="fulfilled",u.value=h,Fw(u),l.state=h,u=l.pending,u!==null&&(h=u.next,h===u?l.pending=null:(h=h.next,u.next=h,Vw(l,h)))}function zv(l,u,h){var O=l.pending;if(l.pending=null,O!==null){O=O.next;do u.status="rejected",u.reason=h,Fw(u),u=u.next;while(u!==O)}l.action=null}function Fw(l){l=l.listeners;for(var u=0;u<l.length;u++)(0,l[u])()}function Ww(l,u){return u}function Hw(l,u){if(ft){var h=zt.formState;if(h!==null){e:{var O=Fe;if(ft){if(Ft){t:{for(var y=Ft,_=Jr;y.nodeType!==8;){if(!_){y=null;break t}if(y=ti(y.nextSibling),y===null){y=null;break t}}_=y.data,y=_==="F!"||_==="F"?y:null}if(y){Ft=ti(y.nextSibling),O=y.data==="F!";break e}}fs(O)}O=!1}O&&(u=h[0])}}return h=ir(),h.memoizedState=h.baseState=u,O={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ww,lastRenderedState:u},h.queue=O,h=pk.bind(null,Fe,O),O.dispatch=h,O=Dv(!1),_=$v.bind(null,Fe,!1,O.queue),O=ir(),y={state:u,dispatch:null,action:l,pending:null},O.queue=y,h=Gz.bind(null,Fe,y,_,h),y.dispatch=h,O.memoizedState=l,[u,h,!1]}function Gw(l){var u=fn();return Kw(u,Pt,l)}function Kw(l,u,h){if(u=Mv(l,u,Ww)[0],l=Qh(Ea)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var O=Au(u)}catch(E){throw E===Xl?xh:E}else O=u;u=fn();var y=u.queue,_=y.dispatch;return h!==u.memoizedState&&(Fe.flags|=2048,Yl(9,{destroy:void 0},Kz.bind(null,y,h),null)),[O,_,l]}function Kz(l,u){l.action=u}function Jw(l){var u=fn(),h=Pt;if(h!==null)return Kw(u,h,l);fn(),u=u.memoizedState,h=fn();var O=h.queue.dispatch;return h.memoizedState=l,[u,O,!1]}function Yl(l,u,h,O){return l={tag:l,create:h,deps:O,inst:u,next:null},u=Fe.updateQueue,u===null&&(u=Ah(),Fe.updateQueue=u),h=u.lastEffect,h===null?u.lastEffect=l.next=l:(O=h.next,h.next=l,l.next=O,u.lastEffect=l),l}function ek(){return fn().memoizedState}function Nh(l,u,h,O){var y=ir();Fe.flags|=l,y.memoizedState=Yl(1|u,{destroy:void 0},h,O===void 0?null:O)}function Rh(l,u,h,O){var y=fn();O=O===void 0?null:O;var _=y.memoizedState.inst;Pt!==null&&O!==null&&Cv(O,Pt.memoizedState.deps)?y.memoizedState=Yl(u,_,h,O):(Fe.flags|=l,y.memoizedState=Yl(1|u,_,h,O))}function tk(l,u){Nh(8390656,8,l,u)}function Iv(l,u){Rh(2048,8,l,u)}function Jz(l){Fe.flags|=4;var u=Fe.updateQueue;if(u===null)u=Ah(),Fe.updateQueue=u,u.events=[l];else{var h=u.events;h===null?u.events=[l]:h.push(l)}}function nk(l){var u=fn().memoizedState;return Jz({ref:u,nextImpl:l}),function(){if((bt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}function rk(l,u){return Rh(4,2,l,u)}function ik(l,u){return Rh(4,4,l,u)}function ak(l,u){if(typeof u=="function"){l=l();var h=u(l);return function(){typeof h=="function"?h():u(null)}}if(u!=null)return l=l(),u.current=l,function(){u.current=null}}function sk(l,u,h){h=h!=null?h.concat([l]):null,Rh(4,4,ak.bind(null,u,l),h)}function qv(){}function ok(l,u){var h=fn();u=u===void 0?null:u;var O=h.memoizedState;return u!==null&&Cv(u,O[1])?O[0]:(h.memoizedState=[l,u],l)}function lk(l,u){var h=fn();u=u===void 0?null:u;var O=h.memoizedState;if(u!==null&&Cv(u,O[1]))return O[0];if(O=l(),Qo){Ht(!0);try{l()}finally{Ht(!1)}}return h.memoizedState=[O,u],O}function Bv(l,u,h){return h===void 0||(Ta&1073741824)!==0&&(ct&261930)===0?l.memoizedState=u:(l.memoizedState=h,l=c1(),Fe.lanes|=l,Ss|=l,h)}function ck(l,u,h,O){return Ar(h,u)?h:$l.current!==null?(l=Bv(l,h,O),Ar(l,u)||(yn=!0),l):(Ta&42)===0||(Ta&1073741824)!==0&&(ct&261930)===0?(yn=!0,l.memoizedState=h):(l=c1(),Fe.lanes|=l,Ss|=l,u)}function uk(l,u,h,O,y){var _=I.p;I.p=_!==0&&8>_?_:8;var E=q.T,M={};q.T=M,$v(l,!1,u,h);try{var U=y(),J=q.S;if(J!==null&&J(M,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ie=Fz(U,O);Pu(l,u,ie,Lr(l))}else Pu(l,u,O,Lr(l))}catch(oe){Pu(l,u,{then:function(){},status:"rejected",reason:oe},Lr())}finally{I.p=_,E!==null&&M.types!==null&&(E.types=M.types),q.T=E}}function eI(){}function Xv(l,u,h,O){if(l.tag!==5)throw Error(r(476));var y=dk(l).queue;uk(l,y,u,ee,h===null?eI:function(){return fk(l),h(O)})}function dk(l){var u=l.memoizedState;if(u!==null)return u;u={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:ee},next:null};var h={};return u.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:h},next:null},l.memoizedState=u,l=l.alternate,l!==null&&(l.memoizedState=u),u}function fk(l){var u=dk(l);u.next===null&&(u=l.alternate.memoizedState),Pu(l,u.next.queue,{},Lr())}function Zv(){return In(Fu)}function hk(){return fn().memoizedState}function mk(){return fn().memoizedState}function tI(l){for(var u=l.return;u!==null;){switch(u.tag){case 24:case 3:var h=Lr();l=ps(h);var O=gs(u,l,h);O!==null&&(Or(O,u,h),ju(O,u,h)),u={cache:Ov()},l.payload=u;return}u=u.return}}function nI(l,u,h){var O=Lr();h={lane:O,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Mh(l)?gk(u,h):(h=ov(l,u,h,O),h!==null&&(Or(h,l,O),vk(h,u,O)))}function pk(l,u,h){var O=Lr();Pu(l,u,h,O)}function Pu(l,u,h,O){var y={lane:O,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(Mh(l))gk(u,y);else{var _=l.alternate;if(l.lanes===0&&(_===null||_.lanes===0)&&(_=u.lastRenderedReducer,_!==null))try{var E=u.lastRenderedState,M=_(E,h);if(y.hasEagerState=!0,y.eagerState=M,Ar(M,E))return ph(l,u,y,0),zt===null&&mh(),!1}catch{}finally{}if(h=ov(l,u,y,O),h!==null)return Or(h,l,O),vk(h,u,O),!0}return!1}function $v(l,u,h,O){if(O={lane:2,revertLane:xO(),gesture:null,action:O,hasEagerState:!1,eagerState:null,next:null},Mh(l)){if(u)throw Error(r(479))}else u=ov(l,h,O,2),u!==null&&Or(u,l,2)}function Mh(l){var u=l.alternate;return l===Fe||u!==null&&u===Fe}function gk(l,u){Vl=Eh=!0;var h=l.pending;h===null?u.next=u:(u.next=h.next,h.next=u),l.pending=u}function vk(l,u,h){if((h&4194048)!==0){var O=u.lanes;O&=l.pendingLanes,h|=O,u.lanes=h,_e(l,h)}}var Qu={readContext:In,use:Ph,useCallback:an,useContext:an,useEffect:an,useImperativeHandle:an,useLayoutEffect:an,useInsertionEffect:an,useMemo:an,useReducer:an,useRef:an,useState:an,useDebugValue:an,useDeferredValue:an,useTransition:an,useSyncExternalStore:an,useId:an,useHostTransitionStatus:an,useFormState:an,useActionState:an,useOptimistic:an,useMemoCache:an,useCacheRefresh:an};Qu.useEffectEvent=an;var Ok={readContext:In,use:Ph,useCallback:function(l,u){return ir().memoizedState=[l,u===void 0?null:u],l},useContext:In,useEffect:tk,useImperativeHandle:function(l,u,h){h=h!=null?h.concat([l]):null,Nh(4194308,4,ak.bind(null,u,l),h)},useLayoutEffect:function(l,u){return Nh(4194308,4,l,u)},useInsertionEffect:function(l,u){Nh(4,2,l,u)},useMemo:function(l,u){var h=ir();u=u===void 0?null:u;var O=l();if(Qo){Ht(!0);try{l()}finally{Ht(!1)}}return h.memoizedState=[O,u],O},useReducer:function(l,u,h){var O=ir();if(h!==void 0){var y=h(u);if(Qo){Ht(!0);try{h(u)}finally{Ht(!1)}}}else y=u;return O.memoizedState=O.baseState=y,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:y},O.queue=l,l=l.dispatch=nI.bind(null,Fe,l),[O.memoizedState,l]},useRef:function(l){var u=ir();return l={current:l},u.memoizedState=l},useState:function(l){l=Dv(l);var u=l.queue,h=pk.bind(null,Fe,u);return u.dispatch=h,[l.memoizedState,h]},useDebugValue:qv,useDeferredValue:function(l,u){var h=ir();return Bv(h,l,u)},useTransition:function(){var l=Dv(!1);return l=uk.bind(null,Fe,l.queue,!0,!1),ir().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,u,h){var O=Fe,y=ir();if(ft){if(h===void 0)throw Error(r(407));h=h()}else{if(h=u(),zt===null)throw Error(r(349));(ct&127)!==0||Iw(O,u,h)}y.memoizedState=h;var _={value:h,getSnapshot:u};return y.queue=_,tk(Bw.bind(null,O,_,l),[l]),O.flags|=2048,Yl(9,{destroy:void 0},qw.bind(null,O,_,h,u),null),h},useId:function(){var l=ir(),u=zt.identifierPrefix;if(ft){var h=Ui,O=Vi;h=(O&~(1<<32-lt(O)-1)).toString(32)+h,u="_"+u+"R_"+h,h=Ch++,0<h&&(u+="H"+h.toString(32)),u+="_"}else h=Wz++,u="_"+u+"r_"+h.toString(32)+"_";return l.memoizedState=u},useHostTransitionStatus:Zv,useFormState:Hw,useActionState:Hw,useOptimistic:function(l){var u=ir();u.memoizedState=u.baseState=l;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=h,u=$v.bind(null,Fe,!0,h),h.dispatch=u,[l,u]},useMemoCache:Rv,useCacheRefresh:function(){return ir().memoizedState=tI.bind(null,Fe)},useEffectEvent:function(l){var u=ir(),h={impl:l};return u.memoizedState=h,function(){if((bt&2)!==0)throw Error(r(440));return h.impl.apply(void 0,arguments)}}},Vv={readContext:In,use:Ph,useCallback:ok,useContext:In,useEffect:Iv,useImperativeHandle:sk,useInsertionEffect:rk,useLayoutEffect:ik,useMemo:lk,useReducer:Qh,useRef:ek,useState:function(){return Qh(Ea)},useDebugValue:qv,useDeferredValue:function(l,u){var h=fn();return ck(h,Pt.memoizedState,l,u)},useTransition:function(){var l=Qh(Ea)[0],u=fn().memoizedState;return[typeof l=="boolean"?l:Au(l),u]},useSyncExternalStore:zw,useId:hk,useHostTransitionStatus:Zv,useFormState:Gw,useActionState:Gw,useOptimistic:function(l,u){var h=fn();return $w(h,Pt,l,u)},useMemoCache:Rv,useCacheRefresh:mk};Vv.useEffectEvent=nk;var bk={readContext:In,use:Ph,useCallback:ok,useContext:In,useEffect:Iv,useImperativeHandle:sk,useInsertionEffect:rk,useLayoutEffect:ik,useMemo:lk,useReducer:Lv,useRef:ek,useState:function(){return Lv(Ea)},useDebugValue:qv,useDeferredValue:function(l,u){var h=fn();return Pt===null?Bv(h,l,u):ck(h,Pt.memoizedState,l,u)},useTransition:function(){var l=Lv(Ea)[0],u=fn().memoizedState;return[typeof l=="boolean"?l:Au(l),u]},useSyncExternalStore:zw,useId:hk,useHostTransitionStatus:Zv,useFormState:Jw,useActionState:Jw,useOptimistic:function(l,u){var h=fn();return Pt!==null?$w(h,Pt,l,u):(h.baseState=l,[l,h.queue.dispatch])},useMemoCache:Rv,useCacheRefresh:mk};bk.useEffectEvent=nk;function Uv(l,u,h,O){u=l.memoizedState,h=h(O,u),h=h==null?u:m({},u,h),l.memoizedState=h,l.lanes===0&&(l.updateQueue.baseState=h)}var Yv={enqueueSetState:function(l,u,h){l=l._reactInternals;var O=Lr(),y=ps(O);y.payload=u,h!=null&&(y.callback=h),u=gs(l,y,O),u!==null&&(Or(u,l,O),ju(u,l,O))},enqueueReplaceState:function(l,u,h){l=l._reactInternals;var O=Lr(),y=ps(O);y.tag=1,y.payload=u,h!=null&&(y.callback=h),u=gs(l,y,O),u!==null&&(Or(u,l,O),ju(u,l,O))},enqueueForceUpdate:function(l,u){l=l._reactInternals;var h=Lr(),O=ps(h);O.tag=2,u!=null&&(O.callback=u),u=gs(l,O,h),u!==null&&(Or(u,l,h),ju(u,l,h))}};function yk(l,u,h,O,y,_,E){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(O,_,E):u.prototype&&u.prototype.isPureReactComponent?!Ou(h,O)||!Ou(y,_):!0}function Sk(l,u,h,O){l=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(h,O),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(h,O),u.state!==l&&Yv.enqueueReplaceState(u,u.state,null)}function No(l,u){var h=u;if("ref"in u){h={};for(var O in u)O!=="ref"&&(h[O]=u[O])}if(l=l.defaultProps){h===u&&(h=m({},h));for(var y in l)h[y]===void 0&&(h[y]=l[y])}return h}function xk(l){hh(l)}function _k(l){console.error(l)}function wk(l){hh(l)}function Lh(l,u){try{var h=l.onUncaughtError;h(u.value,{componentStack:u.stack})}catch(O){setTimeout(function(){throw O})}}function kk(l,u,h){try{var O=l.onCaughtError;O(h.value,{componentStack:h.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Fv(l,u,h){return h=ps(h),h.tag=3,h.payload={element:null},h.callback=function(){Lh(l,u)},h}function jk(l){return l=ps(l),l.tag=3,l}function Tk(l,u,h,O){var y=h.type.getDerivedStateFromError;if(typeof y=="function"){var _=O.value;l.payload=function(){return y(_)},l.callback=function(){kk(u,h,O)}}var E=h.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(l.callback=function(){kk(u,h,O),typeof y!="function"&&(xs===null?xs=new Set([this]):xs.add(this));var M=O.stack;this.componentDidCatch(O.value,{componentStack:M!==null?M:""})})}function rI(l,u,h,O,y){if(h.flags|=32768,O!==null&&typeof O=="object"&&typeof O.then=="function"){if(u=h.alternate,u!==null&&Il(u,h,y,!0),h=Qr.current,h!==null){switch(h.tag){case 31:case 13:return ei===null?Fh():h.alternate===null&&sn===0&&(sn=3),h.flags&=-257,h.flags|=65536,h.lanes=y,O===_h?h.flags|=16384:(u=h.updateQueue,u===null?h.updateQueue=new Set([O]):u.add(O),bO(l,O,y)),!1;case 22:return h.flags|=65536,O===_h?h.flags|=16384:(u=h.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([O])},h.updateQueue=u):(h=u.retryQueue,h===null?u.retryQueue=new Set([O]):h.add(O)),bO(l,O,y)),!1}throw Error(r(435,h.tag))}return bO(l,O,y),Fh(),!1}if(ft)return u=Qr.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=y,O!==hv&&(l=Error(r(422),{cause:O}),Su(Hr(l,h)))):(O!==hv&&(u=Error(r(423),{cause:O}),Su(Hr(u,h))),l=l.current.alternate,l.flags|=65536,y&=-y,l.lanes|=y,O=Hr(O,h),y=Fv(l.stateNode,O,y),wv(l,y),sn!==4&&(sn=2)),!1;var _=Error(r(520),{cause:O});if(_=Hr(_,h),qu===null?qu=[_]:qu.push(_),sn!==4&&(sn=2),u===null)return!0;O=Hr(O,h),h=u;do{switch(h.tag){case 3:return h.flags|=65536,l=y&-y,h.lanes|=l,l=Fv(h.stateNode,O,l),wv(h,l),!1;case 1:if(u=h.type,_=h.stateNode,(h.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(xs===null||!xs.has(_))))return h.flags|=65536,y&=-y,h.lanes|=y,y=jk(y),Tk(y,l,h,O),wv(h,y),!1}h=h.return}while(h!==null);return!1}var Wv=Error(r(461)),yn=!1;function qn(l,u,h,O){u.child=l===null?Pw(u,null,h,O):Po(u,l.child,h,O)}function Ek(l,u,h,O,y){h=h.render;var _=u.ref;if("ref"in O){var E={};for(var M in O)M!=="ref"&&(E[M]=O[M])}else E=O;return To(u),O=Av(l,u,h,E,_,y),M=Pv(),l!==null&&!yn?(Qv(l,u,y),Ca(l,u,y)):(ft&&M&&dv(u),u.flags|=1,qn(l,u,O,y),u.child)}function Ck(l,u,h,O,y){if(l===null){var _=h.type;return typeof _=="function"&&!lv(_)&&_.defaultProps===void 0&&h.compare===null?(u.tag=15,u.type=_,Ak(l,u,_,O,y)):(l=vh(h.type,null,O,u,u.mode,y),l.ref=u.ref,l.return=u,u.child=l)}if(_=l.child,!rO(l,y)){var E=_.memoizedProps;if(h=h.compare,h=h!==null?h:Ou,h(E,O)&&l.ref===u.ref)return Ca(l,u,y)}return u.flags|=1,l=_a(_,O),l.ref=u.ref,l.return=u,u.child=l}function Ak(l,u,h,O,y){if(l!==null){var _=l.memoizedProps;if(Ou(_,O)&&l.ref===u.ref)if(yn=!1,u.pendingProps=O=_,rO(l,y))(l.flags&131072)!==0&&(yn=!0);else return u.lanes=l.lanes,Ca(l,u,y)}return Hv(l,u,h,O,y)}function Pk(l,u,h,O){var y=O.children,_=l!==null?l.memoizedState:null;if(l===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),O.mode==="hidden"){if((u.flags&128)!==0){if(_=_!==null?_.baseLanes|h:h,l!==null){for(O=u.child=l.child,y=0;O!==null;)y=y|O.lanes|O.childLanes,O=O.sibling;O=y&~_}else O=0,u.child=null;return Qk(l,u,_,h,O)}if((h&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},l!==null&&Sh(u,_!==null?_.cachePool:null),_!==null?Rw(u,_):jv(),Mw(u);else return O=u.lanes=536870912,Qk(l,u,_!==null?_.baseLanes|h:h,h,O)}else _!==null?(Sh(u,_.cachePool),Rw(u,_),Os(),u.memoizedState=null):(l!==null&&Sh(u,null),jv(),Os());return qn(l,u,y,h),u.child}function Nu(l,u){return l!==null&&l.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function Qk(l,u,h,O,y){var _=yv();return _=_===null?null:{parent:On._currentValue,pool:_},u.memoizedState={baseLanes:h,cachePool:_},l!==null&&Sh(u,null),jv(),Mw(u),l!==null&&Il(l,u,O,!0),u.childLanes=y,null}function Dh(l,u){return u=Ih({mode:u.mode,children:u.children},l.mode),u.ref=l.ref,l.child=u,u.return=l,u}function Nk(l,u,h){return Po(u,l.child,null,h),l=Dh(u,u.pendingProps),l.flags|=2,Nr(u),u.memoizedState=null,l}function iI(l,u,h){var O=u.pendingProps,y=(u.flags&128)!==0;if(u.flags&=-129,l===null){if(ft){if(O.mode==="hidden")return l=Dh(u,O),u.lanes=536870912,Nu(null,l);if(Ev(u),(l=Ft)?(l=V1(l,Jr),l=l!==null&&l.data==="&"?l:null,l!==null&&(u.memoizedState={dehydrated:l,treeContext:us!==null?{id:Vi,overflow:Ui}:null,retryLane:536870912,hydrationErrors:null},h=gw(l),h.return=u,u.child=h,zn=u,Ft=null)):l=null,l===null)throw fs(u);return u.lanes=536870912,null}return Dh(u,O)}var _=l.memoizedState;if(_!==null){var E=_.dehydrated;if(Ev(u),y)if(u.flags&256)u.flags&=-257,u=Nk(l,u,h);else if(u.memoizedState!==null)u.child=l.child,u.flags|=128,u=null;else throw Error(r(558));else if(yn||Il(l,u,h,!1),y=(h&l.childLanes)!==0,yn||y){if(O=zt,O!==null&&(E=He(O,h),E!==0&&E!==_.retryLane))throw _.retryLane=E,_o(l,E),Or(O,l,E),Wv;Fh(),u=Nk(l,u,h)}else l=_.treeContext,Ft=ti(E.nextSibling),zn=u,ft=!0,ds=null,Jr=!1,l!==null&&bw(u,l),u=Dh(u,O),u.flags|=4096;return u}return l=_a(l.child,{mode:O.mode,children:O.children}),l.ref=u.ref,u.child=l,l.return=u,l}function zh(l,u){var h=u.ref;if(h===null)l!==null&&l.ref!==null&&(u.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(r(284));(l===null||l.ref!==h)&&(u.flags|=4194816)}}function Hv(l,u,h,O,y){return To(u),h=Av(l,u,h,O,void 0,y),O=Pv(),l!==null&&!yn?(Qv(l,u,y),Ca(l,u,y)):(ft&&O&&dv(u),u.flags|=1,qn(l,u,h,y),u.child)}function Rk(l,u,h,O,y,_){return To(u),u.updateQueue=null,h=Dw(u,O,h,y),Lw(l),O=Pv(),l!==null&&!yn?(Qv(l,u,_),Ca(l,u,_)):(ft&&O&&dv(u),u.flags|=1,qn(l,u,h,_),u.child)}function Mk(l,u,h,O,y){if(To(u),u.stateNode===null){var _=Ml,E=h.contextType;typeof E=="object"&&E!==null&&(_=In(E)),_=new h(O,_),u.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=Yv,u.stateNode=_,_._reactInternals=u,_=u.stateNode,_.props=O,_.state=u.memoizedState,_.refs={},xv(u),E=h.contextType,_.context=typeof E=="object"&&E!==null?In(E):Ml,_.state=u.memoizedState,E=h.getDerivedStateFromProps,typeof E=="function"&&(Uv(u,h,E,O),_.state=u.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(E=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),E!==_.state&&Yv.enqueueReplaceState(_,_.state,null),Eu(u,O,_,y),Tu(),_.state=u.memoizedState),typeof _.componentDidMount=="function"&&(u.flags|=4194308),O=!0}else if(l===null){_=u.stateNode;var M=u.memoizedProps,U=No(h,M);_.props=U;var J=_.context,ie=h.contextType;E=Ml,typeof ie=="object"&&ie!==null&&(E=In(ie));var oe=h.getDerivedStateFromProps;ie=typeof oe=="function"||typeof _.getSnapshotBeforeUpdate=="function",M=u.pendingProps!==M,ie||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(M||J!==E)&&Sk(u,_,O,E),ms=!1;var te=u.memoizedState;_.state=te,Eu(u,O,_,y),Tu(),J=u.memoizedState,M||te!==J||ms?(typeof oe=="function"&&(Uv(u,h,oe,O),J=u.memoizedState),(U=ms||yk(u,h,U,O,te,J,E))?(ie||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(u.flags|=4194308)):(typeof _.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=O,u.memoizedState=J),_.props=O,_.state=J,_.context=E,O=U):(typeof _.componentDidMount=="function"&&(u.flags|=4194308),O=!1)}else{_=u.stateNode,_v(l,u),E=u.memoizedProps,ie=No(h,E),_.props=ie,oe=u.pendingProps,te=_.context,J=h.contextType,U=Ml,typeof J=="object"&&J!==null&&(U=In(J)),M=h.getDerivedStateFromProps,(J=typeof M=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(E!==oe||te!==U)&&Sk(u,_,O,U),ms=!1,te=u.memoizedState,_.state=te,Eu(u,O,_,y),Tu();var ne=u.memoizedState;E!==oe||te!==ne||ms||l!==null&&l.dependencies!==null&&bh(l.dependencies)?(typeof M=="function"&&(Uv(u,h,M,O),ne=u.memoizedState),(ie=ms||yk(u,h,ie,O,te,ne,U)||l!==null&&l.dependencies!==null&&bh(l.dependencies))?(J||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(O,ne,U),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(O,ne,U)),typeof _.componentDidUpdate=="function"&&(u.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof _.componentDidUpdate!="function"||E===l.memoizedProps&&te===l.memoizedState||(u.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||E===l.memoizedProps&&te===l.memoizedState||(u.flags|=1024),u.memoizedProps=O,u.memoizedState=ne),_.props=O,_.state=ne,_.context=U,O=ie):(typeof _.componentDidUpdate!="function"||E===l.memoizedProps&&te===l.memoizedState||(u.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||E===l.memoizedProps&&te===l.memoizedState||(u.flags|=1024),O=!1)}return _=O,zh(l,u),O=(u.flags&128)!==0,_||O?(_=u.stateNode,h=O&&typeof h.getDerivedStateFromError!="function"?null:_.render(),u.flags|=1,l!==null&&O?(u.child=Po(u,l.child,null,y),u.child=Po(u,null,h,y)):qn(l,u,h,y),u.memoizedState=_.state,l=u.child):l=Ca(l,u,y),l}function Lk(l,u,h,O){return ko(),u.flags|=256,qn(l,u,h,O),u.child}var Gv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kv(l){return{baseLanes:l,cachePool:kw()}}function Jv(l,u,h){return l=l!==null?l.childLanes&~h:0,u&&(l|=Mr),l}function Dk(l,u,h){var O=u.pendingProps,y=!1,_=(u.flags&128)!==0,E;if((E=_)||(E=l!==null&&l.memoizedState===null?!1:(dn.current&2)!==0),E&&(y=!0,u.flags&=-129),E=(u.flags&32)!==0,u.flags&=-33,l===null){if(ft){if(y?vs(u):Os(),(l=Ft)?(l=V1(l,Jr),l=l!==null&&l.data!=="&"?l:null,l!==null&&(u.memoizedState={dehydrated:l,treeContext:us!==null?{id:Vi,overflow:Ui}:null,retryLane:536870912,hydrationErrors:null},h=gw(l),h.return=u,u.child=h,zn=u,Ft=null)):l=null,l===null)throw fs(u);return MO(l)?u.lanes=32:u.lanes=536870912,null}var M=O.children;return O=O.fallback,y?(Os(),y=u.mode,M=Ih({mode:"hidden",children:M},y),O=wo(O,y,h,null),M.return=u,O.return=u,M.sibling=O,u.child=M,O=u.child,O.memoizedState=Kv(h),O.childLanes=Jv(l,E,h),u.memoizedState=Gv,Nu(null,O)):(vs(u),eO(u,M))}var U=l.memoizedState;if(U!==null&&(M=U.dehydrated,M!==null)){if(_)u.flags&256?(vs(u),u.flags&=-257,u=tO(l,u,h)):u.memoizedState!==null?(Os(),u.child=l.child,u.flags|=128,u=null):(Os(),M=O.fallback,y=u.mode,O=Ih({mode:"visible",children:O.children},y),M=wo(M,y,h,null),M.flags|=2,O.return=u,M.return=u,O.sibling=M,u.child=O,Po(u,l.child,null,h),O=u.child,O.memoizedState=Kv(h),O.childLanes=Jv(l,E,h),u.memoizedState=Gv,u=Nu(null,O));else if(vs(u),MO(M)){if(E=M.nextSibling&&M.nextSibling.dataset,E)var J=E.dgst;E=J,O=Error(r(419)),O.stack="",O.digest=E,Su({value:O,source:null,stack:null}),u=tO(l,u,h)}else if(yn||Il(l,u,h,!1),E=(h&l.childLanes)!==0,yn||E){if(E=zt,E!==null&&(O=He(E,h),O!==0&&O!==U.retryLane))throw U.retryLane=O,_o(l,O),Or(E,l,O),Wv;RO(M)||Fh(),u=tO(l,u,h)}else RO(M)?(u.flags|=192,u.child=l.child,u=null):(l=U.treeContext,Ft=ti(M.nextSibling),zn=u,ft=!0,ds=null,Jr=!1,l!==null&&bw(u,l),u=eO(u,O.children),u.flags|=4096);return u}return y?(Os(),M=O.fallback,y=u.mode,U=l.child,J=U.sibling,O=_a(U,{mode:"hidden",children:O.children}),O.subtreeFlags=U.subtreeFlags&65011712,J!==null?M=_a(J,M):(M=wo(M,y,h,null),M.flags|=2),M.return=u,O.return=u,O.sibling=M,u.child=O,Nu(null,O),O=u.child,M=l.child.memoizedState,M===null?M=Kv(h):(y=M.cachePool,y!==null?(U=On._currentValue,y=y.parent!==U?{parent:U,pool:U}:y):y=kw(),M={baseLanes:M.baseLanes|h,cachePool:y}),O.memoizedState=M,O.childLanes=Jv(l,E,h),u.memoizedState=Gv,Nu(l.child,O)):(vs(u),h=l.child,l=h.sibling,h=_a(h,{mode:"visible",children:O.children}),h.return=u,h.sibling=null,l!==null&&(E=u.deletions,E===null?(u.deletions=[l],u.flags|=16):E.push(l)),u.child=h,u.memoizedState=null,h)}function eO(l,u){return u=Ih({mode:"visible",children:u},l.mode),u.return=l,l.child=u}function Ih(l,u){return l=Pr(22,l,null,u),l.lanes=0,l}function tO(l,u,h){return Po(u,l.child,null,h),l=eO(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function zk(l,u,h){l.lanes|=u;var O=l.alternate;O!==null&&(O.lanes|=u),gv(l.return,u,h)}function nO(l,u,h,O,y,_){var E=l.memoizedState;E===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:O,tail:h,tailMode:y,treeForkCount:_}:(E.isBackwards=u,E.rendering=null,E.renderingStartTime=0,E.last=O,E.tail=h,E.tailMode=y,E.treeForkCount=_)}function Ik(l,u,h){var O=u.pendingProps,y=O.revealOrder,_=O.tail;O=O.children;var E=dn.current,M=(E&2)!==0;if(M?(E=E&1|2,u.flags|=128):E&=1,N(dn,E),qn(l,u,O,h),O=ft?yu:0,!M&&l!==null&&(l.flags&128)!==0)e:for(l=u.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&zk(l,h,u);else if(l.tag===19)zk(l,h,u);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===u)break e;for(;l.sibling===null;){if(l.return===null||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(y){case"forwards":for(h=u.child,y=null;h!==null;)l=h.alternate,l!==null&&Th(l)===null&&(y=h),h=h.sibling;h=y,h===null?(y=u.child,u.child=null):(y=h.sibling,h.sibling=null),nO(u,!1,y,h,_,O);break;case"backwards":case"unstable_legacy-backwards":for(h=null,y=u.child,u.child=null;y!==null;){if(l=y.alternate,l!==null&&Th(l)===null){u.child=y;break}l=y.sibling,y.sibling=h,h=y,y=l}nO(u,!0,h,null,_,O);break;case"together":nO(u,!1,null,null,void 0,O);break;default:u.memoizedState=null}return u.child}function Ca(l,u,h){if(l!==null&&(u.dependencies=l.dependencies),Ss|=u.lanes,(h&u.childLanes)===0)if(l!==null){if(Il(l,u,h,!1),(h&u.childLanes)===0)return null}else return null;if(l!==null&&u.child!==l.child)throw Error(r(153));if(u.child!==null){for(l=u.child,h=_a(l,l.pendingProps),u.child=h,h.return=u;l.sibling!==null;)l=l.sibling,h=h.sibling=_a(l,l.pendingProps),h.return=u;h.sibling=null}return u.child}function rO(l,u){return(l.lanes&u)!==0?!0:(l=l.dependencies,!!(l!==null&&bh(l)))}function aI(l,u,h){switch(u.tag){case 3:Ae(u,u.stateNode.containerInfo),hs(u,On,l.memoizedState.cache),ko();break;case 27:case 5:xe(u);break;case 4:Ae(u,u.stateNode.containerInfo);break;case 10:hs(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,Ev(u),null;break;case 13:var O=u.memoizedState;if(O!==null)return O.dehydrated!==null?(vs(u),u.flags|=128,null):(h&u.child.childLanes)!==0?Dk(l,u,h):(vs(u),l=Ca(l,u,h),l!==null?l.sibling:null);vs(u);break;case 19:var y=(l.flags&128)!==0;if(O=(h&u.childLanes)!==0,O||(Il(l,u,h,!1),O=(h&u.childLanes)!==0),y){if(O)return Ik(l,u,h);u.flags|=128}if(y=u.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),N(dn,dn.current),O)break;return null;case 22:return u.lanes=0,Pk(l,u,h,u.pendingProps);case 24:hs(u,On,l.memoizedState.cache)}return Ca(l,u,h)}function qk(l,u,h){if(l!==null)if(l.memoizedProps!==u.pendingProps)yn=!0;else{if(!rO(l,h)&&(u.flags&128)===0)return yn=!1,aI(l,u,h);yn=(l.flags&131072)!==0}else yn=!1,ft&&(u.flags&1048576)!==0&&Ow(u,yu,u.index);switch(u.lanes=0,u.tag){case 16:e:{var O=u.pendingProps;if(l=Co(u.elementType),u.type=l,typeof l=="function")lv(l)?(O=No(l,O),u.tag=1,u=Mk(null,u,l,O,h)):(u.tag=0,u=Hv(null,u,l,O,h));else{if(l!=null){var y=l.$$typeof;if(y===A){u.tag=11,u=Ek(null,u,l,O,h);break e}else if(y===R){u.tag=14,u=Ck(null,u,l,O,h);break e}}throw u=Y(l)||l,Error(r(306,u,""))}}return u;case 0:return Hv(l,u,u.type,u.pendingProps,h);case 1:return O=u.type,y=No(O,u.pendingProps),Mk(l,u,O,y,h);case 3:e:{if(Ae(u,u.stateNode.containerInfo),l===null)throw Error(r(387));O=u.pendingProps;var _=u.memoizedState;y=_.element,_v(l,u),Eu(u,O,null,h);var E=u.memoizedState;if(O=E.cache,hs(u,On,O),O!==_.cache&&vv(u,[On],h,!0),Tu(),O=E.element,_.isDehydrated)if(_={element:O,isDehydrated:!1,cache:E.cache},u.updateQueue.baseState=_,u.memoizedState=_,u.flags&256){u=Lk(l,u,O,h);break e}else if(O!==y){y=Hr(Error(r(424)),u),Su(y),u=Lk(l,u,O,h);break e}else{switch(l=u.stateNode.containerInfo,l.nodeType){case 9:l=l.body;break;default:l=l.nodeName==="HTML"?l.ownerDocument.body:l}for(Ft=ti(l.firstChild),zn=u,ft=!0,ds=null,Jr=!0,h=Pw(u,null,O,h),u.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(ko(),O===y){u=Ca(l,u,h);break e}qn(l,u,O,h)}u=u.child}return u;case 26:return zh(l,u),l===null?(h=G1(u.type,null,u.pendingProps,null))?u.memoizedState=h:ft||(h=u.type,l=u.pendingProps,O=tm(Oe.current).createElement(h),O[un]=u,O[Pn]=l,Bn(O,h,l),rn(O),u.stateNode=O):u.memoizedState=G1(u.type,l.memoizedProps,u.pendingProps,l.memoizedState),null;case 27:return xe(u),l===null&&ft&&(O=u.stateNode=F1(u.type,u.pendingProps,Oe.current),zn=u,Jr=!0,y=Ft,js(u.type)?(LO=y,Ft=ti(O.firstChild)):Ft=y),qn(l,u,u.pendingProps.children,h),zh(l,u),l===null&&(u.flags|=4194304),u.child;case 5:return l===null&&ft&&((y=O=Ft)&&(O=MI(O,u.type,u.pendingProps,Jr),O!==null?(u.stateNode=O,zn=u,Ft=ti(O.firstChild),Jr=!1,y=!0):y=!1),y||fs(u)),xe(u),y=u.type,_=u.pendingProps,E=l!==null?l.memoizedProps:null,O=_.children,PO(y,_)?O=null:E!==null&&PO(y,E)&&(u.flags|=32),u.memoizedState!==null&&(y=Av(l,u,Hz,null,null,h),Fu._currentValue=y),zh(l,u),qn(l,u,O,h),u.child;case 6:return l===null&&ft&&((l=h=Ft)&&(h=LI(h,u.pendingProps,Jr),h!==null?(u.stateNode=h,zn=u,Ft=null,l=!0):l=!1),l||fs(u)),null;case 13:return Dk(l,u,h);case 4:return Ae(u,u.stateNode.containerInfo),O=u.pendingProps,l===null?u.child=Po(u,null,O,h):qn(l,u,O,h),u.child;case 11:return Ek(l,u,u.type,u.pendingProps,h);case 7:return qn(l,u,u.pendingProps,h),u.child;case 8:return qn(l,u,u.pendingProps.children,h),u.child;case 12:return qn(l,u,u.pendingProps.children,h),u.child;case 10:return O=u.pendingProps,hs(u,u.type,O.value),qn(l,u,O.children,h),u.child;case 9:return y=u.type._context,O=u.pendingProps.children,To(u),y=In(y),O=O(y),u.flags|=1,qn(l,u,O,h),u.child;case 14:return Ck(l,u,u.type,u.pendingProps,h);case 15:return Ak(l,u,u.type,u.pendingProps,h);case 19:return Ik(l,u,h);case 31:return iI(l,u,h);case 22:return Pk(l,u,h,u.pendingProps);case 24:return To(u),O=In(On),l===null?(y=yv(),y===null&&(y=zt,_=Ov(),y.pooledCache=_,_.refCount++,_!==null&&(y.pooledCacheLanes|=h),y=_),u.memoizedState={parent:O,cache:y},xv(u),hs(u,On,y)):((l.lanes&h)!==0&&(_v(l,u),Eu(u,null,null,h),Tu()),y=l.memoizedState,_=u.memoizedState,y.parent!==O?(y={parent:O,cache:O},u.memoizedState=y,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=y),hs(u,On,O)):(O=_.cache,hs(u,On,O),O!==y.cache&&vv(u,[On],h,!0))),qn(l,u,u.pendingProps.children,h),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function Aa(l){l.flags|=4}function iO(l,u,h,O,y){if((u=(l.mode&32)!==0)&&(u=!1),u){if(l.flags|=16777216,(y&335544128)===y)if(l.stateNode.complete)l.flags|=8192;else if(h1())l.flags|=8192;else throw Ao=_h,Sv}else l.flags&=-16777217}function Bk(l,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)l.flags&=-16777217;else if(l.flags|=16777216,!nj(u))if(h1())l.flags|=8192;else throw Ao=_h,Sv}function qh(l,u){u!==null&&(l.flags|=4),l.flags&16384&&(u=l.tag!==22?en():536870912,l.lanes|=u,Gl|=u)}function Ru(l,u){if(!ft)switch(l.tailMode){case"hidden":u=l.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?l.tail=null:h.sibling=null;break;case"collapsed":h=l.tail;for(var O=null;h!==null;)h.alternate!==null&&(O=h),h=h.sibling;O===null?u||l.tail===null?l.tail=null:l.tail.sibling=null:O.sibling=null}}function Wt(l){var u=l.alternate!==null&&l.alternate.child===l.child,h=0,O=0;if(u)for(var y=l.child;y!==null;)h|=y.lanes|y.childLanes,O|=y.subtreeFlags&65011712,O|=y.flags&65011712,y.return=l,y=y.sibling;else for(y=l.child;y!==null;)h|=y.lanes|y.childLanes,O|=y.subtreeFlags,O|=y.flags,y.return=l,y=y.sibling;return l.subtreeFlags|=O,l.childLanes=h,u}function sI(l,u,h){var O=u.pendingProps;switch(fv(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wt(u),null;case 1:return Wt(u),null;case 3:return h=u.stateNode,O=null,l!==null&&(O=l.memoizedState.cache),u.memoizedState.cache!==O&&(u.flags|=2048),ja(On),Ze(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(l===null||l.child===null)&&(zl(u)?Aa(u):l===null||l.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,mv())),Wt(u),null;case 26:var y=u.type,_=u.memoizedState;return l===null?(Aa(u),_!==null?(Wt(u),Bk(u,_)):(Wt(u),iO(u,y,null,O,h))):_?_!==l.memoizedState?(Aa(u),Wt(u),Bk(u,_)):(Wt(u),u.flags&=-16777217):(l=l.memoizedProps,l!==O&&Aa(u),Wt(u),iO(u,y,l,O,h)),null;case 27:if(Ye(u),h=Oe.current,y=u.type,l!==null&&u.stateNode!=null)l.memoizedProps!==O&&Aa(u);else{if(!O){if(u.stateNode===null)throw Error(r(166));return Wt(u),null}l=le.current,zl(u)?yw(u):(l=F1(y,O,h),u.stateNode=l,Aa(u))}return Wt(u),null;case 5:if(Ye(u),y=u.type,l!==null&&u.stateNode!=null)l.memoizedProps!==O&&Aa(u);else{if(!O){if(u.stateNode===null)throw Error(r(166));return Wt(u),null}if(_=le.current,zl(u))yw(u);else{var E=tm(Oe.current);switch(_){case 1:_=E.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:_=E.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":_=E.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":_=E.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":_=E.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof O.is=="string"?E.createElement("select",{is:O.is}):E.createElement("select"),O.multiple?_.multiple=!0:O.size&&(_.size=O.size);break;default:_=typeof O.is=="string"?E.createElement(y,{is:O.is}):E.createElement(y)}}_[un]=u,_[Pn]=O;e:for(E=u.child;E!==null;){if(E.tag===5||E.tag===6)_.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===u)break e;for(;E.sibling===null;){if(E.return===null||E.return===u)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}u.stateNode=_;e:switch(Bn(_,y,O),y){case"button":case"input":case"select":case"textarea":O=!!O.autoFocus;break e;case"img":O=!0;break e;default:O=!1}O&&Aa(u)}}return Wt(u),iO(u,u.type,l===null?null:l.memoizedProps,u.pendingProps,h),null;case 6:if(l&&u.stateNode!=null)l.memoizedProps!==O&&Aa(u);else{if(typeof O!="string"&&u.stateNode===null)throw Error(r(166));if(l=Oe.current,zl(u)){if(l=u.stateNode,h=u.memoizedProps,O=null,y=zn,y!==null)switch(y.tag){case 27:case 5:O=y.memoizedProps}l[un]=u,l=!!(l.nodeValue===h||O!==null&&O.suppressHydrationWarning===!0||D1(l.nodeValue,h)),l||fs(u,!0)}else l=tm(l).createTextNode(O),l[un]=u,u.stateNode=l}return Wt(u),null;case 31:if(h=u.memoizedState,l===null||l.memoizedState!==null){if(O=zl(u),h!==null){if(l===null){if(!O)throw Error(r(318));if(l=u.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(557));l[un]=u}else ko(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Wt(u),l=!1}else h=mv(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=h),l=!0;if(!l)return u.flags&256?(Nr(u),u):(Nr(u),null);if((u.flags&128)!==0)throw Error(r(558))}return Wt(u),null;case 13:if(O=u.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(y=zl(u),O!==null&&O.dehydrated!==null){if(l===null){if(!y)throw Error(r(318));if(y=u.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[un]=u}else ko(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Wt(u),y=!1}else y=mv(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=y),y=!0;if(!y)return u.flags&256?(Nr(u),u):(Nr(u),null)}return Nr(u),(u.flags&128)!==0?(u.lanes=h,u):(h=O!==null,l=l!==null&&l.memoizedState!==null,h&&(O=u.child,y=null,O.alternate!==null&&O.alternate.memoizedState!==null&&O.alternate.memoizedState.cachePool!==null&&(y=O.alternate.memoizedState.cachePool.pool),_=null,O.memoizedState!==null&&O.memoizedState.cachePool!==null&&(_=O.memoizedState.cachePool.pool),_!==y&&(O.flags|=2048)),h!==l&&h&&(u.child.flags|=8192),qh(u,u.updateQueue),Wt(u),null);case 4:return Ze(),l===null&&jO(u.stateNode.containerInfo),Wt(u),null;case 10:return ja(u.type),Wt(u),null;case 19:if(se(dn),O=u.memoizedState,O===null)return Wt(u),null;if(y=(u.flags&128)!==0,_=O.rendering,_===null)if(y)Ru(O,!1);else{if(sn!==0||l!==null&&(l.flags&128)!==0)for(l=u.child;l!==null;){if(_=Th(l),_!==null){for(u.flags|=128,Ru(O,!1),l=_.updateQueue,u.updateQueue=l,qh(u,l),u.subtreeFlags=0,l=h,h=u.child;h!==null;)pw(h,l),h=h.sibling;return N(dn,dn.current&1|2),ft&&wa(u,O.treeForkCount),u.child}l=l.sibling}O.tail!==null&&et()>Vh&&(u.flags|=128,y=!0,Ru(O,!1),u.lanes=4194304)}else{if(!y)if(l=Th(_),l!==null){if(u.flags|=128,y=!0,l=l.updateQueue,u.updateQueue=l,qh(u,l),Ru(O,!0),O.tail===null&&O.tailMode==="hidden"&&!_.alternate&&!ft)return Wt(u),null}else 2*et()-O.renderingStartTime>Vh&&h!==536870912&&(u.flags|=128,y=!0,Ru(O,!1),u.lanes=4194304);O.isBackwards?(_.sibling=u.child,u.child=_):(l=O.last,l!==null?l.sibling=_:u.child=_,O.last=_)}return O.tail!==null?(l=O.tail,O.rendering=l,O.tail=l.sibling,O.renderingStartTime=et(),l.sibling=null,h=dn.current,N(dn,y?h&1|2:h&1),ft&&wa(u,O.treeForkCount),l):(Wt(u),null);case 22:case 23:return Nr(u),Tv(),O=u.memoizedState!==null,l!==null?l.memoizedState!==null!==O&&(u.flags|=8192):O&&(u.flags|=8192),O?(h&536870912)!==0&&(u.flags&128)===0&&(Wt(u),u.subtreeFlags&6&&(u.flags|=8192)):Wt(u),h=u.updateQueue,h!==null&&qh(u,h.retryQueue),h=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),O=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(O=u.memoizedState.cachePool.pool),O!==h&&(u.flags|=2048),l!==null&&se(Eo),null;case 24:return h=null,l!==null&&(h=l.memoizedState.cache),u.memoizedState.cache!==h&&(u.flags|=2048),ja(On),Wt(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function oI(l,u){switch(fv(u),u.tag){case 1:return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return ja(On),Ze(),l=u.flags,(l&65536)!==0&&(l&128)===0?(u.flags=l&-65537|128,u):null;case 26:case 27:case 5:return Ye(u),null;case 31:if(u.memoizedState!==null){if(Nr(u),u.alternate===null)throw Error(r(340));ko()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 13:if(Nr(u),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(r(340));ko()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return se(dn),null;case 4:return Ze(),null;case 10:return ja(u.type),null;case 22:case 23:return Nr(u),Tv(),l!==null&&se(Eo),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 24:return ja(On),null;case 25:return null;default:return null}}function Xk(l,u){switch(fv(u),u.tag){case 3:ja(On),Ze();break;case 26:case 27:case 5:Ye(u);break;case 4:Ze();break;case 31:u.memoizedState!==null&&Nr(u);break;case 13:Nr(u);break;case 19:se(dn);break;case 10:ja(u.type);break;case 22:case 23:Nr(u),Tv(),l!==null&&se(Eo);break;case 24:ja(On)}}function Mu(l,u){try{var h=u.updateQueue,O=h!==null?h.lastEffect:null;if(O!==null){var y=O.next;h=y;do{if((h.tag&l)===l){O=void 0;var _=h.create,E=h.inst;O=_(),E.destroy=O}h=h.next}while(h!==y)}}catch(M){Tt(u,u.return,M)}}function bs(l,u,h){try{var O=u.updateQueue,y=O!==null?O.lastEffect:null;if(y!==null){var _=y.next;O=_;do{if((O.tag&l)===l){var E=O.inst,M=E.destroy;if(M!==void 0){E.destroy=void 0,y=u;var U=h,J=M;try{J()}catch(ie){Tt(y,U,ie)}}}O=O.next}while(O!==_)}}catch(ie){Tt(u,u.return,ie)}}function Zk(l){var u=l.updateQueue;if(u!==null){var h=l.stateNode;try{Nw(u,h)}catch(O){Tt(l,l.return,O)}}}function $k(l,u,h){h.props=No(l.type,l.memoizedProps),h.state=l.memoizedState;try{h.componentWillUnmount()}catch(O){Tt(l,u,O)}}function Lu(l,u){try{var h=l.ref;if(h!==null){switch(l.tag){case 26:case 27:case 5:var O=l.stateNode;break;case 30:O=l.stateNode;break;default:O=l.stateNode}typeof h=="function"?l.refCleanup=h(O):h.current=O}}catch(y){Tt(l,u,y)}}function Yi(l,u){var h=l.ref,O=l.refCleanup;if(h!==null)if(typeof O=="function")try{O()}catch(y){Tt(l,u,y)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(y){Tt(l,u,y)}else h.current=null}function Vk(l){var u=l.type,h=l.memoizedProps,O=l.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":h.autoFocus&&O.focus();break e;case"img":h.src?O.src=h.src:h.srcSet&&(O.srcset=h.srcSet)}}catch(y){Tt(l,l.return,y)}}function aO(l,u,h){try{var O=l.stateNode;CI(O,l.type,h,u),O[Pn]=u}catch(y){Tt(l,l.return,y)}}function Uk(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&js(l.type)||l.tag===4}function sO(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||Uk(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&js(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function oO(l,u,h){var O=l.tag;if(O===5||O===6)l=l.stateNode,u?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(l,u):(u=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,u.appendChild(l),h=h._reactRootContainer,h!=null||u.onclick!==null||(u.onclick=Si));else if(O!==4&&(O===27&&js(l.type)&&(h=l.stateNode,u=null),l=l.child,l!==null))for(oO(l,u,h),l=l.sibling;l!==null;)oO(l,u,h),l=l.sibling}function Bh(l,u,h){var O=l.tag;if(O===5||O===6)l=l.stateNode,u?h.insertBefore(l,u):h.appendChild(l);else if(O!==4&&(O===27&&js(l.type)&&(h=l.stateNode),l=l.child,l!==null))for(Bh(l,u,h),l=l.sibling;l!==null;)Bh(l,u,h),l=l.sibling}function Yk(l){var u=l.stateNode,h=l.memoizedProps;try{for(var O=l.type,y=u.attributes;y.length;)u.removeAttributeNode(y[0]);Bn(u,O,h),u[un]=l,u[Pn]=h}catch(_){Tt(l,l.return,_)}}var Pa=!1,Sn=!1,lO=!1,Fk=typeof WeakSet=="function"?WeakSet:Set,Qn=null;function lI(l,u){if(l=l.containerInfo,CO=lm,l=sw(l),tv(l)){if("selectionStart"in l)var h={start:l.selectionStart,end:l.selectionEnd};else e:{h=(h=l.ownerDocument)&&h.defaultView||window;var O=h.getSelection&&h.getSelection();if(O&&O.rangeCount!==0){h=O.anchorNode;var y=O.anchorOffset,_=O.focusNode;O=O.focusOffset;try{h.nodeType,_.nodeType}catch{h=null;break e}var E=0,M=-1,U=-1,J=0,ie=0,oe=l,te=null;t:for(;;){for(var ne;oe!==h||y!==0&&oe.nodeType!==3||(M=E+y),oe!==_||O!==0&&oe.nodeType!==3||(U=E+O),oe.nodeType===3&&(E+=oe.nodeValue.length),(ne=oe.firstChild)!==null;)te=oe,oe=ne;for(;;){if(oe===l)break t;if(te===h&&++J===y&&(M=E),te===_&&++ie===O&&(U=E),(ne=oe.nextSibling)!==null)break;oe=te,te=oe.parentNode}oe=ne}h=M===-1||U===-1?null:{start:M,end:U}}else h=null}h=h||{start:0,end:0}}else h=null;for(AO={focusedElem:l,selectionRange:h},lm=!1,Qn=u;Qn!==null;)if(u=Qn,l=u.child,(u.subtreeFlags&1028)!==0&&l!==null)l.return=u,Qn=l;else for(;Qn!==null;){switch(u=Qn,_=u.alternate,l=u.flags,u.tag){case 0:if((l&4)!==0&&(l=u.updateQueue,l=l!==null?l.events:null,l!==null))for(h=0;h<l.length;h++)y=l[h],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((l&1024)!==0&&_!==null){l=void 0,h=u,y=_.memoizedProps,_=_.memoizedState,O=h.stateNode;try{var ke=No(h.type,y);l=O.getSnapshotBeforeUpdate(ke,_),O.__reactInternalSnapshotBeforeUpdate=l}catch(Xe){Tt(h,h.return,Xe)}}break;case 3:if((l&1024)!==0){if(l=u.stateNode.containerInfo,h=l.nodeType,h===9)NO(l);else if(h===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":NO(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((l&1024)!==0)throw Error(r(163))}if(l=u.sibling,l!==null){l.return=u.return,Qn=l;break}Qn=u.return}}function Wk(l,u,h){var O=h.flags;switch(h.tag){case 0:case 11:case 15:Na(l,h),O&4&&Mu(5,h);break;case 1:if(Na(l,h),O&4)if(l=h.stateNode,u===null)try{l.componentDidMount()}catch(E){Tt(h,h.return,E)}else{var y=No(h.type,u.memoizedProps);u=u.memoizedState;try{l.componentDidUpdate(y,u,l.__reactInternalSnapshotBeforeUpdate)}catch(E){Tt(h,h.return,E)}}O&64&&Zk(h),O&512&&Lu(h,h.return);break;case 3:if(Na(l,h),O&64&&(l=h.updateQueue,l!==null)){if(u=null,h.child!==null)switch(h.child.tag){case 27:case 5:u=h.child.stateNode;break;case 1:u=h.child.stateNode}try{Nw(l,u)}catch(E){Tt(h,h.return,E)}}break;case 27:u===null&&O&4&&Yk(h);case 26:case 5:Na(l,h),u===null&&O&4&&Vk(h),O&512&&Lu(h,h.return);break;case 12:Na(l,h);break;case 31:Na(l,h),O&4&&Kk(l,h);break;case 13:Na(l,h),O&4&&Jk(l,h),O&64&&(l=h.memoizedState,l!==null&&(l=l.dehydrated,l!==null&&(h=vI.bind(null,h),DI(l,h))));break;case 22:if(O=h.memoizedState!==null||Pa,!O){u=u!==null&&u.memoizedState!==null||Sn,y=Pa;var _=Sn;Pa=O,(Sn=u)&&!_?Ra(l,h,(h.subtreeFlags&8772)!==0):Na(l,h),Pa=y,Sn=_}break;case 30:break;default:Na(l,h)}}function Hk(l){var u=l.alternate;u!==null&&(l.alternate=null,Hk(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&go(u)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}var Gt=null,mr=!1;function Qa(l,u,h){for(h=h.child;h!==null;)Gk(l,u,h),h=h.sibling}function Gk(l,u,h){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(Jt,h)}catch{}switch(h.tag){case 26:Sn||Yi(h,u),Qa(l,u,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:Sn||Yi(h,u);var O=Gt,y=mr;js(h.type)&&(Gt=h.stateNode,mr=!1),Qa(l,u,h),Vu(h.stateNode),Gt=O,mr=y;break;case 5:Sn||Yi(h,u);case 6:if(O=Gt,y=mr,Gt=null,Qa(l,u,h),Gt=O,mr=y,Gt!==null)if(mr)try{(Gt.nodeType===9?Gt.body:Gt.nodeName==="HTML"?Gt.ownerDocument.body:Gt).removeChild(h.stateNode)}catch(_){Tt(h,u,_)}else try{Gt.removeChild(h.stateNode)}catch(_){Tt(h,u,_)}break;case 18:Gt!==null&&(mr?(l=Gt,Z1(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,h.stateNode),ac(l)):Z1(Gt,h.stateNode));break;case 4:O=Gt,y=mr,Gt=h.stateNode.containerInfo,mr=!0,Qa(l,u,h),Gt=O,mr=y;break;case 0:case 11:case 14:case 15:bs(2,h,u),Sn||bs(4,h,u),Qa(l,u,h);break;case 1:Sn||(Yi(h,u),O=h.stateNode,typeof O.componentWillUnmount=="function"&&$k(h,u,O)),Qa(l,u,h);break;case 21:Qa(l,u,h);break;case 22:Sn=(O=Sn)||h.memoizedState!==null,Qa(l,u,h),Sn=O;break;default:Qa(l,u,h)}}function Kk(l,u){if(u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null))){l=l.dehydrated;try{ac(l)}catch(h){Tt(u,u.return,h)}}}function Jk(l,u){if(u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{ac(l)}catch(h){Tt(u,u.return,h)}}function cI(l){switch(l.tag){case 31:case 13:case 19:var u=l.stateNode;return u===null&&(u=l.stateNode=new Fk),u;case 22:return l=l.stateNode,u=l._retryCache,u===null&&(u=l._retryCache=new Fk),u;default:throw Error(r(435,l.tag))}}function Xh(l,u){var h=cI(l);u.forEach(function(O){if(!h.has(O)){h.add(O);var y=OI.bind(null,l,O);O.then(y,y)}})}function pr(l,u){var h=u.deletions;if(h!==null)for(var O=0;O<h.length;O++){var y=h[O],_=l,E=u,M=E;e:for(;M!==null;){switch(M.tag){case 27:if(js(M.type)){Gt=M.stateNode,mr=!1;break e}break;case 5:Gt=M.stateNode,mr=!1;break e;case 3:case 4:Gt=M.stateNode.containerInfo,mr=!0;break e}M=M.return}if(Gt===null)throw Error(r(160));Gk(_,E,y),Gt=null,mr=!1,_=y.alternate,_!==null&&(_.return=null),y.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)e1(u,l),u=u.sibling}var ki=null;function e1(l,u){var h=l.alternate,O=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:pr(u,l),gr(l),O&4&&(bs(3,l,l.return),Mu(3,l),bs(5,l,l.return));break;case 1:pr(u,l),gr(l),O&512&&(Sn||h===null||Yi(h,h.return)),O&64&&Pa&&(l=l.updateQueue,l!==null&&(O=l.callbacks,O!==null&&(h=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=h===null?O:h.concat(O))));break;case 26:var y=ki;if(pr(u,l),gr(l),O&512&&(Sn||h===null||Yi(h,h.return)),O&4){var _=h!==null?h.memoizedState:null;if(O=l.memoizedState,h===null)if(O===null)if(l.stateNode===null){e:{O=l.type,h=l.memoizedProps,y=y.ownerDocument||y;t:switch(O){case"title":_=y.getElementsByTagName("title")[0],(!_||_[Oa]||_[un]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=y.createElement(O),y.head.insertBefore(_,y.querySelector("head > title"))),Bn(_,O,h),_[un]=l,rn(_),O=_;break e;case"link":var E=ej("link","href",y).get(O+(h.href||""));if(E){for(var M=0;M<E.length;M++)if(_=E[M],_.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&_.getAttribute("rel")===(h.rel==null?null:h.rel)&&_.getAttribute("title")===(h.title==null?null:h.title)&&_.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){E.splice(M,1);break t}}_=y.createElement(O),Bn(_,O,h),y.head.appendChild(_);break;case"meta":if(E=ej("meta","content",y).get(O+(h.content||""))){for(M=0;M<E.length;M++)if(_=E[M],_.getAttribute("content")===(h.content==null?null:""+h.content)&&_.getAttribute("name")===(h.name==null?null:h.name)&&_.getAttribute("property")===(h.property==null?null:h.property)&&_.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&_.getAttribute("charset")===(h.charSet==null?null:h.charSet)){E.splice(M,1);break t}}_=y.createElement(O),Bn(_,O,h),y.head.appendChild(_);break;default:throw Error(r(468,O))}_[un]=l,rn(_),O=_}l.stateNode=O}else tj(y,l.type,l.stateNode);else l.stateNode=J1(y,O,l.memoizedProps);else _!==O?(_===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):_.count--,O===null?tj(y,l.type,l.stateNode):J1(y,O,l.memoizedProps)):O===null&&l.stateNode!==null&&aO(l,l.memoizedProps,h.memoizedProps)}break;case 27:pr(u,l),gr(l),O&512&&(Sn||h===null||Yi(h,h.return)),h!==null&&O&4&&aO(l,l.memoizedProps,h.memoizedProps);break;case 5:if(pr(u,l),gr(l),O&512&&(Sn||h===null||Yi(h,h.return)),l.flags&32){y=l.stateNode;try{ss(y,"")}catch(ke){Tt(l,l.return,ke)}}O&4&&l.stateNode!=null&&(y=l.memoizedProps,aO(l,y,h!==null?h.memoizedProps:y)),O&1024&&(lO=!0);break;case 6:if(pr(u,l),gr(l),O&4){if(l.stateNode===null)throw Error(r(162));O=l.memoizedProps,h=l.stateNode;try{h.nodeValue=O}catch(ke){Tt(l,l.return,ke)}}break;case 3:if(im=null,y=ki,ki=nm(u.containerInfo),pr(u,l),ki=y,gr(l),O&4&&h!==null&&h.memoizedState.isDehydrated)try{ac(u.containerInfo)}catch(ke){Tt(l,l.return,ke)}lO&&(lO=!1,t1(l));break;case 4:O=ki,ki=nm(l.stateNode.containerInfo),pr(u,l),gr(l),ki=O;break;case 12:pr(u,l),gr(l);break;case 31:pr(u,l),gr(l),O&4&&(O=l.updateQueue,O!==null&&(l.updateQueue=null,Xh(l,O)));break;case 13:pr(u,l),gr(l),l.child.flags&8192&&l.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&($h=et()),O&4&&(O=l.updateQueue,O!==null&&(l.updateQueue=null,Xh(l,O)));break;case 22:y=l.memoizedState!==null;var U=h!==null&&h.memoizedState!==null,J=Pa,ie=Sn;if(Pa=J||y,Sn=ie||U,pr(u,l),Sn=ie,Pa=J,gr(l),O&8192)e:for(u=l.stateNode,u._visibility=y?u._visibility&-2:u._visibility|1,y&&(h===null||U||Pa||Sn||Ro(l)),h=null,u=l;;){if(u.tag===5||u.tag===26){if(h===null){U=h=u;try{if(_=U.stateNode,y)E=_.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{M=U.stateNode;var oe=U.memoizedProps.style,te=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;M.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(ke){Tt(U,U.return,ke)}}}else if(u.tag===6){if(h===null){U=u;try{U.stateNode.nodeValue=y?"":U.memoizedProps}catch(ke){Tt(U,U.return,ke)}}}else if(u.tag===18){if(h===null){U=u;try{var ne=U.stateNode;y?$1(ne,!0):$1(U.stateNode,!1)}catch(ke){Tt(U,U.return,ke)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===l)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break e;for(;u.sibling===null;){if(u.return===null||u.return===l)break e;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}O&4&&(O=l.updateQueue,O!==null&&(h=O.retryQueue,h!==null&&(O.retryQueue=null,Xh(l,h))));break;case 19:pr(u,l),gr(l),O&4&&(O=l.updateQueue,O!==null&&(l.updateQueue=null,Xh(l,O)));break;case 30:break;case 21:break;default:pr(u,l),gr(l)}}function gr(l){var u=l.flags;if(u&2){try{for(var h,O=l.return;O!==null;){if(Uk(O)){h=O;break}O=O.return}if(h==null)throw Error(r(160));switch(h.tag){case 27:var y=h.stateNode,_=sO(l);Bh(l,_,y);break;case 5:var E=h.stateNode;h.flags&32&&(ss(E,""),h.flags&=-33);var M=sO(l);Bh(l,M,E);break;case 3:case 4:var U=h.stateNode.containerInfo,J=sO(l);oO(l,J,U);break;default:throw Error(r(161))}}catch(ie){Tt(l,l.return,ie)}l.flags&=-3}u&4096&&(l.flags&=-4097)}function t1(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var u=l;t1(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),l=l.sibling}}function Na(l,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)Wk(l,u.alternate,u),u=u.sibling}function Ro(l){for(l=l.child;l!==null;){var u=l;switch(u.tag){case 0:case 11:case 14:case 15:bs(4,u,u.return),Ro(u);break;case 1:Yi(u,u.return);var h=u.stateNode;typeof h.componentWillUnmount=="function"&&$k(u,u.return,h),Ro(u);break;case 27:Vu(u.stateNode);case 26:case 5:Yi(u,u.return),Ro(u);break;case 22:u.memoizedState===null&&Ro(u);break;case 30:Ro(u);break;default:Ro(u)}l=l.sibling}}function Ra(l,u,h){for(h=h&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var O=u.alternate,y=l,_=u,E=_.flags;switch(_.tag){case 0:case 11:case 15:Ra(y,_,h),Mu(4,_);break;case 1:if(Ra(y,_,h),O=_,y=O.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(J){Tt(O,O.return,J)}if(O=_,y=O.updateQueue,y!==null){var M=O.stateNode;try{var U=y.shared.hiddenCallbacks;if(U!==null)for(y.shared.hiddenCallbacks=null,y=0;y<U.length;y++)Qw(U[y],M)}catch(J){Tt(O,O.return,J)}}h&&E&64&&Zk(_),Lu(_,_.return);break;case 27:Yk(_);case 26:case 5:Ra(y,_,h),h&&O===null&&E&4&&Vk(_),Lu(_,_.return);break;case 12:Ra(y,_,h);break;case 31:Ra(y,_,h),h&&E&4&&Kk(y,_);break;case 13:Ra(y,_,h),h&&E&4&&Jk(y,_);break;case 22:_.memoizedState===null&&Ra(y,_,h),Lu(_,_.return);break;case 30:break;default:Ra(y,_,h)}u=u.sibling}}function cO(l,u){var h=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),l=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(l=u.memoizedState.cachePool.pool),l!==h&&(l!=null&&l.refCount++,h!=null&&xu(h))}function uO(l,u){l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&xu(l))}function ji(l,u,h,O){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)n1(l,u,h,O),u=u.sibling}function n1(l,u,h,O){var y=u.flags;switch(u.tag){case 0:case 11:case 15:ji(l,u,h,O),y&2048&&Mu(9,u);break;case 1:ji(l,u,h,O);break;case 3:ji(l,u,h,O),y&2048&&(l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&xu(l)));break;case 12:if(y&2048){ji(l,u,h,O),l=u.stateNode;try{var _=u.memoizedProps,E=_.id,M=_.onPostCommit;typeof M=="function"&&M(E,u.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(U){Tt(u,u.return,U)}}else ji(l,u,h,O);break;case 31:ji(l,u,h,O);break;case 13:ji(l,u,h,O);break;case 23:break;case 22:_=u.stateNode,E=u.alternate,u.memoizedState!==null?_._visibility&2?ji(l,u,h,O):Du(l,u):_._visibility&2?ji(l,u,h,O):(_._visibility|=2,Fl(l,u,h,O,(u.subtreeFlags&10256)!==0||!1)),y&2048&&cO(E,u);break;case 24:ji(l,u,h,O),y&2048&&uO(u.alternate,u);break;default:ji(l,u,h,O)}}function Fl(l,u,h,O,y){for(y=y&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var _=l,E=u,M=h,U=O,J=E.flags;switch(E.tag){case 0:case 11:case 15:Fl(_,E,M,U,y),Mu(8,E);break;case 23:break;case 22:var ie=E.stateNode;E.memoizedState!==null?ie._visibility&2?Fl(_,E,M,U,y):Du(_,E):(ie._visibility|=2,Fl(_,E,M,U,y)),y&&J&2048&&cO(E.alternate,E);break;case 24:Fl(_,E,M,U,y),y&&J&2048&&uO(E.alternate,E);break;default:Fl(_,E,M,U,y)}u=u.sibling}}function Du(l,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var h=l,O=u,y=O.flags;switch(O.tag){case 22:Du(h,O),y&2048&&cO(O.alternate,O);break;case 24:Du(h,O),y&2048&&uO(O.alternate,O);break;default:Du(h,O)}u=u.sibling}}var zu=8192;function Wl(l,u,h){if(l.subtreeFlags&zu)for(l=l.child;l!==null;)r1(l,u,h),l=l.sibling}function r1(l,u,h){switch(l.tag){case 26:Wl(l,u,h),l.flags&zu&&l.memoizedState!==null&&WI(h,ki,l.memoizedState,l.memoizedProps);break;case 5:Wl(l,u,h);break;case 3:case 4:var O=ki;ki=nm(l.stateNode.containerInfo),Wl(l,u,h),ki=O;break;case 22:l.memoizedState===null&&(O=l.alternate,O!==null&&O.memoizedState!==null?(O=zu,zu=16777216,Wl(l,u,h),zu=O):Wl(l,u,h));break;default:Wl(l,u,h)}}function i1(l){var u=l.alternate;if(u!==null&&(l=u.child,l!==null)){u.child=null;do u=l.sibling,l.sibling=null,l=u;while(l!==null)}}function Iu(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var O=u[h];Qn=O,s1(O,l)}i1(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)a1(l),l=l.sibling}function a1(l){switch(l.tag){case 0:case 11:case 15:Iu(l),l.flags&2048&&bs(9,l,l.return);break;case 3:Iu(l);break;case 12:Iu(l);break;case 22:var u=l.stateNode;l.memoizedState!==null&&u._visibility&2&&(l.return===null||l.return.tag!==13)?(u._visibility&=-3,Zh(l)):Iu(l);break;default:Iu(l)}}function Zh(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var O=u[h];Qn=O,s1(O,l)}i1(l)}for(l=l.child;l!==null;){switch(u=l,u.tag){case 0:case 11:case 15:bs(8,u,u.return),Zh(u);break;case 22:h=u.stateNode,h._visibility&2&&(h._visibility&=-3,Zh(u));break;default:Zh(u)}l=l.sibling}}function s1(l,u){for(;Qn!==null;){var h=Qn;switch(h.tag){case 0:case 11:case 15:bs(8,h,u);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var O=h.memoizedState.cachePool.pool;O!=null&&O.refCount++}break;case 24:xu(h.memoizedState.cache)}if(O=h.child,O!==null)O.return=h,Qn=O;else e:for(h=l;Qn!==null;){O=Qn;var y=O.sibling,_=O.return;if(Hk(O),O===h){Qn=null;break e}if(y!==null){y.return=_,Qn=y;break e}Qn=_}}}var uI={getCacheForType:function(l){var u=In(On),h=u.data.get(l);return h===void 0&&(h=l(),u.data.set(l,h)),h},cacheSignal:function(){return In(On).controller.signal}},dI=typeof WeakMap=="function"?WeakMap:Map,bt=0,zt=null,it=null,ct=0,jt=0,Rr=null,ys=!1,Hl=!1,dO=!1,Ma=0,sn=0,Ss=0,Mo=0,fO=0,Mr=0,Gl=0,qu=null,vr=null,hO=!1,$h=0,o1=0,Vh=1/0,Uh=null,xs=null,Tn=0,_s=null,Kl=null,La=0,mO=0,pO=null,l1=null,Bu=0,gO=null;function Lr(){return(bt&2)!==0&&ct!==0?ct&-ct:q.T!==null?xO():Dn()}function c1(){if(Mr===0)if((ct&536870912)===0||ft){var l=Cr;Cr<<=1,(Cr&3932160)===0&&(Cr=262144),Mr=l}else Mr=536870912;return l=Qr.current,l!==null&&(l.flags|=32),Mr}function Or(l,u,h){(l===zt&&(jt===2||jt===9)||l.cancelPendingCommit!==null)&&(Jl(l,0),ws(l,ct,Mr,!1)),An(l,h),((bt&2)===0||l!==zt)&&(l===zt&&((bt&2)===0&&(Mo|=h),sn===4&&ws(l,ct,Mr,!1)),Fi(l))}function u1(l,u,h){if((bt&6)!==0)throw Error(r(327));var O=!h&&(u&127)===0&&(u&l.expiredLanes)===0||pn(l,u),y=O?mI(l,u):OO(l,u,!0),_=O;do{if(y===0){Hl&&!O&&ws(l,u,0,!1);break}else{if(h=l.current.alternate,_&&!fI(h)){y=OO(l,u,!1),_=!1;continue}if(y===2){if(_=u,l.errorRecoveryDisabledLanes&_)var E=0;else E=l.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){u=E;e:{var M=l;y=qu;var U=M.current.memoizedState.isDehydrated;if(U&&(Jl(M,E).flags|=256),E=OO(M,E,!1),E!==2){if(dO&&!U){M.errorRecoveryDisabledLanes|=_,Mo|=_,y=4;break e}_=vr,vr=y,_!==null&&(vr===null?vr=_:vr.push.apply(vr,_))}y=E}if(_=!1,y!==2)continue}}if(y===1){Jl(l,0),ws(l,u,0,!0);break}e:{switch(O=l,_=y,_){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:ws(O,u,Mr,!ys);break e;case 2:vr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(y=$h+300-et(),10<y)){if(ws(O,u,Mr,!ys),kt(O,0,!0)!==0)break e;La=u,O.timeoutHandle=B1(d1.bind(null,O,h,vr,Uh,hO,u,Mr,Mo,Gl,ys,_,"Throttled",-0,0),y);break e}d1(O,h,vr,Uh,hO,u,Mr,Mo,Gl,ys,_,null,-0,0)}}break}while(!0);Fi(l)}function d1(l,u,h,O,y,_,E,M,U,J,ie,oe,te,ne){if(l.timeoutHandle=-1,oe=u.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Si},r1(u,_,oe);var ke=(_&62914560)===_?$h-et():(_&4194048)===_?o1-et():0;if(ke=HI(oe,ke),ke!==null){La=_,l.cancelPendingCommit=ke(b1.bind(null,l,u,_,h,O,y,E,M,U,ie,oe,null,te,ne)),ws(l,_,E,!J);return}}b1(l,u,_,h,O,y,E,M,U)}function fI(l){for(var u=l;;){var h=u.tag;if((h===0||h===11||h===15)&&u.flags&16384&&(h=u.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var O=0;O<h.length;O++){var y=h[O],_=y.getSnapshot;y=y.value;try{if(!Ar(_(),y))return!1}catch{return!1}}if(h=u.child,u.subtreeFlags&16384&&h!==null)h.return=u,u=h;else{if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function ws(l,u,h,O){u&=~fO,u&=~Mo,l.suspendedLanes|=u,l.pingedLanes&=~u,O&&(l.warmLanes|=u),O=l.expirationTimes;for(var y=u;0<y;){var _=31-lt(y),E=1<<_;O[_]=-1,y&=~E}h!==0&&Ln(l,h,u)}function Yh(){return(bt&6)===0?(Xu(0),!1):!0}function vO(){if(it!==null){if(jt===0)var l=it.return;else l=it,ka=jo=null,Nv(l),Zl=null,wu=0,l=it;for(;l!==null;)Xk(l.alternate,l),l=l.return;it=null}}function Jl(l,u){var h=l.timeoutHandle;h!==-1&&(l.timeoutHandle=-1,QI(h)),h=l.cancelPendingCommit,h!==null&&(l.cancelPendingCommit=null,h()),La=0,vO(),zt=l,it=h=_a(l.current,null),ct=u,jt=0,Rr=null,ys=!1,Hl=pn(l,u),dO=!1,Gl=Mr=fO=Mo=Ss=sn=0,vr=qu=null,hO=!1,(u&8)!==0&&(u|=u&32);var O=l.entangledLanes;if(O!==0)for(l=l.entanglements,O&=u;0<O;){var y=31-lt(O),_=1<<y;u|=l[y],O&=~_}return Ma=u,mh(),h}function f1(l,u){Fe=null,q.H=Qu,u===Xl||u===xh?(u=Ew(),jt=3):u===Sv?(u=Ew(),jt=4):jt=u===Wv?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Rr=u,it===null&&(sn=1,Lh(l,Hr(u,l.current)))}function h1(){var l=Qr.current;return l===null?!0:(ct&4194048)===ct?ei===null:(ct&62914560)===ct||(ct&536870912)!==0?l===ei:!1}function m1(){var l=q.H;return q.H=Qu,l===null?Qu:l}function p1(){var l=q.A;return q.A=uI,l}function Fh(){sn=4,ys||(ct&4194048)!==ct&&Qr.current!==null||(Hl=!0),(Ss&134217727)===0&&(Mo&134217727)===0||zt===null||ws(zt,ct,Mr,!1)}function OO(l,u,h){var O=bt;bt|=2;var y=m1(),_=p1();(zt!==l||ct!==u)&&(Uh=null,Jl(l,u)),u=!1;var E=sn;e:do try{if(jt!==0&&it!==null){var M=it,U=Rr;switch(jt){case 8:vO(),E=6;break e;case 3:case 2:case 9:case 6:Qr.current===null&&(u=!0);var J=jt;if(jt=0,Rr=null,ec(l,M,U,J),h&&Hl){E=0;break e}break;default:J=jt,jt=0,Rr=null,ec(l,M,U,J)}}hI(),E=sn;break}catch(ie){f1(l,ie)}while(!0);return u&&l.shellSuspendCounter++,ka=jo=null,bt=O,q.H=y,q.A=_,it===null&&(zt=null,ct=0,mh()),E}function hI(){for(;it!==null;)g1(it)}function mI(l,u){var h=bt;bt|=2;var O=m1(),y=p1();zt!==l||ct!==u?(Uh=null,Vh=et()+500,Jl(l,u)):Hl=pn(l,u);e:do try{if(jt!==0&&it!==null){u=it;var _=Rr;t:switch(jt){case 1:jt=0,Rr=null,ec(l,u,_,1);break;case 2:case 9:if(jw(_)){jt=0,Rr=null,v1(u);break}u=function(){jt!==2&&jt!==9||zt!==l||(jt=7),Fi(l)},_.then(u,u);break e;case 3:jt=7;break e;case 4:jt=5;break e;case 7:jw(_)?(jt=0,Rr=null,v1(u)):(jt=0,Rr=null,ec(l,u,_,7));break;case 5:var E=null;switch(it.tag){case 26:E=it.memoizedState;case 5:case 27:var M=it;if(E?nj(E):M.stateNode.complete){jt=0,Rr=null;var U=M.sibling;if(U!==null)it=U;else{var J=M.return;J!==null?(it=J,Wh(J)):it=null}break t}}jt=0,Rr=null,ec(l,u,_,5);break;case 6:jt=0,Rr=null,ec(l,u,_,6);break;case 8:vO(),sn=6;break e;default:throw Error(r(462))}}pI();break}catch(ie){f1(l,ie)}while(!0);return ka=jo=null,q.H=O,q.A=y,bt=h,it!==null?0:(zt=null,ct=0,mh(),sn)}function pI(){for(;it!==null&&!Et();)g1(it)}function g1(l){var u=qk(l.alternate,l,Ma);l.memoizedProps=l.pendingProps,u===null?Wh(l):it=u}function v1(l){var u=l,h=u.alternate;switch(u.tag){case 15:case 0:u=Rk(h,u,u.pendingProps,u.type,void 0,ct);break;case 11:u=Rk(h,u,u.pendingProps,u.type.render,u.ref,ct);break;case 5:Nv(u);default:Xk(h,u),u=it=pw(u,Ma),u=qk(h,u,Ma)}l.memoizedProps=l.pendingProps,u===null?Wh(l):it=u}function ec(l,u,h,O){ka=jo=null,Nv(u),Zl=null,wu=0;var y=u.return;try{if(rI(l,y,u,h,ct)){sn=1,Lh(l,Hr(h,l.current)),it=null;return}}catch(_){if(y!==null)throw it=y,_;sn=1,Lh(l,Hr(h,l.current)),it=null;return}u.flags&32768?(ft||O===1?l=!0:Hl||(ct&536870912)!==0?l=!1:(ys=l=!0,(O===2||O===9||O===3||O===6)&&(O=Qr.current,O!==null&&O.tag===13&&(O.flags|=16384))),O1(u,l)):Wh(u)}function Wh(l){var u=l;do{if((u.flags&32768)!==0){O1(u,ys);return}l=u.return;var h=sI(u.alternate,u,Ma);if(h!==null){it=h;return}if(u=u.sibling,u!==null){it=u;return}it=u=l}while(u!==null);sn===0&&(sn=5)}function O1(l,u){do{var h=oI(l.alternate,l);if(h!==null){h.flags&=32767,it=h;return}if(h=l.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!u&&(l=l.sibling,l!==null)){it=l;return}it=l=h}while(l!==null);sn=6,it=null}function b1(l,u,h,O,y,_,E,M,U){l.cancelPendingCommit=null;do Hh();while(Tn!==0);if((bt&6)!==0)throw Error(r(327));if(u!==null){if(u===l.current)throw Error(r(177));if(_=u.lanes|u.childLanes,_|=sv,Yt(l,h,_,E,M,U),l===zt&&(it=zt=null,ct=0),Kl=u,_s=l,La=h,mO=_,pO=y,l1=O,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(l.callbackNode=null,l.callbackPriority=0,bI(Te,function(){return w1(),null})):(l.callbackNode=null,l.callbackPriority=0),O=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||O){O=q.T,q.T=null,y=I.p,I.p=2,E=bt,bt|=4;try{lI(l,u,h)}finally{bt=E,I.p=y,q.T=O}}Tn=1,y1(),S1(),x1()}}function y1(){if(Tn===1){Tn=0;var l=_s,u=Kl,h=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||h){h=q.T,q.T=null;var O=I.p;I.p=2;var y=bt;bt|=4;try{e1(u,l);var _=AO,E=sw(l.containerInfo),M=_.focusedElem,U=_.selectionRange;if(E!==M&&M&&M.ownerDocument&&aw(M.ownerDocument.documentElement,M)){if(U!==null&&tv(M)){var J=U.start,ie=U.end;if(ie===void 0&&(ie=J),"selectionStart"in M)M.selectionStart=J,M.selectionEnd=Math.min(ie,M.value.length);else{var oe=M.ownerDocument||document,te=oe&&oe.defaultView||window;if(te.getSelection){var ne=te.getSelection(),ke=M.textContent.length,Xe=Math.min(U.start,ke),Nt=U.end===void 0?Xe:Math.min(U.end,ke);!ne.extend&&Xe>Nt&&(E=Nt,Nt=Xe,Xe=E);var G=iw(M,Xe),F=iw(M,Nt);if(G&&F&&(ne.rangeCount!==1||ne.anchorNode!==G.node||ne.anchorOffset!==G.offset||ne.focusNode!==F.node||ne.focusOffset!==F.offset)){var K=oe.createRange();K.setStart(G.node,G.offset),ne.removeAllRanges(),Xe>Nt?(ne.addRange(K),ne.extend(F.node,F.offset)):(K.setEnd(F.node,F.offset),ne.addRange(K))}}}}for(oe=[],ne=M;ne=ne.parentNode;)ne.nodeType===1&&oe.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<oe.length;M++){var ae=oe[M];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}lm=!!CO,AO=CO=null}finally{bt=y,I.p=O,q.T=h}}l.current=u,Tn=2}}function S1(){if(Tn===2){Tn=0;var l=_s,u=Kl,h=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||h){h=q.T,q.T=null;var O=I.p;I.p=2;var y=bt;bt|=4;try{Wk(l,u.alternate,u)}finally{bt=y,I.p=O,q.T=h}}Tn=3}}function x1(){if(Tn===4||Tn===3){Tn=0,Zt();var l=_s,u=Kl,h=La,O=l1;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Tn=5:(Tn=0,Kl=_s=null,_1(l,l.pendingLanes));var y=l.pendingLanes;if(y===0&&(xs=null),rr(h),u=u.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(Jt,u,void 0,(u.current.flags&128)===128)}catch{}if(O!==null){u=q.T,y=I.p,I.p=2,q.T=null;try{for(var _=l.onRecoverableError,E=0;E<O.length;E++){var M=O[E];_(M.value,{componentStack:M.stack})}}finally{q.T=u,I.p=y}}(La&3)!==0&&Hh(),Fi(l),y=l.pendingLanes,(h&261930)!==0&&(y&42)!==0?l===gO?Bu++:(Bu=0,gO=l):Bu=0,Xu(0)}}function _1(l,u){(l.pooledCacheLanes&=u)===0&&(u=l.pooledCache,u!=null&&(l.pooledCache=null,xu(u)))}function Hh(){return y1(),S1(),x1(),w1()}function w1(){if(Tn!==5)return!1;var l=_s,u=mO;mO=0;var h=rr(La),O=q.T,y=I.p;try{I.p=32>h?32:h,q.T=null,h=pO,pO=null;var _=_s,E=La;if(Tn=0,Kl=_s=null,La=0,(bt&6)!==0)throw Error(r(331));var M=bt;if(bt|=4,a1(_.current),n1(_,_.current,E,h),bt=M,Xu(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(Jt,_)}catch{}return!0}finally{I.p=y,q.T=O,_1(l,u)}}function k1(l,u,h){u=Hr(h,u),u=Fv(l.stateNode,u,2),l=gs(l,u,2),l!==null&&(An(l,2),Fi(l))}function Tt(l,u,h){if(l.tag===3)k1(l,l,h);else for(;u!==null;){if(u.tag===3){k1(u,l,h);break}else if(u.tag===1){var O=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof O.componentDidCatch=="function"&&(xs===null||!xs.has(O))){l=Hr(h,l),h=jk(2),O=gs(u,h,2),O!==null&&(Tk(h,O,u,l),An(O,2),Fi(O));break}}u=u.return}}function bO(l,u,h){var O=l.pingCache;if(O===null){O=l.pingCache=new dI;var y=new Set;O.set(u,y)}else y=O.get(u),y===void 0&&(y=new Set,O.set(u,y));y.has(h)||(dO=!0,y.add(h),l=gI.bind(null,l,u,h),u.then(l,l))}function gI(l,u,h){var O=l.pingCache;O!==null&&O.delete(u),l.pingedLanes|=l.suspendedLanes&h,l.warmLanes&=~h,zt===l&&(ct&h)===h&&(sn===4||sn===3&&(ct&62914560)===ct&&300>et()-$h?(bt&2)===0&&Jl(l,0):fO|=h,Gl===ct&&(Gl=0)),Fi(l)}function j1(l,u){u===0&&(u=en()),l=_o(l,u),l!==null&&(An(l,u),Fi(l))}function vI(l){var u=l.memoizedState,h=0;u!==null&&(h=u.retryLane),j1(l,h)}function OI(l,u){var h=0;switch(l.tag){case 31:case 13:var O=l.stateNode,y=l.memoizedState;y!==null&&(h=y.retryLane);break;case 19:O=l.stateNode;break;case 22:O=l.stateNode._retryCache;break;default:throw Error(r(314))}O!==null&&O.delete(u),j1(l,h)}function bI(l,u){return ge(l,u)}var Gh=null,tc=null,yO=!1,Kh=!1,SO=!1,ks=0;function Fi(l){l!==tc&&l.next===null&&(tc===null?Gh=tc=l:tc=tc.next=l),Kh=!0,yO||(yO=!0,SI())}function Xu(l,u){if(!SO&&Kh){SO=!0;do for(var h=!1,O=Gh;O!==null;){if(l!==0){var y=O.pendingLanes;if(y===0)var _=0;else{var E=O.suspendedLanes,M=O.pingedLanes;_=(1<<31-lt(42|l)+1)-1,_&=y&~(E&~M),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(h=!0,A1(O,_))}else _=ct,_=kt(O,O===zt?_:0,O.cancelPendingCommit!==null||O.timeoutHandle!==-1),(_&3)===0||pn(O,_)||(h=!0,A1(O,_));O=O.next}while(h);SO=!1}}function yI(){T1()}function T1(){Kh=yO=!1;var l=0;ks!==0&&PI()&&(l=ks);for(var u=et(),h=null,O=Gh;O!==null;){var y=O.next,_=E1(O,u);_===0?(O.next=null,h===null?Gh=y:h.next=y,y===null&&(tc=h)):(h=O,(l!==0||(_&3)!==0)&&(Kh=!0)),O=y}Tn!==0&&Tn!==5||Xu(l),ks!==0&&(ks=0)}function E1(l,u){for(var h=l.suspendedLanes,O=l.pingedLanes,y=l.expirationTimes,_=l.pendingLanes&-62914561;0<_;){var E=31-lt(_),M=1<<E,U=y[E];U===-1?((M&h)===0||(M&O)!==0)&&(y[E]=gn(M,u)):U<=u&&(l.expiredLanes|=M),_&=~M}if(u=zt,h=ct,h=kt(l,l===u?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),O=l.callbackNode,h===0||l===u&&(jt===2||jt===9)||l.cancelPendingCommit!==null)return O!==null&&O!==null&&dt(O),l.callbackNode=null,l.callbackPriority=0;if((h&3)===0||pn(l,h)){if(u=h&-h,u===l.callbackPriority)return u;switch(O!==null&&dt(O),rr(h)){case 2:case 8:h=fe;break;case 32:h=Te;break;case 268435456:h=rt;break;default:h=Te}return O=C1.bind(null,l),h=ge(h,O),l.callbackPriority=u,l.callbackNode=h,u}return O!==null&&O!==null&&dt(O),l.callbackPriority=2,l.callbackNode=null,2}function C1(l,u){if(Tn!==0&&Tn!==5)return l.callbackNode=null,l.callbackPriority=0,null;var h=l.callbackNode;if(Hh()&&l.callbackNode!==h)return null;var O=ct;return O=kt(l,l===zt?O:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),O===0?null:(u1(l,O,u),E1(l,et()),l.callbackNode!=null&&l.callbackNode===h?C1.bind(null,l):null)}function A1(l,u){if(Hh())return null;u1(l,u,!0)}function SI(){NI(function(){(bt&6)!==0?ge(re,yI):T1()})}function xO(){if(ks===0){var l=ql;l===0&&(l=Fr,Fr<<=1,(Fr&261888)===0&&(Fr=256)),ks=l}return ks}function P1(l){return l==null||typeof l=="symbol"||typeof l=="boolean"?null:typeof l=="function"?l:kl(""+l)}function Q1(l,u){var h=u.ownerDocument.createElement("input");return h.name=u.name,h.value=u.value,l.id&&h.setAttribute("form",l.id),u.parentNode.insertBefore(h,u),l=new FormData(l),h.parentNode.removeChild(h),l}function xI(l,u,h,O,y){if(u==="submit"&&h&&h.stateNode===y){var _=P1((y[Pn]||null).action),E=O.submitter;E&&(u=(u=E[Pn]||null)?P1(u.formAction):E.getAttribute("formAction"),u!==null&&(_=u,E=null));var M=new Cl("action","action",null,O,y);l.push({event:M,listeners:[{instance:null,listener:function(){if(O.defaultPrevented){if(ks!==0){var U=E?Q1(y,E):new FormData(y);Xv(h,{pending:!0,data:U,method:y.method,action:_},null,U)}}else typeof _=="function"&&(M.preventDefault(),U=E?Q1(y,E):new FormData(y),Xv(h,{pending:!0,data:U,method:y.method,action:_},_,U))},currentTarget:y}]})}}for(var _O=0;_O<av.length;_O++){var wO=av[_O],_I=wO.toLowerCase(),wI=wO[0].toUpperCase()+wO.slice(1);wi(_I,"on"+wI)}wi(cw,"onAnimationEnd"),wi(uw,"onAnimationIteration"),wi(dw,"onAnimationStart"),wi("dblclick","onDoubleClick"),wi("focusin","onFocus"),wi("focusout","onBlur"),wi(qz,"onTransitionRun"),wi(Bz,"onTransitionStart"),wi(Xz,"onTransitionCancel"),wi(fw,"onTransitionEnd"),Zi("onMouseEnter",["mouseout","mouseover"]),Zi("onMouseLeave",["mouseout","mouseover"]),Zi("onPointerEnter",["pointerout","pointerover"]),Zi("onPointerLeave",["pointerout","pointerover"]),bi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bi("onBeforeInput",["compositionend","keypress","textInput","paste"]),bi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),kI=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zu));function N1(l,u){u=(u&4)!==0;for(var h=0;h<l.length;h++){var O=l[h],y=O.event;O=O.listeners;e:{var _=void 0;if(u)for(var E=O.length-1;0<=E;E--){var M=O[E],U=M.instance,J=M.currentTarget;if(M=M.listener,U!==_&&y.isPropagationStopped())break e;_=M,y.currentTarget=J;try{_(y)}catch(ie){hh(ie)}y.currentTarget=null,_=U}else for(E=0;E<O.length;E++){if(M=O[E],U=M.instance,J=M.currentTarget,M=M.listener,U!==_&&y.isPropagationStopped())break e;_=M,y.currentTarget=J;try{_(y)}catch(ie){hh(ie)}y.currentTarget=null,_=U}}}}function at(l,u){var h=u[po];h===void 0&&(h=u[po]=new Set);var O=l+"__bubble";h.has(O)||(R1(u,l,2,!1),h.add(O))}function kO(l,u,h){var O=0;u&&(O|=4),R1(h,l,O,u)}var Jh="_reactListening"+Math.random().toString(36).slice(2);function jO(l){if(!l[Jh]){l[Jh]=!0,yl.forEach(function(h){h!=="selectionchange"&&(kI.has(h)||kO(h,!1,l),kO(h,!0,l))});var u=l.nodeType===9?l:l.ownerDocument;u===null||u[Jh]||(u[Jh]=!0,kO("selectionchange",!1,u))}}function R1(l,u,h,O){switch(cj(u)){case 2:var y=JI;break;case 8:y=eq;break;default:y=BO}h=y.bind(null,u,h,l),y=void 0,!du||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(y=!0),O?y!==void 0?l.addEventListener(u,h,{capture:!0,passive:y}):l.addEventListener(u,h,!0):y!==void 0?l.addEventListener(u,h,{passive:y}):l.addEventListener(u,h,!1)}function TO(l,u,h,O,y){var _=O;if((u&1)===0&&(u&2)===0&&O!==null)e:for(;;){if(O===null)return;var E=O.tag;if(E===3||E===4){var M=O.stateNode.containerInfo;if(M===y)break;if(E===4)for(E=O.return;E!==null;){var U=E.tag;if((U===3||U===4)&&E.stateNode.containerInfo===y)return;E=E.return}for(;M!==null;){if(E=qi(M),E===null)return;if(U=E.tag,U===5||U===6||U===26||U===27){O=_=E;continue e}M=M.parentNode}}O=O.return}ch(function(){var J=_,ie=cu(h),oe=[];e:{var te=hw.get(l);if(te!==void 0){var ne=Cl,ke=l;switch(l){case"keypress":if(Tl(h)===0)break e;case"keydown":case"keyup":ne=Oz;break;case"focusin":ke="focus",ne=Hg;break;case"focusout":ke="blur",ne=Hg;break;case"beforeblur":case"afterblur":ne=Hg;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Sa;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=_i;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=Sz;break;case cw:case uw:case dw:ne=cz;break;case fw:ne=_z;break;case"scroll":case"scrollend":ne=Wg;break;case"wheel":ne=kz;break;case"copy":case"cut":case"paste":ne=dz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=$_;break;case"toggle":case"beforetoggle":ne=Tz}var Xe=(u&4)!==0,Nt=!Xe&&(l==="scroll"||l==="scrollend"),G=Xe?te!==null?te+"Capture":null:te;Xe=[];for(var F=J,K;F!==null;){var ae=F;if(K=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||K===null||G===null||(ae=vo(F,G),ae!=null&&Xe.push($u(F,ae,K))),Nt)break;F=F.return}0<Xe.length&&(te=new ne(te,ke,null,h,ie),oe.push({event:te,listeners:Xe}))}}if((u&7)===0){e:{if(te=l==="mouseover"||l==="pointerover",ne=l==="mouseout"||l==="pointerout",te&&h!==lu&&(ke=h.relatedTarget||h.fromElement)&&(qi(ke)||ke[Ii]))break e;if((ne||te)&&(te=ie.window===ie?ie:(te=ie.ownerDocument)?te.defaultView||te.parentWindow:window,ne?(ke=h.relatedTarget||h.toElement,ne=J,ke=ke?qi(ke):null,ke!==null&&(Nt=a(ke),Xe=ke.tag,ke!==Nt||Xe!==5&&Xe!==27&&Xe!==6)&&(ke=null)):(ne=null,ke=J),ne!==ke)){if(Xe=Sa,ae="onMouseLeave",G="onMouseEnter",F="mouse",(l==="pointerout"||l==="pointerover")&&(Xe=$_,ae="onPointerLeave",G="onPointerEnter",F="pointer"),Nt=ne==null?te:ba(ne),K=ke==null?te:ba(ke),te=new Xe(ae,F+"leave",ne,h,ie),te.target=Nt,te.relatedTarget=K,ae=null,qi(ie)===J&&(Xe=new Xe(G,F+"enter",ke,h,ie),Xe.target=K,Xe.relatedTarget=Nt,ae=Xe),Nt=ae,ne&&ke)t:{for(Xe=jI,G=ne,F=ke,K=0,ae=G;ae;ae=Xe(ae))K++;ae=0;for(var Le=F;Le;Le=Xe(Le))ae++;for(;0<K-ae;)G=Xe(G),K--;for(;0<ae-K;)F=Xe(F),ae--;for(;K--;){if(G===F||F!==null&&G===F.alternate){Xe=G;break t}G=Xe(G),F=Xe(F)}Xe=null}else Xe=null;ne!==null&&M1(oe,te,ne,Xe,!1),ke!==null&&Nt!==null&&M1(oe,Nt,ke,Xe,!0)}}e:{if(te=J?ba(J):window,ne=te.nodeName&&te.nodeName.toLowerCase(),ne==="select"||ne==="input"&&te.type==="file")var vt=K_;else if(H_(te))if(J_)vt=Dz;else{vt=Mz;var Ee=Rz}else ne=te.nodeName,!ne||ne.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?J&&ou(J.elementType)&&(vt=K_):vt=Lz;if(vt&&(vt=vt(l,J))){G_(oe,vt,h,ie);break e}Ee&&Ee(l,te,J),l==="focusout"&&J&&te.type==="number"&&J.memoizedProps.value!=null&&su(te,"number",te.value)}switch(Ee=J?ba(J):window,l){case"focusin":(H_(Ee)||Ee.contentEditable==="true")&&(Ql=Ee,nv=J,bu=null);break;case"focusout":bu=nv=Ql=null;break;case"mousedown":rv=!0;break;case"contextmenu":case"mouseup":case"dragend":rv=!1,ow(oe,h,ie);break;case"selectionchange":if(Iz)break;case"keydown":case"keyup":ow(oe,h,ie)}var Ge;if(Kg)e:{switch(l){case"compositionstart":var ut="onCompositionStart";break e;case"compositionend":ut="onCompositionEnd";break e;case"compositionupdate":ut="onCompositionUpdate";break e}ut=void 0}else Pl?F_(l,h)&&(ut="onCompositionEnd"):l==="keydown"&&h.keyCode===229&&(ut="onCompositionStart");ut&&(V_&&h.locale!=="ko"&&(Pl||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&Pl&&(Ge=uh()):($i=ie,fu="value"in $i?$i.value:$i.textContent,Pl=!0)),Ee=em(J,ut),0<Ee.length&&(ut=new Z_(ut,l,null,h,ie),oe.push({event:ut,listeners:Ee}),Ge?ut.data=Ge:(Ge=W_(h),Ge!==null&&(ut.data=Ge)))),(Ge=Cz?Az(l,h):Pz(l,h))&&(ut=em(J,"onBeforeInput"),0<ut.length&&(Ee=new Z_("onBeforeInput","beforeinput",null,h,ie),oe.push({event:Ee,listeners:ut}),Ee.data=Ge)),xI(oe,l,J,h,ie)}N1(oe,u)})}function $u(l,u,h){return{instance:l,listener:u,currentTarget:h}}function em(l,u){for(var h=u+"Capture",O=[];l!==null;){var y=l,_=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||_===null||(y=vo(l,h),y!=null&&O.unshift($u(l,y,_)),y=vo(l,u),y!=null&&O.push($u(l,y,_))),l.tag===3)return O;l=l.return}return[]}function jI(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5&&l.tag!==27);return l||null}function M1(l,u,h,O,y){for(var _=u._reactName,E=[];h!==null&&h!==O;){var M=h,U=M.alternate,J=M.stateNode;if(M=M.tag,U!==null&&U===O)break;M!==5&&M!==26&&M!==27||J===null||(U=J,y?(J=vo(h,_),J!=null&&E.unshift($u(h,J,U))):y||(J=vo(h,_),J!=null&&E.push($u(h,J,U)))),h=h.return}E.length!==0&&l.push({event:u,listeners:E})}var TI=/\r\n?/g,EI=/\u0000|\uFFFD/g;function L1(l){return(typeof l=="string"?l:""+l).replace(TI,`
34
- `).replace(EI,"")}function D1(l,u){return u=L1(u),L1(l)===u}function Qt(l,u,h,O,y,_){switch(h){case"children":typeof O=="string"?u==="body"||u==="textarea"&&O===""||ss(l,O):(typeof O=="number"||typeof O=="bigint")&&u!=="body"&&ss(l,""+O);break;case"className":_l(l,"class",O);break;case"tabIndex":_l(l,"tabindex",O);break;case"dir":case"role":case"viewBox":case"width":case"height":_l(l,h,O);break;case"style":oh(l,O,_);break;case"data":if(u!=="object"){_l(l,"data",O);break}case"src":case"href":if(O===""&&(u!=="a"||h!=="href")){l.removeAttribute(h);break}if(O==null||typeof O=="function"||typeof O=="symbol"||typeof O=="boolean"){l.removeAttribute(h);break}O=kl(""+O),l.setAttribute(h,O);break;case"action":case"formAction":if(typeof O=="function"){l.setAttribute(h,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof _=="function"&&(h==="formAction"?(u!=="input"&&Qt(l,u,"name",y.name,y,null),Qt(l,u,"formEncType",y.formEncType,y,null),Qt(l,u,"formMethod",y.formMethod,y,null),Qt(l,u,"formTarget",y.formTarget,y,null)):(Qt(l,u,"encType",y.encType,y,null),Qt(l,u,"method",y.method,y,null),Qt(l,u,"target",y.target,y,null)));if(O==null||typeof O=="symbol"||typeof O=="boolean"){l.removeAttribute(h);break}O=kl(""+O),l.setAttribute(h,O);break;case"onClick":O!=null&&(l.onclick=Si);break;case"onScroll":O!=null&&at("scroll",l);break;case"onScrollEnd":O!=null&&at("scrollend",l);break;case"dangerouslySetInnerHTML":if(O!=null){if(typeof O!="object"||!("__html"in O))throw Error(r(61));if(h=O.__html,h!=null){if(y.children!=null)throw Error(r(60));l.innerHTML=h}}break;case"multiple":l.multiple=O&&typeof O!="function"&&typeof O!="symbol";break;case"muted":l.muted=O&&typeof O!="function"&&typeof O!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(O==null||typeof O=="function"||typeof O=="boolean"||typeof O=="symbol"){l.removeAttribute("xlink:href");break}h=kl(""+O),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":O!=null&&typeof O!="function"&&typeof O!="symbol"?l.setAttribute(h,""+O):l.removeAttribute(h);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":O&&typeof O!="function"&&typeof O!="symbol"?l.setAttribute(h,""):l.removeAttribute(h);break;case"capture":case"download":O===!0?l.setAttribute(h,""):O!==!1&&O!=null&&typeof O!="function"&&typeof O!="symbol"?l.setAttribute(h,O):l.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":O!=null&&typeof O!="function"&&typeof O!="symbol"&&!isNaN(O)&&1<=O?l.setAttribute(h,O):l.removeAttribute(h);break;case"rowSpan":case"start":O==null||typeof O=="function"||typeof O=="symbol"||isNaN(O)?l.removeAttribute(h):l.setAttribute(h,O);break;case"popover":at("beforetoggle",l),at("toggle",l),xl(l,"popover",O);break;case"xlinkActuate":yi(l,"http://www.w3.org/1999/xlink","xlink:actuate",O);break;case"xlinkArcrole":yi(l,"http://www.w3.org/1999/xlink","xlink:arcrole",O);break;case"xlinkRole":yi(l,"http://www.w3.org/1999/xlink","xlink:role",O);break;case"xlinkShow":yi(l,"http://www.w3.org/1999/xlink","xlink:show",O);break;case"xlinkTitle":yi(l,"http://www.w3.org/1999/xlink","xlink:title",O);break;case"xlinkType":yi(l,"http://www.w3.org/1999/xlink","xlink:type",O);break;case"xmlBase":yi(l,"http://www.w3.org/XML/1998/namespace","xml:base",O);break;case"xmlLang":yi(l,"http://www.w3.org/XML/1998/namespace","xml:lang",O);break;case"xmlSpace":yi(l,"http://www.w3.org/XML/1998/namespace","xml:space",O);break;case"is":xl(l,"is",O);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=Yg.get(h)||h,xl(l,h,O))}}function EO(l,u,h,O,y,_){switch(h){case"style":oh(l,O,_);break;case"dangerouslySetInnerHTML":if(O!=null){if(typeof O!="object"||!("__html"in O))throw Error(r(61));if(h=O.__html,h!=null){if(y.children!=null)throw Error(r(60));l.innerHTML=h}}break;case"children":typeof O=="string"?ss(l,O):(typeof O=="number"||typeof O=="bigint")&&ss(l,""+O);break;case"onScroll":O!=null&&at("scroll",l);break;case"onScrollEnd":O!=null&&at("scrollend",l);break;case"onClick":O!=null&&(l.onclick=Si);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sl.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(y=h.endsWith("Capture"),u=h.slice(2,y?h.length-7:void 0),_=l[Pn]||null,_=_!=null?_[h]:null,typeof _=="function"&&l.removeEventListener(u,_,y),typeof O=="function")){typeof _!="function"&&_!==null&&(h in l?l[h]=null:l.hasAttribute(h)&&l.removeAttribute(h)),l.addEventListener(u,O,y);break e}h in l?l[h]=O:O===!0?l.setAttribute(h,""):xl(l,h,O)}}}function Bn(l,u,h){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":at("error",l),at("load",l);var O=!1,y=!1,_;for(_ in h)if(h.hasOwnProperty(_)){var E=h[_];if(E!=null)switch(_){case"src":O=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Qt(l,u,_,E,h,null)}}y&&Qt(l,u,"srcSet",h.srcSet,h,null),O&&Qt(l,u,"src",h.src,h,null);return;case"input":at("invalid",l);var M=_=E=y=null,U=null,J=null;for(O in h)if(h.hasOwnProperty(O)){var ie=h[O];if(ie!=null)switch(O){case"name":y=ie;break;case"type":E=ie;break;case"checked":U=ie;break;case"defaultChecked":J=ie;break;case"value":_=ie;break;case"defaultValue":M=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,u));break;default:Qt(l,u,O,ie,h,null)}}rh(l,_,M,U,J,E,y,!1);return;case"select":at("invalid",l),O=E=_=null;for(y in h)if(h.hasOwnProperty(y)&&(M=h[y],M!=null))switch(y){case"value":_=M;break;case"defaultValue":E=M;break;case"multiple":O=M;default:Qt(l,u,y,M,h,null)}u=_,h=E,l.multiple=!!O,u!=null?as(l,!!O,u,!1):h!=null&&as(l,!!O,h,!0);return;case"textarea":at("invalid",l),_=y=O=null;for(E in h)if(h.hasOwnProperty(E)&&(M=h[E],M!=null))switch(E){case"value":O=M;break;case"defaultValue":y=M;break;case"children":_=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(91));break;default:Qt(l,u,E,M,h,null)}ah(l,O,y,_);return;case"option":for(U in h)if(h.hasOwnProperty(U)&&(O=h[U],O!=null))switch(U){case"selected":l.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:Qt(l,u,U,O,h,null)}return;case"dialog":at("beforetoggle",l),at("toggle",l),at("cancel",l),at("close",l);break;case"iframe":case"object":at("load",l);break;case"video":case"audio":for(O=0;O<Zu.length;O++)at(Zu[O],l);break;case"image":at("error",l),at("load",l);break;case"details":at("toggle",l);break;case"embed":case"source":case"link":at("error",l),at("load",l);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in h)if(h.hasOwnProperty(J)&&(O=h[J],O!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Qt(l,u,J,O,h,null)}return;default:if(ou(u)){for(ie in h)h.hasOwnProperty(ie)&&(O=h[ie],O!==void 0&&EO(l,u,ie,O,h,void 0));return}}for(M in h)h.hasOwnProperty(M)&&(O=h[M],O!=null&&Qt(l,u,M,O,h,null))}function CI(l,u,h,O){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,_=null,E=null,M=null,U=null,J=null,ie=null;for(ne in h){var oe=h[ne];if(h.hasOwnProperty(ne)&&oe!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":U=oe;default:O.hasOwnProperty(ne)||Qt(l,u,ne,null,O,oe)}}for(var te in O){var ne=O[te];if(oe=h[te],O.hasOwnProperty(te)&&(ne!=null||oe!=null))switch(te){case"type":_=ne;break;case"name":y=ne;break;case"checked":J=ne;break;case"defaultChecked":ie=ne;break;case"value":E=ne;break;case"defaultValue":M=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,u));break;default:ne!==oe&&Qt(l,u,te,ne,O,oe)}}au(l,E,M,U,J,ie,_,y);return;case"select":ne=E=M=te=null;for(_ in h)if(U=h[_],h.hasOwnProperty(_)&&U!=null)switch(_){case"value":break;case"multiple":ne=U;default:O.hasOwnProperty(_)||Qt(l,u,_,null,O,U)}for(y in O)if(_=O[y],U=h[y],O.hasOwnProperty(y)&&(_!=null||U!=null))switch(y){case"value":te=_;break;case"defaultValue":M=_;break;case"multiple":E=_;default:_!==U&&Qt(l,u,y,_,O,U)}u=M,h=E,O=ne,te!=null?as(l,!!h,te,!1):!!O!=!!h&&(u!=null?as(l,!!h,u,!0):as(l,!!h,h?[]:"",!1));return;case"textarea":ne=te=null;for(M in h)if(y=h[M],h.hasOwnProperty(M)&&y!=null&&!O.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:Qt(l,u,M,null,O,y)}for(E in O)if(y=O[E],_=h[E],O.hasOwnProperty(E)&&(y!=null||_!=null))switch(E){case"value":te=y;break;case"defaultValue":ne=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==_&&Qt(l,u,E,y,O,_)}ih(l,te,ne);return;case"option":for(var ke in h)if(te=h[ke],h.hasOwnProperty(ke)&&te!=null&&!O.hasOwnProperty(ke))switch(ke){case"selected":l.selected=!1;break;default:Qt(l,u,ke,null,O,te)}for(U in O)if(te=O[U],ne=h[U],O.hasOwnProperty(U)&&te!==ne&&(te!=null||ne!=null))switch(U){case"selected":l.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:Qt(l,u,U,te,O,ne)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Xe in h)te=h[Xe],h.hasOwnProperty(Xe)&&te!=null&&!O.hasOwnProperty(Xe)&&Qt(l,u,Xe,null,O,te);for(J in O)if(te=O[J],ne=h[J],O.hasOwnProperty(J)&&te!==ne&&(te!=null||ne!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,u));break;default:Qt(l,u,J,te,O,ne)}return;default:if(ou(u)){for(var Nt in h)te=h[Nt],h.hasOwnProperty(Nt)&&te!==void 0&&!O.hasOwnProperty(Nt)&&EO(l,u,Nt,void 0,O,te);for(ie in O)te=O[ie],ne=h[ie],!O.hasOwnProperty(ie)||te===ne||te===void 0&&ne===void 0||EO(l,u,ie,te,O,ne);return}}for(var G in h)te=h[G],h.hasOwnProperty(G)&&te!=null&&!O.hasOwnProperty(G)&&Qt(l,u,G,null,O,te);for(oe in O)te=O[oe],ne=h[oe],!O.hasOwnProperty(oe)||te===ne||te==null&&ne==null||Qt(l,u,oe,te,O,ne)}function z1(l){switch(l){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function AI(){if(typeof performance.getEntriesByType=="function"){for(var l=0,u=0,h=performance.getEntriesByType("resource"),O=0;O<h.length;O++){var y=h[O],_=y.transferSize,E=y.initiatorType,M=y.duration;if(_&&M&&z1(E)){for(E=0,M=y.responseEnd,O+=1;O<h.length;O++){var U=h[O],J=U.startTime;if(J>M)break;var ie=U.transferSize,oe=U.initiatorType;ie&&z1(oe)&&(U=U.responseEnd,E+=ie*(U<M?1:(M-J)/(U-J)))}if(--O,u+=8*(_+E)/(y.duration/1e3),l++,10<l)break}}if(0<l)return u/l/1e6}return navigator.connection&&(l=navigator.connection.downlink,typeof l=="number")?l:5}var CO=null,AO=null;function tm(l){return l.nodeType===9?l:l.ownerDocument}function I1(l){switch(l){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function q1(l,u){if(l===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return l===1&&u==="foreignObject"?0:l}function PO(l,u){return l==="textarea"||l==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var QO=null;function PI(){var l=window.event;return l&&l.type==="popstate"?l===QO?!1:(QO=l,!0):(QO=null,!1)}var B1=typeof setTimeout=="function"?setTimeout:void 0,QI=typeof clearTimeout=="function"?clearTimeout:void 0,X1=typeof Promise=="function"?Promise:void 0,NI=typeof queueMicrotask=="function"?queueMicrotask:typeof X1<"u"?function(l){return X1.resolve(null).then(l).catch(RI)}:B1;function RI(l){setTimeout(function(){throw l})}function js(l){return l==="head"}function Z1(l,u){var h=u,O=0;do{var y=h.nextSibling;if(l.removeChild(h),y&&y.nodeType===8)if(h=y.data,h==="/$"||h==="/&"){if(O===0){l.removeChild(y),ac(u);return}O--}else if(h==="$"||h==="$?"||h==="$~"||h==="$!"||h==="&")O++;else if(h==="html")Vu(l.ownerDocument.documentElement);else if(h==="head"){h=l.ownerDocument.head,Vu(h);for(var _=h.firstChild;_;){var E=_.nextSibling,M=_.nodeName;_[Oa]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&_.rel.toLowerCase()==="stylesheet"||h.removeChild(_),_=E}}else h==="body"&&Vu(l.ownerDocument.body);h=y}while(h);ac(u)}function $1(l,u){var h=l;l=0;do{var O=h.nextSibling;if(h.nodeType===1?u?(h._stashedDisplay=h.style.display,h.style.display="none"):(h.style.display=h._stashedDisplay||"",h.getAttribute("style")===""&&h.removeAttribute("style")):h.nodeType===3&&(u?(h._stashedText=h.nodeValue,h.nodeValue=""):h.nodeValue=h._stashedText||""),O&&O.nodeType===8)if(h=O.data,h==="/$"){if(l===0)break;l--}else h!=="$"&&h!=="$?"&&h!=="$~"&&h!=="$!"||l++;h=O}while(h)}function NO(l){var u=l.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var h=u;switch(u=u.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":NO(h),go(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}l.removeChild(h)}}function MI(l,u,h,O){for(;l.nodeType===1;){var y=h;if(l.nodeName.toLowerCase()!==u.toLowerCase()){if(!O&&(l.nodeName!=="INPUT"||l.type!=="hidden"))break}else if(O){if(!l[Oa])switch(u){case"meta":if(!l.hasAttribute("itemprop"))break;return l;case"link":if(_=l.getAttribute("rel"),_==="stylesheet"&&l.hasAttribute("data-precedence"))break;if(_!==y.rel||l.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||l.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||l.getAttribute("title")!==(y.title==null?null:y.title))break;return l;case"style":if(l.hasAttribute("data-precedence"))break;return l;case"script":if(_=l.getAttribute("src"),(_!==(y.src==null?null:y.src)||l.getAttribute("type")!==(y.type==null?null:y.type)||l.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&_&&l.hasAttribute("async")&&!l.hasAttribute("itemprop"))break;return l;default:return l}}else if(u==="input"&&l.type==="hidden"){var _=y.name==null?null:""+y.name;if(y.type==="hidden"&&l.getAttribute("name")===_)return l}else return l;if(l=ti(l.nextSibling),l===null)break}return null}function LI(l,u,h){if(u==="")return null;for(;l.nodeType!==3;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!h||(l=ti(l.nextSibling),l===null))return null;return l}function V1(l,u){for(;l.nodeType!==8;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!u||(l=ti(l.nextSibling),l===null))return null;return l}function RO(l){return l.data==="$?"||l.data==="$~"}function MO(l){return l.data==="$!"||l.data==="$?"&&l.ownerDocument.readyState!=="loading"}function DI(l,u){var h=l.ownerDocument;if(l.data==="$~")l._reactRetry=u;else if(l.data!=="$?"||h.readyState!=="loading")u();else{var O=function(){u(),h.removeEventListener("DOMContentLoaded",O)};h.addEventListener("DOMContentLoaded",O),l._reactRetry=O}}function ti(l){for(;l!=null;l=l.nextSibling){var u=l.nodeType;if(u===1||u===3)break;if(u===8){if(u=l.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return l}var LO=null;function U1(l){l=l.nextSibling;for(var u=0;l;){if(l.nodeType===8){var h=l.data;if(h==="/$"||h==="/&"){if(u===0)return ti(l.nextSibling);u--}else h!=="$"&&h!=="$!"&&h!=="$?"&&h!=="$~"&&h!=="&"||u++}l=l.nextSibling}return null}function Y1(l){l=l.previousSibling;for(var u=0;l;){if(l.nodeType===8){var h=l.data;if(h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"){if(u===0)return l;u--}else h!=="/$"&&h!=="/&"||u++}l=l.previousSibling}return null}function F1(l,u,h){switch(u=tm(h),l){case"html":if(l=u.documentElement,!l)throw Error(r(452));return l;case"head":if(l=u.head,!l)throw Error(r(453));return l;case"body":if(l=u.body,!l)throw Error(r(454));return l;default:throw Error(r(451))}}function Vu(l){for(var u=l.attributes;u.length;)l.removeAttributeNode(u[0]);go(l)}var ni=new Map,W1=new Set;function nm(l){return typeof l.getRootNode=="function"?l.getRootNode():l.nodeType===9?l:l.ownerDocument}var Da=I.d;I.d={f:zI,r:II,D:qI,C:BI,L:XI,m:ZI,X:VI,S:$I,M:UI};function zI(){var l=Da.f(),u=Yh();return l||u}function II(l){var u=Bi(l);u!==null&&u.tag===5&&u.type==="form"?fk(u):Da.r(l)}var nc=typeof document>"u"?null:document;function H1(l,u,h){var O=nc;if(O&&typeof u=="string"&&u){var y=hr(u);y='link[rel="'+l+'"][href="'+y+'"]',typeof h=="string"&&(y+='[crossorigin="'+h+'"]'),W1.has(y)||(W1.add(y),l={rel:l,crossOrigin:h,href:u},O.querySelector(y)===null&&(u=O.createElement("link"),Bn(u,"link",l),rn(u),O.head.appendChild(u)))}}function qI(l){Da.D(l),H1("dns-prefetch",l,null)}function BI(l,u){Da.C(l,u),H1("preconnect",l,u)}function XI(l,u,h){Da.L(l,u,h);var O=nc;if(O&&l&&u){var y='link[rel="preload"][as="'+hr(u)+'"]';u==="image"&&h&&h.imageSrcSet?(y+='[imagesrcset="'+hr(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(y+='[imagesizes="'+hr(h.imageSizes)+'"]')):y+='[href="'+hr(l)+'"]';var _=y;switch(u){case"style":_=rc(l);break;case"script":_=ic(l)}ni.has(_)||(l=m({rel:"preload",href:u==="image"&&h&&h.imageSrcSet?void 0:l,as:u},h),ni.set(_,l),O.querySelector(y)!==null||u==="style"&&O.querySelector(Uu(_))||u==="script"&&O.querySelector(Yu(_))||(u=O.createElement("link"),Bn(u,"link",l),rn(u),O.head.appendChild(u)))}}function ZI(l,u){Da.m(l,u);var h=nc;if(h&&l){var O=u&&typeof u.as=="string"?u.as:"script",y='link[rel="modulepreload"][as="'+hr(O)+'"][href="'+hr(l)+'"]',_=y;switch(O){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=ic(l)}if(!ni.has(_)&&(l=m({rel:"modulepreload",href:l},u),ni.set(_,l),h.querySelector(y)===null)){switch(O){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(Yu(_)))return}O=h.createElement("link"),Bn(O,"link",l),rn(O),h.head.appendChild(O)}}}function $I(l,u,h){Da.S(l,u,h);var O=nc;if(O&&l){var y=Xi(O).hoistableStyles,_=rc(l);u=u||"default";var E=y.get(_);if(!E){var M={loading:0,preload:null};if(E=O.querySelector(Uu(_)))M.loading=5;else{l=m({rel:"stylesheet",href:l,"data-precedence":u},h),(h=ni.get(_))&&DO(l,h);var U=E=O.createElement("link");rn(U),Bn(U,"link",l),U._p=new Promise(function(J,ie){U.onload=J,U.onerror=ie}),U.addEventListener("load",function(){M.loading|=1}),U.addEventListener("error",function(){M.loading|=2}),M.loading|=4,rm(E,u,O)}E={type:"stylesheet",instance:E,count:1,state:M},y.set(_,E)}}}function VI(l,u){Da.X(l,u);var h=nc;if(h&&l){var O=Xi(h).hoistableScripts,y=ic(l),_=O.get(y);_||(_=h.querySelector(Yu(y)),_||(l=m({src:l,async:!0},u),(u=ni.get(y))&&zO(l,u),_=h.createElement("script"),rn(_),Bn(_,"link",l),h.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},O.set(y,_))}}function UI(l,u){Da.M(l,u);var h=nc;if(h&&l){var O=Xi(h).hoistableScripts,y=ic(l),_=O.get(y);_||(_=h.querySelector(Yu(y)),_||(l=m({src:l,async:!0,type:"module"},u),(u=ni.get(y))&&zO(l,u),_=h.createElement("script"),rn(_),Bn(_,"link",l),h.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},O.set(y,_))}}function G1(l,u,h,O){var y=(y=Oe.current)?nm(y):null;if(!y)throw Error(r(446));switch(l){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(u=rc(h.href),h=Xi(y).hoistableStyles,O=h.get(u),O||(O={type:"style",instance:null,count:0,state:null},h.set(u,O)),O):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){l=rc(h.href);var _=Xi(y).hoistableStyles,E=_.get(l);if(E||(y=y.ownerDocument||y,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(l,E),(_=y.querySelector(Uu(l)))&&!_._p&&(E.instance=_,E.state.loading=5),ni.has(l)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},ni.set(l,h),_||YI(y,l,h,E.state))),u&&O===null)throw Error(r(528,""));return E}if(u&&O!==null)throw Error(r(529,""));return null;case"script":return u=h.async,h=h.src,typeof h=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=ic(h),h=Xi(y).hoistableScripts,O=h.get(u),O||(O={type:"script",instance:null,count:0,state:null},h.set(u,O)),O):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,l))}}function rc(l){return'href="'+hr(l)+'"'}function Uu(l){return'link[rel="stylesheet"]['+l+"]"}function K1(l){return m({},l,{"data-precedence":l.precedence,precedence:null})}function YI(l,u,h,O){l.querySelector('link[rel="preload"][as="style"]['+u+"]")?O.loading=1:(u=l.createElement("link"),O.preload=u,u.addEventListener("load",function(){return O.loading|=1}),u.addEventListener("error",function(){return O.loading|=2}),Bn(u,"link",h),rn(u),l.head.appendChild(u))}function ic(l){return'[src="'+hr(l)+'"]'}function Yu(l){return"script[async]"+l}function J1(l,u,h){if(u.count++,u.instance===null)switch(u.type){case"style":var O=l.querySelector('style[data-href~="'+hr(h.href)+'"]');if(O)return u.instance=O,rn(O),O;var y=m({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return O=(l.ownerDocument||l).createElement("style"),rn(O),Bn(O,"style",y),rm(O,h.precedence,l),u.instance=O;case"stylesheet":y=rc(h.href);var _=l.querySelector(Uu(y));if(_)return u.state.loading|=4,u.instance=_,rn(_),_;O=K1(h),(y=ni.get(y))&&DO(O,y),_=(l.ownerDocument||l).createElement("link"),rn(_);var E=_;return E._p=new Promise(function(M,U){E.onload=M,E.onerror=U}),Bn(_,"link",O),u.state.loading|=4,rm(_,h.precedence,l),u.instance=_;case"script":return _=ic(h.src),(y=l.querySelector(Yu(_)))?(u.instance=y,rn(y),y):(O=h,(y=ni.get(_))&&(O=m({},h),zO(O,y)),l=l.ownerDocument||l,y=l.createElement("script"),rn(y),Bn(y,"link",O),l.head.appendChild(y),u.instance=y);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(O=u.instance,u.state.loading|=4,rm(O,h.precedence,l));return u.instance}function rm(l,u,h){for(var O=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=O.length?O[O.length-1]:null,_=y,E=0;E<O.length;E++){var M=O[E];if(M.dataset.precedence===u)_=M;else if(_!==y)break}_?_.parentNode.insertBefore(l,_.nextSibling):(u=h.nodeType===9?h.head:h,u.insertBefore(l,u.firstChild))}function DO(l,u){l.crossOrigin==null&&(l.crossOrigin=u.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=u.referrerPolicy),l.title==null&&(l.title=u.title)}function zO(l,u){l.crossOrigin==null&&(l.crossOrigin=u.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=u.referrerPolicy),l.integrity==null&&(l.integrity=u.integrity)}var im=null;function ej(l,u,h){if(im===null){var O=new Map,y=im=new Map;y.set(h,O)}else y=im,O=y.get(h),O||(O=new Map,y.set(h,O));if(O.has(l))return O;for(O.set(l,null),h=h.getElementsByTagName(l),y=0;y<h.length;y++){var _=h[y];if(!(_[Oa]||_[un]||l==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var E=_.getAttribute(u)||"";E=l+E;var M=O.get(E);M?M.push(_):O.set(E,[_])}}return O}function tj(l,u,h){l=l.ownerDocument||l,l.head.insertBefore(h,u==="title"?l.querySelector("head > title"):null)}function FI(l,u,h){if(h===1||u.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return l=u.disabled,typeof u.precedence=="string"&&l==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function nj(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function WI(l,u,h,O){if(h.type==="stylesheet"&&(typeof O.media!="string"||matchMedia(O.media).matches!==!1)&&(h.state.loading&4)===0){if(h.instance===null){var y=rc(O.href),_=u.querySelector(Uu(y));if(_){u=_._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(l.count++,l=am.bind(l),u.then(l,l)),h.state.loading|=4,h.instance=_,rn(_);return}_=u.ownerDocument||u,O=K1(O),(y=ni.get(y))&&DO(O,y),_=_.createElement("link"),rn(_);var E=_;E._p=new Promise(function(M,U){E.onload=M,E.onerror=U}),Bn(_,"link",O),h.instance=_}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(h,u),(u=h.state.preload)&&(h.state.loading&3)===0&&(l.count++,h=am.bind(l),u.addEventListener("load",h),u.addEventListener("error",h))}}var IO=0;function HI(l,u){return l.stylesheets&&l.count===0&&om(l,l.stylesheets),0<l.count||0<l.imgCount?function(h){var O=setTimeout(function(){if(l.stylesheets&&om(l,l.stylesheets),l.unsuspend){var _=l.unsuspend;l.unsuspend=null,_()}},6e4+u);0<l.imgBytes&&IO===0&&(IO=62500*AI());var y=setTimeout(function(){if(l.waitingForImages=!1,l.count===0&&(l.stylesheets&&om(l,l.stylesheets),l.unsuspend)){var _=l.unsuspend;l.unsuspend=null,_()}},(l.imgBytes>IO?50:800)+u);return l.unsuspend=h,function(){l.unsuspend=null,clearTimeout(O),clearTimeout(y)}}:null}function am(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)om(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var sm=null;function om(l,u){l.stylesheets=null,l.unsuspend!==null&&(l.count++,sm=new Map,u.forEach(GI,l),sm=null,am.call(l))}function GI(l,u){if(!(u.state.loading&4)){var h=sm.get(l);if(h)var O=h.get(null);else{h=new Map,sm.set(l,h);for(var y=l.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<y.length;_++){var E=y[_];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(h.set(E.dataset.precedence,E),O=E)}O&&h.set(null,O)}y=u.instance,E=y.getAttribute("data-precedence"),_=h.get(E)||O,_===O&&h.set(null,y),h.set(E,y),this.count++,O=am.bind(this),y.addEventListener("load",O),y.addEventListener("error",O),_?_.parentNode.insertBefore(y,_.nextSibling):(l=l.nodeType===9?l.head:l,l.insertBefore(y,l.firstChild)),u.state.loading|=4}}var Fu={$$typeof:T,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function KI(l,u,h,O,y,_,E,M,U){this.tag=1,this.containerInfo=l,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=vn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vn(0),this.hiddenUpdates=vn(null),this.identifierPrefix=O,this.onUncaughtError=y,this.onCaughtError=_,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function rj(l,u,h,O,y,_,E,M,U,J,ie,oe){return l=new KI(l,u,h,E,U,J,ie,oe,M),u=1,_===!0&&(u|=24),_=Pr(3,null,null,u),l.current=_,_.stateNode=l,u=Ov(),u.refCount++,l.pooledCache=u,u.refCount++,_.memoizedState={element:O,isDehydrated:h,cache:u},xv(_),l}function ij(l){return l?(l=Ml,l):Ml}function aj(l,u,h,O,y,_){y=ij(y),O.context===null?O.context=y:O.pendingContext=y,O=ps(u),O.payload={element:h},_=_===void 0?null:_,_!==null&&(O.callback=_),h=gs(l,O,u),h!==null&&(Or(h,l,u),ju(h,l,u))}function sj(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var h=l.retryLane;l.retryLane=h!==0&&h<u?h:u}}function qO(l,u){sj(l,u),(l=l.alternate)&&sj(l,u)}function oj(l){if(l.tag===13||l.tag===31){var u=_o(l,67108864);u!==null&&Or(u,l,67108864),qO(l,67108864)}}function lj(l){if(l.tag===13||l.tag===31){var u=Lr();u=nn(u);var h=_o(l,u);h!==null&&Or(h,l,u),qO(l,u)}}var lm=!0;function JI(l,u,h,O){var y=q.T;q.T=null;var _=I.p;try{I.p=2,BO(l,u,h,O)}finally{I.p=_,q.T=y}}function eq(l,u,h,O){var y=q.T;q.T=null;var _=I.p;try{I.p=8,BO(l,u,h,O)}finally{I.p=_,q.T=y}}function BO(l,u,h,O){if(lm){var y=XO(O);if(y===null)TO(l,u,O,cm,h),uj(l,O);else if(nq(y,l,u,h,O))O.stopPropagation();else if(uj(l,O),u&4&&-1<tq.indexOf(l)){for(;y!==null;){var _=Bi(y);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var E=Dt(_.pendingLanes);if(E!==0){var M=_;for(M.pendingLanes|=2,M.entangledLanes|=2;E;){var U=1<<31-lt(E);M.entanglements[1]|=U,E&=~U}Fi(_),(bt&6)===0&&(Vh=et()+500,Xu(0))}}break;case 31:case 13:M=_o(_,2),M!==null&&Or(M,_,2),Yh(),qO(_,2)}if(_=XO(O),_===null&&TO(l,u,O,cm,h),_===y)break;y=_}y!==null&&O.stopPropagation()}else TO(l,u,O,null,h)}}function XO(l){return l=cu(l),ZO(l)}var cm=null;function ZO(l){if(cm=null,l=qi(l),l!==null){var u=a(l);if(u===null)l=null;else{var h=u.tag;if(h===13){if(l=s(u),l!==null)return l;l=null}else if(h===31){if(l=o(u),l!==null)return l;l=null}else if(h===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;l=null}else u!==l&&(l=null)}}return cm=l,null}function cj(l){switch(l){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Mn()){case re:return 2;case fe:return 8;case Te:case $e:return 32;case rt:return 268435456;default:return 32}default:return 32}}var $O=!1,Ts=null,Es=null,Cs=null,Wu=new Map,Hu=new Map,As=[],tq="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function uj(l,u){switch(l){case"focusin":case"focusout":Ts=null;break;case"dragenter":case"dragleave":Es=null;break;case"mouseover":case"mouseout":Cs=null;break;case"pointerover":case"pointerout":Wu.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hu.delete(u.pointerId)}}function Gu(l,u,h,O,y,_){return l===null||l.nativeEvent!==_?(l={blockedOn:u,domEventName:h,eventSystemFlags:O,nativeEvent:_,targetContainers:[y]},u!==null&&(u=Bi(u),u!==null&&oj(u)),l):(l.eventSystemFlags|=O,u=l.targetContainers,y!==null&&u.indexOf(y)===-1&&u.push(y),l)}function nq(l,u,h,O,y){switch(u){case"focusin":return Ts=Gu(Ts,l,u,h,O,y),!0;case"dragenter":return Es=Gu(Es,l,u,h,O,y),!0;case"mouseover":return Cs=Gu(Cs,l,u,h,O,y),!0;case"pointerover":var _=y.pointerId;return Wu.set(_,Gu(Wu.get(_)||null,l,u,h,O,y)),!0;case"gotpointercapture":return _=y.pointerId,Hu.set(_,Gu(Hu.get(_)||null,l,u,h,O,y)),!0}return!1}function dj(l){var u=qi(l.target);if(u!==null){var h=a(u);if(h!==null){if(u=h.tag,u===13){if(u=s(h),u!==null){l.blockedOn=u,dr(l.priority,function(){lj(h)});return}}else if(u===31){if(u=o(h),u!==null){l.blockedOn=u,dr(l.priority,function(){lj(h)});return}}else if(u===3&&h.stateNode.current.memoizedState.isDehydrated){l.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}l.blockedOn=null}function um(l){if(l.blockedOn!==null)return!1;for(var u=l.targetContainers;0<u.length;){var h=XO(l.nativeEvent);if(h===null){h=l.nativeEvent;var O=new h.constructor(h.type,h);lu=O,h.target.dispatchEvent(O),lu=null}else return u=Bi(h),u!==null&&oj(u),l.blockedOn=h,!1;u.shift()}return!0}function fj(l,u,h){um(l)&&h.delete(u)}function rq(){$O=!1,Ts!==null&&um(Ts)&&(Ts=null),Es!==null&&um(Es)&&(Es=null),Cs!==null&&um(Cs)&&(Cs=null),Wu.forEach(fj),Hu.forEach(fj)}function dm(l,u){l.blockedOn===u&&(l.blockedOn=null,$O||($O=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,rq)))}var fm=null;function hj(l){fm!==l&&(fm=l,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){fm===l&&(fm=null);for(var u=0;u<l.length;u+=3){var h=l[u],O=l[u+1],y=l[u+2];if(typeof O!="function"){if(ZO(O||h)===null)continue;break}var _=Bi(h);_!==null&&(l.splice(u,3),u-=3,Xv(_,{pending:!0,data:y,method:h.method,action:O},O,y))}}))}function ac(l){function u(U){return dm(U,l)}Ts!==null&&dm(Ts,l),Es!==null&&dm(Es,l),Cs!==null&&dm(Cs,l),Wu.forEach(u),Hu.forEach(u);for(var h=0;h<As.length;h++){var O=As[h];O.blockedOn===l&&(O.blockedOn=null)}for(;0<As.length&&(h=As[0],h.blockedOn===null);)dj(h),h.blockedOn===null&&As.shift();if(h=(l.ownerDocument||l).$$reactFormReplay,h!=null)for(O=0;O<h.length;O+=3){var y=h[O],_=h[O+1],E=y[Pn]||null;if(typeof _=="function")E||hj(h);else if(E){var M=null;if(_&&_.hasAttribute("formAction")){if(y=_,E=_[Pn]||null)M=E.formAction;else if(ZO(y)!==null)continue}else M=E.action;typeof M=="function"?h[O+1]=M:(h.splice(O,3),O-=3),hj(h)}}}function mj(){function l(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(E){return y=E})},focusReset:"manual",scroll:"manual"})}function u(){y!==null&&(y(),y=null),O||setTimeout(h,20)}function h(){if(!O&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var O=!1,y=null;return navigation.addEventListener("navigate",l),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(h,100),function(){O=!0,navigation.removeEventListener("navigate",l),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),y!==null&&(y(),y=null)}}}function VO(l){this._internalRoot=l}hm.prototype.render=VO.prototype.render=function(l){var u=this._internalRoot;if(u===null)throw Error(r(409));var h=u.current,O=Lr();aj(h,O,l,u,null,null)},hm.prototype.unmount=VO.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var u=l.containerInfo;aj(l.current,2,null,l,null,null),Yh(),u[Ii]=null}};function hm(l){this._internalRoot=l}hm.prototype.unstable_scheduleHydration=function(l){if(l){var u=Dn();l={blockedOn:null,target:l,priority:u};for(var h=0;h<As.length&&u!==0&&u<As[h].priority;h++);As.splice(h,0,l),h===0&&dj(l)}};var pj=t.version;if(pj!=="19.2.4")throw Error(r(527,pj,"19.2.4"));I.findDOMNode=function(l){var u=l._reactInternals;if(u===void 0)throw typeof l.render=="function"?Error(r(188)):(l=Object.keys(l).join(","),Error(r(268,l)));return l=d(u),l=l!==null?f(l):null,l=l===null?null:l.stateNode,l};var iq={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mm.isDisabled&&mm.supportsFiber)try{Jt=mm.inject(iq),Lt=mm}catch{}}return Ju.createRoot=function(l,u){if(!i(l))throw Error(r(299));var h=!1,O="",y=xk,_=_k,E=wk;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(O=u.identifierPrefix),u.onUncaughtError!==void 0&&(y=u.onUncaughtError),u.onCaughtError!==void 0&&(_=u.onCaughtError),u.onRecoverableError!==void 0&&(E=u.onRecoverableError)),u=rj(l,1,!1,null,null,h,O,null,y,_,E,mj),l[Ii]=u.current,jO(l),new VO(u)},Ju.hydrateRoot=function(l,u,h){if(!i(l))throw Error(r(299));var O=!1,y="",_=xk,E=_k,M=wk,U=null;return h!=null&&(h.unstable_strictMode===!0&&(O=!0),h.identifierPrefix!==void 0&&(y=h.identifierPrefix),h.onUncaughtError!==void 0&&(_=h.onUncaughtError),h.onCaughtError!==void 0&&(E=h.onCaughtError),h.onRecoverableError!==void 0&&(M=h.onRecoverableError),h.formState!==void 0&&(U=h.formState)),u=rj(l,1,!0,u,h??null,O,y,U,_,E,M,mj),u.context=ij(null),h=u.current,O=Lr(),O=nn(O),y=ps(O),y.callback=null,gs(h,y,O),h=O,u.current.lanes=h,An(u,h),Fi(u),l[Ii]=u.current,jO(l),new hm(u)},Ju.version="19.2.4",Ju}var kj;function kq(){if(kj)return FO.exports;kj=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),FO.exports=wq(),FO.exports}var jq=kq();const Tq=NA(jq);function Ey(e){"@babel/helpers - typeof";return Ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ey(e)}function MA(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Ey(XMLHttpRequest))==="object"}function Eq(e){return!!e&&typeof e.then=="function"}function Cq(e){return Eq(e)?e:Promise.resolve(e)}function jj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jj(Object(n),!0).forEach(function(r){Aq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Aq(e,t,n){return(t=Pq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pq(e){var t=Qq(e,"string");return el(t)=="symbol"?t:t+""}function Qq(e,t){if(el(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(el(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function el(e){"@babel/helpers - typeof";return el=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},el(e)}var eo=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?eo=global.fetch:typeof window<"u"&&window.fetch&&(eo=window.fetch);var $d;MA()&&(typeof global<"u"&&global.XMLHttpRequest?$d=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&($d=window.XMLHttpRequest));var bp;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?bp=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(bp=window.ActiveXObject));typeof eo!="function"&&(eo=void 0);if(!eo&&!$d&&!bp)try{Pe(()=>import("./browser-ponyfill-D2ngVqWO.js").then(e=>e.b),__vite__mapDeps([0,1])).then(function(e){eo=e.default}).catch(function(){})}catch{}var Cy=function(t,n){if(n&&el(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},Ej=function(t,n,r,i){var a=function(c){if(!c.ok)return r(c.statusText||"Error",{status:c.status});c.text().then(function(d){r(null,{status:c.status,data:d})}).catch(r)};if(i){var s=i(t,n);if(s instanceof Promise){s.then(a).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(a).catch(r):eo(t,n).then(a).catch(r)},Cj=!1,Nq=function(t,n,r,i){t.queryStringParams&&(n=Cy(n,t.queryStringParams));var a=Tj({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(a["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(a["Content-Type"]="application/json");var s=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,o=Tj({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:a},Cj?{}:s),c=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{Ej(n,o,i,c)}catch(d){if(!s||Object.keys(s).length===0||!d.message||d.message.indexOf("not implemented")<0)return i(d);try{Object.keys(s).forEach(function(f){delete o[f]}),Ej(n,o,i,c),Cj=!0}catch(f){i(f)}}},Rq=function(t,n,r,i){r&&el(r)==="object"&&(r=Cy("",r).slice(1)),t.queryStringParams&&(n=Cy(n,t.queryStringParams));try{var a=$d?new $d:new bp("MSXML2.XMLHTTP.3.0");a.open(r?"POST":"GET",n,1),t.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!t.withCredentials,r&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var s=t.customHeaders;if(s=typeof s=="function"?s():s,s)for(var o in s)a.setRequestHeader(o,s[o]);a.onreadystatechange=function(){a.readyState>3&&i(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(r)}catch(c){console&&console.log(c)}},Mq=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},eo&&n.indexOf("file:")!==0)return Nq(t,n,r,i);if(MA()||typeof ActiveXObject=="function")return Rq(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Tc(e){"@babel/helpers - typeof";return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}function Aj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function GO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Aj(Object(n),!0).forEach(function(r){LA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,DA(r.key),r)}}function zq(e,t,n){return t&&Dq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LA(e,t,n){return(t=DA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DA(e){var t=Iq(e,"string");return Tc(t)=="symbol"?t:t+""}function Iq(e,t){if(Tc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qq=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return LA({},r,i||"")},parseLoadPayload:function(n,r){},request:Mq,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},zA=(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Lq(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return zq(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=GO(GO(GO({},qq()),this.options||{}),i),this.allOptions=a,this.services&&this.options.reloadInterval){var s=setInterval(function(){return r.reload()},this.options.reloadInterval);Tc(s)==="object"&&typeof s.unref=="function"&&s.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,a,s){var o=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,i)),c=Cq(c),c.then(function(d){if(!d)return s(null,{});var f=o.services.interpolator.interpolate(d,{lng:n.join("+"),ns:i.join("+")});o.loadUrl(f,s,r,a)})}},{key:"loadUrl",value:function(n,r,i,a){var s=this,o=typeof i=="string"?[i]:i,c=typeof a=="string"?[a]:a,d=this.options.parseLoadPayload(o,c);this.options.request(this.options,n,d,function(f,m){if(m&&(m.status>=500&&m.status<600||!m.status))return r("failed loading "+n+"; status code: "+m.status,!0);if(m&&m.status>=400&&m.status<500)return r("failed loading "+n+"; status code: "+m.status,!1);if(!m&&f&&f.message){var p=f.message.toLowerCase(),v=["failed","fetch","network","load"].find(function(x){return p.indexOf(x)>-1});if(v)return r("failed loading "+n+": "+f.message,!0)}if(f)return r(f,!1);var b,S;try{typeof m.data=="string"?b=s.options.parse(m.data,i,a):b=m.data}catch{S="failed parsing "+n+" to json"}if(S)return r(S,!1);r(null,b)})}},{key:"create",value:function(n,r,i,a,s){var o=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,i,a),d=0,f=[],m=[];n.forEach(function(p){var v=o.options.addPath;typeof o.options.addPath=="function"&&(v=o.options.addPath(p,r));var b=o.services.interpolator.interpolate(v,{lng:p,ns:r});o.options.request(o.options,b,c,function(S,x){d+=1,f.push(S),m.push(x),d===n.length&&typeof s=="function"&&s(f,m)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,a=r.languageUtils,s=r.logger,o=i.language;if(!(o&&o.toLowerCase()==="cimode")){var c=[],d=function(m){var p=a.toResolveHierarchy(m);p.forEach(function(v){c.indexOf(v)<0&&c.push(v)})};d(o),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return d(f)}),c.forEach(function(f){n.allOptions.ns.forEach(function(m){i.read(f,m,"read",null,null,function(p,v){p&&s.warn("loading namespace ".concat(m," for language ").concat(f," failed"),p),!p&&v&&s.log("loaded namespace ".concat(m," for language ").concat(f),v),i.loaded("".concat(f,"|").concat(m),p,v)})})})}}}])})();zA.type="backend";const IA=["ar","bn","cs","da","de","el","en","es","fa","fi","fr","he","hi","id","it","ja","ko","ms","nl","no","pl","pt","ro","sv","th","tr","uk","vi","zh"],Ec="en";function Ay(e){return IA.includes(e)}pq.use(zA).use(gq).init({ns:["translation"],defaultNS:"translation",fallbackLng:Ec,supportedLngs:[...IA],backend:{loadPath:"/messages/{{lng}}.json"},interpolation:{escapeValue:!1},initImmediate:!1});var qA={annotations:"Annotations",history:"History",resourceInfo:"Resource Info",collaboration:"Collaboration",userAccount:"User Account",settings:"Settings",knowledgeBase:"Knowledge Base"},BA={title:"Resource Info",locale:"Locale",notSpecified:"Not specified",entityTypeTags:"Entity Type Tags",representation:"Representation",mediaType:"Media Type",byteSize:"Size",storageUri:"Storage",clone:"Clone",cloneDescription:"Generate a shareable clone link for this resource",archive:"Archive",archiveDescription:"Move this resource to archived status",unarchive:"Unarchive",unarchiveDescription:"Restore this resource to active status",provenance:"Provenance",createdAt:"Created",modifiedAt:"Modified",creationMethod:"How created",attributedTo:"Attributed to",derivedFrom:"Derived from",generatedBy:"Generated by"},XA={title:"Collaboration",connectionStatus:"Connection Status",live:"Live",disconnected:"Disconnected",events:"{{count}} events",lastSync:"Last sync:",noActivity:"No activity yet",justNow:"Just now",secondsAgo:"{{count}} seconds ago",minuteAgo:"1 minute ago",minutesAgo:"{{count}} minutes ago",hourAgo:"1 hour ago",hoursAgo:"{{count}} hours ago",realtimeActive:"Real-time updates are active",reconnecting:"Reconnecting to server...",sharing:"Sharing",collaborationComingSoon:"Collaboration features coming soon"},ZA={history:"History",loading:"Loading...",user:"User",method:"Method",viewOriginal:"View original",viewAnnotation:"View annotation: {{content}}",resourceCreated:"Created Resource",resourceCloned:"Cloned",resourceArchived:"Archived",resourceUnarchived:"Unarchived",highlightAdded:"Highlight Added",highlightRemoved:"Highlight Removed",referenceCreated:"Reference Created",referenceResolved:"Reference Resolved",referenceDeleted:"Reference Deleted",entitytagAdded:"Tag Added",entitytagRemoved:"Tag Removed",assessmentAdded:"Assessment Added",assessmentRemoved:"Assessment Removed",annotationAdded:"Annotation Added",annotationRemoved:"Annotation Removed",annotationBodyUpdated:"Annotation Updated",jobEvent:"Job Event",embeddingComputed:"Embedding Computed",justNow:"just now",minutesAgo:"{{count}}m ago",hoursAgo:"{{count}}h ago",daysAgo:"{{count}}d ago"},$A={title:"Comments",noComments:"No comments yet. Select text and click Comment to add one.",commentPlaceholder:"Type your comment here...",save:"Save",cancel:"Cancel",edit:"Edit",annotateComments:"Annotate Comments",instructions:"Instructions",optional:"(optional)",instructionsPlaceholder:"e.g., Focus on technical terminology...",annotate:"Annotate",annotating:"Annotating...",toneLabel:"Tone",toneOptional:"(optional)",toneScholarly:"Scholarly",toneExplanatory:"Explanatory",toneConversational:"Conversational",toneTechnical:"Technical",densityLabel:"Density",densitySparse:"Sparse",densityDense:"Dense",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected",closeProgress:"Close"},VA={title:"Highlights",noHighlights:"No highlights yet. Use AI annotation to find important passages.",annotateHighlights:"Annotate Highlights",instructions:"Instructions",optional:"(optional)",instructionsPlaceholder:"e.g., Focus on key technical concepts...",annotate:"Annotate",annotating:"Annotating...",cancel:"Cancel",densityLabel:"Density",densitySparse:"Sparse",densityDense:"Dense",closeProgress:"Close"},UA={title:"Assessments",noAssessments:"No assessments yet. Use AI annotation to evaluate passages.",assessmentPlaceholder:"Type your assessment here...",save:"Save",cancel:"Cancel",annotateAssessments:"Annotate Assessments",instructions:"Instructions",optional:"(optional)",instructionsPlaceholder:"e.g., Evaluate claims for accuracy and evidence...",annotate:"Annotate",annotating:"Annotating...",toneLabel:"Tone",toneOptional:"(optional)",toneAnalytical:"Analytical",toneCritical:"Critical",toneBalanced:"Balanced",toneConstructive:"Constructive",densityLabel:"Density",densitySparse:"Sparse",densityDense:"Dense",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected",closeProgress:"Close"},YA={title:"Tags",noTags:"No tags yet. Use AI annotation to identify structural roles.",noSchemas:"No tag schemas registered for this knowledge base. A KB administrator must register at least one structural-analysis schema (e.g. via the `register-tag-schemas` skill) before tagging can be used.",annotateTags:"Annotate Tags",selectSchema:"Select Framework",selectCategories:"Select Categories",annotate:"Annotate",annotating:"Annotating...",cancel:"Cancel",selectAll:"Select All",deselectAll:"Deselect All",categoriesSelected:"{count, plural, =0 {No categories selected} =1 {1 category selected} other {# categories selected}}",createTagForSelection:"Create Tag for Selection",selectCategory:"Select Category",chooseCategory:"Choose a category...",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected"},FA={title:"Annotations",statistics:"Statistics",highlight:"Highlights",reference:"References",assessment:"Assessments",comment:"Comments",tag:"Tags"},WA={title:"Statistics",highlights:"Highlights",comments:"Comments",assessments:"Assessments",tags:"Tags",references:"References",stub:"Stub",resolved:"Resolved",entityTypes:"Entity Types"},HA={title:"References",noReferences:"No references yet. Select text to create references to other resources.",outgoingReferences:"Outgoing References",incomingReferences:"Incoming References",noIncomingReferences:"No incoming references",stub:"Stub reference (not linked)",resolved:"Resolved reference (linked)",open:"Open",unlink:"Unlink",resolve:"Resolve Reference",cancel:"Cancel",createReference:"Create Reference",entityTypesOptional:"Entity Types (Optional)",fragmentSelected:"Fragment selected",imageRegionSelected:"Image region selected",annotateReferences:"Annotate References",selectEntityTypes:"Entity types:",select:"Select",deselect:"Deselect",noEntityTypes:"No entity types available",typesSelected:"{count, plural, =1 {1 type selected} other {# types selected}}",annotate:"Annotate",annotating:"Annotating...",includeDescriptiveReferences:"Include descriptive references",descriptiveReferencesTooltip:"Also find phrases like 'the CEO', 'the tech giant', 'the physicist' (in addition to names)",annotationProgressTitle:"Annotating Entity References",cancelAnnotation:"Cancel annotation",found:"{{count}} found",complete:"Annotation complete!",failed:"Annotation failed",current:"Current: {{entityType}}",closeProgress:"Close",loading:"loading...",loadingEllipsis:"Loading...",untitledResource:"Untitled Resource",noText:"No text"},GA={title:"Keyboard Shortcuts",closeDialog:"Close dialog",or:"or",navigationTitle:"Navigation",navOpenSearch:"Open global search",navOpenSearchAlt:"Open global search (alternative)",navCreateResource:"Create new resource",navCloseOverlays:"Close all overlays (double press)",navShowHelp:"Show keyboard shortcuts help",sidebarTitle:"Knowledge Sidebar",sidebarCollapse:"Collapse sidebar",sidebarExpand:"Expand sidebar",sidebarPickup:"Pick up resource tab (when focused)",sidebarMove:"Move resource tab (when dragging)",sidebarDrop:"Drop resource tab (when dragging)",sidebarCancel:"Cancel drag operation",annotationsTitle:"Resource Annotations",annotHighlight:"Create highlight from annotation (direct)",annotReference:"Open reference popup for annotation",annotDelete:"Delete focused annotation",annotNavigate:"Navigate through annotations",annotNavigateBack:"Navigate annotations backward",listsTitle:"Lists & Grids",listsFilterNav:"Navigate entity type filters",listsGridNav:"Navigate resource grid",listsJumpFirst:"Jump to first item",listsJumpLast:"Jump to last item",searchModalTitle:"In Search Modal",searchNav:"Navigate search results",searchSelect:"Select result",searchClose:"Close search",modalTitle:"Modal Controls",modalClose:"Close active modal",modalNavForward:"Navigate forward through buttons",modalNavBackward:"Navigate backward through buttons",modalActivate:"Activate focused button",accessibilityTitle:"Accessibility",a11ySkipLinks:"Navigate to skip links (when at page start)",a11yFollowLink:"Follow skip link",macNote:"Using Mac keyboard shortcuts. ⌘ is the Command key.",windowsNote:"Using Windows/Linux keyboard shortcuts. Ctrl is the Control key.",footerHint:"Press {{key}} anytime to show this help",close:"Close"},KA={modeGroup:"Mode",browse:"Browse",annotate:"Annotate",selectionGroup:"Motivation",clickGroup:"Click",shapeGroup:"Shape",none:"None",linking:"Reference",highlighting:"Highlight",assessing:"Assess",commenting:"Comment",tagging:"Tag",detail:"Detail",follow:"Follow",deleting:"Delete",jsonld:"JSON-LD",rectangle:"Rectangle",circle:"Circle",polygon:"Polygon"},JA={title:"Navigation",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",dragToReorder:"Drag to reorder",dragToReorderDoc:"Drag to reorder {{name}}",closeResource:"Close resource",dragInstructions:"To reorder resources: Use Tab to navigate to a resource. Press Alt+Up arrow to move up or Alt+Down arrow to move down. For drag and drop: Press space bar to pick up the item. Use arrow keys to move it. Press space bar again to drop."},eP={deleteConfirmationTitle:"Delete Annotation",deleteConfirmationMessage:"Are you sure you want to delete this annotation? This action cannot be undone.",deleteConfirmationCancel:"Cancel",deleteConfirmationDelete:"Delete"},tP={title:"Settings",lineNumbers:"Line Numbers",lineNumbersVisible:"Visible",lineNumbersHidden:"Hidden",theme:"Theme",themeLight:"Light",themeDark:"Dark",themeSystem:"System",themeSystemActive:"System ({{mode}})",themeModeActive:"Using {{mode}} mode",language:"Language",languageHint:"Change language in the main navigation",languageChanging:"Changing language...",hoverDelay:"Hover Delay",hoverDelayFast:"Fast",hoverDelaySlow:"Slow",hoverDelayDescription:"{{delay}}ms delay before hover effects appear"},nP={},rP={gatherTitle:"Gathered Context",configureGenerationTitle:"Configure Generation",configureSearchTitle:"Configure Search",searchResultsTitle:"Search Results",sourceContextLabel:"Annotation context in resource",connectionsLabel:"Peer Annotations",citedByLabel:"Resource Cited By",userHintLabel:"Hint",userHintPlaceholder:"Describe what this annotation refers to...",loadingContext:"Gathering context...",failedContext:"Failed to gather context",cancel:"Cancel",generate:"Generate",compose:"Compose",resolutionStrategyLabel:"Resolution Strategy",back:"Back",link:"Link",score:"Score",noResults:"No results found",resourceTitle:"Resource Title",resourceTitlePlaceholder:"Enter resource title...",additionalInstructions:"Additional Instructions",additionalInstructionsPlaceholder:"Enter additional instructions...",language:"Language",languageHelp:"Language for generated content",creativity:"Creativity",creativityFocused:"Focused",creativityCreative:"Creative",maxLength:"Max Length",maxLengthHelp:"Maximum number of tokens",maxResults:"Max Results",semanticScoring:"Semantic Scoring",semanticScoringHelp:"Use AI to score results by semantic relevance",searching:"Searching...",search:"Search"},Ho={Toolbar:qA,ResourceInfoPanel:BA,CollaborationPanel:XA,AnnotationHistory:ZA,CommentsPanel:$A,HighlightPanel:VA,AssessmentPanel:UA,TaggingPanel:YA,UnifiedAnnotationsPanel:FA,StatisticsPanel:WA,ReferencesPanel:HA,KeyboardShortcuts:GA,AnnotateToolbar:KA,CollapsibleResourceNavigation:JA,ResourceViewer:eP,Settings:tP,AnnotateView:nP,ReferenceWizard:rP},Bq=Object.create,CS=Object.defineProperty,Xq=Object.getOwnPropertyDescriptor,iP=Object.getOwnPropertyNames,Zq=Object.getPrototypeOf,$q=Object.prototype.hasOwnProperty,Vq=e=>t=>{var n=e[t];if(n)return n();throw new Error("Module not found in bundle: "+t)},V=(e,t)=>function(){return t||(0,e[iP(e)[0]])((t={exports:{}}).exports,t),t.exports},aP=(e,t)=>{for(var n in t)CS(e,n,{get:t[n],enumerable:!0})},Uq=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of iP(t))!$q.call(e,i)&&i!==n&&CS(e,i,{get:()=>t[i],enumerable:!(r=Xq(t,i))||r.enumerable});return e},Kn=(e,t,n)=>(n=e!=null?Bq(Zq(e)):{},Uq(t||!e||!e.__esModule?CS(n,"default",{value:e,enumerable:!0}):n,e)),Py=function(e,t){return Py=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Py(e,t)};function Ja(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Py(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Yq(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(f){try{d(r.next(f))}catch(m){s(m)}}function c(f){try{d(r.throw(f))}catch(m){s(m)}}function d(f){f.done?a(f.value):i(f.value).then(o,c)}d((r=r.apply(e,t||[])).next())})}function sP(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(n=0)),n;)try{if(r=1,i&&(a=d[0]&2?i.return:d[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,d[1])).done)return a;switch(i=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){n.label=d[1];break}if(d[0]===6&&n.label<a[1]){n.label=a[1],a=d;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(d);break}a[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(f){d=[6,f],i=0}finally{r=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Cc(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Vd(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a}function Ud(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function fc(e){return this instanceof fc?(this.v=e,this):new fc(e)}function Fq(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(v){return function(b){return Promise.resolve(b).then(v,m)}}function o(v,b){r[v]&&(i[v]=function(S){return new Promise(function(x,w){a.push([v,S,x,w])>1||c(v,S)})},b&&(i[v]=b(i[v])))}function c(v,b){try{d(r[v](b))}catch(S){p(a[0][3],S)}}function d(v){v.value instanceof fc?Promise.resolve(v.value.v).then(f,m):p(a[0][2],v)}function f(v){c("next",v)}function m(v){c("throw",v)}function p(v,b){v(b),a.shift(),a.length&&c(a[0][0],a[0][1])}}function Wq(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Cc=="function"?Cc(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(s){return new Promise(function(o,c){s=e[a](s),i(o,c,s.done,s.value)})}}function i(a,s,o,c){Promise.resolve(c).then(function(d){a({value:d,done:o})},s)}}function jn(e){return typeof e=="function"}function rg(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var KO=rg(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
35
- `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
36
- `):"",this.name="UnsubscriptionError",this.errors=n}});function yp(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Bc=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,a;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var o=Cc(s),c=o.next();!c.done;c=o.next()){var d=c.value;d.remove(this)}}catch(S){t={error:S}}finally{try{c&&!c.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}else s.remove(this);var f=this.initialTeardown;if(jn(f))try{f()}catch(S){a=S instanceof KO?S.errors:[S]}var m=this._finalizers;if(m){this._finalizers=null;try{for(var p=Cc(m),v=p.next();!v.done;v=p.next()){var b=v.value;try{Pj(b)}catch(S){a=a??[],S instanceof KO?a=Ud(Ud([],Vd(a)),Vd(S.errors)):a.push(S)}}}catch(S){r={error:S}}finally{try{v&&!v.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}}if(a)throw new KO(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Pj(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&yp(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&yp(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),oP=Bc.EMPTY;function lP(e){return e instanceof Bc||e&&"closed"in e&&jn(e.remove)&&jn(e.add)&&jn(e.unsubscribe)}function Pj(e){jn(e)?e():e.unsubscribe()}var Hq={Promise:void 0},Gq={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ud([e,t],Vd(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function cP(e){Gq.setTimeout(function(){throw e})}function Qy(){}function Gm(e){e()}var AS=(function(e){Ja(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,lP(n)&&n.add(r)):r.destination=eB,r}return t.create=function(n,r,i){return new Ac(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Bc),Kq=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){pm(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){pm(r)}else pm(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){pm(n)}},e})(),Ac=(function(e){Ja(t,e);function t(n,r,i){var a=e.call(this)||this,s;return jn(n)||!n?s={next:n??void 0,error:r??void 0,complete:i??void 0}:s=n,a.destination=new Kq(s),a}return t})(AS);function pm(e){cP(e)}function Jq(e){throw e}var eB={closed:!0,next:Qy,error:Jq,complete:Qy},PS=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function QS(e){return e}function tB(e){return e.length===0?QS:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var Xn=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,a=rB(t)?t:new Ac(t,n,r);return Gm(function(){var s=i,o=s.operator,c=s.source;a.add(o?o.call(a,c):c?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=Qj(n),new n(function(i,a){var s=new Ac({next:function(o){try{t(o)}catch(c){a(c),s.unsubscribe()}},error:a,complete:i});r.subscribe(s)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[PS]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return tB(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=Qj(t),new t(function(r,i){var a;n.subscribe(function(s){return a=s},function(s){return i(s)},function(){return r(a)})})},e.create=function(t){return new e(t)},e})();function Qj(e){var t;return(t=e??Hq.Promise)!==null&&t!==void 0?t:Promise}function nB(e){return e&&jn(e.next)&&jn(e.error)&&jn(e.complete)}function rB(e){return e&&e instanceof AS||nB(e)&&lP(e)}function iB(e){return jn(e==null?void 0:e.lift)}function kr(e){return function(t){if(iB(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function $r(e,t,n,r,i){return new aB(e,t,n,r,i)}var aB=(function(e){Ja(t,e);function t(n,r,i,a,s,o){var c=e.call(this,n)||this;return c.onFinalize=s,c.shouldUnsubscribe=o,c._next=r?function(d){try{r(d)}catch(f){n.error(f)}}:e.prototype._next,c._error=a?function(d){try{a(d)}catch(f){n.error(f)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(d){n.error(d)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(AS),sB=rg(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),es=(function(e){Ja(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new Nj(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new sB},t.prototype.next=function(n){var r=this;Gm(function(){var i,a;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var s=Cc(r.currentObservers),o=s.next();!o.done;o=s.next()){var c=o.value;c.next(n)}}catch(d){i={error:d}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;Gm(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;Gm(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,a=i.hasError,s=i.isStopped,o=i.observers;return a||s?oP:(this.currentObservers=null,o.push(n),new Bc(function(){r.currentObservers=null,yp(o,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,a=r.thrownError,s=r.isStopped;i?n.error(a):s&&n.complete()},t.prototype.asObservable=function(){var n=new Xn;return n.source=this,n},t.create=function(n,r){return new Nj(n,r)},t})(Xn),Nj=(function(e){Ja(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:oP},t})(es),yt=(function(e){Ja(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,a=n._value;if(r)throw i;return this._throwIfClosed(),a},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t})(es),oB={now:function(){return Date.now()}},lB=(function(e){Ja(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t})(Bc),Rj={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Ud([e,t],Vd(n)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},cB=(function(e){Ja(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var a=this.id,s=this.scheduler;return a!=null&&(this.id=this.recycleAsyncId(s,a,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(s,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Rj.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Rj.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,a;try{this.work(n)}catch(s){i=!0,a=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),a},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,a=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,yp(a,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(lB),Mj=(function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=oB.now,e})(),uB=(function(e){Ja(t,e);function t(n,r){r===void 0&&(r=Mj.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t})(Mj),uP=new uB(cB),dP=new Xn(function(e){return e.complete()});function dB(e){return e&&jn(e.schedule)}function fP(e){return e[e.length-1]}function ig(e){return dB(fP(e))?e.pop():void 0}function fB(e,t){return typeof fP(e)=="number"?e.pop():t}var hP=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function mP(e){return jn(e==null?void 0:e.then)}function pP(e){return jn(e[PS])}function gP(e){return Symbol.asyncIterator&&jn(e==null?void 0:e[Symbol.asyncIterator])}function vP(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function hB(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var OP=hB();function bP(e){return jn(e==null?void 0:e[OP])}function yP(e){return Fq(this,arguments,function(){var n,r,i,a;return sP(this,function(s){switch(s.label){case 0:n=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,fc(n.read())];case 3:return r=s.sent(),i=r.value,a=r.done,a?[4,fc(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,fc(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function SP(e){return jn(e==null?void 0:e.getReader)}function pi(e){if(e instanceof Xn)return e;if(e!=null){if(pP(e))return mB(e);if(hP(e))return pB(e);if(mP(e))return gB(e);if(gP(e))return xP(e);if(bP(e))return vB(e);if(SP(e))return OB(e)}throw vP(e)}function mB(e){return new Xn(function(t){var n=e[PS]();if(jn(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function pB(e){return new Xn(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function gB(e){return new Xn(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,cP)})}function vB(e){return new Xn(function(t){var n,r;try{for(var i=Cc(e),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.next(s),t.closed)return}}catch(o){n={error:o}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function xP(e){return new Xn(function(t){bB(e,t).catch(function(n){return t.error(n)})})}function OB(e){return xP(yP(e))}function bB(e,t){var n,r,i,a;return Yq(this,void 0,void 0,function(){var s,o;return sP(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Wq(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o=c.sent(),i={error:o},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Gs(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function _P(e,t){return t===void 0&&(t=0),kr(function(n,r){n.subscribe($r(r,function(i){return Gs(r,e,function(){return r.next(i)},t)},function(){return Gs(r,e,function(){return r.complete()},t)},function(i){return Gs(r,e,function(){return r.error(i)},t)}))})}function wP(e,t){return t===void 0&&(t=0),kr(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function yB(e,t){return pi(e).pipe(wP(t),_P(t))}function SB(e,t){return pi(e).pipe(wP(t),_P(t))}function xB(e,t){return new Xn(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function _B(e,t){return new Xn(function(n){var r;return Gs(n,t,function(){r=e[OP](),Gs(n,t,function(){var i,a,s;try{i=r.next(),a=i.value,s=i.done}catch(o){n.error(o);return}s?n.complete():n.next(a)},0,!0)}),function(){return jn(r==null?void 0:r.return)&&r.return()}})}function kP(e,t){if(!e)throw new Error("Iterable cannot be null");return new Xn(function(n){Gs(n,t,function(){var r=e[Symbol.asyncIterator]();Gs(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function wB(e,t){return kP(yP(e),t)}function kB(e,t){if(e!=null){if(pP(e))return yB(e,t);if(hP(e))return xB(e,t);if(mP(e))return SB(e,t);if(gP(e))return kP(e,t);if(bP(e))return _B(e,t);if(SP(e))return wB(e,t)}throw vP(e)}function NS(e,t){return t?kB(e,t):pi(e)}function jB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=ig(e);return NS(e,n)}function Lj(e,t){var n=jn(e)?e:function(){return e},r=function(i){return i.error(n())};return new Xn(r)}var jP=rg(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function TP(e,t){return new Promise(function(n,r){var i=!1,a;e.subscribe({next:function(s){a=s,i=!0},error:r,complete:function(){i?n(a):r(new jP)}})})}function EP(e,t){return new Promise(function(n,r){var i=new Ac({next:function(a){n(a),i.unsubscribe()},error:r,complete:function(){r(new jP)}});e.subscribe(i)})}function TB(e){return e instanceof Date&&!isNaN(e)}var CP=rg(function(e){return function(n){n===void 0&&(n=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n}});function xf(e,t){var n=TB(e)?{first:e}:typeof e=="number"?{each:e}:e,r=n.first,i=n.each,a=n.with,s=a===void 0?EB:a,o=n.scheduler,c=o===void 0?uP:o,d=n.meta,f=d===void 0?null:d;if(r==null&&i==null)throw new TypeError("No timeout provided.");return kr(function(m,p){var v,b,S=null,x=0,w=function(j){b=Gs(p,c,function(){try{v.unsubscribe(),pi(s({meta:f,lastValue:S,seen:x})).subscribe(p)}catch(T){p.error(T)}},j)};v=m.subscribe($r(p,function(j){b==null||b.unsubscribe(),x++,p.next(S=j),i>0&&w(i)},void 0,void 0,function(){b!=null&&b.closed||b==null||b.unsubscribe(),S=null})),!x&&w(r!=null?typeof r=="number"?r:+r-c.now():i)})}function EB(e){throw new CP(e)}function Wa(e,t){return kr(function(n,r){var i=0;n.subscribe($r(r,function(a){r.next(e.call(t,a,i++))}))})}function CB(e,t,n,r,i,a,s,o){var c=[],d=0,f=0,m=!1,p=function(){m&&!c.length&&!d&&t.complete()},v=function(S){return d<r?b(S):c.push(S)},b=function(S){d++;var x=!1;pi(n(S,f++)).subscribe($r(t,function(w){t.next(w)},function(){x=!0},void 0,function(){if(x)try{d--;for(var w=function(){var j=c.shift();s||b(j)};c.length&&d<r;)w();p()}catch(j){t.error(j)}}))};return e.subscribe($r(t,v,function(){m=!0,p()})),function(){}}function AP(e,t,n){return n===void 0&&(n=1/0),jn(t)?AP(function(r,i){return Wa(function(a,s){return t(r,a,i,s)})(pi(e(r,i)))},n):(typeof t=="number"&&(n=t),kr(function(r,i){return CB(r,i,e,n)}))}function PP(e){return e===void 0&&(e=1/0),AP(QS,e)}function AB(){return PP(1)}function Dj(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AB()(NS(e,ig(e)))}function Yd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=ig(e),r=fB(e,1/0),i=e;return i.length?i.length===1?pi(i[0]):PP(r)(NS(i,n)):dP}function lr(e,t){return kr(function(n,r){var i=0;n.subscribe($r(r,function(a){return e.call(t,a,i++)&&r.next(a)}))})}function QP(e){return kr(function(t,n){var r=null,i=!1,a;r=t.subscribe($r(n,void 0,void 0,function(s){a=pi(e(s,QP(e)(t))),r?(r.unsubscribe(),r=null,a.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,a.subscribe(n))})}function PB(e,t){return t===void 0&&(t=uP),kr(function(n,r){var i=null,a=null,s=null,o=function(){if(i){i.unsubscribe(),i=null;var d=a;a=null,r.next(d)}};function c(){var d=s+e,f=t.now();if(f<d){i=this.schedule(void 0,d-f),r.add(i);return}o()}n.subscribe($r(r,function(d){a=d,s=t.now(),i||(i=t.schedule(c,e),r.add(i))},function(){o(),r.complete()},void 0,function(){a=i=null}))})}function QB(e){return e<=0?function(){return dP}:kr(function(t,n){var r=0;t.subscribe($r(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function NP(e,t){return t===void 0&&(t=QS),e=e??NB,kr(function(n,r){var i,a=!0;n.subscribe($r(r,function(s){var o=t(s);(a||!e(i,o))&&(a=!1,i=o,r.next(s))}))})}function NB(e,t){return e===t}function RB(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new es}:t,r=e.resetOnError,i=r===void 0?!0:r,a=e.resetOnComplete,s=a===void 0?!0:a,o=e.resetOnRefCountZero,c=o===void 0?!0:o;return function(d){var f,m,p,v=0,b=!1,S=!1,x=function(){m==null||m.unsubscribe(),m=void 0},w=function(){x(),f=p=void 0,b=S=!1},j=function(){var T=f;w(),T==null||T.unsubscribe()};return kr(function(T,A){v++,!S&&!b&&x();var Q=p=p??n();A.add(function(){v--,v===0&&!S&&!b&&(m=JO(j,c))}),Q.subscribe(A),!f&&v>0&&(f=new Ac({next:function(C){return Q.next(C)},error:function(C){S=!0,x(),m=JO(w,i,C),Q.error(C)},complete:function(){b=!0,x(),m=JO(w,s),Q.complete()}}),pi(T).subscribe(f))})(d)}}function JO(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new Ac({next:function(){i.unsubscribe(),e()}});return pi(t.apply(void 0,Ud([],Vd(n)))).subscribe(i)}}function eb(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=ig(e);return kr(function(r,i){(n?Dj(e,r,n):Dj(e,r)).subscribe(i)})}function MB(e,t){return kr(function(n,r){var i=null,a=0,s=!1,o=function(){return s&&!i&&r.complete()};n.subscribe($r(r,function(c){i==null||i.unsubscribe();var d=0,f=a++;pi(e(c,f)).subscribe(i=$r(r,function(m){return r.next(t?t(c,m,f,d++):m)},function(){i=null,o()}))},function(){s=!0,o()}))})}function RS(e){return kr(function(t,n){pi(e).subscribe($r(n,function(){return n.complete()},Qy)),!n.closed&&t.subscribe(n)})}var tb={};function Cse(e){return e}function Sr(e){if(e.includes("/"))throw new TypeError(`Expected ResourceId, got URI: ${e}`);return e}function Gn(e){if(e.includes("/"))throw new TypeError(`Expected AnnotationId, got URI: ${e}`);return e}var LB=["yield:created","yield:cloned","yield:updated","yield:moved","yield:representation-added","yield:representation-removed","mark:added","mark:removed","mark:body-updated","mark:archived","mark:unarchived","mark:entity-tag-added","mark:entity-tag-removed","frame:entity-type-added","frame:tag-schema-added","job:started","job:progress","job:completed","job:failed"],DB=["job:complete","job:fail"];function RP(e){var n;const t=e.payload;if(e.type==="mark:added")return((n=t==null?void 0:t.annotation)==null?void 0:n.id)||null;if((e.type==="mark:removed"||e.type==="mark:body-updated")&&t!=null&&t.annotationId&&e.resourceId)try{const r=e.resourceId;return`${r.substring(0,r.lastIndexOf("/resources/"))}/annotations/${t.annotationId}`}catch{return null}return null}var zB=typeof process<"u"&&!!(tb!=null&&tb.SEMIONT_BUS_LOG);function MP(){return globalThis.__SEMIONT_BUS_LOG__?!0:zB}var Ny;function IB(e){Ny=e}function hc(e,t,n,r){if(!MP())return;const i=n==null?void 0:n.correlationId,a=typeof i=="string"?i.slice(0,8):void 0;let s;if(Ny)try{s=Ny()}catch{}const o=`[bus ${e}] ${t}`+(r?` scope=${r}`:"")+(a?` cid=${a}`:"")+(s?` trace=${s.slice(0,8)}`:"");console.debug(o,n)}var LP=class{constructor(){he(this,"subjects");he(this,"isDestroyed");this.subjects=new Map,this.isDestroyed=!1}get(e){if(this.isDestroyed)throw new Error(`Cannot access event '${String(e)}' on destroyed bus`);if(!this.subjects.has(e)){const t=new es;if(MP()){const n=t.next.bind(t);t.next=r=>{hc("EMIT",String(e),r),n(r)}}this.subjects.set(e,t)}return this.subjects.get(e)}getDomainEvent(e){return this.get(e)}destroy(){if(!this.isDestroyed){for(const e of this.subjects.values())e.complete();this.subjects.clear(),this.isDestroyed=!0}}get destroyed(){return this.isDestroyed}scope(e){return new qB(this,e)}},qB=class DP{constructor(t,n){this.parent=t,this.scopePrefix=n}get(t){const n=`${this.scopePrefix}:${t}`,r=this.parent.subjects;return r.has(n)||r.set(n,new es),r.get(n)}getDomainEvent(t){return this.get(t)}scope(t){return new DP(this.parent,`${this.scopePrefix}:${t}`)}};function fi(e){if(!e)return null;const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="TextPositionSelector");return n&&n.type==="TextPositionSelector"?n:null}function zP(e){if(!e)return null;const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="SvgSelector");return n&&n.type==="SvgSelector"?n:null}function BB(e){if(!e)return null;const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="FragmentSelector");return n&&n.type==="FragmentSelector"?n:null}function Ya(e){if(Array.isArray(e)){for(const t of e)if(typeof t=="object"&&t!==null&&"type"in t&&"source"in t){const n=t.type,r=t.source;if(n==="SpecificResource"&&typeof r=="string")return r}return null}if(typeof e=="object"&&e!==null&&"type"in e&&"source"in e){const t=e.type,n=e.source;if(t==="SpecificResource"&&typeof n=="string")return n}return null}function Fd(e){return Ya(e)!==null}function Rn(e){if(typeof e!="string")return e.selector}function sl(e){return e.motivation==="highlighting"}function hi(e){return e.motivation==="linking"}function Xc(e){return e.motivation==="assessing"}function ao(e){return e.motivation==="commenting"}function ol(e){return e.motivation==="tagging"}function XB(e){if(!ao(e))return;const t=Array.isArray(e.body)?e.body[0]:e.body;if(t&&"value"in t)return t.value}function MS(e){return hi(e)&&Fd(e.body)}function Us(e){if(!e)return"";const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="TextQuoteSelector");return n?n.exact:""}function _f(e){const t=Rn(e.target);return Us(t)}function ZB(e){const n=(Array.isArray(e)?e:[e]).find(r=>r.type==="TextQuoteSelector");return n&&n.type==="TextQuoteSelector"?n:null}function Ry(e){if(e)return e["@id"]||void 0}function LS(e){return e!=null&&e.representations?(Array.isArray(e.representations)?e.representations:[e.representations])[0]:void 0}function Sp(e){var t;return(t=LS(e))==null?void 0:t.mediaType}function gm(e){var t;return(t=LS(e))==null?void 0:t.language}var zj=["browse:resources-result","browse:resources-failed","browse:resource-result","browse:resource-failed","browse:annotations-result","browse:annotations-failed","browse:annotation-result","browse:annotation-failed","browse:annotation-history-result","browse:annotation-history-failed","browse:events-result","browse:events-failed","browse:referenced-by-result","browse:referenced-by-failed","browse:entity-types-result","browse:entity-types-failed","browse:tag-schemas-result","browse:tag-schemas-failed","browse:directory-result","browse:directory-failed","browse:annotation-context-result","browse:annotation-context-failed","mark:delete-ok","mark:delete-failed","mark:create-ok","mark:create-failed","match:search-results","match:search-failed","gather:complete","gather:failed","gather:annotation-progress","gather:annotation-finished","gather:summary-result","gather:summary-failed","bind:body-updated","bind:body-update-failed","job:report-progress","job:complete","job:fail","job:status-result","job:status-failed","job:created","job:create-failed","job:claimed","job:claim-failed","yield:create-ok","yield:create-failed","yield:update-ok","yield:update-failed","yield:clone-token-generated","yield:clone-token-failed","yield:clone-resource-result","yield:clone-resource-failed","yield:clone-created","yield:clone-create-failed","frame:entity-type-added","frame:tag-schema-added","beckon:focus","beckon:sparkle","bus:resume-gap"];function My(e){return e.replace(/\s+/g," ").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/\u2014/g,"--").replace(/\u2013/g,"-").trim()}function $B(e,t){const n=e.length,r=t.length,i=[];for(let a=0;a<=n;a++)i[a]=[a];for(let a=0;a<=r;a++)i[0][a]=a;for(let a=1;a<=n;a++)for(let s=1;s<=r;s++){const o=e[a-1]===t[s-1]?0:1,c=i[a-1][s]+1,d=i[a][s-1]+1,f=i[a-1][s-1]+o;i[a][s]=Math.min(c,d,f)}return i[n][r]}function VB(e){return{normalizedContent:My(e),lowerContent:e.toLowerCase()}}function UB(e,t,n,r){const i=Math.max(5,Math.floor(t.length*.05)),a=e.indexOf(t);if(a!==-1)return{start:a,end:a+t.length,matchQuality:"exact"};const s=My(t),o=r.normalizedContent.indexOf(s);if(o!==-1){let S=0,x=0;for(;x<o&&S<e.length;){const w=e[S],j=My(w);j&&(x+=j.length),S++}return{start:S,end:S+t.length,matchQuality:"normalized"}}const c=t.toLowerCase(),d=r.lowerContent.indexOf(c);if(d!==-1)return{start:d,end:d+t.length,matchQuality:"case-insensitive"};const f=t.length,m=Math.min(500,e.length),p=n!==void 0?Math.max(0,n-m):0,v=n!==void 0?Math.min(e.length,n+m):e.length;let b=null;for(let S=p;S<=v-f;S++){const x=e.substring(S,S+f),w=$B(t,x);w<=i&&(!b||w<b.distance)&&(b={start:S,distance:w})}return b?{start:b.start,end:b.start+f,matchQuality:"fuzzy"}:null}function YB(e,t,n,r,i,a){if(!t)return null;if(i!==void 0&&i>=0&&i+t.length<=e.length&&e.substring(i,i+t.length)===t)return{start:i,end:i+t.length};const s=[];let o=e.indexOf(t);for(;o!==-1;)s.push(o),o=e.indexOf(t,o+1);if(s.length===0){const d=UB(e,t,i,a);return d?{start:d.start,end:d.end}:null}if(s.length===1){const d=s[0];return{start:d,end:d+t.length}}if(n||r){for(const d of s){const f=Math.max(0,d-((n==null?void 0:n.length)||0)),m=e.substring(f,d),p=Math.min(e.length,d+t.length+((r==null?void 0:r.length)||0)),v=e.substring(d+t.length,p),b=!n||m.endsWith(n),S=!r||v.startsWith(r);if(b&&S)return{start:d,end:d+t.length}}for(const d of s){const f=e.substring(Math.max(0,d-((n==null?void 0:n.length)||0)),d),m=e.substring(d+t.length,d+t.length+((r==null?void 0:r.length)||0)),p=!n||f.includes(n.trim()),v=!r||m.includes(r.trim());if(p&&v)return{start:d,end:d+t.length}}}const c=s[0];return{start:c,end:c+t.length}}var mc=[{code:"ar",nativeName:"العربية",englishName:"Arabic"},{code:"bn",nativeName:"বাংলা",englishName:"Bengali"},{code:"cs",nativeName:"Čeština",englishName:"Czech"},{code:"da",nativeName:"Dansk",englishName:"Danish"},{code:"de",nativeName:"Deutsch",englishName:"German"},{code:"el",nativeName:"Ελληνικά",englishName:"Greek"},{code:"en",nativeName:"English",englishName:"English"},{code:"es",nativeName:"Español",englishName:"Spanish"},{code:"fa",nativeName:"فارسی",englishName:"Persian"},{code:"fi",nativeName:"Suomi",englishName:"Finnish"},{code:"fr",nativeName:"Français",englishName:"French"},{code:"he",nativeName:"עברית",englishName:"Hebrew"},{code:"hi",nativeName:"हिन्दी",englishName:"Hindi"},{code:"id",nativeName:"Bahasa Indonesia",englishName:"Indonesian"},{code:"it",nativeName:"Italiano",englishName:"Italian"},{code:"ja",nativeName:"日本語",englishName:"Japanese"},{code:"ko",nativeName:"한국어",englishName:"Korean"},{code:"ms",nativeName:"Bahasa Melayu",englishName:"Malay"},{code:"nl",nativeName:"Nederlands",englishName:"Dutch"},{code:"no",nativeName:"Norsk",englishName:"Norwegian"},{code:"pl",nativeName:"Polski",englishName:"Polish"},{code:"pt",nativeName:"Português",englishName:"Portuguese"},{code:"ro",nativeName:"Română",englishName:"Romanian"},{code:"sv",nativeName:"Svenska",englishName:"Swedish"},{code:"th",nativeName:"ไทย",englishName:"Thai"},{code:"tr",nativeName:"Türkçe",englishName:"Turkish"},{code:"uk",nativeName:"Українська",englishName:"Ukrainian"},{code:"vi",nativeName:"Tiếng Việt",englishName:"Vietnamese"},{code:"zh",nativeName:"中文",englishName:"Chinese"}],FB=new Map(mc.map(e=>[e.code.toLowerCase(),e]));function WB(e){if(e)return FB.get(e.toLowerCase())}function HB(e){if(!e)return;const t=WB(e);return t?`${t.nativeName} (${e.toLowerCase()})`:e}function IP(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),i=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);return`<svg xmlns="http://www.w3.org/2000/svg"><rect x="${n}" y="${r}" width="${i}" height="${a}"/></svg>`}function qP(e){if(e.length<3)throw new Error("Polygon requires at least 3 points");return`<svg xmlns="http://www.w3.org/2000/svg"><polygon points="${e.map(n=>`${n.x},${n.y}`).join(" ")}"/></svg>`}function BP(e,t){if(t<=0)throw new Error("Circle radius must be positive");return`<svg xmlns="http://www.w3.org/2000/svg"><circle cx="${e.x}" cy="${e.y}" r="${t}"/></svg>`}function DS(e){var i,a,s,o,c,d,f;const t=e.match(/<rect\s+([^>]+)\/>/);if(t&&t[1]){const m=t[1],p=parseFloat(((i=m.match(/x="([^"]+)"/))==null?void 0:i[1])||"0"),v=parseFloat(((a=m.match(/y="([^"]+)"/))==null?void 0:a[1])||"0"),b=parseFloat(((s=m.match(/width="([^"]+)"/))==null?void 0:s[1])||"0"),S=parseFloat(((o=m.match(/height="([^"]+)"/))==null?void 0:o[1])||"0");return{type:"rect",data:{x:p,y:v,width:b,height:S}}}const n=e.match(/<polygon\s+points="([^"]+)"/);if(n&&n[1])return{type:"polygon",data:{points:n[1].split(/\s+/).map(v=>{const[b,S]=v.split(",").map(parseFloat);return{x:b,y:S}})}};const r=e.match(/<circle\s+([^>]+)\/>/);if(r&&r[1]){const m=r[1],p=parseFloat(((c=m.match(/cx="([^"]+)"/))==null?void 0:c[1])||"0"),v=parseFloat(((d=m.match(/cy="([^"]+)"/))==null?void 0:d[1])||"0"),b=parseFloat(((f=m.match(/r="([^"]+)"/))==null?void 0:f[1])||"0");return{type:"circle",data:{cx:p,cy:v,r:b}}}return null}function GB(e,t,n,r,i){const a=DS(e);if(!a)return e;const s=r/t,o=i/n;switch(a.type){case"rect":{const{x:c,y:d,width:f,height:m}=a.data;return IP({x:c*s,y:d*o},{x:(c+f)*s,y:(d+m)*o})}case"circle":{const{cx:c,cy:d,r:f}=a.data;return BP({x:c*s,y:d*o},f*Math.min(s,o))}case"polygon":{const c=a.data.points.map(d=>({x:d.x*s,y:d.y*o}));return qP(c)}}return e}function KB(e,t,n){let a;if(t>0){let o=Math.max(0,t-64),c=0;for(;o>0&&c<32;){const d=e[o-1];if(!d||/[\s.,;:!?'"()\[\]{}<>\/\\]/.test(d))break;o--,c++}a=e.substring(o,t)}let s;if(n<e.length){let o=Math.min(e.length,n+64),c=0;for(;o<e.length&&c<32;){const d=e[o];if(!d||/[\s.,;:!?'"()\[\]{}<>\/\\]/.test(d))break;o++,c++}s=e.substring(n,o)}return{prefix:a,suffix:s}}function JB(e){const t=e.match(/charset=([^\s;]+)/i);return((t==null?void 0:t[1])||"utf-8").toLowerCase()}function zS(e,t){const n=JB(t);return new TextDecoder(n).decode(e)}function Ly(e){return e==="image/png"||e==="image/jpeg"}function e2(e){return e==="text/plain"||e==="text/markdown"}function Zc(e){return e==="application/pdf"}function IS(e){return e2(e)?"text":Ly(e)||Zc(e)?"image":"unsupported"}var qS=class extends Error{constructor(e,t,n){super(e),this.code=t,this.details=n,this.name="SemiontError",Error.captureStackTrace(this,this.constructor)}};class xp extends Error{constructor(n,r,i){const a=n.status||n.status===0?n.status:"",s=n.statusText??"",o=`${a} ${s}`.trim(),c=o?`status code ${o}`:"an unknown error";super(`Request failed with ${c}: ${r.method} ${r.url}`);he(this,"response");he(this,"request");he(this,"options");this.name="HTTPError",this.response=n,this.request=r,this.options=i}}class XP extends Error{constructor(n){let r="Non-error value was thrown";try{typeof n=="string"?r=n:n&&typeof n=="object"&&"message"in n&&typeof n.message=="string"&&(r=n.message)}catch{}super(r);he(this,"name","NonError");he(this,"value");this.value=n}}class nb extends Error{constructor(n){const r=n!=null&&n.cause?n.cause instanceof Error?n.cause:new XP(n.cause):void 0;super(n!=null&&n.code?`Forced retry: ${n.code}`:"Forced retry",r?{cause:r}:void 0);he(this,"name","ForceRetryError");he(this,"customDelay");he(this,"code");he(this,"customRequest");this.customDelay=n==null?void 0:n.delay,this.code=n==null?void 0:n.code,this.customRequest=n==null?void 0:n.request}}const Ij=(()=>{let e=!1,t=!1;const n=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";if(n&&r)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return e&&!t})(),t2=typeof globalThis.AbortController=="function",ZP=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",n2=typeof globalThis.ReadableStream=="function",r2=typeof globalThis.FormData=="function",$P=["get","post","put","patch","head","delete"],i2={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},rb=2147483647,a2=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,VP=Symbol("stop");class UP{constructor(t){he(this,"options");this.options=t}}const s2=e=>new UP(e),o2={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},l2={next:!0},c2={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},u2=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[n,r]of e)t+=a2,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,t+=typeof r=="string"?new TextEncoder().encode(r).length:r.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e=="string")return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if(typeof e=="object"&&e!==null)try{const t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},YP=(e,t,n)=>{let r,i=0;return e.pipeThrough(new TransformStream({transform(a,s){if(s.enqueue(a),r){i+=r.byteLength;let o=t===0?0:i/t;o>=1&&(o=1-Number.EPSILON),n==null||n({percent:o,totalBytes:Math.max(t,i),transferredBytes:i},r)}r=a},flush(){r&&(i+=r.byteLength,n==null||n({percent:1,totalBytes:Math.max(t,i),transferredBytes:i},r))}}))},d2=(e,t)=>{if(!e.body)return e;if(e.status===204)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});const n=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(YP(e.body,n,t),{status:e.status,statusText:e.statusText,headers:e.headers})},f2=(e,t,n)=>{if(!e.body)return e;const r=u2(n??e.body);return new Request(e,{duplex:"half",body:YP(e.body,r,t)})},Bo=e=>e!==null&&typeof e=="object",vm=(...e)=>{for(const t of e)if((!Bo(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return BS({},...e)},FP=(e={},t={})=>{const n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(const[a,s]of i.entries())r&&s==="undefined"||s===void 0?n.delete(a):n.set(a,s);return n};function Om(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:BS(e[n]??[],t[n]??[])}const WP=(e={},t={})=>({beforeRequest:Om(e,t,"beforeRequest"),beforeRetry:Om(e,t,"beforeRetry"),afterResponse:Om(e,t,"afterResponse"),beforeError:Om(e,t,"beforeError")}),h2=(e,t)=>{const n=new URLSearchParams;for(const r of[e,t])if(r!==void 0)if(r instanceof URLSearchParams)for(const[i,a]of r.entries())n.append(i,a);else if(Array.isArray(r))for(const i of r){if(!Array.isArray(i)||i.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");n.append(String(i[0]),String(i[1]))}else if(Bo(r))for(const[i,a]of Object.entries(r))a!==void 0&&n.append(i,String(a));else{const i=new URLSearchParams(r);for(const[a,s]of i.entries())n.append(a,s)}return n},BS=(...e)=>{let t={},n={},r={},i;const a=[];for(const s of e)if(Array.isArray(s))Array.isArray(t)||(t=[]),t=[...t,...s];else if(Bo(s)){for(let[o,c]of Object.entries(s)){if(o==="signal"&&c instanceof globalThis.AbortSignal){a.push(c);continue}if(o==="context"){if(c!=null&&(!Bo(c)||Array.isArray(c)))throw new TypeError("The `context` option must be an object");t={...t,context:c==null?{}:{...t.context,...c}};continue}if(o==="searchParams"){c==null?i=void 0:i=i===void 0?c:h2(i,c);continue}Bo(c)&&o in t&&(c=BS(t[o],c)),t={...t,[o]:c}}Bo(s.hooks)&&(r=WP(r,s.hooks),t.hooks=r),Bo(s.headers)&&(n=FP(n,s.headers),t.headers=n)}return i!==void 0&&(t.searchParams=i),a.length>0&&(a.length===1?t.signal=a[0]:ZP?t.signal=AbortSignal.any(a):t.signal=a.at(-1)),t},m2=e=>$P.includes(e)?e.toUpperCase():e,p2=["get","put","head","delete","options","trace"],g2=[408,413,429,500,502,503,504],v2=[413,429,503],qj={limit:2,methods:p2,statusCodes:g2,afterStatusCodes:v2,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},O2=(e={})=>{if(typeof e=="number")return{...qj,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.methods&&(e.methods=e.methods.map(n=>n.toLowerCase())),e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0));return{...qj,...t}};class Dy extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);he(this,"request");this.name="TimeoutError",this.request=n}}async function b2(e,t,n,r){return new Promise((i,a)=>{const s=setTimeout(()=>{n&&n.abort(),a(new Dy(e))},r.timeout);r.fetch(e,t).then(i).catch(a).then(()=>{clearTimeout(s)})})}async function y2(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(a),r(t.reason)}const a=setTimeout(()=>{t==null||t.removeEventListener("abort",i),n()},e)})}const S2=(e,t)=>{const n={};for(const r in t)Object.hasOwn(t,r)&&!(r in c2)&&!(r in o2)&&(!(r in e)||r in l2)&&(n[r]=t[r]);return n},x2=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:typeof e=="object"?Object.keys(e).length>0:typeof e=="string"?e.trim().length>0:!!e;function _2(e){return e instanceof xp||(e==null?void 0:e.name)===xp.name}function w2(e){return e instanceof Dy||(e==null?void 0:e.name)===Dy.name}var ng,HP,Ai,ai,Fn,Se,Vs,ia,Wo,tt,Km,GP,zy,Jm,Ds,Iy,KP,dd,ep,qy;const Zd=class Zd{constructor(t,n={}){Wi(this,tt);he(this,"request");Wi(this,Ai);Wi(this,ai,0);Wi(this,Fn);Wi(this,Se);Wi(this,Vs);Wi(this,ia);Wi(this,Wo);var i,a,s;if(Ti(this,Fn,t),Ti(this,Se,{...n,headers:FP(ue(this,Fn).headers,n.headers),hooks:WP({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:m2(n.method??ue(this,Fn).method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:O2(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}}),typeof ue(this,Fn)!="string"&&!(ue(this,Fn)instanceof URL||ue(this,Fn)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(ue(this,Se).prefixUrl&&typeof ue(this,Fn)=="string"){if(ue(this,Fn).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");ue(this,Se).prefixUrl.endsWith("/")||(ue(this,Se).prefixUrl+="/"),Ti(this,Fn,ue(this,Se).prefixUrl+ue(this,Fn))}t2&&ZP&&(Ti(this,ia,ue(this,Se).signal??ue(this,Fn).signal),Ti(this,Ai,new globalThis.AbortController),ue(this,Se).signal=ue(this,ia)?AbortSignal.any([ue(this,ia),ue(this,Ai).signal]):ue(this,Ai).signal),Ij&&(ue(this,Se).duplex="half"),ue(this,Se).json!==void 0&&(ue(this,Se).body=((a=(i=ue(this,Se)).stringifyJson)==null?void 0:a.call(i,ue(this,Se).json))??JSON.stringify(ue(this,Se).json),ue(this,Se).headers.set("content-type",ue(this,Se).headers.get("content-type")??"application/json"));const r=n.headers&&new globalThis.Headers(n.headers).has("content-type");if(ue(this,Fn)instanceof globalThis.Request&&(r2&&ue(this,Se).body instanceof globalThis.FormData||ue(this,Se).body instanceof URLSearchParams)&&!r&&ue(this,Se).headers.delete("content-type"),this.request=new globalThis.Request(ue(this,Fn),ue(this,Se)),x2(ue(this,Se).searchParams)){const c="?"+(typeof ue(this,Se).searchParams=="string"?ue(this,Se).searchParams.replace(/^\?/,""):new URLSearchParams(St(s=Zd,ng,HP).call(s,ue(this,Se).searchParams)).toString()),d=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,c);this.request=new globalThis.Request(d,ue(this,Se))}if(ue(this,Se).onUploadProgress){if(typeof ue(this,Se).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Ij)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=St(this,tt,qy).call(this,this.request,ue(this,Se).body??void 0)}}static create(t,n){var s,o,c;const r=new Zd(t,n),i=async()=>{var f,m,p,v,b,S,x,w,j,T,A,Q;if(typeof ue(r,Se).timeout=="number"&&ue(r,Se).timeout>rb)throw new RangeError(`The \`timeout\` option cannot be greater than ${rb}`);await Promise.resolve();let d=await St(f=r,tt,KP).call(f);for(const C of ue(r,Se).hooks.afterResponse){const R=St(m=r,tt,zy).call(m,d.clone());let D;try{D=await C(r.request,St(p=r,tt,dd).call(p),R,{retryCount:ue(r,ai)})}catch(P){throw St(v=r,tt,Ds).call(v,R),St(b=r,tt,Ds).call(b,d),P}if(D instanceof UP)throw St(S=r,tt,Ds).call(S,R),St(x=r,tt,Ds).call(x,d),new nb(D.options);const L=D instanceof globalThis.Response?D:d;R!==L&&St(w=r,tt,Ds).call(w,R),d!==L&&St(j=r,tt,Ds).call(j,d),d=L}if(St(T=r,tt,zy).call(T,d),!d.ok&&(typeof ue(r,Se).throwHttpErrors=="function"?ue(r,Se).throwHttpErrors(d.status):ue(r,Se).throwHttpErrors)){let C=new xp(d,r.request,St(A=r,tt,dd).call(A));for(const R of ue(r,Se).hooks.beforeError)C=await R(C,{retryCount:ue(r,ai)});throw C}if(ue(r,Se).onDownloadProgress){if(typeof ue(r,Se).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!n2)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const C=d.clone();return St(Q=r,tt,Ds).call(Q,d),d2(C,ue(r,Se).onDownloadProgress)}return d},a=St(s=r,tt,Iy).call(s,i).finally(()=>{var f,m;const d=ue(r,Vs);St(f=r,tt,Jm).call(f,(d==null?void 0:d.body)??void 0),St(m=r,tt,Jm).call(m,r.request.body??void 0)});for(const[d,f]of Object.entries(i2))d==="bytes"&&typeof((c=(o=globalThis.Response)==null?void 0:o.prototype)==null?void 0:c.bytes)!="function"||(a[d]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||f);const m=await a;if(d==="json"){if(m.status===204)return"";const p=await m.text();return p===""?"":n.parseJson?n.parseJson(p):JSON.parse(p)}return m[d]()});return a}};ng=new WeakSet,HP=function(t){return t&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof URLSearchParams)?Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0)):t},Ai=new WeakMap,ai=new WeakMap,Fn=new WeakMap,Se=new WeakMap,Vs=new WeakMap,ia=new WeakMap,Wo=new WeakMap,tt=new WeakSet,Km=function(){const t=ue(this,Se).retry.delay(ue(this,ai));let n=t;ue(this,Se).retry.jitter===!0?n=Math.random()*t:typeof ue(this,Se).retry.jitter=="function"&&(n=ue(this,Se).retry.jitter(t),(!Number.isFinite(n)||n<0)&&(n=t));const r=ue(this,Se).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,n)},GP=async function(t){if(vj(this,ai)._++,ue(this,ai)>ue(this,Se).retry.limit)throw t;const n=t instanceof Error?t:new XP(t);if(n instanceof nb)return n.customDelay??St(this,tt,Km).call(this);if(!ue(this,Se).retry.methods.includes(this.request.method.toLowerCase()))throw t;if(ue(this,Se).retry.shouldRetry!==void 0){const r=await ue(this,Se).retry.shouldRetry({error:n,retryCount:ue(this,ai)});if(r===!1)throw t;if(r===!0)return St(this,tt,Km).call(this)}if(w2(t)&&!ue(this,Se).retry.retryOnTimeout)throw t;if(_2(t)){if(!ue(this,Se).retry.statusCodes.includes(t.response.status))throw t;const r=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Retry-After")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(r&&ue(this,Se).retry.afterStatusCodes.includes(t.response.status)){let i=Number(r)*1e3;Number.isNaN(i)?i=Date.parse(r)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const a=ue(this,Se).retry.maxRetryAfter??i;return i<a?i:a}if(t.response.status===413)throw t}return St(this,tt,Km).call(this)},zy=function(t){return ue(this,Se).parseJson&&(t.json=async()=>ue(this,Se).parseJson(await t.text())),t},Jm=function(t){t&&t.cancel().catch(()=>{})},Ds=function(t){St(this,tt,Jm).call(this,t.body??void 0)},Iy=async function(t){try{return await t()}catch(n){const r=Math.min(await St(this,tt,GP).call(this,n),rb);if(ue(this,ai)<1)throw n;if(await y2(r,ue(this,ia)?{signal:ue(this,ia)}:{}),n instanceof nb&&n.customRequest){const i=ue(this,Se).signal?new globalThis.Request(n.customRequest,{signal:ue(this,Se).signal}):new globalThis.Request(n.customRequest);St(this,tt,ep).call(this,i)}for(const i of ue(this,Se).hooks.beforeRetry){const a=await i({request:this.request,options:St(this,tt,dd).call(this),error:n,retryCount:ue(this,ai)});if(a instanceof globalThis.Request){St(this,tt,ep).call(this,a);break}if(a instanceof globalThis.Response)return a;if(a===VP)return}return St(this,tt,Iy).call(this,t)}},KP=async function(){var n;(n=ue(this,Ai))!=null&&n.signal.aborted&&(Ti(this,Ai,new globalThis.AbortController),ue(this,Se).signal=ue(this,ia)?AbortSignal.any([ue(this,ia),ue(this,Ai).signal]):ue(this,Ai).signal,this.request=new globalThis.Request(this.request,{signal:ue(this,Se).signal}));for(const r of ue(this,Se).hooks.beforeRequest){const i=await r(this.request,St(this,tt,dd).call(this),{retryCount:ue(this,ai)});if(i instanceof Response)return i;if(i instanceof globalThis.Request){St(this,tt,ep).call(this,i);break}}const t=S2(this.request,ue(this,Se));return Ti(this,Vs,this.request),this.request=ue(this,Vs).clone(),ue(this,Se).timeout===!1?ue(this,Se).fetch(ue(this,Vs),t):b2(ue(this,Vs),t,ue(this,Ai),ue(this,Se))},dd=function(){if(!ue(this,Wo)){const{hooks:t,...n}=ue(this,Se);Ti(this,Wo,Object.freeze(n))}return ue(this,Wo)},ep=function(t){Ti(this,Wo,void 0),this.request=St(this,tt,qy).call(this,t)},qy=function(t,n){return!ue(this,Se).onUploadProgress||!t.body?t:f2(t,ue(this,Se).onUploadProgress,n??ue(this,Se).body??void 0)},Wi(Zd,ng);let _p=Zd;/*! MIT License © Sindre Sorhus */const By=e=>{const t=(n,r)=>_p.create(n,vm(e,r));for(const n of $P)t[n]=(r,i)=>_p.create(r,vm(e,i,{method:n}));return t.create=n=>By(vm(n)),t.extend=n=>(typeof n=="function"&&(n=n(e??{})),By(vm(e,n))),t.stop=VP,t.retry=s2,t},ib=By();var k2=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Uo="1.9.0",Bj=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function j2(e){var t=new Set([e]),n=new Set,r=e.match(Bj);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(c){return c===e};function a(o){return n.add(o),!1}function s(o){return t.add(o),!0}return function(c){if(t.has(c))return!0;if(n.has(c))return!1;var d=c.match(Bj);if(!d)return a(c);var f={major:+d[1],minor:+d[2],patch:+d[3],prerelease:d[4]};return f.prerelease!=null||i.major!==f.major?a(c):i.major===0?i.minor===f.minor&&i.patch<=f.patch?s(c):a(c):i.minor<=f.minor?s(c):a(c)}}var T2=j2(Uo),E2=Uo.split(".")[0],Wd=Symbol.for("opentelemetry.js.api."+E2),Hd=k2;function wf(e,t,n,r){var i;r===void 0&&(r=!1);var a=Hd[Wd]=(i=Hd[Wd])!==null&&i!==void 0?i:{version:Uo};if(!r&&a[e]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(s.stack||s.message),!1}if(a.version!==Uo){var s=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+e+" does not match previously registered API v"+Uo);return n.error(s.stack||s.message),!1}return a[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+Uo+"."),!0}function tl(e){var t,n,r=(t=Hd[Wd])===null||t===void 0?void 0:t.version;if(!(!r||!T2(r)))return(n=Hd[Wd])===null||n===void 0?void 0:n[e]}function kf(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+Uo+".");var n=Hd[Wd];n&&delete n[e]}var C2=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a},A2=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},P2=(function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ed("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ed("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ed("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ed("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ed("verbose",this._namespace,t)},e})();function ed(e,t,n){var r=tl("diag");if(r)return n.unshift(t),r[e].apply(r,A2([],C2(n),!1))}var Br;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(Br||(Br={}));function Q2(e,t){e<Br.NONE?e=Br.NONE:e>Br.ALL&&(e=Br.ALL),t=t||{};function n(r,i){var a=t[r];return typeof a=="function"&&e>=i?a.bind(t):function(){}}return{error:n("error",Br.ERROR),warn:n("warn",Br.WARN),info:n("info",Br.INFO),debug:n("debug",Br.DEBUG),verbose:n("verbose",Br.VERBOSE)}}var N2=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a},R2=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},M2="diag",Ha=(function(){function e(){function t(i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var o=tl("diag");if(o)return o[i].apply(o,R2([],N2(a),!1))}}var n=this,r=function(i,a){var s,o,c;if(a===void 0&&(a={logLevel:Br.INFO}),i===n){var d=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=d.stack)!==null&&s!==void 0?s:d.message),!1}typeof a=="number"&&(a={logLevel:a});var f=tl("diag"),m=Q2((o=a.logLevel)!==null&&o!==void 0?o:Br.INFO,i);if(f&&!a.suppressOverrideMessage){var p=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";f.warn("Current logger will be overwritten from "+p),m.warn("Current logger will overwrite one already registered from "+p)}return wf("diag",m,n,!0)};n.setLogger=r,n.disable=function(){kf(M2,n)},n.createComponentLogger=function(i){return new P2(i)},n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e})(),L2=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a},D2=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},z2=(function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var n=this._entries.get(t);if(n)return Object.assign({},n)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var n=L2(t,2),r=n[0],i=n[1];return[r,i]})},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=new e(this._entries);try{for(var s=D2(r),o=s.next();!o.done;o=s.next()){var c=o.value;a._entries.delete(c)}}catch(d){t={error:d}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a},e.prototype.clear=function(){return new e},e})(),I2=Symbol("BaggageEntryMetadata"),q2=Ha.instance();function B2(e){return e===void 0&&(e={}),new z2(new Map(Object.entries(e)))}function Ase(e){return typeof e!="string"&&(q2.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:I2,toString:function(){return e}}}function JP(e){return Symbol.for(e)}var X2=(function(){function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(r){return n._currentContext.get(r)},n.setValue=function(r,i){var a=new e(n._currentContext);return a._currentContext.set(r,i),a},n.deleteValue=function(r){var i=new e(n._currentContext);return i._currentContext.delete(r),i}}return e})(),Z2=new X2,ll=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),$2=(function(){function e(){}return e.prototype.createGauge=function(t,n){return J2},e.prototype.createHistogram=function(t,n){return eX},e.prototype.createCounter=function(t,n){return K2},e.prototype.createUpDownCounter=function(t,n){return tX},e.prototype.createObservableGauge=function(t,n){return rX},e.prototype.createObservableCounter=function(t,n){return nX},e.prototype.createObservableUpDownCounter=function(t,n){return iX},e.prototype.addBatchObservableCallback=function(t,n){},e.prototype.removeBatchObservableCallback=function(t){},e})(),ag=(function(){function e(){}return e})(),V2=(function(e){ll(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t})(ag),U2=(function(e){ll(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t})(ag),Y2=(function(e){ll(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t})(ag),F2=(function(e){ll(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t})(ag),XS=(function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e})(),W2=(function(e){ll(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(XS),H2=(function(e){ll(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(XS),G2=(function(e){ll(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(XS),eQ=new $2,K2=new V2,J2=new Y2,eX=new F2,tX=new U2,nX=new W2,rX=new H2,iX=new G2;function Pse(){return eQ}var aX={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},sX={set:function(e,t,n){e!=null&&(e[t]=n)}},oX=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a},lX=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},cX=(function(){function e(){}return e.prototype.active=function(){return Z2},e.prototype.with=function(t,n,r){for(var i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return n.call.apply(n,lX([r],oX(i),!1))},e.prototype.bind=function(t,n){return n},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e})(),uX=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a},dX=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},ab="context",fX=new cX,sg=(function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return wf(ab,t,Ha.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,n,r){for(var i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];return(i=this._getContextManager()).with.apply(i,dX([t,n,r],uX(a),!1))},e.prototype.bind=function(t,n){return this._getContextManager().bind(t,n)},e.prototype._getContextManager=function(){return tl(ab)||fX},e.prototype.disable=function(){this._getContextManager().disable(),kf(ab,Ha.instance())},e})(),Xy;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Xy||(Xy={}));var tQ="0000000000000000",nQ="00000000000000000000000000000000",hX={traceId:nQ,spanId:tQ,traceFlags:Xy.NONE},Sd=(function(){function e(t){t===void 0&&(t=hX),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,n){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,n){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,n){},e})(),ZS=JP("OpenTelemetry Context Key SPAN");function $S(e){return e.getValue(ZS)||void 0}function mX(){return $S(sg.getInstance().active())}function VS(e,t){return e.setValue(ZS,t)}function pX(e){return e.deleteValue(ZS)}function gX(e,t){return VS(e,new Sd(t))}function rQ(e){var t;return(t=$S(e))===null||t===void 0?void 0:t.spanContext()}var vX=/^([0-9a-f]{32})$/i,OX=/^[0-9a-f]{16}$/i;function bX(e){return vX.test(e)&&e!==nQ}function yX(e){return OX.test(e)&&e!==tQ}function US(e){return bX(e.traceId)&&yX(e.spanId)}function SX(e){return new Sd(e)}var sb=sg.getInstance(),iQ=(function(){function e(){}return e.prototype.startSpan=function(t,n,r){r===void 0&&(r=sb.active());var i=!!(n!=null&&n.root);if(i)return new Sd;var a=r&&rQ(r);return xX(a)&&US(a)?new Sd(a):new Sd},e.prototype.startActiveSpan=function(t,n,r,i){var a,s,o;if(!(arguments.length<2)){arguments.length===2?o=n:arguments.length===3?(a=n,o=r):(a=n,s=r,o=i);var c=s??sb.active(),d=this.startSpan(t,a,c),f=VS(c,d);return sb.with(f,o,void 0,d)}},e})();function xX(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var _X=new iQ,wX=(function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.startSpan=function(t,n,r){return this._getTracer().startSpan(t,n,r)},e.prototype.startActiveSpan=function(t,n,r,i){var a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):_X},e})(),kX=(function(){function e(){}return e.prototype.getTracer=function(t,n,r){return new iQ},e})(),jX=new kX,Xj=(function(){function e(){}return e.prototype.getTracer=function(t,n,r){var i;return(i=this.getDelegateTracer(t,n,r))!==null&&i!==void 0?i:new wX(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:jX},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,n,r)},e})(),Ks;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Ks||(Ks={}));var Zy;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Zy||(Zy={}));var Gd=sg.getInstance(),TX=(function(){function e(){}return e.prototype.getMeter=function(t,n,r){return eQ},e})(),EX=new TX,ob="metrics",CX=(function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return wf(ob,t,Ha.instance())},e.prototype.getMeterProvider=function(){return tl(ob)||EX},e.prototype.getMeter=function(t,n,r){return this.getMeterProvider().getMeter(t,n,r)},e.prototype.disable=function(){kf(ob,Ha.instance())},e})(),AX=CX.getInstance(),PX=(function(){function e(){}return e.prototype.inject=function(t,n){},e.prototype.extract=function(t,n){return t},e.prototype.fields=function(){return[]},e})(),YS=JP("OpenTelemetry Baggage Key");function aQ(e){return e.getValue(YS)||void 0}function QX(){return aQ(sg.getInstance().active())}function NX(e,t){return e.setValue(YS,t)}function RX(e){return e.deleteValue(YS)}var lb="propagation",MX=new PX,LX=(function(){function e(){this.createBaggage=B2,this.getBaggage=aQ,this.getActiveBaggage=QX,this.setBaggage=NX,this.deleteBaggage=RX}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return wf(lb,t,Ha.instance())},e.prototype.inject=function(t,n,r){return r===void 0&&(r=sX),this._getGlobalPropagator().inject(t,n,r)},e.prototype.extract=function(t,n,r){return r===void 0&&(r=aX),this._getGlobalPropagator().extract(t,n,r)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){kf(lb,Ha.instance())},e.prototype._getGlobalPropagator=function(){return tl(lb)||MX},e})(),sQ=LX.getInstance(),cb="trace",DX=(function(){function e(){this._proxyTracerProvider=new Xj,this.wrapSpanContext=SX,this.isSpanContextValid=US,this.deleteSpan=pX,this.getSpan=$S,this.getActiveSpan=mX,this.getSpanContext=rQ,this.setSpan=VS,this.setSpanContext=gX}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var n=wf(cb,this._proxyTracerProvider,Ha.instance());return n&&this._proxyTracerProvider.setDelegate(t),n},e.prototype.getTracerProvider=function(){return tl(cb)||this._proxyTracerProvider},e.prototype.getTracer=function(t,n){return this.getTracerProvider().getTracer(t,n)},e.prototype.disable=function(){kf(cb,Ha.instance()),this._proxyTracerProvider=new Xj},e})(),FS=DX.getInstance();IB(()=>{const e=FS.getActiveSpan();if(!e)return;const t=e.spanContext();if(US(t))return t.traceId});var zX="semiont",IX=()=>FS.getTracer(zX);async function xd(e,t,n){const r=IX().startSpan(e,{kind:(n==null?void 0:n.kind)??Ks.INTERNAL,...n!=null&&n.attrs?{attributes:n.attrs}:{}});try{return await Gd.with(FS.setSpan(Gd.active(),r),()=>t(r))}catch(i){throw r.recordException(i),r.setStatus({code:Zy.ERROR,message:i instanceof Error?i.message:String(i)}),i}finally{r.end()}}var Zj="_trace";function oQ(){const e={};sQ.inject(Gd.active(),e);const t=e.traceparent;if(t)return e.tracestate?{traceparent:t,tracestate:e.tracestate}:{traceparent:t}}function qX(e){const t=e[Zj];if(t!==void 0&&delete e[Zj],!(!t||typeof t.traceparent!="string"))return t}function BX(e,t){if(!e)return t();const n={traceparent:e.traceparent};e.tracestate&&(n.tracestate=e.tracestate);const r=sQ.extract(Gd.active(),n);return Gd.with(r,t)}var XX="semiont",ZX=()=>AX.getMeter(XX),ub;function $X(){return ub||(ub=ZX().createCounter("semiont.bus.emit",{description:"Bus emits by channel and scope"})),ub}function VX(e,t){$X().add(1,{"bus.channel":e,...t?{"bus.scope":t}:{}})}var UX=3e3,YX={initial:["connecting","closed"],connecting:["open","reconnecting","closed"],open:["reconnecting","closed"],reconnecting:["connecting","degraded","closed"],degraded:["connecting","closed"],closed:[]};function FX(e){const{baseUrl:t,token:n,channels:r,scope:i,reconnectMs:a=5e3}=e,s=typeof n=="function"?n:()=>n,o=new Set(r),c=new Set;let d=i;const f=new es,m=new yt("initial");let p="initial",v=null;const b=P=>{if(p===P)return;if(!YX[p].includes(P))throw new Error(`Invalid connection state transition: ${p} → ${P}`);const X=p;p=P,P==="reconnecting"&&X!=="reconnecting"&&(v&&clearTimeout(v),v=setTimeout(()=>{p==="reconnecting"&&b("degraded")},UX)),X==="reconnecting"&&P!=="reconnecting"&&v&&(clearTimeout(v),v=null),m.next(P)};let S=!1;const x=new Set;let w=null,j=null;const T=f.pipe(RB()),A=()=>{for(const P of x)try{P.abort()}catch{}x.clear(),w&&(clearTimeout(w),w=null)},Q=async()=>{b("connecting");for(const B of x)try{B.abort()}catch{}x.clear();const P=new URLSearchParams;for(const B of o)P.append("channel",B);if(d&&c.size>0){P.append("scope",d);for(const B of c)P.append("scoped",B)}const Z=`${t}/bus/subscribe?${P.toString()}`,X=new AbortController;x.add(X);try{const B={Authorization:`Bearer ${s()}`};j&&(B["Last-Event-ID"]=j);const Y=await fetch(Z,{headers:B,signal:X.signal});if(!Y.ok||!Y.body)throw new Error(`SSE connect failed: ${Y.status}`);b("open");const H=Y.body.getReader(),q=new TextDecoder;let I="",ee="",W="",z;for(;S&&x.has(X);){const{done:ce,value:se}=await H.read();if(ce)break;I+=q.decode(se,{stream:!0});const N=I.split(`
37
- `);I=N.pop()??"";for(const le of N)if(le.startsWith("event: "))ee=le.slice(7);else if(le.startsWith("data: "))W=le.slice(6);else if(le.startsWith("id: "))z=le.slice(4);else if(le===""){if(ee==="bus-event"&&W){z!==void 0&&(j=z);const pe=JSON.parse(W);hc("RECV",pe.channel,pe.payload,pe.scope);const Oe=qX(pe.payload);await BX(Oe,()=>xd(`bus.recv:${pe.channel}`,()=>{f.next(pe)},{kind:Ks.CONSUMER,attrs:{"bus.channel":pe.channel,...pe.scope?{"bus.scope":pe.scope}:{}}}))}ee="",W="",z=void 0}}}catch(B){if(B.name==="AbortError")return}finally{x.delete(X)}S&&(b("reconnecting"),w=setTimeout(()=>{S&&Q()},a))},C=()=>{S&&((p==="open"||p==="connecting"||p==="degraded")&&b("reconnecting"),A(),Q())};let R=null;const D=100,L=()=>{R&&clearTimeout(R),R=setTimeout(()=>{R=null,C()},D)};return{on$(P){return T.pipe(lr(Z=>Z.channel===P),Wa(Z=>Z.payload))},emit:async(P,Z,X)=>{const B={channel:P,payload:Z};X&&(B.scope=X);const Y={"Content-Type":"application/json",Authorization:`Bearer ${s()}`},H=oQ();H&&(Y.traceparent=H.traceparent,H.tracestate&&(Y.tracestate=H.tracestate)),await fetch(`${t}/bus/emit`,{method:"POST",headers:Y,body:JSON.stringify(B)})},state$:m.asObservable(),addChannels:(P,Z)=>{let X=!1;if(Z!==void 0){for(const B of P)c.has(B)||(c.add(B),X=!0);Z!==d&&(d=Z,X=!0)}else for(const B of P)o.has(B)||(o.add(B),X=!0);X&&L()},removeChannels:P=>{let Z=!1;for(const X of P)c.delete(X)&&(Z=!0),o.delete(X)&&(Z=!0);c.size===0&&(d=void 0),Z&&L()},start:()=>{S||(S=!0,Q())},stop:()=>{S=!1,p!=="closed"&&b("closed"),R&&(clearTimeout(R),R=null),v&&(clearTimeout(v),v=null),A()},dispose:()=>{S=!1,p!=="closed"&&b("closed"),R&&(clearTimeout(R),R=null),v&&(clearTimeout(v),v=null),A(),f.complete(),m.complete()}}}var db=[...LB.filter(e=>e!=="frame:entity-type-added"),...DB];function $j(e){var i;const t=e.headers.get("Content-Type")??"application/octet-stream",n=e.headers.get("Content-Disposition"),r=(i=n==null?void 0:n.match(/filename="(.+?)"/))==null?void 0:i[1];return{stream:e.body,contentType:t,...r?{filename:r}:{}}}function WX(e){return e===400?"bad-request":e===401?"unauthorized":e===403?"forbidden":e===404?"not-found":e===409?"conflict":e>=500?"unavailable":"error"}var Is=class extends qS{constructor(t,n,r,i){super(t,WX(n),{status:n,statusText:r,body:i});he(this,"status");he(this,"statusText");this.name="APIError",this.status=n,this.statusText=r}},Go=class{constructor(e){he(this,"baseUrl");he(this,"http");he(this,"token$");he(this,"logger");he(this,"errorsSubject",new es);he(this,"errors$",this.errorsSubject.asObservable());he(this,"_actor",null);he(this,"_actorStarted",!1);he(this,"disposed",!1);he(this,"activeResource",null);he(this,"bridges",[]);const{baseUrl:t,timeout:n=3e4,retry:r=2,logger:i,tokenRefresher:a}=e;this.baseUrl=t.endsWith("/")?t.slice(0,-1):t,this.token$=e.token$??new yt(null),this.logger=i;const s=a?{limit:1,methods:["get","post","put","patch","delete","head","options"],statusCodes:[401,408,413,429,500,502,503,504]}:r;this.http=ib.create({timeout:n,retry:s,credentials:"include",hooks:{beforeRequest:[o=>{this.logger&&this.logger.debug("HTTP Request",{type:"http_request",url:o.url,method:o.method,timestamp:Date.now(),hasAuth:o.headers.has("Authorization")})}],beforeRetry:a?[async({request:o,error:c})=>{if(!(!(c instanceof xp)||c.response.status!==401))try{const d=await a();if(!d)return ib.stop;o.headers.set("Authorization",`Bearer ${d}`);return}catch{return ib.stop}}]:[],afterResponse:[(o,c,d)=>(this.logger&&this.logger.debug("HTTP Response",{type:"http_response",url:o.url,method:o.method,status:d.status,statusText:d.statusText}),d)],beforeError:[async o=>{const{response:c,request:d}=o;if(c){const f=await c.json().catch(()=>({}));this.logger&&this.logger.error("HTTP Request Failed",{type:"http_error",url:d.url,method:d.method,status:c.status,statusText:c.statusText,error:f.message||`HTTP ${c.status}: ${c.statusText}`});const m=new Is(f.message||`HTTP ${c.status}: ${c.statusText}`,c.status,c.statusText,f);throw this.errorsSubject.next(m),m}return o}]}}),this.token$.subscribe(o=>{o&&!this._actorStarted&&!this.disposed&&(this._actorStarted=!0,this.actor.start())})}get actor(){if(!this._actor){this._actor=FX({baseUrl:this.baseUrl,token:()=>this.token$.getValue()??"",channels:[...zj]});for(const e of zj)this._actor.on$(e).subscribe(t=>{for(const n of this.bridges)n.get(e).next(t)})}return this._actor}async emit(e,t,n){hc("EMIT",e,t,n),VX(e,n),await xd(`bus.emit:${e}`,async()=>{n!==void 0?await this.actor.emit(e,t,n):await this.actor.emit(e,t)},{kind:Ks.PRODUCER,attrs:{"bus.channel":e,...n?{"bus.scope":n}:{}}})}on(e,t){const n=this.actor.on$(e).subscribe(t);return()=>n.unsubscribe()}stream(e){return this.actor.on$(e)}bridgeInto(e){this.bridges.push(e)}subscribeToResource(e){if(this.activeResource){if(this.activeResource.resourceId!==e)throw new Error(`HttpTransport already subscribed to resource ${this.activeResource.resourceId}; call the unsubscribe returned from the previous subscribeToResource before subscribing to ${e}.`);return this.activeResource.refCount++,this.makeUnsubscriber()}this.actor.addChannels([...db],e);const t=[];for(const n of db)t.push(this.actor.on$(n).subscribe(r=>{for(const i of this.bridges)i.get(n).next(r)}));return this.activeResource={resourceId:e,refCount:1,bridgeSubs:t},this.makeUnsubscriber()}makeUnsubscriber(){let e=!1;return()=>{if(!e&&(e=!0,!!this.activeResource&&(this.activeResource.refCount--,!(this.activeResource.refCount>0)))){for(const t of this.activeResource.bridgeSubs)t.unsubscribe();this.actor.removeChannels([...db]),this.activeResource=null}}}get state$(){return this.actor.state$}dispose(){if(!this.disposed){if(this.disposed=!0,this.activeResource){for(const e of this.activeResource.bridgeSubs)e.unsubscribe();this.activeResource=null}this._actor&&(this._actor.dispose(),this._actor=null),this.errorsSubject.complete()}}pushError(e){this.disposed||this.errorsSubject.next(e)}authHeaders(){const e=this.token$.getValue()??void 0;return e?{Authorization:`Bearer ${e}`}:{}}async authenticatePassword(e,t){return this.http.post(`${this.baseUrl}/api/tokens/password`,{json:{email:e,password:t},headers:this.authHeaders()}).json()}async authenticateGoogle(e){return this.http.post(`${this.baseUrl}/api/tokens/google`,{json:{credential:e},headers:this.authHeaders()}).json()}async refreshAccessToken(e){return this.http.post(`${this.baseUrl}/api/tokens/refresh`,{json:{refreshToken:e},headers:this.authHeaders()}).json()}async logout(){await this.http.post(`${this.baseUrl}/api/users/logout`,{headers:this.authHeaders()}).json()}async acceptTerms(){await this.http.post(`${this.baseUrl}/api/users/accept-terms`,{headers:this.authHeaders()}).json()}async getCurrentUser(){return this.http.get(`${this.baseUrl}/api/users/me`,{headers:this.authHeaders()}).json()}async generateMcpToken(){return this.http.post(`${this.baseUrl}/api/tokens/mcp-generate`,{headers:this.authHeaders()}).json()}async getMediaToken(e){return this.http.post(`${this.baseUrl}/api/tokens/media`,{json:{resourceId:e},headers:this.authHeaders()}).json()}async listUsers(){return this.http.get(`${this.baseUrl}/api/admin/users`,{headers:this.authHeaders()}).json()}async getUserStats(){return this.http.get(`${this.baseUrl}/api/admin/users/stats`,{headers:this.authHeaders()}).json()}async updateUser(e,t){return this.http.patch(`${this.baseUrl}/api/admin/users/${e}`,{json:t,headers:this.authHeaders()}).json()}async getOAuthConfig(){return this.http.get(`${this.baseUrl}/api/admin/oauth/config`,{headers:this.authHeaders()}).json()}async backupKnowledgeBase(){const e=await this.http.post(`${this.baseUrl}/api/admin/exchange/backup`,{headers:this.authHeaders()});return $j(e)}restoreKnowledgeBase(e){return this.sseProgressStream(`${this.baseUrl}/api/admin/exchange/restore`,e)}async exportKnowledgeBase(e){const t=e!=null&&e.includeArchived?new URLSearchParams({includeArchived:"true"}):void 0,n=await this.http.post(`${this.baseUrl}/api/moderate/exchange/export`,{headers:this.authHeaders(),...t?{searchParams:t}:{}});return $j(n)}importKnowledgeBase(e){return this.sseProgressStream(`${this.baseUrl}/api/moderate/exchange/import`,e)}sseProgressStream(e,t){return new Xn(n=>{const r=new AbortController,i=new FormData;return i.append("file",t),(async()=>{try{const s=(await this.http.post(e,{body:i,headers:this.authHeaders(),signal:r.signal})).body.getReader(),o=new TextDecoder;let c="";for(;!n.closed;){const{done:d,value:f}=await s.read();if(d)break;c+=o.decode(f,{stream:!0});const m=c.split(`
38
- `);c=m.pop();for(const p of m)if(p.startsWith("data: ")){const v=JSON.parse(p.slice(6));n.next(v)}}n.complete()}catch(a){n.closed||n.error(a)}})(),()=>r.abort()})}async healthCheck(){return this.http.get(`${this.baseUrl}/api/health`,{headers:this.authHeaders()}).json()}async getStatus(){return this.http.get(`${this.baseUrl}/api/status`,{headers:this.authHeaders()}).json()}get rawHttp(){return this.http}getToken(){return this.token$.getValue()??void 0}},Ko=class{constructor(e){this.transport=e}async putBinary(e,t){const n=e.file instanceof File?e.file.size:e.file.length;return hc("PUT","content",{name:e.name,format:e.format,storageUri:e.storageUri,sizeBytes:n}),xd("content.put",async()=>{const r=HX(e),i=this.requestHeaders(t==null?void 0:t.auth);return typeof XMLHttpRequest<"u"&&(t!=null&&t.onProgress||t!=null&&t.signal)?GX({url:`${this.transport.baseUrl}/resources`,formData:r,headers:i,onProgress:t.onProgress,signal:t.signal,onApiError:o=>this.transport.pushError(o)}):{resourceId:(await this.transport.rawHttp.post(`${this.transport.baseUrl}/resources`,{body:r,headers:i}).json()).resourceId}},{kind:Ks.CLIENT,attrs:{"content.format":e.format,"content.size_bytes":n}})}async getBinary(e,t){return hc("GET","content",{resourceId:e,accept:t==null?void 0:t.accept}),xd("content.get",async()=>{const n=await this.transport.rawHttp.get(`${this.transport.baseUrl}/resources/${e}`,{headers:{Accept:(t==null?void 0:t.accept)??"text/plain",...this.requestHeaders(t==null?void 0:t.auth)}}),r=n.headers.get("content-type")||"application/octet-stream";return{data:await n.arrayBuffer(),contentType:r}},{kind:Ks.CLIENT,attrs:{"resource.id":e}})}async getBinaryStream(e,t){return hc("GET","content",{resourceId:e,accept:t==null?void 0:t.accept,stream:!0}),xd("content.get",async()=>{const n=await this.transport.rawHttp.get(`${this.transport.baseUrl}/resources/${e}`,{headers:{Accept:(t==null?void 0:t.accept)??"text/plain",...this.requestHeaders(t==null?void 0:t.auth)}}),r=n.headers.get("content-type")||"application/octet-stream";if(!n.body)throw new Error("Response body is null - cannot create stream");return{stream:n.body,contentType:r}},{kind:Ks.CLIENT,attrs:{"resource.id":e,"content.stream":!0}})}dispose(){}requestHeaders(e){const t=e??this.transport.getToken(),n=t?{Authorization:`Bearer ${t}`}:{},r=oQ();return r&&(n.traceparent=r.traceparent,r.tracestate&&(n.tracestate=r.tracestate)),n}};function HX(e){const t=new FormData;if(t.append("name",e.name),t.append("format",e.format),t.append("storageUri",e.storageUri),e.file instanceof File)t.append("file",e.file);else if(typeof Buffer<"u"&&Buffer.isBuffer(e.file)){const n=new Blob([new Uint8Array(e.file)],{type:e.format});t.append("file",n,e.name)}else throw new Error("file must be a File or Buffer");return e.entityTypes&&e.entityTypes.length>0&&t.append("entityTypes",JSON.stringify(e.entityTypes)),e.language&&t.append("language",e.language),e.creationMethod&&t.append("creationMethod",String(e.creationMethod)),e.sourceAnnotationId&&t.append("sourceAnnotationId",String(e.sourceAnnotationId)),e.sourceResourceId&&t.append("sourceResourceId",String(e.sourceResourceId)),e.generationPrompt&&t.append("generationPrompt",e.generationPrompt),e.generator&&t.append("generator",JSON.stringify(e.generator)),e.isDraft!==void 0&&t.append("isDraft",String(e.isDraft)),t}function GX(e){const{url:t,formData:n,headers:r,onProgress:i,signal:a,onApiError:s}=e;return new Promise((o,c)=>{const d=new XMLHttpRequest;if(a!=null&&a.aborted){const f=new Is("Upload aborted",0,"aborted");s(f),c(f);return}d.open("POST",t);for(const[f,m]of Object.entries(r))d.setRequestHeader(f,m);if(i&&(d.upload.onprogress=f=>{const m=f.lengthComputable?f.total:0;i({bytesUploaded:f.loaded,totalBytes:m})}),d.onload=()=>{if(d.status>=200&&d.status<300){try{const v=JSON.parse(d.responseText);o({resourceId:v.resourceId})}catch(v){const b=new Is(`Upload succeeded but response was not valid JSON: ${v.message}`,d.status,d.statusText,d.responseText);s(b),c(b)}return}let f=d.responseText;try{f=JSON.parse(d.responseText)}catch{}const m=f&&typeof f=="object"&&"message"in f&&typeof f.message=="string"?f.message:`HTTP ${d.status}: ${d.statusText}`,p=new Is(m,d.status,d.statusText,f);s(p),c(p)},d.onerror=()=>{const f=new Is("Network error during upload",0,"network-error");s(f),c(f)},d.ontimeout=()=>{const f=new Is("Upload timed out",0,"timeout");s(f),c(f)},d.onabort=()=>{const f=new Is("Upload aborted",0,"aborted");s(f),c(f)},a){const f=()=>d.abort();a.addEventListener("abort",f,{once:!0})}d.send(n)})}var jf=class lQ extends Xn{then(t,n){return TP(this).then(t,n)}static from(t){return new lQ(n=>t.subscribe(n))}},Qs=class cQ extends Xn{then(t,n){return EP(this.pipe(lr(r=>r!==void 0))).then(t,n)}static from(t){let n=Vj.get(t);return n||(n=new cQ(r=>t.subscribe(r)),Vj.set(t,n)),n}},Vj=new WeakMap,KX=class extends Xn{then(e,t){return TP(this).then(n=>{if(n.phase!=="finished")throw new Error(`UploadObservable resolved on a non-finished event: ${n.phase}`);const r={resourceId:n.resourceId};return e?e(r):r},t)}},Uj=class extends qS{constructor(e,t,n){super(e,t,n),this.name="BusRequestError"}};async function _n(e,t,n,r,i,a=3e4){const s=crypto.randomUUID(),o={...n,correlationId:s},c=Yd(e.stream(r).pipe(lr(m=>m.correlationId===s),Wa(m=>({ok:!0,response:m.response}))),e.stream(i).pipe(lr(m=>m.correlationId===s),Wa(m=>({ok:!1,error:new Uj(m.message??"Bus request rejected","bus.rejected",{channel:i,correlationId:s,payload:m})})))).pipe(QB(1),xf(a),QP(m=>m instanceof CP?Lj(()=>new Uj(`Bus request timed out after ${a}ms on ${r}`,"bus.timeout",{channel:t,resultChannel:r,correlationId:s,timeoutMs:a})):Lj(()=>m))),d=EP(c);await e.emit(t,o);const f=await d;if(!f.ok)throw f.error;return f.response}function Ns(e){const t=new yt(new Map),n=new Set,r=new Map,i=async a=>{if(!n.has(a)){n.add(a);try{const s=await e(a),o=new Map(t.value);o.set(a,s),t.next(o)}catch{}finally{n.delete(a)}}};return{observe(a){!t.value.has(a)&&!n.has(a)&&i(a);let s=r.get(a);return s||(s=t.pipe(Wa(o=>o.get(a)),NP()),r.set(a,s)),s},get(a){return t.value.get(a)},keys(){return[...t.value.keys()]},invalidate(a){n.delete(a),i(a)},remove(a){const s=new Map(t.value);s.delete(a),t.next(s),n.delete(a)},set(a,s){const o=new Map(t.value);o.set(a,s),t.next(o)},invalidateAll(){for(const a of t.value.keys())n.delete(a),i(a)},dispose(){t.complete(),r.clear(),n.clear()}}}var Yj="_",Fj="_",JX=class{constructor(e,t,n){he(this,"resourceCache");he(this,"resourceListCache");he(this,"annotationListCache");he(this,"annotationDetailCache");he(this,"annotationResources",new Map);he(this,"entityTypesCache");he(this,"tagSchemasCache");he(this,"referencedByCache");he(this,"resourceEventsCache");he(this,"resourceListFilters",new Map);he(this,"annotationListObs",new Map);he(this,"onEntityTagChanged",e=>{e.resourceId&&(this.invalidateAnnotationList(e.resourceId),this.invalidateResourceDetail(e.resourceId),this.invalidateResourceEvents(e.resourceId))});he(this,"onArchiveToggled",e=>{e.resourceId&&(this.invalidateResourceDetail(e.resourceId),this.invalidateResourceLists())});he(this,"onYieldResourceMutated",e=>{const t=Sr(e.resourceId);this.invalidateResourceDetail(t),this.invalidateResourceLists()});this.transport=e,this.bus=t,this.content=n,this.resourceCache=Ns(async r=>(await _n(this.transport,"browse:resource-requested",{resourceId:r},"browse:resource-result","browse:resource-failed")).resource),this.resourceListCache=Ns(async r=>{const i=this.resourceListFilters.get(r)??{},a=i.search?i.search:void 0;return(await _n(this.transport,"browse:resources-requested",{search:a,archived:i.archived,limit:i.limit??100,offset:0},"browse:resources-result","browse:resources-failed")).resources}),this.annotationListCache=Ns(async r=>_n(this.transport,"browse:annotations-requested",{resourceId:r},"browse:annotations-result","browse:annotations-failed")),this.annotationDetailCache=Ns(async r=>{const i=this.annotationResources.get(r);if(!i)throw new Error(`Cannot fetch annotation ${r}: no resourceId known`);return(await _n(this.transport,"browse:annotation-requested",{resourceId:i,annotationId:r},"browse:annotation-result","browse:annotation-failed")).annotation}),this.entityTypesCache=Ns(async()=>(await _n(this.transport,"browse:entity-types-requested",{},"browse:entity-types-result","browse:entity-types-failed")).entityTypes),this.tagSchemasCache=Ns(async()=>(await _n(this.transport,"browse:tag-schemas-requested",{},"browse:tag-schemas-result","browse:tag-schemas-failed")).tagSchemas),this.referencedByCache=Ns(async r=>(await _n(this.transport,"browse:referenced-by-requested",{resourceId:r},"browse:referenced-by-result","browse:referenced-by-failed")).referencedBy),this.resourceEventsCache=Ns(async r=>(await _n(this.transport,"browse:events-requested",{resourceId:r},"browse:events-result","browse:events-failed")).events),this.subscribeToEvents()}resource(e){return Qs.from(this.resourceCache.observe(e))}resources(e){const t=JSON.stringify(e??{});return this.resourceListFilters.set(t,e??{}),Qs.from(this.resourceListCache.observe(t))}annotations(e){let t=this.annotationListObs.get(e);return t||(t=this.annotationListCache.observe(e).pipe(Wa(n=>n==null?void 0:n.annotations)),this.annotationListObs.set(e,t)),Qs.from(t)}annotation(e,t){return this.annotationResources.set(t,e),Qs.from(this.annotationDetailCache.observe(t))}entityTypes(){return Qs.from(this.entityTypesCache.observe(Yj))}tagSchemas(){return Qs.from(this.tagSchemasCache.observe(Fj))}referencedBy(e){return Qs.from(this.referencedByCache.observe(e))}events(e){return Qs.from(this.resourceEventsCache.observe(e))}async resourceContent(e){const t=await this.content.getBinary(e,{accept:"text/plain"});return new TextDecoder().decode(t.data)}async resourceRepresentation(e,t){return this.content.getBinary(e,t!=null&&t.accept?{accept:t.accept}:void 0)}async resourceRepresentationStream(e,t){return this.content.getBinaryStream(e,t!=null&&t.accept?{accept:t.accept}:void 0)}async resourceEvents(e){return(await _n(this.transport,"browse:events-requested",{resourceId:e},"browse:events-result","browse:events-failed")).events}async annotationHistory(e,t){return _n(this.transport,"browse:annotation-history-requested",{resourceId:e,annotationId:t},"browse:annotation-history-result","browse:annotation-history-failed")}async connections(e){throw new Error("Not implemented: connections endpoint does not exist yet")}async backlinks(e){throw new Error("Not implemented: backlinks endpoint does not exist yet")}async resourcesByName(e,t){throw new Error("Not implemented: resourcesByName endpoint does not exist yet")}async files(e,t){return _n(this.transport,"browse:directory-requested",{path:e??".",sort:t??"name"},"browse:directory-result","browse:directory-failed")}click(e,t){this.bus.get("browse:click").next({annotationId:e,motivation:t})}navigateReference(e){this.bus.get("browse:reference-navigate").next({resourceId:e})}invalidateAnnotationList(e){this.annotationListCache.invalidate(e)}removeAnnotationDetail(e){this.annotationDetailCache.remove(e),this.annotationResources.delete(e)}invalidateResourceDetail(e){this.resourceCache.invalidate(e)}invalidateResourceLists(){this.resourceListCache.invalidateAll()}invalidateEntityTypes(){this.entityTypesCache.invalidate(Yj)}invalidateTagSchemas(){this.tagSchemasCache.invalidate(Fj)}invalidateReferencedBy(e){this.referencedByCache.invalidate(e)}invalidateResourceEvents(e){this.resourceEventsCache.invalidate(e)}updateAnnotationInPlace(e,t){const n=this.annotationListCache.get(e);if(n){const i=n.annotations.findIndex(s=>s.id===t.id),a=i>=0?n.annotations.map((s,o)=>o===i?t:s):[...n.annotations,t];this.annotationListCache.set(e,{...n,annotations:a})}const r=Gn(t.id);this.annotationResources.set(r,e),this.annotationDetailCache.set(r,t)}on(e,t){this.bus.get(e).subscribe(t)}subscribeToEvents(){this.on("bus:resume-gap",e=>{const t=e.scope;if(t){const n=t;this.invalidateAnnotationList(n),this.invalidateResourceDetail(n),this.invalidateResourceEvents(n),this.invalidateReferencedBy(n)}else{this.invalidateResourceLists();for(const n of this.annotationListCache.keys())this.invalidateAnnotationList(n);for(const n of this.resourceCache.keys())this.invalidateResourceDetail(n);for(const n of this.resourceEventsCache.keys())this.invalidateResourceEvents(n);for(const n of this.referencedByCache.keys())this.invalidateReferencedBy(n)}this.invalidateEntityTypes(),this.invalidateTagSchemas()}),this.on("mark:delete-ok",e=>{this.removeAnnotationDetail(Gn(e.annotationId))}),this.on("mark:added",e=>{e.resourceId&&(this.invalidateAnnotationList(e.resourceId),this.invalidateResourceEvents(e.resourceId))}),this.on("mark:removed",e=>{e.resourceId&&(this.invalidateAnnotationList(e.resourceId),this.invalidateResourceEvents(e.resourceId)),this.removeAnnotationDetail(Gn(e.payload.annotationId))}),this.on("mark:body-updated",e=>{const t=e;!t.resourceId||!t.annotation||(this.updateAnnotationInPlace(t.resourceId,t.annotation),this.invalidateResourceEvents(t.resourceId))}),this.on("mark:entity-tag-added",this.onEntityTagChanged),this.on("mark:entity-tag-removed",this.onEntityTagChanged),this.on("replay-window-exceeded",e=>{e.resourceId&&this.invalidateAnnotationList(e.resourceId)}),this.on("yield:create-ok",this.onYieldResourceMutated),this.on("yield:update-ok",this.onYieldResourceMutated),this.on("mark:archived",this.onArchiveToggled),this.on("mark:unarchived",this.onArchiveToggled),this.on("frame:entity-type-added",()=>this.invalidateEntityTypes()),this.on("frame:tag-schema-added",()=>this.invalidateTagSchemas())}},eZ=class{constructor(e,t){this.transport=e,this.bus=t}async annotation(e){const t=Sr(e.target.source),n=await _n(this.transport,"mark:create-request",{resourceId:t,request:e},"mark:create-ok","mark:create-failed");return{annotationId:Gn(n.annotationId)}}async delete(e,t){await this.transport.emit("mark:delete",{annotationId:t,resourceId:e})}async archive(e){await this.transport.emit("mark:archive",{resourceId:e})}async unarchive(e){await this.transport.emit("mark:unarchive",{resourceId:e})}assist(e,t,n){return new jf(r=>{let i=!1,a=null,s=null,o=this.transport.subscribeToResource(e);const c=()=>{i=!0,a&&(clearTimeout(a),a=null),s&&(clearInterval(s),s=null),o&&(o(),o=null)},d=w=>{a&&clearTimeout(a),s&&(clearInterval(s),s=null),a=setTimeout(()=>{i||(s=setInterval(()=>{i||_n(this.transport,"job:status-requested",{jobId:w},"job:status-result","job:status-failed").then(j=>{i||(j.status==="complete"?(c(),r.next({kind:"complete",data:{jobId:w,jobType:j.jobType??"annotation",resourceId:e,result:j.result}}),r.complete()):j.status==="failed"&&(c(),r.error(new Error(j.error??"Job failed"))))}).catch(()=>{})},5e3))},1e4)};let f=null;const m=this.bus.get("job:report-progress").pipe(lr(w=>w.jobId===f)),p=this.bus.get("job:complete").pipe(lr(w=>w.jobId===f)),v=this.bus.get("job:fail").pipe(lr(w=>w.jobId===f)),b=m.pipe(RS(Yd(p,v))).subscribe(w=>{w.progress&&r.next({kind:"progress",data:w.progress}),f&&d(f)}),S=p.subscribe(w=>{c(),r.next({kind:"complete",data:w}),r.complete()}),x=v.subscribe(w=>{c(),r.error(new Error(w.error))});return this.dispatchAssist(e,t,n).then(({jobId:w})=>{w&&!i&&(f=w,d(w))}).catch(w=>{c(),r.error(w)}),()=>{c(),b.unsubscribe(),S.unsubscribe(),x.unsubscribe()}})}request(e,t){this.bus.get("mark:requested").next({selector:e,motivation:t})}requestAssist(e,t,n){this.bus.get("mark:assist-request").next({motivation:e,options:t,...n?{correlationId:n}:{}})}submit(e){this.bus.get("mark:submit").next(e)}cancelPending(){this.bus.get("mark:cancel-pending").next(void 0)}dismissProgress(){this.bus.get("mark:progress-dismiss").next(void 0)}changeSelection(e){this.bus.get("mark:selection-changed").next({motivation:e})}changeClick(e){this.bus.get("mark:click-changed").next({action:e})}changeShape(e){this.bus.get("mark:shape-changed").next({shape:e})}toggleMode(){this.bus.get("mark:mode-toggled").next(void 0)}async dispatchAssist(e,t,n){var s,o;const i={tagging:"tag-annotation",linking:"reference-annotation",highlighting:"highlight-annotation",assessing:"assessment-annotation",commenting:"comment-annotation"}[t];if(!i)throw new Error(`Unsupported motivation: ${t}`);if(t==="tagging"){if(!n.schemaId||!((s=n.categories)!=null&&s.length))throw new Error("Tag assist requires schemaId and categories")}else if(t==="linking"&&!((o=n.entityTypes)!=null&&o.length))throw new Error("Reference assist requires entityTypes");const a={};return n.entityTypes&&(a.entityTypes=n.entityTypes),n.includeDescriptiveReferences!==void 0&&(a.includeDescriptiveReferences=n.includeDescriptiveReferences),n.instructions!==void 0&&(a.instructions=n.instructions),n.density!==void 0&&(a.density=n.density),n.tone!==void 0&&(a.tone=n.tone),n.language!==void 0&&(a.language=n.language),n.sourceLanguage!==void 0&&(a.sourceLanguage=n.sourceLanguage),n.schemaId!==void 0&&(a.schemaId=n.schemaId),n.categories!==void 0&&(a.categories=n.categories),_n(this.transport,"job:create",{jobType:i,resourceId:e,params:a},"job:created","job:create-failed")}},tZ=class{constructor(e,t){this.transport=e,this.bus=t}async body(e,t,n){await this.transport.emit("bind:update-body",{correlationId:crypto.randomUUID(),annotationId:t,resourceId:e,operations:n})}initiate(e){this.bus.get("bind:initiate").next(e)}},nZ=class{constructor(e,t){this.transport=e,this.bus=t}annotation(e,t,n){return new jf(r=>{const i=crypto.randomUUID(),a=this.bus.get("gather:complete").pipe(lr(f=>f.correlationId===i)),s=this.bus.get("gather:failed").pipe(lr(f=>f.correlationId===i)),o=Yd(this.bus.get("gather:annotation-progress").pipe(lr(f=>f.annotationId===t),Wa(f=>f)),a.pipe(Wa(f=>f))).pipe(RS(Yd(a,s))).subscribe({next:f=>r.next(f),error:f=>r.error(f)}),c=a.subscribe(f=>{r.next(f),r.complete()}),d=s.subscribe(f=>{r.error(new Error(f.message))});return this.transport.emit("gather:requested",{correlationId:i,annotationId:t,resourceId:e,options:{contextWindow:(n==null?void 0:n.contextWindow)??2e3}}).catch(f=>{r.error(f)}),()=>{o.unsubscribe(),c.unsubscribe(),d.unsubscribe()}})}resource(e,t){throw new Error("Not implemented: gather.resource() — no backend route yet")}},rZ=class{constructor(e,t){this.transport=e,this.bus=t}requestSearch(e){this.bus.get("match:search-requested").next(e)}search(e,t,n,r){return new jf(i=>{const a=crypto.randomUUID(),s=this.bus.get("match:search-results").pipe(lr(f=>f.correlationId===a)),o=this.bus.get("match:search-failed").pipe(lr(f=>f.correlationId===a)),c=s.subscribe(f=>{i.next(f),i.complete()}),d=o.subscribe(f=>{i.error(new Error(f.error))});return this.transport.emit("match:search-requested",{correlationId:a,resourceId:e,referenceId:t,context:n,limit:(r==null?void 0:r.limit)??10,useSemanticScoring:(r==null?void 0:r.useSemanticScoring)??!0}).catch(f=>{i.error(f)}),()=>{c.unsubscribe(),d.unsubscribe()}})}},iZ=class{constructor(e,t,n){this.transport=e,this.bus=t,this.content=n}resource(e){const t=typeof Buffer<"u"&&e.file instanceof Buffer?e.file.length:e.file.size;return new KX(n=>{n.next({phase:"started",totalBytes:t});let r=!1;const i=new AbortController;return this.content.putBinary({name:e.name,file:e.file,format:e.format,storageUri:e.storageUri,...e.entityTypes?{entityTypes:e.entityTypes}:{},...e.language?{language:e.language}:{},...e.creationMethod?{creationMethod:e.creationMethod}:{},...e.sourceAnnotationId?{sourceAnnotationId:e.sourceAnnotationId}:{},...e.sourceResourceId?{sourceResourceId:e.sourceResourceId}:{},...e.generationPrompt?{generationPrompt:e.generationPrompt}:{},...e.generator?{generator:e.generator}:{},...e.isDraft!==void 0?{isDraft:e.isDraft}:{}},{onProgress:({bytesUploaded:a,totalBytes:s})=>{if(r)return;const o=s>0?s:t;n.next({phase:"progress",bytesUploaded:a,totalBytes:o})},signal:i.signal}).then(a=>{r||(n.next({phase:"finished",resourceId:Sr(a.resourceId)}),n.complete())}).catch(a=>{r||n.error(a)}),()=>{r=!0,i.abort()}})}fromAnnotation(e,t,n){return new jf(r=>{let i=!1,a=null,s=null,o=this.transport.subscribeToResource(e);const c=()=>{i=!0,a&&(clearTimeout(a),a=null),s&&(clearInterval(s),s=null),o&&(o(),o=null)},d=w=>{a&&clearTimeout(a),s&&(clearInterval(s),s=null),a=setTimeout(()=>{i||(s=setInterval(()=>{i||_n(this.transport,"job:status-requested",{jobId:w},"job:status-result","job:status-failed").then(j=>{i||(j.status==="complete"?(c(),r.next({kind:"complete",data:{jobId:w,jobType:j.jobType??"generation",resourceId:e,result:j.result}}),r.complete()):j.status==="failed"&&(c(),r.error(new Error(j.error??"Generation failed"))))}).catch(()=>{})},5e3))},1e4)};let f=null;const m=this.bus.get("job:report-progress").pipe(lr(w=>w.jobId===f)),p=this.bus.get("job:complete").pipe(lr(w=>w.jobId===f)),v=this.bus.get("job:fail").pipe(lr(w=>w.jobId===f)),b=m.pipe(RS(Yd(p,v))).subscribe(w=>{w.progress&&r.next({kind:"progress",data:w.progress}),f&&d(f)}),S=p.subscribe(w=>{c(),r.next({kind:"complete",data:w}),r.complete()}),x=v.subscribe(w=>{c(),r.error(new Error(w.error))});return _n(this.transport,"job:create",{jobType:"generation",resourceId:e,params:{referenceId:t,title:n.title,prompt:n.prompt,entityTypes:n.entityTypes,language:n.language,sourceLanguage:n.sourceLanguage,temperature:n.temperature,maxTokens:n.maxTokens,storageUri:n.storageUri,context:n.context}},"job:created","job:create-failed").then(({jobId:w})=>{w&&!i&&(f=w,d(w))}).catch(w=>{c(),r.error(w)}),()=>{c(),b.unsubscribe(),S.unsubscribe(),x.unsubscribe()}})}async cloneToken(e){return _n(this.transport,"yield:clone-token-requested",{resourceId:e},"yield:clone-token-generated","yield:clone-token-failed")}async fromToken(e){return(await _n(this.transport,"yield:clone-resource-requested",{token:e},"yield:clone-resource-result","yield:clone-resource-failed")).sourceResource}async createFromToken(e){const t=await _n(this.transport,"yield:clone-create",e,"yield:clone-created","yield:clone-create-failed");return{resourceId:Sr(t.resourceId)}}clone(){this.bus.get("yield:clone").next(void 0)}},aZ=class{constructor(e,t){this.transport=e,this.bus=t}attention(e,t){this.transport.emit("beckon:focus",{annotationId:t,resourceId:e})}hover(e){this.bus.get("beckon:hover").next({annotationId:e})}sparkle(e){this.bus.get("beckon:sparkle").next({annotationId:e})}},sZ=class{constructor(e){this.transport=e}async addEntityType(e){await this.transport.emit("frame:add-entity-type",{tag:e})}async addEntityTypes(e){for(const t of e)await this.transport.emit("frame:add-entity-type",{tag:t})}async addTagSchema(e){await this.transport.emit("frame:add-tag-schema",{schema:e})}},oZ=class{constructor(e,t){this.transport=e,this.bus=t}get queued$(){return this.bus.get("job:queued")}get progress$(){return this.bus.get("job:report-progress")}get complete$(){return this.bus.get("job:complete")}get fail$(){return this.bus.get("job:fail")}async status(e){return _n(this.transport,"job:status-requested",{jobId:e},"job:status-result","job:status-failed")}async pollUntilComplete(e,t){const n=(t==null?void 0:t.interval)??1e3,r=(t==null?void 0:t.timeout)??6e4,i=Date.now();for(;;){const a=await this.status(e);if(t!=null&&t.onProgress&&t.onProgress(a),a.status==="complete"||a.status==="failed"||a.status==="cancelled")return a;if(Date.now()-i>r)throw new Error(`Job polling timeout after ${r}ms`);await new Promise(s=>setTimeout(s,n))}}async cancelByType(e){await this.transport.emit("job:cancel-requested",{jobType:e})}cancelRequest(e){this.bus.get("job:cancel-requested").next({jobType:e})}},lZ=class{constructor(e){this.backend=e}async password(e,t){return this.backend.authenticatePassword(e,t)}async google(e){return this.backend.authenticateGoogle(e)}async refresh(e){return this.backend.refreshAccessToken(e)}async logout(){await this.backend.logout()}async me(){return this.backend.getCurrentUser()}async acceptTerms(){await this.backend.acceptTerms()}async mcpToken(){return this.backend.generateMcpToken()}async mediaToken(e){return this.backend.getMediaToken(e)}},cZ=class{constructor(e){this.backend=e}async users(){return(await this.backend.listUsers()).users}async userStats(){return this.backend.getUserStats()}async updateUser(e,t){return(await this.backend.updateUser(e,t)).user}async oauthConfig(){return this.backend.getOAuthConfig()}async healthCheck(){return this.backend.healthCheck()}async status(){return this.backend.getStatus()}async backup(){return this.backend.backupKnowledgeBase()}restore(e){return Wj(this.backend.restoreKnowledgeBase(e))}async exportKnowledgeBase(e){return this.backend.exportKnowledgeBase(e)}importKnowledgeBase(e){return Wj(this.backend.importKnowledgeBase(e))}};function Wj(e){return new jf(t=>{const n=e.subscribe({next:r=>t.next(r),error:r=>t.error(r),complete:()=>t.complete()});return()=>n.unsubscribe()})}var _d=class $y{constructor(t,n,r){he(this,"transport");he(this,"content");he(this,"bus");he(this,"baseUrl");he(this,"frame");he(this,"browse");he(this,"mark");he(this,"bind");he(this,"gather");he(this,"match");he(this,"yield");he(this,"beckon");he(this,"job");he(this,"auth");he(this,"admin");this.transport=t,this.content=n,this.baseUrl=t.baseUrl,this.bus=new LP,this.transport.bridgeInto(this.bus),this.frame=new sZ(this.transport),this.browse=new JX(this.transport,this.bus,this.content),this.mark=new eZ(this.transport,this.bus),this.bind=new tZ(this.transport,this.bus),this.gather=new nZ(this.transport,this.bus),this.match=new rZ(this.transport,this.bus),this.yield=new iZ(this.transport,this.bus,this.content),this.beckon=new aZ(this.transport,this.bus),this.job=new oZ(this.transport,this.bus),this.auth=r?new lZ(r):void 0,this.admin=r?new cZ(r):void 0}get state$(){return this.transport.state$}subscribeToResource(t){return this.transport.subscribeToResource(t)}dispose(){this.transport.dispose(),this.content.dispose()}static fromHttp(t){const n=typeof t.baseUrl=="string"?t.baseUrl:t.baseUrl,r=t.token==null?null:typeof t.token=="string"?t.token:t.token,i=new yt(r),a=new Go({baseUrl:n,token$:i}),s=new Ko(a);return new $y(a,s,a)}static async signInHttp(t){const n=typeof t.baseUrl=="string"?t.baseUrl:t.baseUrl,r=new yt(null),i=new Go({baseUrl:n,token$:r}),a=new Ko(i),s=new $y(i,a,i);try{const o=await s.auth.password(t.email,t.password);return r.next(o.token),s}catch(o){throw s.dispose(),o}}},uZ="semiont.session.",uQ="semiont.knowledgeBases",fb="semiont.activeKnowledgeBaseId",dZ=300*1e3;function og(e){return`${uZ}${e}`}function wp(e,t){const n=e.get(og(t));if(!n)return null;try{const r=JSON.parse(n);if(r&&typeof r.access=="string"&&typeof r.refresh=="string")return{access:r.access,refresh:r.refresh}}catch{}return null}function kp(e,t,n){e.set(og(t),JSON.stringify(n))}function wd(e,t){e.delete(og(t))}function Vy(e){try{const t=e.split(".");if(t.length!==3||!t[1])return null;const n=JSON.parse(atob(t[1]));return n.exp?new Date(n.exp*1e3):null}catch{return null}}function tp(e){const t=Vy(e);return t?t.getTime()<Date.now():!0}function fZ(e){if(!e||typeof e!="object")return!1;const t=e;if(typeof t.id!="string"||typeof t.label!="string"||typeof t.email!="string")return!1;const n=t.endpoint;return!n||typeof n!="object"?!1:n.kind==="http"?typeof n.host=="string"&&typeof n.port=="number"&&(n.protocol==="http"||n.protocol==="https"):n.kind==="local"?typeof n.kbId=="string":!1}function hZ(e){try{const t=e.get(uQ);return t?JSON.parse(t).filter(fZ):[]}catch{return[]}}function mZ(e,t){e.set(uQ,JSON.stringify(t))}function Qse(e){return e==="localhost"||e==="127.0.0.1"?"http":"https"}var pZ=/^(([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?|localhost|\d{1,3}(\.\d{1,3}){3})$/;function gZ(e){return pZ.test(e)}function hb(e){if(!gZ(e.host))throw new Error(`Invalid KB hostname: "${e.host}"`);const t=new URL("http://x");return t.protocol=e.protocol+":",t.hostname=e.host,t.port=String(e.port),`${e.protocol}://${t.hostname}:${e.port}`}function vZ(){return crypto.randomUUID()}var pc=class extends qS{constructor(t,n,r=null){super(n,t,{kbId:r});he(this,"kbId");this.name="SemiontSessionError",this.kbId=r}},OZ=class Uy{constructor(t){he(this,"kb");he(this,"client");he(this,"token$");he(this,"user$");he(this,"streamState$");he(this,"errors$");he(this,"ready");he(this,"storage");he(this,"doRefresh");he(this,"doValidate");he(this,"onAuthFailed");he(this,"onError");he(this,"refreshTimer",null);he(this,"unsubscribeStorage",null);he(this,"disposed",!1);var i,a;this.kb=t.kb,this.storage=t.storage,this.doRefresh=t.refresh,this.doValidate=t.validate,this.onAuthFailed=t.onAuthFailed??(()=>{}),this.onError=t.onError??(()=>{}),this.client=t.client,this.token$=t.token$,this.user$=new yt(null),this.errors$=this.client.transport.errors$;const n=wp(this.storage,this.kb.id);n&&!tp(n.access)&&this.token$.getValue()===null&&this.token$.next(n.access);const r=this.token$.getValue();this.streamState$=this.client.state$,r&&this.scheduleProactiveRefresh(r),this.unsubscribeStorage=((a=(i=this.storage).subscribe)==null?void 0:a.call(i,(s,o)=>{this.handleStorageChange(s,o)}))??null,this.ready=this.validate(n)}async validate(t){if(!t)return;const n=tp(t.access)?this.doRefresh?await this.doRefresh():null:t.access;if(!n){tp(t.access)&&wd(this.storage,this.kb.id);return}if(n!==t.access&&(this.token$.next(n),this.scheduleProactiveRefresh(n)),!this.doValidate)return;const r=async i=>{if(!this.disposed)try{const a=await this.doValidate(i);if(this.disposed)return;this.user$.next(a)}catch(a){if(this.disposed)return;if(a instanceof Is&&a.status===401){const s=this.doRefresh?await this.doRefresh():null;if(this.disposed)return;if(s){this.token$.next(s),this.scheduleProactiveRefresh(s),await r(s);return}wd(this.storage,this.kb.id),this.token$.next(null),this.onAuthFailed("Your session has expired. Please sign in again.")}else this.onError(new pc("session.auth-failed",a instanceof Error?a.message:String(a),this.kb.id))}};await r(n)}async refresh(){if(this.disposed||!this.doRefresh)return null;const t=await this.doRefresh();if(this.disposed)return null;if(t){const n=t;return this.token$.next(n),this.scheduleProactiveRefresh(t),n}return this.token$.next(null),wd(this.storage,this.kb.id),this.onAuthFailed("Your session has expired. Please sign in again."),this.onError(new pc("session.refresh-exhausted","Token refresh failed",this.kb.id)),null}scheduleProactiveRefresh(t){this.clearRefreshTimer();const n=Vy(t);if(!n)return;const r=n.getTime()-dZ,i=Math.max(0,r-Date.now());this.refreshTimer=setTimeout(()=>{this.refreshTimer=null,this.disposed||this.refresh()},i)}clearRefreshTimer(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=null)}handleStorageChange(t,n){if(!this.disposed&&t===og(this.kb.id)){if(!n){this.token$.next(null),this.user$.next(null),this.clearRefreshTimer();return}try{const r=JSON.parse(n);typeof r.access=="string"&&(this.token$.next(r.access),this.scheduleProactiveRefresh(r.access))}catch{}}}get expiresAt(){const t=this.token$.getValue();return t?Vy(t):null}subscribe(t,n){const r=this.client.bus.get(t).subscribe(n);return()=>r.unsubscribe()}async dispose(){this.disposed||(this.disposed=!0,this.clearRefreshTimer(),this.unsubscribeStorage&&(this.unsubscribeStorage(),this.unsubscribeStorage=null),this.client.dispose(),this.token$.complete(),this.user$.complete())}static fromHttp(t){const n=typeof t.baseUrl=="string"?t.baseUrl:t.baseUrl,r=t.token==null?null:typeof t.token=="string"?t.token:t.token,i=new yt(r),a=new Go({baseUrl:n,token$:i}),s=new Ko(a),o=new _d(a,s,a),c={kb:t.kb,storage:t.storage,client:o,token$:i};return t.refresh&&(c.refresh=t.refresh),t.validate&&(c.validate=t.validate),t.onAuthFailed&&(c.onAuthFailed=t.onAuthFailed),t.onError&&(c.onError=t.onError),new Uy(c)}static async signInHttp(t){const n=typeof t.baseUrl=="string"?t.baseUrl:t.baseUrl,r=new yt(null),i=new Go({baseUrl:n,token$:r}),a=new Ko(i),s=new _d(i,a,i);let o;try{o=await s.auth.password(t.email,t.password)}catch(m){throw s.dispose(),m}kp(t.storage,t.kb.id,{access:o.token,refresh:o.refreshToken}),r.next(o.token);const c=async()=>{const m=wp(t.storage,t.kb.id);if(!m)return null;try{return(await s.auth.refresh(m.refresh)).access_token}catch{return null}},d={kb:t.kb,storage:t.storage,client:s,token$:r,refresh:c};t.validate&&(d.validate=t.validate),t.onAuthFailed&&(d.onAuthFailed=t.onAuthFailed),t.onError&&(d.onError=t.onError);const f=new Uy(d);return await f.ready,f}},bZ=class{constructor(){he(this,"sessionExpiredAt$");he(this,"sessionExpiredMessage$");he(this,"permissionDeniedAt$");he(this,"permissionDeniedMessage$");this.sessionExpiredAt$=new yt(null),this.sessionExpiredMessage$=new yt(null),this.permissionDeniedAt$=new yt(null),this.permissionDeniedMessage$=new yt(null)}notifySessionExpired(e){this.sessionExpiredMessage$.next(e??"Your session has expired. Please sign in again."),this.sessionExpiredAt$.next(Date.now())}notifyPermissionDenied(e){this.permissionDeniedMessage$.next(e??"You do not have permission to perform this action."),this.permissionDeniedAt$.next(Date.now())}acknowledgeSessionExpired(){this.sessionExpiredAt$.next(null),this.sessionExpiredMessage$.next(null)}acknowledgePermissionDenied(){this.permissionDeniedAt$.next(null),this.permissionDeniedMessage$.next(null)}dispose(){this.sessionExpiredAt$.complete(),this.sessionExpiredMessage$.complete(),this.permissionDeniedAt$.complete(),this.permissionDeniedMessage$.complete()}},Yy="openDocuments";function dQ(e){return[...e].sort((t,n)=>t.order!==void 0&&n.order!==void 0?t.order-n.order:t.openedAt-n.openedAt)}function yZ(e){try{const t=e.get(Yy);if(t)return dQ(JSON.parse(t))}catch{}return[]}var SZ=class{constructor(e){he(this,"kbs$");he(this,"activeKbId$");he(this,"activeSession$");he(this,"activeSignals$");he(this,"sessionActivating$");he(this,"openResources$");he(this,"error$");he(this,"identityToken$");he(this,"storage");he(this,"sessionFactory");he(this,"eventBus",new LP);he(this,"unsubscribeStorage",null);he(this,"disposed",!1);he(this,"activating",null);var i,a,s;this.storage=e.storage,this.sessionFactory=e.sessionFactory;const t=hZ(this.storage),n=this.storage.get(fb),r=n&&t.some(o=>o.id===n)?n:((i=t[0])==null?void 0:i.id)??null;this.kbs$=new yt(t),this.activeKbId$=new yt(r),this.activeSession$=new yt(null),this.activeSignals$=new yt(null),this.sessionActivating$=new yt(!1),this.openResources$=new yt(yZ(this.storage)),this.error$=new es,this.identityToken$=new yt(null),this.kbs$.subscribe(o=>mZ(this.storage,o)),this.activeKbId$.subscribe(o=>{o?this.storage.set(fb,o):this.storage.delete(fb)}),this.openResources$.subscribe(o=>{this.storage.set(Yy,JSON.stringify(o))}),this.unsubscribeStorage=((s=(a=this.storage).subscribe)==null?void 0:s.call(a,(o,c)=>{if(!(o!==Yy||!c))try{this.openResources$.next(dQ(JSON.parse(c)))}catch{}}))??null,r&&this.setActiveKb(r)}emit(e,t){this.disposed||this.eventBus.get(e).next(t)}on(e,t){const n=this.eventBus.get(e).subscribe(t);return()=>n.unsubscribe()}stream(e){return this.eventBus.get(e).asObservable()}setIdentityToken(e){this.disposed||this.identityToken$.next(e)}addKb(e,t,n){const r={id:vZ(),...e};return kp(this.storage,r.id,{access:t,refresh:n}),this.kbs$.next([...this.kbs$.getValue(),r]),this.setActiveKb(r.id),r}removeKb(e){var n;wd(this.storage,e);const t=this.kbs$.getValue().filter(r=>r.id!==e);this.kbs$.next(t),this.activeKbId$.getValue()===e&&this.setActiveKb(((n=t[0])==null?void 0:n.id)??null)}updateKb(e,t){this.kbs$.next(this.kbs$.getValue().map(n=>n.id===e?{...n,...t}:n))}getKbSessionStatus(e){const t=wp(this.storage,e);return t?tp(t.access)?"expired":"authenticated":"signed-out"}async setActiveKb(e){if(this.disposed)return;const t=this.activeKbId$.getValue(),n=this.activeSession$.getValue();if(e===t&&n)return;for(t!==e&&this.activeKbId$.next(e),n&&(this.activeSession$.next(null),this.activeSignals$.next(null));this.activating;)if(await this.activating,this.disposed||this.activeKbId$.getValue()!==e)return;const r=(async()=>{const i=this.activeSession$.getValue(),a=this.activeSignals$.getValue();if(i&&(this.activeSession$.next(null),this.activeSignals$.next(null),await i.dispose(),a==null||a.dispose()),!e)return;const s=this.kbs$.getValue().find(d=>d.id===e);if(!s)return;const o=new bZ;let c;try{c=this.sessionFactory({kb:s,storage:this.storage,signals:o,onError:d=>this.error$.next(d)})}catch(d){this.error$.next(d instanceof pc?d:new pc("session.construct-failed",d instanceof Error?d.message:String(d),e)),o.dispose();return}c.errors$.subscribe(d=>{d.code==="unauthorized"?o.notifySessionExpired(d.message):d.code==="forbidden"&&o.notifyPermissionDenied(d.message)});try{await c.ready}catch(d){this.error$.next(new pc("session.construct-failed",d instanceof Error?d.message:String(d),e)),await c.dispose(),o.dispose();return}if(this.disposed||this.activeKbId$.getValue()!==e){await c.dispose(),o.dispose();return}this.activeSession$.next(c),this.activeSignals$.next(o)})();this.activating=r,this.sessionActivating$.next(!0);try{await r}finally{this.activating===r&&(this.activating=null,this.sessionActivating$.next(!1))}}async signIn(e,t,n){if(!this.disposed){if(kp(this.storage,e,{access:t,refresh:n}),this.activeKbId$.getValue()===e){const r=this.activeSession$.getValue(),i=this.activeSignals$.getValue();this.activeSession$.next(null),this.activeSignals$.next(null),r&&await r.dispose(),i==null||i.dispose(),await this.setActiveKb(e);return}await this.setActiveKb(e)}}async signOut(e){if(!this.disposed&&(wd(this.storage,e),this.kbs$.next([...this.kbs$.getValue()]),this.activeKbId$.getValue()===e)){const t=this.activeSession$.getValue(),n=this.activeSignals$.getValue();this.activeSession$.next(null),this.activeSignals$.next(null),t&&await t.dispose(),n==null||n.dispose()}}addOpenResource(e,t,n,r){const i=this.openResources$.getValue(),a=i.findIndex(o=>o.id===e);if(a>=0){const c={...i[a],name:t,...n!==void 0?{mediaType:n}:{},...r!==void 0?{storageUri:r}:{}},d=[...i];d[a]=c,this.openResources$.next(d);return}const s={id:e,name:t,openedAt:Date.now(),order:i.length,...n!==void 0?{mediaType:n}:{},...r!==void 0?{storageUri:r}:{}};this.openResources$.next([...i,s])}removeOpenResource(e){this.openResources$.next(this.openResources$.getValue().filter(t=>t.id!==e))}updateOpenResourceName(e,t){this.openResources$.next(this.openResources$.getValue().map(n=>n.id===e?{...n,name:t}:n))}reorderOpenResources(e,t){const n=[...this.openResources$.getValue()];if(e<0||e>=n.length||t<0||t>=n.length)return;const[r]=n.splice(e,1);r&&n.splice(t,0,r),this.openResources$.next(n)}async dispose(){if(this.disposed)return;this.disposed=!0,this.unsubscribeStorage&&(this.unsubscribeStorage(),this.unsubscribeStorage=null);const e=this.activeSession$.getValue(),t=this.activeSignals$.getValue();this.activeSession$.next(null),this.activeSignals$.next(null),e&&await e.dispose(),t==null||t.dispose(),this.kbs$.complete(),this.activeKbId$.complete(),this.activeSession$.complete(),this.activeSignals$.complete(),this.openResources$.complete(),this.error$.complete(),this.identityToken$.complete(),this.eventBus.destroy()}};function xZ(){const e=new Map;return t=>{const{kb:n,storage:r,signals:i,onError:a}=t;if(n.endpoint.kind!=="http")throw new pc("session.construct-failed",`HTTP session factory cannot construct a session for endpoint kind "${n.endpoint.kind}"`,n.id);const s=n.endpoint,o=async()=>{const b=e.get(n.id);if(b)return b;const S=(async()=>{const x=wp(r,n.id);if(!x)return null;const w=new Go({baseUrl:hb(s)}),j=new _d(w,new Ko(w),w);try{const A=(await j.auth.refresh(x.refresh)).access_token;return A?(kp(r,n.id,{access:A,refresh:x.refresh}),A):null}catch{return null}finally{j.dispose()}})();e.set(n.id,S);try{return await S}finally{e.delete(n.id)}},c=async b=>{const S=new yt(b),x=new Go({baseUrl:hb(s),token$:S}),w=new _d(x,new Ko(x),x);try{return await w.auth.me()}finally{w.dispose(),S.complete()}},d=new yt(null);let f;const m=new Go({baseUrl:hb(s),token$:d,tokenRefresher:()=>f.refresh().then(b=>b??null)}),p=new Ko(m),v=new _d(m,p,m);return f=new OZ({kb:n,storage:r,client:v,token$:d,refresh:o,validate:c,onAuthFailed:b=>i.notifySessionExpired(b),onError:a}),f}}var mb=null;function _Z(e){return mb||(mb=new SZ({storage:e.storage,sessionFactory:e.sessionFactory})),mb}function so(){const e=new Bc;return{add:t=>e.add(typeof t=="function"?t:()=>t.dispose()),dispose:()=>e.unsubscribe()}}function fQ(e,t={}){const n=t.debounceMs??250,r=t.initialQuery??"",i=new es,a=i.pipe(eb(r)),s=i.pipe(eb(r),PB(n),NP(),MB(o=>{const c=o.trim();return c?e(c).pipe(Wa(d=>({results:d??[],isSearching:d===void 0})),eb({results:[],isSearching:!0})):jB({results:[],isSearching:!1})}));return{query$:a,state$:s,setQuery:o=>i.next(o),dispose:()=>i.complete()}}function wZ(e){const t=[],n=new yt(null);return t.push(e.bus.get("beckon:hover").subscribe(({annotationId:r})=>{n.next(r),r&&e.bus.get("beckon:sparkle").next({annotationId:r})})),t.push(e.bus.get("browse:click").subscribe(({annotationId:r})=>{e.bus.get("beckon:focus").next({annotationId:r})})),{hoveredAnnotationId$:n.asObservable(),hover:r=>e.bus.get("beckon:hover").next({annotationId:r}),focus:r=>e.bus.get("beckon:focus").next({annotationId:r}),sparkle:r=>e.bus.get("beckon:sparkle").next({annotationId:r}),dispose(){t.forEach(r=>r.unsubscribe()),n.complete()}}}var Fy=150;function WS(e,t){let n=null,r=null;const i=()=>{r!==null&&(clearTimeout(r),r=null)};return{handleMouseEnter:o=>{n!==o&&(i(),r=setTimeout(()=>{r=null,n=o,e(o)},t))},handleMouseLeave:()=>{i(),n!==null&&(n=null,e(null))},cleanup:i}}function kZ(e,t){const n=[],r=new yt(null),i=new yt(!1),a=new yt(null),s=new yt(null);return n.push(e.bus.get("gather:requested").subscribe(o=>{var d;i.next(!0),a.next(null),r.next(null),s.next(Gn(o.annotationId));const c=e.gather.annotation(t,Gn(o.annotationId),{contextWindow:((d=o.options)==null?void 0:d.contextWindow)??2e3}).pipe(xf(6e4)).subscribe({next:f=>{"response"in f&&f.response&&(r.next(f.response.context??null),i.next(!1))},error:f=>{a.next(f instanceof Error?f:new Error(String(f))),i.next(!1)},complete:()=>{i.next(!1)}});n.push(c)})),{context$:r.asObservable(),loading$:i.asObservable(),error$:a.asObservable(),annotationId$:s.asObservable(),dispose(){n.forEach(o=>o.unsubscribe()),r.complete(),i.complete(),a.complete(),s.complete()}}}function jZ(e,t){const n=[];return n.push(e.bus.get("match:search-requested").subscribe(r=>{const i=e.match.search(Sr(r.resourceId),Gn(r.referenceId),r.context,{limit:r.limit,useSemanticScoring:r.useSemanticScoring}).pipe(xf(6e4)).subscribe({next:a=>e.bus.get("match:search-results").next(a),error:a=>e.bus.get("match:search-failed").next({correlationId:r.correlationId,referenceId:r.referenceId,error:a instanceof Error?a.message:String(a)})});n.push(i)})),{dispose(){n.forEach(r=>r.unsubscribe())}}}function TZ(e,t,n){const r=[],i=new yt(!1),a=new yt(null);let s=null;const o=(c,d)=>{const f=e.yield.fromAnnotation(Sr(t),Gn(c),{...d,language:d.language||n}).pipe(xf({each:3e5})).subscribe({next:m=>{m.kind==="progress"&&(a.next(m.data),i.next(!0))},complete:()=>{i.next(!1),s&&clearTimeout(s),s=setTimeout(()=>{a.next(null),s=null},2e3)},error:()=>{a.next(null),i.next(!1)}});r.push(f)};return{isGenerating$:i.asObservable(),progress$:a.asObservable(),generate:o,dispose(){r.forEach(c=>c.unsubscribe()),s&&clearTimeout(s),i.complete(),a.complete()}}}function bm(e){if(e.svgSelector)return{type:"SvgSelector",value:e.svgSelector};if(e.fragmentSelector){const t=[{type:"FragmentSelector",value:e.fragmentSelector,...e.conformsTo&&{conformsTo:e.conformsTo}}];return e.exact&&t.push({type:"TextQuoteSelector",exact:e.exact,...e.prefix&&{prefix:e.prefix},...e.suffix&&{suffix:e.suffix}}),t}return{type:"TextQuoteSelector",exact:e.exact,...e.prefix&&{prefix:e.prefix},...e.suffix&&{suffix:e.suffix}}}function EZ(e,t){const n=[],r=new yt(null),i=new yt(null),a=new yt(null);let s=null;const o=()=>{s&&(clearTimeout(s),s=null)},c=d=>{r.next(d)};return n.push(e.bus.get("mark:requested").subscribe(c)),n.push(e.bus.get("mark:select-comment").subscribe(d=>c({selector:bm(d),motivation:"commenting"}))),n.push(e.bus.get("mark:select-tag").subscribe(d=>c({selector:bm(d),motivation:"tagging"}))),n.push(e.bus.get("mark:select-assessment").subscribe(d=>c({selector:bm(d),motivation:"assessing"}))),n.push(e.bus.get("mark:select-reference").subscribe(d=>c({selector:bm(d),motivation:"linking"}))),n.push(e.bus.get("mark:cancel-pending").subscribe(()=>r.next(null))),n.push(e.bus.get("mark:create-ok").subscribe(()=>r.next(null))),n.push(e.bus.get("mark:submit").subscribe(async d=>{try{const f=await e.mark.annotation({motivation:d.motivation,target:{source:t,selector:d.selector},body:d.body});e.bus.get("mark:create-ok").next({annotationId:f.annotationId})}catch(f){e.bus.get("mark:create-failed").next({message:f instanceof Error?f.message:String(f)})}})),n.push(e.bus.get("mark:delete").subscribe(async d=>{try{await e.mark.delete(t,d.annotationId),e.bus.get("mark:delete-ok").next({annotationId:d.annotationId})}catch(f){e.bus.get("mark:delete-failed").next({message:f instanceof Error?f.message:String(f)})}})),n.push(e.bus.get("mark:assist-request").subscribe(d=>{o(),i.next(d.motivation),a.next(null);const f=e.mark.assist(t,d.motivation,d.options).pipe(xf({each:18e4})).subscribe({next:m=>{m.kind==="progress"&&a.next(m.data)},complete:()=>{i.next(null),o(),s=setTimeout(()=>{a.next(null),s=null},5e3)},error:()=>{o(),i.next(null),a.next(null)}});n.push(f)})),n.push(e.bus.get("mark:progress-dismiss").subscribe(()=>{o(),a.next(null)})),{pendingAnnotation$:r.asObservable(),assistingMotivation$:i.asObservable(),progress$:a.asObservable(),dispose(){n.forEach(d=>d.unsubscribe()),o(),r.complete(),i.complete(),a.complete()}}}var Mt=V({"../../node_modules/rxjs/dist/cjs/internal/util/isFunction.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0;function t(n){return typeof n=="function"}e.isFunction=t}}),cl=V({"../../node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorClass=void 0;function t(n){var r=function(a){Error.call(a),a.stack=new Error().stack},i=n(r);return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}e.createErrorClass=t}}),hQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UnsubscriptionError=void 0;var t=cl();e.UnsubscriptionError=t.createErrorClass(function(n){return function(i){n(this),this.message=i?i.length+` errors occurred during unsubscription:
39
- `+i.map(function(a,s){return s+1+") "+a.toString()}).join(`
40
- `):"",this.name="UnsubscriptionError",this.errors=i}})}}),oo=V({"../../node_modules/rxjs/dist/cjs/internal/util/arrRemove.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.arrRemove=void 0;function t(n,r){if(n){var i=n.indexOf(r);0<=i&&n.splice(i,1)}}e.arrRemove=t}}),gi=V({"../../node_modules/rxjs/dist/cjs/internal/Subscription.js"(e){var t=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],v=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&v>=f.length&&(f=void 0),{value:f&&f[v++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},n=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var v=p.call(f),b,S=[],x;try{for(;(m===void 0||m-- >0)&&!(b=v.next()).done;)S.push(b.value)}catch(w){x={error:w}}finally{try{b&&!b.done&&(p=v.return)&&p.call(v)}finally{if(x)throw x.error}}return S},r=e&&e.__spreadArray||function(f,m){for(var p=0,v=m.length,b=f.length;p<v;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.isSubscription=e.EMPTY_SUBSCRIPTION=e.Subscription=void 0;var i=Mt(),a=hQ(),s=oo(),o=(function(){function f(m){this.initialTeardown=m,this.closed=!1,this._parentage=null,this._finalizers=null}return f.prototype.unsubscribe=function(){var m,p,v,b,S;if(!this.closed){this.closed=!0;var x=this._parentage;if(x)if(this._parentage=null,Array.isArray(x))try{for(var w=t(x),j=w.next();!j.done;j=w.next()){var T=j.value;T.remove(this)}}catch(L){m={error:L}}finally{try{j&&!j.done&&(p=w.return)&&p.call(w)}finally{if(m)throw m.error}}else x.remove(this);var A=this.initialTeardown;if(i.isFunction(A))try{A()}catch(L){S=L instanceof a.UnsubscriptionError?L.errors:[L]}var Q=this._finalizers;if(Q){this._finalizers=null;try{for(var C=t(Q),R=C.next();!R.done;R=C.next()){var D=R.value;try{d(D)}catch(L){S=S??[],L instanceof a.UnsubscriptionError?S=r(r([],n(S)),n(L.errors)):S.push(L)}}}catch(L){v={error:L}}finally{try{R&&!R.done&&(b=C.return)&&b.call(C)}finally{if(v)throw v.error}}}if(S)throw new a.UnsubscriptionError(S)}},f.prototype.add=function(m){var p;if(m&&m!==this)if(this.closed)d(m);else{if(m instanceof f){if(m.closed||m._hasParent(this))return;m._addParent(this)}(this._finalizers=(p=this._finalizers)!==null&&p!==void 0?p:[]).push(m)}},f.prototype._hasParent=function(m){var p=this._parentage;return p===m||Array.isArray(p)&&p.includes(m)},f.prototype._addParent=function(m){var p=this._parentage;this._parentage=Array.isArray(p)?(p.push(m),p):p?[p,m]:m},f.prototype._removeParent=function(m){var p=this._parentage;p===m?this._parentage=null:Array.isArray(p)&&s.arrRemove(p,m)},f.prototype.remove=function(m){var p=this._finalizers;p&&s.arrRemove(p,m),m instanceof f&&m._removeParent(this)},f.EMPTY=(function(){var m=new f;return m.closed=!0,m})(),f})();e.Subscription=o,e.EMPTY_SUBSCRIPTION=o.EMPTY;function c(f){return f instanceof o||f&&"closed"in f&&i.isFunction(f.remove)&&i.isFunction(f.add)&&i.isFunction(f.unsubscribe)}e.isSubscription=c;function d(f){i.isFunction(f)?f():f.unsubscribe()}}}),Tf=V({"../../node_modules/rxjs/dist/cjs/internal/config.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.config=void 0,e.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}}}),mQ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js"(e){var t=e&&e.__read||function(r,i){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var s=a.call(r),o,c=[],d;try{for(;(i===void 0||i-- >0)&&!(o=s.next()).done;)c.push(o.value)}catch(f){d={error:f}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(d)throw d.error}}return c},n=e&&e.__spreadArray||function(r,i){for(var a=0,s=i.length,o=r.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutProvider=void 0,e.timeoutProvider={setTimeout:function(r,i){for(var a=[],s=2;s<arguments.length;s++)a[s-2]=arguments[s];var o=e.timeoutProvider.delegate;return o!=null&&o.setTimeout?o.setTimeout.apply(o,n([r,i],t(a))):setTimeout.apply(void 0,n([r,i],t(a)))},clearTimeout:function(r){var i=e.timeoutProvider.delegate;return((i==null?void 0:i.clearTimeout)||clearTimeout)(r)},delegate:void 0}}}),pQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportUnhandledError=void 0;var t=Tf(),n=mQ();function r(i){n.timeoutProvider.setTimeout(function(){var a=t.config.onUnhandledError;if(a)a(i);else throw i})}e.reportUnhandledError=r}}),Jn=V({"../../node_modules/rxjs/dist/cjs/internal/util/noop.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.noop=void 0;function t(){}e.noop=t}}),CZ=V({"../../node_modules/rxjs/dist/cjs/internal/NotificationFactories.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createNotification=e.nextNotification=e.errorNotification=e.COMPLETE_NOTIFICATION=void 0,e.COMPLETE_NOTIFICATION=(function(){return r("C",void 0,void 0)})();function t(i){return r("E",void 0,i)}e.errorNotification=t;function n(i){return r("N",i,void 0)}e.nextNotification=n;function r(i,a,s){return{kind:i,value:a,error:s}}e.createNotification=r}}),HS=V({"../../node_modules/rxjs/dist/cjs/internal/util/errorContext.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.captureError=e.errorContext=void 0;var t=Tf(),n=null;function r(a){if(t.config.useDeprecatedSynchronousErrorHandling){var s=!n;if(s&&(n={errorThrown:!1,error:null}),a(),s){var o=n,c=o.errorThrown,d=o.error;if(n=null,c)throw d}}else a()}e.errorContext=r;function i(a){t.config.useDeprecatedSynchronousErrorHandling&&n&&(n.errorThrown=!0,n.error=a)}e.captureError=i}}),Ef=V({"../../node_modules/rxjs/dist/cjs/internal/Subscriber.js"(e){var t=e&&e.__extends||(function(){var j=function(T,A){return j=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Q,C){Q.__proto__=C}||function(Q,C){for(var R in C)Object.prototype.hasOwnProperty.call(C,R)&&(Q[R]=C[R])},j(T,A)};return function(T,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");j(T,A);function Q(){this.constructor=T}T.prototype=A===null?Object.create(A):(Q.prototype=A.prototype,new Q)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_OBSERVER=e.SafeSubscriber=e.Subscriber=void 0;var n=Mt(),r=gi(),i=Tf(),a=pQ(),s=Jn(),o=CZ(),c=mQ(),d=HS(),f=(function(j){t(T,j);function T(A){var Q=j.call(this)||this;return Q.isStopped=!1,A?(Q.destination=A,r.isSubscription(A)&&A.add(Q)):Q.destination=e.EMPTY_OBSERVER,Q}return T.create=function(A,Q,C){return new b(A,Q,C)},T.prototype.next=function(A){this.isStopped?w(o.nextNotification(A),this):this._next(A)},T.prototype.error=function(A){this.isStopped?w(o.errorNotification(A),this):(this.isStopped=!0,this._error(A))},T.prototype.complete=function(){this.isStopped?w(o.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},T.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,j.prototype.unsubscribe.call(this),this.destination=null)},T.prototype._next=function(A){this.destination.next(A)},T.prototype._error=function(A){try{this.destination.error(A)}finally{this.unsubscribe()}},T.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},T})(r.Subscription);e.Subscriber=f;var m=Function.prototype.bind;function p(j,T){return m.call(j,T)}var v=(function(){function j(T){this.partialObserver=T}return j.prototype.next=function(T){var A=this.partialObserver;if(A.next)try{A.next(T)}catch(Q){S(Q)}},j.prototype.error=function(T){var A=this.partialObserver;if(A.error)try{A.error(T)}catch(Q){S(Q)}else S(T)},j.prototype.complete=function(){var T=this.partialObserver;if(T.complete)try{T.complete()}catch(A){S(A)}},j})(),b=(function(j){t(T,j);function T(A,Q,C){var R=j.call(this)||this,D;if(n.isFunction(A)||!A)D={next:A??void 0,error:Q??void 0,complete:C??void 0};else{var L;R&&i.config.useDeprecatedNextContext?(L=Object.create(A),L.unsubscribe=function(){return R.unsubscribe()},D={next:A.next&&p(A.next,L),error:A.error&&p(A.error,L),complete:A.complete&&p(A.complete,L)}):D=A}return R.destination=new v(D),R}return T})(f);e.SafeSubscriber=b;function S(j){i.config.useDeprecatedSynchronousErrorHandling?d.captureError(j):a.reportUnhandledError(j)}function x(j){throw j}function w(j,T){var A=i.config.onStoppedNotification;A&&c.timeoutProvider.setTimeout(function(){return A(j,T)})}e.EMPTY_OBSERVER={closed:!0,next:s.noop,error:x,complete:s.noop}}}),lg=V({"../../node_modules/rxjs/dist/cjs/internal/symbol/observable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observable=void 0,e.observable=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})()}}),er=V({"../../node_modules/rxjs/dist/cjs/internal/util/identity.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.identity=void 0;function t(n){return n}e.identity=t}}),cg=V({"../../node_modules/rxjs/dist/cjs/internal/util/pipe.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pipeFromArray=e.pipe=void 0;var t=er();function n(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];return r(i)}e.pipe=n;function r(i){return i.length===0?t.identity:i.length===1?i[0]:function(s){return i.reduce(function(o,c){return c(o)},s)}}e.pipeFromArray=r}}),Xt=V({"../../node_modules/rxjs/dist/cjs/internal/Observable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Observable=void 0;var t=Ef(),n=gi(),r=lg(),i=cg(),a=Tf(),s=Mt(),o=HS(),c=(function(){function p(v){v&&(this._subscribe=v)}return p.prototype.lift=function(v){var b=new p;return b.source=this,b.operator=v,b},p.prototype.subscribe=function(v,b,S){var x=this,w=m(v)?v:new t.SafeSubscriber(v,b,S);return o.errorContext(function(){var j=x,T=j.operator,A=j.source;w.add(T?T.call(w,A):A?x._subscribe(w):x._trySubscribe(w))}),w},p.prototype._trySubscribe=function(v){try{return this._subscribe(v)}catch(b){v.error(b)}},p.prototype.forEach=function(v,b){var S=this;return b=d(b),new b(function(x,w){var j=new t.SafeSubscriber({next:function(T){try{v(T)}catch(A){w(A),j.unsubscribe()}},error:w,complete:x});S.subscribe(j)})},p.prototype._subscribe=function(v){var b;return(b=this.source)===null||b===void 0?void 0:b.subscribe(v)},p.prototype[r.observable]=function(){return this},p.prototype.pipe=function(){for(var v=[],b=0;b<arguments.length;b++)v[b]=arguments[b];return i.pipeFromArray(v)(this)},p.prototype.toPromise=function(v){var b=this;return v=d(v),new v(function(S,x){var w;b.subscribe(function(j){return w=j},function(j){return x(j)},function(){return S(w)})})},p.create=function(v){return new p(v)},p})();e.Observable=c;function d(p){var v;return(v=p??a.config.Promise)!==null&&v!==void 0?v:Promise}function f(p){return p&&s.isFunction(p.next)&&s.isFunction(p.error)&&s.isFunction(p.complete)}function m(p){return p&&p instanceof t.Subscriber||f(p)&&n.isSubscription(p)}}}),ye=V({"../../node_modules/rxjs/dist/cjs/internal/util/lift.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.operate=e.hasLift=void 0;var t=Mt();function n(i){return t.isFunction(i==null?void 0:i.lift)}e.hasLift=n;function r(i){return function(a){if(n(a))return a.lift(function(s){try{return i(s,this)}catch(o){this.error(o)}});throw new TypeError("Unable to lift unknown Observable type")}}e.operate=r}}),Re=V({"../../node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js"(e){var t=e&&e.__extends||(function(){var a=function(s,o){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},a(s,o)};return function(s,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");a(s,o);function c(){this.constructor=s}s.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.OperatorSubscriber=e.createOperatorSubscriber=void 0;var n=Ef();function r(a,s,o,c,d){return new i(a,s,o,c,d)}e.createOperatorSubscriber=r;var i=(function(a){t(s,a);function s(o,c,d,f,m,p){var v=a.call(this,o)||this;return v.onFinalize=m,v.shouldUnsubscribe=p,v._next=c?function(b){try{c(b)}catch(S){o.error(S)}}:a.prototype._next,v._error=f?function(b){try{f(b)}catch(S){o.error(S)}finally{this.unsubscribe()}}:a.prototype._error,v._complete=d?function(){try{d()}catch(b){o.error(b)}finally{this.unsubscribe()}}:a.prototype._complete,v}return s.prototype.unsubscribe=function(){var o;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var c=this.closed;a.prototype.unsubscribe.call(this),!c&&((o=this.onFinalize)===null||o===void 0||o.call(this))}},s})(n.Subscriber);e.OperatorSubscriber=i}}),GS=V({"../../node_modules/rxjs/dist/cjs/internal/operators/refCount.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.refCount=void 0;var t=ye(),n=Re();function r(){return t.operate(function(i,a){var s=null;i._refCount++;var o=n.createOperatorSubscriber(a,void 0,void 0,void 0,function(){if(!i||i._refCount<=0||0<--i._refCount){s=null;return}var c=i._connection,d=s;s=null,c&&(!d||c===d)&&c.unsubscribe(),a.unsubscribe()});i.subscribe(o),o.closed||(s=i.connect())})}e.refCount=r}}),ug=V({"../../node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js"(e){var t=e&&e.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,p){m.__proto__=p}||function(m,p){for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&(m[v]=p[v])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function m(){this.constructor=d}d.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectableObservable=void 0;var n=Xt(),r=gi(),i=GS(),a=Re(),s=ye(),o=(function(c){t(d,c);function d(f,m){var p=c.call(this)||this;return p.source=f,p.subjectFactory=m,p._subject=null,p._refCount=0,p._connection=null,s.hasLift(f)&&(p.lift=f.lift),p}return d.prototype._subscribe=function(f){return this.getSubject().subscribe(f)},d.prototype.getSubject=function(){var f=this._subject;return(!f||f.isStopped)&&(this._subject=this.subjectFactory()),this._subject},d.prototype._teardown=function(){this._refCount=0;var f=this._connection;this._subject=this._connection=null,f==null||f.unsubscribe()},d.prototype.connect=function(){var f=this,m=this._connection;if(!m){m=this._connection=new r.Subscription;var p=this.getSubject();m.add(this.source.subscribe(a.createOperatorSubscriber(p,void 0,function(){f._teardown(),p.complete()},function(v){f._teardown(),p.error(v)},function(){return f._teardown()}))),m.closed&&(this._connection=null,m=r.Subscription.EMPTY)}return m},d.prototype.refCount=function(){return i.refCount()(this)},d})(n.Observable);e.ConnectableObservable=o}}),AZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.performanceTimestampProvider=void 0,e.performanceTimestampProvider={now:function(){return(e.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}}}),gQ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js"(e){var t=e&&e.__read||function(i,a){var s=typeof Symbol=="function"&&i[Symbol.iterator];if(!s)return i;var o=s.call(i),c,d=[],f;try{for(;(a===void 0||a-- >0)&&!(c=o.next()).done;)d.push(c.value)}catch(m){f={error:m}}finally{try{c&&!c.done&&(s=o.return)&&s.call(o)}finally{if(f)throw f.error}}return d},n=e&&e.__spreadArray||function(i,a){for(var s=0,o=a.length,c=i.length;s<o;s++,c++)i[c]=a[s];return i};Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrameProvider=void 0;var r=gi();e.animationFrameProvider={schedule:function(i){var a=requestAnimationFrame,s=cancelAnimationFrame,o=e.animationFrameProvider.delegate;o&&(a=o.requestAnimationFrame,s=o.cancelAnimationFrame);var c=a(function(d){s=void 0,i(d)});return new r.Subscription(function(){return s==null?void 0:s(c)})},requestAnimationFrame:function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=e.animationFrameProvider.delegate;return((s==null?void 0:s.requestAnimationFrame)||requestAnimationFrame).apply(void 0,n([],t(i)))},cancelAnimationFrame:function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=e.animationFrameProvider.delegate;return((s==null?void 0:s.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,n([],t(i)))},delegate:void 0}}}),PZ=V({"../../node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrames=void 0;var t=Xt(),n=AZ(),r=gQ();function i(o){return o?a(o):s}e.animationFrames=i;function a(o){return new t.Observable(function(c){var d=o||n.performanceTimestampProvider,f=d.now(),m=0,p=function(){c.closed||(m=r.animationFrameProvider.requestAnimationFrame(function(v){m=0;var b=d.now();c.next({timestamp:o?b:v,elapsed:b-f}),p()}))};return p(),function(){m&&r.animationFrameProvider.cancelAnimationFrame(m)}})}var s=a()}}),vQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectUnsubscribedError=void 0;var t=cl();e.ObjectUnsubscribedError=t.createErrorClass(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})}}),tr=V({"../../node_modules/rxjs/dist/cjs/internal/Subject.js"(e){var t=e&&e.__extends||(function(){var f=function(m,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(v[S]=b[S])},f(m,p)};return function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(m,p);function v(){this.constructor=m}m.prototype=p===null?Object.create(p):(v.prototype=p.prototype,new v)}})(),n=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],v=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&v>=f.length&&(f=void 0),{value:f&&f[v++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AnonymousSubject=e.Subject=void 0;var r=Xt(),i=gi(),a=vQ(),s=oo(),o=HS(),c=(function(f){t(m,f);function m(){var p=f.call(this)||this;return p.closed=!1,p.currentObservers=null,p.observers=[],p.isStopped=!1,p.hasError=!1,p.thrownError=null,p}return m.prototype.lift=function(p){var v=new d(this,this);return v.operator=p,v},m.prototype._throwIfClosed=function(){if(this.closed)throw new a.ObjectUnsubscribedError},m.prototype.next=function(p){var v=this;o.errorContext(function(){var b,S;if(v._throwIfClosed(),!v.isStopped){v.currentObservers||(v.currentObservers=Array.from(v.observers));try{for(var x=n(v.currentObservers),w=x.next();!w.done;w=x.next()){var j=w.value;j.next(p)}}catch(T){b={error:T}}finally{try{w&&!w.done&&(S=x.return)&&S.call(x)}finally{if(b)throw b.error}}}})},m.prototype.error=function(p){var v=this;o.errorContext(function(){if(v._throwIfClosed(),!v.isStopped){v.hasError=v.isStopped=!0,v.thrownError=p;for(var b=v.observers;b.length;)b.shift().error(p)}})},m.prototype.complete=function(){var p=this;o.errorContext(function(){if(p._throwIfClosed(),!p.isStopped){p.isStopped=!0;for(var v=p.observers;v.length;)v.shift().complete()}})},m.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(m.prototype,"observed",{get:function(){var p;return((p=this.observers)===null||p===void 0?void 0:p.length)>0},enumerable:!1,configurable:!0}),m.prototype._trySubscribe=function(p){return this._throwIfClosed(),f.prototype._trySubscribe.call(this,p)},m.prototype._subscribe=function(p){return this._throwIfClosed(),this._checkFinalizedStatuses(p),this._innerSubscribe(p)},m.prototype._innerSubscribe=function(p){var v=this,b=this,S=b.hasError,x=b.isStopped,w=b.observers;return S||x?i.EMPTY_SUBSCRIPTION:(this.currentObservers=null,w.push(p),new i.Subscription(function(){v.currentObservers=null,s.arrRemove(w,p)}))},m.prototype._checkFinalizedStatuses=function(p){var v=this,b=v.hasError,S=v.thrownError,x=v.isStopped;b?p.error(S):x&&p.complete()},m.prototype.asObservable=function(){var p=new r.Observable;return p.source=this,p},m.create=function(p,v){return new d(p,v)},m})(r.Observable);e.Subject=c;var d=(function(f){t(m,f);function m(p,v){var b=f.call(this)||this;return b.destination=p,b.source=v,b}return m.prototype.next=function(p){var v,b;(b=(v=this.destination)===null||v===void 0?void 0:v.next)===null||b===void 0||b.call(v,p)},m.prototype.error=function(p){var v,b;(b=(v=this.destination)===null||v===void 0?void 0:v.error)===null||b===void 0||b.call(v,p)},m.prototype.complete=function(){var p,v;(v=(p=this.destination)===null||p===void 0?void 0:p.complete)===null||v===void 0||v.call(p)},m.prototype._subscribe=function(p){var v,b;return(b=(v=this.source)===null||v===void 0?void 0:v.subscribe(p))!==null&&b!==void 0?b:i.EMPTY_SUBSCRIPTION},m})(c);e.AnonymousSubject=d}}),OQ=V({"../../node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(o[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function o(){this.constructor=a}a.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.BehaviorSubject=void 0;var n=tr(),r=(function(i){t(a,i);function a(s){var o=i.call(this)||this;return o._value=s,o}return Object.defineProperty(a.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),a.prototype._subscribe=function(s){var o=i.prototype._subscribe.call(this,s);return!o.closed&&s.next(this._value),o},a.prototype.getValue=function(){var s=this,o=s.hasError,c=s.thrownError,d=s._value;if(o)throw c;return this._throwIfClosed(),d},a.prototype.next=function(s){i.prototype.next.call(this,this._value=s)},a})(n.Subject);e.BehaviorSubject=r}}),KS=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}}}),JS=V({"../../node_modules/rxjs/dist/cjs/internal/ReplaySubject.js"(e){var t=e&&e.__extends||(function(){var a=function(s,o){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},a(s,o)};return function(s,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");a(s,o);function c(){this.constructor=s}s.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaySubject=void 0;var n=tr(),r=KS(),i=(function(a){t(s,a);function s(o,c,d){o===void 0&&(o=1/0),c===void 0&&(c=1/0),d===void 0&&(d=r.dateTimestampProvider);var f=a.call(this)||this;return f._bufferSize=o,f._windowTime=c,f._timestampProvider=d,f._buffer=[],f._infiniteTimeWindow=!0,f._infiniteTimeWindow=c===1/0,f._bufferSize=Math.max(1,o),f._windowTime=Math.max(1,c),f}return s.prototype.next=function(o){var c=this,d=c.isStopped,f=c._buffer,m=c._infiniteTimeWindow,p=c._timestampProvider,v=c._windowTime;d||(f.push(o),!m&&f.push(p.now()+v)),this._trimBuffer(),a.prototype.next.call(this,o)},s.prototype._subscribe=function(o){this._throwIfClosed(),this._trimBuffer();for(var c=this._innerSubscribe(o),d=this,f=d._infiniteTimeWindow,m=d._buffer,p=m.slice(),v=0;v<p.length&&!o.closed;v+=f?1:2)o.next(p[v]);return this._checkFinalizedStatuses(o),c},s.prototype._trimBuffer=function(){var o=this,c=o._bufferSize,d=o._timestampProvider,f=o._buffer,m=o._infiniteTimeWindow,p=(m?1:2)*c;if(c<1/0&&p<f.length&&f.splice(0,f.length-p),!m){for(var v=d.now(),b=0,S=1;S<f.length&&f[S]<=v;S+=2)b=S;b&&f.splice(0,b+1)}},s})(n.Subject);e.ReplaySubject=i}}),ex=V({"../../node_modules/rxjs/dist/cjs/internal/AsyncSubject.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(o[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function o(){this.constructor=a}a.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncSubject=void 0;var n=tr(),r=(function(i){t(a,i);function a(){var s=i!==null&&i.apply(this,arguments)||this;return s._value=null,s._hasValue=!1,s._isComplete=!1,s}return a.prototype._checkFinalizedStatuses=function(s){var o=this,c=o.hasError,d=o._hasValue,f=o._value,m=o.thrownError,p=o.isStopped,v=o._isComplete;c?s.error(m):(p||v)&&(d&&s.next(f),s.complete())},a.prototype.next=function(s){this.isStopped||(this._value=s,this._hasValue=!0)},a.prototype.complete=function(){var s=this,o=s._hasValue,c=s._value,d=s._isComplete;d||(this._isComplete=!0,o&&i.prototype.next.call(this,c),i.prototype.complete.call(this))},a})(n.Subject);e.AsyncSubject=r}}),QZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/Action.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(o[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function o(){this.constructor=a}a.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.Action=void 0;var n=gi(),r=(function(i){t(a,i);function a(s,o){return i.call(this)||this}return a.prototype.schedule=function(s,o){return this},a})(n.Subscription);e.Action=r}}),NZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js"(e){var t=e&&e.__read||function(r,i){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var s=a.call(r),o,c=[],d;try{for(;(i===void 0||i-- >0)&&!(o=s.next()).done;)c.push(o.value)}catch(f){d={error:f}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(d)throw d.error}}return c},n=e&&e.__spreadArray||function(r,i){for(var a=0,s=i.length,o=r.length;a<s;a++,o++)r[o]=i[a];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.intervalProvider=void 0,e.intervalProvider={setInterval:function(r,i){for(var a=[],s=2;s<arguments.length;s++)a[s-2]=arguments[s];var o=e.intervalProvider.delegate;return o!=null&&o.setInterval?o.setInterval.apply(o,n([r,i],t(a))):setInterval.apply(void 0,n([r,i],t(a)))},clearInterval:function(r){var i=e.intervalProvider.delegate;return((i==null?void 0:i.clearInterval)||clearInterval)(r)},delegate:void 0}}}),Cf=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js"(e){var t=e&&e.__extends||(function(){var s=function(o,c){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(d[m]=f[m])},s(o,c)};return function(o,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");s(o,c);function d(){this.constructor=o}o.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncAction=void 0;var n=QZ(),r=NZ(),i=oo(),a=(function(s){t(o,s);function o(c,d){var f=s.call(this,c,d)||this;return f.scheduler=c,f.work=d,f.pending=!1,f}return o.prototype.schedule=function(c,d){var f;if(d===void 0&&(d=0),this.closed)return this;this.state=c;var m=this.id,p=this.scheduler;return m!=null&&(this.id=this.recycleAsyncId(p,m,d)),this.pending=!0,this.delay=d,this.id=(f=this.id)!==null&&f!==void 0?f:this.requestAsyncId(p,this.id,d),this},o.prototype.requestAsyncId=function(c,d,f){return f===void 0&&(f=0),r.intervalProvider.setInterval(c.flush.bind(c,this),f)},o.prototype.recycleAsyncId=function(c,d,f){if(f===void 0&&(f=0),f!=null&&this.delay===f&&this.pending===!1)return d;d!=null&&r.intervalProvider.clearInterval(d)},o.prototype.execute=function(c,d){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var f=this._execute(c,d);if(f)return f;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},o.prototype._execute=function(c,d){var f=!1,m;try{this.work(c)}catch(p){f=!0,m=p||new Error("Scheduled action threw falsy error")}if(f)return this.unsubscribe(),m},o.prototype.unsubscribe=function(){if(!this.closed){var c=this,d=c.id,f=c.scheduler,m=f.actions;this.work=this.state=this.scheduler=null,this.pending=!1,i.arrRemove(m,this),d!=null&&(this.id=this.recycleAsyncId(f,d,null)),this.delay=null,s.prototype.unsubscribe.call(this)}},o})(n.Action);e.AsyncAction=a}}),RZ=V({"../../node_modules/rxjs/dist/cjs/internal/util/Immediate.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TestTools=e.Immediate=void 0;var t=1,n,r={};function i(a){return a in r?(delete r[a],!0):!1}e.Immediate={setImmediate:function(a){var s=t++;return r[s]=!0,n||(n=Promise.resolve()),n.then(function(){return i(s)&&a()}),s},clearImmediate:function(a){i(a)}},e.TestTools={pending:function(){return Object.keys(r).length}}}}),MZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js"(e){var t=e&&e.__read||function(s,o){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(o===void 0||o-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(v){p={error:v}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,o){for(var c=0,d=o.length,f=s.length;c<d;c++,f++)s[f]=o[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.immediateProvider=void 0;var r=RZ(),i=r.Immediate.setImmediate,a=r.Immediate.clearImmediate;e.immediateProvider={setImmediate:function(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var c=e.immediateProvider.delegate;return((c==null?void 0:c.setImmediate)||i).apply(void 0,n([],t(s)))},clearImmediate:function(s){var o=e.immediateProvider.delegate;return((o==null?void 0:o.clearImmediate)||a)(s)},delegate:void 0}}}),LZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js"(e){var t=e&&e.__extends||(function(){var a=function(s,o){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},a(s,o)};return function(s,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");a(s,o);function c(){this.constructor=s}s.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsapAction=void 0;var n=Cf(),r=MZ(),i=(function(a){t(s,a);function s(o,c){var d=a.call(this,o,c)||this;return d.scheduler=o,d.work=c,d}return s.prototype.requestAsyncId=function(o,c,d){return d===void 0&&(d=0),d!==null&&d>0?a.prototype.requestAsyncId.call(this,o,c,d):(o.actions.push(this),o._scheduled||(o._scheduled=r.immediateProvider.setImmediate(o.flush.bind(o,void 0))))},s.prototype.recycleAsyncId=function(o,c,d){var f;if(d===void 0&&(d=0),d!=null?d>0:this.delay>0)return a.prototype.recycleAsyncId.call(this,o,c,d);var m=o.actions;c!=null&&((f=m[m.length-1])===null||f===void 0?void 0:f.id)!==c&&(r.immediateProvider.clearImmediate(c),o._scheduled===c&&(o._scheduled=void 0))},s})(n.AsyncAction);e.AsapAction=i}}),bQ=V({"../../node_modules/rxjs/dist/cjs/internal/Scheduler.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scheduler=void 0;var t=KS(),n=(function(){function r(i,a){a===void 0&&(a=r.now),this.schedulerActionCtor=i,this.now=a}return r.prototype.schedule=function(i,a,s){return a===void 0&&(a=0),new this.schedulerActionCtor(this,i).schedule(s,a)},r.now=t.dateTimestampProvider.now,r})();e.Scheduler=n}}),Af=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(o[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function o(){this.constructor=a}a.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncScheduler=void 0;var n=bQ(),r=(function(i){t(a,i);function a(s,o){o===void 0&&(o=n.Scheduler.now);var c=i.call(this,s,o)||this;return c.actions=[],c._active=!1,c}return a.prototype.flush=function(s){var o=this.actions;if(this._active){o.push(s);return}var c;this._active=!0;do if(c=s.execute(s.state,s.delay))break;while(s=o.shift());if(this._active=!1,c){for(;s=o.shift();)s.unsubscribe();throw c}},a})(n.Scheduler);e.AsyncScheduler=r}}),DZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(o[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function o(){this.constructor=a}a.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsapScheduler=void 0;var n=Af(),r=(function(i){t(a,i);function a(){return i!==null&&i.apply(this,arguments)||this}return a.prototype.flush=function(s){this._active=!0;var o=this._scheduled;this._scheduled=void 0;var c=this.actions,d;s=s||c.shift();do if(d=s.execute(s.state,s.delay))break;while((s=c[0])&&s.id===o&&c.shift());if(this._active=!1,d){for(;(s=c[0])&&s.id===o&&c.shift();)s.unsubscribe();throw d}},a})(n.AsyncScheduler);e.AsapScheduler=r}}),zZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/asap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.asap=e.asapScheduler=void 0;var t=LZ(),n=DZ();e.asapScheduler=new n.AsapScheduler(t.AsapAction),e.asap=e.asapScheduler}}),Vr=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/async.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.async=e.asyncScheduler=void 0;var t=Cf(),n=Af();e.asyncScheduler=new n.AsyncScheduler(t.AsyncAction),e.async=e.asyncScheduler}}),IZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(o[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function o(){this.constructor=a}a.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.QueueAction=void 0;var n=Cf(),r=(function(i){t(a,i);function a(s,o){var c=i.call(this,s,o)||this;return c.scheduler=s,c.work=o,c}return a.prototype.schedule=function(s,o){return o===void 0&&(o=0),o>0?i.prototype.schedule.call(this,s,o):(this.delay=o,this.state=s,this.scheduler.flush(this),this)},a.prototype.execute=function(s,o){return o>0||this.closed?i.prototype.execute.call(this,s,o):this._execute(s,o)},a.prototype.requestAsyncId=function(s,o,c){return c===void 0&&(c=0),c!=null&&c>0||c==null&&this.delay>0?i.prototype.requestAsyncId.call(this,s,o,c):(s.flush(this),0)},a})(n.AsyncAction);e.QueueAction=r}}),qZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(o[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function o(){this.constructor=a}a.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.QueueScheduler=void 0;var n=Af(),r=(function(i){t(a,i);function a(){return i!==null&&i.apply(this,arguments)||this}return a})(n.AsyncScheduler);e.QueueScheduler=r}}),BZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/queue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.queue=e.queueScheduler=void 0;var t=IZ(),n=qZ();e.queueScheduler=new n.QueueScheduler(t.QueueAction),e.queue=e.queueScheduler}}),XZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js"(e){var t=e&&e.__extends||(function(){var a=function(s,o){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},a(s,o)};return function(s,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");a(s,o);function c(){this.constructor=s}s.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrameAction=void 0;var n=Cf(),r=gQ(),i=(function(a){t(s,a);function s(o,c){var d=a.call(this,o,c)||this;return d.scheduler=o,d.work=c,d}return s.prototype.requestAsyncId=function(o,c,d){return d===void 0&&(d=0),d!==null&&d>0?a.prototype.requestAsyncId.call(this,o,c,d):(o.actions.push(this),o._scheduled||(o._scheduled=r.animationFrameProvider.requestAnimationFrame(function(){return o.flush(void 0)})))},s.prototype.recycleAsyncId=function(o,c,d){var f;if(d===void 0&&(d=0),d!=null?d>0:this.delay>0)return a.prototype.recycleAsyncId.call(this,o,c,d);var m=o.actions;c!=null&&c===o._scheduled&&((f=m[m.length-1])===null||f===void 0?void 0:f.id)!==c&&(r.animationFrameProvider.cancelAnimationFrame(c),o._scheduled=void 0)},s})(n.AsyncAction);e.AnimationFrameAction=i}}),ZZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js"(e){var t=e&&e.__extends||(function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(o[d]=c[d])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function o(){this.constructor=a}a.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrameScheduler=void 0;var n=Af(),r=(function(i){t(a,i);function a(){return i!==null&&i.apply(this,arguments)||this}return a.prototype.flush=function(s){this._active=!0;var o;s?o=s.id:(o=this._scheduled,this._scheduled=void 0);var c=this.actions,d;s=s||c.shift();do if(d=s.execute(s.state,s.delay))break;while((s=c[0])&&s.id===o&&c.shift());if(this._active=!1,d){for(;(s=c[0])&&s.id===o&&c.shift();)s.unsubscribe();throw d}},a})(n.AsyncScheduler);e.AnimationFrameScheduler=r}}),$Z=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrame=e.animationFrameScheduler=void 0;var t=XZ(),n=ZZ();e.animationFrameScheduler=new n.AnimationFrameScheduler(t.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler}}),VZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js"(e){var t=e&&e.__extends||(function(){var o=function(c,d){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var p in m)Object.prototype.hasOwnProperty.call(m,p)&&(f[p]=m[p])},o(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");o(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.VirtualAction=e.VirtualTimeScheduler=void 0;var n=Cf(),r=gi(),i=Af(),a=(function(o){t(c,o);function c(d,f){d===void 0&&(d=s),f===void 0&&(f=1/0);var m=o.call(this,d,function(){return m.frame})||this;return m.maxFrames=f,m.frame=0,m.index=-1,m}return c.prototype.flush=function(){for(var d=this,f=d.actions,m=d.maxFrames,p,v;(v=f[0])&&v.delay<=m&&(f.shift(),this.frame=v.delay,!(p=v.execute(v.state,v.delay))););if(p){for(;v=f.shift();)v.unsubscribe();throw p}},c.frameTimeFactor=10,c})(i.AsyncScheduler);e.VirtualTimeScheduler=a;var s=(function(o){t(c,o);function c(d,f,m){m===void 0&&(m=d.index+=1);var p=o.call(this,d,f)||this;return p.scheduler=d,p.work=f,p.index=m,p.active=!0,p.index=d.index=m,p}return c.prototype.schedule=function(d,f){if(f===void 0&&(f=0),Number.isFinite(f)){if(!this.id)return o.prototype.schedule.call(this,d,f);this.active=!1;var m=new c(this.scheduler,this.work);return this.add(m),m.schedule(d,f)}else return r.Subscription.EMPTY},c.prototype.requestAsyncId=function(d,f,m){m===void 0&&(m=0),this.delay=d.frame+m;var p=d.actions;return p.push(this),p.sort(c.sortActions),1},c.prototype.recycleAsyncId=function(d,f,m){},c.prototype._execute=function(d,f){if(this.active===!0)return o.prototype._execute.call(this,d,f)},c.sortActions=function(d,f){return d.delay===f.delay?d.index===f.index?0:d.index>f.index?1:-1:d.delay>f.delay?1:-1},c})(n.AsyncAction);e.VirtualAction=s}}),da=V({"../../node_modules/rxjs/dist/cjs/internal/observable/empty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.empty=e.EMPTY=void 0;var t=Xt();e.EMPTY=new t.Observable(function(i){return i.complete()});function n(i){return i?r(i):e.EMPTY}e.empty=n;function r(i){return new t.Observable(function(a){return i.schedule(function(){return a.complete()})})}}}),dg=V({"../../node_modules/rxjs/dist/cjs/internal/util/isScheduler.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isScheduler=void 0;var t=Mt();function n(r){return r&&t.isFunction(r.schedule)}e.isScheduler=n}}),Ur=V({"../../node_modules/rxjs/dist/cjs/internal/util/args.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.popNumber=e.popScheduler=e.popResultSelector=void 0;var t=Mt(),n=dg();function r(o){return o[o.length-1]}function i(o){return t.isFunction(r(o))?o.pop():void 0}e.popResultSelector=i;function a(o){return n.isScheduler(r(o))?o.pop():void 0}e.popScheduler=a;function s(o,c){return typeof r(o)=="number"?o.pop():c}e.popNumber=s}}),tx=V({"../../node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isArrayLike=void 0,e.isArrayLike=(function(t){return t&&typeof t.length=="number"&&typeof t!="function"})}}),yQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/isPromise.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isPromise=void 0;var t=Mt();function n(r){return t.isFunction(r==null?void 0:r.then)}e.isPromise=n}}),SQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isInteropObservable=void 0;var t=lg(),n=Mt();function r(i){return n.isFunction(i[t.observable])}e.isInteropObservable=r}}),xQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAsyncIterable=void 0;var t=Mt();function n(r){return Symbol.asyncIterator&&t.isFunction(r==null?void 0:r[Symbol.asyncIterator])}e.isAsyncIterable=n}}),_Q=V({"../../node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createInvalidObservableTypeError=void 0;function t(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}e.createInvalidObservableTypeError=t}}),wQ=V({"../../node_modules/rxjs/dist/cjs/internal/symbol/iterator.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.iterator=e.getSymbolIterator=void 0;function t(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}e.getSymbolIterator=t,e.iterator=t()}}),kQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/isIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIterable=void 0;var t=wQ(),n=Mt();function r(i){return n.isFunction(i==null?void 0:i[t.iterator])}e.isIterable=r}}),nx=V({"../../node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js"(e){var t=e&&e.__generator||function(o,c){var d={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},f,m,p,v;return v={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function b(x){return function(w){return S([x,w])}}function S(x){if(f)throw new TypeError("Generator is already executing.");for(;d;)try{if(f=1,m&&(p=x[0]&2?m.return:x[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,x[1])).done)return p;switch(m=0,p&&(x=[x[0]&2,p.value]),x[0]){case 0:case 1:p=x;break;case 4:return d.label++,{value:x[1],done:!1};case 5:d.label++,m=x[1],x=[0];continue;case 7:x=d.ops.pop(),d.trys.pop();continue;default:if(p=d.trys,!(p=p.length>0&&p[p.length-1])&&(x[0]===6||x[0]===2)){d=0;continue}if(x[0]===3&&(!p||x[1]>p[0]&&x[1]<p[3])){d.label=x[1];break}if(x[0]===6&&d.label<p[1]){d.label=p[1],p=x;break}if(p&&d.label<p[2]){d.label=p[2],d.ops.push(x);break}p[2]&&d.ops.pop(),d.trys.pop();continue}x=c.call(o,d)}catch(w){x=[6,w],m=0}finally{f=p=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}},n=e&&e.__await||function(o){return this instanceof n?(this.v=o,this):new n(o)},r=e&&e.__asyncGenerator||function(o,c,d){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var f=d.apply(o,c||[]),m,p=[];return m={},v("next"),v("throw"),v("return"),m[Symbol.asyncIterator]=function(){return this},m;function v(T){f[T]&&(m[T]=function(A){return new Promise(function(Q,C){p.push([T,A,Q,C])>1||b(T,A)})})}function b(T,A){try{S(f[T](A))}catch(Q){j(p[0][3],Q)}}function S(T){T.value instanceof n?Promise.resolve(T.value.v).then(x,w):j(p[0][2],T)}function x(T){b("next",T)}function w(T){b("throw",T)}function j(T,A){T(A),p.shift(),p.length&&b(p[0][0],p[0][1])}};Object.defineProperty(e,"__esModule",{value:!0}),e.isReadableStreamLike=e.readableStreamLikeToAsyncGenerator=void 0;var i=Mt();function a(o){return r(this,arguments,function(){var d,f,m,p;return t(this,function(v){switch(v.label){case 0:d=o.getReader(),v.label=1;case 1:v.trys.push([1,,9,10]),v.label=2;case 2:return[4,n(d.read())];case 3:return f=v.sent(),m=f.value,p=f.done,p?[4,n(void 0)]:[3,5];case 4:return[2,v.sent()];case 5:return[4,n(m)];case 6:return[4,v.sent()];case 7:return v.sent(),[3,2];case 8:return[3,10];case 9:return d.releaseLock(),[7];case 10:return[2]}})})}e.readableStreamLikeToAsyncGenerator=a;function s(o){return i.isFunction(o==null?void 0:o.getReader)}e.isReadableStreamLike=s}}),Je=V({"../../node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js"(e){var t=e&&e.__awaiter||function(D,L,P,Z){function X(B){return B instanceof P?B:new P(function(Y){Y(B)})}return new(P||(P=Promise))(function(B,Y){function H(ee){try{I(Z.next(ee))}catch(W){Y(W)}}function q(ee){try{I(Z.throw(ee))}catch(W){Y(W)}}function I(ee){ee.done?B(ee.value):X(ee.value).then(H,q)}I((Z=Z.apply(D,L||[])).next())})},n=e&&e.__generator||function(D,L){var P={label:0,sent:function(){if(B[0]&1)throw B[1];return B[1]},trys:[],ops:[]},Z,X,B,Y;return Y={next:H(0),throw:H(1),return:H(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function H(I){return function(ee){return q([I,ee])}}function q(I){if(Z)throw new TypeError("Generator is already executing.");for(;P;)try{if(Z=1,X&&(B=I[0]&2?X.return:I[0]?X.throw||((B=X.return)&&B.call(X),0):X.next)&&!(B=B.call(X,I[1])).done)return B;switch(X=0,B&&(I=[I[0]&2,B.value]),I[0]){case 0:case 1:B=I;break;case 4:return P.label++,{value:I[1],done:!1};case 5:P.label++,X=I[1],I=[0];continue;case 7:I=P.ops.pop(),P.trys.pop();continue;default:if(B=P.trys,!(B=B.length>0&&B[B.length-1])&&(I[0]===6||I[0]===2)){P=0;continue}if(I[0]===3&&(!B||I[1]>B[0]&&I[1]<B[3])){P.label=I[1];break}if(I[0]===6&&P.label<B[1]){P.label=B[1],B=I;break}if(B&&P.label<B[2]){P.label=B[2],P.ops.push(I);break}B[2]&&P.ops.pop(),P.trys.pop();continue}I=L.call(D,P)}catch(ee){I=[6,ee],X=0}finally{Z=B=0}if(I[0]&5)throw I[1];return{value:I[0]?I[1]:void 0,done:!0}}},r=e&&e.__asyncValues||function(D){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var L=D[Symbol.asyncIterator],P;return L?L.call(D):(D=typeof i=="function"?i(D):D[Symbol.iterator](),P={},Z("next"),Z("throw"),Z("return"),P[Symbol.asyncIterator]=function(){return this},P);function Z(B){P[B]=D[B]&&function(Y){return new Promise(function(H,q){Y=D[B](Y),X(H,q,Y.done,Y.value)})}}function X(B,Y,H,q){Promise.resolve(q).then(function(I){B({value:I,done:H})},Y)}},i=e&&e.__values||function(D){var L=typeof Symbol=="function"&&Symbol.iterator,P=L&&D[L],Z=0;if(P)return P.call(D);if(D&&typeof D.length=="number")return{next:function(){return D&&Z>=D.length&&(D=void 0),{value:D&&D[Z++],done:!D}}};throw new TypeError(L?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.fromReadableStreamLike=e.fromAsyncIterable=e.fromIterable=e.fromPromise=e.fromArrayLike=e.fromInteropObservable=e.innerFrom=void 0;var a=tx(),s=yQ(),o=Xt(),c=SQ(),d=xQ(),f=_Q(),m=kQ(),p=nx(),v=Mt(),b=pQ(),S=lg();function x(D){if(D instanceof o.Observable)return D;if(D!=null){if(c.isInteropObservable(D))return w(D);if(a.isArrayLike(D))return j(D);if(s.isPromise(D))return T(D);if(d.isAsyncIterable(D))return Q(D);if(m.isIterable(D))return A(D);if(p.isReadableStreamLike(D))return C(D)}throw f.createInvalidObservableTypeError(D)}e.innerFrom=x;function w(D){return new o.Observable(function(L){var P=D[S.observable]();if(v.isFunction(P.subscribe))return P.subscribe(L);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}e.fromInteropObservable=w;function j(D){return new o.Observable(function(L){for(var P=0;P<D.length&&!L.closed;P++)L.next(D[P]);L.complete()})}e.fromArrayLike=j;function T(D){return new o.Observable(function(L){D.then(function(P){L.closed||(L.next(P),L.complete())},function(P){return L.error(P)}).then(null,b.reportUnhandledError)})}e.fromPromise=T;function A(D){return new o.Observable(function(L){var P,Z;try{for(var X=i(D),B=X.next();!B.done;B=X.next()){var Y=B.value;if(L.next(Y),L.closed)return}}catch(H){P={error:H}}finally{try{B&&!B.done&&(Z=X.return)&&Z.call(X)}finally{if(P)throw P.error}}L.complete()})}e.fromIterable=A;function Q(D){return new o.Observable(function(L){R(D,L).catch(function(P){return L.error(P)})})}e.fromAsyncIterable=Q;function C(D){return Q(p.readableStreamLikeToAsyncGenerator(D))}e.fromReadableStreamLike=C;function R(D,L){var P,Z,X,B;return t(this,void 0,void 0,function(){var Y,H;return n(this,function(q){switch(q.label){case 0:q.trys.push([0,5,6,11]),P=r(D),q.label=1;case 1:return[4,P.next()];case 2:if(Z=q.sent(),!!Z.done)return[3,4];if(Y=Z.value,L.next(Y),L.closed)return[2];q.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return H=q.sent(),X={error:H},[3,11];case 6:return q.trys.push([6,,9,10]),Z&&!Z.done&&(B=P.return)?[4,B.call(P)]:[3,8];case 7:q.sent(),q.label=8;case 8:return[3,10];case 9:if(X)throw X.error;return[7];case 10:return[7];case 11:return L.complete(),[2]}})})}}}),lo=V({"../../node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.executeSchedule=void 0;function t(n,r,i,a,s){a===void 0&&(a=0),s===void 0&&(s=!1);var o=r.schedule(function(){i(),s?n.add(this.schedule(null,a)):this.unsubscribe()},a);if(n.add(o),!s)return o}e.executeSchedule=t}}),Pf=V({"../../node_modules/rxjs/dist/cjs/internal/operators/observeOn.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observeOn=void 0;var t=lo(),n=ye(),r=Re();function i(a,s){return s===void 0&&(s=0),n.operate(function(o,c){o.subscribe(r.createOperatorSubscriber(c,function(d){return t.executeSchedule(c,a,function(){return c.next(d)},s)},function(){return t.executeSchedule(c,a,function(){return c.complete()},s)},function(d){return t.executeSchedule(c,a,function(){return c.error(d)},s)}))})}e.observeOn=i}}),Qf=V({"../../node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.subscribeOn=void 0;var t=ye();function n(r,i){return i===void 0&&(i=0),t.operate(function(a,s){s.add(r.schedule(function(){return a.subscribe(s)},i))})}e.subscribeOn=n}}),UZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleObservable=void 0;var t=Je(),n=Pf(),r=Qf();function i(a,s){return t.innerFrom(a).pipe(r.subscribeOn(s),n.observeOn(s))}e.scheduleObservable=i}}),YZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schedulePromise=void 0;var t=Je(),n=Pf(),r=Qf();function i(a,s){return t.innerFrom(a).pipe(r.subscribeOn(s),n.observeOn(s))}e.schedulePromise=i}}),FZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleArray=void 0;var t=Xt();function n(r,i){return new t.Observable(function(a){var s=0;return i.schedule(function(){s===r.length?a.complete():(a.next(r[s++]),a.closed||this.schedule())})})}e.scheduleArray=n}}),jQ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleIterable=void 0;var t=Xt(),n=wQ(),r=Mt(),i=lo();function a(s,o){return new t.Observable(function(c){var d;return i.executeSchedule(c,o,function(){d=s[n.iterator](),i.executeSchedule(c,o,function(){var f,m,p;try{f=d.next(),m=f.value,p=f.done}catch(v){c.error(v);return}p?c.complete():c.next(m)},0,!0)}),function(){return r.isFunction(d==null?void 0:d.return)&&d.return()}})}e.scheduleIterable=a}}),TQ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleAsyncIterable=void 0;var t=Xt(),n=lo();function r(i,a){if(!i)throw new Error("Iterable cannot be null");return new t.Observable(function(s){n.executeSchedule(s,a,function(){var o=i[Symbol.asyncIterator]();n.executeSchedule(s,a,function(){o.next().then(function(c){c.done?s.complete():s.next(c.value)})},0,!0)})})}e.scheduleAsyncIterable=r}}),WZ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleReadableStreamLike=void 0;var t=TQ(),n=nx();function r(i,a){return t.scheduleAsyncIterable(n.readableStreamLikeToAsyncGenerator(i),a)}e.scheduleReadableStreamLike=r}}),EQ=V({"../../node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scheduled=void 0;var t=UZ(),n=YZ(),r=FZ(),i=jQ(),a=TQ(),s=SQ(),o=yQ(),c=tx(),d=kQ(),f=xQ(),m=_Q(),p=nx(),v=WZ();function b(S,x){if(S!=null){if(s.isInteropObservable(S))return t.scheduleObservable(S,x);if(c.isArrayLike(S))return r.scheduleArray(S,x);if(o.isPromise(S))return n.schedulePromise(S,x);if(f.isAsyncIterable(S))return a.scheduleAsyncIterable(S,x);if(d.isIterable(S))return i.scheduleIterable(S,x);if(p.isReadableStreamLike(S))return v.scheduleReadableStreamLike(S,x)}throw m.createInvalidObservableTypeError(S)}e.scheduled=b}}),co=V({"../../node_modules/rxjs/dist/cjs/internal/observable/from.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.from=void 0;var t=EQ(),n=Je();function r(i,a){return a?t.scheduled(i,a):n.innerFrom(i)}e.from=r}}),rx=V({"../../node_modules/rxjs/dist/cjs/internal/observable/of.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.of=void 0;var t=Ur(),n=co();function r(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=t.popScheduler(i);return n.from(i,s)}e.of=r}}),CQ=V({"../../node_modules/rxjs/dist/cjs/internal/observable/throwError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throwError=void 0;var t=Xt(),n=Mt();function r(i,a){var s=n.isFunction(i)?i:function(){return i},o=function(c){return c.error(s())};return new t.Observable(a?function(c){return a.schedule(o,0,c)}:o)}e.throwError=r}}),ix=V({"../../node_modules/rxjs/dist/cjs/internal/Notification.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observeNotification=e.Notification=e.NotificationKind=void 0;var t=da(),n=rx(),r=CQ(),i=Mt();(function(o){o.NEXT="N",o.ERROR="E",o.COMPLETE="C"})(e.NotificationKind||(e.NotificationKind={}));var a=(function(){function o(c,d,f){this.kind=c,this.value=d,this.error=f,this.hasValue=c==="N"}return o.prototype.observe=function(c){return s(this,c)},o.prototype.do=function(c,d,f){var m=this,p=m.kind,v=m.value,b=m.error;return p==="N"?c==null?void 0:c(v):p==="E"?d==null?void 0:d(b):f==null?void 0:f()},o.prototype.accept=function(c,d,f){var m;return i.isFunction((m=c)===null||m===void 0?void 0:m.next)?this.observe(c):this.do(c,d,f)},o.prototype.toObservable=function(){var c=this,d=c.kind,f=c.value,m=c.error,p=d==="N"?n.of(f):d==="E"?r.throwError(function(){return m}):d==="C"?t.EMPTY:0;if(!p)throw new TypeError("Unexpected notification kind "+d);return p},o.createNext=function(c){return new o("N",c)},o.createError=function(c){return new o("E",void 0,c)},o.createComplete=function(){return o.completeNotification},o.completeNotification=new o("C"),o})();e.Notification=a;function s(o,c){var d,f,m,p=o,v=p.kind,b=p.value,S=p.error;if(typeof v!="string")throw new TypeError('Invalid notification, missing "kind"');v==="N"?(d=c.next)===null||d===void 0||d.call(c,b):v==="E"?(f=c.error)===null||f===void 0||f.call(c,S):(m=c.complete)===null||m===void 0||m.call(c)}e.observeNotification=s}}),HZ=V({"../../node_modules/rxjs/dist/cjs/internal/util/isObservable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isObservable=void 0;var t=Xt(),n=Mt();function r(i){return!!i&&(i instanceof t.Observable||n.isFunction(i.lift)&&n.isFunction(i.subscribe))}e.isObservable=r}}),ul=V({"../../node_modules/rxjs/dist/cjs/internal/util/EmptyError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyError=void 0;var t=cl();e.EmptyError=t.createErrorClass(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}})}}),GZ=V({"../../node_modules/rxjs/dist/cjs/internal/lastValueFrom.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.lastValueFrom=void 0;var t=ul();function n(r,i){var a=typeof i=="object";return new Promise(function(s,o){var c=!1,d;r.subscribe({next:function(f){d=f,c=!0},error:o,complete:function(){c?s(d):a?s(i.defaultValue):o(new t.EmptyError)}})})}e.lastValueFrom=n}}),KZ=V({"../../node_modules/rxjs/dist/cjs/internal/firstValueFrom.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.firstValueFrom=void 0;var t=ul(),n=Ef();function r(i,a){var s=typeof a=="object";return new Promise(function(o,c){var d=new n.SafeSubscriber({next:function(f){o(f),d.unsubscribe()},error:c,complete:function(){s?o(a.defaultValue):c(new t.EmptyError)}});i.subscribe(d)})}e.firstValueFrom=r}}),AQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ArgumentOutOfRangeError=void 0;var t=cl();e.ArgumentOutOfRangeError=t.createErrorClass(function(n){return function(){n(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})}}),PQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotFoundError=void 0;var t=cl();e.NotFoundError=t.createErrorClass(function(n){return function(i){n(this),this.name="NotFoundError",this.message=i}})}}),QQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/SequenceError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SequenceError=void 0;var t=cl();e.SequenceError=t.createErrorClass(function(n){return function(i){n(this),this.name="SequenceError",this.message=i}})}}),ax=V({"../../node_modules/rxjs/dist/cjs/internal/util/isDate.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isValidDate=void 0;function t(n){return n instanceof Date&&!isNaN(n)}e.isValidDate=t}}),jp=V({"../../node_modules/rxjs/dist/cjs/internal/operators/timeout.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeout=e.TimeoutError=void 0;var t=Vr(),n=ax(),r=ye(),i=Je(),a=cl(),s=Re(),o=lo();e.TimeoutError=a.createErrorClass(function(f){return function(p){p===void 0&&(p=null),f(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=p}});function c(f,m){var p=n.isValidDate(f)?{first:f}:typeof f=="number"?{each:f}:f,v=p.first,b=p.each,S=p.with,x=S===void 0?d:S,w=p.scheduler,j=w===void 0?m??t.asyncScheduler:w,T=p.meta,A=T===void 0?null:T;if(v==null&&b==null)throw new TypeError("No timeout provided.");return r.operate(function(Q,C){var R,D,L=null,P=0,Z=function(X){D=o.executeSchedule(C,j,function(){try{R.unsubscribe(),i.innerFrom(x({meta:A,lastValue:L,seen:P})).subscribe(C)}catch(B){C.error(B)}},X)};R=Q.subscribe(s.createOperatorSubscriber(C,function(X){D==null||D.unsubscribe(),P++,C.next(L=X),b>0&&Z(b)},void 0,void 0,function(){D!=null&&D.closed||D==null||D.unsubscribe(),L=null})),!P&&Z(v!=null?typeof v=="number"?v:+v-j.now():b)})}e.timeout=c;function d(f){throw new e.TimeoutError(f)}}}),uo=V({"../../node_modules/rxjs/dist/cjs/internal/operators/map.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.map=void 0;var t=ye(),n=Re();function r(i,a){return t.operate(function(s,o){var c=0;s.subscribe(n.createOperatorSubscriber(o,function(d){o.next(i.call(a,d,c++))}))})}e.map=r}}),dl=V({"../../node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js"(e){var t=e&&e.__read||function(o,c){var d=typeof Symbol=="function"&&o[Symbol.iterator];if(!d)return o;var f=d.call(o),m,p=[],v;try{for(;(c===void 0||c-- >0)&&!(m=f.next()).done;)p.push(m.value)}catch(b){v={error:b}}finally{try{m&&!m.done&&(d=f.return)&&d.call(f)}finally{if(v)throw v.error}}return p},n=e&&e.__spreadArray||function(o,c){for(var d=0,f=c.length,m=o.length;d<f;d++,m++)o[m]=c[d];return o};Object.defineProperty(e,"__esModule",{value:!0}),e.mapOneOrManyArgs=void 0;var r=uo(),i=Array.isArray;function a(o,c){return i(c)?o.apply(void 0,n([],t(c))):o(c)}function s(o){return r.map(function(c){return a(o,c)})}e.mapOneOrManyArgs=s}}),NQ=V({"../../node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var v=p.call(f),b,S=[],x;try{for(;(m===void 0||m-- >0)&&!(b=v.next()).done;)S.push(b.value)}catch(w){x={error:w}}finally{try{b&&!b.done&&(p=v.return)&&p.call(v)}finally{if(x)throw x.error}}return S},n=e&&e.__spreadArray||function(f,m){for(var p=0,v=m.length,b=f.length;p<v;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.bindCallbackInternals=void 0;var r=dg(),i=Xt(),a=Qf(),s=dl(),o=Pf(),c=ex();function d(f,m,p,v){if(p)if(r.isScheduler(p))v=p;else return function(){for(var b=[],S=0;S<arguments.length;S++)b[S]=arguments[S];return d(f,m,v).apply(this,b).pipe(s.mapOneOrManyArgs(p))};return v?function(){for(var b=[],S=0;S<arguments.length;S++)b[S]=arguments[S];return d(f,m).apply(this,b).pipe(a.subscribeOn(v),o.observeOn(v))}:function(){for(var b=this,S=[],x=0;x<arguments.length;x++)S[x]=arguments[x];var w=new c.AsyncSubject,j=!0;return new i.Observable(function(T){var A=w.subscribe(T);if(j){j=!1;var Q=!1,C=!1;m.apply(b,n(n([],t(S)),[function(){for(var R=[],D=0;D<arguments.length;D++)R[D]=arguments[D];if(f){var L=R.shift();if(L!=null){w.error(L);return}}w.next(1<R.length?R:R[0]),C=!0,Q&&w.complete()}])),C&&w.complete(),Q=!0}return A})}}e.bindCallbackInternals=d}}),JZ=V({"../../node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bindCallback=void 0;var t=NQ();function n(r,i,a){return t.bindCallbackInternals(!1,r,i,a)}e.bindCallback=n}}),e$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bindNodeCallback=void 0;var t=NQ();function n(r,i,a){return t.bindCallbackInternals(!0,r,i,a)}e.bindNodeCallback=n}}),RQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.argsArgArrayOrObject=void 0;var t=Array.isArray,n=Object.getPrototypeOf,r=Object.prototype,i=Object.keys;function a(o){if(o.length===1){var c=o[0];if(t(c))return{args:c,keys:null};if(s(c)){var d=i(c);return{args:d.map(function(f){return c[f]}),keys:d}}}return{args:o,keys:null}}e.argsArgArrayOrObject=a;function s(o){return o&&typeof o=="object"&&n(o)===r}}}),MQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/createObject.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createObject=void 0;function t(n,r){return n.reduce(function(i,a,s){return i[a]=r[s],i},{})}e.createObject=t}}),sx=V({"../../node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestInit=e.combineLatest=void 0;var t=Xt(),n=RQ(),r=co(),i=er(),a=dl(),s=Ur(),o=MQ(),c=Re(),d=lo();function f(){for(var v=[],b=0;b<arguments.length;b++)v[b]=arguments[b];var S=s.popScheduler(v),x=s.popResultSelector(v),w=n.argsArgArrayOrObject(v),j=w.args,T=w.keys;if(j.length===0)return r.from([],S);var A=new t.Observable(m(j,S,T?function(Q){return o.createObject(T,Q)}:i.identity));return x?A.pipe(a.mapOneOrManyArgs(x)):A}e.combineLatest=f;function m(v,b,S){return S===void 0&&(S=i.identity),function(x){p(b,function(){for(var w=v.length,j=new Array(w),T=w,A=w,Q=function(R){p(b,function(){var D=r.from(v[R],b),L=!1;D.subscribe(c.createOperatorSubscriber(x,function(P){j[R]=P,L||(L=!0,A--),A||x.next(S(j.slice()))},function(){--T||x.complete()}))},x)},C=0;C<w;C++)Q(C)},x)}}e.combineLatestInit=m;function p(v,b,S){v?d.executeSchedule(S,v,b):b()}}}),ox=V({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeInternals=void 0;var t=Je(),n=lo(),r=Re();function i(a,s,o,c,d,f,m,p){var v=[],b=0,S=0,x=!1,w=function(){x&&!v.length&&!b&&s.complete()},j=function(A){return b<c?T(A):v.push(A)},T=function(A){f&&s.next(A),b++;var Q=!1;t.innerFrom(o(A,S++)).subscribe(r.createOperatorSubscriber(s,function(C){d==null||d(C),f?j(C):s.next(C)},function(){Q=!0},void 0,function(){if(Q)try{b--;for(var C=function(){var R=v.shift();m?n.executeSchedule(s,m,function(){return T(R)}):T(R)};v.length&&b<c;)C();w()}catch(R){s.error(R)}}))};return a.subscribe(r.createOperatorSubscriber(s,j,function(){x=!0,w()})),function(){p==null||p()}}e.mergeInternals=i}}),ts=V({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMap=void 0;var t=uo(),n=Je(),r=ye(),i=ox(),a=Mt();function s(o,c,d){return d===void 0&&(d=1/0),a.isFunction(c)?s(function(f,m){return t.map(function(p,v){return c(f,p,m,v)})(n.innerFrom(o(f,m)))},d):(typeof c=="number"&&(d=c),r.operate(function(f,m){return i.mergeInternals(f,m,o,d)}))}e.mergeMap=s}}),Nf=V({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=void 0;var t=ts(),n=er();function r(i){return i===void 0&&(i=1/0),t.mergeMap(n.identity,i)}e.mergeAll=r}}),fg=V({"../../node_modules/rxjs/dist/cjs/internal/operators/concatAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concatAll=void 0;var t=Nf();function n(){return t.mergeAll(1)}e.concatAll=n}}),hg=V({"../../node_modules/rxjs/dist/cjs/internal/observable/concat.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concat=void 0;var t=fg(),n=Ur(),r=co();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return t.concatAll()(r.from(a,n.popScheduler(a)))}e.concat=i}}),mg=V({"../../node_modules/rxjs/dist/cjs/internal/observable/defer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defer=void 0;var t=Xt(),n=Je();function r(i){return new t.Observable(function(a){n.innerFrom(i()).subscribe(a)})}e.defer=r}}),t$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/connectable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.connectable=void 0;var t=tr(),n=Xt(),r=mg(),i={connector:function(){return new t.Subject},resetOnDisconnect:!0};function a(s,o){o===void 0&&(o=i);var c=null,d=o.connector,f=o.resetOnDisconnect,m=f===void 0?!0:f,p=d(),v=new n.Observable(function(b){return p.subscribe(b)});return v.connect=function(){return(!c||c.closed)&&(c=r.defer(function(){return s}).subscribe(p),m&&c.add(function(){return p=d()})),c},v}e.connectable=a}}),n$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.forkJoin=void 0;var t=Xt(),n=RQ(),r=Je(),i=Ur(),a=Re(),s=dl(),o=MQ();function c(){for(var d=[],f=0;f<arguments.length;f++)d[f]=arguments[f];var m=i.popResultSelector(d),p=n.argsArgArrayOrObject(d),v=p.args,b=p.keys,S=new t.Observable(function(x){var w=v.length;if(!w){x.complete();return}for(var j=new Array(w),T=w,A=w,Q=function(R){var D=!1;r.innerFrom(v[R]).subscribe(a.createOperatorSubscriber(x,function(L){D||(D=!0,A--),j[R]=L},function(){return T--},void 0,function(){(!T||!D)&&(A||x.next(b?o.createObject(b,j):j),x.complete())}))},C=0;C<w;C++)Q(C)});return m?S.pipe(s.mapOneOrManyArgs(m)):S}e.forkJoin=c}}),r$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js"(e){var t=e&&e.__read||function(x,w){var j=typeof Symbol=="function"&&x[Symbol.iterator];if(!j)return x;var T=j.call(x),A,Q=[],C;try{for(;(w===void 0||w-- >0)&&!(A=T.next()).done;)Q.push(A.value)}catch(R){C={error:R}}finally{try{A&&!A.done&&(j=T.return)&&j.call(T)}finally{if(C)throw C.error}}return Q};Object.defineProperty(e,"__esModule",{value:!0}),e.fromEvent=void 0;var n=Je(),r=Xt(),i=ts(),a=tx(),s=Mt(),o=dl(),c=["addListener","removeListener"],d=["addEventListener","removeEventListener"],f=["on","off"];function m(x,w,j,T){if(s.isFunction(j)&&(T=j,j=void 0),T)return m(x,w,j).pipe(o.mapOneOrManyArgs(T));var A=t(S(x)?d.map(function(R){return function(D){return x[R](w,D,j)}}):v(x)?c.map(p(x,w)):b(x)?f.map(p(x,w)):[],2),Q=A[0],C=A[1];if(!Q&&a.isArrayLike(x))return i.mergeMap(function(R){return m(R,w,j)})(n.innerFrom(x));if(!Q)throw new TypeError("Invalid event target");return new r.Observable(function(R){var D=function(){for(var L=[],P=0;P<arguments.length;P++)L[P]=arguments[P];return R.next(1<L.length?L:L[0])};return Q(D),function(){return C(D)}})}e.fromEvent=m;function p(x,w){return function(j){return function(T){return x[j](w,T)}}}function v(x){return s.isFunction(x.addListener)&&s.isFunction(x.removeListener)}function b(x){return s.isFunction(x.on)&&s.isFunction(x.off)}function S(x){return s.isFunction(x.addEventListener)&&s.isFunction(x.removeEventListener)}}}),i$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fromEventPattern=void 0;var t=Xt(),n=Mt(),r=dl();function i(a,s,o){return o?i(a,s).pipe(r.mapOneOrManyArgs(o)):new t.Observable(function(c){var d=function(){for(var m=[],p=0;p<arguments.length;p++)m[p]=arguments[p];return c.next(m.length===1?m[0]:m)},f=a(d);return n.isFunction(s)?function(){return s(d,f)}:void 0})}e.fromEventPattern=i}}),a$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/generate.js"(e){var t=e&&e.__generator||function(o,c){var d={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},f,m,p,v;return v={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function b(x){return function(w){return S([x,w])}}function S(x){if(f)throw new TypeError("Generator is already executing.");for(;d;)try{if(f=1,m&&(p=x[0]&2?m.return:x[0]?m.throw||((p=m.return)&&p.call(m),0):m.next)&&!(p=p.call(m,x[1])).done)return p;switch(m=0,p&&(x=[x[0]&2,p.value]),x[0]){case 0:case 1:p=x;break;case 4:return d.label++,{value:x[1],done:!1};case 5:d.label++,m=x[1],x=[0];continue;case 7:x=d.ops.pop(),d.trys.pop();continue;default:if(p=d.trys,!(p=p.length>0&&p[p.length-1])&&(x[0]===6||x[0]===2)){d=0;continue}if(x[0]===3&&(!p||x[1]>p[0]&&x[1]<p[3])){d.label=x[1];break}if(x[0]===6&&d.label<p[1]){d.label=p[1],p=x;break}if(p&&d.label<p[2]){d.label=p[2],d.ops.push(x);break}p[2]&&d.ops.pop(),d.trys.pop();continue}x=c.call(o,d)}catch(w){x=[6,w],m=0}finally{f=p=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.generate=void 0;var n=er(),r=dg(),i=mg(),a=jQ();function s(o,c,d,f,m){var p,v,b,S;arguments.length===1?(p=o,S=p.initialState,c=p.condition,d=p.iterate,v=p.resultSelector,b=v===void 0?n.identity:v,m=p.scheduler):(S=o,!f||r.isScheduler(f)?(b=n.identity,m=f):b=f);function x(){var w;return t(this,function(j){switch(j.label){case 0:w=S,j.label=1;case 1:return!c||c(w)?[4,b(w)]:[3,4];case 2:j.sent(),j.label=3;case 3:return w=d(w),[3,1];case 4:return[2]}})}return i.defer(m?function(){return a.scheduleIterable(x(),m)}:x)}e.generate=s}}),s$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/iif.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.iif=void 0;var t=mg();function n(r,i,a){return t.defer(function(){return r()?i:a})}e.iif=n}}),fl=V({"../../node_modules/rxjs/dist/cjs/internal/observable/timer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timer=void 0;var t=Xt(),n=Vr(),r=dg(),i=ax();function a(s,o,c){s===void 0&&(s=0),c===void 0&&(c=n.async);var d=-1;return o!=null&&(r.isScheduler(o)?c=o:d=o),new t.Observable(function(f){var m=i.isValidDate(s)?+s-c.now():s;m<0&&(m=0);var p=0;return c.schedule(function(){f.closed||(f.next(p++),0<=d?this.schedule(void 0,d):f.complete())},m)})}e.timer=a}}),LQ=V({"../../node_modules/rxjs/dist/cjs/internal/observable/interval.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.interval=void 0;var t=Vr(),n=fl();function r(i,a){return i===void 0&&(i=0),a===void 0&&(a=t.asyncScheduler),i<0&&(i=0),n.timer(i,i,a)}e.interval=r}}),o$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/merge.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var t=Nf(),n=Je(),r=da(),i=Ur(),a=co();function s(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];var d=i.popScheduler(o),f=i.popNumber(o,1/0),m=o;return m.length?m.length===1?n.innerFrom(m[0]):t.mergeAll(f)(a.from(m,d)):r.EMPTY}e.merge=s}}),Hj=V({"../../node_modules/rxjs/dist/cjs/internal/observable/never.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.never=e.NEVER=void 0;var t=Xt(),n=Jn();e.NEVER=new t.Observable(n.noop);function r(){return e.NEVER}e.never=r}}),$c=V({"../../node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.argsOrArgArray=void 0;var t=Array.isArray;function n(r){return r.length===1&&t(r[0])?r[0]:r}e.argsOrArgArray=n}}),DQ=V({"../../node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.onErrorResumeNext=void 0;var t=Xt(),n=$c(),r=Re(),i=Jn(),a=Je();function s(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];var d=n.argsOrArgArray(o);return new t.Observable(function(f){var m=0,p=function(){if(m<d.length){var v=void 0;try{v=a.innerFrom(d[m++])}catch{p();return}var b=new r.OperatorSubscriber(f,void 0,i.noop,i.noop);v.subscribe(b),b.add(p)}else f.complete()};p()})}e.onErrorResumeNext=s}}),l$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/pairs.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pairs=void 0;var t=co();function n(r,i){return t.from(Object.entries(r),i)}e.pairs=n}}),zQ=V({"../../node_modules/rxjs/dist/cjs/internal/util/not.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.not=void 0;function t(n,r){return function(i,a){return!n.call(r,i,a)}}e.not=t}}),fo=V({"../../node_modules/rxjs/dist/cjs/internal/operators/filter.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.filter=void 0;var t=ye(),n=Re();function r(i,a){return t.operate(function(s,o){var c=0;s.subscribe(n.createOperatorSubscriber(o,function(d){return i.call(a,d,c++)&&o.next(d)}))})}e.filter=r}}),c$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/partition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.partition=void 0;var t=zQ(),n=fo(),r=Je();function i(a,s,o){return[n.filter(s,o)(r.innerFrom(a)),n.filter(t.not(s,o))(r.innerFrom(a))]}e.partition=i}}),IQ=V({"../../node_modules/rxjs/dist/cjs/internal/observable/race.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.raceInit=e.race=void 0;var t=Xt(),n=Je(),r=$c(),i=Re();function a(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];return o=r.argsOrArgArray(o),o.length===1?n.innerFrom(o[0]):new t.Observable(s(o))}e.race=a;function s(o){return function(c){for(var d=[],f=function(p){d.push(n.innerFrom(o[p]).subscribe(i.createOperatorSubscriber(c,function(v){if(d){for(var b=0;b<d.length;b++)b!==p&&d[b].unsubscribe();d=null}c.next(v)})))},m=0;d&&!c.closed&&m<o.length;m++)f(m)}}e.raceInit=s}}),u$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/range.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.range=void 0;var t=Xt(),n=da();function r(i,a,s){if(a==null&&(a=i,i=0),a<=0)return n.EMPTY;var o=a+i;return new t.Observable(s?function(c){var d=i;return s.schedule(function(){d<o?(c.next(d++),this.schedule()):c.complete()})}:function(c){for(var d=i;d<o&&!c.closed;)c.next(d++);c.complete()})}e.range=r}}),d$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/using.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.using=void 0;var t=Xt(),n=Je(),r=da();function i(a,s){return new t.Observable(function(o){var c=a(),d=s(c),f=d?n.innerFrom(d):r.EMPTY;return f.subscribe(o),function(){c&&c.unsubscribe()}})}e.using=i}}),lx=V({"../../node_modules/rxjs/dist/cjs/internal/observable/zip.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var v=p.call(f),b,S=[],x;try{for(;(m===void 0||m-- >0)&&!(b=v.next()).done;)S.push(b.value)}catch(w){x={error:w}}finally{try{b&&!b.done&&(p=v.return)&&p.call(v)}finally{if(x)throw x.error}}return S},n=e&&e.__spreadArray||function(f,m){for(var p=0,v=m.length,b=f.length;p<v;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.zip=void 0;var r=Xt(),i=Je(),a=$c(),s=da(),o=Re(),c=Ur();function d(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var p=c.popResultSelector(f),v=a.argsOrArgArray(f);return v.length?new r.Observable(function(b){var S=v.map(function(){return[]}),x=v.map(function(){return!1});b.add(function(){S=x=null});for(var w=function(T){i.innerFrom(v[T]).subscribe(o.createOperatorSubscriber(b,function(A){if(S[T].push(A),S.every(function(C){return C.length})){var Q=S.map(function(C){return C.shift()});b.next(p?p.apply(void 0,n([],t(Q))):Q),S.some(function(C,R){return!C.length&&x[R]})&&b.complete()}},function(){x[T]=!0,!S[T].length&&b.complete()}))},j=0;!b.closed&&j<v.length;j++)w(j);return function(){S=x=null}}):s.EMPTY}e.zip=d}}),f$=V({"../../node_modules/rxjs/dist/cjs/internal/types.js"(e){Object.defineProperty(e,"__esModule",{value:!0})}}),cx=V({"../../node_modules/rxjs/dist/cjs/internal/operators/audit.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.audit=void 0;var t=ye(),n=Je(),r=Re();function i(a){return t.operate(function(s,o){var c=!1,d=null,f=null,m=!1,p=function(){if(f==null||f.unsubscribe(),f=null,c){c=!1;var b=d;d=null,o.next(b)}m&&o.complete()},v=function(){f=null,m&&o.complete()};s.subscribe(r.createOperatorSubscriber(o,function(b){c=!0,d=b,f||n.innerFrom(a(b)).subscribe(f=r.createOperatorSubscriber(o,p,v))},function(){m=!0,(!c||!f||f.closed)&&o.complete()}))})}e.audit=i}}),qQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/auditTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.auditTime=void 0;var t=Vr(),n=cx(),r=fl();function i(a,s){return s===void 0&&(s=t.asyncScheduler),n.audit(function(){return r.timer(a,s)})}e.auditTime=i}}),BQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/buffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.buffer=void 0;var t=ye(),n=Jn(),r=Re(),i=Je();function a(s){return t.operate(function(o,c){var d=[];return o.subscribe(r.createOperatorSubscriber(c,function(f){return d.push(f)},function(){c.next(d),c.complete()})),i.innerFrom(s).subscribe(r.createOperatorSubscriber(c,function(){var f=d;d=[],c.next(f)},n.noop)),function(){d=null}})}e.buffer=a}}),XQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js"(e){var t=e&&e.__values||function(s){var o=typeof Symbol=="function"&&Symbol.iterator,c=o&&s[o],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferCount=void 0;var n=ye(),r=Re(),i=oo();function a(s,o){return o===void 0&&(o=null),o=o??s,n.operate(function(c,d){var f=[],m=0;c.subscribe(r.createOperatorSubscriber(d,function(p){var v,b,S,x,w=null;m++%o===0&&f.push([]);try{for(var j=t(f),T=j.next();!T.done;T=j.next()){var A=T.value;A.push(p),s<=A.length&&(w=w??[],w.push(A))}}catch(R){v={error:R}}finally{try{T&&!T.done&&(b=j.return)&&b.call(j)}finally{if(v)throw v.error}}if(w)try{for(var Q=t(w),C=Q.next();!C.done;C=Q.next()){var A=C.value;i.arrRemove(f,A),d.next(A)}}catch(R){S={error:R}}finally{try{C&&!C.done&&(x=Q.return)&&x.call(Q)}finally{if(S)throw S.error}}},function(){var p,v;try{for(var b=t(f),S=b.next();!S.done;S=b.next()){var x=S.value;d.next(x)}}catch(w){p={error:w}}finally{try{S&&!S.done&&(v=b.return)&&v.call(b)}finally{if(p)throw p.error}}d.complete()},void 0,function(){f=null}))})}e.bufferCount=a}}),ZQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js"(e){var t=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],v=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&v>=f.length&&(f=void 0),{value:f&&f[v++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferTime=void 0;var n=gi(),r=ye(),i=Re(),a=oo(),s=Vr(),o=Ur(),c=lo();function d(f){for(var m,p,v=[],b=1;b<arguments.length;b++)v[b-1]=arguments[b];var S=(m=o.popScheduler(v))!==null&&m!==void 0?m:s.asyncScheduler,x=(p=v[0])!==null&&p!==void 0?p:null,w=v[1]||1/0;return r.operate(function(j,T){var A=[],Q=!1,C=function(L){var P=L.buffer,Z=L.subs;Z.unsubscribe(),a.arrRemove(A,L),T.next(P),Q&&R()},R=function(){if(A){var L=new n.Subscription;T.add(L);var P=[],Z={buffer:P,subs:L};A.push(Z),c.executeSchedule(L,S,function(){return C(Z)},f)}};x!==null&&x>=0?c.executeSchedule(T,S,R,x,!0):Q=!0,R();var D=i.createOperatorSubscriber(T,function(L){var P,Z,X=A.slice();try{for(var B=t(X),Y=B.next();!Y.done;Y=B.next()){var H=Y.value,q=H.buffer;q.push(L),w<=q.length&&C(H)}}catch(I){P={error:I}}finally{try{Y&&!Y.done&&(Z=B.return)&&Z.call(B)}finally{if(P)throw P.error}}},function(){for(;A!=null&&A.length;)T.next(A.shift().buffer);D==null||D.unsubscribe(),T.complete(),T.unsubscribe()},void 0,function(){return A=null});j.subscribe(D)})}e.bufferTime=d}}),$Q=V({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js"(e){var t=e&&e.__values||function(d){var f=typeof Symbol=="function"&&Symbol.iterator,m=f&&d[f],p=0;if(m)return m.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&p>=d.length&&(d=void 0),{value:d&&d[p++],done:!d}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferToggle=void 0;var n=gi(),r=ye(),i=Je(),a=Re(),s=Jn(),o=oo();function c(d,f){return r.operate(function(m,p){var v=[];i.innerFrom(d).subscribe(a.createOperatorSubscriber(p,function(b){var S=[];v.push(S);var x=new n.Subscription,w=function(){o.arrRemove(v,S),p.next(S),x.unsubscribe()};x.add(i.innerFrom(f(b)).subscribe(a.createOperatorSubscriber(p,w,s.noop)))},s.noop)),m.subscribe(a.createOperatorSubscriber(p,function(b){var S,x;try{for(var w=t(v),j=w.next();!j.done;j=w.next()){var T=j.value;T.push(b)}}catch(A){S={error:A}}finally{try{j&&!j.done&&(x=w.return)&&x.call(w)}finally{if(S)throw S.error}}},function(){for(;v.length>0;)p.next(v.shift());p.complete()}))})}e.bufferToggle=c}}),VQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bufferWhen=void 0;var t=ye(),n=Jn(),r=Re(),i=Je();function a(s){return t.operate(function(o,c){var d=null,f=null,m=function(){f==null||f.unsubscribe();var p=d;d=[],p&&c.next(p),i.innerFrom(s()).subscribe(f=r.createOperatorSubscriber(c,m,n.noop))};m(),o.subscribe(r.createOperatorSubscriber(c,function(p){return d==null?void 0:d.push(p)},function(){d&&c.next(d),c.complete()},void 0,function(){return d=f=null}))})}e.bufferWhen=a}}),UQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/catchError.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.catchError=void 0;var t=Je(),n=Re(),r=ye();function i(a){return r.operate(function(s,o){var c=null,d=!1,f;c=s.subscribe(n.createOperatorSubscriber(o,void 0,void 0,function(m){f=t.innerFrom(a(m,i(a)(s))),c?(c.unsubscribe(),c=null,f.subscribe(o)):d=!0})),d&&(c.unsubscribe(),c=null,f.subscribe(o))})}e.catchError=i}}),YQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scanInternals=void 0;var t=Re();function n(r,i,a,s,o){return function(c,d){var f=a,m=i,p=0;c.subscribe(t.createOperatorSubscriber(d,function(v){var b=p++;m=f?r(m,v,b):(f=!0,v),s&&d.next(m)},o&&(function(){f&&d.next(m),d.complete()})))}}e.scanInternals=n}}),Vc=V({"../../node_modules/rxjs/dist/cjs/internal/operators/reduce.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reduce=void 0;var t=YQ(),n=ye();function r(i,a){return n.operate(t.scanInternals(i,a,arguments.length>=2,!1,!0))}e.reduce=r}}),ux=V({"../../node_modules/rxjs/dist/cjs/internal/operators/toArray.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toArray=void 0;var t=Vc(),n=ye(),r=function(a,s){return a.push(s),a};function i(){return n.operate(function(a,s){t.reduce(r,[])(a).subscribe(s)})}e.toArray=i}}),FQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.joinAllInternals=void 0;var t=er(),n=dl(),r=cg(),i=ts(),a=ux();function s(o,c){return r.pipe(a.toArray(),i.mergeMap(function(d){return o(d)}),c?n.mapOneOrManyArgs(c):t.identity)}e.joinAllInternals=s}}),dx=V({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestAll=void 0;var t=sx(),n=FQ();function r(i){return n.joinAllInternals(t.combineLatest,i)}e.combineLatestAll=r}}),WQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/combineAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineAll=void 0;var t=dx();e.combineAll=t.combineLatestAll}}),HQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var v=p.call(f),b,S=[],x;try{for(;(m===void 0||m-- >0)&&!(b=v.next()).done;)S.push(b.value)}catch(w){x={error:w}}finally{try{b&&!b.done&&(p=v.return)&&p.call(v)}finally{if(x)throw x.error}}return S},n=e&&e.__spreadArray||function(f,m){for(var p=0,v=m.length,b=f.length;p<v;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatest=void 0;var r=sx(),i=ye(),a=$c(),s=dl(),o=cg(),c=Ur();function d(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var p=c.popResultSelector(f);return p?o.pipe(d.apply(void 0,n([],t(f))),s.mapOneOrManyArgs(p)):i.operate(function(v,b){r.combineLatestInit(n([v],t(a.argsOrArgArray(f))))(b)})}e.combineLatest=d}}),GQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js"(e){var t=e&&e.__read||function(a,s){var o=typeof Symbol=="function"&&a[Symbol.iterator];if(!o)return a;var c=o.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var o=0,c=s.length,d=a.length;o<c;o++,d++)a[d]=s[o];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestWith=void 0;var r=HQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.combineLatest.apply(void 0,n([],t(a)))}e.combineLatestWith=i}}),fx=V({"../../node_modules/rxjs/dist/cjs/internal/operators/concatMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concatMap=void 0;var t=ts(),n=Mt();function r(i,a){return n.isFunction(a)?t.mergeMap(i,a,1):t.mergeMap(i,1)}e.concatMap=r}}),KQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.concatMapTo=void 0;var t=fx(),n=Mt();function r(i,a){return n.isFunction(a)?t.concatMap(function(){return i},a):t.concatMap(function(){return i})}e.concatMapTo=r}}),JQ=V({"../../node_modules/rxjs/dist/cjs/internal/operators/concat.js"(e){var t=e&&e.__read||function(c,d){var f=typeof Symbol=="function"&&c[Symbol.iterator];if(!f)return c;var m=f.call(c),p,v=[],b;try{for(;(d===void 0||d-- >0)&&!(p=m.next()).done;)v.push(p.value)}catch(S){b={error:S}}finally{try{p&&!p.done&&(f=m.return)&&f.call(m)}finally{if(b)throw b.error}}return v},n=e&&e.__spreadArray||function(c,d){for(var f=0,m=d.length,p=c.length;f<m;f++,p++)c[p]=d[f];return c};Object.defineProperty(e,"__esModule",{value:!0}),e.concat=void 0;var r=ye(),i=fg(),a=Ur(),s=co();function o(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];var f=a.popScheduler(c);return r.operate(function(m,p){i.concatAll()(s.from(n([m],t(c)),f)).subscribe(p)})}e.concat=o}}),eN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/concatWith.js"(e){var t=e&&e.__read||function(a,s){var o=typeof Symbol=="function"&&a[Symbol.iterator];if(!o)return a;var c=o.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var o=0,c=s.length,d=a.length;o<c;o++,d++)a[d]=s[o];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.concatWith=void 0;var r=JQ();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.concat.apply(void 0,n([],t(a)))}e.concatWith=i}}),h$=V({"../../node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fromSubscribable=void 0;var t=Xt();function n(r){return new t.Observable(function(i){return r.subscribe(i)})}e.fromSubscribable=n}}),pg=V({"../../node_modules/rxjs/dist/cjs/internal/operators/connect.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.connect=void 0;var t=tr(),n=Je(),r=ye(),i=h$(),a={connector:function(){return new t.Subject}};function s(o,c){c===void 0&&(c=a);var d=c.connector;return r.operate(function(f,m){var p=d();n.innerFrom(o(i.fromSubscribable(p))).subscribe(m),m.add(f.subscribe(p))})}e.connect=s}}),tN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/count.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.count=void 0;var t=Vc();function n(r){return t.reduce(function(i,a,s){return!r||r(a,s)?i+1:i},0)}e.count=n}}),nN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/debounce.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.debounce=void 0;var t=ye(),n=Jn(),r=Re(),i=Je();function a(s){return t.operate(function(o,c){var d=!1,f=null,m=null,p=function(){if(m==null||m.unsubscribe(),m=null,d){d=!1;var v=f;f=null,c.next(v)}};o.subscribe(r.createOperatorSubscriber(c,function(v){m==null||m.unsubscribe(),d=!0,f=v,m=r.createOperatorSubscriber(c,p,n.noop),i.innerFrom(s(v)).subscribe(m)},function(){p(),c.complete()},void 0,function(){f=m=null}))})}e.debounce=a}}),rN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.debounceTime=void 0;var t=Vr(),n=ye(),r=Re();function i(a,s){return s===void 0&&(s=t.asyncScheduler),n.operate(function(o,c){var d=null,f=null,m=null,p=function(){if(d){d.unsubscribe(),d=null;var b=f;f=null,c.next(b)}};function v(){var b=m+a,S=s.now();if(S<b){d=this.schedule(void 0,b-S),c.add(d);return}p()}o.subscribe(r.createOperatorSubscriber(c,function(b){f=b,m=s.now(),d||(d=s.schedule(v,a),c.add(d))},function(){p(),c.complete()},void 0,function(){f=d=null}))})}e.debounceTime=i}}),Rf=V({"../../node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defaultIfEmpty=void 0;var t=ye(),n=Re();function r(i){return t.operate(function(a,s){var o=!1;a.subscribe(n.createOperatorSubscriber(s,function(c){o=!0,s.next(c)},function(){o||s.next(i),s.complete()}))})}e.defaultIfEmpty=r}}),Mf=V({"../../node_modules/rxjs/dist/cjs/internal/operators/take.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.take=void 0;var t=da(),n=ye(),r=Re();function i(a){return a<=0?function(){return t.EMPTY}:n.operate(function(s,o){var c=0;s.subscribe(r.createOperatorSubscriber(o,function(d){++c<=a&&(o.next(d),a<=c&&o.complete())}))})}e.take=i}}),hx=V({"../../node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreElements=void 0;var t=ye(),n=Re(),r=Jn();function i(){return t.operate(function(a,s){a.subscribe(n.createOperatorSubscriber(s,r.noop))})}e.ignoreElements=i}}),mx=V({"../../node_modules/rxjs/dist/cjs/internal/operators/mapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapTo=void 0;var t=uo();function n(r){return t.map(function(){return r})}e.mapTo=n}}),px=V({"../../node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.delayWhen=void 0;var t=hg(),n=Mf(),r=hx(),i=mx(),a=ts(),s=Je();function o(c,d){return d?function(f){return t.concat(d.pipe(n.take(1),r.ignoreElements()),f.pipe(o(c)))}:a.mergeMap(function(f,m){return s.innerFrom(c(f,m)).pipe(n.take(1),i.mapTo(f))})}e.delayWhen=o}}),iN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/delay.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.delay=void 0;var t=Vr(),n=px(),r=fl();function i(a,s){s===void 0&&(s=t.asyncScheduler);var o=r.timer(a,s);return n.delayWhen(function(){return o})}e.delay=i}}),aN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.dematerialize=void 0;var t=ix(),n=ye(),r=Re();function i(){return n.operate(function(a,s){a.subscribe(r.createOperatorSubscriber(s,function(o){return t.observeNotification(o,s)}))})}e.dematerialize=i}}),sN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/distinct.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.distinct=void 0;var t=ye(),n=Re(),r=Jn(),i=Je();function a(s,o){return t.operate(function(c,d){var f=new Set;c.subscribe(n.createOperatorSubscriber(d,function(m){var p=s?s(m):m;f.has(p)||(f.add(p),d.next(m))})),o&&i.innerFrom(o).subscribe(n.createOperatorSubscriber(d,function(){return f.clear()},r.noop))})}e.distinct=a}}),gx=V({"../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.distinctUntilChanged=void 0;var t=er(),n=ye(),r=Re();function i(s,o){return o===void 0&&(o=t.identity),s=s??a,n.operate(function(c,d){var f,m=!0;c.subscribe(r.createOperatorSubscriber(d,function(p){var v=o(p);(m||!s(f,v))&&(m=!1,f=v,d.next(p))}))})}e.distinctUntilChanged=i;function a(s,o){return s===o}}}),oN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.distinctUntilKeyChanged=void 0;var t=gx();function n(r,i){return t.distinctUntilChanged(function(a,s){return i?i(a[r],s[r]):a[r]===s[r]})}e.distinctUntilKeyChanged=n}}),Lf=V({"../../node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throwIfEmpty=void 0;var t=ul(),n=ye(),r=Re();function i(s){return s===void 0&&(s=a),n.operate(function(o,c){var d=!1;o.subscribe(r.createOperatorSubscriber(c,function(f){d=!0,c.next(f)},function(){return d?c.complete():c.error(s())}))})}e.throwIfEmpty=i;function a(){return new t.EmptyError}}}),lN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/elementAt.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.elementAt=void 0;var t=AQ(),n=fo(),r=Lf(),i=Rf(),a=Mf();function s(o,c){if(o<0)throw new t.ArgumentOutOfRangeError;var d=arguments.length>=2;return function(f){return f.pipe(n.filter(function(m,p){return p===o}),a.take(1),d?i.defaultIfEmpty(c):r.throwIfEmpty(function(){return new t.ArgumentOutOfRangeError}))}}e.elementAt=s}}),cN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/endWith.js"(e){var t=e&&e.__read||function(s,o){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(o===void 0||o-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(v){p={error:v}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,o){for(var c=0,d=o.length,f=s.length;c<d;c++,f++)s[f]=o[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.endWith=void 0;var r=hg(),i=rx();function a(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];return function(c){return r.concat(c,i.of.apply(void 0,n([],t(s))))}}e.endWith=a}}),uN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/every.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.every=void 0;var t=ye(),n=Re();function r(i,a){return t.operate(function(s,o){var c=0;s.subscribe(n.createOperatorSubscriber(o,function(d){i.call(a,d,c++,s)||(o.next(!1),o.complete())},function(){o.next(!0),o.complete()}))})}e.every=r}}),vx=V({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.exhaustMap=void 0;var t=uo(),n=Je(),r=ye(),i=Re();function a(s,o){return o?function(c){return c.pipe(a(function(d,f){return n.innerFrom(s(d,f)).pipe(t.map(function(m,p){return o(d,m,f,p)}))}))}:r.operate(function(c,d){var f=0,m=null,p=!1;c.subscribe(i.createOperatorSubscriber(d,function(v){m||(m=i.createOperatorSubscriber(d,void 0,function(){m=null,p&&d.complete()}),n.innerFrom(s(v,f++)).subscribe(m))},function(){p=!0,!m&&d.complete()}))})}e.exhaustMap=a}}),Ox=V({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.exhaustAll=void 0;var t=vx(),n=er();function r(){return t.exhaustMap(n.identity)}e.exhaustAll=r}}),dN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/exhaust.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.exhaust=void 0;var t=Ox();e.exhaust=t.exhaustAll}}),fN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/expand.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.expand=void 0;var t=ye(),n=ox();function r(i,a,s){return a===void 0&&(a=1/0),a=(a||0)<1?1/0:a,t.operate(function(o,c){return n.mergeInternals(o,c,i,a,void 0,!0,s)})}e.expand=r}}),hN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/finalize.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.finalize=void 0;var t=ye();function n(r){return t.operate(function(i,a){try{i.subscribe(a)}finally{a.add(r)}})}e.finalize=n}}),bx=V({"../../node_modules/rxjs/dist/cjs/internal/operators/find.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFind=e.find=void 0;var t=ye(),n=Re();function r(a,s){return t.operate(i(a,s,"value"))}e.find=r;function i(a,s,o){var c=o==="index";return function(d,f){var m=0;d.subscribe(n.createOperatorSubscriber(f,function(p){var v=m++;a.call(s,p,v,d)&&(f.next(c?v:p),f.complete())},function(){f.next(c?-1:void 0),f.complete()}))}}e.createFind=i}}),mN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/findIndex.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.findIndex=void 0;var t=ye(),n=bx();function r(i,a){return t.operate(n.createFind(i,a,"index"))}e.findIndex=r}}),pN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/first.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.first=void 0;var t=ul(),n=fo(),r=Mf(),i=Rf(),a=Lf(),s=er();function o(c,d){var f=arguments.length>=2;return function(m){return m.pipe(c?n.filter(function(p,v){return c(p,v,m)}):s.identity,r.take(1),f?i.defaultIfEmpty(d):a.throwIfEmpty(function(){return new t.EmptyError}))}}e.first=o}}),gN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/groupBy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.groupBy=void 0;var t=Xt(),n=Je(),r=tr(),i=ye(),a=Re();function s(o,c,d,f){return i.operate(function(m,p){var v;!c||typeof c=="function"?v=c:(d=c.duration,v=c.element,f=c.connector);var b=new Map,S=function(Q){b.forEach(Q),Q(p)},x=function(Q){return S(function(C){return C.error(Q)})},w=0,j=!1,T=new a.OperatorSubscriber(p,function(Q){try{var C=o(Q),R=b.get(C);if(!R){b.set(C,R=f?f():new r.Subject);var D=A(C,R);if(p.next(D),d){var L=a.createOperatorSubscriber(R,function(){R.complete(),L==null||L.unsubscribe()},void 0,void 0,function(){return b.delete(C)});T.add(n.innerFrom(d(D)).subscribe(L))}}R.next(v?v(Q):Q)}catch(P){x(P)}},function(){return S(function(Q){return Q.complete()})},x,function(){return b.clear()},function(){return j=!0,w===0});m.subscribe(T);function A(Q,C){var R=new t.Observable(function(D){w++;var L=C.subscribe(D);return function(){L.unsubscribe(),--w===0&&j&&T.unsubscribe()}});return R.key=Q,R}})}e.groupBy=s}}),vN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isEmpty=void 0;var t=ye(),n=Re();function r(){return t.operate(function(i,a){i.subscribe(n.createOperatorSubscriber(a,function(){a.next(!1),a.complete()},function(){a.next(!0),a.complete()}))})}e.isEmpty=r}}),yx=V({"../../node_modules/rxjs/dist/cjs/internal/operators/takeLast.js"(e){var t=e&&e.__values||function(s){var o=typeof Symbol=="function"&&Symbol.iterator,c=o&&s[o],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.takeLast=void 0;var n=da(),r=ye(),i=Re();function a(s){return s<=0?function(){return n.EMPTY}:r.operate(function(o,c){var d=[];o.subscribe(i.createOperatorSubscriber(c,function(f){d.push(f),s<d.length&&d.shift()},function(){var f,m;try{for(var p=t(d),v=p.next();!v.done;v=p.next()){var b=v.value;c.next(b)}}catch(S){f={error:S}}finally{try{v&&!v.done&&(m=p.return)&&m.call(p)}finally{if(f)throw f.error}}c.complete()},void 0,function(){d=null}))})}e.takeLast=a}}),ON=V({"../../node_modules/rxjs/dist/cjs/internal/operators/last.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.last=void 0;var t=ul(),n=fo(),r=yx(),i=Lf(),a=Rf(),s=er();function o(c,d){var f=arguments.length>=2;return function(m){return m.pipe(c?n.filter(function(p,v){return c(p,v,m)}):s.identity,r.takeLast(1),f?a.defaultIfEmpty(d):i.throwIfEmpty(function(){return new t.EmptyError}))}}e.last=o}}),bN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/materialize.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.materialize=void 0;var t=ix(),n=ye(),r=Re();function i(){return n.operate(function(a,s){a.subscribe(r.createOperatorSubscriber(s,function(o){s.next(t.Notification.createNext(o))},function(){s.next(t.Notification.createComplete()),s.complete()},function(o){s.next(t.Notification.createError(o)),s.complete()}))})}e.materialize=i}}),yN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/max.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.max=void 0;var t=Vc(),n=Mt();function r(i){return t.reduce(n.isFunction(i)?function(a,s){return i(a,s)>0?a:s}:function(a,s){return a>s?a:s})}e.max=r}}),SN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/flatMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.flatMap=void 0;var t=ts();e.flatMap=t.mergeMap}}),xN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMapTo=void 0;var t=ts(),n=Mt();function r(i,a,s){return s===void 0&&(s=1/0),n.isFunction(a)?t.mergeMap(function(){return i},a,s):(typeof a=="number"&&(s=a),t.mergeMap(function(){return i},s))}e.mergeMapTo=r}}),_N=V({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeScan=void 0;var t=ye(),n=ox();function r(i,a,s){return s===void 0&&(s=1/0),t.operate(function(o,c){var d=a;return n.mergeInternals(o,c,function(f,m){return i(d,f,m)},s,function(f){d=f},!1,void 0,function(){return d=null})})}e.mergeScan=r}}),wN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/merge.js"(e){var t=e&&e.__read||function(c,d){var f=typeof Symbol=="function"&&c[Symbol.iterator];if(!f)return c;var m=f.call(c),p,v=[],b;try{for(;(d===void 0||d-- >0)&&!(p=m.next()).done;)v.push(p.value)}catch(S){b={error:S}}finally{try{p&&!p.done&&(f=m.return)&&f.call(m)}finally{if(b)throw b.error}}return v},n=e&&e.__spreadArray||function(c,d){for(var f=0,m=d.length,p=c.length;f<m;f++,p++)c[p]=d[f];return c};Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var r=ye(),i=Nf(),a=Ur(),s=co();function o(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];var f=a.popScheduler(c),m=a.popNumber(c,1/0);return r.operate(function(p,v){i.mergeAll(m)(s.from(n([p],t(c)),f)).subscribe(v)})}e.merge=o}}),kN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js"(e){var t=e&&e.__read||function(a,s){var o=typeof Symbol=="function"&&a[Symbol.iterator];if(!o)return a;var c=o.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var o=0,c=s.length,d=a.length;o<c;o++,d++)a[d]=s[o];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.mergeWith=void 0;var r=wN();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.merge.apply(void 0,n([],t(a)))}e.mergeWith=i}}),jN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/min.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.min=void 0;var t=Vc(),n=Mt();function r(i){return t.reduce(n.isFunction(i)?function(a,s){return i(a,s)<0?a:s}:function(a,s){return a<s?a:s})}e.min=r}}),gg=V({"../../node_modules/rxjs/dist/cjs/internal/operators/multicast.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.multicast=void 0;var t=ug(),n=Mt(),r=pg();function i(a,s){var o=n.isFunction(a)?a:function(){return a};return n.isFunction(s)?r.connect(s,{connector:o}):function(c){return new t.ConnectableObservable(c,o)}}e.multicast=i}}),TN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js"(e){var t=e&&e.__read||function(s,o){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(o===void 0||o-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(v){p={error:v}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,o){for(var c=0,d=o.length,f=s.length;c<d;c++,f++)s[f]=o[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.onErrorResumeNext=e.onErrorResumeNextWith=void 0;var r=$c(),i=DQ();function a(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var c=r.argsOrArgArray(s);return function(d){return i.onErrorResumeNext.apply(void 0,n([d],t(c)))}}e.onErrorResumeNextWith=a,e.onErrorResumeNext=a}}),EN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/pairwise.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pairwise=void 0;var t=ye(),n=Re();function r(){return t.operate(function(i,a){var s,o=!1;i.subscribe(n.createOperatorSubscriber(a,function(c){var d=s;s=c,o&&a.next([d,c]),o=!0}))})}e.pairwise=r}}),CN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/pluck.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pluck=void 0;var t=uo();function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=r.length;if(a===0)throw new Error("list of properties cannot be empty.");return t.map(function(s){for(var o=s,c=0;c<a;c++){var d=o==null?void 0:o[r[c]];if(typeof d<"u")o=d;else return}return o})}e.pluck=n}}),AN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/publish.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publish=void 0;var t=tr(),n=gg(),r=pg();function i(a){return a?function(s){return r.connect(a)(s)}:function(s){return n.multicast(new t.Subject)(s)}}e.publish=i}}),PN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publishBehavior=void 0;var t=OQ(),n=ug();function r(i){return function(a){var s=new t.BehaviorSubject(i);return new n.ConnectableObservable(a,function(){return s})}}e.publishBehavior=r}}),QN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/publishLast.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publishLast=void 0;var t=ex(),n=ug();function r(){return function(i){var a=new t.AsyncSubject;return new n.ConnectableObservable(i,function(){return a})}}e.publishLast=r}}),NN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.publishReplay=void 0;var t=JS(),n=gg(),r=Mt();function i(a,s,o,c){o&&!r.isFunction(o)&&(c=o);var d=r.isFunction(o)?o:void 0;return function(f){return n.multicast(new t.ReplaySubject(a,s,c),d)(f)}}e.publishReplay=i}}),Sx=V({"../../node_modules/rxjs/dist/cjs/internal/operators/raceWith.js"(e){var t=e&&e.__read||function(o,c){var d=typeof Symbol=="function"&&o[Symbol.iterator];if(!d)return o;var f=d.call(o),m,p=[],v;try{for(;(c===void 0||c-- >0)&&!(m=f.next()).done;)p.push(m.value)}catch(b){v={error:b}}finally{try{m&&!m.done&&(d=f.return)&&d.call(f)}finally{if(v)throw v.error}}return p},n=e&&e.__spreadArray||function(o,c){for(var d=0,f=c.length,m=o.length;d<f;d++,m++)o[m]=c[d];return o};Object.defineProperty(e,"__esModule",{value:!0}),e.raceWith=void 0;var r=IQ(),i=ye(),a=er();function s(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];return o.length?i.operate(function(d,f){r.raceInit(n([d],t(o)))(f)}):a.identity}e.raceWith=s}}),RN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/repeat.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.repeat=void 0;var t=da(),n=ye(),r=Re(),i=Je(),a=fl();function s(o){var c,d=1/0,f;return o!=null&&(typeof o=="object"?(c=o.count,d=c===void 0?1/0:c,f=o.delay):d=o),d<=0?function(){return t.EMPTY}:n.operate(function(m,p){var v=0,b,S=function(){if(b==null||b.unsubscribe(),b=null,f!=null){var w=typeof f=="number"?a.timer(f):i.innerFrom(f(v)),j=r.createOperatorSubscriber(p,function(){j.unsubscribe(),x()});w.subscribe(j)}else x()},x=function(){var w=!1;b=m.subscribe(r.createOperatorSubscriber(p,void 0,function(){++v<d?b?S():w=!0:p.complete()})),w&&S()};x()})}e.repeat=s}}),MN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.repeatWhen=void 0;var t=Je(),n=tr(),r=ye(),i=Re();function a(s){return r.operate(function(o,c){var d,f=!1,m,p=!1,v=!1,b=function(){return v&&p&&(c.complete(),!0)},S=function(){return m||(m=new n.Subject,t.innerFrom(s(m)).subscribe(i.createOperatorSubscriber(c,function(){d?x():f=!0},function(){p=!0,b()}))),m},x=function(){v=!1,d=o.subscribe(i.createOperatorSubscriber(c,void 0,function(){v=!0,!b()&&S().next()})),f&&(d.unsubscribe(),d=null,f=!1,x())};x()})}e.repeatWhen=a}}),LN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/retry.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.retry=void 0;var t=ye(),n=Re(),r=er(),i=fl(),a=Je();function s(o){o===void 0&&(o=1/0);var c;o&&typeof o=="object"?c=o:c={count:o};var d=c.count,f=d===void 0?1/0:d,m=c.delay,p=c.resetOnSuccess,v=p===void 0?!1:p;return f<=0?r.identity:t.operate(function(b,S){var x=0,w,j=function(){var T=!1;w=b.subscribe(n.createOperatorSubscriber(S,function(A){v&&(x=0),S.next(A)},void 0,function(A){if(x++<f){var Q=function(){w?(w.unsubscribe(),w=null,j()):T=!0};if(m!=null){var C=typeof m=="number"?i.timer(m):a.innerFrom(m(A,x)),R=n.createOperatorSubscriber(S,function(){R.unsubscribe(),Q()},function(){S.complete()});C.subscribe(R)}else Q()}else S.error(A)})),T&&(w.unsubscribe(),w=null,j())};j()})}e.retry=s}}),DN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.retryWhen=void 0;var t=Je(),n=tr(),r=ye(),i=Re();function a(s){return r.operate(function(o,c){var d,f=!1,m,p=function(){d=o.subscribe(i.createOperatorSubscriber(c,void 0,void 0,function(v){m||(m=new n.Subject,t.innerFrom(s(m)).subscribe(i.createOperatorSubscriber(c,function(){return d?p():f=!0}))),m&&m.next(v)})),f&&(d.unsubscribe(),d=null,f=!1,p())};p()})}e.retryWhen=a}}),xx=V({"../../node_modules/rxjs/dist/cjs/internal/operators/sample.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sample=void 0;var t=Je(),n=ye(),r=Jn(),i=Re();function a(s){return n.operate(function(o,c){var d=!1,f=null;o.subscribe(i.createOperatorSubscriber(c,function(m){d=!0,f=m})),t.innerFrom(s).subscribe(i.createOperatorSubscriber(c,function(){if(d){d=!1;var m=f;f=null,c.next(m)}},r.noop))})}e.sample=a}}),zN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sampleTime=void 0;var t=Vr(),n=xx(),r=LQ();function i(a,s){return s===void 0&&(s=t.asyncScheduler),n.sample(r.interval(a,s))}e.sampleTime=i}}),IN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/scan.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.scan=void 0;var t=ye(),n=YQ();function r(i,a){return t.operate(n.scanInternals(i,a,arguments.length>=2,!0))}e.scan=r}}),qN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sequenceEqual=void 0;var t=ye(),n=Re(),r=Je();function i(s,o){return o===void 0&&(o=function(c,d){return c===d}),t.operate(function(c,d){var f=a(),m=a(),p=function(b){d.next(b),d.complete()},v=function(b,S){var x=n.createOperatorSubscriber(d,function(w){var j=S.buffer,T=S.complete;j.length===0?T?p(!1):b.buffer.push(w):!o(w,j.shift())&&p(!1)},function(){b.complete=!0;var w=S.complete,j=S.buffer;w&&p(j.length===0),x==null||x.unsubscribe()});return x};c.subscribe(v(f,m)),r.innerFrom(s).subscribe(v(m,f))})}e.sequenceEqual=i;function a(){return{buffer:[],complete:!1}}}}),_x=V({"../../node_modules/rxjs/dist/cjs/internal/operators/share.js"(e){var t=e&&e.__read||function(d,f){var m=typeof Symbol=="function"&&d[Symbol.iterator];if(!m)return d;var p=m.call(d),v,b=[],S;try{for(;(f===void 0||f-- >0)&&!(v=p.next()).done;)b.push(v.value)}catch(x){S={error:x}}finally{try{v&&!v.done&&(m=p.return)&&m.call(p)}finally{if(S)throw S.error}}return b},n=e&&e.__spreadArray||function(d,f){for(var m=0,p=f.length,v=d.length;m<p;m++,v++)d[v]=f[m];return d};Object.defineProperty(e,"__esModule",{value:!0}),e.share=void 0;var r=Je(),i=tr(),a=Ef(),s=ye();function o(d){d===void 0&&(d={});var f=d.connector,m=f===void 0?function(){return new i.Subject}:f,p=d.resetOnError,v=p===void 0?!0:p,b=d.resetOnComplete,S=b===void 0?!0:b,x=d.resetOnRefCountZero,w=x===void 0?!0:x;return function(j){var T,A,Q,C=0,R=!1,D=!1,L=function(){A==null||A.unsubscribe(),A=void 0},P=function(){L(),T=Q=void 0,R=D=!1},Z=function(){var X=T;P(),X==null||X.unsubscribe()};return s.operate(function(X,B){C++,!D&&!R&&L();var Y=Q=Q??m();B.add(function(){C--,C===0&&!D&&!R&&(A=c(Z,w))}),Y.subscribe(B),!T&&C>0&&(T=new a.SafeSubscriber({next:function(H){return Y.next(H)},error:function(H){D=!0,L(),A=c(P,v,H),Y.error(H)},complete:function(){R=!0,L(),A=c(P,S),Y.complete()}}),r.innerFrom(X).subscribe(T))})(j)}}e.share=o;function c(d,f){for(var m=[],p=2;p<arguments.length;p++)m[p-2]=arguments[p];if(f===!0){d();return}if(f!==!1){var v=new a.SafeSubscriber({next:function(){v.unsubscribe(),d()}});return r.innerFrom(f.apply(void 0,n([],t(m)))).subscribe(v)}}}}),BN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.shareReplay=void 0;var t=JS(),n=_x();function r(i,a,s){var o,c,d,f,m=!1;return i&&typeof i=="object"?(o=i.bufferSize,f=o===void 0?1/0:o,c=i.windowTime,a=c===void 0?1/0:c,d=i.refCount,m=d===void 0?!1:d,s=i.scheduler):f=i??1/0,n.share({connector:function(){return new t.ReplaySubject(f,a,s)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:m})}e.shareReplay=r}}),XN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/single.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.single=void 0;var t=ul(),n=QQ(),r=PQ(),i=ye(),a=Re();function s(o){return i.operate(function(c,d){var f=!1,m,p=!1,v=0;c.subscribe(a.createOperatorSubscriber(d,function(b){p=!0,(!o||o(b,v++,c))&&(f&&d.error(new n.SequenceError("Too many matching values")),f=!0,m=b)},function(){f?(d.next(m),d.complete()):d.error(p?new r.NotFoundError("No matching values"):new t.EmptyError)}))})}e.single=s}}),ZN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/skip.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skip=void 0;var t=fo();function n(r){return t.filter(function(i,a){return r<=a})}e.skip=n}}),$N=V({"../../node_modules/rxjs/dist/cjs/internal/operators/skipLast.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skipLast=void 0;var t=er(),n=ye(),r=Re();function i(a){return a<=0?t.identity:n.operate(function(s,o){var c=new Array(a),d=0;return s.subscribe(r.createOperatorSubscriber(o,function(f){var m=d++;if(m<a)c[m]=f;else{var p=m%a,v=c[p];c[p]=f,o.next(v)}})),function(){c=null}})}e.skipLast=i}}),VN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skipUntil=void 0;var t=ye(),n=Re(),r=Je(),i=Jn();function a(s){return t.operate(function(o,c){var d=!1,f=n.createOperatorSubscriber(c,function(){f==null||f.unsubscribe(),d=!0},i.noop);r.innerFrom(s).subscribe(f),o.subscribe(n.createOperatorSubscriber(c,function(m){return d&&c.next(m)}))})}e.skipUntil=a}}),UN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.skipWhile=void 0;var t=ye(),n=Re();function r(i){return t.operate(function(a,s){var o=!1,c=0;a.subscribe(n.createOperatorSubscriber(s,function(d){return(o||(o=!i(d,c++)))&&s.next(d)}))})}e.skipWhile=r}}),YN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/startWith.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.startWith=void 0;var t=hg(),n=Ur(),r=ye();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var o=n.popScheduler(a);return r.operate(function(c,d){(o?t.concat(a,c,o):t.concat(a,c)).subscribe(d)})}e.startWith=i}}),Df=V({"../../node_modules/rxjs/dist/cjs/internal/operators/switchMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchMap=void 0;var t=Je(),n=ye(),r=Re();function i(a,s){return n.operate(function(o,c){var d=null,f=0,m=!1,p=function(){return m&&!d&&c.complete()};o.subscribe(r.createOperatorSubscriber(c,function(v){d==null||d.unsubscribe();var b=0,S=f++;t.innerFrom(a(v,S)).subscribe(d=r.createOperatorSubscriber(c,function(x){return c.next(s?s(v,x,S,b++):x)},function(){d=null,p()}))},function(){m=!0,p()}))})}e.switchMap=i}}),FN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/switchAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchAll=void 0;var t=Df(),n=er();function r(){return t.switchMap(n.identity)}e.switchAll=r}}),WN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchMapTo=void 0;var t=Df(),n=Mt();function r(i,a){return n.isFunction(a)?t.switchMap(function(){return i},a):t.switchMap(function(){return i})}e.switchMapTo=r}}),HN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/switchScan.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.switchScan=void 0;var t=Df(),n=ye();function r(i,a){return n.operate(function(s,o){var c=a;return t.switchMap(function(d,f){return i(c,d,f)},function(d,f){return c=f,f})(s).subscribe(o),function(){c=null}})}e.switchScan=r}}),GN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.takeUntil=void 0;var t=ye(),n=Re(),r=Je(),i=Jn();function a(s){return t.operate(function(o,c){r.innerFrom(s).subscribe(n.createOperatorSubscriber(c,function(){return c.complete()},i.noop)),!c.closed&&o.subscribe(c)})}e.takeUntil=a}}),KN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.takeWhile=void 0;var t=ye(),n=Re();function r(i,a){return a===void 0&&(a=!1),t.operate(function(s,o){var c=0;s.subscribe(n.createOperatorSubscriber(o,function(d){var f=i(d,c++);(f||a)&&o.next(d),!f&&o.complete()}))})}e.takeWhile=r}}),JN=V({"../../node_modules/rxjs/dist/cjs/internal/operators/tap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.tap=void 0;var t=Mt(),n=ye(),r=Re(),i=er();function a(s,o,c){var d=t.isFunction(s)||o||c?{next:s,error:o,complete:c}:s;return d?n.operate(function(f,m){var p;(p=d.subscribe)===null||p===void 0||p.call(d);var v=!0;f.subscribe(r.createOperatorSubscriber(m,function(b){var S;(S=d.next)===null||S===void 0||S.call(d,b),m.next(b)},function(){var b;v=!1,(b=d.complete)===null||b===void 0||b.call(d),m.complete()},function(b){var S;v=!1,(S=d.error)===null||S===void 0||S.call(d,b),m.error(b)},function(){var b,S;v&&((b=d.unsubscribe)===null||b===void 0||b.call(d)),(S=d.finalize)===null||S===void 0||S.call(d)}))}):i.identity}e.tap=a}}),wx=V({"../../node_modules/rxjs/dist/cjs/internal/operators/throttle.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=void 0;var t=ye(),n=Re(),r=Je();function i(a,s){return t.operate(function(o,c){var d=s??{},f=d.leading,m=f===void 0?!0:f,p=d.trailing,v=p===void 0?!1:p,b=!1,S=null,x=null,w=!1,j=function(){x==null||x.unsubscribe(),x=null,v&&(Q(),w&&c.complete())},T=function(){x=null,w&&c.complete()},A=function(C){return x=r.innerFrom(a(C)).subscribe(n.createOperatorSubscriber(c,j,T))},Q=function(){if(b){b=!1;var C=S;S=null,c.next(C),!w&&A(C)}};o.subscribe(n.createOperatorSubscriber(c,function(C){b=!0,S=C,!(x&&!x.closed)&&(m?Q():A(C))},function(){w=!0,!(v&&b&&x&&!x.closed)&&c.complete()}))})}e.throttle=i}}),eR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.throttleTime=void 0;var t=Vr(),n=wx(),r=fl();function i(a,s,o){s===void 0&&(s=t.asyncScheduler);var c=r.timer(a,s);return n.throttle(function(){return c},o)}e.throttleTime=i}}),tR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimeInterval=e.timeInterval=void 0;var t=Vr(),n=ye(),r=Re();function i(s){return s===void 0&&(s=t.asyncScheduler),n.operate(function(o,c){var d=s.now();o.subscribe(r.createOperatorSubscriber(c,function(f){var m=s.now(),p=m-d;d=m,c.next(new a(f,p))}))})}e.timeInterval=i;var a=(function(){function s(o,c){this.value=o,this.interval=c}return s})();e.TimeInterval=a}}),nR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutWith=void 0;var t=Vr(),n=ax(),r=jp();function i(a,s,o){var c,d,f;if(o=o??t.async,n.isValidDate(a)?c=a:typeof a=="number"&&(d=a),s)f=function(){return s};else throw new TypeError("No observable provided to switch to");if(c==null&&d==null)throw new TypeError("No timeout provided.");return r.timeout({first:c,each:d,scheduler:o,with:f})}e.timeoutWith=i}}),rR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/timestamp.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timestamp=void 0;var t=KS(),n=uo();function r(i){return i===void 0&&(i=t.dateTimestampProvider),n.map(function(a){return{value:a,timestamp:i.now()}})}e.timestamp=r}}),iR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/window.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.window=void 0;var t=tr(),n=ye(),r=Re(),i=Jn(),a=Je();function s(o){return n.operate(function(c,d){var f=new t.Subject;d.next(f.asObservable());var m=function(p){f.error(p),d.error(p)};return c.subscribe(r.createOperatorSubscriber(d,function(p){return f==null?void 0:f.next(p)},function(){f.complete(),d.complete()},m)),a.innerFrom(o).subscribe(r.createOperatorSubscriber(d,function(){f.complete(),d.next(f=new t.Subject)},i.noop,m)),function(){f==null||f.unsubscribe(),f=null}})}e.window=s}}),aR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/windowCount.js"(e){var t=e&&e.__values||function(s){var o=typeof Symbol=="function"&&Symbol.iterator,c=o&&s[o],d=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.windowCount=void 0;var n=tr(),r=ye(),i=Re();function a(s,o){o===void 0&&(o=0);var c=o>0?o:s;return r.operate(function(d,f){var m=[new n.Subject],p=0;f.next(m[0].asObservable()),d.subscribe(i.createOperatorSubscriber(f,function(v){var b,S;try{for(var x=t(m),w=x.next();!w.done;w=x.next()){var j=w.value;j.next(v)}}catch(Q){b={error:Q}}finally{try{w&&!w.done&&(S=x.return)&&S.call(x)}finally{if(b)throw b.error}}var T=p-s+1;if(T>=0&&T%c===0&&m.shift().complete(),++p%c===0){var A=new n.Subject;m.push(A),f.next(A.asObservable())}},function(){for(;m.length>0;)m.shift().complete();f.complete()},function(v){for(;m.length>0;)m.shift().error(v);f.error(v)},function(){m=null}))})}e.windowCount=a}}),sR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/windowTime.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.windowTime=void 0;var t=tr(),n=Vr(),r=gi(),i=ye(),a=Re(),s=oo(),o=Ur(),c=lo();function d(f){for(var m,p,v=[],b=1;b<arguments.length;b++)v[b-1]=arguments[b];var S=(m=o.popScheduler(v))!==null&&m!==void 0?m:n.asyncScheduler,x=(p=v[0])!==null&&p!==void 0?p:null,w=v[1]||1/0;return i.operate(function(j,T){var A=[],Q=!1,C=function(P){var Z=P.window,X=P.subs;Z.complete(),X.unsubscribe(),s.arrRemove(A,P),Q&&R()},R=function(){if(A){var P=new r.Subscription;T.add(P);var Z=new t.Subject,X={window:Z,subs:P,seen:0};A.push(X),T.next(Z.asObservable()),c.executeSchedule(P,S,function(){return C(X)},f)}};x!==null&&x>=0?c.executeSchedule(T,S,R,x,!0):Q=!0,R();var D=function(P){return A.slice().forEach(P)},L=function(P){D(function(Z){var X=Z.window;return P(X)}),P(T),T.unsubscribe()};return j.subscribe(a.createOperatorSubscriber(T,function(P){D(function(Z){Z.window.next(P),w<=++Z.seen&&C(Z)})},function(){return L(function(P){return P.complete()})},function(P){return L(function(Z){return Z.error(P)})})),function(){A=null}})}e.windowTime=d}}),oR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js"(e){var t=e&&e.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,p=m&&f[m],v=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&v>=f.length&&(f=void 0),{value:f&&f[v++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.windowToggle=void 0;var n=tr(),r=gi(),i=ye(),a=Je(),s=Re(),o=Jn(),c=oo();function d(f,m){return i.operate(function(p,v){var b=[],S=function(x){for(;0<b.length;)b.shift().error(x);v.error(x)};a.innerFrom(f).subscribe(s.createOperatorSubscriber(v,function(x){var w=new n.Subject;b.push(w);var j=new r.Subscription,T=function(){c.arrRemove(b,w),w.complete(),j.unsubscribe()},A;try{A=a.innerFrom(m(x))}catch(Q){S(Q);return}v.next(w.asObservable()),j.add(A.subscribe(s.createOperatorSubscriber(v,T,o.noop,S)))},o.noop)),p.subscribe(s.createOperatorSubscriber(v,function(x){var w,j,T=b.slice();try{for(var A=t(T),Q=A.next();!Q.done;Q=A.next()){var C=Q.value;C.next(x)}}catch(R){w={error:R}}finally{try{Q&&!Q.done&&(j=A.return)&&j.call(A)}finally{if(w)throw w.error}}},function(){for(;0<b.length;)b.shift().complete();v.complete()},S,function(){for(;0<b.length;)b.shift().unsubscribe()}))})}e.windowToggle=d}}),lR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.windowWhen=void 0;var t=tr(),n=ye(),r=Re(),i=Je();function a(s){return n.operate(function(o,c){var d,f,m=function(v){d.error(v),c.error(v)},p=function(){f==null||f.unsubscribe(),d==null||d.complete(),d=new t.Subject,c.next(d.asObservable());var v;try{v=i.innerFrom(s())}catch(b){m(b);return}v.subscribe(f=r.createOperatorSubscriber(c,p,p,m))};p(),o.subscribe(r.createOperatorSubscriber(c,function(v){return d.next(v)},function(){d.complete(),c.complete()},m,function(){f==null||f.unsubscribe(),d=null}))})}e.windowWhen=a}}),cR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js"(e){var t=e&&e.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var v=p.call(f),b,S=[],x;try{for(;(m===void 0||m-- >0)&&!(b=v.next()).done;)S.push(b.value)}catch(w){x={error:w}}finally{try{b&&!b.done&&(p=v.return)&&p.call(v)}finally{if(x)throw x.error}}return S},n=e&&e.__spreadArray||function(f,m){for(var p=0,v=m.length,b=f.length;p<v;p++,b++)f[b]=m[p];return f};Object.defineProperty(e,"__esModule",{value:!0}),e.withLatestFrom=void 0;var r=ye(),i=Re(),a=Je(),s=er(),o=Jn(),c=Ur();function d(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var p=c.popResultSelector(f);return r.operate(function(v,b){for(var S=f.length,x=new Array(S),w=f.map(function(){return!1}),j=!1,T=function(Q){a.innerFrom(f[Q]).subscribe(i.createOperatorSubscriber(b,function(C){x[Q]=C,!j&&!w[Q]&&(w[Q]=!0,(j=w.every(s.identity))&&(w=null))},o.noop))},A=0;A<S;A++)T(A);v.subscribe(i.createOperatorSubscriber(b,function(Q){if(j){var C=n([Q],t(x));b.next(p?p.apply(void 0,n([],t(C))):C)}}))})}e.withLatestFrom=d}}),uR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/zipAll.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.zipAll=void 0;var t=lx(),n=FQ();function r(i){return n.joinAllInternals(t.zip,i)}e.zipAll=r}}),dR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/zip.js"(e){var t=e&&e.__read||function(s,o){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(o===void 0||o-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(v){p={error:v}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,o){for(var c=0,d=o.length,f=s.length;c<d;c++,f++)s[f]=o[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.zip=void 0;var r=lx(),i=ye();function a(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];return i.operate(function(c,d){r.zip.apply(void 0,n([c],t(s))).subscribe(d)})}e.zip=a}}),fR=V({"../../node_modules/rxjs/dist/cjs/internal/operators/zipWith.js"(e){var t=e&&e.__read||function(a,s){var o=typeof Symbol=="function"&&a[Symbol.iterator];if(!o)return a;var c=o.call(a),d,f=[],m;try{for(;(s===void 0||s-- >0)&&!(d=c.next()).done;)f.push(d.value)}catch(p){m={error:p}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(m)throw m.error}}return f},n=e&&e.__spreadArray||function(a,s){for(var o=0,c=s.length,d=a.length;o<c;o++,d++)a[d]=s[o];return a};Object.defineProperty(e,"__esModule",{value:!0}),e.zipWith=void 0;var r=dR();function i(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.zip.apply(void 0,n([],t(a)))}e.zipWith=i}}),zi=V({"../../node_modules/rxjs/dist/cjs/index.js"(e){var t=e&&e.__createBinding||(Object.create?(function(Sa,cs,_i,xa){xa===void 0&&(xa=_i),Object.defineProperty(Sa,xa,{enumerable:!0,get:function(){return cs[_i]}})}):(function(Sa,cs,_i,xa){xa===void 0&&(xa=_i),Sa[xa]=cs[_i]})),n=e&&e.__exportStar||function(Sa,cs){for(var _i in Sa)_i!=="default"&&!Object.prototype.hasOwnProperty.call(cs,_i)&&t(cs,Sa,_i)};Object.defineProperty(e,"__esModule",{value:!0}),e.interval=e.iif=e.generate=e.fromEventPattern=e.fromEvent=e.from=e.forkJoin=e.empty=e.defer=e.connectable=e.concat=e.combineLatest=e.bindNodeCallback=e.bindCallback=e.UnsubscriptionError=e.TimeoutError=e.SequenceError=e.ObjectUnsubscribedError=e.NotFoundError=e.EmptyError=e.ArgumentOutOfRangeError=e.firstValueFrom=e.lastValueFrom=e.isObservable=e.identity=e.noop=e.pipe=e.NotificationKind=e.Notification=e.Subscriber=e.Subscription=e.Scheduler=e.VirtualAction=e.VirtualTimeScheduler=e.animationFrameScheduler=e.animationFrame=e.queueScheduler=e.queue=e.asyncScheduler=e.async=e.asapScheduler=e.asap=e.AsyncSubject=e.ReplaySubject=e.BehaviorSubject=e.Subject=e.animationFrames=e.observable=e.ConnectableObservable=e.Observable=void 0,e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.combineLatestWith=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=e.config=e.NEVER=e.EMPTY=e.scheduled=e.zip=e.using=e.timer=e.throwError=e.range=e.race=e.partition=e.pairs=e.onErrorResumeNext=e.of=e.never=e.merge=void 0,e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.pairwise=e.onErrorResumeNextWith=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=e.mergeAll=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=void 0,e.zipWith=e.zipAll=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=void 0;var r=Xt();Object.defineProperty(e,"Observable",{enumerable:!0,get:function(){return r.Observable}});var i=ug();Object.defineProperty(e,"ConnectableObservable",{enumerable:!0,get:function(){return i.ConnectableObservable}});var a=lg();Object.defineProperty(e,"observable",{enumerable:!0,get:function(){return a.observable}});var s=PZ();Object.defineProperty(e,"animationFrames",{enumerable:!0,get:function(){return s.animationFrames}});var o=tr();Object.defineProperty(e,"Subject",{enumerable:!0,get:function(){return o.Subject}});var c=OQ();Object.defineProperty(e,"BehaviorSubject",{enumerable:!0,get:function(){return c.BehaviorSubject}});var d=JS();Object.defineProperty(e,"ReplaySubject",{enumerable:!0,get:function(){return d.ReplaySubject}});var f=ex();Object.defineProperty(e,"AsyncSubject",{enumerable:!0,get:function(){return f.AsyncSubject}});var m=zZ();Object.defineProperty(e,"asap",{enumerable:!0,get:function(){return m.asap}}),Object.defineProperty(e,"asapScheduler",{enumerable:!0,get:function(){return m.asapScheduler}});var p=Vr();Object.defineProperty(e,"async",{enumerable:!0,get:function(){return p.async}}),Object.defineProperty(e,"asyncScheduler",{enumerable:!0,get:function(){return p.asyncScheduler}});var v=BZ();Object.defineProperty(e,"queue",{enumerable:!0,get:function(){return v.queue}}),Object.defineProperty(e,"queueScheduler",{enumerable:!0,get:function(){return v.queueScheduler}});var b=$Z();Object.defineProperty(e,"animationFrame",{enumerable:!0,get:function(){return b.animationFrame}}),Object.defineProperty(e,"animationFrameScheduler",{enumerable:!0,get:function(){return b.animationFrameScheduler}});var S=VZ();Object.defineProperty(e,"VirtualTimeScheduler",{enumerable:!0,get:function(){return S.VirtualTimeScheduler}}),Object.defineProperty(e,"VirtualAction",{enumerable:!0,get:function(){return S.VirtualAction}});var x=bQ();Object.defineProperty(e,"Scheduler",{enumerable:!0,get:function(){return x.Scheduler}});var w=gi();Object.defineProperty(e,"Subscription",{enumerable:!0,get:function(){return w.Subscription}});var j=Ef();Object.defineProperty(e,"Subscriber",{enumerable:!0,get:function(){return j.Subscriber}});var T=ix();Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return T.Notification}}),Object.defineProperty(e,"NotificationKind",{enumerable:!0,get:function(){return T.NotificationKind}});var A=cg();Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return A.pipe}});var Q=Jn();Object.defineProperty(e,"noop",{enumerable:!0,get:function(){return Q.noop}});var C=er();Object.defineProperty(e,"identity",{enumerable:!0,get:function(){return C.identity}});var R=HZ();Object.defineProperty(e,"isObservable",{enumerable:!0,get:function(){return R.isObservable}});var D=GZ();Object.defineProperty(e,"lastValueFrom",{enumerable:!0,get:function(){return D.lastValueFrom}});var L=KZ();Object.defineProperty(e,"firstValueFrom",{enumerable:!0,get:function(){return L.firstValueFrom}});var P=AQ();Object.defineProperty(e,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return P.ArgumentOutOfRangeError}});var Z=ul();Object.defineProperty(e,"EmptyError",{enumerable:!0,get:function(){return Z.EmptyError}});var X=PQ();Object.defineProperty(e,"NotFoundError",{enumerable:!0,get:function(){return X.NotFoundError}});var B=vQ();Object.defineProperty(e,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return B.ObjectUnsubscribedError}});var Y=QQ();Object.defineProperty(e,"SequenceError",{enumerable:!0,get:function(){return Y.SequenceError}});var H=jp();Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return H.TimeoutError}});var q=hQ();Object.defineProperty(e,"UnsubscriptionError",{enumerable:!0,get:function(){return q.UnsubscriptionError}});var I=JZ();Object.defineProperty(e,"bindCallback",{enumerable:!0,get:function(){return I.bindCallback}});var ee=e$();Object.defineProperty(e,"bindNodeCallback",{enumerable:!0,get:function(){return ee.bindNodeCallback}});var W=sx();Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return W.combineLatest}});var z=hg();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return z.concat}});var ce=t$();Object.defineProperty(e,"connectable",{enumerable:!0,get:function(){return ce.connectable}});var se=mg();Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return se.defer}});var N=da();Object.defineProperty(e,"empty",{enumerable:!0,get:function(){return N.empty}});var le=n$();Object.defineProperty(e,"forkJoin",{enumerable:!0,get:function(){return le.forkJoin}});var pe=co();Object.defineProperty(e,"from",{enumerable:!0,get:function(){return pe.from}});var Oe=r$();Object.defineProperty(e,"fromEvent",{enumerable:!0,get:function(){return Oe.fromEvent}});var Be=i$();Object.defineProperty(e,"fromEventPattern",{enumerable:!0,get:function(){return Be.fromEventPattern}});var Ae=a$();Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return Ae.generate}});var Ze=s$();Object.defineProperty(e,"iif",{enumerable:!0,get:function(){return Ze.iif}});var xe=LQ();Object.defineProperty(e,"interval",{enumerable:!0,get:function(){return xe.interval}});var Ye=o$();Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return Ye.merge}});var Ue=Hj();Object.defineProperty(e,"never",{enumerable:!0,get:function(){return Ue.never}});var Qe=rx();Object.defineProperty(e,"of",{enumerable:!0,get:function(){return Qe.of}});var De=DQ();Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return De.onErrorResumeNext}});var mt=l$();Object.defineProperty(e,"pairs",{enumerable:!0,get:function(){return mt.pairs}});var Ve=c$();Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return Ve.partition}});var cn=IQ();Object.defineProperty(e,"race",{enumerable:!0,get:function(){return cn.race}});var je=u$();Object.defineProperty(e,"range",{enumerable:!0,get:function(){return je.range}});var We=CQ();Object.defineProperty(e,"throwError",{enumerable:!0,get:function(){return We.throwError}});var ge=fl();Object.defineProperty(e,"timer",{enumerable:!0,get:function(){return ge.timer}});var dt=d$();Object.defineProperty(e,"using",{enumerable:!0,get:function(){return dt.using}});var Et=lx();Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return Et.zip}});var Zt=EQ();Object.defineProperty(e,"scheduled",{enumerable:!0,get:function(){return Zt.scheduled}});var et=da();Object.defineProperty(e,"EMPTY",{enumerable:!0,get:function(){return et.EMPTY}});var Mn=Hj();Object.defineProperty(e,"NEVER",{enumerable:!0,get:function(){return Mn.NEVER}}),n(f$(),e);var re=Tf();Object.defineProperty(e,"config",{enumerable:!0,get:function(){return re.config}});var fe=cx();Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return fe.audit}});var Te=qQ();Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return Te.auditTime}});var $e=BQ();Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return $e.buffer}});var rt=XQ();Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return rt.bufferCount}});var Ct=ZQ();Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return Ct.bufferTime}});var Cn=$Q();Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return Cn.bufferToggle}});var Jt=VQ();Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return Jt.bufferWhen}});var Lt=UQ();Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return Lt.catchError}});var Ht=WQ();Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return Ht.combineAll}});var lt=dx();Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return lt.combineLatestAll}});var Vn=GQ();Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return Vn.combineLatestWith}});var mn=fg();Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return mn.concatAll}});var va=fx();Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return va.concatMap}});var Fr=KQ();Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return Fr.concatMapTo}});var Cr=eN();Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return Cr.concatWith}});var At=pg();Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return At.connect}});var Dt=tN();Object.defineProperty(e,"count",{enumerable:!0,get:function(){return Dt.count}});var kt=nN();Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return kt.debounce}});var pn=rN();Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return pn.debounceTime}});var gn=Rf();Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return gn.defaultIfEmpty}});var en=iN();Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return en.delay}});var vn=px();Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return vn.delayWhen}});var An=aN();Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return An.dematerialize}});var Yt=sN();Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return Yt.distinct}});var Ln=gx();Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return Ln.distinctUntilChanged}});var _e=oN();Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return _e.distinctUntilKeyChanged}});var He=lN();Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return He.elementAt}});var nn=cN();Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return nn.endWith}});var rr=uN();Object.defineProperty(e,"every",{enumerable:!0,get:function(){return rr.every}});var Dn=dN();Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return Dn.exhaust}});var dr=Ox();Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return dr.exhaustAll}});var Un=vx();Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return Un.exhaustMap}});var un=fN();Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return un.expand}});var Pn=fo();Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return Pn.filter}});var Ii=hN();Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return Ii.finalize}});var po=bx();Object.defineProperty(e,"find",{enumerable:!0,get:function(){return po.find}});var tu=mN();Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return tu.findIndex}});var nu=pN();Object.defineProperty(e,"first",{enumerable:!0,get:function(){return nu.first}});var bl=gN();Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return bl.groupBy}});var Oa=hx();Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return Oa.ignoreElements}});var go=vN();Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return go.isEmpty}});var qi=ON();Object.defineProperty(e,"last",{enumerable:!0,get:function(){return qi.last}});var Bi=uo();Object.defineProperty(e,"map",{enumerable:!0,get:function(){return Bi.map}});var ba=mx();Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return ba.mapTo}});var Xi=bN();Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return Xi.materialize}});var rn=yN();Object.defineProperty(e,"max",{enumerable:!0,get:function(){return rn.max}});var yl=Nf();Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return yl.mergeAll}});var Sl=SN();Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return Sl.flatMap}});var bi=ts();Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return bi.mergeMap}});var Zi=xN();Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return Zi.mergeMapTo}});var ru=_N();Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return ru.mergeScan}});var Jf=kN();Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return Jf.mergeWith}});var eh=jN();Object.defineProperty(e,"min",{enumerable:!0,get:function(){return eh.min}});var Zg=gg();Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return Zg.multicast}});var xl=Pf();Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return xl.observeOn}});var _l=TN();Object.defineProperty(e,"onErrorResumeNextWith",{enumerable:!0,get:function(){return _l.onErrorResumeNextWith}});var yi=EN();Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return yi.pairwise}});var fr=CN();Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return fr.pluck}});var th=AN();Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return th.publish}});var $g=PN();Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return $g.publishBehavior}});var iu=QN();Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return iu.publishLast}});var nh=NN();Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return nh.publishReplay}});var wl=Sx();Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return wl.raceWith}});var Vg=Vc();Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return Vg.reduce}});var hr=RN();Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return hr.repeat}});var au=MN();Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return au.repeatWhen}});var rh=LN();Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return rh.retry}});var su=DN();Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return su.retryWhen}});var as=GS();Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return as.refCount}});var ih=xx();Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return ih.sample}});var ah=zN();Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return ah.sampleTime}});var ss=IN();Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return ss.scan}});var Ug=qN();Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return Ug.sequenceEqual}});var sh=_x();Object.defineProperty(e,"share",{enumerable:!0,get:function(){return sh.share}});var oh=BN();Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return oh.shareReplay}});var ou=XN();Object.defineProperty(e,"single",{enumerable:!0,get:function(){return ou.single}});var Yg=ZN();Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return Yg.skip}});var Fg=$N();Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return Fg.skipLast}});var kl=VN();Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return kl.skipUntil}});var Si=UN();Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return Si.skipWhile}});var lu=YN();Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return lu.startWith}});var cu=Qf();Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return cu.subscribeOn}});var os=FN();Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return os.switchAll}});var ls=Df();Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return ls.switchMap}});var lh=WN();Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return lh.switchMapTo}});var uu=HN();Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return uu.switchScan}});var ch=Mf();Object.defineProperty(e,"take",{enumerable:!0,get:function(){return ch.take}});var vo=yx();Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return vo.takeLast}});var xi=GN();Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return xi.takeUntil}});var du=KN();Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return du.takeWhile}});var Oo=JN();Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return Oo.tap}});var $i=wx();Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return $i.throttle}});var fu=eR();Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return fu.throttleTime}});var jl=Lf();Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return jl.throwIfEmpty}});var uh=tR();Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return uh.timeInterval}});var Tl=jp();Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return Tl.timeout}});var El=nR();Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return El.timeoutWith}});var dh=rR();Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return dh.timestamp}});var Yn=ux();Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return Yn.toArray}});var ya=iR();Object.defineProperty(e,"window",{enumerable:!0,get:function(){return ya.window}});var Cl=aR();Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return Cl.windowCount}});var bo=sR();Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return bo.windowTime}});var Wg=oR();Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return Wg.windowToggle}});var hu=lR();Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return hu.windowWhen}});var mu=cR();Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return mu.withLatestFrom}});var yo=uR();Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return yo.zipAll}});var Al=fR();Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return Al.zipWith}})}}),m$=class{constructor(){if(typeof window>"u")throw new Error('WebBrowserStorage is client-only. It must not be constructed on the server — a single process-wide instance would leak tokens between HTTP requests. Wrap any code path that constructs this in "use client".')}get(e){return localStorage.getItem(e)}set(e,t){localStorage.setItem(e,t)}delete(e){localStorage.removeItem(e)}subscribe(e){const t=n=>{n.key!==null&&e(n.key,n.newValue)};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}},hR=k.createContext(null);function Nse({browser:e,storage:t,sessionFactory:n,children:r}){const i=k.useMemo(()=>e??_Z({storage:t??new m$,sessionFactory:n??xZ()}),[e,t,n]);return g.jsx(hR.Provider,{value:i,children:r})}function ot(){const e=k.useContext(hR);if(!e)throw new Error("useSemiont must be used within a <SemiontProvider>");return e}var p$={success:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),error:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),warning:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),info:g.jsx("svg",{className:"semiont-toast-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})};function g$({toast:e,onClose:t}){return k.useEffect(()=>{const n=setTimeout(()=>{t(e.id)},e.duration||3e3);return()=>clearTimeout(n)},[e,t]),g.jsxs("div",{className:"semiont-toast","data-variant":e.type,role:"alert",children:[g.jsx("div",{className:"semiont-toast-icon-wrapper",children:p$[e.type]}),g.jsx("p",{className:"semiont-toast-message",children:e.message}),g.jsx("button",{onClick:()=>t(e.id),className:"semiont-toast-close","aria-label":"Close",children:g.jsx("svg",{className:"semiont-toast-close-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}function v$({toasts:e,onClose:t}){const[n,r]=k.useState(!1);return k.useEffect(()=>(r(!0),()=>r(!1)),[]),n?Vo.createPortal(g.jsx("div",{className:"semiont-toast-container",children:e.map(i=>g.jsx(g$,{toast:i,onClose:t},i.id))}),document.body):null}var mR=de.createContext(void 0);function Rse({children:e}){const[t,n]=k.useState([]),r=de.useCallback((f,m="info",p)=>{const v=Date.now().toString(),b=p!==void 0?{id:v,message:f,type:m,duration:p}:{id:v,message:f,type:m};n(S=>[...S,b])},[]),i=de.useCallback((f,m)=>r(f,"success",m),[r]),a=de.useCallback((f,m)=>r(f,"error",m),[r]),s=de.useCallback((f,m)=>r(f,"warning",m),[r]),o=de.useCallback((f,m)=>r(f,"info",m),[r]),c=de.useCallback(f=>{n(m=>m.filter(p=>p.id!==f))},[]),d=de.useMemo(()=>({showToast:r,showSuccess:i,showError:a,showWarning:s,showInfo:o}),[r,i,a,s,o]);return g.jsxs(mR.Provider,{value:d,children:[e,g.jsx(v$,{toasts:t,onClose:c})]})}function pR(){const e=de.useContext(mR);if(e===void 0)throw new Error("useToast must be used within a ToastProvider");return e}var O$=Vq({"../../translations/ar.json":()=>Pe(()=>import("./ar-UUMMNQKF-xeh4Cwx2.js"),[]),"../../translations/bn.json":()=>Pe(()=>import("./bn-AL5BJSR3-Dz19S8vN.js"),[]),"../../translations/cs.json":()=>Pe(()=>import("./cs-UMINALSU-HHT-dcWL.js"),[]),"../../translations/da.json":()=>Pe(()=>import("./da-FKUX6CDL-BpdJ67RW.js"),[]),"../../translations/de.json":()=>Pe(()=>import("./de-XSJ3E25S-DJ6EvHYY.js"),[]),"../../translations/el.json":()=>Pe(()=>import("./el-UJXNRCBP-DhRdKHlx.js"),[]),"../../translations/en.json":()=>Pe(()=>Promise.resolve().then(()=>kse),void 0),"../../translations/es.json":()=>Pe(()=>import("./es-VURP62BU-CgnB380t.js"),[]),"../../translations/fa.json":()=>Pe(()=>import("./fa-TIT5ZPZY-D28qBiUW.js"),[]),"../../translations/fi.json":()=>Pe(()=>import("./fi-F7VTGT4H-BeG0kw0Q.js"),[]),"../../translations/fr.json":()=>Pe(()=>import("./fr-2ZR26VF7-BwamaA96.js"),[]),"../../translations/he.json":()=>Pe(()=>import("./he-BXP2KYVZ-DuKmwNm_.js"),[]),"../../translations/hi.json":()=>Pe(()=>import("./hi-PSWTP3NC-B7v6ttqy.js"),[]),"../../translations/id.json":()=>Pe(()=>import("./id-HO6TXGTO-Dj1JW3-q.js"),[]),"../../translations/it.json":()=>Pe(()=>import("./it-AGTDMBL3-Bq_I1CA1.js"),[]),"../../translations/ja.json":()=>Pe(()=>import("./ja-TTGOVF5K-CkAQueln.js"),[]),"../../translations/ko.json":()=>Pe(()=>import("./ko-FF77IQ7N-fJgs5Roz.js"),[]),"../../translations/ms.json":()=>Pe(()=>import("./ms-UPQWWIL4-DEDFniGv.js"),[]),"../../translations/nl.json":()=>Pe(()=>import("./nl-W75HEPFL-D2_VQYac.js"),[]),"../../translations/no.json":()=>Pe(()=>import("./no-R4W7W7ZU-Duk86nrT.js"),[]),"../../translations/pl.json":()=>Pe(()=>import("./pl-GQC2ELWO-CYs9xZGI.js"),[]),"../../translations/pt.json":()=>Pe(()=>import("./pt-YGVT62RU-pnVyr-_6.js"),[]),"../../translations/ro.json":()=>Pe(()=>import("./ro-TST6XS6X-CRozzX2s.js"),[]),"../../translations/sv.json":()=>Pe(()=>import("./sv-TQLF6HV7-DNDzEE6l.js"),[]),"../../translations/th.json":()=>Pe(()=>import("./th-HJUIETVR-C8TRIJwR.js"),[]),"../../translations/tr.json":()=>Pe(()=>import("./tr-CW3C46TW-wpHSGdDw.js"),[]),"../../translations/uk.json":()=>Pe(()=>import("./uk-WTHZQB2U-3kAkt5-3.js"),[]),"../../translations/vi.json":()=>Pe(()=>import("./vi-PHWHJLKP-DYHi4xUC.js"),[]),"../../translations/zh.json":()=>Pe(()=>import("./zh-MO3FCUD6-CLkb7wBO.js"),[])}),np=k.createContext(null),ym=new Map;function kx(e,t){const n=e.match(/\{(\w+),\s*plural,\s*/);if(!n)return e;const r=n[1],i=t[r];if(i===void 0)return e;let a=n[0].length,s=1,o=a;for(let b=a;b<e.length;b++)if(e[b]==="{")s++;else if(e[b]==="}"&&(s--,s===0)){o=b;break}const c=e.substring(a,o),d={},f=/(?:=(\d+)|(\w+))\s*\{([^}]+)\}/g;let m;for(;(m=f.exec(c))!==null;){const[,b,S,x]=m,w=b!==void 0?`=${b}`:S;d[w]=x}const p=d[`=${i}`];if(p!==void 0){const b=p.replace(/#/g,String(i));return e.substring(0,n.index)+b+e.substring(o+1)}const v=d.other;if(v!==void 0){const b=v.replace(/#/g,String(i));return e.substring(0,n.index)+b+e.substring(o+1)}return e}async function b$(e){if(ym.has(e))return ym.get(e);if(e==="en")return ym.set("en",Ho),Ho;try{const t=await O$(`../../translations/${e}.json`),n=t.default||t;return ym.set(e,n),n}catch(t){return console.error(`Failed to load translations for locale: ${e}`,t),Ho}}var y$={t:(e,t,n)=>{var a;const i=(a=Ho[e])==null?void 0:a[t];if(!i)return console.warn(`Translation not found for ${e}.${t}`),`${e}.${t}`;if(n&&typeof i=="string"){let s=i;return s=kx(s,n),Object.entries(n).forEach(([o,c])=>{s=s.replace(new RegExp(`\\{\\{${o}\\}\\}`,"g"),String(c))}),s}return i}};function Mse({translationManager:e,locale:t,loadingComponent:n=null,children:r}){const[i,a]=k.useState(null),[s,o]=k.useState(!1);k.useEffect(()=>{t&&!e&&(o(!0),b$(t).then(d=>{a(d),o(!1)}).catch(d=>{console.error("Failed to load translations:",d),a(Ho),o(!1)}))},[t,e]);const c=k.useMemo(()=>i?{t:(d,f,m)=>{var v;const p=(v=i[d])==null?void 0:v[f];if(!p)return console.warn(`Translation not found for ${d}.${f} in locale ${t}`),`${d}.${f}`;if(m&&typeof p=="string"){let b=p;return b=kx(b,m),Object.entries(m).forEach(([S,x])=>{b=b.replace(new RegExp(`\\{\\{${S}\\}\\}`,"g"),String(x))}),b}return p}}:null,[i,t]);return e?g.jsx(np.Provider,{value:e,children:r}):t&&s?g.jsx(g.Fragment,{children:n}):t&&c?g.jsx(np.Provider,{value:c,children:r}):g.jsx(np.Provider,{value:y$,children:r})}function hn(e){const t=k.useContext(np);return t?(n,r)=>t.t(e,n,r):(n,r)=>{var s;const a=(s=Ho[e])==null?void 0:s[n];if(!a)return console.warn(`Translation not found for ${e}.${n}`),`${e}.${n}`;if(r&&typeof a=="string"){let o=a;return o=kx(o,r),Object.entries(r).forEach(([c,d])=>{o=o.replace(new RegExp(`\\{\\{${c}\\}\\}`,"g"),String(d))}),o}return a}}const S$=k.createContext(null),pb={didCatch:!1,error:null};let x$=class extends k.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=pb}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:a,reason:"imperative-api"}),this.setState(pb)}}componentDidCatch(t,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;if(r&&n.error!==null&&_$(t.resetKeys,i)){var a,s;(a=(s=this.props).onReset)===null||a===void 0||a.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(pb)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:a,error:s}=this.state;let o=t;if(a){const c={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")o=n(c);else if(r)o=k.createElement(r,c);else if(i!==void 0)o=i;else throw s}return k.createElement(S$.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},o)}};function _$(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}var gb={exports:{}},vb={};/**
41
- * @license React
42
- * use-sync-external-store-with-selector.production.js
43
- *
44
- * Copyright (c) Meta Platforms, Inc. and affiliates.
45
- *
46
- * This source code is licensed under the MIT license found in the
47
- * LICENSE file in the root directory of this source tree.
48
- */var Gj;function w$(){if(Gj)return vb;Gj=1;var e=QA();function t(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,o=e.useDebugValue;return vb.useSyncExternalStoreWithSelector=function(c,d,f,m,p){var v=i(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=s(function(){function x(Q){if(!w){if(w=!0,j=Q,Q=m(Q),p!==void 0&&b.hasValue){var C=b.value;if(p(C,Q))return T=C}return T=Q}if(C=T,n(j,Q))return C;var R=m(Q);return p!==void 0&&p(C,R)?(j=Q,C):(j=Q,T=R)}var w=!1,j,T,A=f===void 0?null:f;return[function(){return x(d())},A===null?void 0:function(){return x(A())}]},[d,f,m,p]);var S=r(c,v[0],v[1]);return a(function(){b.hasValue=!0,b.value=S},[S]),o(S),S},vb}var Kj;function k$(){return Kj||(Kj=1,gb.exports=w$()),gb.exports}var j$=k$();const na={};var Ob={exports:{}},Jj;function T$(){if(Jj)return Ob.exports;Jj=1;var e=Ob.exports={},t,n;function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?t=setTimeout:t=r}catch{t=r}try{typeof clearTimeout=="function"?n=clearTimeout:n=i}catch{n=i}})();function a(S){if(t===setTimeout)return setTimeout(S,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(S,0);try{return t(S,0)}catch{try{return t.call(null,S,0)}catch{return t.call(this,S,0)}}}function s(S){if(n===clearTimeout)return clearTimeout(S);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(S);try{return n(S)}catch{try{return n.call(null,S)}catch{return n.call(this,S)}}}var o=[],c=!1,d,f=-1;function m(){!c||!d||(c=!1,d.length?o=d.concat(o):f=-1,o.length&&p())}function p(){if(!c){var S=a(m);c=!0;for(var x=o.length;x;){for(d=o,o=[];++f<x;)d&&d[f].run();f=-1,x=o.length}d=null,c=!1,s(S)}}e.nextTick=function(S){var x=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;w<arguments.length;w++)x[w-1]=arguments[w];o.push(new v(S,x)),o.length===1&&!c&&a(p)};function v(S,x){this.fun=S,this.array=x}v.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={};function b(){}return e.on=b,e.addListener=b,e.once=b,e.off=b,e.removeListener=b,e.removeAllListeners=b,e.emit=b,e.prependListener=b,e.prependOnceListener=b,e.listeners=function(S){return[]},e.binding=function(S){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(S){throw new Error("process.chdir is not supported")},e.umask=function(){return 0},Ob.exports}var E$=T$();const C$=NA(E$);function A$(e){return e.replace(/^file:\/\//,"")}var Wy={},P$=V({"../../node_modules/inline-style-parser/cjs/index.js"(e,t){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
49
- `,m="/",p="*",v="",b="comment",S="declaration";function x(j,T){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];T=T||{};var A=1,Q=1;function C(q){var I=q.match(r);I&&(A+=I.length);var ee=q.lastIndexOf(f);Q=~ee?q.length-ee:Q+q.length}function R(){var q={line:A,column:Q};return function(I){return I.position=new D(q),Z(),I}}function D(q){this.start=q,this.end={line:A,column:Q},this.source=T.source}D.prototype.content=j;function L(q){var I=new Error(T.source+":"+A+":"+Q+": "+q);if(I.reason=q,I.filename=T.source,I.line=A,I.column=Q,I.source=j,!T.silent)throw I}function P(q){var I=q.exec(j);if(I){var ee=I[0];return C(ee),j=j.slice(ee.length),I}}function Z(){P(i)}function X(q){var I;for(q=q||[];I=B();)I!==!1&&q.push(I);return q}function B(){var q=R();if(!(m!=j.charAt(0)||p!=j.charAt(1))){for(var I=2;v!=j.charAt(I)&&(p!=j.charAt(I)||m!=j.charAt(I+1));)++I;if(I+=2,v===j.charAt(I-1))return L("End of comment missing");var ee=j.slice(2,I-2);return Q+=2,C(ee),j=j.slice(I),Q+=2,q({type:b,comment:ee})}}function Y(){var q=R(),I=P(a);if(I){if(B(),!P(s))return L("property missing ':'");var ee=P(o),W=q({type:S,property:w(I[0].replace(n,v)),value:ee?w(ee[0].replace(n,v)):v});return P(c),W}}function H(){var q=[];X(q);for(var I;I=Y();)I!==!1&&(q.push(I),X(q));return q}return Z(),H()}function w(j){return j?j.replace(d,v):v}t.exports=x}}),Q$=V({"../../node_modules/style-to-object/cjs/index.js"(e){var t=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(P$());function r(i,a){let s=null;if(!i||typeof i!="string")return s;const o=(0,n.default)(i),c=typeof a=="function";return o.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:m}=d;c?a(f,m,d):m&&(s=s||{},s[f]=m)}),s}}}),N$=V({"../../node_modules/style-to-js/cjs/utilities.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(f){return!f||r.test(f)||t.test(f)},o=function(f,m){return m.toUpperCase()},c=function(f,m){return"".concat(m,"-")},d=function(f,m){return m===void 0&&(m={}),s(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(a,c):f=f.replace(i,c),f.replace(n,o))};e.camelCase=d}}),R$=V({"../../node_modules/style-to-js/cjs/index.js"(e,t){var n=e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=n(Q$()),i=N$();function a(s,o){var c={};return!s||typeof s!="string"||(0,r.default)(s,function(d,f){d&&f&&(c[(0,i.camelCase)(d,o)]=f)}),c}a.default=a,t.exports=a}}),M$=V({"../../node_modules/extend/index.js"(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):r.call(m)==="[object Array]"},o=function(m){if(!m||r.call(m)!=="[object Object]")return!1;var p=n.call(m,"constructor"),v=m.constructor&&m.constructor.prototype&&n.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!p&&!v)return!1;var b;for(b in m);return typeof b>"u"||n.call(m,b)},c=function(m,p){i&&p.name==="__proto__"?i(m,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):m[p.name]=p.newValue},d=function(m,p){if(p==="__proto__")if(n.call(m,p)){if(a)return a(m,p).value}else return;return m[p]};t.exports=function f(){var m,p,v,b,S,x,w=arguments[0],j=1,T=arguments.length,A=!1;for(typeof w=="boolean"&&(A=w,w=arguments[1]||{},j=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});j<T;++j)if(m=arguments[j],m!=null)for(p in m)v=d(w,p),b=d(m,p),w!==b&&(A&&b&&(o(b)||(S=s(b)))?(S?(S=!1,x=v&&s(v)?v:[]):x=v&&o(v)?v:{},c(w,{name:p,newValue:f(A,x,b)})):typeof b<"u"&&c(w,{name:p,newValue:b}));return w}}}),L$=V({"../../node_modules/rxjs/dist/cjs/internal/operators/partition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.partition=void 0;var t=zQ(),n=fo();function r(i,a){return function(s){return[n.filter(i,a)(s),n.filter(t.not(i,a))(s)]}}e.partition=r}}),D$=V({"../../node_modules/rxjs/dist/cjs/internal/operators/race.js"(e){var t=e&&e.__read||function(s,o){var c=typeof Symbol=="function"&&s[Symbol.iterator];if(!c)return s;var d=c.call(s),f,m=[],p;try{for(;(o===void 0||o-- >0)&&!(f=d.next()).done;)m.push(f.value)}catch(v){p={error:v}}finally{try{f&&!f.done&&(c=d.return)&&c.call(d)}finally{if(p)throw p.error}}return m},n=e&&e.__spreadArray||function(s,o){for(var c=0,d=o.length,f=s.length;c<d;c++,f++)s[f]=o[c];return s};Object.defineProperty(e,"__esModule",{value:!0}),e.race=void 0;var r=$c(),i=Sx();function a(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];return i.raceWith.apply(void 0,n([],t(r.argsOrArgArray(s))))}e.race=a}}),jx=V({"../../node_modules/rxjs/dist/cjs/operators/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=e.merge=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.concat=e.combineLatestWith=e.combineLatest=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=void 0,e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.race=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.partition=e.pairwise=e.onErrorResumeNext=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=void 0,e.zipWith=e.zipAll=e.zip=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=void 0;var t=cx();Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return t.audit}});var n=qQ();Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return n.auditTime}});var r=BQ();Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return r.buffer}});var i=XQ();Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return i.bufferCount}});var a=ZQ();Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return a.bufferTime}});var s=$Q();Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return s.bufferToggle}});var o=VQ();Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return o.bufferWhen}});var c=UQ();Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return c.catchError}});var d=WQ();Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return d.combineAll}});var f=dx();Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return f.combineLatestAll}});var m=HQ();Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return m.combineLatest}});var p=GQ();Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return p.combineLatestWith}});var v=JQ();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return v.concat}});var b=fg();Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return b.concatAll}});var S=fx();Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return S.concatMap}});var x=KQ();Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return x.concatMapTo}});var w=eN();Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return w.concatWith}});var j=pg();Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return j.connect}});var T=tN();Object.defineProperty(e,"count",{enumerable:!0,get:function(){return T.count}});var A=nN();Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return A.debounce}});var Q=rN();Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return Q.debounceTime}});var C=Rf();Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return C.defaultIfEmpty}});var R=iN();Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return R.delay}});var D=px();Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return D.delayWhen}});var L=aN();Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return L.dematerialize}});var P=sN();Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return P.distinct}});var Z=gx();Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return Z.distinctUntilChanged}});var X=oN();Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return X.distinctUntilKeyChanged}});var B=lN();Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return B.elementAt}});var Y=cN();Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return Y.endWith}});var H=uN();Object.defineProperty(e,"every",{enumerable:!0,get:function(){return H.every}});var q=dN();Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return q.exhaust}});var I=Ox();Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return I.exhaustAll}});var ee=vx();Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return ee.exhaustMap}});var W=fN();Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return W.expand}});var z=fo();Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return z.filter}});var ce=hN();Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return ce.finalize}});var se=bx();Object.defineProperty(e,"find",{enumerable:!0,get:function(){return se.find}});var N=mN();Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return N.findIndex}});var le=pN();Object.defineProperty(e,"first",{enumerable:!0,get:function(){return le.first}});var pe=gN();Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return pe.groupBy}});var Oe=hx();Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return Oe.ignoreElements}});var Be=vN();Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return Be.isEmpty}});var Ae=ON();Object.defineProperty(e,"last",{enumerable:!0,get:function(){return Ae.last}});var Ze=uo();Object.defineProperty(e,"map",{enumerable:!0,get:function(){return Ze.map}});var xe=mx();Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return xe.mapTo}});var Ye=bN();Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return Ye.materialize}});var Ue=yN();Object.defineProperty(e,"max",{enumerable:!0,get:function(){return Ue.max}});var Qe=wN();Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return Qe.merge}});var De=Nf();Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return De.mergeAll}});var mt=SN();Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return mt.flatMap}});var Ve=ts();Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return Ve.mergeMap}});var cn=xN();Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return cn.mergeMapTo}});var je=_N();Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return je.mergeScan}});var We=kN();Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return We.mergeWith}});var ge=jN();Object.defineProperty(e,"min",{enumerable:!0,get:function(){return ge.min}});var dt=gg();Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return dt.multicast}});var Et=Pf();Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return Et.observeOn}});var Zt=TN();Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return Zt.onErrorResumeNext}});var et=EN();Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return et.pairwise}});var Mn=L$();Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return Mn.partition}});var re=CN();Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return re.pluck}});var fe=AN();Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return fe.publish}});var Te=PN();Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return Te.publishBehavior}});var $e=QN();Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return $e.publishLast}});var rt=NN();Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return rt.publishReplay}});var Ct=D$();Object.defineProperty(e,"race",{enumerable:!0,get:function(){return Ct.race}});var Cn=Sx();Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return Cn.raceWith}});var Jt=Vc();Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return Jt.reduce}});var Lt=RN();Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return Lt.repeat}});var Ht=MN();Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return Ht.repeatWhen}});var lt=LN();Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return lt.retry}});var Vn=DN();Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return Vn.retryWhen}});var mn=GS();Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return mn.refCount}});var va=xx();Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return va.sample}});var Fr=zN();Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return Fr.sampleTime}});var Cr=IN();Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return Cr.scan}});var At=qN();Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return At.sequenceEqual}});var Dt=_x();Object.defineProperty(e,"share",{enumerable:!0,get:function(){return Dt.share}});var kt=BN();Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return kt.shareReplay}});var pn=XN();Object.defineProperty(e,"single",{enumerable:!0,get:function(){return pn.single}});var gn=ZN();Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return gn.skip}});var en=$N();Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return en.skipLast}});var vn=VN();Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return vn.skipUntil}});var An=UN();Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return An.skipWhile}});var Yt=YN();Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return Yt.startWith}});var Ln=Qf();Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return Ln.subscribeOn}});var _e=FN();Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return _e.switchAll}});var He=Df();Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return He.switchMap}});var nn=WN();Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return nn.switchMapTo}});var rr=HN();Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return rr.switchScan}});var Dn=Mf();Object.defineProperty(e,"take",{enumerable:!0,get:function(){return Dn.take}});var dr=yx();Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return dr.takeLast}});var Un=GN();Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return Un.takeUntil}});var un=KN();Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return un.takeWhile}});var Pn=JN();Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return Pn.tap}});var Ii=wx();Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return Ii.throttle}});var po=eR();Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return po.throttleTime}});var tu=Lf();Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return tu.throwIfEmpty}});var nu=tR();Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return nu.timeInterval}});var bl=jp();Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return bl.timeout}});var Oa=nR();Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return Oa.timeoutWith}});var go=rR();Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return go.timestamp}});var qi=ux();Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return qi.toArray}});var Bi=iR();Object.defineProperty(e,"window",{enumerable:!0,get:function(){return Bi.window}});var ba=aR();Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return ba.windowCount}});var Xi=sR();Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return Xi.windowTime}});var rn=oR();Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return rn.windowToggle}});var yl=lR();Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return yl.windowWhen}});var Sl=cR();Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return Sl.withLatestFrom}});var bi=dR();Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return bi.zip}});var Zi=uR();Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return Zi.zipAll}});var ru=fR();Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return ru.zipWith}})}}),cr={highlight:{motivation:"highlighting",internalType:"highlight",displayName:"Highlight",description:"Mark text for attention",className:"annotation-highlight",iconEmoji:"🟡",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>sl(e),announceOnCreate:"Highlight created",create:{bodyBuilder:"empty",refetchAfter:!1},detection:{sseMethod:"detectHighlights",countField:"createdCount",displayNamePlural:"highlights",displayNameSingular:"highlight",formatRequestParams:e=>{const t=[];return typeof e[0]=="string"&&e[0]&&t.push({label:"Instructions",value:e[0]}),typeof e[2]=="number"&&t.push({label:"Density",value:`${e[2]} per 2000 words`}),t}}},comment:{motivation:"commenting",internalType:"comment",displayName:"Comment",description:"Add a comment about the text",className:"annotation-comment",iconEmoji:"💬",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>ao(e),announceOnCreate:"Comment created",create:{bodyBuilder:"text",refetchAfter:!1},detection:{sseMethod:"detectComments",countField:"createdCount",displayNamePlural:"comments",displayNameSingular:"comment",formatRequestParams:e=>{const t=[];return typeof e[0]=="string"&&e[0]&&t.push({label:"Instructions",value:e[0]}),typeof e[1]=="string"&&e[1]&&t.push({label:"Tone",value:e[1]}),typeof e[2]=="number"&&t.push({label:"Density",value:`${e[2]} per 2000 words`}),t}}},assessment:{motivation:"assessing",internalType:"assessment",displayName:"Assessment",description:"Provide evaluation or assessment",className:"annotation-assessment",iconEmoji:"🔴",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>e.motivation==="assessing",announceOnCreate:"Assessment created",create:{bodyBuilder:"text",refetchAfter:!1},detection:{sseMethod:"detectAssessments",countField:"createdCount",displayNamePlural:"assessments",displayNameSingular:"assessment",formatRequestParams:e=>{const t=[];return typeof e[0]=="string"&&e[0]&&t.push({label:"Instructions",value:e[0]}),typeof e[1]=="string"&&e[1]&&t.push({label:"Tone",value:e[1]}),typeof e[2]=="number"&&t.push({label:"Density",value:`${e[2]} per 2000 words`}),t}}},reference:{motivation:"linking",internalType:"reference",displayName:"Reference",description:"Link to another resource",className:"annotation-reference",iconEmoji:"🔵",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>hi(e),announceOnCreate:"Reference created",create:{bodyBuilder:"entityTag",refetchAfter:!0},detection:{sseMethod:"detectReferences",countField:"foundCount",displayNamePlural:"entity references",displayNameSingular:"entity reference",formatRequestParams:e=>{const t=[],n=e[0];return Array.isArray(n)&&n.length>0&&t.push({label:"Entity Types",value:n.join(", ")}),e[1]===!0&&t.push({label:"Include Descriptive References",value:"Yes"}),t}}},tag:{motivation:"tagging",internalType:"tag",displayName:"Tag",description:"Structural role annotation",className:"annotation-tag",iconEmoji:"🏷️",isClickable:!0,hasHoverInteraction:!0,hasSidePanel:!0,matchesAnnotation:e=>ol(e),announceOnCreate:"Tag created",create:{bodyBuilder:"dualTag",refetchAfter:!1,successMessage:'Tag "{value}" created'},detection:{sseMethod:"detectTags",countField:"tagsCreated",displayNamePlural:"tags",displayNameSingular:"tag",formatRequestParams:e=>{const t=[];if(typeof e[0]=="string"&&e[0]){const r={"legal-irac":"Legal (IRAC)","scientific-imrad":"Scientific (IMRAD)","argument-toulmin":"Argument (Toulmin)"};t.push({label:"Schema",value:r[e[0]]||e[0]})}const n=e[1];return Array.isArray(n)&&n.length>0&&t.push({label:"Categories",value:n.join(", ")}),t}}}},kd={primary:{base:"semiont-button semiont-button--primary",large:"semiont-button semiont-button--primary semiont-button--large"},secondary:{base:"semiont-button semiont-button--secondary",withScale:"semiont-button semiont-button--secondary semiont-button--scale"},tertiary:{base:"semiont-button semiont-button--tertiary"},danger:{base:"semiont-button semiont-button--danger"},warning:{base:"semiont-button semiont-button--warning"},combine:(...e)=>e.filter(Boolean).join(" ")},Hy=[],gR=[];(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?gR:Hy).push(n=n+e[t])})();function z$(e){if(e<768)return!1;for(let t=0,n=Hy.length;;){let r=t+n>>1;if(e<Hy[r])n=r;else if(e>=gR[r])t=r+1;else return!0;if(t==n)return!1}}function eT(e){return e>=127462&&e<=127487}var tT=8205;function I$(e,t,n=!0,r=!0){return(n?vR:q$)(e,t,r)}function vR(e,t,n){if(t==e.length)return t;t&&OR(e.charCodeAt(t))&&bR(e.charCodeAt(t-1))&&t--;let r=bb(e,t);for(t+=nT(r);t<e.length;){let i=bb(e,t);if(r==tT||i==tT||n&&z$(i))t+=nT(i),r=i;else if(eT(i)){let a=0,s=t-2;for(;s>=0&&eT(bb(e,s));)a++,s-=2;if(a%2==0)break;t+=2}else break}return t}function q$(e,t,n){for(;t>0;){let r=vR(e,t-2,n);if(r<t)return r;t--}return 0}function bb(e,t){let n=e.charCodeAt(t);if(!bR(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return OR(r)?(n-55296<<10)+(r-56320)+65536:n}function OR(e){return e>=56320&&e<57344}function bR(e){return e>=55296&&e<56320}function nT(e){return e<65536?1:2}var wt=class yR{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,n,r){[t,n]=Pc(this,t,n);let i=[];return this.decompose(0,t,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),rp.from(i,this.length-(n-t)+r.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,n=this.length){[t,n]=Pc(this,t,n);let r=[];return this.decompose(t,n,r,0),rp.from(r,n-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let n=this.scanIdentical(t,1),r=this.length-this.scanIdentical(t,-1),i=new jd(this),a=new jd(t);for(let s=n,o=n;;){if(i.next(s),a.next(s),s=0,i.lineBreak!=a.lineBreak||i.done!=a.done||i.value!=a.value)return!1;if(o+=i.value.length,i.done||o>=r)return!0}}iter(t=1){return new jd(this,t)}iterRange(t,n=this.length){return new SR(this,t,n)}iterLines(t,n){let r;if(t==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(t).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new xR(r)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?yR.empty:t.length<=32?new Pi(t):rp.from(Pi.split(t,[]))}},Pi=class Ji extends wt{constructor(t,n=B$(t)){super(),this.text=t,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(t,n,r,i){for(let a=0;;a++){let s=this.text[a],o=i+s.length;if((n?r:o)>=t)return new X$(i,o,r,s);i=o+1,r++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new Ji(rT(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let s=r.pop(),o=ip(a.text,s.text.slice(),0,a.length);if(o.length<=32)r.push(new Ji(o,s.length+a.length));else{let c=o.length>>1;r.push(new Ji(o.slice(0,c)),new Ji(o.slice(c)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof Ji))return super.replace(t,n,r);[t,n]=Pc(this,t,n);let i=ip(this.text,ip(r.text,rT(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new Ji(i,a):rp.from(Ji.split(i,[]),a)}sliceString(t,n=this.length,r=`
50
- `){[t,n]=Pc(this,t,n);let i="";for(let a=0,s=0;a<=n&&s<this.text.length;s++){let o=this.text[s],c=a+o.length;a>t&&s&&(i+=r),t<c&&n>a&&(i+=o.slice(Math.max(0,t-a),n-a)),a=c+1}return i}flatten(t){for(let n of this.text)t.push(n)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new Ji(r,i)),r=[],i=-1);return i>-1&&n.push(new Ji(r,i)),n}},rp=class oc extends wt{constructor(t,n){super(),this.children=t,this.length=n,this.lines=0;for(let r of t)this.lines+=r.lines}lineInner(t,n,r,i){for(let a=0;;a++){let s=this.children[a],o=i+s.length,c=r+s.lines-1;if((n?c:o)>=t)return s.lineInner(t,n,r,i);i=o+1,r=c+1}}decompose(t,n,r,i){for(let a=0,s=0;s<=n&&a<this.children.length;a++){let o=this.children[a],c=s+o.length;if(t<=c&&n>=s){let d=i&((s<=t?1:0)|(c>=n?2:0));s>=t&&c<=n&&!d?r.push(o):o.decompose(t-s,n-s,r,d)}s=c+1}}replace(t,n,r){if([t,n]=Pc(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let s=this.children[i],o=a+s.length;if(t>=a&&n<=o){let c=s.replace(t-a,n-a,r),d=this.lines-s.lines+c.lines;if(c.lines<d>>4&&c.lines>d>>6){let f=this.children.slice();return f[i]=c,new oc(f,this.length-(n-t)+r.length)}return super.replace(a,o,c)}a=o+1}return super.replace(t,n,r)}sliceString(t,n=this.length,r=`
51
- `){[t,n]=Pc(this,t,n);let i="";for(let a=0,s=0;a<this.children.length&&s<=n;a++){let o=this.children[a],c=s+o.length;s>t&&a&&(i+=r),t<c&&n>s&&(i+=o.sliceString(t-s,n-s,r)),s=c+1}return i}flatten(t){for(let n of this.children)n.flatten(t)}scanIdentical(t,n){if(!(t instanceof oc))return 0;let r=0,[i,a,s,o]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==s||a==o)return r;let c=this.children[i],d=t.children[a];if(c!=d)return r+c.scanIdentical(d,n);r+=c.length+1}}static from(t,n=t.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let v of t)r+=v.lines;if(r<32){let v=[];for(let b of t)b.flatten(v);return new Pi(v,n)}let i=Math.max(32,r>>5),a=i<<1,s=i>>1,o=[],c=0,d=-1,f=[];function m(v){let b;if(v.lines>a&&v instanceof oc)for(let S of v.children)m(S);else v.lines>s&&(c>s||!c)?(p(),o.push(v)):v instanceof Pi&&c&&(b=f[f.length-1])instanceof Pi&&v.lines+b.lines<=32?(c+=v.lines,d+=v.length+1,f[f.length-1]=new Pi(b.text.concat(v.text),b.length+1+v.length)):(c+v.lines>i&&p(),c+=v.lines,d+=v.length+1,f.push(v))}function p(){c!=0&&(o.push(f.length==1?f[0]:oc.from(f,d)),d=-1,c=f.length=0)}for(let v of t)m(v);return p(),o.length==1?o[0]:new oc(o,n)}};wt.empty=new Pi([""],0);function B$(e){let t=-1;for(let n of e)t+=n.length+1;return t}function ip(e,t,n=0,r=1e9){for(let i=0,a=0,s=!0;a<e.length&&i<=r;a++){let o=e[a],c=i+o.length;c>=n&&(c>r&&(o=o.slice(0,r-i)),i<n&&(o=o.slice(n-i)),s?(t[t.length-1]+=o,s=!1):t.push(o)),i=c+1}return t}function rT(e,t,n){return ip(e,[""],t,n)}var jd=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Pi?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,s=r instanceof Pi?r.text.length:r.children.length;if(a==(t>0?s:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
52
- `,this;e--}else if(r instanceof Pi){let o=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,o.length>Math.max(0,e))return this.value=e==0?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let o=r.children[a+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof Pi?o.text.length:o.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},SR=class{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new jd(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},xR=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(wt.prototype[Symbol.iterator]=function(){return this.iter()},jd.prototype[Symbol.iterator]=SR.prototype[Symbol.iterator]=xR.prototype[Symbol.iterator]=function(){return this});var X$=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function Pc(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function Qi(e,t,n=!0,r=!0){return I$(e,t,n,r)}function Z$(e){return e>=56320&&e<57344}function $$(e){return e>=55296&&e<56320}function V$(e,t){let n=e.charCodeAt(t);if(!$$(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Z$(r)?(n-55296<<10)+(r-56320)+65536:n}function U$(e){return e<65536?1:2}var Gy=/\r\n?|\n/,sr=(function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e})(sr||(sr={})),Td=class ap{constructor(t){this.sections=t}get length(){let t=0;for(let n=0;n<this.sections.length;n+=2)t+=this.sections[n];return t}get newLength(){let t=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];t+=r<0?this.sections[n]:r}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let n=0,r=0,i=0;n<this.sections.length;){let a=this.sections[n++],s=this.sections[n++];s<0?(t(r,i,a),i+=a):i+=s,r+=a}}iterChangedRanges(t,n=!1){Ky(this,t,n)}get invertedDesc(){let t=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?t.push(r,i):t.push(i,r)}return new ap(t)}composeDesc(t){return this.empty?t:t.empty?this:_R(this,t)}mapDesc(t,n=!1){return t.empty?this:Jy(this,t,n)}mapPos(t,n=-1,r=sr.Simple){let i=0,a=0;for(let s=0;s<this.sections.length;){let o=this.sections[s++],c=this.sections[s++],d=i+o;if(c<0){if(d>t)return a+(t-i);a+=o}else{if(r!=sr.Simple&&d>=t&&(r==sr.TrackDel&&i<t&&d>t||r==sr.TrackBefore&&i<t||r==sr.TrackAfter&&d>t))return null;if(d>t||d==t&&n<0&&!o)return t==i||n<0?a:a+c;a+=c}i=d}if(t>i)throw new RangeError(`Position ${t} is out of range for changeset of length ${i}`);return a}touchesRange(t,n=t){for(let r=0,i=0;r<this.sections.length&&i<=n;){let a=this.sections[r++],s=this.sections[r++],o=i+a;if(s>=0&&i<=n&&o>=t)return i<t&&o>n?"cover":!0;i=o}return!1}toString(){let t="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];t+=(t?" ":"")+r+(i>=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ap(t)}static create(t){return new ap(t)}},fa=class zs extends Td{constructor(t,n){super(t),this.inserted=n}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return Ky(this,(n,r,i,a,s)=>t=t.replace(i,i+(r-n),s),!1),t}mapDesc(t,n=!1){return Jy(this,t,n,!0)}invert(t){let n=this.sections.slice(),r=[];for(let i=0,a=0;i<n.length;i+=2){let s=n[i],o=n[i+1];if(o>=0){n[i]=o,n[i+1]=s;let c=i>>1;for(;r.length<c;)r.push(wt.empty);r.push(s?t.slice(a,a+s):wt.empty)}a+=s}return new zs(n,r)}compose(t){return this.empty?t:t.empty?this:_R(this,t,!0)}map(t,n=!1){return t.empty?this:Jy(this,t,n,!0)}iterChanges(t,n=!1){Ky(this,t,n)}get desc(){return Td.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new Kd(this);e:for(let s=0,o=0;;){let c=s==t.length?1e9:t[s++];for(;o<c||o==c&&a.len==0;){if(a.done)break e;let f=Math.min(a.len,c-o);Wn(i,f,-1);let m=a.ins==-1?-1:a.off==0?a.ins:0;Wn(n,f,m),m>0&&Ys(r,n,a.text),a.forward(f),o+=f}let d=t[s++];for(;o<d;){if(a.done)break e;let f=Math.min(a.len,d-o);Wn(n,f,-1),Wn(i,f,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(f),o+=f}}return{changes:new zs(n,r),filtered:Td.create(i)}}toJSON(){let t=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?t.push(r):i==0?t.push([r]):t.push([r].concat(this.inserted[n>>1].toJSON()))}return t}static of(t,n,r){let i=[],a=[],s=0,o=null;function c(f=!1){if(!f&&!i.length)return;s<n&&Wn(i,n-s,-1);let m=new zs(i,a);o=o?o.compose(m.map(o)):m,i=[],a=[],s=0}function d(f){if(Array.isArray(f))for(let m of f)d(m);else if(f instanceof zs){if(f.length!=n)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${n})`);c(),o=o?o.compose(f.map(o)):f}else{let{from:m,to:p=m,insert:v}=f;if(m>p||m<0||p>n)throw new RangeError(`Invalid change range ${m} to ${p} (in doc of length ${n})`);let b=v?typeof v=="string"?wt.of(v.split(r||Gy)):v:wt.empty,S=b.length;if(m==p&&S==0)return;m<s&&c(),m>s&&Wn(i,m-s,-1),Wn(i,p-m,S),Ys(a,i,b),s=p}}return d(t),c(!o),o}static empty(t){return new zs(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<t.length;i++){let a=t[i];if(typeof a=="number")n.push(a,-1);else{if(!Array.isArray(a)||typeof a[0]!="number"||a.some((s,o)=>o&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(a.length==1)n.push(a[0],0);else{for(;r.length<i;)r.push(wt.empty);r[i]=wt.of(a.slice(1)),n.push(a[0],r[i].length)}}}return new zs(n,r)}static createSet(t,n){return new zs(t,n)}};function Wn(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function Ys(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(wt.empty);e.push(n)}}function Ky(e,t,n){let r=e.inserted;for(let i=0,a=0,s=0;s<e.sections.length;){let o=e.sections[s++],c=e.sections[s++];if(c<0)i+=o,a+=o;else{let d=i,f=a,m=wt.empty;for(;d+=o,f+=c,c&&r&&(m=m.append(r[s-2>>1])),!(n||s==e.sections.length||e.sections[s+1]<0);)o=e.sections[s++],c=e.sections[s++];t(i,d,a,f,m),i=d,a=f}}}function Jy(e,t,n,r=!1){let i=[],a=r?[]:null,s=new Kd(e),o=new Kd(t);for(let c=-1;;){if(s.done&&o.len||o.done&&s.len)throw new Error("Mismatched change set lengths");if(s.ins==-1&&o.ins==-1){let d=Math.min(s.len,o.len);Wn(i,d,-1),s.forward(d),o.forward(d)}else if(o.ins>=0&&(s.ins<0||c==s.i||s.off==0&&(o.len<s.len||o.len==s.len&&!n))){let d=o.len;for(Wn(i,o.ins,-1);d;){let f=Math.min(s.len,d);s.ins>=0&&c<s.i&&s.len<=f&&(Wn(i,0,s.ins),a&&Ys(a,i,s.text),c=s.i),s.forward(f),d-=f}o.next()}else if(s.ins>=0){let d=0,f=s.len;for(;f;)if(o.ins==-1){let m=Math.min(f,o.len);d+=m,f-=m,o.forward(m)}else if(o.ins==0&&o.len<f)f-=o.len,o.next();else break;Wn(i,d,c<s.i?s.ins:0),a&&c<s.i&&Ys(a,i,s.text),c=s.i,s.forward(s.len-f)}else{if(s.done&&o.done)return a?fa.createSet(i,a):Td.create(i);throw new Error("Mismatched change set lengths")}}}function _R(e,t,n=!1){let r=[],i=n?[]:null,a=new Kd(e),s=new Kd(t);for(let o=!1;;){if(a.done&&s.done)return i?fa.createSet(r,i):Td.create(r);if(a.ins==0)Wn(r,a.len,0,o),a.next();else if(s.len==0&&!s.done)Wn(r,0,s.ins,o),i&&Ys(i,r,s.text),s.next();else{if(a.done||s.done)throw new Error("Mismatched change set lengths");{let c=Math.min(a.len2,s.len),d=r.length;if(a.ins==-1){let f=s.ins==-1?-1:s.off?0:s.ins;Wn(r,c,f,o),i&&f&&Ys(i,r,s.text)}else s.ins==-1?(Wn(r,a.off?0:a.len,c,o),i&&Ys(i,r,a.textBit(c))):(Wn(r,a.off?0:a.len,s.off?0:s.ins,o),i&&!s.off&&Ys(i,r,s.text));o=(a.ins>c||s.ins>=0&&s.len>c)&&(o||r.length>d),a.forward2(c),s.forward(c)}}}}var Kd=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?wt.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?wt.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},Sm=class e0{constructor(t,n,r){this.from=t,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let t=this.flags&7;return t==7?null:t}get goalColumn(){let t=this.flags>>6;return t==16777215?void 0:t}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e0(r,i,this.flags)}extend(t,n=t,r=0){if(t<=this.anchor&&n>=this.anchor)return Ce.range(t,n,void 0,void 0,r);let i=Math.abs(t-this.anchor)>Math.abs(n-this.anchor)?t:n;return Ce.range(this.anchor,i,void 0,void 0,r)}eq(t,n=!1){return this.anchor==t.anchor&&this.head==t.head&&this.goalColumn==t.goalColumn&&(!n||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Ce.range(t.anchor,t.head)}static create(t,n,r){return new e0(t,n,r)}},Ce=class Ir{constructor(t,n){this.ranges=t,this.mainIndex=n}map(t,n=-1){return t.empty?this:Ir.create(this.ranges.map(r=>r.map(t,n)),this.mainIndex)}eq(t,n=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(t.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Ir([this.main],0)}addRange(t,n=!0){return Ir.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,Ir.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Ir(t.ranges.map(n=>Sm.fromJSON(n)),t.main)}static single(t,n=t){return new Ir([Ir.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return Ir.normalized(t.slice(),n);r=a.to}return new Ir(t,n)}static cursor(t,n=0,r,i){return Sm.create(t,t,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(t,n,r,i,a){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return!a&&t!=n&&(a=n<t?1:-1),n<t?Sm.create(n,t,48|s):Sm.create(t,n,(a?a<0?8:16:0)|s)}static normalized(t,n=0){let r=t[n];t.sort((i,a)=>i.from-a.from),n=t.indexOf(r);for(let i=1;i<t.length;i++){let a=t[i],s=t[i-1];if(a.empty?a.from<=s.to:a.from<s.to){let o=s.from,c=Math.max(a.to,s.to);i<=n&&n--,t.splice(--i,2,a.anchor>a.head?Ir.range(c,o):Ir.range(o,c))}}return new Ir(t,n)}};function wR(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}var Tx=0,qe=class kR{constructor(t,n,r,i,a){this.combine=t,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=Tx++,this.default=t([]),this.extensions=typeof a=="function"?a(this):a}get reader(){return this}static define(t={}){return new kR(t.combine||(n=>n),t.compareInput||((n,r)=>n===r),t.compare||(t.combine?(n,r)=>n===r:Ex),!!t.static,t.enables)}of(t){return new sp([],this,0,t)}compute(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new sp(t,this,1,n)}computeN(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new sp(t,this,2,n)}from(t,n){return n||(n=r=>r),this.compute([t],r=>n(r.field(t)))}};function Ex(e,t){return e==t||e.length==t.length&&e.every((n,r)=>n===t[r])}var sp=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=Tx++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,a=e[i]>>1,s=this.type==2,o=!1,c=!1,d=[];for(let f of this.dependencies)f=="doc"?o=!0:f=="selection"?c=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&d.push(e[f.id]);return{create(f){return f.values[a]=n(f),1},update(f,m){if(o&&m.docChanged||c&&(m.docChanged||m.selection)||t0(f,d)){let p=n(f);if(s?!iT(p,f.values[a],r):!r(p,f.values[a]))return f.values[a]=p,1}return 0},reconfigure:(f,m)=>{let p,v=m.config.address[i];if(v!=null){let b=Tp(m,v);if(this.dependencies.every(S=>S instanceof qe?m.facet(S)===f.facet(S):S instanceof ho?m.field(S,!1)==f.field(S,!1):!0)||(s?iT(p=n(f),b,r):r(p=n(f),b)))return f.values[a]=b,0}else p=n(f);return f.values[a]=p,1}}}};function iT(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function t0(e,t){let n=!1;for(let r of t)Ed(e,r)&1&&(n=!0);return n}function Y$(e,t,n){let r=n.map(c=>e[c.id]),i=n.map(c=>c.type),a=r.filter(c=>!(c&1)),s=e[t.id]>>1;function o(c){let d=[];for(let f=0;f<r.length;f++){let m=Tp(c,r[f]);if(i[f]==2)for(let p of m)d.push(p);else d.push(m)}return t.combine(d)}return{create(c){for(let d of r)Ed(c,d);return c.values[s]=o(c),1},update(c,d){if(!t0(c,a))return 0;let f=o(c);return t.compare(f,c.values[s])?0:(c.values[s]=f,1)},reconfigure(c,d){let f=t0(c,r),m=d.config.facets[t.id],p=d.facet(t);if(m&&!f&&Ex(n,m))return c.values[s]=p,0;let v=o(c);return t.compare(v,p)?(c.values[s]=p,0):(c.values[s]=v,1)}}}var xm=qe.define({static:!0}),ho=class jR{constructor(t,n,r,i,a){this.id=t,this.createF=n,this.updateF=r,this.compareF=i,this.spec=a,this.provides=void 0}static define(t){let n=new jR(Tx++,t.create,t.update,t.compare||((r,i)=>r===i),t);return t.provide&&(n.provides=t.provide(n)),n}create(t){let n=t.facet(xm).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(t)}slot(t){let n=t[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let a=r.values[n],s=this.updateF(a,i);return this.compareF(a,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>{let a=r.facet(xm),s=i.facet(xm),o;return(o=a.find(c=>c.field==this))&&o!=s.find(c=>c.field==this)?(r.values[n]=o.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(t){return[this,xm.of({field:this,create:t})]}get extension(){return this}},Xo={lowest:4,low:3,default:2,high:1,highest:0};function td(e){return t=>new TR(t,e)}var zf={highest:td(Xo.highest),high:td(Xo.high),default:td(Xo.default),low:td(Xo.low),lowest:td(Xo.lowest)},TR=class{constructor(e,t){this.inner=e,this.prec=t}},Cx=class ER{of(t){return new n0(this,t)}reconfigure(t){return ER.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}},n0=class{constructor(e,t){this.compartment=e,this.inner=t}},aT=class CR{constructor(t,n,r,i,a,s){for(this.base=t,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=a,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(t){let n=this.address[t.id];return n==null?t.default:this.staticValues[n>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),s=new Map;for(let p of F$(t,n,s))p instanceof ho?i.push(p):(a[p.facet.id]||(a[p.facet.id]=[])).push(p);let o=Object.create(null),c=[],d=[];for(let p of i)o[p.id]=d.length<<1,d.push(v=>p.slot(v));let f=r==null?void 0:r.config.facets;for(let p in a){let v=a[p],b=v[0].facet,S=f&&f[p]||[];if(v.every(x=>x.type==0))if(o[b.id]=c.length<<1|1,Ex(S,v))c.push(r.facet(b));else{let x=b.combine(v.map(w=>w.value));c.push(r&&b.compare(x,r.facet(b))?r.facet(b):x)}else{for(let x of v)x.type==0?(o[x.id]=c.length<<1|1,c.push(x.value)):(o[x.id]=d.length<<1,d.push(w=>x.dynamicSlot(w)));o[b.id]=d.length<<1,d.push(x=>Y$(x,b,v))}}let m=d.map(p=>p(o));return new CR(t,s,m,o,c,a)}};function F$(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(s,o){let c=i.get(s);if(c!=null){if(c<=o)return;let d=r[c].indexOf(s);d>-1&&r[c].splice(d,1),s instanceof n0&&n.delete(s.compartment)}if(i.set(s,o),Array.isArray(s))for(let d of s)a(d,o);else if(s instanceof n0){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let d=t.get(s.compartment)||s.inner;n.set(s.compartment,d),a(d,o)}else if(s instanceof TR)a(s.inner,s.prec);else if(s instanceof ho)r[o].push(s),s.provides&&a(s.provides,o);else if(s instanceof sp)r[o].push(s),s.facet.extensions&&a(s.facet.extensions,Xo.default);else{let d=s.extension;if(!d)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(d,o)}}return a(e,Xo.default),r.reduce((s,o)=>s.concat(o))}function Ed(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Tp(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var AR=qe.define(),r0=qe.define({combine:e=>e.some(t=>t),static:!0}),PR=qe.define({combine:e=>e.length?e[0]:void 0,static:!0}),QR=qe.define(),NR=qe.define(),RR=qe.define(),MR=qe.define({combine:e=>e.length?e[0]:!1}),hl=class{constructor(e,t){this.type=e,this.value=t}static define(){return new W$}},W$=class{of(e){return new hl(this,e)}},H$=class{constructor(e){this.map=e}of(e){return new on(this,e)}},on=class LR{constructor(t,n){this.type=t,this.value=n}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new LR(this.type,n)}is(t){return this.type==t}static define(t={}){return new H$(t.map||(n=>n))}static mapEffects(t,n){if(!t.length)return t;let r=[];for(let i of t){let a=i.map(n);a&&r.push(a)}return r}};on.reconfigure=on.define();on.appendConfig=on.define();var di=class fd{constructor(t,n,r,i,a,s){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=s,this._doc=null,this._state=null,r&&wR(r,n.newLength),a.some(o=>o.type==fd.time)||(this.annotations=a.concat(fd.time.of(Date.now())))}static create(t,n,r,i,a,s){return new fd(t,n,r,i,a,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let n of this.annotations)if(n.type==t)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(fd.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]=="."))}};di.time=hl.define();di.userEvent=hl.define();di.addToHistory=hl.define();di.remote=hl.define();function G$(e,t){let n=[];for(let r=0,i=0;;){let a,s;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],s=e[r++];else if(i<t.length)a=t[i++],s=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function DR(e,t,n){var r;let i,a,s;return n?(i=t.changes,a=fa.empty(t.changes.length),s=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),a=e.changes.mapDesc(t.changes,!0),s=e.changes.compose(i)),{changes:s,selection:t.selection?t.selection.map(a):(r=e.selection)===null||r===void 0?void 0:r.map(i),effects:on.mapEffects(e.effects,i).concat(on.mapEffects(t.effects,a)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function i0(e,t,n){let r=t.selection,i=gc(t.annotations);return t.userEvent&&(i=i.concat(di.userEvent.of(t.userEvent))),{changes:t.changes instanceof fa?t.changes:fa.of(t.changes||[],n,e.facet(PR)),selection:r&&(r instanceof Ce?r:Ce.single(r.anchor,r.head)),effects:gc(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function zR(e,t,n){let r=i0(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let a=1;a<t.length;a++){t[a].filter===!1&&(n=!1);let s=!!t[a].sequential;r=DR(r,i0(e,t[a],s?r.changes.newLength:e.doc.length),s)}let i=di.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return J$(n?K$(i):i)}function K$(e){let t=e.startState,n=!0;for(let i of t.facet(QR)){let a=i(e);if(a===!1){n=!1;break}Array.isArray(a)&&(n=n===!0?a:G$(n,a))}if(n!==!0){let i,a;if(n===!1)a=e.changes.invertedDesc,i=fa.empty(t.doc.length);else{let s=e.changes.filter(n);i=s.changes,a=s.filtered.mapDesc(s.changes).invertedDesc}e=di.create(t,i,e.selection&&e.selection.map(a),on.mapEffects(e.effects,a),e.annotations,e.scrollIntoView)}let r=t.facet(NR);for(let i=r.length-1;i>=0;i--){let a=r[i](e);a instanceof di?e=a:Array.isArray(a)&&a.length==1&&a[0]instanceof di?e=a[0]:e=zR(t,gc(a),!1)}return e}function J$(e){let t=e.startState,n=t.facet(RR),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=DR(r,i0(t,a,e.changes.newLength),!0))}return r==e?e:di.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var e6=[];function gc(e){return e==null?e6:Array.isArray(e)?e:[e]}var Va=(function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e})(Va||(Va={})),t6=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,a0;try{a0=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function n6(e){if(a0)return a0.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||t6.test(n)))return!0}return!1}function r6(e){return t=>{if(!/\S/.test(t))return Va.Space;if(n6(t))return Va.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Va.Word;return Va.Other}}var tn=class Ei{constructor(t,n,r,i,a,s){this.config=t,this.doc=n,this.selection=r,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=a,s&&(s._state=this);for(let o=0;o<this.config.dynamicSlots.length;o++)Ed(this,o<<1);this.computeSlot=null}field(t,n=!0){let r=this.config.address[t.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Ed(this,r),Tp(this,r)}update(...t){return zR(this,t,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let o of t.effects)o.is(Cx.reconfigure)?(n&&(i=new Map,n.compartments.forEach((c,d)=>i.set(d,c)),n=null),i.set(o.value.compartment,o.value.extension)):o.is(on.reconfigure)?(n=null,r=o.value):o.is(on.appendConfig)&&(n=null,r=gc(r).concat(o.value));let a;n?a=t.startState.values.slice():(n=aT.resolve(r,i,this),a=new Ei(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(c,d)=>d.reconfigure(c,this),null).values);let s=t.startState.facet(r0)?t.newSelection:t.newSelection.asSingle();new Ei(n,t.newDoc,s,a,(o,c)=>c.update(o,t),t)}replaceSelection(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:t},range:Ce.cursor(n.from+t.length)}))}changeByRange(t){let n=this.selection,r=t(n.ranges[0]),i=this.changes(r.changes),a=[r.range],s=gc(r.effects);for(let o=1;o<n.ranges.length;o++){let c=t(n.ranges[o]),d=this.changes(c.changes),f=d.map(i);for(let p=0;p<o;p++)a[p]=a[p].map(f);let m=i.mapDesc(d,!0);a.push(c.range.map(m)),i=i.compose(f),s=on.mapEffects(s,f).concat(on.mapEffects(gc(c.effects),m))}return{changes:i,selection:Ce.create(a,n.mainIndex),effects:s}}changes(t=[]){return t instanceof fa?t:fa.of(t,this.doc.length,this.facet(Ei.lineSeparator))}toText(t){return wt.of(t.split(this.facet(Ei.lineSeparator)||Gy))}sliceDoc(t=0,n=this.doc.length){return this.doc.sliceString(t,n,this.lineBreak)}facet(t){let n=this.config.address[t.id];return n==null?t.default:(Ed(this,n),Tp(this,n))}toJSON(t){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let r in t){let i=t[r];i instanceof ho&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(t[r]),this))}return n}static fromJSON(t,n={},r){if(!t||typeof t.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let a in r)if(Object.prototype.hasOwnProperty.call(t,a)){let s=r[a],o=t[a];i.push(s.init(c=>s.spec.fromJSON(o,c)))}}return Ei.create({doc:t.doc,selection:Ce.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=aT.resolve(t.extensions||[],new Map),r=t.doc instanceof wt?t.doc:wt.of((t.doc||"").split(n.staticFacet(Ei.lineSeparator)||Gy)),i=t.selection?t.selection instanceof Ce?t.selection:Ce.single(t.selection.anchor,t.selection.head):Ce.single(0);return wR(i,r.length),n.staticFacet(r0)||(i=i.asSingle()),new Ei(n,r,i,n.dynamicSlots.map(()=>null),(a,s)=>s.create(a),null)}get tabSize(){return this.facet(Ei.tabSize)}get lineBreak(){return this.facet(Ei.lineSeparator)||`
53
- `}get readOnly(){return this.facet(MR)}phrase(t,...n){for(let r of this.facet(Ei.phrases))if(Object.prototype.hasOwnProperty.call(r,t)){t=r[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let a=+(i||1);return!a||a>n.length?r:n[a-1]})),t}languageDataAt(t,n,r=-1){let i=[];for(let a of this.facet(AR))for(let s of a(this,n,r))Object.prototype.hasOwnProperty.call(s,t)&&i.push(s[t]);return i}charCategorizer(t){let n=this.languageDataAt("wordChars",t);return r6(n.length?n[0]:"")}wordAt(t){let{text:n,from:r,length:i}=this.doc.lineAt(t),a=this.charCategorizer(t),s=t-r,o=t-r;for(;s>0;){let c=Qi(n,s,!1);if(a(n.slice(c,s))!=Va.Word)break;s=c}for(;o<i;){let c=Qi(n,o);if(a(n.slice(o,c))!=Va.Word)break;o=c}return s==o?null:Ce.range(s+r,o+r)}};tn.allowMultipleSelections=r0;tn.tabSize=qe.define({combine:e=>e.length?e[0]:4});tn.lineSeparator=PR;tn.readOnly=MR;tn.phrases=qe.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(i=>e[i]==t[i])}});tn.languageData=AR;tn.changeFilter=QR;tn.transactionFilter=NR;tn.transactionExtender=RR;Cx.reconfigure=on.define();function i6(e,t,n={}){let r={};for(let i of e)for(let a of Object.keys(i)){let s=i[a],o=r[a];if(o===void 0)r[a]=s;else if(!(o===s||s===void 0))if(Object.hasOwnProperty.call(n,a))r[a]=n[a](o,s);else throw new Error("Config merge conflict for field "+a)}for(let i in t)r[i]===void 0&&(r[i]=t[i]);return r}var to=class{eq(e){return this==e}range(e,t=e){return s0.create(e,t,this)}};to.prototype.startSide=to.prototype.endSide=0;to.prototype.point=!1;to.prototype.mapMode=sr.TrackDel;function Ax(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var s0=class IR{constructor(t,n,r){this.from=t,this.to=n,this.value=r}static create(t,n,r){return new IR(t,n,r)}};function o0(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var a6=class qR{constructor(t,n,r,i){this.from=t,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,n,r,i=0){let a=r?this.to:this.from;for(let s=i,o=a.length;;){if(s==o)return s;let c=s+o>>1,d=a[c]-t||(r?this.value[c].endSide:this.value[c].startSide)-n;if(c==s)return d>=0?s:o;d>=0?o=c:s=c+1}}between(t,n,r,i){for(let a=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,a);a<s;a++)if(i(this.from[a]+t,this.to[a]+t,this.value[a])===!1)return!1}map(t,n){let r=[],i=[],a=[],s=-1,o=-1;for(let c=0;c<this.value.length;c++){let d=this.value[c],f=this.from[c]+t,m=this.to[c]+t,p,v;if(f==m){let b=n.mapPos(f,d.startSide,d.mapMode);if(b==null||(p=v=b,d.startSide!=d.endSide&&(v=n.mapPos(f,d.endSide),v<p)))continue}else if(p=n.mapPos(f,d.startSide),v=n.mapPos(m,d.endSide),p>v||p==v&&d.startSide>0&&d.endSide<=0)continue;(v-p||d.endSide-d.startSide)<0||(s<0&&(s=p),d.point&&(o=Math.max(o,v-p)),r.push(d),i.push(p-s),a.push(v-s))}return{mapped:r.length?new qR(i,a,r,o):null,pos:s}}},Kt=class qa{constructor(t,n,r,i){this.chunkPos=t,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(t,n,r,i){return new qa(t,n,r,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let n of this.chunk)t+=n.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,s=t.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(o0)),this.isEmpty)return n.length?qa.of(n):this;let o=new XR(this,null,-1).goto(0),c=0,d=[],f=new Jd;for(;o.value||c<n.length;)if(c<n.length&&(o.from-n[c].from||o.startSide-n[c].value.startSide)>=0){let m=n[c++];f.addInner(m.from,m.to,m.value)||d.push(m)}else o.rangeIndex==1&&o.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(o.chunkIndex)<n[c].from)&&(!s||i>this.chunkEnd(o.chunkIndex)||a<this.chunkPos[o.chunkIndex])&&f.addChunk(this.chunkPos[o.chunkIndex],this.chunk[o.chunkIndex])?o.nextChunk():((!s||i>o.to||a<o.from||s(o.from,o.to,o.value))&&(f.addInner(o.from,o.to,o.value)||d.push(s0.create(o.from,o.to,o.value))),o.next());return f.finishInner(this.nextLayer.isEmpty&&!d.length?qa.empty:this.nextLayer.update({add:d,filter:s,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let o=this.chunkPos[s],c=this.chunk[s],d=t.touchesRange(o,o+c.length);if(d===!1)i=Math.max(i,c.maxPoint),n.push(c),r.push(t.mapPos(o));else if(d===!0){let{mapped:f,pos:m}=c.map(o,t);f&&(i=Math.max(i,f.maxPoint),n.push(f),r.push(m))}}let a=this.nextLayer.map(t);return n.length==0?a:new qa(r,n,a||qa.empty,i)}between(t,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let a=this.chunkPos[i],s=this.chunk[i];if(n>=a&&t<=a+s.length&&s.between(a,t-a,n-a,r)===!1)return}this.nextLayer.between(t,n,r)}}iter(t=0){return l0.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,n=0){return l0.from(t).goto(n)}static compare(t,n,r,i,a=-1){let s=t.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=a),o=n.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=a),c=sT(s,o,r),d=new nd(s,c,a),f=new nd(o,c,a);r.iterGaps((m,p,v)=>oT(d,m,f,p,v,i)),r.empty&&r.length==0&&oT(d,0,f,0,0,i)}static eq(t,n,r=0,i){i==null&&(i=999999999);let a=t.filter(f=>!f.isEmpty&&n.indexOf(f)<0),s=n.filter(f=>!f.isEmpty&&t.indexOf(f)<0);if(a.length!=s.length)return!1;if(!a.length)return!0;let o=sT(a,s),c=new nd(a,o,0).goto(r),d=new nd(s,o,0).goto(r);for(;;){if(c.to!=d.to||!c0(c.active,d.active)||c.point&&(!d.point||!Ax(c.point,d.point)))return!1;if(c.to>i)return!0;c.next(),d.next()}}static spans(t,n,r,i,a=-1){let s=new nd(t,null,a).goto(n),o=n,c=s.openStart;for(;;){let d=Math.min(s.to,r);if(s.point){let f=s.activeForPoint(s.to),m=s.pointFrom<n?f.length+1:s.point.startSide<0?f.length:Math.min(f.length,c);i.point(o,d,s.point,f,m,s.pointRank),c=Math.min(s.openEnd(d),f.length)}else d>o&&(i.span(o,d,s.active,c),c=s.openEnd(d));if(s.to>r)return c+(s.point&&s.to>r?1:0);o=s.to,s.next()}}static of(t,n=!1){let r=new Jd;for(let i of t instanceof s0?[t]:n?s6(t):t)r.add(i.from,i.to,i.value);return r.finish()}static join(t){if(!t.length)return qa.empty;let n=t[t.length-1];for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=qa.empty;i=i.nextLayer)n=new qa(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};Kt.empty=new Kt([],[],null,-1);function s6(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(o0(t,r)>0)return e.slice().sort(o0);t=r}return e}Kt.empty.nextLayer=Kt.empty;var Jd=class BR{finishChunk(t){this.chunks.push(new a6(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,n,r){this.addInner(t,n,r)||(this.nextLayer||(this.nextLayer=new BR)).add(t,n,r)}addInner(t,n,r){let i=t-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(t-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=t,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-t)),!0)}addChunk(t,n){if((t-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(t);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+t,this.lastTo=n.to[r]+t,!0}finish(){return this.finishInner(Kt.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return t;let n=Kt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,n}};function sT(e,t,n){let r=new Map;for(let a of e)for(let s=0;s<a.chunk.length;s++)a.chunk[s].maxPoint<=0&&r.set(a.chunk[s],a.chunkPos[s]);let i=new Set;for(let a of t)for(let s=0;s<a.chunk.length;s++){let o=r.get(a.chunk[s]);o!=null&&(n?n.mapPos(o):o)==a.chunkPos[s]&&!(n!=null&&n.touchesRange(o,o+a.chunk[s].length))&&i.add(a.chunk[s])}return i}var XR=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},l0=class ZR{constructor(t){this.heap=t}static from(t,n=null,r=-1){let i=[];for(let a=0;a<t.length;a++)for(let s=t[a];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new XR(s,n,r,a));return i.length==1?i[0]:new ZR(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,n=-1e9){for(let r of this.heap)r.goto(t,n);for(let r=this.heap.length>>1;r>=0;r--)yb(this.heap,r);return this.next(),this}forward(t,n){for(let r of this.heap)r.forward(t,n);for(let r=this.heap.length>>1;r>=0;r--)yb(this.heap,r);(this.to-t||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),yb(this.heap,0)}}};function yb(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var nd=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=l0.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){_m(this.active,e),_m(this.activeTo,e),_m(this.activeRank,e),this.minActive=lT(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;wm(this.active,t,n),wm(this.activeTo,t,r),wm(this.activeRank,t,i),e&&wm(e,t,this.cursor.from),this.minActive=lT(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&_m(n,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let i=this.cursor.value;if(!i.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=i,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=i.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let r=n.length-1;r>=0&&n[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function oT(e,t,n,r,i,a){e.goto(t),n.goto(r);let s=r+i,o=r,c=r-t,d=!!a.boundChange;for(let f=!1;;){let m=e.to+c-n.to,p=m||e.endSide-n.endSide,v=p<0?e.to+c:n.to,b=Math.min(v,s);if(e.point||n.point?(e.point&&n.point&&Ax(e.point,n.point)&&c0(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(o,b,e.point,n.point),f=!1):(f&&a.boundChange(o),b>o&&!c0(e.active,n.active)&&a.compareRange(o,b,e.active,n.active),d&&b<s&&(m||e.openEnd(v)!=n.openEnd(v))&&(f=!0)),v>s)break;o=v,p<=0&&e.next(),p>=0&&n.next()}}function c0(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!Ax(e[n],t[n]))return!1;return!0}function _m(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function wm(e,t,n){for(let r=e.length-1;r>=t;r--)e[r+1]=e[r];e[t]=n}function lT(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function ef(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=Qi(e,i));return r}function o6(e,t,n,r){for(let i=0,a=0;;){if(a>=t)return i;if(i==e.length)break;a+=e.charCodeAt(i)==9?n-a%n:1,i=Qi(e,i)}return e.length}var u0="ͼ",cT=typeof Symbol>"u"?"__"+u0:Symbol.for(u0),d0=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),uT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},no=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function i(a,s,o,c){let d=[],f=/^@(\w+)\b/.exec(a[0]),m=f&&f[1]=="keyframes";if(f&&s==null)return o.push(a[0]+";");for(let p in s){let v=s[p];if(/&/.test(p))i(p.split(/,\s*/).map(b=>a.map(S=>b.replace(/&/,S))).reduce((b,S)=>b.concat(S)),v,o);else if(v&&typeof v=="object"){if(!f)throw new RangeError("The value of a property ("+p+") should be a primitive value.");i(r(p),v,d,m)}else v!=null&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+v+";")}(d.length||m)&&o.push((n&&!f&&!c?a.map(n):a).join(", ")+" {"+d.join(" ")+"}")}for(let a in e)i(r(a),e[a],this.rules)}getRules(){return this.rules.join(`
54
- `)}static newName(){let e=uT[cT]||1;return uT[cT]=e+1,u0+e.toString(36)}static mount(e,t,n){let r=e[d0],i=n&&n.nonce;r?i&&r.setNonce(i):r=new l6(e,i),r.mount(Array.isArray(t)?t:[t],e)}},dT=new Map,l6=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let i=dT.get(n);if(i)return e[d0]=i;this.sheet=new r.CSSStyleSheet,dT.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[d0]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let a=0;a<e.length;a++){let s=e[a],o=this.modules.indexOf(s);if(o<i&&o>-1&&(this.modules.splice(o,1),i--,o=-1),o==-1){if(this.modules.splice(i++,0,s),n)for(let c=0;c<s.rules.length;c++)n.insertRule(s.rules[c],r++)}else{for(;i<o;)r+=this.modules[i++].rules.length;r+=s.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let a="";for(let o=0;o<this.modules.length;o++)a+=this.modules[o].getRules()+`
55
- `;this.styleTag.textContent=a;let s=t.head||t;this.styleTag.parentNode!=s&&s.insertBefore(this.styleTag,s.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}},ro={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},tf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},c6=typeof navigator<"u"&&/Mac/.test(navigator.platform),u6=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(wn=0;wn<10;wn++)ro[48+wn]=ro[96+wn]=String(wn);var wn;for(wn=1;wn<=24;wn++)ro[wn+111]="F"+wn;var wn;for(wn=65;wn<=90;wn++)ro[wn]=String.fromCharCode(wn+32),tf[wn]=String.fromCharCode(wn);var wn;for(km in ro)tf.hasOwnProperty(km)||(tf[km]=ro[km]);var km;function d6(e){var t=c6&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||u6&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?tf:ro)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var ar=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},f0=typeof document<"u"?document:{documentElement:{style:{}}},h0=/Edge\/(\d+)/.exec(ar.userAgent),$R=/MSIE \d/.test(ar.userAgent),m0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ar.userAgent),vg=!!($R||m0||h0),fT=!vg&&/gecko\/(\d+)/i.test(ar.userAgent),Sb=!vg&&/Chrome\/(\d+)/.exec(ar.userAgent),f6="webkitFontSmoothing"in f0.documentElement.style,p0=!vg&&/Apple Computer/.test(ar.vendor),hT=p0&&(/Mobile\/\w+/.test(ar.userAgent)||ar.maxTouchPoints>2),we={mac:hT||/Mac/.test(ar.platform),windows:/Win/.test(ar.platform),linux:/Linux|X11/.test(ar.platform),ie:vg,ie_version:$R?f0.documentMode||6:m0?+m0[1]:h0?+h0[1]:0,gecko:fT,gecko_version:fT?+(/Firefox\/(\d+)/.exec(ar.userAgent)||[0,0])[1]:0,chrome:!!Sb,chrome_version:Sb?+Sb[1]:0,ios:hT,android:/Android\b/.test(ar.userAgent),webkit_version:f6?+(/\bAppleWebKit\/(\d+)/.exec(ar.userAgent)||[0,0])[1]:0,safari:p0,safari_version:p0?+(/\bVersion\/(\d+(\.\d+)?)/.exec(ar.userAgent)||[0,0])[1]:0,tabSize:f0.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function Px(e,t){for(let n in e)n=="class"&&t.class?t.class+=" "+e.class:n=="style"&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}var Ep=Object.create(null);function Qx(e,t,n){if(e==t)return!0;e||(e=Ep),t||(t=Ep);let r=Object.keys(e),i=Object.keys(t);if(r.length-0!=i.length-0)return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function h6(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]==null&&e.removeAttribute(r)}for(let n in t){let r=t[n];n=="style"?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function mT(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i=="style"?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i=="style"?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function m6(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var Uc=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},xr=(function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e})(xr||(xr={})),Ut=class extends to{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new Nx(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new nf(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=FR(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new nf(e,n,r,t,e.widget||null,!0)}static line(e){return new Rx(e)}static set(e,t=!1){return Kt.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};Ut.none=Kt.empty;var Nx=class VR extends Ut{constructor(t){let{start:n,end:r}=FR(t);super(n?-1:5e8,r?1:-6e8,null,t),this.tagName=t.tagName||"span",this.attrs=t.class&&t.attributes?Px(t.attributes,{class:t.class}):t.class?{class:t.class}:t.attributes||Ep}eq(t){return this==t||t instanceof VR&&this.tagName==t.tagName&&Qx(this.attrs,t.attrs)}range(t,n=t){if(t>=n)throw new RangeError("Mark decorations may not be empty");return super.range(t,n)}};Nx.prototype.point=!1;var Rx=class UR extends Ut{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof UR&&this.spec.class==t.spec.class&&Qx(this.spec.attributes,t.spec.attributes)}range(t,n=t){if(n!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,n)}};Rx.prototype.mapMode=sr.TrackBefore;Rx.prototype.point=!0;var nf=class YR extends Ut{constructor(t,n,r,i,a,s){super(n,r,a,t),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?sr.TrackBefore:sr.TrackAfter:sr.TrackDel}get type(){return this.startSide!=this.endSide?xr.WidgetRange:this.startSide<=0?xr.WidgetBefore:xr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof YR&&p6(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,n=t){if(this.isReplace&&(t>n||t==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,n)}};nf.prototype.point=!0;function FR(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n==null&&(n=e.inclusive),r==null&&(r=e.inclusive),{start:n??t,end:r??t}}function p6(e,t){return e==t||!!(e&&t&&e.compare(t))}function vc(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var pT=class g0 extends to{constructor(t,n){super(),this.tagName=t,this.attributes=n}eq(t){return t==this||t instanceof g0&&this.tagName==t.tagName&&Qx(this.attributes,t.attributes)}static create(t){return new g0(t.tagName,t.attributes||Ep)}static set(t,n=!1){return Kt.of(t,n)}};pT.prototype.startSide=pT.prototype.endSide=-1;function rf(e){let t;return e.nodeType==11?t=e.getSelection?e:e.ownerDocument:t=e,t.getSelection()}function v0(e,t){return t?e==t||e.contains(t.nodeType!=1?t.parentNode:t):!1}function Cd(e,t){if(!t.anchorNode)return!1;try{return v0(e,t.anchorNode)}catch{return!1}}function op(e){return e.nodeType==3?af(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function Ad(e,t,n,r){return n?gT(e,t,n,r,-1)||gT(e,t,n,r,1):!1}function io(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function Cp(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function gT(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Ga(e))){if(e.nodeName=="DIV")return!1;let a=e.parentNode;if(!a||a.nodeType!=1)return!1;t=io(e)+(i<0?0:1),e=a}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable=="false")return!1;t=i<0?Ga(e):0}else return!1}}function Ga(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Ap(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function g6(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function WR(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function v6(e,t,n,r,i,a,s,o){let c=e.ownerDocument,d=c.defaultView||window;for(let f=e,m=!1;f&&!m;)if(f.nodeType==1){let p,v=f==c.body,b=1,S=1;if(v)p=g6(d);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(m=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let j=f.getBoundingClientRect();({scaleX:b,scaleY:S}=WR(f,j)),p={left:j.left,right:j.left+f.clientWidth*b,top:j.top,bottom:j.top+f.clientHeight*S}}let x=0,w=0;if(i=="nearest")t.top<p.top?(w=t.top-(p.top+s),n>0&&t.bottom>p.bottom+w&&(w=t.bottom-p.bottom+s)):t.bottom>p.bottom&&(w=t.bottom-p.bottom+s,n<0&&t.top-w<p.top&&(w=t.top-(p.top+s)));else{let j=t.bottom-t.top,T=p.bottom-p.top;w=(i=="center"&&j<=T?t.top+j/2-T/2:i=="start"||i=="center"&&n<0?t.top-s:t.bottom-T+s)-p.top}if(r=="nearest"?t.left<p.left?(x=t.left-(p.left+a),n>0&&t.right>p.right+x&&(x=t.right-p.right+a)):t.right>p.right&&(x=t.right-p.right+a,n<0&&t.left<p.left+x&&(x=t.left-(p.left+a))):x=(r=="center"?t.left+(t.right-t.left)/2-(p.right-p.left)/2:r=="start"==o?t.left-a:t.right-(p.right-p.left)+a)-p.left,x||w)if(v)d.scrollBy(x,w);else{let j=0,T=0;if(w){let A=f.scrollTop;f.scrollTop+=w/S,T=(f.scrollTop-A)*S}if(x){let A=f.scrollLeft;f.scrollLeft+=x/b,j=(f.scrollLeft-A)*b}t={left:t.left-j,top:t.top-T,right:t.right-j,bottom:t.bottom-T},j&&Math.abs(j-x)<1&&(r="nearest"),T&&Math.abs(T-w)<1&&(i="nearest")}if(v)break;(t.top<p.top||t.bottom>p.bottom||t.left<p.left||t.right>p.right)&&(t={left:Math.max(t.left,p.left),right:Math.min(t.right,p.right),top:Math.max(t.top,p.top),bottom:Math.min(t.bottom,p.bottom)}),f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function HR(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(a.nodeType==1)!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var O6=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Ga(t):0),n,Math.min(e.focusOffset,n?Ga(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}},Io=null;we.safari&&we.safari_version>=26&&(Io=!1);function GR(e){if(e.setActive)return e.setActive();if(Io)return e.focus(Io);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(Io==null?{get preventScroll(){return Io={preventScroll:!0},!0}}:void 0),!Io){Io=!1;for(let n=0;n<t.length;){let r=t[n++],i=t[n++],a=t[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=a&&(r.scrollLeft=a)}}}var vT;function af(e,t,n=t){let r=vT||(vT=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function Oc(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent("keydown",i);a.synthetic=!0,e.dispatchEvent(a);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,e.dispatchEvent(s),a.defaultPrevented||s.defaultPrevented}function b6(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function y6(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,Ga(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Ga(n))}else{if(n==e)return!0;r=io(n),n=n.parentNode}}function KR(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function JR(e,t){for(let n=e,r=t;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Ga(n)}else if(n.parentNode&&!Cp(n))r=io(n),n=n.parentNode;else return null}}function eM(e,t){for(let n=e,r=t;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Cp(n))r=io(n)+1,n=n.parentNode;else return null}}var Fs=class O0{constructor(t,n,r=!0){this.node=t,this.offset=n,this.precise=r}static before(t,n){return new O0(t.parentNode,io(t),n)}static after(t,n){return new O0(t.parentNode,io(t)+1,n)}},kn=(function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e})(kn||(kn={})),nl=kn.LTR,Mx=kn.RTL;function tM(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}var S6=tM("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),x6=tM("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),b0=Object.create(null),Hi=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);b0[t]=n,b0[n]=-t}function nM(e){return e<=247?S6[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?x6[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var _6=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,oa=class{get dir(){return this.level%2?Mx:nl}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let s=e[a];if(s.from<=t&&s.to>=t){if(s.level==n)return a;(i<0||(r!=0?r<0?s.from<t:s.to>t:e[i].level>s.level))&&(i=a)}}if(i<0)throw new RangeError("Index out of range");return i}};function rM(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!rM(r.inner,i.inner))return!1}return!0}var It=[];function w6(e,t,n,r,i){for(let a=0;a<=r.length;a++){let s=a?r[a-1].to:t,o=a<r.length?r[a].from:n,c=a?256:i;for(let d=s,f=c,m=c;d<o;d++){let p=nM(e.charCodeAt(d));p==512?p=f:p==8&&m==4&&(p=16),It[d]=p==4?2:p,p&7&&(m=p),f=p}for(let d=s,f=c,m=c;d<o;d++){let p=It[d];if(p==128)d<o-1&&f==It[d+1]&&f&24?p=It[d]=f:It[d]=256;else if(p==64){let v=d+1;for(;v<o&&It[v]==64;)v++;let b=d&&f==8||v<n&&It[v]==8?m==1?1:8:256;for(let S=d;S<v;S++)It[S]=b;d=v-1}else p==8&&m==1&&(It[d]=1);f=p,p&7&&(m=p)}}}function k6(e,t,n,r,i){let a=i==1?2:1;for(let s=0,o=0,c=0;s<=r.length;s++){let d=s?r[s-1].to:t,f=s<r.length?r[s].from:n;for(let m=d,p,v,b;m<f;m++)if(v=b0[p=e.charCodeAt(m)])if(v<0){for(let S=o-3;S>=0;S-=3)if(Hi[S+1]==-v){let x=Hi[S+2],w=x&2?i:x&4?x&1?a:i:0;w&&(It[m]=It[Hi[S]]=w),o=S;break}}else{if(Hi.length==189)break;Hi[o++]=m,Hi[o++]=p,Hi[o++]=c}else if((b=It[m])==2||b==1){let S=b==i;c=S?0:1;for(let x=o-3;x>=0;x-=3){let w=Hi[x+2];if(w&2)break;if(S)Hi[x+2]|=2;else{if(w&4)break;Hi[x+2]|=4}}}}}function j6(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let s=i?n[i-1].to:e,o=i<n.length?n[i].from:t;for(let c=s;c<o;){let d=It[c];if(d==256){let f=c+1;for(;;)if(f==o){if(i==n.length)break;f=n[i++].to,o=i<n.length?n[i].from:t}else if(It[f]==256)f++;else break;let m=a==1,p=(f<t?It[f]:r)==1,v=m==p?m?1:2:r;for(let b=f,S=i,x=S?n[S-1].to:e;b>c;)b==x&&(b=n[--S].from,x=S?n[S-1].to:e),It[--b]=v;c=f}else a=d,c++}}}function y0(e,t,n,r,i,a,s){let o=r%2?2:1;if(r%2==i%2)for(let c=t,d=0;c<n;){let f=!0,m=!1;if(d==a.length||c<a[d].from){let S=It[c];S!=o&&(f=!1,m=S==16)}let p=!f&&o==1?[]:null,v=f?r:r+1,b=c;e:for(;;)if(d<a.length&&b==a[d].from){if(m)break e;let S=a[d];if(!f)for(let x=S.to,w=d+1;;){if(x==n)break e;if(w<a.length&&a[w].from==x)x=a[w++].to;else{if(It[x]==o)break e;break}}if(d++,p)p.push(S);else{S.from>c&&s.push(new oa(c,S.from,v));let x=S.direction==nl!=!(v%2);S0(e,x?r+1:r,i,S.inner,S.from,S.to,s),c=S.to}b=S.to}else{if(b==n||(f?It[b]!=o:It[b]==o))break;b++}p?y0(e,c,b,r+1,i,p,s):c<b&&s.push(new oa(c,b,v)),c=b}else for(let c=n,d=a.length;c>t;){let f=!0,m=!1;if(!d||c>a[d-1].to){let S=It[c-1];S!=o&&(f=!1,m=S==16)}let p=!f&&o==1?[]:null,v=f?r:r+1,b=c;e:for(;;)if(d&&b==a[d-1].to){if(m)break e;let S=a[--d];if(!f)for(let x=S.from,w=d;;){if(x==t)break e;if(w&&a[w-1].to==x)x=a[--w].from;else{if(It[x-1]==o)break e;break}}if(p)p.push(S);else{S.to<c&&s.push(new oa(S.to,c,v));let x=S.direction==nl!=!(v%2);S0(e,x?r+1:r,i,S.inner,S.from,S.to,s),c=S.from}b=S.from}else{if(b==t||(f?It[b-1]!=o:It[b-1]==o))break;b--}p?y0(e,b,c,r+1,i,p,s):b<c&&s.push(new oa(b,c,v)),c=b}}function S0(e,t,n,r,i,a,s){let o=t%2?2:1;w6(e,i,a,r,o),k6(e,i,a,r,o),j6(i,a,r,o),y0(e,i,a,t,n,r,s)}function T6(e,t,n){if(!e)return[new oa(0,0,t==Mx?1:0)];if(t==nl&&!n.length&&!_6.test(e))return iM(e.length);if(n.length)for(;e.length>It.length;)It[It.length]=256;let r=[],i=t==nl?0:1;return S0(e,i,i,n,0,e.length,r),r}function iM(e){return[new oa(0,e,0)]}var aM="";function E6(e,t,n,r,i){var a;let s=r.head-e.from,o=oa.find(t,s,(a=r.bidiLevel)!==null&&a!==void 0?a:-1,r.assoc),c=t[o],d=c.side(i,n);if(s==d){let p=o+=i?1:-1;if(p<0||p>=t.length)return null;c=t[o=p],s=c.side(!i,n),d=c.side(i,n)}let f=Qi(e.text,s,c.forward(i,n));(f<c.from||f>c.to)&&(f=d),aM=e.text.slice(Math.min(s,f),Math.max(s,f));let m=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];return m&&f==d&&m.level+(i?0:1)<c.level?Ce.cursor(m.side(!i,n)+e.from,m.forward(i,n)?1:-1,m.level):Ce.cursor(f+e.from,c.forward(i,n)?-1:1,c.level)}function C6(e,t,n){for(let r=t;r<n;r++){let i=nM(e.charCodeAt(r));if(i==1)return nl;if(i==2||i==4)return Mx}return nl}var sM=qe.define(),oM=qe.define(),lM=qe.define(),cM=qe.define(),x0=qe.define(),uM=qe.define(),dM=qe.define(),Lx=qe.define(),Dx=qe.define(),fM=qe.define({combine:e=>e.some(t=>t)}),A6=qe.define({combine:e=>e.some(t=>t)}),hM=qe.define(),xb=class _0{constructor(t,n="nearest",r="nearest",i=5,a=5,s=!1){this.range=t,this.y=n,this.x=r,this.yMargin=i,this.xMargin=a,this.isSnapshot=s}map(t){return t.empty?this:new _0(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new _0(Ce.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},jm=on.define({map:(e,t)=>e.map(t)}),mM=on.define();function la(e,t,n){let r=e.facet(cM);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+":",t):console.error(t))}var Xa=qe.define({combine:e=>e.length?e[0]:!0}),P6=0,uc=qe.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),sf=class w0{constructor(t,n,r,i,a){this.id=t,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=a(this),this.extension=this.baseExtensions.concat(uc.of({plugin:this,arg:void 0}))}of(t){return this.baseExtensions.concat(uc.of({plugin:this,arg:t}))}static define(t,n){const{eventHandlers:r,eventObservers:i,provide:a,decorations:s}=n||{};return new w0(P6++,t,r,i,o=>{let c=[];return s&&c.push(Og.of(d=>{let f=d.plugin(o);return f?s(f):Ut.none})),a&&c.push(a(o)),c})}static fromClass(t,n){return w0.define((r,i)=>new t(r,i),n)}},_b=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(la(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){la(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){la(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}},pM=qe.define(),zx=qe.define(),Og=qe.define(),gM=qe.define(),Ix=qe.define(),If=qe.define(),vM=qe.define();function OT(e,t){let n=e.state.facet(vM);if(!n.length)return n;let r=n.map(a=>a instanceof Function?a(e):a),i=[];return Kt.spans(r,t.from,t.to,{point(){},span(a,s,o,c){let d=a-t.from,f=s-t.from,m=i;for(let p=o.length-1;p>=0;p--,c--){let v=o[p].spec.bidiIsolate,b;if(v==null&&(v=C6(t.text,d,f)),c>0&&m.length&&(b=m[m.length-1]).to==d&&b.direction==v)b.to=f,m=b.inner;else{let S={from:d,to:f,direction:v,inner:[]};m.push(S),m=S.inner}}}}),i}var OM=qe.define();function bM(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(OM)){let s=a(e);s&&(s.left!=null&&(t=Math.max(t,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:t,right:n,top:r,bottom:i}}var hd=qe.define(),Ua=class k0{constructor(t,n,r,i){this.fromA=t,this.toA=n,this.fromB=r,this.toB=i}join(t){return new k0(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let n=t.length,r=this;for(;n>0;n--){let i=t[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),t.splice(n-1,1)}}return t.splice(n,0,r),t}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,s=0;;){let o=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,d=Math.min(o,c);if(d==1e9)break;let f=d+s,m=d,p=f;for(;;)if(a<n.length&&n[a]<=m){let v=n[a+1];a+=2,m=Math.max(m,v);for(let b=i;b<t.length&&t[b].fromB<=m;b++)s=t[b].toA-t[b].toB;p=Math.max(p,v+s)}else if(i<t.length&&t[i].fromB<=m){let v=t[i++];m=Math.max(m,v.toB),p=Math.max(p,v.toA),s=v.toA-v.toB}else break;r.push(new k0(f,p,d,m))}return r}},bT=class yM{constructor(t,n,r){this.view=t,this.state=n,this.transactions=r,this.flags=0,this.startState=t.state,this.changes=fa.empty(this.startState.doc.length);for(let a of r)this.changes=this.changes.compose(a.changes);let i=[];this.changes.iterChangedRanges((a,s,o,c)=>i.push(new Ua(a,s,o,c))),this.changedRanges=i}static create(t,n,r){return new yM(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Q6=[],ln=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Q6}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;t&&h6(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let n=io(this.dom),r=this.length?e>0:t>0;return new Fs(this.parent.dom,n+(r?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof yg)return e;return null}static get(e){return e.cmTile}},bg=class extends ln{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=(e==null?void 0:e.node)==t?e:null,a=0;for(let s of this.children){if(s.sync(e),a+=s.length+s.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=s.dom&&(i.written=!0),s.dom.parentNode==t)for(;r&&r!=s.dom;)r=yT(r);else t.insertBefore(s.dom,r);n=s.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=yT(r);this.length=a}};function yT(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var yg=class extends bg{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=ln.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof Jo)t.push(r),n=a,r=0;else{let s=i+a.length,o=e(a,i);if(o!==void 0)return o;i=s+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((s,o)=>{let c=o+s.length;if(e>=o&&e<=c){if(s.isWidget()&&t>=-1&&t<=1){if(s.flags&32)return!0;s.flags&16&&(n=void 0)}(o<e||e==c&&(t<-1?s.length:s.covers(1)))&&(!n||!s.isWidget()&&n.isWidget())&&(n=s,r=e-o),(c>e||e==o&&(t>1?s.length:s.covers(-1)))&&(!i||!s.isWidget()&&i.isWidget())&&(i=s,a=e-o)}}),!n&&!i)throw new Error("No tile at position "+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},Jo=class SM extends bg{constructor(t,n){super(t),this.wrapper=n}isBlock(){return!0}covers(t){return this.children.length?t<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new SM(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},Pp=class xM extends bg{constructor(t,n){super(t),this.attrs=n}isLine(){return!0}static start(t,n,r){let i=new xM(n||document.createElement("div"),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(t,n,r){let i=null,a=-1,s=null,o=-1;function c(f,m){for(let p=0,v=0;p<f.children.length&&v<=m;p++){let b=f.children[p],S=v+b.length;S>=m&&(b.isComposite()?c(b,m-v):(!s||s.isHidden&&(n>0||r&&R6(s,b)))&&(S>m||b.flags&32)?(s=b,o=m-v):(v<m||b.flags&16&&!b.isHidden)&&(i=b,a=m-v)),v=S}}c(this,t);let d=(n<0?i:s)||i||s;return d?{tile:d,offset:d==i?a:o}:null}coordsIn(t,n){let r=this.resolveInline(t,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n):N6(this)}domIn(t,n){let r=this.resolveInline(t,n);if(r){let{tile:i,offset:a}=r;if(this.dom.contains(i.dom))return i.isText()?new Fs(i.dom,Math.min(i.dom.nodeValue.length,a)):i.domPosFor(a,i.flags&16?1:i.flags&32?-1:n);let s=r.tile.parent,o=!1;for(let c of s.children){if(o)return new Fs(c.dom,0);c==r.tile&&(o=!0)}}return new Fs(this.dom,0)}};function N6(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=op(t);return n[n.length-1]||null}function R6(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var li=class _M extends bg{constructor(t,n){super(t),this.mark=n}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new _M(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},md=class wM extends ln{constructor(t,n){super(t,n.length),this.text=n}sync(t){this.flags&2||(super.sync(t),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(t,n){let r=this.dom.nodeValue.length;t>r&&(t=r);let i=t,a=t,s=0;t==0&&n<0||t==r&&n>=0?we.chrome||we.gecko||(t?(i--,s=1):a<r&&(a++,s=-1)):n<0?i--:a<r&&a++;let o=af(this.dom,i,a).getClientRects();if(!o.length)return null;let c=o[(s?s<0:n>=0)?0:o.length-1];return we.safari&&!s&&c.width==0&&(c=Array.prototype.find.call(o,d=>d.width)||c),s?Ap(c,s<0):c||null}static of(t,n){let r=new wM(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},of=class kM extends ln{constructor(t,n,r,i){super(t,n,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(t){return this.flags&48?!1:(this.flags&(t<0?64:128))>0}coordsIn(t,n){return this.coordsInWidget(t,n,!1)}coordsInWidget(t,n,r){let i=this.widget.coordsAt(this.dom,t,n);if(i)return i;if(r)return Ap(this.dom.getBoundingClientRect(),this.length?t==0:n<=0);{let a=this.dom.getClientRects(),s=null;if(!a.length)return null;let o=this.flags&16?!0:this.flags&32?!1:t>0;for(let c=o?a.length-1:0;s=a[c],!(t>0?c==0:c==a.length-1||s.top<s.bottom);c+=o?-1:1);return Ap(s,!o)}}get overrideDOMText(){if(!this.length)return wt.empty;let{root:t}=this;if(!t)return wt.empty;let n=this.posAtStart;return t.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable="false")),new kM(a,r,t,i)}},Qp=class extends ln{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return wt.empty}coordsIn(e){return this.dom.getBoundingClientRect()}},M6=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:s}=this;for(;e||t>0;)if(r.isComposite())if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!s.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=s.pop(),i++}else{let o=r.children[i],c=o.breakAfter;(t>0?o.length<=e:o.length<e)&&(!n||n.skip(o,0,o.length)!==!1||!o.isComposite)?(a=!!c,i++,e-=o.length):(s.push({tile:r,index:i}),r=o,i=0,n&&o.isComposite()&&n.enter(o))}else if(i==r.length)a=!!r.breakAfter,{tile:r,index:i}=s.pop(),i++;else if(e){let o=Math.min(e,r.length-i);n&&n.skip(r,i,i+o),e-=o,i+=o}else break;return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},L6=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},D6=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){var i;this.flushBuffer();let a=this.ensureMarks(t,n),s=a.lastChild;if(s&&s.isText()&&!(s.flags&8)&&s.length+e.length<512){this.cache.reused.set(s,2);let o=a.children[a.children.length-1]=new md(s.dom,s.text+e);o.parent=a}else a.append(r||md.of(e,(i=this.cache.find(md))===null||i===void 0?void 0:i.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?wb(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let s=t.marks.length-1;s>=0;s--){let o=t.marks[s],c=r.lastChild;if(c instanceof li&&c.mark.eq(o.mark))c.dom!=o.dom&&c.setDOM(wb(o.dom)),r=c;else{if(this.cache.reused.get(o)){let f=ln.get(o.dom);f&&f.setDOM(wb(o.dom))}let d=li.of(o.mark,o.dom);r.append(d),r=d}this.cache.reused.set(o,2)}let i=ln.get(e.text);i&&this.cache.reused.set(i,2);let a=new md(e.text,e.text.nodeValue);a.flags|=8,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var n;e||(e=jM);let r=Pp.start(e,t||((n=this.cache.find(Pp))===null||n===void 0?void 0:n.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var n;let r=this.curLine;for(let i=e.length-1;i>=0;i--){let a=e[i],s;if(t>0&&(s=r.lastChild)&&s instanceof li&&s.mark.eq(a))r=s,t--;else{let o=li.of(a,(n=this.cache.find(li,c=>c.mark.eq(a)))===null||n===void 0?void 0:n.dom);r.append(o),r=o,t=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!ST(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(we.ios&&ST(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(kb,0,32)||new of(kb.toDOM(),0,kb,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new L6(e.from,e.to,e.value,e.rank),n=this.wrappers.length;for(;n>0&&(this.wrappers[n-1].rank-t.rank||this.wrappers[n-1].to-t.to)<0;)n--;this.wrappers.splice(n,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let n of this.wrappers){let r=t.lastChild;if(n.from<this.pos&&r instanceof Jo&&r.wrapper.eq(n.wrapper))t=r;else{let i=Jo.of(n.wrapper,(e=this.cache.find(Jo,a=>a.wrapper.eq(n.wrapper)))===null||e===void 0?void 0:e.dom);t.append(i),t=i}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(Qp,void 0,1);return n&&(n.flags=t),n||new Qp(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},z6=class{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:r,lineBreak:i,done:a}=this.cursor.next(this.skipCount);if(this.skipCount=0,a)throw new Error("Ran out of text content when drawing inline views");this.text=r;let s=this.textOff=Math.min(e,r.length);return i?null:r.slice(0,s)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},Np=[of,Pp,md,li,Qp,Jo,yg];for(let e=0;e<Np.length;e++)Np[e].bucket=e;var I6=class{constructor(e){this.view=e,this.buckets=Np.map(()=>[]),this.index=Np.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let s=i.length-1;s>=0;s--){let o=(s+a)%i.length,c=i[o];if((!t||t(c))&&!this.reused.has(c))return i.splice(o,1),o<a&&this.index[r]--,this.reused.set(c,n),c}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let s=r[i];if(!this.reused.has(s)&&(a==0?s.widget.compare(e):s.widget.constructor==e.constructor&&e.updateDOM(s.dom,this.view,s.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,s.widget==e&&s.length==t&&(s.flags&497)==n?(this.reused.set(s,1),s):(this.reused.set(s,2),new of(s.dom,t,e,s.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},q6=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new I6(e),this.text=new z6(e.state.doc),this.builder=new D6(this.cache,new yg(e,e.contentDOM),Kt.iter(n)),this.cache.reused.set(t,2),this.old=new M6(t),this.reuseWalker={skip:(a,s,o)=>{if(this.cache.add(a),a.isComposite())return!1},enter:a=>this.cache.add(a),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let s=a<e.length?e[a++]:null,o=s?s.fromA:this.old.root.length;if(o>r){let c=o-r;this.preserve(c,!a,!s),r=o,i+=c}if(!s)break;t&&s.fromA<=t.range.fromA&&s.toA>=t.range.toA?(this.forward(s.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,s.toA),this.emit(t.range.toB,s.toB)):(this.forward(s.fromA,s.toA),this.emit(i,s.toB)),i=s.toB,r=s.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=Z6(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(a,s,o)=>{if(a.isWidget())if(this.openWidget)this.builder.continueWidget(o-s);else{let c=o>0||s<a.length?of.of(a.widget,this.view,o-s,a.flags&496,this.cache.maybeReuse(a)):this.cache.reuse(a);c.flags&256?(c.flags&=-2,this.builder.addBlockWidget(c)):(this.builder.ensureLine(null),this.builder.addInlineWidget(c,r,i),i=r.length)}else if(a.isText())this.builder.ensureLine(null),!s&&o==a.length&&!this.cache.reused.has(a)?this.builder.addText(a.text,r,i,this.cache.reuse(a)):(this.cache.add(a),this.builder.addText(a.text.slice(s,o),r,i)),i=r.length;else if(a.isLine())a.flags&=-2,this.cache.reused.set(a,1),this.builder.addLine(a);else if(a instanceof Qp)this.cache.add(a);else if(a instanceof li)this.builder.ensureLine(null),this.builder.addMark(a,r,i),this.cache.reused.set(a,1),i=r.length;else return!1;this.openWidget=!1},enter:a=>{a.isLine()?this.builder.addLineStart(a.attrs,this.cache.maybeReuse(a)):(this.cache.add(a),a instanceof li&&r.unshift(a.mark)),this.openWidget=!1},leave:a=>{a.isLine()?r.length&&(r.length=i=0):a instanceof li&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=0,a=Kt.spans(this.decorations,e,t,{point:(s,o,c,d,f,m)=>{if(c instanceof nf){if(this.disallowBlockEffectsFor[m]){if(c.block)throw new RangeError("Block decorations may not be specified via plugins");if(o>this.view.state.doc.lineAt(s).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(i=d.length,f>d.length)r.continueWidget(o-s);else{let p=c.widget||(c.block?Qc.block:Qc.inline),v=B6(c),b=this.cache.findWidget(p,o-s,v)||of.of(p,this.view,o-s,v);c.block?(c.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(b)):(r.ensureLine(n),r.addInlineWidget(b,d,f))}n=null}else n=X6(n,c);o>s&&this.text.skip(o-s)},span:(s,o,c,d)=>{for(let f=s;f<o;){let m=this.text.next(Math.min(512,o-f));m==null?(r.addLineStartIfNotCovered(n),r.addBreak(),f++):(r.ensureLine(n),r.addText(m,c,f==s?d:c.length),f+=m.length),n=null}}});r.addLineStartIfNotCovered(n),this.openWidget=a>i,this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let i=ln.get(r);if(r==this.view.contentDOM)break;i instanceof li?t.push(i):i!=null&&i.isLine()?n=i:i instanceof Jo||(r.nodeName=="DIV"&&!n&&r!=this.view.contentDOM?n=new Pp(r,jM):n||t.push(li.of(new Nx({tagName:r.nodeName.toLowerCase(),attributes:m6(r)}),r)))}return{line:n,marks:t}}};function ST(e,t){let n=r=>{for(let i of r.children)if((t?i.isText():i.length)||n(i))return!0;return!1};return n(e)}function B6(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var jM={class:"cm-line"};function X6(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r||(e||(e={class:"cm-line"}),n&&Px(n,e),r&&(e.class+=" "+r)),e}function Z6(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof li&&t.push(r.mark)}return t}function wb(e){let t=ln.get(e);return t&&t.setDOM(e.cloneNode()),e}var Qc=class extends Uc{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};Qc.inline=new Qc("span");Qc.block=new Qc("div");var kb=new class extends Uc{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}},xT=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Ut.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new yg(e,e.contentDOM),this.updateInner([new Ua(0,0,0,e.state.doc.length)],null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:d,toA:f})=>f<this.minWidthFrom||d>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?r=this.domChanged.newSel.head:!K6(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let i=r>-1?V6(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:d,to:f}=this.hasComposition;n=new Ua(d,f,e.changes.mapPos(d,-1),e.changes.mapPos(f,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(we.ie||we.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.blockWrappers;this.updateDeco();let o=F6(a,this.decorations,e.changes);o.length&&(n=Ua.extendWithRanges(n,o));let c=H6(s,this.blockWrappers,e.changes);return c.length&&(n=Ua.extendWithRanges(n,c)),i&&!n.some(d=>d.fromA<=i.range.fromA&&d.toA>=i.range.toA)&&(n=i.range.addToSet(n.slice())),this.tile.flags&2&&n.length==0?!1:(this.updateInner(n,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let a=this.tile,s=new q6(this.view,a,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&ln.get(t.text)&&s.cache.reused.set(ln.get(t.text),2),this.tile=s.run(e,t),j0(a,s.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let i=we.chrome||we.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(i),i&&(i.written||n.selectionRange.focusNode!=i.node||!this.tile.dom.contains(i.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let i of this.tile.children)i.isWidget()&&i.widget instanceof jb&&r.push(i.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(mM)&&(this.editContextFormatting=n.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(Xa)||n.tabIndex>-1)&&Cd(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let s=this.forceSelection;this.forceSelection=!1;let o=this.view.state.selection.main,c,d;if(o.empty?d=c=this.inlineDOMNearPos(o.anchor,o.assoc||1):(d=this.inlineDOMNearPos(o.head,o.head==o.from?1:-1),c=this.inlineDOMNearPos(o.anchor,o.anchor==o.from?1:-1)),we.gecko&&o.empty&&!this.hasComposition&&$6(c)){let m=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(m,c.node.childNodes[c.offset]||null)),c=d=new Fs(m,0),s=!0}let f=this.view.observer.selectionRange;(s||!f.focusNode||(!Ad(c.node,c.offset,f.anchorNode,f.anchorOffset)||!Ad(d.node,d.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,o))&&(this.view.observer.ignore(()=>{we.android&&we.chrome&&n.contains(f.focusNode)&&G6(f.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let m=rf(this.view.root);if(m)if(o.empty){if(we.gecko){let p=U6(c.node,c.offset);if(p&&p!=3){let v=(p==1?JR:eM)(c.node,c.offset);v&&(c=new Fs(v.node,v.offset))}}m.collapse(c.node,c.offset),o.bidiLevel!=null&&m.caretBidiLevel!==void 0&&(m.caretBidiLevel=o.bidiLevel)}else if(m.extend){m.collapse(c.node,c.offset);try{m.extend(d.node,d.offset)}catch{}}else{let p=document.createRange();o.anchor>o.head&&([c,d]=[d,c]),p.setEnd(d.node,d.offset),p.setStart(c.node,c.offset),m.removeAllRanges(),m.addRange(p)}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,d)),this.impreciseAnchor=c.precise?null:new Fs(f.anchorNode,f.anchorOffset),this.impreciseHead=d.precise?null:new Fs(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Ad(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=rf(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let s=a.posAtStart;if(t.head==s||t.head==s+a.length)return;let o=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!o||!c||o.bottom>c.top)return;let d=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(d.node,d.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let a=Ga(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==n.dom)break;a==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?a=-1:a=1),e=s}a<0?i=e:i=e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!ln.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let a=0,s=r;;a++){let o=n.children[a];if(o.dom==i)return s;s+=o.length+o.breakAfter}}else return n.isText()?e==n.dom?r+t:r+(t?n.length:0):r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(e,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,s=-1,o=!1;return this.tile.blockTiles((c,d)=>{if(c.isWidget()){if(c.flags&32&&d>=e)return!0;c.flags&16&&(i=!0)}else{let f=d+c.length;if(d<=e&&(n=c,r=e-d,i=f<e),f>=e&&!a&&(a=c,s=e-d,o=d>e),d>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:o&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(s,t))}coordsAt(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.widget instanceof jb?null:n.coordsInWidget(r,t,!0):n.coordsIn(r,t)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(i,a){if(i.isComposite())for(let s of i.children){if(s.length>=a){let o=r(s,a);if(o)return o}if(a-=s.length,a<0)break}else if(i.isText()&&a<i.length){let s=Qi(i.text,a);if(s==a)return null;let o=af(i.dom,a,s).getClientRects();for(let c=0;c<o.length;c++){let d=o[c];if(c==o.length-1||d.top<d.bottom&&d.left<d.right)return d}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,o=this.view.textDirection==kn.LTR,c=0,d=(f,m,p)=>{for(let v=0;v<f.children.length&&!(m>r);v++){let b=f.children[v],S=m+b.length,x=b.dom.getBoundingClientRect(),{height:w}=x;if(p&&!v&&(c+=x.top-p.top),b instanceof Jo)S>n&&d(b,m,x);else if(m>=n&&(c>0&&t.push(-c),t.push(w+c),c=0,a)){let j=b.dom.lastChild,T=j?op(j):[];if(T.length){let A=T[T.length-1],Q=o?A.right-x.left:x.right-A.left;Q>s&&(s=Q,this.minWidth=i,this.minWidthFrom=m,this.minWidthTo=S)}}p&&v==f.children.length-1&&(c+=p.bottom-x.bottom),m=S+b.breakAfter}};return d(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?kn.RTL:kn.LTR}measureTextSize(){let e=this.tile.blockTiles(a=>{if(a.isLine()&&a.children.length&&a.length<=20){let s=0,o;for(let c of a.children){if(!c.isText()||/[^ -~]/.test(c.text))return;let d=op(c.dom);if(d.length!=1)return;s+=d[0].width,o=d[0].height}if(s)return{lineHeight:a.dom.getBoundingClientRect().height,charWidth:s/a.length,textHeight:o}}});if(e)return e;let t=document.createElement("div"),n,r,i;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let a=op(t.firstChild)[0];n=t.getBoundingClientRect().height,r=a&&a.width?a.width/27:7,i=a&&a.height?a.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let s=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Ut.replace({widget:new jb(s),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return Ut.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Og).map(i=>(this.dynamicDecorationMap[e++]=typeof i=="function")?i(this.view):i),n=!1,r=this.view.state.facet(Ix).map((i,a)=>{let s=typeof i=="function";return s&&(n=!0),s?i(this.view):i});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(Kt.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(gM).map(i=>typeof i=="function"?i(this.view):i)}scrollIntoView(e){var t;if(e.isSnapshot){let d=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=d.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let d of this.view.state.facet(hM))try{if(d(this.view,e.range,e))return!0}catch(f){la(this.view.state,f,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,(t=n.assoc)!==null&&t!==void 0?t:n.empty?0:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let a=bM(this.view),s={left:r.left-a.left,top:r.top-a.top,right:r.right+a.right,bottom:r.bottom+a.bottom},{offsetWidth:o,offsetHeight:c}=this.view.scrollDOM;if(v6(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==kn.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(r.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||r.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let d=this.view.docView.lineAt(n.head,1);d&&d.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let t=n=>n.isWidget()||n.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){j0(this.tile)}};function j0(e,t){let n=t==null?void 0:t.get(e);if(n!=1){n==null&&e.destroy();for(let r of e.children)j0(r,t)}}function $6(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable=="false")&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable=="false")}function TM(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=JR(n.focusNode,n.focusOffset),i=eM(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let o=ln.get(i.node);if(!o||o.isText()&&o.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let c=ln.get(r.node);!c||c.isText()&&c.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let s=t-a.offset;return{from:s,to:s+a.node.nodeValue.length,node:a.node}}function V6(e,t,n){let r=TM(e,n);if(!r)return null;let{node:i,from:a,to:s}=r,o=i.nodeValue;if(/[\n\r]/.test(o)||e.state.doc.sliceString(r.from,r.to)!=o)return null;let c=t.invertedDesc;return{range:new Ua(c.mapPos(a),c.mapPos(s),a,s),text:i}}function U6(e,t){return e.nodeType!=1?0:(t&&e.childNodes[t-1].contentEditable=="false"?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable=="false"?2:0)}var Y6=class{constructor(){this.changes=[]}compareRange(t,n){vc(t,n,this.changes)}comparePoint(t,n){vc(t,n,this.changes)}boundChange(t){vc(t,t,this.changes)}};function F6(e,t,n){let r=new Y6;return Kt.compare(e,t,n,r),r.changes}var W6=class{constructor(){this.changes=[]}compareRange(e,t){vc(e,t,this.changes)}comparePoint(){}boundChange(e){vc(e,e,this.changes)}};function H6(e,t,n){let r=new W6;return Kt.compare(e,t,n,r),r.changes}function G6(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function K6(e,t){let n=!1;return t&&e.iterChangedRanges((r,i)=>{r<t.to&&i>t.from&&(n=!0)}),n}var jb=class extends Uc{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function J6(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return Ce.cursor(t);a==0?n=1:a==i.length&&(n=-1);let s=a,o=a;n<0?s=Qi(i.text,a,!1):o=Qi(i.text,a);let c=r(i.text.slice(s,o));for(;s>0;){let d=Qi(i.text,s,!1);if(r(i.text.slice(d,s))!=c)break;s=d}for(;o<i.length;){let d=Qi(i.text,o);if(r(i.text.slice(o,d))!=c)break;o=d}return Ce.range(s+i.from,o+i.from)}function e9(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let o=e.viewState.heightOracle.textHeight,c=Math.floor((i-n.top-(e.defaultLineHeight-o)*.5)/o);a+=c*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+o6(s,a,e.state.tabSize)}function t9(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let i;for(let a of r.type){if(a.from>t)break;if(!(a.to<t)){if(a.from<t&&a.to>t)return a;(!i||a.type==xr.Text&&(i.type!=a.type||(n<0?a.from<t:a.to>t)))&&(i=a)}}return i||r}return r}function n9(e,t,n,r){let i=t9(e,t.head,t.assoc||-1),a=!r||i.type!=xr.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let s=e.dom.getBoundingClientRect(),o=e.textDirectionAt(i.from),c=e.posAtCoords({x:n==(o==kn.LTR)?s.right-1:s.left+1,y:(a.top+a.bottom)/2});if(c!=null)return Ce.cursor(c,n?-1:1)}return Ce.cursor(n?i.to:i.from,n?-1:1)}function _T(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),s=e.textDirectionAt(i.from);for(let o=t,c=null;;){let d=E6(i,a,s,o,n),f=aM;if(!d){if(i.number==(n?e.state.doc.lines:1))return o;f=`
56
- `,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),d=e.visualLineSide(i,!n)}if(c){if(!c(f))return o}else{if(!r)return d;c=r(f)}o=d}}function r9(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return a=>{let s=r(a);return i==Va.Space&&(i=s),i==s}}function i9(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return Ce.cursor(i,t.assoc);let s=t.goalColumn,o,c=e.contentDOM.getBoundingClientRect(),d=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),f=e.documentTop;if(d)s==null&&(s=d.left-c.left),o=a<0?d.top:d.bottom;else{let b=e.viewState.lineBlockAt(i);s==null&&(s=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-b.from))),o=(a<0?b.top:b.bottom)+f}let m=c.left+s,p=e.viewState.heightOracle.textHeight>>1,v=r??p;for(let b=0;;b+=p){let S=o+(v+b)*a,x=T0(e,{x:m,y:S},!1,a);if(n?S>c.bottom:S<c.top)return Ce.cursor(x.pos,x.assoc);let w=e.coordsAtPos(x.pos,x.assoc),j=w?(w.top+w.bottom)/2:0;if(!w||(n?j>o:j<o))return Ce.cursor(x.pos,x.assoc,void 0,s)}}function Pd(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(a,s,o)=>{if(t>a&&t<s){let c=r||n||(t-a<s-t?-1:1);t=c<0?a:s,r=c}});if(!r)return t}}function EM(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let s=Pd(e,i.from,0);s!=i.from&&(a=Ce.cursor(s,-1))}else{let s=Pd(e,i.from,-1),o=Pd(e,i.to,1);(s!=i.from||o!=i.to)&&(a=Ce.range(i.from==i.anchor?s:o,i.from==i.head?s:o))}a&&(n||(n=t.ranges.slice()),n[r]=a)}return n?Ce.create(n,t.mainIndex):t}function Tb(e,t,n){let r=Pd(e.state.facet(If).map(i=>i(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:Ce.cursor(r,r<n.from?1:-1)}var sa=class{constructor(e,t){this.pos=e,this.assoc=t}};function T0(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:s,y:o}=t,c=o-a,d;for(;;){if(c<0)return new sa(0,1);if(c>e.viewState.docHeight)return new sa(e.state.doc.length,-1);if(d=e.elementAtHeight(c),r==null)break;if(d.type==xr.Text){if(r<0?d.to<e.viewport.from:d.from>e.viewport.to)break;let p=e.docView.coordsAt(r<0?d.from:d.to,r>0?-1:1);if(p&&(r<0?p.top<=c+a:p.bottom>=c+a))break}let m=e.viewState.heightOracle.textHeight/2;c=r>0?d.bottom+m:d.top-m}if(e.viewport.from>=d.to||e.viewport.to<=d.from){if(n)return null;if(d.type==xr.Text){let m=e9(e,i,d,s,o);return new sa(m,m==d.from?1:-1)}}if(d.type!=xr.Text)return c<(d.top+d.bottom)/2?new sa(d.from,1):new sa(d.to,-1);let f=e.docView.lineAt(d.from,2);return(!f||f.length!=d.length)&&(f=e.docView.lineAt(d.from,-2)),new a9(e,s,o,e.textDirectionAt(d.from)).scanTile(f,d.from)}var a9=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[oa.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[oa.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t){let n=0,r=e.length-1,i=new Set,a=this.bidiIn(e[0],e[r]),s,o,c=-1,d=1e9,f;e:for(;n<r;){let p=r-n,v=n+r>>1;t:if(i.has(v)){let S=n+Math.floor(Math.random()*p);for(let x=0;x<p;x++){if(!i.has(S)){v=S;break t}S++,S==r&&(S=n)}break e}i.add(v);let b=t(v);if(b)for(let S=0;S<b.length;S++){let x=b[S],w=0;if(!(x.width==0&&b.length>1)){if(x.bottom<this.y)(!s||s.bottom<x.bottom)&&(s=x),w=1;else if(x.top>this.y)(!o||o.top>x.top)&&(o=x),w=-1;else{let j=x.left>this.x?this.x-x.left:x.right<this.x?this.x-x.right:0,T=Math.abs(j);T<d&&(c=v,d=T,f=x),j&&(w=j<0==(this.baseDir==kn.LTR)?-1:1)}w==-1&&(!a||this.baseDirAt(e[v],1))?r=v:w==1&&(!a||this.baseDirAt(e[v+1],-1))&&(n=v+1)}}}if(!f){let p=s&&(!o||this.y-s.bottom<o.top-this.y)?s:o;return this.y=(p.top+p.bottom)/2,this.scan(e,t)}let m=(a?this.dirAt(e[c],1):this.baseDir)==kn.LTR;return{i:c,after:this.x>(f.left+f.right)/2==m}}scanText(e,t){let n=[];for(let i=0;i<e.length;i=Qi(e.text,i))n.push(t+i);n.push(t+e.length);let r=this.scan(n,i=>{let a=n[i]-t,s=n[i+1]-t;return af(e.dom,a,s).getClientRects()});return r.after?new sa(n[r.i+1],-1):new sa(n[r.i],1)}scanTile(e,t){if(!e.length)return new sa(t,1);if(e.children.length==1){let s=e.children[0];if(s.isText())return this.scanText(s,t);if(s.isComposite())return this.scanTile(s,t)}let n=[t];for(let s=0,o=t;s<e.children.length;s++)n.push(o+=e.children[s].length);let r=this.scan(n,s=>{let o=e.children[s];return o.flags&48?null:(o.dom.nodeType==1?o.dom:af(o.dom,0,o.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new sa(n[r.i+1],-1):new sa(a,1)}},lc="￿",s9=class{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(tn.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=lc}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let i=this.text.length;this.readNode(r);let a=ln.get(r),s=r.nextSibling;if(s==t){a!=null&&a.breakAfter&&!s&&n!=this.view.contentDOM&&this.lineBreak();break}let o=ln.get(s);(a&&o?a.breakAfter:(a?a.breakAfter:Cp(r))||Cp(s)&&(r.nodeName!="BR"||a!=null&&a.isWidget())&&this.text.length>i)&&!l9(s,t)&&this.lineBreak(),r=s}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,s;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(s=r.exec(t))&&(i=s.index,a=s[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let o of this.points)o.node==e&&o.pos>this.text.length&&(o.pos-=a-1);n=i+a}}readNode(e){let t=ln.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let r=n.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(o9(e,n.node,n.offset)?t:0))}};function o9(e,t,n){for(;;){if(!t||n<Ga(t))return!1;if(t==e)return!0;n=io(t)+1,t=t.parentNode}}function l9(e,t){let n;for(;!(e==t||!e);e=e.nextSibling){let r=ln.get(e);if(!(r!=null&&r.isWidget()))return!1;r&&(n||(n=[])).push(r)}if(n)for(let r of n){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}var wT=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},c9=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,s=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=CM(e.docView.tile,t,n,0))){let o=i||a?[]:d9(e),c=new s9(o,e);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=f9(o,this.bounds.from)}else{let o=e.observer.selectionRange,c=i&&i.node==o.focusNode&&i.offset==o.focusOffset||!v0(e.contentDOM,o.focusNode)?s.main.head:e.docView.posFromDOM(o.focusNode,o.focusOffset),d=a&&a.node==o.anchorNode&&a.offset==o.anchorOffset||!v0(e.contentDOM,o.anchorNode)?s.main.anchor:e.docView.posFromDOM(o.anchorNode,o.anchorOffset),f=e.viewport;if((we.ios||we.chrome)&&s.main.empty&&c!=d&&(f.from>0||f.to<e.state.doc.length)){let m=Math.min(c,d),p=Math.max(c,d),v=f.from-m,b=f.to-p;(v==0||v==1||m==0)&&(b==0||b==-1||p==e.state.doc.length)&&(c=0,d=e.state.doc.length)}if(e.inputState.composing>-1&&s.ranges.length>1)this.newSel=s.replaceRange(Ce.range(d,c));else if(e.lineWrapping&&d==c&&!(s.main.empty&&s.main.head==c)&&e.inputState.lastTouchTime>Date.now()-100){let m=e.coordsAtPos(c,-1),p=0;m&&(p=e.inputState.lastTouchY<=m.bottom?-1:1),this.newSel=Ce.create([Ce.cursor(c,p)])}else this.newSel=Ce.single(d,c)}}};function CM(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,s=-1,o=-1;for(let c=0,d=r,f=r;c<e.children.length;c++){let m=e.children[c],p=d+m.length;if(d<t&&p>n)return CM(m,t,n,d);if(p>=t&&i==-1&&(i=c,a=d),d>n&&m.dom.parentNode==e.dom){s=c,o=f;break}f=p,d=p+m.breakAfter}return{from:a,to:o<0?r+e.length:o,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:s<e.children.length&&s>=0?e.children[s].dom:null}}else return e.isText()?{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function AM(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,s=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:o,to:c}=t.bounds,d=a.from,f=null;(s===8||we.android&&t.text.length<c-o)&&(d=a.to,f="end");let m=i.doc.sliceString(o,c,lc),p,v;!a.empty&&a.from>=o&&a.to<=c&&(t.typeOver||m!=t.text)&&m.slice(0,a.from-o)==t.text.slice(0,a.from-o)&&m.slice(a.to-o)==t.text.slice(p=t.text.length-(m.length-(a.to-o)))?n={from:a.from,to:a.to,insert:wt.of(t.text.slice(a.from-o,p).split(lc))}:(v=PM(m,t.text,d-o,f))&&(we.chrome&&s==13&&v.toB==v.from+2&&t.text.slice(v.from,v.toB)==lc+lc&&v.toB--,n={from:o+v.from,to:o+v.toA,insert:wt.of(t.text.slice(v.from,v.toB).split(lc))})}else r&&(!e.hasFocus&&i.facet(Xa)||Rp(r,a))&&(r=null);if(!n&&!r)return!1;if((we.mac||we.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Ce.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:wt.of([n.insert.toString().replace("."," ")])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:we.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
57
- `&&e.lineWrapping&&(r&&(r=Ce.single(r.main.anchor-1,r.main.head-1)),n={from:a.from,to:a.to,insert:wt.of([" "])}),n)return qx(e,n,r,s);if(r&&!Rp(r,a)){let o=!1,c="select";return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin=="select"&&(o=!0),c=e.inputState.lastSelectionOrigin,c=="select.pointer"&&(r=EM(i.facet(If).map(d=>d(e)),r))),e.dispatch({selection:r,scrollIntoView:o,userEvent:c}),!0}else return!1}function qx(e,t,n,r=-1){if(we.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(we.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==" ")&&t.insert.length==1&&t.insert.lines==2&&Oc(e.contentDOM,"Enter",13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&Oc(e.contentDOM,"Backspace",8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&Oc(e.contentDOM,"Delete",46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let s,o=()=>s||(s=u9(e,t,n));return e.state.facet(uM).some(c=>c(e,t.from,t.to,a,o))||e.dispatch(o()),!0}function u9(e,t,n){let r,i=e.state,a=i.selection.main,s=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let c=t.from<a.from?-1:1,d=c<0?a.from:a.to,f=Pd(i.facet(If).map(m=>m(e)),d,c);t.from==f&&(s=f)}if(s>-1)r={changes:t,selection:Ce.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let c=a.from<t.from?i.sliceDoc(a.from,t.from):"",d=a.to>t.to?i.sliceDoc(t.to,a.to):"";r=i.replaceSelection(e.state.toText(c+t.insert.sliceString(0,void 0,e.state.lineBreak)+d))}else{let c=i.changes(t),d=n&&n.main.to<=c.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let f=e.state.sliceDoc(t.from,t.to),m,p=n&&TM(e,n.main.head);if(p){let b=t.insert.length-(t.to-t.from);m={from:p.from,to:p.to-b}}else m=e.state.doc.lineAt(a.head);let v=a.to-t.to;r=i.changeByRange(b=>{if(b.from==a.from&&b.to==a.to)return{changes:c,range:d||b.map(c)};let S=b.to-v,x=S-f.length;if(e.state.sliceDoc(x,S)!=f||S>=m.from&&x<=m.to)return{range:b};let w=i.changes({from:x,to:S,insert:t.insert}),j=b.to-a.to;return{changes:w,range:d?Ce.range(Math.max(0,d.anchor+j),Math.max(0,d.head+j)):b.map(w)}})}else r={changes:c,selection:d&&i.selection.replaceRange(d)}}let o="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,o+=".compose",e.inputState.compositionFirstChange&&(o+=".start",e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:o,scrollIntoView:!0})}function PM(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let s=e.length,o=t.length;for(;s>0&&o>0&&e.charCodeAt(s-1)==t.charCodeAt(o-1);)s--,o--;if(r=="end"){let c=Math.max(0,a-Math.min(s,o));n-=s+c-a}if(s<a&&e.length<t.length){let c=n<=a&&n>=s?a-n:0;a-=c,o=a+(o-s),s=a}else if(o<a){let c=n<=a&&n>=o?a-n:0;a-=c,s=a+(s-o),o=a}return{from:a,toA:s,toB:o}}function d9(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new wT(n,r)),(i!=n||a!=r)&&t.push(new wT(i,a))),t}function f9(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?Ce.single(n+t,r+t):null}function Rp(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var h9=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,we.safari&&e.contentDOM.addEventListener("input",()=>null),we.gecko&&E9(e.contentDOM.ownerDocument)}handleEvent(e){!S9(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let r of n.observers)r(this.view,t);for(let r of n.handlers){if(t.defaultPrevented)break;if(r(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=m9(e),n=this.handlers,r=this.view.contentDOM;for(let i in t)if(i!="scroll"){let a=!t[i].handlers.length,s=n[i];s&&a!=!s.handlers.length&&(r.removeEventListener(i,this.handleEvent),s=null),s||r.addEventListener(i,this.handleEvent,{passive:a})}for(let i in n)i!="scroll"&&!t[i]&&r.removeEventListener(i,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&NM.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),we.android&&we.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return we.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((t=QM.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||p9.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Oc(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:we.safari&&!we.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function kT(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(i){la(n.state,i)}}}function m9(e){let t=Object.create(null);function n(r){return t[r]||(t[r]={observers:[],handlers:[]})}for(let r of e){let i=r.spec,a=i&&i.plugin.domEventHandlers,s=i&&i.plugin.domEventObservers;if(a)for(let o in a){let c=a[o];c&&n(o).handlers.push(kT(r.value,c))}if(s)for(let o in s){let c=s[o];c&&n(o).observers.push(kT(r.value,c))}}for(let r in Li)n(r).handlers.push(Li[r]);for(let r in wr)n(r).observers.push(wr[r]);return t}var QM=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],p9="dthko",NM=[16,17,18,20,91,92,224,225],Tm=6;function Em(e){return Math.max(0,e)*.7+8}function g9(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var v9=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=HR(e.contentDOM),this.atoms=e.state.facet(If).map(a=>a(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(tn.allowMultipleSelections)&&O9(e,t),this.dragging=y9(e,t)&&LM(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&g9(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:s}=this.scrollParents.y.getBoundingClientRect());let o=bM(this.view);e.clientX-o.left<=r+Tm?t=-Em(r-e.clientX):e.clientX+o.right>=a-Tm&&(t=Em(e.clientX-a)),e.clientY-o.top<=i+Tm?n=-Em(i-e.clientY):e.clientY+o.bottom>=s-Tm&&(n=Em(e.clientY-s)),this.setScrollSpeed(t,n)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=EM(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function O9(e,t){let n=e.state.facet(sM);return n.length?n[0](t):we.mac?t.metaKey:t.ctrlKey}function b9(e,t){let n=e.state.facet(oM);return n.length?n[0](t):we.mac?!t.altKey:!t.ctrlKey}function y9(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=rf(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let a=0;a<i.length;a++){let s=i[a];if(s.left<=t.clientX&&s.right>=t.clientX&&s.top<=t.clientY&&s.bottom>=t.clientY)return!0}return!1}function S9(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=ln.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var Li=Object.create(null),wr=Object.create(null),RM=we.ie&&we.ie_version<15||we.ios&&we.webkit_version<604;function x9(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),MM(e,n.value)},50)}function Sg(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function MM(e,t){t=Sg(e.state,Lx,t);let{state:n}=e,r,i=1,a=n.toText(t),s=a.lines==n.selection.ranges.length;if(E0!=null&&n.selection.ranges.every(c=>c.empty)&&E0==a.toString()){let c=-1;r=n.changeByRange(d=>{let f=n.doc.lineAt(d.from);if(f.from==c)return{range:d};c=f.from;let m=n.toText((s?a.line(i++).text:t)+n.lineBreak);return{changes:{from:f.from,insert:m},range:Ce.cursor(d.from+m.length)}})}else s?r=n.changeByRange(c=>{let d=a.line(i++);return{changes:{from:c.from,to:c.to,insert:d.text},range:Ce.cursor(c.from+d.length)}}):r=n.replaceSelection(a);e.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}wr.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft};wr.wheel=wr.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()};Li.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1);wr.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin("select.pointer")};wr.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")};Li.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(lM))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=w9(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new v9(e,t,n,r)),r&&e.observer.ignore(()=>{GR(e.contentDOM);let a=e.root.activeElement;a&&!a.contains(e.contentDOM)&&a.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin("select.pointer");return!1};function jT(e,t,n,r){if(r==1)return Ce.cursor(t,n);if(r==2)return J6(e.state,t,n);{let i=e.docView.lineAt(t,n),a=e.state.doc.lineAt(i?i.posAtEnd:t),s=i?i.posAtStart:a.from,o=i?i.posAtEnd:a.to;return o<e.state.doc.length&&o==a.to&&o++,Ce.range(s,o)}}var _9=we.ie&&we.ie_version<=11,TT=null,ET=0,CT=0;function LM(e){if(!_9)return e.detail;let t=TT,n=CT;return TT=e,CT=Date.now(),ET=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(ET+1)%3:1}function w9(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=LM(t),i=e.state.selection;return{update(a){a.docChanged&&(n.pos=a.changes.mapPos(n.pos),i=i.map(a.changes))},get(a,s,o){let c=e.posAndSideAtCoords({x:a.clientX,y:a.clientY},!1),d,f=jT(e,c.pos,c.assoc,r);if(n.pos!=c.pos&&!s){let m=jT(e,n.pos,n.assoc,r),p=Math.min(m.from,f.from),v=Math.max(m.to,f.to);f=p<f.from?Ce.range(p,v,f.assoc):Ce.range(v,p,f.assoc)}return s?i.replaceRange(i.main.extend(f.from,f.to,f.assoc)):o&&r==1&&i.ranges.length>1&&(d=k9(i,c.pos))?d:o?i.addRange(f):Ce.create([f])}}}function k9(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return Ce.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}Li.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let i=e.docView.tile.nearest(t.target);if(i&&i.isWidget()){let a=i.posAtStart,s=a+i.length;(a>=n.to||s<=n.from)&&(n=Ce.range(a,s))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",Sg(e.state,Dx,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1};Li.dragend=e=>(e.inputState.draggedContent=null,!1);function AT(e,t,n,r){if(n=Sg(e.state,Lx,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,s=r&&a&&b9(e,t)?{from:a.from,to:a.to}:null,o={from:i,insert:n},c=e.state.changes(s?[s,o]:o);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}Li.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&AT(e,t,r.filter(s=>s!=null).join(e.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let o=new FileReader;o.onerror=a,o.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(o.result)||(r[s]=o.result),a()},o.readAsText(n[s])}return!0}else{let r=t.dataTransfer.getData("Text");if(r)return AT(e,t,r,!0),!0}return!1};Li.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=RM?null:t.clipboardData;return n?(MM(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(x9(e),!1)};function j9(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function T9(e){let t=[],n=[],r=!1;for(let i of e.selection.ranges)i.empty||(t.push(e.sliceDoc(i.from,i.to)),n.push(i));if(!t.length){let i=-1;for(let{from:a}of e.selection.ranges){let s=e.doc.lineAt(a);s.number>i&&(t.push(s.text),n.push({from:s.from,to:Math.min(e.doc.length,s.to+1)})),i=s.number}r=!0}return{text:Sg(e,Dx,t.join(e.lineBreak)),ranges:n,linewise:r}}var E0=null;Li.copy=Li.cut=(e,t)=>{if(!Cd(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=T9(e.state);if(!n&&!i)return!1;E0=i?n:null,t.type=="cut"&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let a=RM?null:t.clipboardData;return a?(a.clearData(),a.setData("text/plain",n),!0):(j9(e,n),!1)};var DM=hl.define();function zM(e,t){let n=[];for(let r of e.facet(dM)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:DM.of(!0)}):null}function IM(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=zM(e.state,t);n?e.dispatch(n):e.update([])}},10)}wr.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),IM(e)};wr.blur=e=>{e.observer.clearSelectionRange(),IM(e)};wr.compositionstart=wr.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange==null&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))};wr.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,we.chrome&&we.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))};wr.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()};Li.beforeinput=(e,t)=>{var n,r;if((t.inputType=="insertText"||t.inputType=="insertCompositionText")&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType=="insertReplacementText"&&e.observer.editContext){let a=(n=t.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),s=t.getTargetRanges();if(a&&s.length){let o=s[0],c=e.posAtDOM(o.startContainer,o.startOffset),d=e.posAtDOM(o.endContainer,o.endOffset);return qx(e,{from:c,to:d,insert:e.state.toText(a)},null),!0}}let i;if(we.chrome&&we.android&&(i=QM.find(a=>a.inputType==t.inputType))&&(e.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let a=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>a+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return we.ios&&t.inputType=="deleteContentForward"&&e.observer.flushSoon(),we.safari&&t.inputType=="insertText"&&e.inputState.composing>=0&&setTimeout(()=>wr.compositionend(e,t),20),!1};var PT=new Set;function E9(e){PT.has(e)||(PT.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{}))}var QT=["pre-wrap","normal","pre-line","break-spaces"],Nc=!1;function NT(){Nc=!1}var C9=class{constructor(e){this.lineWrapping=e,this.doc=wt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return QT.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let s=QT.indexOf(e)>-1,o=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=s||Math.abs(n-this.charWidth)>.1;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,o){this.heightSamples={};for(let c=0;c<a.length;c++){let d=a[c];d<0?c++:this.heightSamples[Math.floor(d*10)]=!0}}return o}},A9=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},Za=class qM{constructor(t,n,r,i,a){this.from=t,this.length=n,this.top=r,this.height=i,this._content=a}get type(){return typeof this._content=="number"?xr.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof nf?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new qM(this.from,this.length+t.length,this.top,this.height+t.height,n)}},Vt=(function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e})(Vt||(Vt={})),lp=.001,Ri=class cp{constructor(t,n,r=2){this.length=t,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(t){this.flags=(t?2:0)|this.flags&-3}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>lp&&(Nc=!0),this.height=t)}replace(t,n,r){return cp.of(r)}decomposeLeft(t,n){n.push(this)}decomposeRight(t,n){n.push(this)}applyChanges(t,n,r,i){let a=this,s=r.doc;for(let o=i.length-1;o>=0;o--){let{fromA:c,toA:d,fromB:f,toB:m}=i[o],p=a.lineAt(c,Vt.ByPosNoHeight,r.setDoc(n),0,0),v=p.to>=d?p:a.lineAt(d,Vt.ByPosNoHeight,r,0,0);for(m+=v.to-d,d=v.to;o>0&&p.from<=i[o-1].toA;)c=i[o-1].fromA,f=i[o-1].fromB,o--,c<p.from&&(p=a.lineAt(c,Vt.ByPosNoHeight,r,0,0));f+=p.from-c,c=p.from;let b=R9.build(r.setDoc(s),t,f,m);a=Mp(a,a.replace(c,d,b))}return a.updateHeight(r,0)}static empty(){return new ra(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r)if(i>a*2){let o=t[n-1];o.break?t.splice(--n,1,o.left,null,o.right):t.splice(--n,1,o.left,o.right),r+=1+o.break,i-=o.size}else if(a>i*2){let o=t[r];o.break?t.splice(r,1,o.left,null,o.right):t.splice(r,1,o.left,o.right),r+=2+o.break,a-=o.size}else break;else if(i<a){let o=t[n++];o&&(i+=o.size)}else{let o=t[--r];o&&(a+=o.size)}let s=0;return t[n-1]==null?(s=1,n--):t[n]==null&&(s=1,r++),new Q9(cp.of(t.slice(0,n)),s,cp.of(t.slice(r)))}};function Mp(e,t){return e==t?e:(e.constructor!=t.constructor&&(Nc=!0),t)}Ri.prototype.size=1;var P9=Ut.replace({}),BM=class extends Ri{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new Za(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new Za(r,0,n,this.spaceAbove,P9):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,Vt.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},ra=class C0 extends BM{constructor(t,n,r){super(t,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(t,n){return new Za(n,this.length,t+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof C0||i instanceof bc&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof bc?i=new C0(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):Ri.of(r)}updateHeight(t,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}},bc=class Ci extends Ri{constructor(t){super(t,0)}heightMetrics(t,n){let r=t.doc.lineAt(n).number,i=t.doc.lineAt(n+this.length).number,a=i-r+1,s,o=0;if(t.lineWrapping){let c=Math.min(this.height,t.lineHeight*a);s=c/a,this.length>a+1&&(o=(this.height-c)/(this.length-a-1))}else s=this.height/a;return{firstLine:r,lastLine:i,perLine:s,perChar:o}}blockAt(t,n,r,i){let{firstLine:a,lastLine:s,perLine:o,perChar:c}=this.heightMetrics(n,i);if(n.lineWrapping){let d=i+(t<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-r)/this.height))*this.length)),f=n.doc.lineAt(d),m=o+f.length*c,p=Math.max(r,t-m/2);return new Za(f.from,f.length,p,m,0)}else{let d=Math.max(0,Math.min(s-a,Math.floor((t-r)/o))),{from:f,length:m}=n.doc.line(a+d);return new Za(f,m,r+o*d,o,0)}}lineAt(t,n,r,i,a){if(n==Vt.ByHeight)return this.blockAt(t,r,i,a);if(n==Vt.ByPosNoHeight){let{from:v,to:b}=r.doc.lineAt(t);return new Za(v,b-v,0,0,0)}let{firstLine:s,perLine:o,perChar:c}=this.heightMetrics(r,a),d=r.doc.lineAt(t),f=o+d.length*c,m=d.number-s,p=i+o*m+c*(d.from-a-m);return new Za(d.from,d.length,Math.max(i,Math.min(p,i+this.height-f)),f,0)}forEachLine(t,n,r,i,a,s){t=Math.max(t,a),n=Math.min(n,a+this.length);let{firstLine:o,perLine:c,perChar:d}=this.heightMetrics(r,a);for(let f=t,m=i;f<=n;){let p=r.doc.lineAt(f);if(f==t){let b=p.number-o;m+=c*b+d*(t-a-b)}let v=c+d*p.length;s(new Za(p.from,p.length,m,v,0)),m+=v,f=p.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let a=r[r.length-1];a instanceof Ci?r[r.length-1]=new Ci(a.length+i):r.push(null,new Ci(i-1))}if(t>0){let a=r[0];a instanceof Ci?r[0]=new Ci(t+a.length):r.unshift(new Ci(t-1),null)}return Ri.of(r)}decomposeLeft(t,n){n.push(new Ci(t-1),null)}decomposeRight(t,n){n.push(null,new Ci(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],o=Math.max(n,i.from),c=-1;for(i.from>n&&s.push(new Ci(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let f=t.doc.lineAt(o).length;s.length&&s.push(null);let m=i.heights[i.index++],p=0;m<0&&(p=-m,m=i.heights[i.index++]),c==-1?c=m:Math.abs(m-c)>=lp&&(c=-2);let v=new ra(f,m,p);v.outdated=!1,s.push(v),o+=f+1}o<=a&&s.push(null,new Ci(a-o).updateHeight(t,o));let d=Ri.of(s);return(c<0||Math.abs(d.height-this.height)>=lp||Math.abs(c-this.heightMetrics(t,n).perLine)>=lp)&&(Nc=!0),Mp(this,d)}else(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},Q9=class extends Ri{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,s=i+this.left.length+this.break,o=t==Vt.ByHeight?e<a:e<s,c=o?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,s);if(this.break||(o?c.to<s:c.from>s))return c;let d=t==Vt.ByPosNoHeight?Vt.ByPosNoHeight:Vt.ByPos;return o?c.join(this.right.lineAt(s,d,n,a,s)):this.left.lineAt(s,d,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let s=r+this.left.height,o=i+this.left.length+this.break;if(this.break)e<o&&this.left.forEachLine(e,t,n,r,i,a),t>=o&&this.right.forEachLine(e,t,n,s,o,a);else{let c=this.lineAt(o,Vt.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,s,o,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let s of n)i.push(s);if(e>0&&RT(i,a-1),t<this.length){let s=i.length;this.decomposeRight(t,i),RT(i,s)}return Ri.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?Ri.of(this.break?[e,null,t]:[e,t]):(this.left=Mp(this.left,e),this.right=Mp(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,s=t+i.length+this.break,o=null;return r&&r.from<=t+i.length&&r.more?o=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+a.length&&r.more?o=a=a.updateHeight(e,s,n,r):a.updateHeight(e,s,n),o?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};function RT(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof bc&&(r=e[t+1])instanceof bc&&e.splice(t-1,3,new bc(n.length+1+r.length))}var N9=5,R9=class XM{constructor(t,n){this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof ra?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new ra(r-this.pos,-1,0)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(t,n,r){if(t<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,a=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=n-t;r.block?this.addBlock(new BM(s,i,r)):(s||a||i>=N9)&&this.addLineDeco(i,a,s)}else n>t&&this.span(t,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=n,this.writtenTo<t&&((this.writtenTo<t-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new ra(this.pos-t,-1,0)),this.writtenTo=this.pos}blankContent(t,n){let r=new bc(n-t);return this.oracle.doc.lineAt(t).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof ra)return t;let n=new ra(0,-1,0);return this.nodes.push(n),n}addBlock(t){this.enterLine();let n=t.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,n&&n.endSide>0&&(this.covering=t)}addLineDeco(t,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,t),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(t){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof ra)&&!this.isCovered?this.nodes.push(new ra(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=t;for(let i of this.nodes)i instanceof ra&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(t,n,r,i){let a=new XM(r,t);return Kt.spans(n,r,i,a,0),a.finish(r)}};function M9(e,t,n){let r=new L9;return Kt.compare(e,t,n,r,0),r.changes}var L9=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&vc(e,t,this.changes,5)}};function D9(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),o=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let d=e.parentNode;d&&d!=r.body;)if(d.nodeType==1){let f=d,m=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&m.overflow!="visible"){let p=f.getBoundingClientRect();a=Math.max(a,p.left),s=Math.min(s,p.right),o=Math.max(o,p.top),c=Math.min(d==e.parentNode?i.innerHeight:c,p.bottom)}d=m.position=="absolute"||m.position=="fixed"?f.offsetParent:f.parentNode}else if(d.nodeType==11)d=d.host;else break;return{left:a-n.left,right:Math.max(a,s)-n.left,top:o-(n.top+t),bottom:Math.max(o,c)-(n.top+t)}}function z9(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function I9(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var Eb=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return Ut.replace({widget:new q9(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},q9=class extends Uc{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}},MT=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=LT,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=kn.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(zx).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new C9(n),this.stateDeco=DT(t),this.heightMap=Ri.empty().applyChanges(this.stateDeco,wt.empty,this.heightOracle.setDoc(t.doc),[new Ua(0,0,0,t.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ut.set(this.lineGaps.map(r=>r.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:i,to:a})=>r>=i&&r<=a)){let{from:i,to:a}=this.lineBlockAt(r);e.push(new Cm(i,a))}}return this.viewports=e.sort((n,r)=>n.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?LT:new Z9(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(pd(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=DT(this.state);let r=e.changedRanges,i=Ua.extendWithRanges(r,M9(n,this.stateDeco,e?e.changes:fa.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);NT(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||Nc)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let o=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<o.from||t.range.head>o.to)||!this.viewportIsAppropriate(o))&&(o=this.getViewport(0,t));let c=o.from!=this.viewport.from||o.to!=this.viewport.to;this.viewport=o,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(A6)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?kn.RTL:kn.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent==="refresh",s=t.getBoundingClientRect(),o=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let c=0,d=0;if(s.width&&s.height){let{scaleX:A,scaleY:Q}=WR(t,s);(A>.005&&Math.abs(this.scaleX-A)>.005||Q>.005&&Math.abs(this.scaleY-Q)>.005)&&(this.scaleX=A,this.scaleY=Q,c|=16,a=o=!0)}let f=(parseInt(n.paddingTop)||0)*this.scaleY,m=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=m)&&(this.paddingTop=f,this.paddingBottom=m,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(o=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let p=HR(this.view.contentDOM,!1).y;p!=this.scrollParent&&(this.scrollParent=p,this.scrollAnchorHeight=-1,this.scrollOffset=0);let v=this.getScrollOffset();this.scrollOffset!=v&&(this.scrollAnchorHeight=-1,this.scrollOffset=v),this.scrolledToBottom=KR(this.scrollParent||e.win);let b=(this.printing?I9:D9)(t,this.paddingTop),S=b.top-this.pixelViewport.top,x=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let w=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(w!=this.inView&&(this.inView=w,w&&(o=!0)),!this.inView&&!this.scrollTarget&&!z9(e.dom))return 0;let j=s.width;if((this.contentDOMWidth!=j||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),o){let A=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(A)&&(a=!0),a||r.lineWrapping&&Math.abs(j-this.contentDOMWidth)>r.charWidth){let{lineHeight:Q,charWidth:C,textHeight:R}=e.docView.measureTextSize();a=Q>0&&r.refresh(i,Q,C,R,Math.max(5,j/C),A),a&&(e.docView.minWidth=0,c|=16)}S>0&&x>0?d=Math.max(S,x):S<0&&x<0&&(d=Math.min(S,x)),NT();for(let Q of this.viewports){let C=Q.from==this.viewport.from?A:e.docView.measureVisibleLineHeights(Q);this.heightMap=(a?Ri.empty().applyChanges(this.stateDeco,wt.empty,this.heightOracle,[new Ua(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new A9(Q.from,C))}Nc&&(c|=2)}let T=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return T&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),c|=this.updateForViewport()),(c&2||T)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,o=new Cm(r.lineAt(a-n*1e3,Vt.ByHeight,i,0,0).from,r.lineAt(s+(1-n)*1e3,Vt.ByHeight,i,0,0).to);if(t){let{head:c}=t.range;if(c<o.from||c>o.to){let d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=r.lineAt(c,Vt.ByPos,i,0,0),m;t.y=="center"?m=(f.top+f.bottom)/2-d/2:t.y=="start"||t.y=="nearest"&&c<o.from?m=f.top:m=f.bottom-d,o=new Cm(r.lineAt(m-1e3/2,Vt.ByHeight,i,0,0).from,r.lineAt(m+d+1e3/2,Vt.ByHeight,i,0,0).to)}}return o}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new Cm(this.heightMap.lineAt(n,Vt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Vt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,Vt.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,Vt.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:s}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=s+Math.max(10,Math.min(n,250)))&&r>a-2*1e3&&i<s+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new Eb(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=kn.LTR&&!n)return[];let s=[],o=(d,f,m,p)=>{if(f-d<i)return;let v=this.state.selection.main,b=[v.from];v.empty||b.push(v.to);for(let x of b)if(x>d&&x<f){o(d,x-10,m,p),o(x+10,f,m,p);return}let S=X9(e,x=>x.from>=m.from&&x.to<=m.to&&Math.abs(x.from-d)<i&&Math.abs(x.to-f)<i&&!b.some(w=>x.from<w&&x.to>w));if(!S){if(f<m.to&&t&&n&&t.visibleRanges.some(j=>j.from<=f&&j.to>=f)){let j=t.moveToLineBoundary(Ce.cursor(f),!1,!0).head;j>d&&(f=j)}let x=this.gapSize(m,d,f,p),w=n||x<2e6?x:2e6;S=new Eb(d,f,x,w)}s.push(S)},c=d=>{if(d.length<a||d.type!=xr.Text)return;let f=B9(d.from,d.to,this.stateDeco);if(f.total<a)return;let m=this.scrollTarget?this.scrollTarget.range.head:null,p,v;if(n){let b=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,S,x;if(m!=null){let w=Pm(f,m),j=((this.visibleBottom-this.visibleTop)/2+b)/d.height;S=w-j,x=w+j}else S=(this.visibleTop-d.top-b)/d.height,x=(this.visibleBottom-d.top+b)/d.height;p=Am(f,S),v=Am(f,x)}else{let b=f.total*this.heightOracle.charWidth,S=r*this.heightOracle.charWidth,x=0;if(b>2e6)for(let Q of e)Q.from>=d.from&&Q.from<d.to&&Q.size!=Q.displaySize&&Q.from*this.heightOracle.charWidth+x<this.pixelViewport.left&&(x=Q.size-Q.displaySize);let w=this.pixelViewport.left+x,j=this.pixelViewport.right+x,T,A;if(m!=null){let Q=Pm(f,m),C=((j-w)/2+S)/b;T=Q-C,A=Q+C}else T=(w-S)/b,A=(j+S)/b;p=Am(f,T),v=Am(f,A)}p>d.from&&o(d.from,p,d,f),v<d.to&&o(v,d.to,d,f)};for(let d of this.viewportLines)Array.isArray(d.type)?d.type.forEach(c):c(d);return s}gapSize(e,t,n,r){let i=Pm(r,n)-Pm(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){Eb.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Ut.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];Kt.spans(t,this.viewport.from,this.viewport.to,{span(i,a){n.push({from:i,to:a})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let i=0;i<n.length&&!(r&8);i++){let a=this.visibleRanges[i],s=n[i];(a.from!=s.from||a.to!=s.to)&&(r|=4,e&&e.mapPos(a.from,-1)==s.from&&e.mapPos(a.to,1)==s.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||pd(this.heightMap.lineAt(e,Vt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||pd(this.heightMap.lineAt(this.scaler.fromDOM(e),Vt.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return pd(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},Cm=class{constructor(e,t){this.from=e,this.to=t}};function B9(e,t,n){let r=[],i=e,a=0;return Kt.spans(n,e,t,{span(){},point(s,o){s>i&&(r.push({from:i,to:s}),a+=s-i),i=o}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function Am({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let i=0;;i++){let{from:a,to:s}=t[i],o=s-a;if(r<=o)return a+r;r-=o}}function Pm(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function X9(e,t){for(let n of e)if(t(n))return n}var LT={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function DT(e){let t=e.facet(Og).filter(r=>typeof r!="function"),n=e.facet(Ix).filter(r=>typeof r!="function");return n.length&&t.push(Kt.join(n)),t}var Z9=class ZM{constructor(t,n,r){let i=0,a=0,s=0;this.viewports=r.map(({from:o,to:c})=>{let d=n.lineAt(o,Vt.ByPos,t,0,0).top,f=n.lineAt(c,Vt.ByPos,t,0,0).bottom;return i+=f-d,{from:o,to:c,top:d,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let o of this.viewports)o.domTop=s+(o.top-a)*this.scale,s=o.domBottom=o.domTop+(o.bottom-o.top),a=o.bottom}toDOM(t){for(let n=0,r=0,i=0;;n++){let a=n<this.viewports.length?this.viewports[n]:null;if(!a||t<a.top)return i+(t-r)*this.scale;if(t<=a.bottom)return a.domTop+(t-a.top);r=a.bottom,i=a.domBottom}}fromDOM(t){for(let n=0,r=0,i=0;;n++){let a=n<this.viewports.length?this.viewports[n]:null;if(!a||t<a.domTop)return r+(t-i)/this.scale;if(t<=a.domBottom)return a.top+(t-a.domTop);r=a.bottom,i=a.domBottom}}eq(t){return t instanceof ZM?this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((n,r)=>n.from==t.viewports[r].from&&n.to==t.viewports[r].to):!1}};function pd(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new Za(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(i=>pd(i,t)):e._content)}var Qm=qe.define({combine:e=>e.join(" ")}),A0=qe.define({combine:e=>e.indexOf(!0)>-1}),P0=no.newName(),$M=no.newName(),VM=no.newName(),UM={"&light":"."+$M,"&dark":"."+VM};function Q0(e,t,n){return new no(t,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return e;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):e+" "+r}})}var $9=Q0("."+P0,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},UM),V9={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Cb=we.ie&&we.ie_version<=11,U9=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new O6,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(we.ie&&we.ie_version<=11||we.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&we.android&&e.constructor.EDIT_CONTEXT!==!1&&!(we.chrome&&we.chrome_version<126)&&(this.editContext=new F9(e),e.state.facet(Xa)&&(e.contentDOM.editContext=this.editContext.editContext)),Cb&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Xa)?n.root.activeElement!=this.dom:!Cd(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(we.ie&&we.ie_version<=11||we.android&&we.chrome)&&!n.state.selection.main.empty&&r.focusNode&&Ad(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=rf(e.root);if(!t)return!1;let n=we.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Y9(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=Cd(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&y6(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,V9),Cb&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Cb&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let r=()=>{let i=this.delayedAndroidKey;i&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=i.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&i.force&&Oc(this.dom,i.key,i.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let a=this.readMutation(i);a&&(a.typeOver&&(r=!0),t==-1?{from:t,to:n}=a:(t=Math.min(a.from,t),n=Math.max(a.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&Cd(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new c9(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=AM(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!Rp(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let n=zT(t,e.previousSibling||e.target.previousSibling,-1),r=zT(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Xa)!=e.state.facet(Xa)&&(e.view.contentDOM.editContext=e.state.facet(Xa)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function zT(e,t,n){for(;t;){let r=ln.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}function IT(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor,1);return Ad(s.node,s.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function Y9(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return IT(e,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),n?IT(e,n):null}var F9=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,s=this.toEditorPos(n.updateRangeStart),o=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:s,drifted:!1});let c=o-s>n.text.length;s==this.from&&i<this.from?s=i:o==this.to&&i>this.to&&(o=i);let d=PM(e.state.sliceDoc(s,o),n.text,(c?r.from:r.to)-s,c?"end":null);if(!d){let m=Ce.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));Rp(m,r)||e.dispatch({selection:m,userEvent:"select"});return}let f={from:d.from+s,to:d.toA+s,insert:wt.of(n.text.slice(d.from,d.toB).split(`
58
- `))};if((we.mac||we.android)&&f.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:s,to:o,insert:wt.of([n.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let m=this.to-this.from+(f.to-f.from+f.insert.length);qx(e,f,Ce.single(this.toEditorPos(n.selectionStart,m),this.toEditorPos(n.selectionEnd,m)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let a=this.toEditorPos(n.rangeStart),s=this.toEditorPos(n.rangeEnd);a<s;a++){let o=e.coordsForChar(a);i=o&&new DOMRect(o.left,o.top,o.right-o.left,o.bottom-o.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=n=>{let r=[];for(let i of n.getTextFormats()){let a=i.underlineStyle,s=i.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(s)){let o=this.toEditorPos(i.rangeStart),c=this.toEditorPos(i.rangeEnd);if(o<c){let d=`text-decoration: underline ${/^[a-z]/.test(a)?a+" ":a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${/thin/i.test(s)?1:2}px`;r.push(Ut.mark({attributes:{style:d}}).range(o,c))}}}e.dispatch({effects:mM.of(Ut.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let r=rf(n.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,s,o,c)=>{if(n)return;let d=c.length-(a-i);if(r&&a>=r.to)if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=d,this.to+=d;return}else r=null,this.revertPending(e.state);if(i+=t,a+=t,a<=this.from)this.from+=d,this.to+=d;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=d}t+=d}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},Ie=class N0{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:r}=t;this.dispatchTransactions=t.dispatchTransactions||r&&(i=>i.forEach(a=>r(a,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=t.root||b6(t.parent)||document,this.viewState=new MT(this,t.state||tn.create(t)),t.scrollTo&&t.scrollTo.is(jm)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(uc).map(i=>new _b(i));for(let i of this.plugins)i.update(this);this.observer=new U9(this),this.inputState=new h9(this),this.inputState.ensureHandlers(this.plugins),this.docView=new xT(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...t){let n=t.length==1&&t[0]instanceof di?t:t.length==1&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(n,this)}update(t){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,a=this.state;for(let p of t){if(p.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=p.state}if(this.destroyed){this.viewState.state=a;return}let s=this.hasFocus,o=0,c=null;t.some(p=>p.annotation(DM))?(this.inputState.notifiedFocused=s,o=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,c=zM(a,s),c||(o=1));let d=this.observer.delayedAndroidKey,f=null;if(d?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(f=null)):this.observer.clear(),a.facet(tn.phrases)!=this.state.facet(tn.phrases))return this.setState(a);i=bT.create(this,a,t),i.flags|=o;let m=this.viewState.scrollTarget;try{this.updateState=2;for(let p of t){if(m&&(m=m.map(p.changes)),p.scrollIntoView){let{main:v}=p.state.selection;m=new xb(v.empty?v:Ce.cursor(v.head,v.head>v.anchor?-1:1))}for(let v of p.effects)v.is(jm)&&(m=v.value.clip(this.state))}this.viewState.update(i,m),this.bidiCache=BT.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(hd)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(p=>p.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Qm)!=i.state.facet(Qm)&&(this.viewState.mustMeasureContent=!0),(n||r||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let p of this.state.facet(x0))try{p(i)}catch(v){la(this.state,v,"update listener")}(c||f)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),f&&!AM(this,f)&&d.force&&Oc(this.contentDOM,d.key,d.keyCode)})}setState(t){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=t;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new MT(this,t),this.plugins=t.facet(uc).map(r=>new _b(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new xT(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(t){let n=t.startState.facet(uc),r=t.state.facet(uc);if(n!=r){let i=[];for(let a of r){let s=n.indexOf(a);if(s<0)i.push(new _b(a));else{let o=this.plugins[s];o.mustUpdate=t,i.push(o)}}for(let a of this.plugins)a.mustUpdate!=t&&a.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=t;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let n=t.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){la(this.state,r,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,t&&this.observer.forceFlush();let n=null,r=this.viewState.scrollParent,i=this.viewState.getScrollOffset(),{scrollAnchorPos:a,scrollAnchorHeight:s}=this.viewState;Math.abs(i-this.viewState.scrollOffset)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let o=0;;o++){if(s<0)if(KR(r||this.win))a=-1,s=this.viewState.heightMap.height;else{let v=this.viewState.scrollAnchorAt(i);a=v.from,s=v.top}this.updateState=1;let c=this.viewState.measure();if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(o>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let d=[];c&4||([this.measureRequests,d]=[d,this.measureRequests]);let f=d.map(v=>{try{return v.read(this)}catch(b){return la(this.state,b),qT}}),m=bT.create(this,this.state,[]),p=!1;m.flags|=c,n?n.flags|=c:n=m,this.updateState=2,m.empty||(this.updatePlugins(m),this.inputState.update(m),this.updateAttrs(),p=this.docView.update(m),p&&this.docViewUpdate());for(let v=0;v<d.length;v++)if(f[v]!=qT)try{let b=d[v];b.write&&b.write(f[v],this)}catch(b){la(this.state,b)}if(p&&this.docView.updateSelection(!0),!m.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let b=((a<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(a).top)-s)/this.scaleY;if((b>1||b<-1)&&(r==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){i=i+b,r?r.scrollTop+=b:this.win.scrollBy(0,b),s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let o of this.state.facet(x0))o(n)}get themeClasses(){return P0+" "+(this.state.facet(A0)?VM:$M)+" "+this.state.facet(Qm)}updateAttrs(){let t=XT(this,pM,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Xa)?"true":"false",class:"cm-content",style:`${we.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),XT(this,zx,n);let r=this.observer.ignore(()=>{let i=mT(this.contentDOM,this.contentAttrs,n),a=mT(this.dom,this.editorAttrs,t);return i||a});return this.editorAttrs=t,this.contentAttrs=n,r}showAnnouncements(t){let n=!0;for(let r of t)for(let i of r.effects)if(i.is(N0.announce)){n&&(this.announceDOM.textContent=""),n=!1;let a=this.announceDOM.appendChild(document.createElement("div"));a.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(hd);let t=this.state.facet(N0.cspNonce);no.mount(this.root,this.styleModules.concat($9).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t){if(this.measureRequests.indexOf(t)>-1)return;if(t.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===t.key){this.measureRequests[n]=t;return}}this.measureRequests.push(t)}}plugin(t){let n=this.pluginMap.get(t);return(n===void 0||n&&n.plugin!=t)&&this.pluginMap.set(t,n=this.plugins.find(r=>r.plugin==t)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,n,r){return Tb(this,t,_T(this,t,n,r))}moveByGroup(t,n){return Tb(this,t,_T(this,t,n,r=>r9(this,t.head,r)))}visualLineSide(t,n){let r=this.bidiSpans(t),i=this.textDirectionAt(t.from),a=r[n?r.length-1:0];return Ce.cursor(a.side(n,i)+t.from,a.forward(!n,i)?1:-1)}moveToLineBoundary(t,n,r=!0){return n9(this,t,n,r)}moveVertically(t,n,r){return Tb(this,t,i9(this,t,n,r))}domAtPos(t,n=1){return this.docView.domAtPos(t,n)}posAtDOM(t,n=0){return this.docView.posFromDOM(t,n)}posAtCoords(t,n=!0){this.readMeasured();let r=T0(this,t,n);return r&&r.pos}posAndSideAtCoords(t,n=!0){return this.readMeasured(),T0(this,t,n)}coordsAtPos(t,n=1){this.readMeasured();let r=this.docView.coordsAt(t,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(t),a=this.bidiSpans(i),s=a[oa.find(a,t-i.from,-1,n)];return Ap(r,s.dir==kn.LTR==n>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(fM)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>W9)return iM(t.length);let n=this.textDirectionAt(t.from),r;for(let a of this.bidiCache)if(a.from==t.from&&a.dir==n&&(a.fresh||rM(a.isolates,r=OT(this,t))))return a.order;r||(r=OT(this,t));let i=T6(t.text,n,r);return this.bidiCache.push(new BT(t.from,t.to,n,r,!0,i)),i}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||we.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{GR(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,n={}){return jm.of(new xb(typeof t=="number"?Ce.cursor(t):t,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(t);return jm.of(new xb(Ce.cursor(r.from),"start","start",r.top-t,n,!0))}setTabFocusMode(t){t==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof t=="boolean"?this.inputState.tabFocusMode=t?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return sf.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return sf.define(()=>({}),{eventObservers:t})}static theme(t,n){let r=no.newName(),i=[Qm.of(r),hd.of(Q0(`.${r}`,t))];return n&&n.dark&&i.push(A0.of(!0)),i}static baseTheme(t){return zf.lowest(hd.of(Q0("."+P0,t,UM)))}static findFromDOM(t){var n;let r=t.querySelector(".cm-content"),i=r&&ln.get(r)||ln.get(t);return((n=i==null?void 0:i.root)===null||n===void 0?void 0:n.view)||null}};Ie.styleModule=hd;Ie.inputHandler=uM;Ie.clipboardInputFilter=Lx;Ie.clipboardOutputFilter=Dx;Ie.scrollHandler=hM;Ie.focusChangeEffect=dM;Ie.perLineTextDirection=fM;Ie.exceptionSink=cM;Ie.updateListener=x0;Ie.editable=Xa;Ie.mouseSelectionStyle=lM;Ie.dragMovesSelection=oM;Ie.clickAddsSelectionRange=sM;Ie.decorations=Og;Ie.blockWrappers=gM;Ie.outerDecorations=Ix;Ie.atomicRanges=If;Ie.bidiIsolatedRanges=vM;Ie.scrollMargins=OM;Ie.darkTheme=A0;Ie.cspNonce=qe.define({combine:e=>e.length?e[0]:""});Ie.contentAttributes=zx;Ie.editorAttributes=pM;Ie.lineWrapping=Ie.contentAttributes.of({class:"cm-lineWrapping"});Ie.announce=on.define();var W9=4096,qT={},BT=class YM{constructor(t,n,r,i,a,s){this.from=t,this.to=n,this.dir=r,this.isolates=i,this.fresh=a,this.order=s}static update(t,n){if(n.empty&&!t.some(a=>a.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:kn.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let s=t[a];s.dir==i&&!n.touchesRange(s.from,s.to)&&r.push(new YM(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return r}};function XT(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let a=r[i],s=typeof a=="function"?a(e):a;s&&Px(s,n)}return n}var H9=we.mac?"mac":we.windows?"win":we.linux?"linux":"key";function G9(e,t){const n=e.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,a,s,o;for(let c=0;c<n.length-1;++c){const d=n[c];if(/^(cmd|meta|m)$/i.test(d))o=!0;else if(/^a(lt)?$/i.test(d))i=!0;else if(/^(c|ctrl|control)$/i.test(d))a=!0;else if(/^s(hift)?$/i.test(d))s=!0;else if(/^mod$/i.test(d))t=="mac"?o=!0:a=!0;else throw new Error("Unrecognized modifier name: "+d)}return i&&(r="Alt-"+r),a&&(r="Ctrl-"+r),o&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function Nm(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n!==!1&&t.shiftKey&&(e="Shift-"+e),e}var K9=zf.default(Ie.domEventHandlers({keydown(e,t){return n7(J9(t.state),e,t,"editor")}})),Bx=qe.define({enables:K9}),ZT=new WeakMap;function J9(e){let t=e.facet(Bx),n=ZT.get(t);return n||ZT.set(t,n=t7(t.reduce((r,i)=>r.concat(i),[]))),n}var Zs=null,e7=4e3;function t7(e,t=H9){let n=Object.create(null),r=Object.create(null),i=(s,o)=>{let c=r[s];if(c==null)r[s]=o;else if(c!=o)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},a=(s,o,c,d,f)=>{var m,p;let v=n[s]||(n[s]=Object.create(null)),b=o.split(/ (?!$)/).map(w=>G9(w,t));for(let w=1;w<b.length;w++){let j=b.slice(0,w).join(" ");i(j,!0),v[j]||(v[j]={preventDefault:!0,stopPropagation:!1,run:[T=>{let A=Zs={view:T,prefix:j,scope:s};return setTimeout(()=>{Zs==A&&(Zs=null)},e7),!0}]})}let S=b.join(" ");i(S,!1);let x=v[S]||(v[S]={preventDefault:!1,stopPropagation:!1,run:((p=(m=v._any)===null||m===void 0?void 0:m.run)===null||p===void 0?void 0:p.slice())||[]});c&&x.run.push(c),d&&(x.preventDefault=!0),f&&(x.stopPropagation=!0)};for(let s of e){let o=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let d of o){let f=n[d]||(n[d]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:m}=s;for(let p in f)f[p].run.push(v=>m(v,R0))}let c=s[t]||s.key;if(c)for(let d of o)a(d,c,s.run,s.preventDefault,s.stopPropagation),s.shift&&a(d,"Shift-"+c,s.shift,s.preventDefault,s.stopPropagation)}return n}var R0=null;function n7(e,t,n,r){R0=t;let i=d6(t),a=V$(i,0),s=U$(a)==i.length&&i!=" ",o="",c=!1,d=!1,f=!1;Zs&&Zs.view==n&&Zs.scope==r&&(o=Zs.prefix+" ",NM.indexOf(t.keyCode)<0&&(d=!0,Zs=null));let m=new Set,p=x=>{if(x){for(let w of x.run)if(!m.has(w)&&(m.add(w),w(n)))return x.stopPropagation&&(f=!0),!0;x.preventDefault&&(x.stopPropagation&&(f=!0),d=!0)}return!1},v=e[r],b,S;return v&&(p(v[o+Nm(i,t,!s)])?c=!0:s&&(t.altKey||t.metaKey||t.ctrlKey)&&!(we.windows&&t.ctrlKey&&t.altKey)&&!(we.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(b=ro[t.keyCode])&&b!=i?(p(v[o+Nm(b,t,!0)])||t.shiftKey&&(S=tf[t.keyCode])!=i&&S!=b&&p(v[o+Nm(S,t,!1)]))&&(c=!0):s&&t.shiftKey&&p(v[o+Nm(i,t,!0)])&&(c=!0),!c&&p(v._any)&&(c=!0)),d&&(c=!0),c&&f&&t.stopPropagation(),R0=null,c}var rl=class extends to{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};rl.prototype.elementClass="";rl.prototype.toDOM=void 0;rl.prototype.mapMode=sr.TrackBefore;rl.prototype.startSide=rl.prototype.endSide=-1;rl.prototype.point=!0;var Ab=qe.define(),r7=qe.define(),up=qe.define(),$T=qe.define({combine:e=>e.some(t=>t)});function i7(e){return[a7]}var a7=sf.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(up).map(t=>new UT(e,t)),this.fixed=!e.state.facet($T);for(let t of this.gutters)t.config.side=="after"?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let t=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=t,this.domAfter&&(this.domAfter.style.minHeight=t)}this.view.state.facet($T)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Kt.iter(this.view.state.facet(Ab),this.view.viewport.from),r=[],i=this.gutters.map(a=>new s7(a,this.view.viewport,-this.view.documentPadding.top));for(let a of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(a.type)){let s=!0;for(let o of a.type)if(o.type==xr.Text&&s){M0(n,r,o.from);for(let c of i)c.line(this.view,o,r);s=!1}else if(o.widget)for(let c of i)c.widget(this.view,o)}else if(a.type==xr.Text){M0(n,r,a.from);for(let s of i)s.line(this.view,a,r)}else if(a.widget)for(let s of i)s.widget(this.view,a);for(let a of i)a.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(up),n=e.state.facet(up),r=e.docChanged||e.heightChanged||e.viewportChanged||!Kt.eq(e.startState.facet(Ab),e.state.facet(Ab),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let i of this.gutters)i.update(e)&&(r=!0);else{r=!0;let i=[];for(let a of n){let s=t.indexOf(a);s<0?i.push(new UT(this.view,a)):(this.gutters[s].update(e),i.push(this.gutters[s]))}for(let a of this.gutters)a.dom.remove(),i.indexOf(a)<0&&a.destroy();for(let a of i)a.config.side=="after"?this.getDOMAfter().appendChild(a.dom):this.dom.appendChild(a.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>Ie.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==kn.LTR?{left:r,right:i}:{right:r,left:i}})});function VT(e){return Array.isArray(e)?e:[e]}function M0(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var s7=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=Kt.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let s=new FM(e,a,i,n);r.elements.push(s),r.dom.appendChild(s.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];M0(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let i of e.state.facet(r7)){let a=i(e,t.widget,t);a&&(r||(r=[])).push(a)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},UT=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let o=i.getBoundingClientRect();a=(o.top+o.bottom)/2}else a=r.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,s,r)&&r.preventDefault()});this.markers=VT(t.markers(e)),t.initialSpacer&&(this.spacer=new FM(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=VT(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let n=e.view.viewport;return!Kt.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},FM=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),o7(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n="cm-gutterElement",r=this.dom.firstChild;for(let i=0,a=0;;){let s=a,o=i<t.length?t[i++]:null,c=!1;if(o){let d=o.elementClass;d&&(n+=" "+d);for(let f=a;f<this.markers.length;f++)if(this.markers[f].compare(o)){s=f,c=!0;break}}else s=this.markers.length;for(;a<s;){let d=this.markers[a++];if(d.toDOM){d.destroy(r);let f=r.nextSibling;r.remove(),r=f}}if(!o)break;o.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(o.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function o7(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var l7=qe.define(),c7=qe.define(),dc=qe.define({combine(e){return i6(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,n){let r=Object.assign({},t);for(let i in n){let a=r[i],s=n[i];r[i]=a?(o,c,d)=>a(o,c,d)||s(o,c,d):s}return r}})}}),Pb=class extends rl{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function Qb(e,t){return e.state.facet(dc).formatNumber(t,e.state)}var u7=up.compute([dc],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(t){return t.state.facet(l7)},lineMarker(t,n,r){return r.some(i=>i.toDOM)?null:new Pb(Qb(t,t.state.doc.lineAt(n.from).number))},widgetMarker:(t,n,r)=>{for(let i of t.state.facet(c7)){let a=i(t,n,r);if(a)return a}return null},lineMarkerChange:t=>t.startState.facet(dc)!=t.state.facet(dc),initialSpacer(t){return new Pb(Qb(t,YT(t.state.doc.lines)))},updateSpacer(t,n){let r=Qb(n.view,YT(n.view.state.doc.lines));return r==t.number?t:new Pb(r)},domEventHandlers:e.facet(dc).domEventHandlers,side:"before"}));function Lp(e={}){return[dc.of(e),i7(),u7]}function YT(e){let t=9;for(;t<e;)t=t*10+9;return t}var WM=1024,d7=0,ci=class{constructor(e,t){this.from=e,this.to=t}},nt=class{constructor(e={}){this.id=d7++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Zn.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};nt.closedBy=new nt({deserialize:e=>e.split(" ")});nt.openedBy=new nt({deserialize:e=>e.split(" ")});nt.group=new nt({deserialize:e=>e.split(" ")});nt.isolate=new nt({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}});nt.contextHash=new nt({perNode:!0});nt.lookAhead=new nt({perNode:!0});nt.mounted=new nt({perNode:!0});var yc=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[nt.mounted.id]}},f7=Object.create(null),Zn=class HM{constructor(t,n,r,i=0){this.name=t,this.props=n,this.id=r,this.flags=i}static define(t){let n=t.props&&t.props.length?Object.create(null):f7,r=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new HM(t.name||"",n,t.id,r);if(t.props){for(let a of t.props)if(Array.isArray(a)||(a=a(i)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[a[0].id]=a[1]}}return i}prop(t){return this.props[t.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(t){if(typeof t=="string"){if(this.name==t)return!0;let n=this.prop(nt.group);return n?n.indexOf(t)>-1:!1}return this.id==t}static match(t){let n=Object.create(null);for(let r in t)for(let i of r.split(" "))n[i]=t[r];return r=>{for(let i=r.prop(nt.group),a=-1;a<(i?i.length:0);a++){let s=n[a<0?r.name:i[a]];if(s)return s}}}};Zn.none=new Zn("",Object.create(null),0,8);var Xx=class GM{constructor(t){this.types=t;for(let n=0;n<t.length;n++)if(t[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let n=[];for(let r of this.types){let i=null;for(let a of t){let s=a(r);if(s){i||(i=Object.assign({},r.props));let o=s[1],c=s[0];c.combine&&c.id in i&&(o=c.combine(i[c.id],o)),i[c.id]=o}}n.push(i?new Zn(r.name,i,r.id,r.flags):r)}return new GM(n)}},Rm=new WeakMap,FT=new WeakMap,_t;(function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays",e[e.EnterBracketed=16]="EnterBracketed"})(_t||(_t={}));var Rt=class L0{constructor(t,n,r,i,a){if(this.type=t,this.children=n,this.positions=r,this.length=i,this.props=null,a&&a.length){this.props=Object.create(null);for(let[s,o]of a)this.props[typeof s=="number"?s:s.id]=o}}toString(){let t=yc.get(this);if(t&&!t.overlay)return t.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(t=0){return new Dp(this.topNode,t)}cursorAt(t,n=0,r=0){let i=Rm.get(this)||this.topNode,a=new Dp(i);return a.moveTo(t,n),Rm.set(this,a._tree),a}get topNode(){return new mi(this,0,0,null)}resolve(t,n=0){let r=lf(Rm.get(this)||this.topNode,t,n,!1);return Rm.set(this,r),r}resolveInner(t,n=0){let r=lf(FT.get(this)||this.topNode,t,n,!0);return FT.set(this,r),r}resolveStack(t,n=0){return g7(this,t,n)}iterate(t){let{enter:n,leave:r,from:i=0,to:a=this.length}=t,s=t.mode||0,o=(s&_t.IncludeAnonymous)>0;for(let c=this.cursor(s|_t.IncludeAnonymous);;){let d=!1;if(c.from<=a&&c.to>=i&&(!o&&c.type.isAnonymous||n(c)!==!1)){if(c.firstChild())continue;d=!0}for(;d&&r&&(o||!c.type.isAnonymous)&&r(c),!c.nextSibling();){if(!c.parent())return;d=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let n in this.props)t.push([+n,this.props[n]]);return t}balance(t={}){return this.children.length<=8?this:$x(Zn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new L0(this.type,n,r,i,this.propValues),t.makeTree||((n,r,i)=>new L0(Zn.none,n,r,i)))}static build(t){return v7(t)}};Rt.empty=new Rt(Zn.none,[],[],0);var h7=class KM{constructor(t,n){this.buffer=t,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new KM(this.buffer,this.index)}},Rc=class JM{constructor(t,n,r){this.buffer=t,this.length=n,this.set=r}get type(){return Zn.none}toString(){let t=[];for(let n=0;n<this.buffer.length;)t.push(this.childString(n)),n=this.buffer[n+3];return t.join(",")}childString(t){let n=this.buffer[t],r=this.buffer[t+3],i=this.set.types[n],a=i.name;if(/\W/.test(a)&&!i.isError&&(a=JSON.stringify(a)),t+=4,r==t)return a;let s=[];for(;t<r;)s.push(this.childString(t)),t=this.buffer[t+3];return a+"("+s.join(",")+")"}findChild(t,n,r,i,a){let{buffer:s}=this,o=-1;for(let c=t;c!=n&&!(e5(a,i,s[c+1],s[c+2])&&(o=c,r>0));c=s[c+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),s=0;for(let o=t,c=0;o<n;){a[c++]=i[o++],a[c++]=i[o++]-r;let d=a[c++]=i[o++]-r;a[c++]=i[o++]-t,s=Math.max(s,d)}return new JM(a,s,this.set)}};function e5(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function lf(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let s=!r&&e instanceof mi&&e.index<0?null:e.parent;if(!s)return e;e=s}let a=r?0:_t.IgnoreOverlays;if(r)for(let s=e,o=s.parent;o;s=o,o=s.parent)s instanceof mi&&s.index<0&&((i=o.enter(t,n,a))===null||i===void 0?void 0:i.from)!=s.from&&(e=o);for(;;){let s=e.enter(t,n,a);if(!s)return e;e=s}}var t5=class{cursor(e=0){return new Dp(this,e)}getChild(e,t=null,n=null){let r=WT(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return WT(this,e,t,n)}resolve(e,t=0){return lf(this,e,t,!1)}resolveInner(e,t=0){return lf(this,e,t,!0)}matchContext(e){return D0(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(n=t,t=r.prevSibling):t=r}return n}get node(){return this}get next(){return this.parent}},mi=class dp extends t5{constructor(t,n,r,i){super(),this._tree=t,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let s=this;;){for(let{children:o,positions:c}=s._tree,d=n>0?o.length:-1;t!=d;t+=n){let f=o[t],m=c[t]+s.from,p;if(!(!(a&_t.EnterBracketed&&f instanceof Rt&&(p=yc.get(f))&&!p.overlay&&p.bracketed&&r>=m&&r<=m+f.length)&&!e5(i,r,m,m+f.length))){if(f instanceof Rc){if(a&_t.ExcludeBuffers)continue;let v=f.findChild(0,f.buffer.length,n,r-m,i);if(v>-1)return new cf(new m7(s,f,t,m),null,v)}else if(a&_t.IncludeAnonymous||!f.type.isAnonymous||Zx(f)){let v;if(!(a&_t.IgnoreMounts)&&(v=yc.get(f))&&!v.overlay)return new dp(v.tree,m,t,s);let b=new dp(f,m,t,s);return a&_t.IncludeAnonymous||!b.type.isAnonymous?b:b.nextChild(n<0?f.children.length-1:0,n,r,i,a)}}}if(a&_t.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?t=s.index+n:t=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}prop(t){return this._tree.prop(t)}enter(t,n,r=0){let i;if(!(r&_t.IgnoreOverlays)&&(i=yc.get(this._tree))&&i.overlay){let a=t-this.from,s=r&_t.EnterBracketed&&i.bracketed;for(let{from:o,to:c}of i.overlay)if((n>0||s?o<=a:o<a)&&(n<0||s?c>=a:c>a))return new dp(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function WT(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let s=!1;!s;)if(s=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function D0(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var m7=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},cf=class gd extends t5{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,n,r){super(),this.context=t,this._parent=n,this.index=r,this.type=t.buffer.set.types[t.buffer.buffer[r]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new gd(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}prop(t){return this.type.prop(t)}enter(t,n,r=0){if(r&_t.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new gd(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new gd(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new gd(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],n=[],{buffer:r}=this.context,i=this.index+4,a=r.buffer[this.index+3];if(a>i){let s=r.buffer[this.index+1];t.push(r.slice(i,a,s)),n.push(0)}return new Rt(this.type,t,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function n5(e){if(!e.length)return null;let t=0,n=e[0];for(let a=1;a<e.length;a++){let s=e[a];(s.from>n.from||s.to<n.to)&&(n=s,t=a)}let r=n instanceof mi&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new p7(i,n)}var p7=class{constructor(e,t){this.heads=e,this.node=t}get next(){return n5(this.heads)}};function g7(e,t,n){let r=e.resolveInner(t,n),i=null;for(let a=r instanceof mi?r:r.context.parent;a;a=a.parent)if(a.index<0){let s=a.parent;(i||(i=[r])).push(s.resolve(t,n)),a=s}else{let s=yc.get(a.tree);if(s&&s.overlay&&s.overlay[0].from<=t&&s.overlay[s.overlay.length-1].to>=t){let o=new mi(s.tree,s.overlay[0].from+a.from,-1,a);(i||(i=[r])).push(lf(o,t,n,!1))}}return i?n5(i):r}var Dp=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~_t.EnterBracketed,e instanceof mi)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof mi?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&_t.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&_t.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&_t.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let r=n<0?0:this.stack[n]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(r)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let i=0;i<this.index;i++)if(r.buffer.buffer[i+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let i=t+e,a=e<0?-1:n._tree.children.length;i!=a;i+=e){let s=n._tree.children[i];if(this.mode&_t.IncludeAnonymous||s instanceof Rc||!s.type.isAnonymous||Zx(s))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break e}r=this.stack[--i]}for(let r=n;r<this.stack.length;r++)t=new cf(this.buffer,t,this.stack[r]);return this.bufferNode=new cf(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return D0(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return D0(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function Zx(e){return e.children.some(t=>t instanceof Rc||!t.type.isAnonymous||Zx(t))}function v7(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=WM,reused:a=[],minRepeatType:s=r.types.length}=e,o=Array.isArray(n)?new h7(n,n.length):n,c=r.types,d=0,f=0;function m(Q,C,R,D,L,P){let{id:Z,start:X,end:B,size:Y}=o,H=f,q=d;if(Y<0)if(o.next(),Y==-1){let ce=a[Z];R.push(ce),D.push(X-Q);return}else if(Y==-3){d=Z;return}else if(Y==-4){f=Z;return}else throw new RangeError(`Unrecognized record size: ${Y}`);let I=c[Z],ee,W,z=X-Q;if(B-X<=i&&(W=x(o.pos-C,L))){let ce=new Uint16Array(W.size-W.skip),se=o.pos-W.size,N=ce.length;for(;o.pos>se;)N=w(W.start,ce,N);ee=new Rc(ce,B-W.start,r),z=W.start-Q}else{let ce=o.pos-Y;o.next();let se=[],N=[],le=Z>=s?Z:-1,pe=0,Oe=B;for(;o.pos>ce;)le>=0&&o.id==le&&o.size>=0?(o.end<=Oe-i&&(b(se,N,X,pe,o.end,Oe,le,H,q),pe=se.length,Oe=o.end),o.next()):P>2500?p(X,ce,se,N):m(X,ce,se,N,le,P+1);if(le>=0&&pe>0&&pe<se.length&&b(se,N,X,pe,X,Oe,le,H,q),se.reverse(),N.reverse(),le>-1&&pe>0){let Be=v(I,q);ee=$x(I,se,N,0,se.length,0,B-X,Be,Be)}else ee=S(I,se,N,B-X,H-B,q)}R.push(ee),D.push(z)}function p(Q,C,R,D){let L=[],P=0,Z=-1;for(;o.pos>C;){let{id:X,start:B,end:Y,size:H}=o;if(H>4)o.next();else{if(Z>-1&&B<Z)break;Z<0&&(Z=Y-i),L.push(X,B,Y),P++,o.next()}}if(P){let X=new Uint16Array(P*4),B=L[L.length-2];for(let Y=L.length-3,H=0;Y>=0;Y-=3)X[H++]=L[Y],X[H++]=L[Y+1]-B,X[H++]=L[Y+2]-B,X[H++]=H;R.push(new Rc(X,L[2]-B,r)),D.push(B-Q)}}function v(Q,C){return(R,D,L)=>{let P=0,Z=R.length-1,X,B;if(Z>=0&&(X=R[Z])instanceof Rt){if(!Z&&X.type==Q&&X.length==L)return X;(B=X.prop(nt.lookAhead))&&(P=D[Z]+X.length+B)}return S(Q,R,D,L,P,C)}}function b(Q,C,R,D,L,P,Z,X,B){let Y=[],H=[];for(;Q.length>D;)Y.push(Q.pop()),H.push(C.pop()+R-L);Q.push(S(r.types[Z],Y,H,P-L,X-P,B)),C.push(L-R)}function S(Q,C,R,D,L,P,Z){if(P){let X=[nt.contextHash,P];Z=Z?[X].concat(Z):[X]}if(L>25){let X=[nt.lookAhead,L];Z=Z?[X].concat(Z):[X]}return new Rt(Q,C,R,D,Z)}function x(Q,C){let R=o.fork(),D=0,L=0,P=0,Z=R.end-i,X={size:0,start:0,skip:0};e:for(let B=R.pos-Q;R.pos>B;){let Y=R.size;if(R.id==C&&Y>=0){X.size=D,X.start=L,X.skip=P,P+=4,D+=4,R.next();continue}let H=R.pos-Y;if(Y<0||H<B||R.start<Z)break;let q=R.id>=s?4:0,I=R.start;for(R.next();R.pos>H;){if(R.size<0)if(R.size==-3||R.size==-4)q+=4;else break e;else R.id>=s&&(q+=4);R.next()}L=I,D+=Y,P+=q}return(C<0||D==Q)&&(X.size=D,X.start=L,X.skip=P),X.size>4?X:void 0}function w(Q,C,R){let{id:D,start:L,end:P,size:Z}=o;if(o.next(),Z>=0&&D<s){let X=R;if(Z>4){let B=o.pos-(Z-4);for(;o.pos>B;)R=w(Q,C,R)}C[--R]=X,C[--R]=P-Q,C[--R]=L-Q,C[--R]=D}else Z==-3?d=D:Z==-4&&(f=D);return R}let j=[],T=[];for(;o.pos>0;)m(e.start||0,e.bufferStart||0,j,T,-1,0);let A=(t=e.length)!==null&&t!==void 0?t:j.length?T[0]+j[0].length:0;return new Rt(c[e.topID],j.reverse(),T.reverse(),A)}var HT=new WeakMap;function fp(e,t){if(!e.isAnonymous||t instanceof Rc||t.type!=e)return 1;let n=HT.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof Rt)){n=1;break}n+=fp(e,r)}HT.set(t,n)}return n}function $x(e,t,n,r,i,a,s,o,c){let d=0;for(let b=r;b<i;b++)d+=fp(e,t[b]);let f=Math.ceil(d*1.5/8),m=[],p=[];function v(b,S,x,w,j){for(let T=x;T<w;){let A=T,Q=S[T],C=fp(e,b[T]);for(T++;T<w;T++){let R=fp(e,b[T]);if(C+R>=f)break;C+=R}if(T==A+1){if(C>f){let R=b[A];v(R.children,R.positions,0,R.children.length,S[A]+j);continue}m.push(b[A])}else{let R=S[T-1]+b[T-1].length-Q;m.push($x(e,b,S,A,T,Q,R,null,c))}p.push(Q+j-a)}}return v(t,n,r,i,0),(o||c)(m,p,s)}var r5=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof cf?this.setBuffer(e.context.buffer,e.index,t):e instanceof mi&&this.map.set(e.tree,t)}get(e){return e instanceof cf?this.getBuffer(e.context.buffer,e.index):e instanceof mi?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},Sc=class z0{constructor(t,n,r,i,a=!1,s=!1){this.from=t,this.to=n,this.tree=r,this.offset=i,this.open=(a?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new z0(0,t.length,t,0,!1,r)];for(let a of n)a.to>t.length&&i.push(a);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,s=t.length?t[0]:null;for(let o=0,c=0,d=0;;o++){let f=o<n.length?n[o]:null,m=f?f.fromA:1e9;if(m-c>=r)for(;s&&s.from<m;){let p=s;if(c>=p.from||m<=p.to||d){let v=Math.max(p.from,c)-d,b=Math.min(p.to,m)-d;p=v>=b?null:new z0(v,b,p.tree,p.offset+d,o>0,!!f)}if(p&&i.push(p),s.to>m)break;s=a<t.length?t[a++]:null}if(!f)break;c=f.toA,d=f.toA-f.toB}return i}},Vx=class{startParse(e,t,n){return typeof e=="string"&&(e=new O7(e)),n=n?n.length?n.map(r=>new ci(r.from,r.to)):[new ci(0,0)]:[new ci(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let i=r.advance();if(i)return i}}},O7=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};function i5(e){return(t,n,r,i)=>new y7(t,e,n,r,i)}var GT=class{constructor(e,t,n,r,i,a){this.parser=e,this.parse=t,this.overlay=n,this.bracketed=r,this.target=i,this.from=a}};function KT(e){if(!e.length||e.some(t=>t.from>=t.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}var b7=class{constructor(e,t,n,r,i,a,s,o){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=i,this.bracketed=a,this.target=s,this.prev=o,this.depth=0,this.ranges=[]}},I0=new nt({perNode:!0}),y7=class{constructor(e,t,n,r,i){this.nest=t,this.input=n,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new Rt(n.type,n.children,n.positions,n.length,n.propValues.concat([[I0,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[nt.mounted.id]=new yc(t,e.overlay,e.parser,e.bracketed),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new _7(this.fragments),t=null,n=null,r=new Dp(new mi(this.baseTree,this.ranges[0].from,0,null),_t.IncludeAnonymous|_t.IgnoreMounts);e:for(let i,a;;){let s=!0,o;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)s=!1;else if(e.hasNode(r)){if(t){let c=t.mounts.find(d=>d.frag.from<=r.from&&d.frag.to>=r.to&&d.mount.overlay);if(c)for(let d of c.mount.overlay){let f=d.from+c.pos,m=d.to+c.pos;f>=r.from&&m<=r.to&&!t.ranges.some(p=>p.from<m&&p.to>f)&&t.ranges.push({from:f,to:m})}}s=!1}else if(n&&(a=S7(n.ranges,r.from,r.to)))s=a!=2;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.from<r.to||!i.overlay)){r.tree||(x7(r),t&&t.depth++,n&&n.depth++);let c=e.findMounts(r.from,i.parser);if(typeof i.overlay=="function")t=new b7(i.parser,i.overlay,c,this.inner.length,r.from,!!i.bracketed,r.tree,t);else{let d=tE(this.ranges,i.overlay||(r.from<r.to?[new ci(r.from,r.to)]:[]));d.length&&KT(d),(d.length||!i.overlay)&&this.inner.push(new GT(i.parser,d.length?i.parser.startParse(this.input,nE(c,d),d):i.parser.startParse(""),i.overlay?i.overlay.map(f=>new ci(f.from-r.from,f.to-r.from)):null,!!i.bracketed,r.tree,d.length?d[0].from:r.from)),i.overlay?d.length&&(n={ranges:d,depth:0,prev:n}):s=!1}}else if(t&&(o=t.predicate(r))&&(o===!0&&(o=new ci(r.from,r.to)),o.from<o.to)){let c=t.ranges.length-1;c>=0&&t.ranges[c].to==o.from?t.ranges[c]={from:t.ranges[c].from,to:o.to}:t.ranges.push(o)}if(s&&r.firstChild())t&&t.depth++,n&&n.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let c=tE(this.ranges,t.ranges);c.length&&(KT(c),this.inner.splice(t.index,0,new GT(t.parser,t.parser.startParse(this.input,nE(t.mounts,c),c),t.ranges.map(d=>new ci(d.from-t.start,d.to-t.start)),t.bracketed,t.target,c[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}};function S7(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}function JT(e,t,n,r,i,a){if(t<n){let s=e.buffer[t+1];r.push(e.slice(t,n,s)),i.push(s-a)}}function x7(e){let{node:t}=e,n=[],r=t.context.buffer;do n.push(e.index),e.parent();while(!e.tree);let i=e.tree,a=i.children.indexOf(r),s=i.children[a],o=s.buffer,c=[a];function d(f,m,p,v,b,S){let x=n[S],w=[],j=[];JT(s,f,x,w,j,v);let T=o[x+1],A=o[x+2];c.push(w.length);let Q=S?d(x+4,o[x+3],s.set.types[o[x]],T,A-T,S-1):t.toTree();return w.push(Q),j.push(T-v),JT(s,o[x+3],m,w,j,v),new Rt(p,w,j,b)}i.children[a]=d(0,o.length,Zn.none,0,s.length,n.length-1);for(let f of c){let m=e.tree.children[f],p=e.tree.positions[f];e.yield(new mi(m,p+e.from,f,e._tree))}}var eE=class{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(_t.IncludeAnonymous|_t.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,_t.IgnoreOverlays|_t.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof Rt)t=t.children[0];else break}return!1}},_7=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(I0))!==null&&t!==void 0?t:n.to,this.inner=new eE(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(I0))!==null&&e!==void 0?e:t.to,this.inner=new eE(t.tree,-t.offset)}}findMounts(e,t){var n;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let i=this.inner.cursor.node;i;i=i.parent){let a=(n=i.tree)===null||n===void 0?void 0:n.prop(nt.mounted);if(a&&a.parser==t)for(let s=this.fragI;s<this.fragments.length;s++){let o=this.fragments[s];if(o.from>=i.to)break;o.tree==this.curFrag.tree&&r.push({frag:o,pos:i.from-o.offset,mount:a})}}}return r}};function tE(e,t){let n=null,r=t;for(let i=1,a=0;i<e.length;i++){let s=e[i-1].to,o=e[i].from;for(;a<r.length;a++){let c=r[a];if(c.from>=o)break;c.to<=s||(n||(r=n=t.slice()),c.from<s?(n[a]=new ci(c.from,s),c.to>o&&n.splice(a+1,0,new ci(o,c.to))):c.to>o?n[a--]=new ci(o,c.to):n.splice(a--,1))}}return r}function w7(e,t,n,r){let i=0,a=0,s=!1,o=!1,c=-1e9,d=[];for(;;){let f=i==e.length?1e9:s?e[i].to:e[i].from,m=a==t.length?1e9:o?t[a].to:t[a].from;if(s!=o){let p=Math.max(c,n),v=Math.min(f,m,r);p<v&&d.push(new ci(p,v))}if(c=Math.min(f,m),c==1e9)break;f==c&&(s?(s=!1,i++):s=!0),m==c&&(o?(o=!1,a++):o=!0)}return d}function nE(e,t){let n=[];for(let{pos:r,mount:i,frag:a}of e){let s=r+(i.overlay?i.overlay[0].from:0),o=s+i.tree.length,c=Math.max(a.from,s),d=Math.min(a.to,o);if(i.overlay){let f=i.overlay.map(p=>new ci(p.from+r,p.to+r)),m=w7(t,f,c,d);for(let p=0,v=c;;p++){let b=p==m.length,S=b?d:m[p].from;if(S>v&&n.push(new Sc(v,S,i.tree,-s,a.from>=v||a.openStart,a.to<=S||a.openEnd)),b)break;v=m[p].to}}else n.push(new Sc(c,d,i.tree,-s,a.from>=s||a.openStart,a.to<=o||a.openEnd))}return n}var k7=0,aa=class q0{constructor(t,n,r,i){this.name=t,this.set=n,this.base=r,this.modified=i,this.id=k7++}toString(){let{name:t}=this;for(let n of this.modified)n.name&&(t=`${n.name}(${t})`);return t}static define(t,n){let r=typeof t=="string"?t:"?";if(t instanceof q0&&(n=t),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new q0(r,[],null,[]);if(i.set.push(i),n)for(let a of n.set)i.set.push(a);return i}static defineModifier(t){let n=new rE(t);return r=>r.modified.indexOf(n)>-1?r:rE.get(r.base||r,r.modified.concat(n).sort((i,a)=>i.id-a.id))}},j7=0,rE=class a5{constructor(t){this.name=t,this.instances=[],this.id=j7++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(o=>o.base==t&&T7(n,o.modified));if(r)return r;let i=[],a=new aa(t.name,i,t,n);for(let o of n)o.instances.push(a);let s=E7(n);for(let o of t.set)if(!o.modified.length)for(let c of s)i.push(a5.get(o,c));return a}};function T7(e,t){return e.length==t.length&&e.every((n,r)=>n==t[r])}function E7(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((n,r)=>r.length-n.length)}function ml(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let a=[],s=2,o=i;for(let m=0;;){if(o=="..."&&m>0&&m+3==i.length){s=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!p)throw new RangeError("Invalid path: "+i);if(a.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),m+=p[0].length,m==i.length)break;let v=i[m++];if(m==i.length&&v=="!"){s=0;break}if(v!="/")throw new RangeError("Invalid path: "+i);o=i.slice(m)}let c=a.length-1,d=a[c];if(!d)throw new RangeError("Invalid path: "+i);let f=new uf(r,s,c>0?a.slice(0,c):null);t[d]=f.sort(t[d])}}return s5.add(t)}var s5=new nt({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new uf(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),uf=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};uf.empty=new uf([],2,null);function o5(e,t){let n=Object.create(null);for(let a of e)if(!Array.isArray(a.tag))n[a.tag.id]=a.class;else for(let s of a.tag)n[s.id]=a.class;let{scope:r,all:i=null}=t||{};return{style:a=>{let s=i;for(let o of a)for(let c of o.set){let d=n[c.id];if(d){s=s?s+" "+d:d;break}}return s},scope:r}}function C7(e,t){let n=null;for(let r of e){let i=r.style(t);i&&(n=n?n+" "+i:i)}return n}function A7(e,t,n,r=0,i=e.length){let a=new P7(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,"",a.highlighters),a.flush(i)}var P7=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:s,to:o}=e;if(s>=n||o<=t)return;a.isTop&&(i=this.highlighters.filter(p=>!p.scope||p.scope(a)));let c=r,d=Q7(e)||uf.empty,f=C7(i,d.tags);if(f&&(c&&(c+=" "),c+=f,d.mode==1&&(r+=(r?" ":"")+f)),this.startSpan(Math.max(t,s),c),d.opaque)return;let m=e.tree&&e.tree.prop(nt.mounted);if(m&&m.overlay){let p=e.node.enter(m.overlay[0].from+s,1),v=this.highlighters.filter(S=>!S.scope||S.scope(m.tree.type)),b=e.firstChild();for(let S=0,x=s;;S++){let w=S<m.overlay.length?m.overlay[S]:null,j=w?w.from+s:o,T=Math.max(t,x),A=Math.min(n,j);if(T<A&&b)for(;e.from<A&&(this.highlightRange(e,T,A,r,i),this.startSpan(Math.min(A,e.to),c),!(e.to>=j||!e.nextSibling())););if(!w||j>n)break;x=w.to+s,x>t&&(this.highlightRange(p.cursor(),Math.max(t,w.from+s),Math.min(n,x),"",v),this.startSpan(Math.min(n,x),c))}b&&e.parent()}else if(e.firstChild()){m&&(r="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function Q7(e){let t=e.type.prop(s5);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var be=aa.define,Mm=be(),qs=be(),iE=be(qs),aE=be(qs),Bs=be(),Lm=be(Bs),Nb=be(Bs),ea=be(),Lo=be(ea),Gi=be(),Ki=be(),B0=be(),rd=be(B0),Dm=be(),$={comment:Mm,lineComment:be(Mm),blockComment:be(Mm),docComment:be(Mm),name:qs,variableName:be(qs),typeName:iE,tagName:be(iE),propertyName:aE,attributeName:be(aE),className:be(qs),labelName:be(qs),namespace:be(qs),macroName:be(qs),literal:Bs,string:Lm,docString:be(Lm),character:be(Lm),attributeValue:be(Lm),number:Nb,integer:be(Nb),float:be(Nb),bool:be(Bs),regexp:be(Bs),escape:be(Bs),color:be(Bs),url:be(Bs),keyword:Gi,self:be(Gi),null:be(Gi),atom:be(Gi),unit:be(Gi),modifier:be(Gi),operatorKeyword:be(Gi),controlKeyword:be(Gi),definitionKeyword:be(Gi),moduleKeyword:be(Gi),operator:Ki,derefOperator:be(Ki),arithmeticOperator:be(Ki),logicOperator:be(Ki),bitwiseOperator:be(Ki),compareOperator:be(Ki),updateOperator:be(Ki),definitionOperator:be(Ki),typeOperator:be(Ki),controlOperator:be(Ki),punctuation:B0,separator:be(B0),bracket:rd,angleBracket:be(rd),squareBracket:be(rd),paren:be(rd),brace:be(rd),content:ea,heading:Lo,heading1:be(Lo),heading2:be(Lo),heading3:be(Lo),heading4:be(Lo),heading5:be(Lo),heading6:be(Lo),contentSeparator:be(ea),list:be(ea),quote:be(ea),emphasis:be(ea),strong:be(ea),link:be(ea),monospace:be(ea),strikethrough:be(ea),inserted:be(),deleted:be(),changed:be(),invalid:be(),meta:Dm,documentMeta:be(Dm),annotation:be(Dm),processingInstruction:be(Dm),definition:aa.defineModifier("definition"),constant:aa.defineModifier("constant"),function:aa.defineModifier("function"),standard:aa.defineModifier("standard"),local:aa.defineModifier("local"),special:aa.defineModifier("special")};for(let e in $){let t=$[e];t instanceof aa&&(t.name=e)}o5([{tag:$.link,class:"tok-link"},{tag:$.heading,class:"tok-heading"},{tag:$.emphasis,class:"tok-emphasis"},{tag:$.strong,class:"tok-strong"},{tag:$.keyword,class:"tok-keyword"},{tag:$.atom,class:"tok-atom"},{tag:$.bool,class:"tok-bool"},{tag:$.url,class:"tok-url"},{tag:$.labelName,class:"tok-labelName"},{tag:$.inserted,class:"tok-inserted"},{tag:$.deleted,class:"tok-deleted"},{tag:$.literal,class:"tok-literal"},{tag:$.string,class:"tok-string"},{tag:$.number,class:"tok-number"},{tag:[$.regexp,$.escape,$.special($.string)],class:"tok-string2"},{tag:$.variableName,class:"tok-variableName"},{tag:$.local($.variableName),class:"tok-variableName tok-local"},{tag:$.definition($.variableName),class:"tok-variableName tok-definition"},{tag:$.special($.variableName),class:"tok-variableName2"},{tag:$.definition($.propertyName),class:"tok-propertyName tok-definition"},{tag:$.typeName,class:"tok-typeName"},{tag:$.namespace,class:"tok-namespace"},{tag:$.className,class:"tok-className"},{tag:$.macroName,class:"tok-macroName"},{tag:$.propertyName,class:"tok-propertyName"},{tag:$.operator,class:"tok-operator"},{tag:$.comment,class:"tok-comment"},{tag:$.meta,class:"tok-meta"},{tag:$.invalid,class:"tok-invalid"},{tag:$.punctuation,class:"tok-punctuation"}]);var Rb,Yo=new nt;function Ux(e){return qe.define({combine:e?t=>t.concat(e):void 0})}var Yx=new nt,ui=class{constructor(e,t,n=[],r=""){this.data=e,this.name=r,tn.prototype.hasOwnProperty("tree")||Object.defineProperty(tn.prototype,"tree",{get(){return $n(this)}}),this.parser=t,this.extension=[Mc.of(this),tn.languageData.of((i,a,s)=>{let o=sE(i,a,s),c=o.type.prop(Yo);if(!c)return[];let d=i.facet(c),f=o.type.prop(Yx);if(f){let m=o.resolve(a-o.from,s);for(let p of f)if(p.test(m,i)){let v=i.facet(p.facet);return p.type=="replace"?v:v.concat(d)}}return d})].concat(n)}isActiveAt(e,t,n=-1){return sE(e,t,n).type.prop(Yo)==this.data}findRegions(e){let t=e.facet(Mc);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(i,a)=>{if(i.prop(Yo)==this.data){n.push({from:a,to:a+i.length});return}let s=i.prop(nt.mounted);if(s){if(s.tree.prop(Yo)==this.data){if(s.overlay)for(let o of s.overlay)n.push({from:o.from+a,to:o.to+a});else n.push({from:a,to:a+i.length});return}else if(s.overlay){let o=n.length;if(r(s.tree,s.overlay[0].from+a),n.length>o)return}}for(let o=0;o<i.children.length;o++){let c=i.children[o];c instanceof Rt&&r(c,i.positions[o]+a)}};return r($n(e),0),n}get allowsNesting(){return!0}};ui.setState=on.define();function sE(e,t,n){let r=e.facet(Mc),i=$n(e).topNode;if(!r||r.allowsNesting)for(let a=i;a;a=a.enter(t,n,_t.ExcludeBuffers|_t.EnterBracketed))a.type.isTop&&(i=a);return i}var xg=class X0 extends ui{constructor(t,n,r){super(t,n,[],r),this.parser=n}static define(t){let n=Ux(t.languageData);return new X0(n,t.parser.configure({props:[Yo.add(r=>r.isTop?n:void 0)]}),t.name)}configure(t,n){return new X0(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function $n(e){let t=e.field(ui.state,!1);return t?t.tree:Rt.empty}var N7=class{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},id=null,l5=class Z0{constructor(t,n,r=[],i,a,s,o,c){this.parser=t,this.state=n,this.fragments=r,this.tree=i,this.treeLen=a,this.viewport=s,this.skipped=o,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new Z0(t,n,[],Rt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new N7(this.state.doc),this.fragments)}work(t,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Rt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof t=="number"){let i=Date.now()+t;t=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Sc.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,n;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=t,this.tree=n,this.fragments=this.withoutTempSkipped(Sc.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let n=id;id=this;try{return t()}finally{id=n}}withoutTempSkipped(t){for(let n;n=this.tempSkipped.pop();)t=oE(t,n.from,n.to);return t}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:s,skipped:o}=this;if(this.takeTree(),!t.empty){let c=[];if(t.iterChangedRanges((d,f,m,p)=>c.push({fromA:d,toA:f,fromB:m,toB:p})),r=Sc.applyChanges(r,c),i=Rt.empty,a=0,s={from:t.mapPos(s.from,-1),to:t.mapPos(s.to,1)},this.skipped.length){o=[];for(let d of this.skipped){let f=t.mapPos(d.from,1),m=t.mapPos(d.to,-1);f<m&&o.push({from:f,to:m})}}}return new Z0(this.parser,n,r,i,a,s,o,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:a}=this.skipped[r];i<t.to&&a>t.from&&(this.fragments=oE(this.fragments,i,a),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,n){this.skipped.push({from:t,to:n})}static getSkippingParser(t){return new class extends Vx{createParse(n,r,i){let a=i[0].from,s=i[i.length-1].to;return{parsedPos:a,advance(){let c=id;if(c){for(let d of i)c.tempSkipped.push(d);t&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,t]):t)}return this.parsedPos=s,new Rt(Zn.none,[],[],s-a)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let n=this.fragments;return this.treeLen>=t&&n.length&&n[0].from==0&&n[0].to>=t}static get(){return id}};function oE(e,t,n){return Sc.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var $0=class V0{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new V0(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=l5.create(t.facet(Mc).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new V0(r)}};ui.state=ho.define({create:$0.init,update(e,t){for(let n of t.effects)if(n.is(ui.setState))return n.value;return t.startState.facet(Mc)!=t.state.facet(Mc)?$0.init(t.state):e.apply(t)}});var c5=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&(c5=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var Mb=typeof navigator<"u"&&(!((Rb=navigator.scheduling)===null||Rb===void 0)&&Rb.isInputPending)?()=>navigator.scheduling.isInputPending():null,R7=sf.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let n=this.view.state.field(ui.state).context;(n.updateViewport(t.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:t}=this.view,n=t.field(ui.state);(n.tree!=n.context.tree||!n.context.isDone(t.doc.length))&&(this.working=c5(this.work))}work(t){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,a=r.field(ui.state);if(a.tree==a.context.tree&&a.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,t&&!Mb?Math.max(25,t.timeRemaining()-5):1e9),o=a.context.treeLen<i&&r.doc.length>i+1e3,c=a.context.work(()=>Mb&&Mb()||Date.now()>s,i+(o?0:1e5));this.chunkBudget-=Date.now()-n,(c||this.chunkBudget<=0)&&(a.context.takeTree(),this.view.dispatch({effects:ui.setState.of(new $0(a.context))})),this.chunkBudget>0&&!(c&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(a.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(n=>la(this.view.state,n)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Mc=qe.define({combine(e){return e.length?e[0]:null},enables:e=>[ui.state,R7,Ie.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),Lc=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},lE=class u5{constructor(t,n,r,i,a,s=void 0){this.name=t,this.alias=n,this.extensions=r,this.filename=i,this.loadFunc=a,this.support=s,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:n,support:r}=t;if(!n){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(r)}return new u5(t.name,(t.alias||[]).concat(t.name).map(i=>i.toLowerCase()),t.extensions||[],t.filename,n,r)}static matchFilename(t,n){for(let i of t)if(i.filename&&i.filename.test(n))return i;let r=/\.([^.]+)$/.exec(n);if(r){for(let i of t)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(t,n,r=!0){n=n.toLowerCase();for(let i of t)if(i.alias.some(a=>a==n))return i;if(r)for(let i of t)for(let a of i.alias){let s=n.indexOf(a);if(s>-1&&(a.length>2||!/\w/.test(n[s-1])&&!/\w/.test(n[s+a.length])))return i}return null}},d5=qe.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(n=>n!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}}),qf=new nt;function M7(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),s=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let o=n.to;;){let c=t.childAfter(o);if(!c||c==r)return null;if(!c.type.isSkipped){if(c.from>=s)return null;let d=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+d}}o=c.to}}function L7({closing:e,align:t=!0,units:n=1}){return r=>D7(r,t,n,e)}function D7(e,t,n,r,i){let a=e.textAfter,s=a.match(/^\s*/)[0].length,o=a.slice(s,s+r.length)==r||i==e.pos+s,c=t?M7(e):null;return c?o?e.column(c.from):e.column(c.to):e.baseIndent+(o?0:e.unit*n)}var z7=e=>e.baseIndent;function xc({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var I7=qe.define(),Yc=new nt;function Fx(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}var Wx=class f5{constructor(t,n){this.specs=t;let r;function i(o){let c=no.newName();return(r||(r=Object.create(null)))["."+c]=o,c}const a=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof ui?o=>o.prop(Yo)==s.data:s?o=>o==s:void 0,this.style=o5(t.map(o=>({tag:o.tag,class:o.class||i(Object.assign({},o,{tag:null}))})),{all:a}).style,this.module=r?new no(r):null,this.themeType=n.themeType}static define(t,n){return new f5(t,n||{})}},U0=qe.define(),q7=qe.define({combine(e){return e.length?[e[0]]:null}});function Lb(e){let t=e.facet(U0);return t.length?t:e.facet(q7)}function Hx(e,t){let n=[X7],r;return e instanceof Wx&&(e.module&&n.push(Ie.styleModule.of(e.module)),r=e.themeType),r?n.push(U0.computeN([Ie.darkTheme],i=>i.facet(Ie.darkTheme)==(r=="dark")?[e]:[])):n.push(U0.of(e)),n}var B7=class{constructor(e){this.markCache=Object.create(null),this.tree=$n(e.state),this.decorations=this.buildDeco(e,Lb(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=$n(e.state),n=Lb(e.state),r=n!=Lb(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ut.none;let n=new Jd;for(let{from:r,to:i}of e.visibleRanges)A7(this.tree,t,(a,s,o)=>{n.add(a,s,this.markCache[o]||(this.markCache[o]=Ut.mark({class:o})))},r,i);return n.finish()}},X7=zf.high(sf.fromClass(B7,{decorations:e=>e.decorations})),Z7=new nt,$7=Object.create(null),cE=[Zn.none],uE=[],dE=Object.create(null),V7=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])V7[e]=U7($7,t);function Db(e,t){uE.indexOf(e)>-1||(uE.push(e),console.warn(t))}function U7(e,t){let n=[];for(let o of t.split(" ")){let c=[];for(let d of o.split(".")){let f=e[d]||$[d];f?typeof f=="function"?c.length?c=c.map(f):Db(d,`Modifier ${d} used at start of tag`):c.length?Db(d,`Tag ${d} used as modifier`):c=Array.isArray(f)?f:[f]:Db(d,`Unknown highlighting tag ${d}`)}for(let d of c)n.push(d)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),i=r+" "+n.map(o=>o.id),a=dE[i];if(a)return a.id;let s=dE[i]=Zn.define({id:cE.length,name:r,props:[ml({[r]:n})]});return cE.push(s),s.id}kn.RTL,kn.LTR;var h5=Ie.theme({"&":{backgroundColor:"#ffffff",color:"#24292e"},".cm-content":{caretColor:"#0550ae"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"#0550ae"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#b3d7ff"},".cm-gutters":{backgroundColor:"#f6f8fa",color:"#57606a",border:"none"}},{dark:!1}),m5=Wx.define([{tag:$.string,color:"#0a3069"},{tag:$.number,color:"#0550ae"},{tag:$.bool,color:"#8250df"},{tag:$.null,color:"#cf222e"},{tag:$.keyword,color:"#cf222e"},{tag:$.propertyName,color:"#116329"},{tag:$.punctuation,color:"#57606a"},{tag:$.bracket,color:"#6e7781"}]),Y7=class extends Uc{constructor(e,t,n){super(),this.annotation=e,this.targetDocumentName=t,this.isGenerating=n}eq(e){const t=Ya(this.annotation.body),n=Ya(e.annotation.body);return e.annotation.id===this.annotation.id&&n===t&&e.targetDocumentName===this.targetDocumentName&&e.isGenerating===this.isGenerating}toDOM(){const e=document.createElement("span");e.className="reference-preview-widget",e.style.cssText=`
59
- display: inline-flex;
60
- align-items: center;
61
- margin-left: 4px;
62
- position: relative;
63
- `;const t=MS(this.annotation),n=Ya(this.annotation.body);e.dataset.widgetAnnotationId=this.annotation.id,e.dataset.widgetMotivation=this.annotation.motivation,e.dataset.widgetResolved=t?"true":"false",n&&(e.dataset.widgetBodySource=n),this.targetDocumentName&&(e.dataset.widgetTargetName=this.targetDocumentName),this.isGenerating&&(e.dataset.widgetGenerating="true");const r=document.createElement("button");if(r.className="reference-indicator",r.type="button",t)r.innerHTML='<span aria-hidden="true">🔗</span>',r.setAttribute("aria-label",this.targetDocumentName?`Reference link to ${this.targetDocumentName}`:"Reference link to document"),r.title=this.targetDocumentName?`Links to: ${this.targetDocumentName}`:"Links to document",r.style.cssText=`
64
- font-size: 10px;
65
- cursor: pointer;
66
- opacity: 0.6;
67
- transition: opacity 0.2s ease;
68
- background: none;
69
- border: none;
70
- padding: 0;
71
- margin: 0;
72
- vertical-align: baseline;
73
- `;else if(this.isGenerating){if(r.innerHTML=`
74
- <span style="position: relative; display: inline-flex; align-items: center; justify-content: center;" aria-hidden="true">
75
- <span style="position: absolute; inset: 0; border-radius: 9999px; background: rgb(250, 204, 21); opacity: 0.75; animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;"></span>
76
- <span style="position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 9999px; background: white; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); border: 2px solid rgb(250, 204, 21);">
77
- <span style="font-size: 14px;">✨</span>
78
- </span>
79
- </span>
80
- `,r.setAttribute("aria-label","Generating document"),r.setAttribute("aria-busy","true"),r.title="Generating document...",r.disabled=!0,r.style.cssText=`
81
- cursor: default;
82
- display: inline-flex;
83
- vertical-align: middle;
84
- background: none;
85
- border: none;
86
- padding: 0;
87
- margin: 0;
88
- `,document.documentElement.classList.contains("dark")){const i=r.querySelector("span > span:last-child");i&&(i.style.background="rgb(31, 41, 55)",i.style.borderColor="rgb(234, 179, 8)");const a=r.querySelector("span > span:first-child");a&&(a.style.background="rgb(234, 179, 8)")}}else r.innerHTML='<span aria-hidden="true">❓</span>',r.setAttribute("aria-label","Stub reference - click to resolve"),r.title="Stub reference. Click to resolve.",r.style.cssText=`
89
- font-size: 10px;
90
- cursor: pointer;
91
- opacity: 0.6;
92
- transition: opacity 0.2s ease;
93
- background: none;
94
- border: none;
95
- padding: 0;
96
- margin: 0;
97
- vertical-align: baseline;
98
- `;return e.appendChild(r),e}ignoreEvent(e){return e.type==="click"}};function F7(e,t){if(!t||t.trim()==="")return;const n=document.createElement("div");n.className="reference-tooltip",n.textContent=`→ ${t}`,n.style.cssText=`
99
- position: absolute;
100
- bottom: 100%;
101
- left: 50%;
102
- transform: translateX(-50%) translateY(-4px);
103
- padding: 4px 8px;
104
- background: rgba(0, 0, 0, 0.8);
105
- color: white;
106
- border-radius: 4px;
107
- font-size: 11px;
108
- white-space: nowrap;
109
- pointer-events: none;
110
- z-index: 1000;
111
- animation: fadeIn 0.2s ease;
112
- `,e.appendChild(n)}function W7(e){const t=e.querySelector(".reference-tooltip");t&&t.remove()}function H7(e){return e?Zc(e)?["rectangle"]:e.startsWith("image/")?["rectangle","circle","polygon"]:["rectangle","circle","polygon"]:["rectangle","circle","polygon"]}function G7(e){return e?Zc(e)?"fragment":e.startsWith("image/")?"svg":"text":"text"}function fE(e){if(e==="fragment"||e==="text")return"rectangle";if(typeof window<"u"){const t=localStorage.getItem("semiont-toolbar-shape-svg");if(t&&["rectangle","circle","polygon"].includes(t))return t}return"rectangle"}function K7(e,t){e==="svg"&&typeof window<"u"&&localStorage.setItem("semiont-toolbar-shape-svg",t)}function J7(e,t){const n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let r="";for(;n.nextNode();)r+=n.currentNode.textContent??"";const i=new Map;let a=0,s=0;for(;s<e.length&&a<r.length;)e[s]===r[a]&&(i.set(s,a),a++),s++;for(;s<e.length;)i.set(s,a),s++;return i}function eV(e){var i;const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);let r=0;for(;n.nextNode();){const a=n.currentNode,s=((i=a.textContent)==null?void 0:i.length)??0;t.push({node:a,start:r,end:r+s}),r+=s}return t}function hE(e,t){let n=0,r=e.length-1;for(;n<=r;){const i=n+r>>>1,a=e[i];if(t<a.start)r=i-1;else if(t>=a.end)n=i+1;else return{node:a.node,localOffset:t-a.start}}return null}function tV(e,t,n){const r=new Map;for(const i of e){const a=t.get(i.offset),s=t.get(i.offset+i.length-1);if(a===void 0||s===void 0)continue;const o=hE(n,a),c=hE(n,s+1);if(!o||!c)continue;const d=document.createRange();d.setStart(o.node,o.localOffset),d.setEnd(c.node,c.localOffset),r.set(i.id,{range:d,annotation:i})}return r}function nV(e){for(const[t,{range:n,annotation:r}]of e){const i=`annotation-${r.type}`;if(n.startContainer===n.endContainer){const a=document.createElement("span");a.className=i,a.dataset.annotationId=t,a.dataset.annotationType=r.type;try{n.surroundContents(a)}catch{mE(n,t,r)}continue}mE(n,t,r)}}function mE(e,t,n){const r=`annotation-${n.type}`,i=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT),a=[];for(;i.nextNode();){const s=i.currentNode;e.intersectsNode(s)&&a.push(s)}for(const s of a){const o=document.createRange();o.selectNodeContents(s),s===e.startContainer&&o.setStart(s,e.startOffset),s===e.endContainer&&o.setEnd(s,e.endOffset);const c=document.createElement("span");c.className=r,c.dataset.annotationId=t,c.dataset.annotationType=n.type;try{o.surroundContents(c)}catch{}}}function rV(e){const t=e.querySelectorAll("[data-annotation-id]");for(const n of t){const r=n.parentNode;if(r){for(;n.firstChild;)r.insertBefore(n.firstChild,n);r.removeChild(n),r.normalize()}}}function iV(e){return e.map(t=>{var o;const n=Rn(t.target),r=fi(n),i=(r==null?void 0:r.start)??0,a=(r==null?void 0:r.end)??0,s=((o=Object.values(cr).find(c=>c.matchesAnnotation(t)))==null?void 0:o.internalType)||"highlight";return{id:t.id,exact:Us(n),offset:i,length:a-i,type:s,source:Ya(t.body)}})}function p5(e){var n;if(!e)return"📄";const t=((n=e.split(";")[0])==null?void 0:n.trim().toLowerCase())||"";if(t.startsWith("image/"))return"🖼️";switch(t){case"text/markdown":return"📝";case"text/html":return"🌐";case"text/plain":return"📄";default:return"📄"}}var aV={parse(e){if(typeof e!="string")throw new Error("URL must be a string");let t;try{t=new URL(e)}catch{throw new Error("Invalid image URL")}if(t.hostname!=="localhost"&&t.protocol!=="https:")throw new Error("External images must use HTTPS");const n=["javascript:","data:text/html","<script","onerror=","onload=","onclick="],r=e.toLowerCase();if(n.some(o=>r.includes(o)))throw new Error("Invalid or potentially unsafe image URL");const a=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico"].some(o=>r.includes(o)),s=r.includes("googleusercontent.com")||r.includes("avatars.githubusercontent.com");if(!a&&!s)throw new Error("URL must point to an image file");return e},safeParse(e){try{return{success:!0,data:this.parse(e)}}catch(t){return{success:!1,error:t instanceof Error?t.message:"Invalid image URL"}}}};function Ise(e){try{const t=aV.safeParse(e);if(!t.success)return console.warn("Invalid image URL:",t.error),null;const n=new URL(e);return`${n.protocol}//${n.hostname}${n.pathname}${n.search}`}catch(t){return console.error("Error sanitizing image URL:",t),null}}function g5(e){const[t]=k.useState(e);return k.useEffect(()=>()=>t.dispose(),[t]),t}function qse(e){if(!e||e<=0)return null;const t=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),r=Math.floor(e%6e4/1e3);return t>0?`${t}h ${n}m`:n>0?`${n}m`:r>30?"1m":"Less than 1m"}var sV=typeof window<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function Bse(e){const t=k.useRef(e);t.current=e;const n=k.useCallback(r=>{if(!r.key)return;const i=r.target;if(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.contentEditable==="true")return;const a=t.current.filter(s=>s.enabled!==!1);for(const s of a){if(r.key.toLowerCase()!==s.key.toLowerCase())continue;const o=sV?r.metaKey:r.ctrlKey;if(!(s.ctrlOrCmd&&!o)&&!(!s.ctrlOrCmd&&o)&&!(s.shift&&!r.shiftKey)&&!(!s.shift&&r.shiftKey)&&!(s.alt&&!r.altKey)&&!(!s.alt&&r.altKey)){r.preventDefault(),r.stopPropagation(),s.handler(r);break}}},[]);k.useEffect(()=>(window.addEventListener("keydown",n),()=>{window.removeEventListener("keydown",n)}),[n])}function Xse(e,t,n=300){const r=k.useRef(0),i=k.useRef(t);i.current=t;const a=k.useCallback(s=>{if(s.key!==e)return;const o=Date.now();o-r.current<n?(i.current(),r.current=0):r.current=o},[e,n]);k.useEffect(()=>(window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}),[a])}function Gx(){const[e,t]=k.useState(()=>typeof window<"u"?localStorage.getItem("showLineNumbers")==="true":!1),n=k.useCallback(()=>{const r=!e;t(r),typeof window<"u"&&localStorage.setItem("showLineNumbers",r.toString())},[e]);return{showLineNumbers:e,toggleLineNumbers:n}}function Me(e){const[t,n]=k.useState(()=>{if(!e)return;const r=e.getValue;return typeof r=="function"?r.call(e):void 0});return k.useEffect(()=>{if(!e)return;const r=e.subscribe(n);return()=>r.unsubscribe()},[e]),t}function Bf(e,t=Fy){const n=Me(ot().activeSession$),r=k.useRef(null),i=k.useRef(null),a=k.useCallback(()=>{r.current!==e&&(i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,r.current=e,n==null||n.client.beckon.hover(e)},t))},[e,t,n]),s=k.useCallback(()=>{i.current!==null&&(clearTimeout(i.current),i.current=null),r.current!==null&&(r.current=null,n==null||n.client.beckon.hover(null))},[n]);return k.useEffect(()=>()=>{i.current!==null&&(clearTimeout(i.current),i.current=null)},[]),{onMouseEnter:a,onMouseLeave:s}}function v5(){const[e,t]=k.useState(()=>{if(typeof window<"u"){const r=localStorage.getItem("hoverDelayMs");return r?Number(r):Fy}return Fy}),n=k.useCallback(r=>{t(r),typeof window<"u"&&localStorage.setItem("hoverDelayMs",r.toString())},[]);return{hoverDelayMs:e,setHoverDelayMs:n}}function O5(){const e=ot();return k.useCallback((t,n)=>{const r=setTimeout(()=>{console.warn("[Observable Navigation] No handler cancelled nav:external fallback. Falling back to window.location.href. For better UX, subscribe to this event in your app, call cancelFallback(), and use client-side routing."),window.location.href=t},10);e.emit("nav:external",{url:t,resourceId:n==null?void 0:n.resourceId,cancelFallback:()=>clearTimeout(r)})},[e])}function oV({defaultWidth:e=384,minWidth:t=256,maxWidth:n=800,storageKey:r="semiont-panel-width"}={}){const[i,a]=k.useState(e),s=k.useRef(!1);k.useEffect(()=>{if(typeof window>"u")return;const c=localStorage.getItem(r);if(c){const d=parseInt(c,10),f=Math.max(t,Math.min(n,d));a(f)}},[]);const o=c=>{const d=Math.max(t,Math.min(n,c));s.current=!0,a(d)};return k.useEffect(()=>{s.current&&localStorage.setItem(r,i.toString())},[i,r]),{width:i,setWidth:o,minWidth:t,maxWidth:n}}function pE(e,t={}){const{orientation:n="horizontal",loop:r=!0,cols:i=1}=t,a=k.useRef(null),s=k.useRef(0),o=k.useCallback(()=>a.current?Array.from(a.current.querySelectorAll('[role="button"]:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])')):[],[]),c=k.useCallback(f=>{var v;const m=o();if(m.length===0)return;let p=f;r?p=(f%m.length+m.length)%m.length:p=Math.max(0,Math.min(f,m.length-1)),m.forEach((b,S)=>{b.setAttribute("tabindex",S===p?"0":"-1")}),(v=m[p])==null||v.focus(),s.current=p},[o,r]),d=k.useCallback(f=>{const m=o();if(m.length===0)return;const p=s.current;let v=p;switch(f.key){case"ArrowRight":(n==="horizontal"||n==="grid")&&(f.preventDefault(),v=p+1);break;case"ArrowLeft":(n==="horizontal"||n==="grid")&&(f.preventDefault(),v=p-1);break;case"ArrowDown":n==="vertical"?(f.preventDefault(),v=p+1):n==="grid"&&(f.preventDefault(),v=p+i);break;case"ArrowUp":n==="vertical"?(f.preventDefault(),v=p-1):n==="grid"&&(f.preventDefault(),v=p-i);break;case"Home":f.preventDefault(),v=0;break;case"End":f.preventDefault(),v=m.length-1;break;default:return}c(v)},[n,i,o,c]);return k.useEffect(()=>{const f=o();if(f.length===0)return;f.forEach((v,b)=>{v.setAttribute("tabindex",b===0?"0":"-1")});const m=v=>()=>{s.current=v,o().forEach((S,x)=>{S.setAttribute("tabindex",x===v?"0":"-1")})},p=f.map((v,b)=>{const S=m(b);return v.addEventListener("click",S),S});return()=>{f.forEach((v,b)=>{const S=p[b];S&&v.removeEventListener("click",S)})}},[e,o]),{containerRef:a,handleKeyDown:d,focusItem:c}}function Zse(){const e=Me(ot().activeSession$);Me(e==null?void 0:e.token$);const t=(e==null?void 0:e.expiresAt)??null,[n,r]=k.useState(null),[i,a]=k.useState(!1);return k.useEffect(()=>{if(!t){r(null),a(!1);return}const s=()=>{const c=t.getTime()-Date.now();r(c>0?c:0),a(c<300*1e3&&c>0)};s();const o=setInterval(s,1e3);return()=>clearInterval(o)},[t]),{timeRemaining:n,isExpiringSoon:i}}var b5=k.createContext(null);function $se({children:e}){const[t,n]=k.useState(()=>typeof window<"u"&&localStorage.getItem("theme")||"system"),[r,i]=k.useState(()=>typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),a=t==="system"?r:t;k.useEffect(()=>{window.document.documentElement.setAttribute("data-theme",a)},[a]),k.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)"),c=d=>{i(d.matches?"dark":"light")};return o.addEventListener("change",c),()=>o.removeEventListener("change",c)},[]);const s=o=>{n(o),typeof window<"u"&&localStorage.setItem("theme",o)};return g.jsx(b5.Provider,{value:{theme:t,setTheme:s,resolvedTheme:a,systemTheme:r},children:e})}function lV(){const e=k.useContext(b5);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}function cV(){const[e,t]=k.useState(!1),n=k.useRef(null),r=k.useCallback(()=>{t(s=>!s)},[]),i=k.useCallback(()=>{t(!0)},[]),a=k.useCallback(()=>{t(!1)},[]);return k.useEffect(()=>{function s(o){n.current&&!n.current.contains(o.target)&&a()}if(e)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[e,a]),k.useEffect(()=>{function s(o){o.key==="Escape"&&a()}if(e)return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,a]),{isOpen:e,toggle:r,open:i,close:a,dropdownRef:n}}function uV(e,t,n=!0){var f;const{showError:r}=pR(),i=(f=Me(ot().activeSession$))==null?void 0:f.client,a=n?Sp(t)||"text/plain":"",[s,o]=k.useState(""),[c,d]=k.useState(!1);return k.useEffect(()=>{if(!i||!n||!a)return;let m=!1;return d(!0),i.browse.resourceRepresentation(e,{accept:a}).then(({data:p})=>{m||(o(zS(p,a)),d(!1))}).catch(p=>{m||(console.error("Failed to fetch representation:",p),r("Failed to load resource representation"),d(!1))}),()=>{m=!0}},[i,e,a,n,r]),{content:s,loading:c}}k.createContext(void 0);function dV(e,t){const n=ot(),r=Me(n.activeSession$),i=k.useRef(t);k.useEffect(()=>{i.current=t}),k.useEffect(()=>{const a=[];return a.push(n.on(e,s=>i.current(s))),r&&a.push(r.subscribe(e,s=>i.current(s))),()=>{for(const s of a)s()}},[e,n,r])}function ns(e){const t=ot(),n=Me(t.activeSession$),r=k.useRef(e);k.useEffect(()=>{r.current=e});const i=k.useMemo(()=>Object.keys(e).sort(),[Object.keys(e).sort().join(",")]);k.useEffect(()=>{const a=[];for(const s of i){const o=s,c=d=>{const f=r.current[o];f&&f(d)};a.push(t.on(o,c)),n&&a.push(n.subscribe(o,c))}return()=>{for(const s of a)s()}},[i,t,n])}var y5=k.createContext(null);function Fc(){const e=k.useContext(y5);return e||{announce:()=>{}}}function Vse({children:e}){const[t,n]=k.useState(""),[r,i]=k.useState(""),a=k.useCallback((s,o="polite")=>{o==="assertive"?(i(s),setTimeout(()=>i(""),1e3)):(n(s),setTimeout(()=>n(""),1e3))},[]);return g.jsxs(y5.Provider,{value:{announce:a},children:[e,g.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"semiont-sr-only",children:t}),g.jsx("div",{role:"alert","aria-live":"assertive","aria-atomic":"true",className:"semiont-sr-only",children:r})]})}function fV(){const{announce:e}=Fc(),t=k.useCallback(a=>{const s=a?`Loading ${a}...`:"Loading resource...";e(s,"polite")},[e]),n=k.useCallback(a=>{e(`${a} loaded successfully`,"polite")},[e]),r=k.useCallback(a=>{const s=a?`Failed to load ${a}`:"Failed to load resource";e(s,"assertive")},[e]),i=k.useCallback(a=>{e(`Updating ${a}...`,"polite")},[e]);return{announceResourceLoading:t,announceResourceLoaded:n,announceResourceLoadError:r,announceResourceUpdating:i}}function hV(){const{announce:e}=Fc(),t=k.useCallback(()=>{e("Submitting form...","polite")},[e]),n=k.useCallback(a=>{e(a||"Form submitted successfully","polite")},[e]),r=k.useCallback(a=>{e(a||"Form submission failed. Please check your entries and try again.","assertive")},[e]),i=k.useCallback(a=>{const s=a===1?"There is 1 field with an error":`There are ${a} fields with errors`;e(s,"assertive")},[e]);return{announceFormSubmitting:t,announceFormSuccess:n,announceFormError:r,announceFormValidationError:i}}function mV(){const{announce:e}=Fc(),t=k.useCallback(r=>{e(`Changing language to ${r}...`,"polite")},[e]),n=k.useCallback(r=>{e(`Language changed to ${r}`,"polite")},[e]);return{announceLanguageChanging:t,announceLanguageChanged:n}}var S5=k.createContext(void 0);function Use({children:e}){var d;const[t,n]=k.useState(new Set),{announce:r}=Fc(),i=(d=Me(ot().activeSession$))==null?void 0:d.client,a=k.useCallback(async(f,m,p,v=[])=>{if(!i)throw new Error("Not authenticated");try{const b={motivation:m,target:{source:f,selector:p},body:v},S=await i.mark.annotation(b);return S.annotationId&&(n(x=>new Set(x).add(S.annotationId)),setTimeout(()=>{n(x=>{const w=new Set(x);return w.delete(S.annotationId),w})},6e3),r("Annotation created","polite")),S.annotationId}catch(b){throw console.error("Failed to create annotation:",b),r("Failed to create annotation","assertive"),b}},[i,r]),s=k.useCallback(f=>{n(m=>{const p=new Set(m);return p.delete(f),p})},[]),o=k.useCallback(f=>{n(m=>new Set(m).add(f)),setTimeout(()=>{n(m=>{const p=new Set(m);return p.delete(f),p})},6e3)},[]),c=k.useMemo(()=>({newAnnotationIds:t,markAnnotation:a,clearNewAnnotationId:s,triggerSparkleAnimation:o}),[t,a,s,o]);return g.jsx(S5.Provider,{value:c,children:e})}function Kx(){const e=k.useContext(S5);if(!e)throw new Error("useResourceAnnotations must be used within ResourceAnnotationsProvider");return e}var pV=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=$n(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(bV(e));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function gE(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function gV(e){let t=Object.create(null),n=Object.create(null);for(let{label:i}of e){t[i[0]]=!0;for(let a=1;a<i.length;a++)n[i[a]]=!0}let r=gE(t)+gE(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function vV(e){let t=e.map(i=>typeof i=="string"?{label:i}:i),[n,r]=t.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:gV(t);return i=>{let a=i.matchBefore(r);return a||i.explicit?{from:a?a.from:i.pos,options:t,validFor:n}:null}}function OV(e,t){return n=>{for(let r=$n(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(e.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return t(n)}}function bV(e,t){var n;let{source:r}=e,i=r[r.length-1]!="$";return i?new RegExp(`(?:${r})${i?"$":""}`,(n=e.flags)!==null&&n!==void 0?n:e.ignoreCase?"i":""):e}var yV=hl.define(),SV=Ie.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),xV=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},_V=class x5{constructor(t,n,r){this.field=t,this.from=n,this.to=r}map(t){let n=t.mapPos(this.from,-1,sr.TrackDel),r=t.mapPos(this.to,1,sr.TrackDel);return n==null||r==null?null:new x5(this.field,n,r)}},wV=class _5{constructor(t,n){this.lines=t,this.fieldPositions=n}instantiate(t,n){let r=[],i=[n],a=t.doc.lineAt(n),s=/^\s*/.exec(a.text)[0];for(let c of this.lines){if(r.length){let d=s,f=/^\t*/.exec(c)[0].length;for(let m=0;m<f;m++)d+=t.facet(d5);i.push(n+d.length-f),c=d+c.slice(f)}r.push(c),n+=c.length+1}let o=this.fieldPositions.map(c=>new _V(c.field,i[c.line]+c.from,i[c.line]+c.to));return{text:r,ranges:o}}static parse(t){let n=[],r=[],i=[],a;for(let s of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(s);){let o=a[1]?+a[1]:null,c=a[2]||a[3]||"",d=-1,f=c.replace(/\\[{}]/g,m=>m[1]);for(let m=0;m<n.length;m++)(o!=null?n[m].seq==o:f&&n[m].name==f)&&(d=m);if(d<0){let m=0;for(;m<n.length&&(o==null||n[m].seq!=null&&n[m].seq<o);)m++;n.splice(m,0,{seq:o,name:f}),d=m;for(let p of i)p.field>=d&&p.field++}for(let m of i)if(m.line==r.length&&m.from>a.index){let p=a[2]?3+(a[1]||"").length:2;m.from-=p,m.to-=p}i.push(new xV(d,r.length,a.index,a.index+f.length)),s=s.slice(0,a.index)+c+s.slice(a.index+a[0].length)}s=s.replace(/\\([{}])/g,(o,c,d)=>{for(let f of i)f.line==r.length&&f.from>d&&(f.from--,f.to--);return c}),r.push(s)}return new _5(r,i)}},kV=Ut.widget({widget:new class extends Uc{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),jV=Ut.mark({class:"cm-snippetField"}),_g=class w5{constructor(t,n){this.ranges=t,this.active=n,this.deco=Ut.set(t.map(r=>(r.from==r.to?kV:jV).range(r.from,r.to)),!0)}map(t){let n=[];for(let r of this.ranges){let i=r.map(t);if(!i)return null;n.push(i)}return new w5(n,this.active)}selectionInsideField(t){return t.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}},Xf=on.define({map(e,t){return e&&e.map(t)}}),TV=on.define(),df=ho.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(Xf))return n.value;if(n.is(TV)&&e)return new _g(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>Ie.decorations.from(e,t=>t?t.deco:Ut.none)});function Jx(e,t){return Ce.create(e.filter(n=>n.field==t).map(n=>Ce.range(n.from,n.to)))}function EV(e){let t=wV.parse(e);return(n,r,i,a)=>{let{text:s,ranges:o}=t.instantiate(n.state,i),{main:c}=n.state.selection,d={changes:{from:i,to:a==c.from?c.to:a,insert:wt.of(s)},scrollIntoView:!0,annotations:r?[yV.of(r),di.userEvent.of("input.complete")]:void 0};if(o.length&&(d.selection=Jx(o,0)),o.some(f=>f.field>0)){let f=new _g(o,0),m=d.effects=[Xf.of(f)];n.state.field(df,!1)===void 0&&m.push(on.appendConfig.of([df,NV,RV,SV]))}n.dispatch(n.state.update(d))}}function k5(e){return({state:t,dispatch:n})=>{let r=t.field(df,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(s=>s.field==i+e);return n(t.update({selection:Jx(r.ranges,i),effects:Xf.of(a?null:new _g(r.ranges,i)),scrollIntoView:!0})),!0}}var CV=({state:e,dispatch:t})=>e.field(df,!1)?(t(e.update({effects:Xf.of(null)})),!0):!1,AV=k5(1),PV=k5(-1),QV=[{key:"Tab",run:AV,shift:PV},{key:"Escape",run:CV}],vE=qe.define({combine(e){return e.length?e[0]:QV}}),NV=zf.highest(Bx.compute([vE],e=>e.facet(vE)));function yr(e,t){return{...t,apply:EV(e)}}var RV=Ie.domEventHandlers({mousedown(e,t){let n=t.state.field(df,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(a=>a.from<=r&&a.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:Jx(n.ranges,i.field),effects:Xf.of(n.ranges.some(a=>a.field>i.field)?new _g(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),j5=new class extends to{};j5.startSide=1;j5.endSide=-1;var OE=class T5{static create(t,n,r,i,a){let s=i+(i<<8)+t+(n<<4)|0;return new T5(t,n,r,s,a,[],[])}constructor(t,n,r,i,a,s,o){this.type=t,this.value=n,this.from=r,this.hash=i,this.end=a,this.children=s,this.positions=o,this.hashProp=[[nt.contextHash,i]]}addChild(t,n){t.prop(nt.contextHash)!=this.hash&&(t=new Rt(t.type,t.children,t.positions,t.length,this.hashProp)),this.children.push(t),this.positions.push(n)}toTree(t,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new Rt(t.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(i,a,s)=>new Rt(Zn.none,i,a,s,this.hashProp)})}},ve;(function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.Autolink=33]="Autolink",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel",e[e.URL=44]="URL"})(ve||(ve={}));var MV=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},LV=class{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Qd(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}};function bE(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==ve.OrderedList?n_:t_)(n,t,!1);return r>0&&(e.type!=ve.BulletList||e_(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var E5={[ve.Blockquote](e,t,n){return n.next!=62?!1:(n.markers.push(pt(ve.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(vi(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0)},[ve.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[ve.OrderedList]:bE,[ve.BulletList]:bE,[ve.Document](){return!0}};function vi(e){return e==32||e==9||e==10||e==13}function Qd(e,t=0){for(;t<e.length&&vi(e.charCodeAt(t));)t++;return t}function yE(e,t,n){for(;t>n&&vi(e.charCodeAt(t-1));)t--;return t}function C5(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function A5(e){return e.next!=62?-1:e.text.charCodeAt(e.pos+1)==32?2:1}function e_(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let i=e.pos+1;i<e.text.length;i++){let a=e.text.charCodeAt(i);if(a==e.next)r++;else if(!vi(a))return-1}return n&&e.next==45&&N5(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(D5.SetextHeading)>-1||r<3?-1:1}function P5(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function t_(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||vi(e.text.charCodeAt(e.pos+1)))&&(!n||P5(t,ve.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function n_(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){r++;if(r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!vi(e.text.charCodeAt(r+1))||n&&!P5(t,ve.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function Q5(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function N5(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&vi(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var Y0=/^[ \t]*$/,R5=/-->/,M5=/\?>/,F0=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,R5],[/^\s*<\?/,M5],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Y0],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Y0]];function L5(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let i=0,a=F0.length-(n?1:0);i<a;i++)if(F0[i][0].test(r))return i;return-1}function SE(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.countIndent(e.skipSpace(t),t,n);return r>=n+5?n+1:r}function Rs(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==ve.CodeText?e[r].to=n:e.push(pt(ve.CodeText,t,n))}var zm={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,s=[],o=[];for(Rs(s,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){Rs(o,e.lineStart-1,e.lineStart);for(let c of t.markers)o.push(c)}else{if(t.indent<n)break;{if(o.length){for(let d of o)d.type==ve.CodeText?Rs(s,d.from,d.to):s.push(d);o=[]}Rs(s,e.lineStart-1,e.lineStart);for(let d of t.markers)s.push(d);a=e.lineStart+t.text.length;let c=e.lineStart+t.findColumn(t.baseIndent+4);c<a&&Rs(s,c,a)}}return o.length&&(o=o.filter(c=>c.type!=ve.CodeText),o.length&&(t.markers=o.concat(t.markers))),e.addNode(e.buffer.writeElements(s,-i).finish(ve.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=C5(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,s=t.skipSpace(n),o=yE(t.text,t.text.length,s),c=[pt(ve.CodeMark,r,r+a)];s<o&&c.push(pt(ve.CodeInfo,e.lineStart+s,e.lineStart+o));for(let d=!0,f=!0,m=!1;e.nextLine()&&t.depth>=e.stack.length;d=!1){let p=t.pos;if(t.indent-t.baseIndent<4)for(;p<t.text.length&&t.text.charCodeAt(p)==i;)p++;if(p-t.pos>=a&&t.skipSpace(p)==t.text.length){for(let v of t.markers)c.push(v);f&&m&&Rs(c,e.lineStart-1,e.lineStart),c.push(pt(ve.CodeMark,e.lineStart+t.pos,e.lineStart+p)),e.nextLine();break}else{m=!0,d||(Rs(c,e.lineStart-1,e.lineStart),f=!1);for(let S of t.markers)c.push(S);let v=e.lineStart+t.basePos,b=e.lineStart+t.text.length;v<b&&(Rs(c,v,b),f=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(ve.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=A5(t);return n<0?!1:(e.startContext(ve.Blockquote,t.pos),e.addNode(ve.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(e_(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(ve.HorizontalRule,n),!0},BulletList(e,t){let n=t_(t,e,!1);if(n<0)return!1;e.block.type!=ve.BulletList&&e.startContext(ve.BulletList,t.basePos,t.next);let r=SE(t,t.pos+1);return e.startContext(ve.ListItem,t.basePos,r-t.baseIndent),e.addNode(ve.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=n_(t,e,!1);if(n<0)return!1;e.block.type!=ve.OrderedList&&e.startContext(ve.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=SE(t,t.pos+n);return e.startContext(ve.ListItem,t.basePos,r-t.baseIndent),e.addNode(ve.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=Q5(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=yE(t.text,t.text.length,r),s=a;for(;s>r&&t.text.charCodeAt(s-1)==t.next;)s--;(s==a||s==r||!vi(t.text.charCodeAt(s-1)))&&(s=t.text.length);let o=e.buffer.write(ve.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,s),i+n+1),-i);s<t.text.length&&o.write(ve.HeaderMark,s-r,a-r);let c=o.finish(ve.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=L5(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=F0[n][1],a=[],s=i!=Y0;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){s=!1;break}for(let d of t.markers)a.push(d)}s&&e.nextLine();let o=i==R5?ve.CommentBlock:i==M5?ve.ProcessingInstructionBlock:ve.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(o,c-r),r),!0},SetextHeading:void 0},DV=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
113
- `+t.scrub(),i=this.advance(r);return i>-1&&i<r.length?this.complete(e,n,i):!1}finish(e,t){return(this.stage==2||this.stage==3)&&Qd(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,n){return e.addLeafElement(t,pt(ve.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(F5(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(pt(ve.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(U5(e,Qd(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=Qd(e,this.pos),n=0;if(t>this.pos){let r=Y5(e,t,this.start);if(r){let i=zb(e,r.to-this.start);i>0&&(this.nextStage(r),n=i)}}return n||(n=zb(e,this.pos)),n>0&&n<e.length?n:-1}else return zb(e,this.pos)}}};function zb(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!vi(n))return-1}return t}var zV=class{nextLine(e,t,n){let r=t.depth<e.stack.length?-1:N5(t),i=t.next;if(r<0)return!1;let a=pt(ve.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,pt(i==61?ve.SetextHeading1:ve.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},D5={LinkReference(e,t){return t.content.charCodeAt(0)==91?new DV(t):null},SetextHeading(){return new zV}},IV=[(e,t)=>Q5(t)>=0,(e,t)=>C5(t)>=0,(e,t)=>A5(t)>=0,(e,t)=>t_(t,e,!0)>=0,(e,t)=>n_(t,e,!0)>=0,(e,t)=>e_(t,e,!0)>=0,(e,t)=>L5(t,e,!0)>=0],qV={text:"",end:0},BV=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.line=new LV,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=OE.create(ve.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new $V(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!r||e.markers[n].from<r.end);){let i=e.markers[n++];this.addNode(i.type,i.from,i.to)}if(!r)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let r=n(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}let t=new MV(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let r=n(this,t);r&&t.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break e}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
114
- `+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=W5(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=qV;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let n=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<t.end;){r++;let i=this.ranges[r].from,a=this.lineChunkAt(i);t.end=i+a.length,t.text=t.text.slice(0,this.ranges[r-1].to-n)+a,n=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],i=this.parser.skipContextMarkup[r.type];if(!i)throw new Error("Unhandled block context "+ve[r.type]);let a=this.line.markers.length;if(!i(r,this,e)){this.line.markers.length>a&&(r.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
115
- `?"":t;else{let r=t.indexOf(`
116
- `);n=r<0?t:t.slice(0,r)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=OE.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e=="number"&&(e=new Rt(this.parser.nodeSet.types[e],Dc,Dc,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(H0(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?z5(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let n of e.parsers)if(n.finish(this,e))return;let t=H0(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(ve.Paragraph,e.content.length),e.start)}elt(e,t,n,r){return typeof e=="string"?pt(this.parser.getNodeType(e),t,n,r):new Z5(e,t)}get buffer(){return new X5(this.parser.nodeSet)}};function z5(e,t,n,r,i){let a=e[t].to,s=[],o=[],c=n.from+r;function d(f,m){for(;m?f>=a:f>a;){let p=e[t+1].from-a;r+=p,f+=p,t++,a=e[t].to}}for(let f=n.firstChild;f;f=f.nextSibling){d(f.from+r,!0);let m=f.from+r,p,v=i.get(f.tree);v?p=v:f.to+r>a?(p=z5(e,t,f,r,i),d(f.to+r,!1)):p=f.toTree(),s.push(p),o.push(m-c)}return d(n.to+r,!1),new Rt(n.type,s,o,n.to+r-c,n.tree?n.tree.propValues:void 0)}var I5=class q5 extends Vx{constructor(t,n,r,i,a,s,o,c,d){super(),this.nodeSet=t,this.blockParsers=n,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=a,this.skipContextMarkup=s,this.inlineParsers=o,this.inlineNames=c,this.wrappers=d,this.nodeTypes=Object.create(null);for(let f of t.types)this.nodeTypes[f.name]=f.id}createParse(t,n,r){let i=new BV(this,t,n,r);for(let a of this.wrappers)i=a(i,t,n,r);return i}configure(t){let n=W0(t);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,a=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),o=this.blockNames.slice(),c=this.inlineParsers.slice(),d=this.inlineNames.slice(),f=this.endLeafBlock.slice(),m=this.wrappers;if(ad(n.defineNodes)){i=Object.assign({},i);let p=r.types.slice(),v;for(let b of n.defineNodes){let{name:S,block:x,composite:w,style:j}=typeof b=="string"?{name:b}:b;if(p.some(Q=>Q.name==S))continue;w&&(i[p.length]=(Q,C,R)=>w(C,R,Q.value));let T=p.length,A=w?["Block","BlockContext"]:x?T>=ve.ATXHeading1&&T<=ve.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;p.push(Zn.define({id:T,name:S,props:A&&[[nt.group,A]]})),j&&(v||(v={}),Array.isArray(j)||j instanceof aa?v[S]=j:Object.assign(v,j))}r=new Xx(p),v&&(r=r.extend(ml(v)))}if(ad(n.props)&&(r=r.extend(...n.props)),ad(n.remove))for(let p of n.remove){let v=this.blockNames.indexOf(p),b=this.inlineNames.indexOf(p);v>-1&&(a[v]=s[v]=void 0),b>-1&&(c[b]=void 0)}if(ad(n.parseBlock))for(let p of n.parseBlock){let v=o.indexOf(p.name);if(v>-1)a[v]=p.parse,s[v]=p.leaf;else{let b=p.before?Im(o,p.before):p.after?Im(o,p.after)+1:o.length-1;a.splice(b,0,p.parse),s.splice(b,0,p.leaf),o.splice(b,0,p.name)}p.endLeaf&&f.push(p.endLeaf)}if(ad(n.parseInline))for(let p of n.parseInline){let v=d.indexOf(p.name);if(v>-1)c[v]=p.parse;else{let b=p.before?Im(d,p.before):p.after?Im(d,p.after)+1:d.length-1;c.splice(b,0,p.parse),d.splice(b,0,p.name)}}return n.wrap&&(m=m.concat(n.wrap)),new q5(r,a,s,o,f,i,c,d,m)}getNodeType(t){let n=this.nodeTypes[t];if(n==null)throw new RangeError(`Unknown node type '${t}'`);return n}parseInline(t,n){let r=new r_(this,t,n);e:for(let i=n;i<r.end;){let a=r.char(i);for(let s of this.inlineParsers)if(s){let o=s(r,a,i);if(o>=0){i=o;continue e}}i++}return r.resolveMarkers(0)}};function ad(e){return e!=null&&e.length>0}function W0(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=W0(e[0]);if(e.length==1)return t;let n=W0(e.slice(1));if(!n||!t)return t||n;let r=(s,o)=>(s||Dc).concat(o||Dc),i=t.wrap,a=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:i?a?(s,o,c,d)=>i(a(s,o,c,d),o,c,d):i:a}}function Im(e,t){let n=e.indexOf(t);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${t}`);return n}var B5=[Zn.none];for(let e=1,t;t=ve[e];e++)B5[e]=Zn.define({id:e,name:t,props:e>=ve.Escape?[]:[[nt.group,e in E5?["Block","BlockContext"]:["Block","LeafBlock"]]],top:t=="Document"});var Dc=[],X5=class{constructor(t){this.nodeSet=t,this.content=[],this.nodes=[]}write(t,n,r,i=0){return this.content.push(t,n,r,4+i*4),this}writeElements(t,n=0){for(let r of t)r.writeTo(this,n);return this}finish(t,n){return Rt.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:t,length:n})}},ff=class{constructor(e,t,n,r=Dc){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new X5(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},Z5=class{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Dc}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}};function pt(e,t,n,r){return new ff(e,t,n,r)}var $5={resolve:"Emphasis",mark:"EmphasisMark"},V5={resolve:"Emphasis",mark:"EmphasisMark"},Zo={},zp={},Xr=class{constructor(e,t,n,r){this.type=e,this.from=t,this.to=n,this.side=r}},xE="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",hf=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{hf=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}var Ib={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let i=0;i<xE.length;i++)if(xE.charCodeAt(i)==r)return e.append(pt(ve.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(pt(ve.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;for(;r<e.end&&e.char(r)==96;)r++;let i=r-n,a=0;for(;r<e.end;r++)if(e.char(r)==96){if(a++,a==i&&e.char(r+1)!=96)return e.append(pt(ve.InlineCode,n,r+1,[pt(ve.CodeMark,n,n+i),pt(ve.CodeMark,r+1-i,r+1)]))}else a=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return e.append(pt(ve.Autolink,n,n+1+i[0].length,[pt(ve.LinkMark,n,n+1),pt(ve.URL,n+1,n+i[0].length),pt(ve.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(pt(ve.Comment,n,n+1+a[0].length));let s=/^\?[^]*?\?>/.exec(r);if(s)return e.append(pt(ve.ProcessingInstruction,n,n+1+s[0].length));let o=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return o?e.append(pt(ve.HTMLTag,n,n+1+o[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;for(;e.char(r)==t;)r++;let i=e.slice(n-1,n),a=e.slice(r,r+1),s=hf.test(i),o=hf.test(a),c=/\s|^$/.test(i),d=/\s|^$/.test(a),f=!d&&(!o||c||s),m=!c&&(!s||d||o),p=f&&(t==42||!m||s),v=m&&(t==42||!f||o);return e.append(new Xr(t==95?$5:V5,n,r,(p?1:0)|(v?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(pt(ve.HardBreak,n,n+2));if(t==32){let r=n+1;for(;e.char(r)==32;)r++;if(e.char(r)==10&&r>=n+2)return e.append(pt(ve.HardBreak,n,r+1))}return-1},Link(e,t,n){return t==91?e.append(new Xr(Zo,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new Xr(zp,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let r=e.parts.length-1;r>=0;r--){let i=e.parts[r];if(i instanceof Xr&&(i.type==Zo||i.type==zp)){if(!i.side||e.skipSpace(i.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[r]=null,-1;let a=e.takeContent(r),s=e.parts[r]=XV(e,a,i.type==Zo?ve.Link:ve.Image,i.from,n+1);if(i.type==Zo)for(let o=0;o<r;o++){let c=e.parts[o];c instanceof Xr&&c.type==Zo&&(c.side=0)}return s.to}}return-1}};function XV(e,t,n,r,i){let{text:a}=e,s=e.char(i),o=i;if(t.unshift(pt(ve.LinkMark,r,r+(n==ve.Image?2:1))),t.push(pt(ve.LinkMark,i-1,i)),s==40){let c=e.skipSpace(i+1),d=U5(a,c-e.offset,e.offset),f;d&&(c=e.skipSpace(d.to),c!=d.to&&(f=Y5(a,c-e.offset,e.offset),f&&(c=e.skipSpace(f.to)))),e.char(c)==41&&(t.push(pt(ve.LinkMark,i,i+1)),o=c+1,d&&t.push(d),f&&t.push(f),t.push(pt(ve.LinkMark,c,o)))}else if(s==91){let c=F5(a,i-e.offset,e.offset,!1);c&&(t.push(c),o=c.to)}return pt(n,r,o,t)}function U5(e,t,n){if(e.charCodeAt(t)==60){for(let i=t+1;i<e.length;i++){let a=e.charCodeAt(i);if(a==62)return pt(ve.URL,t+n,i+1+n);if(a==60||a==10)return!1}return null}else{let i=0,a=t;for(let s=!1;a<e.length;a++){let o=e.charCodeAt(a);if(vi(o))break;if(s)s=!1;else if(o==40)i++;else if(o==41){if(!i)break;i--}else o==92&&(s=!0)}return a>t?pt(ve.URL,t+n,a+n):a==e.length?null:!1}}function Y5(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let a=t+1,s=!1;a<e.length;a++){let o=e.charCodeAt(a);if(s)s=!1;else{if(o==i)return pt(ve.LinkTitle,t+n,a+1+n);o==92&&(s=!0)}}return null}function F5(e,t,n,r){for(let i=!1,a=t+1,s=Math.min(e.length,a+999);a<s;a++){let o=e.charCodeAt(a);if(i)i=!1;else{if(o==93)return r?!1:pt(ve.LinkLabel,t+n,a+1+n);if(r&&!vi(o)&&(r=!1),o==91)return!1;o==92&&(i=!0)}}return null}var r_=class{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,i){return this.append(new Xr(e,t,n,(r?1:0)|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Xr&&(t.type==Zo||t.type==zp))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n<this.parts.length;n++){let r=this.parts[n];if(!(r instanceof Xr&&r.type.resolve&&r.side&2))continue;let i=r.type==$5||r.type==V5,a=r.to-r.from,s,o=n-1;for(;o>=e;o--){let b=this.parts[o];if(b instanceof Xr&&b.side&1&&b.type==r.type&&!(i&&(r.side&1||b.side&2)&&(b.to-b.from+a)%3==0&&((b.to-b.from)%3||a%3))){s=b;break}}if(!s)continue;let c=r.type.resolve,d=[],f=s.from,m=r.to;if(i){let b=Math.min(2,s.to-s.from,a);f=s.to-b,m=r.from+b,c=b==1?"Emphasis":"StrongEmphasis"}s.type.mark&&d.push(this.elt(s.type.mark,f,s.to));for(let b=o+1;b<n;b++)this.parts[b]instanceof ff&&d.push(this.parts[b]),this.parts[b]=null;r.type.mark&&d.push(this.elt(r.type.mark,r.from,m));let p=this.elt(c,f,m,d);this.parts[o]=i&&s.from!=f?new Xr(s.type,s.from,f,s.side):null,(this.parts[n]=i&&r.to!=m?new Xr(r.type,m,r.to,r.side):null)?this.parts.splice(n,0,p):this.parts[n]=p}let t=[];for(let n=e;n<this.parts.length;n++){let r=this.parts[n];r instanceof ff&&t.push(r)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof Xr&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Xr?t:null}skipSpace(e){return Qd(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e=="string"?pt(this.parser.getNodeType(e),t,n,r):new Z5(e,t)}};r_.linkStart=Zo;r_.imageStart=zp;function H0(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let i of t){for(;r<n.length&&n[r].to<i.to;)r++;if(r<n.length&&n[r].from<i.from){let a=n[r];a instanceof ff&&(n[r]=new ff(a.type,a.from,a.to,H0(a.children,[i])))}else n.splice(r++,0,i)}return n}var ZV=[ve.CodeBlock,ve.ListItem,ve.OrderedList,ve.BulletList],$V=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let i=this.fragment.to;for(;i>0&&this.input.read(i-1,i)!=`
117
- `;)i--;this.fragmentEnd=i?i-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(nt.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),i=e.absoluteLineStart,a=i,s=e.block.children.length,o=a,c=s;for(;;){if(t.to-n>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let d=W5(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,d);else{let f=new Rt(e.parser.nodeSet.types[ve.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,t.tree),e.addNode(f,d)}if(t.type.is("Block")&&(ZV.indexOf(t.type.id)<0?(a=t.to-n,s=e.block.children.length):(a=o,s=c),o=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>s;)e.block.children.pop(),e.block.positions.pop();return a-i}};function W5(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var VV=ml({"Blockquote/...":$.quote,HorizontalRule:$.contentSeparator,"ATXHeading1/... SetextHeading1/...":$.heading1,"ATXHeading2/... SetextHeading2/...":$.heading2,"ATXHeading3/...":$.heading3,"ATXHeading4/...":$.heading4,"ATXHeading5/...":$.heading5,"ATXHeading6/...":$.heading6,"Comment CommentBlock":$.comment,Escape:$.escape,Entity:$.character,"Emphasis/...":$.emphasis,"StrongEmphasis/...":$.strong,"Link/... Image/...":$.link,"OrderedList/... BulletList/...":$.list,"BlockQuote/...":$.quote,"InlineCode CodeText":$.monospace,"URL Autolink":$.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":$.processingInstruction,"CodeInfo LinkLabel":$.labelName,LinkTitle:$.string,Paragraph:$.content}),UV=new I5(new Xx(B5).extend(VV),Object.keys(zm).map(e=>zm[e]),Object.keys(zm).map(e=>D5[e]),Object.keys(zm),IV,E5,Object.keys(Ib).map(e=>Ib[e]),Object.keys(Ib),[]);function YV(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let s=i?i.from:n;if(s>a&&r.push({from:a,to:s}),!i)break;a=i.to}return r}function FV(e){let{codeParser:t,htmlParser:n}=e;return{wrap:i5((i,a)=>{let s=i.type.id;if(t&&(s==ve.CodeBlock||s==ve.FencedCode)){let o="";if(s==ve.FencedCode){let d=i.node.getChild(ve.CodeInfo);d&&(o=a.read(d.from,d.to))}let c=t(o);if(c)return{parser:c,overlay:d=>d.type.id==ve.CodeText,bracketed:s==ve.FencedCode}}else if(n&&(s==ve.HTMLBlock||s==ve.HTMLTag||s==ve.CommentBlock))return{parser:n,overlay:YV(i.node,i.from,i.to)};return null})}}var WV={resolve:"Strikethrough",mark:"StrikethroughMark"},HV={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":$.strikethrough}},{name:"StrikethroughMark",style:$.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),s=/\s|^$/.test(i),o=hf.test(r),c=hf.test(i);return e.addDelimiter(WV,n,n+2,!s&&(!c||a||o),!a&&(!o||s||c))},after:"Emphasis"}]};function Nd(e,t,n=0,r,i=0){let a=0,s=!0,o=-1,c=-1,d=!1,f=()=>{r.push(e.elt("TableCell",i+o,i+c,e.parser.parseInline(t.slice(o,c),i+o)))};for(let m=n;m<t.length;m++){let p=t.charCodeAt(m);p==124&&!d?((!s||o>-1)&&a++,s=!1,r&&(o>-1&&f(),r.push(e.elt("TableDelimiter",m+i,m+i+1))),o=c=-1):(d||p!=32&&p!=9)&&(o<0&&(o=m),c=m+1),d=!d&&p==92}return o>-1&&(a++,r&&f()),a}function _E(e,t){for(let n=t;n<e.length;n++){let r=e.charCodeAt(n);if(r==124)return!0;r==92&&n++}return!1}var H5=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,wE=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&H5.test(r=t.text.slice(t.pos))){let i=[];Nd(e,n.content,0,i,n.start)==Nd(e,r,t.pos)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,i),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let r=[];Nd(e,t.text,t.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,r))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}},GV={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":$.heading}},"TableRow",{name:"TableCell",style:$.content},{name:"TableDelimiter",style:$.processingInstruction}],parseBlock:[{name:"Table",leaf(e,t){return _E(t.content,0)?new wE:null},endLeaf(e,t,n){if(n.parsers.some(i=>i instanceof wE)||!_E(t.text,t.basePos))return!1;let r=e.peekLine();return H5.test(r)&&Nd(e,t.text,t.basePos)==Nd(e,r,t.basePos)},before:"SetextHeading"}]},KV=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},JV={defineNodes:[{name:"Task",block:!0,style:$.list},{name:"TaskMarker",style:$.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new KV:null},after:"SetextHeading"}]},kE=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,jE=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,eU=/[\w-]+\.[\w-]+($|\/)/,TE=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,EE=/\/[a-zA-Z\d@.]+/gy;function CE(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function tU(e,t){jE.lastIndex=t;let n=jE.exec(e);if(!n||eU.exec(n[0])[0].indexOf("_")>-1)return-1;let r=t+n[0].length;for(;;){let i=e[r-1],a;if(/[?!.,:*_~]/.test(i)||i==")"&&CE(e,t,r,")")>CE(e,t,r,"("))r--;else if(i==";"&&(a=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+a.index;else break}return r}function AE(e,t){TE.lastIndex=t;let n=TE.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r=="_"||r=="-"?-1:t+n[0].length-(r=="."?1:0)}var nU={parseInline:[{name:"Autolink",parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;kE.lastIndex=r;let i=kE.exec(e.text),a=-1;if(!i)return-1;if(i[1]||i[2]){if(a=tU(e.text,r+i[0].length),a>-1&&e.hasOpenLink){let s=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a));a=r+s[0].length}}else i[3]?a=AE(e.text,r):(a=AE(e.text,r+i[0].length),a>-1&&i[0]=="xmpp:"&&(EE.lastIndex=a,i=EE.exec(e.text),i&&(a=i.index+i[0].length)));return a<0?-1:(e.addElement(e.elt("URL",n,a+e.offset)),a+e.offset)}}]},rU=[GV,JV,HV,nU];function G5(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let s=[r.elt(n,a,a+1)];for(let o=a+1;o<r.end;o++){let c=r.char(o);if(c==e)return r.addElement(r.elt(t,a,o+1,s.concat(r.elt(n,o,o+1))));if(c==92&&s.push(r.elt("Escape",o,o+++2)),vi(c))break}return-1}}var iU={defineNodes:[{name:"Superscript",style:$.special($.content)},{name:"SuperscriptMark",style:$.processingInstruction}],parseInline:[{name:"Superscript",parse:G5(94,"Superscript","SuperscriptMark")}]},aU={defineNodes:[{name:"Subscript",style:$.special($.content)},{name:"SubscriptMark",style:$.processingInstruction}],parseInline:[{name:"Subscript",parse:G5(126,"Subscript","SubscriptMark")}]},sU={defineNodes:[{name:"Emoji",style:$.character}],parseInline:[{name:"Emoji",parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt("Emoji",n,n+1+r[0].length))}}]},oU=class G0{constructor(t,n,r,i,a,s,o,c,d,f=0,m){this.p=t,this.stack=n,this.state=r,this.reducePos=i,this.pos=a,this.score=s,this.buffer=o,this.bufferBase=c,this.curContext=d,this.lookAhead=f,this.parent=m}toString(){return`[${this.stack.filter((t,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,n,r=0){let i=t.parser.context;return new G0(t,[],n,r,r,0,[],0,i?new PE(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var n;let r=t>>19,i=t&65535,{parser:a}=this.p,s=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),o=a.dynamicPrecedence(i);if(o&&(this.score+=o),r==0){this.pushState(a.getGoto(this.state,i,!0),this.reducePos),i<a.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(i,this.reducePos);return}let c=this.stack.length-(r-1)*3-(t&262144?6:0),d=c?this.stack[c-2]:this.p.ranges[0].from,f=this.reducePos-d;f>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(d==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=d,this.p.lastBigReductionSize=f));let m=c?this.stack[c-1]:0,p=this.bufferBase+this.buffer.length-m;if(i<a.minRepeatTerm||t&131072){let v=a.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,d,v,p+4,!0)}if(t&262144)this.state=this.stack[c];else{let v=this.stack[c-3];this.state=a.getGoto(v,i,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(i,d)}storeNode(t,n,r,i=4,a=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,o=this.buffer.length;if(o==0&&s.parent&&(o=s.bufferBase-s.parent.bufferBase,s=s.parent),o>0&&s.buffer[o-4]==0&&s.buffer[o-1]>-1){if(n==r)return;if(s.buffer[o-2]>=n){s.buffer[o-2]=r;return}}}if(!a||this.pos==r)this.buffer.push(t,n,r,i);else{let s=this.buffer.length;if(s>0&&(this.buffer[s-4]!=0||this.buffer[s-1]<0)){let o=!1;for(let c=s;c>0&&this.buffer[c-2]>r;c-=4)if(this.buffer[c-1]>=0){o=!0;break}if(o)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4)}this.buffer[s]=t,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(t,n,r,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let a=t,{parser:s}=this.p;this.pos=i;let o=s.stateFlag(a,1);!o&&(i>r||n<=s.maxNode)&&(this.reducePos=i),this.pushState(a,o?r:Math.min(r,this.reducePos)),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(t,n,r,i){t&65536?this.reduce(t):this.shift(t,n,r,i)}useNode(t,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=t)&&(this.p.reused.push(t),r++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,n=t.buffer.length;for(;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new G0(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,n){let r=t<=this.p.parser.maxNode;r&&this.storeNode(t,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(t){for(let n=new lU(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,t);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(t){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let a=0,s;a<n.length;a+=2)(s=n[a+1])!=this.state&&this.p.parser.hasAction(s,t)&&i.push(n[a],s);if(this.stack.length<120)for(let a=0;i.length<8&&a<n.length;a+=2){let s=n[a+1];i.some((o,c)=>c&1&&o==s)||i.push(n[a],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let a=n[i+1];if(a==this.state)continue;let s=this.split();s.pushState(a,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:t}=this.p,n=t.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!t.validAction(this.state,n)){let r=n>>19,i=n&65535,a=this.stack.length-r*3;if(a<0||t.getGoto(this.stack[a],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:t}=this.p,n=[],r=(i,a)=>{if(!n.includes(i))return n.push(i),t.allActions(i,s=>{if(!(s&393216))if(s&65536){let o=(s>>19)-a;if(o>1){let c=s&65535,d=this.stack.length-o*3;if(d>=0&&t.getGoto(this.stack[d],c,!1)>=0)return o<<19|65536|c}}else{let o=r(s,a+1);if(o!=null)return o}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=t.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(n)))}reduceContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(n)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let n=new PE(this.curContext.tracker,t);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},PE=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},lU=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},cU=class K0{constructor(t,n,r){this.stack=t,this.pos=n,this.index=r,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new K0(t,n,n-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new K0(this.stack,this.pos,this.index)}};function vd(e,t=Uint16Array){if(typeof e!="string")return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let s=e.charCodeAt(r++),o=!1;if(s==126){a=65535;break}s>=92&&s--,s>=34&&s--;let c=s-32;if(c>=46&&(c-=46,o=!0),a+=c,o)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var hp=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},QE=new hp,uU=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=QE,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let a=this.ranges[--r];i-=n.from-a.to,n=a}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];i+=a.from-n.to,n=a}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let i=this.resolveOffset(e,1);if(i==null)return-1;if(n=i,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let a=this.rangeIndex,s=this.range;for(;s.to<=n;)s=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>s.to&&(this.chunk2=this.chunk2.slice(0,s.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=QE,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},_c=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;K5(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};_c.prototype.contextual=_c.prototype.fallback=_c.prototype.extend=!1;var Ip=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?vd(e):e}token(e,t){let n=e.pos,r=0;for(;;){let i=e.next<0,a=e.resolveOffset(1,1);if(K5(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(i||r++,a==null)break;e.reset(a,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};Ip.prototype.contextual=_c.prototype.fallback=_c.prototype.extend=!1;var Yr=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function K5(e,t,n,r,i,a){let s=0,o=1<<r,{dialect:c}=n.p.parser;e:for(;(o&e[s])!=0;){let d=e[s+1];for(let v=s+3;v<d;v+=2)if((e[v+1]&o)>0){let b=e[v];if(c.allows(b)&&(t.token.value==-1||t.token.value==b||dU(b,t.token.value,i,a))){t.acceptToken(b);break}}let f=t.next,m=0,p=e[s+2];if(t.next<0&&p>m&&e[d+p*3-3]==65535){s=e[d+p*3-1];continue e}for(;m<p;){let v=m+p>>1,b=d+v+(v<<1),S=e[b],x=e[b+1]||65536;if(f<S)p=v;else if(f>=x)m=v+1;else{s=e[b+2],t.advance();continue e}}break}}function NE(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function dU(e,t,n,r){let i=NE(n,r,t);return i<0||NE(n,r,e)<i}var Dr=typeof process<"u"&&Wy&&/\bparse\b/.test(Wy.LOG),qb=null;function RE(e,t,n){let r=e.cursor(_t.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var fU=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?RE(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?RE(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof Rt){if(a==e){if(a<this.safeFrom)return null;let s=a+i.length;if(s<=this.safeTo){let o=i.prop(nt.lookAhead);if(!o||s+o<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},hU=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new hp)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,o=0;for(let c=0;c<i.length;c++){if((1<<c&a)==0)continue;let d=i[c],f=this.tokens[c];if(!(n&&!d.fallback)&&((d.contextual||f.start!=e.pos||f.mask!=a||f.context!=s)&&(this.updateCachedToken(f,d,e),f.mask=a,f.context=s),f.lookAhead>f.end+25&&(o=Math.max(f.lookAhead,o)),f.value!=0)){let m=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!d.extend&&(n=f,t>m))break}}for(;this.actions.length>t;)this.actions.pop();return o&&e.setLookAhead(o),!n&&e.pos==this.stream.end&&(n=new hp,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new hp,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:i}=n.p;for(let a=0;a<i.specialized.length;a++)if(i.specialized[a]==e.value){let s=i.specializers[a](this.stream.read(e.start,e.end),n);if(s>=0&&n.p.parser.dialect.allows(s>>1)){(s&1)==0?e.value=s>>1:e.extended=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let i=0;i<r;i+=3)if(this.actions[i]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:s}=a;for(let o=0;o<2;o++)for(let c=a.stateSlot(i,o?2:1);;c+=3){if(s[c]==65535)if(s[c+1]==1)c=Ba(s,c+2);else{r==0&&s[c+1]==2&&(r=this.putAction(Ba(s,c+2),t,n,r));break}s[c]==t&&(r=this.putAction(Ba(s,c+1),t,n,r))}return r}},mU=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new uU(t,r),this.tokens=new hU(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[oU.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new fU(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let s=e[a];for(;;){if(this.tokens.mainToken=null,s.pos>t)n.push(s);else{if(this.advanceStack(s,n,e))continue;{r||(r=[],i=[]),r.push(s);let o=this.tokens.getMainToken(s);i.push(o.value,o.end)}}break}}if(!n.length){let a=r&&gU(r);if(a)return Dr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Dr&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(a)return Dr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(n.length>a)for(n.sort((s,o)=>o.score-s.score);n.length>a;)n.pop();n.some(s=>s.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let a=0;a<n.length-1;a++){let s=n[a];for(let o=a+1;o<n.length;o++){let c=n[o];if(s.sameState(c)||s.buffer.length>500&&c.buffer.length>500)if((s.score-c.score||s.buffer.length-c.buffer.length)>0)n.splice(o--,1);else{n.splice(a--,1);continue e}}}n.length>12&&(n.sort((a,s)=>s.score-a.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let a=1;a<n.length;a++)n[a].pos<this.minStackPos&&(this.minStackPos=n[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=Dr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,d=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(r);f;){let m=this.parser.nodeSet.types[f.type.id]==f.type?i.getGoto(e.state,f.type.id):-1;if(m>-1&&f.length&&(!c||(f.prop(nt.contextHash)||0)==d))return e.useNode(f,m),Dr&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(f.type.id)})`),!0;if(!(f instanceof Rt)||f.children.length==0||f.positions[0]>0)break;let p=f.children[0];if(p instanceof Rt&&f.positions[0]==0)f=p;else break}}let s=i.stateSlot(e.state,4);if(s>0)return e.reduce(s),Dr&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let o=this.tokens.getActions(e);for(let c=0;c<o.length;){let d=o[c++],f=o[c++],m=o[c++],p=c==o.length||!n,v=p?e:e.split(),b=this.tokens.mainToken;if(v.apply(d,f,b?b.start:v.pos,m),Dr&&console.log(a+this.stackID(v)+` (via ${(d&65536)==0?"shift":`reduce of ${i.getName(d&65535)}`} for ${i.getName(f)} @ ${r}${v==e?"":", split"})`),p)return!0;v.pos>r?t.push(v):n.push(v)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return ME(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let s=e[a],o=t[a<<1],c=t[(a<<1)+1],d=Dr?this.stackID(s)+" -> ":"";if(s.deadEnd&&(i||(i=!0,s.restart(),Dr&&console.log(d+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))))continue;let f=s.split(),m=d;for(let p=0;p<10&&f.forceReduce()&&(Dr&&console.log(m+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,n));p++)Dr&&(m=this.stackID(f)+" -> ");for(let p of s.recoverByInsert(o))Dr&&console.log(d+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,n);this.stream.end>s.pos?(c==s.pos&&(c++,o=0),s.recoverByDelete(o,c),Dr&&console.log(d+this.stackID(s)+` (via recover-delete ${this.parser.getName(o)})`),ME(s,n)):(!r||r.score<f.score)&&(r=f)}return r}stackToTree(e){return e.close(),Rt.build({buffer:cU.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(qb||(qb=new WeakMap)).get(e);return t||qb.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function ME(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var pU=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},Bb=e=>e,J5=class{constructor(e){this.start=e.start,this.shift=e.shift||Bb,this.reduce=e.reduce||Bb,this.reuse=e.reuse||Bb,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},wg=class J0 extends Vx{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let n=t.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let o=0;o<t.repeatNodeCount;o++)n.push("");let r=Object.keys(t.topRules).map(o=>t.topRules[o][1]),i=[];for(let o=0;o<n.length;o++)i.push([]);function a(o,c,d){i[o].push([c,c.deserialize(String(d))])}if(t.nodeProps)for(let o of t.nodeProps){let c=o[0];typeof c=="string"&&(c=nt[c]);for(let d=1;d<o.length;){let f=o[d++];if(f>=0)a(f,c,o[d++]);else{let m=o[d+-f];for(let p=-f;p>0;p--)a(o[d++],c,m);d++}}}this.nodeSet=new Xx(n.map((o,c)=>Zn.define({name:c>=this.minRepeatTerm?void 0:o,id:c,props:i[c],top:r.indexOf(c)>-1,error:c==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(c)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=WM;let s=vd(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;o<this.specializerSpecs.length;o++)this.specialized[o]=this.specializerSpecs[o].term;this.specializers=this.specializerSpecs.map(LE),this.states=vd(t.states,Uint32Array),this.data=vd(t.stateData),this.goto=vd(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(o=>typeof o=="number"?new _c(s,o):o),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,n,r){let i=new mU(this,t,n,r);for(let a of this.wrappers)i=a(i,t,n,r);return i}getGoto(t,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let a=i[n+1];;){let s=i[a++],o=s&1,c=i[a++];if(o&&r)return c;for(let d=a+(s>>1);a<d;a++)if(i[a]==t)return c;if(o)return-1}}hasAction(t,n){let r=this.data;for(let i=0;i<2;i++)for(let a=this.stateSlot(t,i?2:1),s;;a+=3){if((s=r[a])==65535)if(r[a+1]==1)s=r[a=Ba(r,a+2)];else{if(r[a+1]==2)return Ba(r,a+2);break}if(s==n||s==0)return Ba(r,a+1)}return 0}stateSlot(t,n){return this.states[t*6+n]}stateFlag(t,n){return(this.stateSlot(t,0)&n)>0}validAction(t,n){return!!this.allActions(t,r=>r==n?!0:null)}allActions(t,n){let r=this.stateSlot(t,4),i=r?n(r):void 0;for(let a=this.stateSlot(t,1);i==null;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=Ba(this.data,a+2);else break;i=n(Ba(this.data,a+1))}return i}nextStates(t){let n=[];for(let r=this.stateSlot(t,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ba(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((a,s)=>s&1&&a==i)||n.push(this.data[r],i)}}return n}configure(t){let n=Object.assign(Object.create(J0.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let r=this.topRules[t.top];if(!r)throw new RangeError(`Invalid top rule name ${t.top}`);n.top=r}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=t.tokenizers.find(a=>a.from==r);return i?i.to:r})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let a=t.specializers.find(o=>o.from==r.external);if(!a)return r;let s=Object.assign(Object.assign({},r),{external:a.to});return n.specializers[i]=LE(s),s})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let n=this.dynamicPrecedences;return n==null?0:n[t]||0}parseDialect(t){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(t)for(let a of t.split(" ")){let s=n.indexOf(a);s>=0&&(r[s]=!0)}let i=null;for(let a=0;a<n.length;a++)if(!r[a])for(let s=this.dialects[n[a]],o;(o=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[o]=1;return new pU(t,r,i)}static deserialize(t){return new J0(t)}};function Ba(e,t){return e[t]|e[t+1]<<16}function gU(e){let t=null;for(let n of e){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function LE(e){if(e.external){let t=e.extend?1:0;return(n,r)=>e.external(n,r)<<1|t}return e.get}var vU=55,OU=1,bU=56,yU=2,SU=57,xU=3,DE=4,_U=5,i_=6,eL=7,tL=8,nL=9,rL=10,wU=11,kU=12,jU=13,Xb=58,TU=14,EU=15,zE=59,iL=21,CU=23,aL=24,AU=25,eS=27,sL=28,PU=29,QU=32,NU=35,RU=37,MU=38,LU=0,DU=1,zU={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},IU={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},IE={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function qU(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var qE=null,BE=null,XE=0;function tS(e,t){let n=e.pos+t;if(XE==n&&BE==e)return qE;let r=e.peek(t),i="";for(;qU(r);)i+=String.fromCharCode(r),r=e.peek(++t);return BE=e,XE=n,qE=i?i.toLowerCase():r==BU||r==XU?void 0:null}var oL=60,qp=62,a_=47,BU=63,XU=33,ZU=45;function ZE(e,t){this.name=e,this.parent=t}var $U=[i_,rL,eL,tL,nL],VU=new J5({start:null,shift(e,t,n,r){return $U.indexOf(t)>-1?new ZE(tS(r,1)||"",e):e},reduce(e,t){return t==iL&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==i_||i==RU?new ZE(tS(r,1)||"",e):e},strict:!1}),UU=new Yr((e,t)=>{if(e.next!=oL){e.next<0&&t.context&&e.acceptToken(Xb);return}e.advance();let n=e.next==a_;n&&e.advance();let r=tS(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?EU:TU);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(wU);if(i&&IU[i])return e.acceptToken(Xb,-2);if(t.dialectEnabled(LU))return e.acceptToken(kU);for(let a=t.context;a;a=a.parent)if(a.name==r)return;e.acceptToken(jU)}else{if(r=="script")return e.acceptToken(eL);if(r=="style")return e.acceptToken(tL);if(r=="textarea")return e.acceptToken(nL);if(zU.hasOwnProperty(r))return e.acceptToken(rL);i&&IE[i]&&IE[i][r]?e.acceptToken(Xb,-1):e.acceptToken(i_)}},{contextual:!0}),YU=new Yr(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(zE);break}if(e.next==ZU)t++;else if(e.next==qp&&t>=2){n>=3&&e.acceptToken(zE,-2);break}else t=0;e.advance()}});function FU(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}var WU=new Yr((e,t)=>{if(e.next==a_&&e.peek(1)==qp){let n=t.dialectEnabled(DU)||FU(t.context);e.acceptToken(n?_U:DE,2)}else e.next==qp&&e.acceptToken(DE,1)});function s_(e,t,n){let r=2+e.length;return new Yr(i=>{for(let a=0,s=0,o=0;;o++){if(i.next<0){o&&i.acceptToken(t);break}if(a==0&&i.next==oL||a==1&&i.next==a_||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,s++;else if(a==r&&i.next==qp){o>s?i.acceptToken(t,-s):i.acceptToken(n,-(s-2));break}else if((i.next==10||i.next==13)&&o){i.acceptToken(t,1);break}else a=s=0;i.advance()}})}var HU=s_("script",vU,OU),GU=s_("style",bU,yU),KU=s_("textarea",SU,xU),JU=ml({"Text RawText IncompleteTag IncompleteCloseTag":$.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":$.angleBracket,TagName:$.tagName,"MismatchedCloseTag/TagName":[$.tagName,$.invalid],AttributeName:$.attributeName,"AttributeValue UnquotedAttributeValue":$.attributeValue,Is:$.definitionOperator,"EntityReference CharacterReference":$.character,Comment:$.blockComment,ProcessingInst:$.processingInstruction,DoctypeDecl:$.documentMeta}),e8=wg.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:",c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:VU,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[JU],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!b`!dpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYlWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`aP!b`!dp!_^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ebiSlWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0rXiSqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0mS1bP;=`<%l0m[1hP;=`<%l/^!V1vciSaP!b`!dpOq&Xqr1krs&}sv1kvw0mwx(tx!P1k!P!Q&X!Q!^1k!^!_*V!_!a&X!a#s1k#s$f&X$f;'S1k;'S;=`3R<%l?Ah1k?Ah?BY&X?BY?Mn1k?MnO&X!V3UP;=`<%l1k!_3[P;=`<%l-_!Z3hV!ahaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_4WiiSlWd!ROX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst>]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V<QciSOp7Sqr;{rs7Sst0mtw;{wx7Sx!P;{!P!Q7S!Q!];{!]!^=]!^!a7S!a#s;{#s$f7S$f;'S;{;'S;=`>P<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[HU,GU,KU,WU,UU,YU,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function lL(e,t){let n=Object.create(null);for(let r of e.getChildren(aL)){let i=r.getChild(AU),a=r.getChild(eS)||r.getChild(sL);i&&(n[t.read(i.from,i.to)]=a?a.type.id==eS?t.read(a.from+1,a.to-1):t.read(a.from,a.to):"")}return n}function $E(e,t){let n=e.getChild(CU);return n?t.read(n.from,n.to):" "}function Zb(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=lL(e.node.parent.firstChild,t))))return{parser:i.parser,bracketed:!0};return null}function cL(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let o of e)(o.tag=="script"?n:o.tag=="style"?r:o.tag=="textarea"?i:a).push(o);let s=t.length?Object.create(null):null;for(let o of t)(s[o.name]||(s[o.name]=[])).push(o);return i5((o,c)=>{let d=o.type.id;if(d==PU)return Zb(o,c,n);if(d==QU)return Zb(o,c,r);if(d==NU)return Zb(o,c,i);if(d==iL&&a.length){let f=o.node,m=f.firstChild,p=m&&$E(m,c),v;if(p){for(let b of a)if(b.tag==p&&(!b.attrs||b.attrs(v||(v=lL(m,c))))){let S=f.lastChild,x=S.type.id==MU?S.from:f.to;if(x>m.to)return{parser:b.parser,overlay:[{from:m.to,to:x}]}}}}if(s&&d==aL){let f=o.node,m;if(m=f.firstChild){let p=s[c.read(m.from,m.to)];if(p)for(let v of p){if(v.tagName&&v.tagName!=$E(f.parent,c))continue;let b=f.lastChild;if(b.type.id==eS){let S=b.from+1,x=b.lastChild,w=b.to-(x&&x.isError?0:1);if(w>S)return{parser:v.parser,overlay:[{from:S,to:w}],bracketed:!0}}else if(b.type.id==sL)return{parser:v.parser,overlay:[{from:b.from,to:b.to}]}}}}return null})}var t8=122,VE=1,n8=123,r8=124,uL=2,i8=125,a8=3,s8=4,dL=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],o8=58,l8=40,fL=95,c8=91,mp=45,u8=46,d8=35,f8=37,h8=38,m8=92,p8=10,g8=42;function mf(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function o_(e){return e>=48&&e<=57}function UE(e){return o_(e)||e>=97&&e<=102||e>=65&&e<=70}var hL=(e,t,n)=>(r,i)=>{for(let a=!1,s=0,o=0;;o++){let{next:c}=r;if(mf(c)||c==mp||c==fL||a&&o_(c))!a&&(c!=mp||o>0)&&(a=!0),s===o&&c==mp&&s++,r.advance();else if(c==m8&&r.peek(1)!=p8){if(r.advance(),UE(r.next)){do r.advance();while(UE(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(s==2&&i.canShift(uL)?t:c==l8?n:e);break}}},v8=new Yr(hL(n8,uL,r8)),O8=new Yr(hL(i8,a8,s8)),b8=new Yr(e=>{if(dL.includes(e.peek(-1))){let{next:t}=e;(mf(t)||t==fL||t==d8||t==u8||t==g8||t==c8||t==o8&&mf(e.peek(1))||t==mp||t==h8)&&e.acceptToken(t8)}}),y8=new Yr(e=>{if(!dL.includes(e.peek(-1))){let{next:t}=e;if(t==f8&&(e.advance(),e.acceptToken(VE)),mf(t)){do e.advance();while(mf(e.next)||o_(e.next));e.acceptToken(VE)}}}),S8=ml({"AtKeyword import charset namespace keyframes media supports":$.definitionKeyword,"from to selector":$.keyword,NamespaceName:$.namespace,KeyframeName:$.labelName,KeyframeRangeName:$.operatorKeyword,TagName:$.tagName,ClassName:$.className,PseudoClassName:$.constant($.className),IdName:$.labelName,"FeatureName PropertyName":$.propertyName,AttributeName:$.attributeName,NumberLiteral:$.number,KeywordQuery:$.keyword,UnaryQueryOp:$.operatorKeyword,"CallTag ValueName":$.atom,VariableName:$.variableName,Callee:$.operatorKeyword,Unit:$.unit,"UniversalSelector NestingSelector":$.definitionOperator,"MatchOp CompareOp":$.compareOperator,"ChildOp SiblingOp, LogicOp":$.logicOperator,BinOp:$.arithmeticOperator,Important:$.modifier,Comment:$.blockComment,ColorLiteral:$.color,"ParenthesizedContent StringLiteral":$.string,":":$.punctuation,"PseudoOp #":$.derefOperator,"; ,":$.separator,"( )":$.paren,"[ ]":$.squareBracket,"{ }":$.brace}),x8={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},_8={__proto__:null,or:98,and:98,not:106,only:106,layer:170},w8={__proto__:null,selector:112,layer:166},k8={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},j8={__proto__:null,to:207},T8=wg.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#E_O4PQ`O,5:wO4UQhO,5:}O%_QdO'#DgOOQS,5;P,5;PO-eQ`O,5;PO4^QdO,5;PO4fQdO,5:gO4vQdO'#EtO5TQ`O,5;zO5TQ`O,5;zPOOO'#Ej'#EjP5`O&jO,58{POOO,58{,58{OOQP1G.n1G.nOOQP1G.q1G.qO*hQ`O1G.qO*mQ`O1G.qOOQP1G/v1G/vO5kQpO1G/xO5sQaO1G/{O6ZQaO1G/}O6qQaO1G0OO7XQaO,5;^OOQO-E8p-E8pOOQS1G.i1G.iO7cQ`O,5:fO7hQdO'#DoO7oQdO'#CrOOQP1G/x1G/xO&lQdO1G/xO7vQ!jO'#DZO8UQ!bO,59vO8^QhO,5:OOOQO'#F]'#F]O8XQ!bO,59zO'tQhO,59xO8fQhO'#EvO8sQ`O,5;{O9OQhO,59|O9uQhO'#DiOOQW,5:S,5:SOOQS1G0n1G0nOOQW,5:P,5:PO9|Q!fO'#FYOOQS'#FY'#FYOOQS'#Em'#EmO;^QdO,59`OOQ[,59`,59`O;tQdO,59fOOQ[,59f,59fO<[QdO,59iOOQ[,59i,59iOOQ[,59k,59kO&lQdO,59mO<rQhO'#EQOOQW'#EQ'#EQO=WQ`O1G0UO1[QhO1G0UOOQ[,59o,59oO'tQhO'#DXOOQ[,59q,59qO=]Q#tO,5:VOOQS1G0[1G0[OOQS1G0^1G0^OOQS1G0`1G0`O=hQ`O1G0`O=mQdO'#E`OOQS1G0c1G0cOOQS1G0i1G0iO=xQaO,5:RO-`Q`O1G0kOOQS1G0k1G0kO-eQ`O1G0kO>PQ!fO1G0ROOQO1G0R1G0ROOQO,5;`,5;`O>gQdO,5;`OOQO-E8r-E8rO>tQ`O1G1fPOOO-E8h-E8hPOOO1G.g1G.gOOQP7+$]7+$]OOQP7+%d7+%dO&lQdO7+%dOOQS1G0Q1G0QO?PQaO'#F_O?ZQ`O,5:ZO?`Q!fO'#ElO@^QdO'#FWO@hQ`O,59^O@mQ!bO7+%dO&lQdO1G/bO@uQhO1G/fOOQW1G/j1G/jOOQW1G/d1G/dOAWQhO,5;bOOQO-E8t-E8tOAfQhO'#DZOAtQhO'#F^OBPQ`O'#F^OBUQ`O,5:TOOQS-E8k-E8kOOQ[1G.z1G.zOOQ[1G/Q1G/QOOQ[1G/T1G/TOOQ[1G/X1G/XOBZQdO,5:lOOQS7+%p7+%pOB`Q`O7+%pOBeQhO'#DYOBmQ`O,59sO'tQhO,59sOOQ[1G/q1G/qOBuQ`O1G/qOOQS7+%z7+%zOBzQbO'#DPOOQO'#Eb'#EbOCYQ`O'#EaOOQO'#Ea'#EaOCeQ`O'#EwOCmQdO,5:zOOQS,5:z,5:zOOQ[1G/m1G/mOOQS7+&V7+&VO-`Q`O7+&VOCxQ!fO'#EsO&lQdO'#EsOEPQdO7+%mOOQO7+%m7+%mOOQO1G0z1G0zOEdQ!bO<<IOOElQdO'#EqOEvQ`O,5;yOOQP1G/u1G/uOOQS-E8j-E8jOFOQdO'#EpOFYQ`O,5;rOOQ]1G.x1G.xOOQP<<IO<<IOOFbQdO7+$|OOQO'#D]'#D]OFiQ!bO7+%QOFqQhO'#EoOF{Q`O,5;xO&lQdO,5;xOOQW1G/o1G/oOOQO'#ES'#ESOGTQ`O1G0WOOQS<<I[<<I[O&lQdO,59tOGnQhO1G/_OOQ[1G/_1G/_OGuQ`O1G/_OOQW-E8l-E8lOOQ[7+%]7+%]OOQO,5:{,5:{O=pQdO'#ExOCeQ`O,5;cOOQS,5;c,5;cOOQS-E8u-E8uOOQS1G0f1G0fOOQS<<Iq<<IqOG}Q!fO,5;_OOQS-E8q-E8qOOQO<<IX<<IXOOQPAN>jAN>jOIUQaO,5;]OOQO-E8o-E8oOI`QdO,5;[OOQO-E8n-E8nOOQW<<Hh<<HhOOQW<<Hl<<HlOIjQhO<<HlOI{QhO,5;ZOJWQ`O,5;ZOOQO-E8m-E8mOJ]QdO1G1dOBZQdO'#EuOJgQ`O7+%rOOQW7+%r7+%rOJoQ!bO1G/`OOQ[7+$y7+$yOJzQhO7+$yPKRQ`O'#EnOOQO,5;d,5;dOOQO-E8v-E8vOOQS1G0}1G0}OKWQ`OAN>WO&lQdO1G0uOK]Q`O7+'OOOQO,5;a,5;aOOQO-E8s-E8sOOQW<<I^<<I^OOQ[<<He<<HePOQW,5;Y,5;YOOQWG23rG23rOKeQdO7+&a",stateData:"Kx~O#sOS#tQQ~OW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#oRO~OQiOW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#ohO~O#m$SP~P!dO#tmO~O#ooO~O]qO`rOarOjsOmtO!juO!mwO#nvO~OpzO!^xO~P$SOc!QO#o|O#p}O~O#o!RO~O#o!TO~OW[OZ[O]TO`VOaVOjWOmXO!jYO!mZO#oRO~OS!]Oe!YO!V![O!Y!`O#q!XOp$TP~Ok$TP~P&POQ!jOe!cOm!dOp!eOr!mOt!mOz!kO!`!lO#o!bO#p!hO#}!fO~Ot!qO!`!lO#o!pO~Ot!sO#o!sO~OS!]Oe!YO!V![O!Y!`O#q!XO~Oe!vOpzO#Z!xO~O]YX`YX`!pXaYXjYXmYXpYX!^YX!jYX!mYX#nYX~O`!zO~Ok!{O#m$SXo$SX~O#m$SXo$SX~P!dO#u#OO#v#OO#w#QO~Oc#UO#o|O#p}O~OpzO!^xO~Oo$SP~P!dOe#`O~Oe#aO~Ol#bO!h#cO~O]qO`rOarOjsOmtO~Op!ia!^!ia!j!ia!m!ia#n!iad!ia~P*zOp!la!^!la!j!la!m!la#n!lad!la~P*zOR#gOS!]Oe!YOr#gOt#gO!V![O!Y!`O#q#dO#}!fO~O!R#iO!^#jOk$TXp$TX~Oe#mO~Ok#oOpzO~Oe!vO~O]#rO`#rOd#uOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl#wO~P&lO]#rO`#rOi#rOj#rOk#rOo#yO~P&lOP#zOSsXesXksXvsX!VsX!YsX!usX!wsX#qsX!TsXQsX]sX`sXdsXisXjsXmsXpsXrsXtsXzsX!`sX#osX#psX#}sXlsXosX!^sX!qsX#msX~Ov#{O!u#|O!w#}Ok$TP~P'tOe#aOS#{Xk#{Xv#{X!V#{X!Y#{X!u#{X!w#{X#q#{XQ#{X]#{X`#{Xd#{Xi#{Xj#{Xm#{Xp#{Xr#{Xt#{Xz#{X!`#{X#o#{X#p#{X#}#{Xl#{Xo#{X!^#{X!q#{X#m#{X~Oe$RO~Oe$TO~Ok$VOv#{O~Ok$WO~Ot$XO!`!lO~Op$YO~OpzO!R#iO~OpzO#Z$`O~O!q$bOk!oa#m!oao!oa~P&lOk#hX#m#hXo#hX~P!dOk!{O#m$Sao$Sa~O#u#OO#v#OO#w$hO~Ol$jO!h$kO~Op!ii!^!ii!j!ii!m!ii#n!iid!ii~P*zOp!ki!^!ki!j!ki!m!ki#n!kid!ki~P*zOp!li!^!li!j!li!m!li#n!lid!li~P*zOp#fa!^#fa~P$SOo$lO~Od$RP~P%_Od#zP~P&lO`!PXd}X!R}X!T!PX~O`$sO!T$tO~Od$uO!R#iO~Ok#jXp#jX!^#jX~P'tO!^#jOk$Tap$Ta~O!R#iOk!Uap!Ua!^!Uad!Ua`!Ua~OS!]Oe!YO!V![O!Y!`O#q$yO~Od$QP~P9dOv#{OQ#|X]#|X`#|Xd#|Xe#|Xi#|Xj#|Xk#|Xm#|Xp#|Xr#|Xt#|Xz#|X!`#|X#o#|X#p#|X#}#|Xl#|Xo#|X~O]#rO`#rOd%OOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl%PO~P&lO]#rO`#rOi#rOj#rOk#rOo%QO~P&lOe%SOS!tXk!tX!V!tX!Y!tX#q!tX~Ok%TO~Od%YOt%ZO!a%ZO~Ok%[O~Oo%cO#o%^O#}%]O~Od%dO~P$SOv#{O!^%hO!q%jOk!oi#m!oio!oi~P&lOk#ha#m#hao#ha~P!dOk!{O#m$Sio$Si~O!^%mOd$RX~P$SOd%oO~Ov#{OQ#`Xd#`Xe#`Xm#`Xp#`Xr#`Xt#`Xz#`X!^#`X!`#`X#o#`X#p#`X#}#`X~O!^%qOd#zX~P&lOd%sO~Ol%tOv#{O~OR#gOr#gOt#gO#q%vO#}!fO~O!R#iOk#jap#ja!^#ja~O`!PXd}X!R}X!^}X~O!R#iO!^%xOd$QX~O`%zO~Od%{O~O#o%|O~Ok&OO~O`&PO!R#iO~Od&ROk&QO~Od&UO~OP#zOpsX!^sXdsX~O#}%]Op#TX!^#TX~OpzO!^&WO~Oo&[O#o%^O#}%]O~Ov#{OQ#gXe#gXk#gXm#gXp#gXr#gXt#gXz#gX!^#gX!`#gX!q#gX#m#gX#o#gX#p#gX#}#gXo#gX~O!^%hO!q&`Ok!oq#m!oqo!oq~P&lOl&aOv#{O~Od#eX!^#eX~P%_O!^%mOd$Ra~Od#dX!^#dX~P&lO!^%qOd#za~Od&fO~P&lOd&gO!T&hO~Od#cX!^#cX~P9dO!^%xOd$Qa~O]&mOd&oO~OS#bae#ba!V#ba!Y#ba#q#ba~Od&qO~PG]Od&qOk&rO~Ov#{OQ#gae#gak#gam#gap#gar#gat#gaz#ga!^#ga!`#ga!q#ga#m#ga#o#ga#p#ga#}#gao#ga~Od#ea!^#ea~P$SOd#da!^#da~P&lOR#gOr#gOt#gO#q%vO#}%]O~O!R#iOd#ca!^#ca~O`&xO~O!^%xOd$Qi~P&lO]&mOd&|O~Ov#{Od|ik|i~Od&}O~PG]Ok'OO~Od'PO~O!^%xOd$Qq~Od#cq!^#cq~P&lO#s!a#t#}]#}v!m~",goto:"2h$UPPPPP$VP$YP$c$uP$cP%X$cPP%_PPP%e%o%oPPPPP%oPP%oP&]P%oP%o'W%oP't'w'}'}(^'}P'}P'}P'}'}P(m'}(yP(|PP)p)v$c)|$c*SP$cP$c$cP*Y*{+YP$YP+aP+dP$YP$YP$YP+j$YP+m+p+s+z$YP$YPP$YP,P,V,f,|-[-b-l-r-x.O.U.`.f.l.rPPPPPPPPPPP.x/R/w/z0|P1U1u2O2R2U2[RnQ_^OP`kz!{$dq[OPYZ`kuvwxz!v!{#`$d%mqSOPYZ`kuvwxz!v!{#`$d%mQpTR#RqQ!OVR#SrQ#S!QS$Q!i!jR$i#U!V!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'Q!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QU#g!Y$t&hU%`$Y%b&WR&V%_!V!iac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QR$S!kQ%W$RR&S%Xk!^]bf!Y![!g#i#j#m$P$R%X%xQ#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[S8],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Qj)OUOy%Qz#]%Q#]#^)b#^;'S%Q;'S;=`%c<%lO%Qj)gU!a`Oy%Qz#a%Q#a#b)y#b;'S%Q;'S;=`%c<%lO%Qj*OU!a`Oy%Qz#d%Q#d#e*b#e;'S%Q;'S;=`%c<%lO%Qj*gU!a`Oy%Qz#c%Q#c#d*y#d;'S%Q;'S;=`%c<%lO%Qj+OU!a`Oy%Qz#f%Q#f#g+b#g;'S%Q;'S;=`%c<%lO%Qj+gU!a`Oy%Qz#h%Q#h#i+y#i;'S%Q;'S;=`%c<%lO%Qj,OU!a`Oy%Qz#T%Q#T#U,b#U;'S%Q;'S;=`%c<%lO%Qj,gU!a`Oy%Qz#b%Q#b#c,y#c;'S%Q;'S;=`%c<%lO%Qj-OU!a`Oy%Qz#h%Q#h#i-b#i;'S%Q;'S;=`%c<%lO%Qj-iS!qY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q~-xWOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c<%lO-u~.gOt~~.jRO;'S-u;'S;=`.s;=`O-u~.vXOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c;=`<%l-u<%lO-u~/fP;=`<%l-uj/nYjYOy%Qz!Q%Q!Q![0^![!c%Q!c!i0^!i#T%Q#T#Z0^#Z;'S%Q;'S;=`%c<%lO%Qj0cY!a`Oy%Qz!Q%Q!Q![1R![!c%Q!c!i1R!i#T%Q#T#Z1R#Z;'S%Q;'S;=`%c<%lO%Qj1WY!a`Oy%Qz!Q%Q!Q![1v![!c%Q!c!i1v!i#T%Q#T#Z1v#Z;'S%Q;'S;=`%c<%lO%Qj1}YrY!a`Oy%Qz!Q%Q!Q![2m![!c%Q!c!i2m!i#T%Q#T#Z2m#Z;'S%Q;'S;=`%c<%lO%Qj2tYrY!a`Oy%Qz!Q%Q!Q![3d![!c%Q!c!i3d!i#T%Q#T#Z3d#Z;'S%Q;'S;=`%c<%lO%Qj3iY!a`Oy%Qz!Q%Q!Q![4X![!c%Q!c!i4X!i#T%Q#T#Z4X#Z;'S%Q;'S;=`%c<%lO%Qj4`YrY!a`Oy%Qz!Q%Q!Q![5O![!c%Q!c!i5O!i#T%Q#T#Z5O#Z;'S%Q;'S;=`%c<%lO%Qj5TY!a`Oy%Qz!Q%Q!Q![5s![!c%Q!c!i5s!i#T%Q#T#Z5s#Z;'S%Q;'S;=`%c<%lO%Qj5zSrY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qd6ZUOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qd6tS!hS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qb7VSZQOy%Qz;'S%Q;'S;=`%c<%lO%Q~7fWOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z<%lO7c~8RRO;'S7c;'S;=`8[;=`O7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj<VY!a`Oy%Qz{%Q{|<u|}%Q}!O<u!O!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj<zU!a`Oy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj=eU!a`#}YOy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj>O[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj>yS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%QjBUU`YOy%Qz![%Q![!]Bh!];'S%Q;'S;=`%c<%lO%QbBoSaQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjCQSkYOy%Qz;'S%Q;'S;=`%c<%lO%QhCcU!TWOy%Qz!_%Q!_!`Cu!`;'S%Q;'S;=`%c<%lO%QhC|S!TW!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QlDaS!TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[b8,y8,v8,O8,1,2,3,4,new Ip("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},dynamicPrecedences:{76:1},specialized:[{term:124,get:e=>x8[e]||-1},{term:125,get:e=>_8[e]||-1},{term:4,get:e=>w8[e]||-1},{term:25,get:e=>k8[e]||-1},{term:123,get:e=>j8[e]||-1}],tokenPrec:1963}),$b=null;function Vb(){if(!$b&&typeof document=="object"&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)r!="cssText"&&r!="cssFloat"&&typeof e[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));$b=t.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return $b||[]}var YE=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),FE=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),E8=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),C8=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),za=/^(\w[\w-]*|-\w[\w-]*|)$/,A8=/^-(-[\w-]*)?$/;function P8(e,t){var n;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let r=(n=e.parent)===null||n===void 0?void 0:n.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:t.sliceString(r.from,r.to)=="var"}var WE=new r5,Q8=["Declaration"];function N8(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function mL(e,t,n){if(t.to-t.from>4096){let r=WE.get(t);if(r)return r;let i=[],a=new Set,s=t.cursor(_t.IncludeAnonymous);if(s.firstChild())do for(let o of mL(e,s.node,n))a.has(o.label)||(a.add(o.label),i.push(o));while(s.nextSibling());return WE.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(a=>{var s;if(n(a)&&a.matchContext(Q8)&&((s=a.node.nextSibling)===null||s===void 0?void 0:s.name)==":"){let o=e.sliceString(a.from,a.to);i.has(o)||(i.add(o),r.push({label:o,type:"variable"}))}}),r}}var R8=e=>t=>{let{state:n,pos:r}=t,i=$n(n).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(a||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Vb(),validFor:za};if(i.name=="ValueName")return{from:i.from,options:FE,validFor:za};if(i.name=="PseudoClassName")return{from:i.from,options:YE,validFor:za};if(e(i)||(t.explicit||a)&&P8(i,n.doc))return{from:e(i)||a?i.from:r,options:mL(n.doc,N8(i),e),validFor:A8};if(i.name=="TagName"){for(let{parent:c}=i;c;c=c.parent)if(c.name=="Block")return{from:i.from,options:Vb(),validFor:za};return{from:i.from,options:E8,validFor:za}}if(i.name=="AtKeyword")return{from:i.from,options:C8,validFor:za};if(!t.explicit)return null;let s=i.resolve(r),o=s.childBefore(r);return o&&o.name==":"&&s.name=="PseudoClassSelector"?{from:r,options:YE,validFor:za}:o&&o.name==":"&&s.name=="Declaration"||s.name=="ArgList"?{from:r,options:FE,validFor:za}:s.name=="Block"||s.name=="Styles"?{from:r,options:Vb(),validFor:za}:null},M8=R8(e=>e.name=="VariableName"),Bp=xg.define({name:"css",parser:T8.configure({props:[qf.add({Declaration:xc()}),Yc.add({"Block KeyframeList":Fx})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function L8(){return new Lc(Bp,Bp.data.of({autocomplete:M8}))}var D8=316,z8=317,HE=1,I8=2,q8=3,B8=4,X8=318,Z8=320,$8=321,V8=5,U8=6,Y8=0,nS=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],pL=125,F8=59,rS=47,W8=42,H8=43,G8=45,K8=60,J8=44,eY=63,tY=46,nY=91,rY=new J5({start:!1,shift(e,t){return t==V8||t==U8||t==Z8?e:t==$8},strict:!1}),iY=new Yr((e,t)=>{let{next:n}=e;(n==pL||n==-1||t.context)&&e.acceptToken(X8)},{contextual:!0,fallback:!0}),aY=new Yr((e,t)=>{let{next:n}=e,r;nS.indexOf(n)>-1||n==rS&&((r=e.peek(1))==rS||r==W8)||n!=pL&&n!=F8&&n!=-1&&!t.context&&e.acceptToken(D8)},{contextual:!0}),sY=new Yr((e,t)=>{e.next==nY&&!t.context&&e.acceptToken(z8)},{contextual:!0}),oY=new Yr((e,t)=>{let{next:n}=e;if(n==H8||n==G8){if(e.advance(),n==e.next){e.advance();let r=!t.context&&t.canShift(HE);e.acceptToken(r?HE:I8)}}else n==eY&&e.peek(1)==tY&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(q8))},{contextual:!0});function Ub(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var lY=new Yr((e,t)=>{if(e.next!=K8||!t.dialectEnabled(Y8)||(e.advance(),e.next==rS))return;let n=0;for(;nS.indexOf(e.next)>-1;)e.advance(),n++;if(Ub(e.next,!0)){for(e.advance(),n++;Ub(e.next,!1);)e.advance(),n++;for(;nS.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==J8)return;for(let r=0;;r++){if(r==7){if(!Ub(e.next,!0))return;break}if(e.next!="extends".charCodeAt(r))break;e.advance(),n++}}e.acceptToken(B8,-n)}),cY=ml({"get set async static":$.modifier,"for while do if else switch try catch finally return throw break continue default case defer":$.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":$.operatorKeyword,"let var const using function class extends":$.definitionKeyword,"import export from":$.moduleKeyword,"with debugger new":$.keyword,TemplateString:$.special($.string),super:$.atom,BooleanLiteral:$.bool,this:$.self,null:$.null,Star:$.modifier,VariableName:$.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":$.function($.variableName),VariableDefinition:$.definition($.variableName),Label:$.labelName,PropertyName:$.propertyName,PrivatePropertyName:$.special($.propertyName),"CallExpression/MemberExpression/PropertyName":$.function($.propertyName),"FunctionDeclaration/VariableDefinition":$.function($.definition($.variableName)),"ClassDeclaration/VariableDefinition":$.definition($.className),"NewExpression/VariableName":$.className,PropertyDefinition:$.definition($.propertyName),PrivatePropertyDefinition:$.definition($.special($.propertyName)),UpdateOp:$.updateOperator,"LineComment Hashbang":$.lineComment,BlockComment:$.blockComment,Number:$.number,String:$.string,Escape:$.escape,ArithOp:$.arithmeticOperator,LogicOp:$.logicOperator,BitOp:$.bitwiseOperator,CompareOp:$.compareOperator,RegExp:$.regexp,Equals:$.definitionOperator,Arrow:$.function($.punctuation),": Spread":$.punctuation,"( )":$.paren,"[ ]":$.squareBracket,"{ }":$.brace,"InterpolationStart InterpolationEnd":$.special($.brace),".":$.derefOperator,", ;":$.separator,"@":$.meta,TypeName:$.typeName,TypeDefinition:$.definition($.typeName),"type enum interface implements namespace module declare":$.definitionKeyword,"abstract global Privacy readonly override":$.modifier,"is keyof unique infer asserts":$.operatorKeyword,JSXAttributeValue:$.attributeValue,JSXText:$.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":$.angleBracket,"JSXIdentifier JSXNameSpacedName":$.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":$.attributeName,"JSXBuiltin/JSXIdentifier":$.standard($.tagName)}),uY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},dY={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},fY={__proto__:null,"<":193},hY=wg.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Jv'#JvO%[QlO'#JvOOQO'#Jy'#JyOOQO'#Ih'#IhOCQQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J}'#J}OC|Q!0MSO'#EgODWQpO'#EWOOQO'#Jx'#JxODlQpO'#JyOEyQpO'#EWODWQpO'#EgPFWO&2DjO'#CbPOOO)CD})CD}OOOO'#I`'#I`OFcO#tO,59UOOQ!0Lh,59U,59UOOOO'#Ia'#IaOFqO&jO,59UOGPQ!L^O'#DcOOOO'#Ic'#IcOGWO#@ItO,59{OOQ!0Lf,59{,59{OGfQlO'#IdOGyQ`O'#JtOIxQ!fO'#JtO+}QlO'#JtOJPQ`O,5:ROJgQ`O'#EpOJtQ`O'#KTOKPQ`O'#KSOKPQ`O'#KSOKXQ`O,5;^OK^Q`O'#KROOQ!0Ln,5:^,5:^OKeQlO,5:^OMcQ!0MxO,5:fONSQ`O,5:nONmQ!0LrO'#KQONtQ`O'#KPO9eQ`O'#KPO! YQ`O'#KPO! bQ`O,5;]O! gQ`O'#KPO!#lQ!fO'#JsOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$[Q!fO,5:sOOQS'#Jz'#JzOOQO-E<j-E<jO9kQ`O,5=_O!$rQ`O,5=_O!$wQlO,5;ZO!&zQMhO'#EkO!(eQ`O,5;ZO!(jQlO'#DyO!(tQpO,5;dO!(|QpO,5;dO%[QlO,5;dOOQ['#FT'#FTOOQ['#FV'#FVO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eOOQ['#FZ'#FZO!)[QlO,5;tOOQ!0Lf,5;y,5;yOOQ!0Lf,5;z,5;zOOQ!0Lf,5;|,5;|O%[QlO'#IpO!+_Q!0LrO,5<iO%[QlO,5;eO!&zQMhO,5;eO!+|QMhO,5;eO!-nQMhO'#E^O%[QlO,5;wOOQ!0Lf,5;{,5;{O!-uQ,UO'#FjO!.rQ,UO'#KXO!.^Q,UO'#KXO!.yQ,UO'#KXOOQO'#KX'#KXO!/_Q,UO,5<SOOOW,5<`,5<`O!/pQlO'#FvOOOW'#Io'#IoO7VO7dO,5<QO!/wQ,UO'#FxOOQ!0Lf,5<Q,5<QO!0hQ$IUO'#CyOOQ!0Lh'#C}'#C}O!0{O#@ItO'#DRO!1iQMjO,5<eO!1pQ`O,5<hO!3YQ(CWO'#GXO!3jQ`O'#GYO!3oQ`O'#GYO!5_Q(CWO'#G^O!6dQpO'#GbOOQO'#Gn'#GnO!,TQMhO'#GmOOQO'#Gp'#GpO!,TQMhO'#GoO!7VQ$IUO'#JlOOQ!0Lh'#Jl'#JlO!7aQ`O'#JkO!7oQ`O'#JjO!7wQ`O'#CuOOQ!0Lh'#C{'#C{O!8YQ`O'#C}OOQ!0Lh'#DV'#DVOOQ!0Lh'#DX'#DXO!8_Q`O,5<eO1SQ`O'#DZO!,TQMhO'#GPO!,TQMhO'#GRO!8gQ`O'#GTO!8lQ`O'#GUO!3oQ`O'#G[O!,TQMhO'#GaO<]Q`O'#JkO!8qQ`O'#EqO!9`Q`O,5<gOOQ!0Lb'#Cr'#CrO!9hQ`O'#ErO!:bQpO'#EsOOQ!0Lb'#KR'#KRO!:iQ!0LrO'#KaO9uQ!0LrO,5=cO`QlO,5>tOOQ['#Jh'#JhOOQ[,5>u,5>uOOQ[-E<]-E<]O!<hQ!0MxO,5:bO!:]QpO,5:`O!?RQ!0MxO,5:jO%[QlO,5:jO!AiQ!0MxO,5:lOOQO,5@z,5@zO!BYQMhO,5=_O!BhQ!0LrO'#JiO9`Q`O'#JiO!ByQ!0LrO,59ZO!CUQpO,59ZO!C^QMhO,59ZO:dQMhO,59ZO!CiQ`O,5;ZO!CqQ`O'#HbO!DVQ`O'#KdO%[QlO,5;}O!:]QpO,5<PO!D_Q`O,5=zO!DdQ`O,5=zO!DiQ`O,5=zO!DwQ`O,5=zO9uQ!0LrO,5=zO<]Q`O,5=jOOQO'#Cy'#CyO!EOQpO,5=gO!EWQMhO,5=hO!EcQ`O,5=jO!EhQ!bO,5=mO!EpQ`O'#K`O?YQ`O'#HWO9kQ`O'#HYO!EuQ`O'#HYO:dQMhO'#H[O!EzQ`O'#H[OOQ[,5=p,5=pO!FPQ`O'#H]O!FbQ`O'#CoO!FgQ`O,59PO!FqQ`O,59PO!HvQlO,59POOQ[,59P,59PO!IWQ!0LrO,59PO%[QlO,59PO!KcQlO'#HeOOQ['#Hf'#HfOOQ['#Hg'#HgO`QlO,5=}O!KyQ`O,5=}O`QlO,5>TO`QlO,5>VO!LOQ`O,5>XO`QlO,5>ZO!LTQ`O,5>^O!LYQlO,5>dOOQ[,5>j,5>jO%[QlO,5>jO9uQ!0LrO,5>lOOQ[,5>n,5>nO#!dQ`O,5>nOOQ[,5>p,5>pO#!dQ`O,5>pOOQ[,5>r,5>rO##QQpO'#D_O%[QlO'#JvO##sQpO'#JvO##}QpO'#DmO#$`QpO'#DmO#&qQlO'#DmO#&xQ`O'#JuO#'QQ`O,5:WO#'VQ`O'#EtO#'eQ`O'#KUO#'mQ`O,5;_O#'rQpO'#DmO#(PQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#(WQ`O,5:oO?YQ`O,5;YO!CUQpO,5;YO!C^QMhO,5;YO:dQMhO,5;YO#(`Q`O,5@bO#(eQ07dO,5:sOOQO-E<f-E<fO#)kQ!0MSO,5;RODWQpO,5:rO#)uQpO,5:rODWQpO,5;RO!ByQ!0LrO,5:rOOQ!0Lb'#Ej'#EjOOQO,5;R,5;RO%[QlO,5;RO#*SQ!0LrO,5;RO#*_Q!0LrO,5;RO!CUQpO,5:rOOQO,5;X,5;XO#*mQ!0LrO,5;RPOOO'#I^'#I^P#+RO&2DjO,58|POOO,58|,58|OOOO-E<^-E<^OOQ!0Lh1G.p1G.pOOOO-E<_-E<_OOOO,59},59}O#+^Q!bO,59}OOOO-E<a-E<aOOQ!0Lf1G/g1G/gO#+cQ!fO,5?OO+}QlO,5?OOOQO,5?U,5?UO#+mQlO'#IdOOQO-E<b-E<bO#+zQ`O,5@`O#,SQ!fO,5@`O#,ZQ`O,5@nOOQ!0Lf1G/m1G/mO%[QlO,5@oO#,cQ`O'#IjOOQO-E<h-E<hO#,ZQ`O,5@nOOQ!0Lb1G0x1G0xOOQ!0Ln1G/x1G/xOOQ!0Ln1G0Y1G0YO%[QlO,5@lO#,wQ!0LrO,5@lO#-YQ!0LrO,5@lO#-aQ`O,5@kO9eQ`O,5@kO#-iQ`O,5@kO#-wQ`O'#ImO#-aQ`O,5@kOOQ!0Lb1G0w1G0wO!(tQpO,5:uO!)PQpO,5:uOOQS,5:w,5:wO#.iQdO,5:wO#.qQMhO1G2yO9kQ`O1G2yOOQ!0Lf1G0u1G0uO#/PQ!0MxO1G0uO#0UQ!0MvO,5;VOOQ!0Lh'#GW'#GWO#0rQ!0MzO'#JlO!$wQlO1G0uO#2}Q!fO'#JwO%[QlO'#JwO#3XQ`O,5:eOOQ!0Lh'#D_'#D_OOQ!0Lf1G1O1G1OO%[QlO1G1OOOQ!0Lf1G1f1G1fO#3^Q`O1G1OO#5rQ!0MxO1G1PO#5yQ!0MxO1G1PO#8aQ!0MxO1G1PO#8hQ!0MxO1G1PO#;OQ!0MxO1G1PO#=fQ!0MxO1G1PO#=mQ!0MxO1G1PO#=tQ!0MxO1G1PO#@[Q!0MxO1G1PO#@cQ!0MxO1G1PO#BpQ?MtO'#CiO#DkQ?MtO1G1`O#DrQ?MtO'#JsO#EVQ!0MxO,5?[OOQ!0Lb-E<n-E<nO#GdQ!0MxO1G1PO#HaQ!0MzO1G1POOQ!0Lf1G1P1G1PO#IdQMjO'#J|O#InQ`O,5:xO#IsQ!0MxO1G1cO#JgQ,UO,5<WO#JoQ,UO,5<XO#JwQ,UO'#FoO#K`Q`O'#FnOOQO'#KY'#KYOOQO'#In'#InO#KeQ,UO1G1nOOQ!0Lf1G1n1G1nOOOW1G1y1G1yO#KvQ?MtO'#JrO#LQQ`O,5<bO!)[QlO,5<bOOOW-E<m-E<mOOQ!0Lf1G1l1G1lO#LVQpO'#KXOOQ!0Lf,5<d,5<dO#L_QpO,5<dO#LdQMhO'#DTOOOO'#Ib'#IbO#LkO#@ItO,59mOOQ!0Lh,59m,59mO%[QlO1G2PO!8lQ`O'#IrO#LvQ`O,5<zOOQ!0Lh,5<w,5<wO!,TQMhO'#IuO#MdQMjO,5=XO!,TQMhO'#IwO#NVQMjO,5=ZO!&zQMhO,5=]OOQO1G2S1G2SO#NaQ!dO'#CrO#NtQ(CWO'#ErO$ |QpO'#GbO$!dQ!dO,5<sO$!kQ`O'#K[O9eQ`O'#K[O$!yQ`O,5<uO$#aQ!dO'#C{O!,TQMhO,5<tO$#kQ`O'#GZO$$PQ`O,5<tO$$UQ!dO'#GWO$$cQ!dO'#K]O$$mQ`O'#K]O!&zQMhO'#K]O$$rQ`O,5<xO$$wQlO'#JvO$%RQpO'#GcO#$`QpO'#GcO$%dQ`O'#GgO!3oQ`O'#GkO$%iQ!0LrO'#ItO$%tQpO,5<|OOQ!0Lp,5<|,5<|O$%{QpO'#GcO$&YQpO'#GdO$&kQpO'#GdO$&pQMjO,5=XO$'QQMjO,5=ZOOQ!0Lh,5=^,5=^O!,TQMhO,5@VO!,TQMhO,5@VO$'bQ`O'#IyO$'vQ`O,5@UO$(OQ`O,59aOOQ!0Lh,59i,59iO$(TQ`O,5@VO$)TQ$IYO,59uOOQ!0Lh'#Jp'#JpO$)vQMjO,5<kO$*iQMjO,5<mO@zQ`O,5<oOOQ!0Lh,5<p,5<pO$*sQ`O,5<vO$*xQMjO,5<{O$+YQ`O'#KPO!$wQlO1G2RO$+_Q`O1G2RO9eQ`O'#KSO9eQ`O'#EtO%[QlO'#EtO9eQ`O'#I{O$+dQ!0LrO,5@{OOQ[1G2}1G2}OOQ[1G4`1G4`OOQ!0Lf1G/|1G/|OOQ!0Lf1G/z1G/zO$-fQ!0MxO1G0UOOQ[1G2y1G2yO!&zQMhO1G2yO%[QlO1G2yO#.tQ`O1G2yO$/jQMhO'#EkOOQ!0Lb,5@T,5@TO$/wQ!0LrO,5@TOOQ[1G.u1G.uO!ByQ!0LrO1G.uO!CUQpO1G.uO!C^QMhO1G.uO$0YQ`O1G0uO$0_Q`O'#CiO$0jQ`O'#KeO$0rQ`O,5=|O$0wQ`O'#KeO$0|Q`O'#KeO$1[Q`O'#JRO$1jQ`O,5AOO$1rQ!fO1G1iOOQ!0Lf1G1k1G1kO9kQ`O1G3fO@zQ`O1G3fO$1yQ`O1G3fO$2OQ`O1G3fO!DiQ`O1G3fO9uQ!0LrO1G3fOOQ[1G3f1G3fO!EcQ`O1G3UO!&zQMhO1G3RO$2TQ`O1G3ROOQ[1G3S1G3SO!&zQMhO1G3SO$2YQ`O1G3SO$2bQpO'#HQOOQ[1G3U1G3UO!6_QpO'#I}O!EhQ!bO1G3XOOQ[1G3X1G3XOOQ[,5=r,5=rO$2jQMhO,5=tO9kQ`O,5=tO$%dQ`O,5=vO9`Q`O,5=vO!CUQpO,5=vO!C^QMhO,5=vO:dQMhO,5=vO$2xQ`O'#KcO$3TQ`O,5=wOOQ[1G.k1G.kO$3YQ!0LrO1G.kO@zQ`O1G.kO$3eQ`O1G.kO9uQ!0LrO1G.kO$5mQ!fO,5AQO$5zQ`O,5AQO9eQ`O,5AQO$6VQlO,5>PO$6^Q`O,5>POOQ[1G3i1G3iO`QlO1G3iOOQ[1G3o1G3oOOQ[1G3q1G3qO?TQ`O1G3sO$6cQlO1G3uO$:gQlO'#HtOOQ[1G3x1G3xO$:tQ`O'#HzO?YQ`O'#H|OOQ[1G4O1G4OO$:|QlO1G4OO9uQ!0LrO1G4UOOQ[1G4W1G4WOOQ!0Lb'#G_'#G_O9uQ!0LrO1G4YO9uQ!0LrO1G4[O$?TQ`O,5@bO!)[QlO,5;`O9eQ`O,5;`O?YQ`O,5:XO!)[QlO,5:XO!CUQpO,5:XO$?YQ?MtO,5:XOOQO,5;`,5;`O$?dQpO'#IeO$?zQ`O,5@aOOQ!0Lf1G/r1G/rO$@SQpO'#IkO$@^Q`O,5@pOOQ!0Lb1G0y1G0yO#$`QpO,5:XOOQO'#Ig'#IgO$@fQpO,5:qOOQ!0Ln,5:q,5:qO#(ZQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO?YQ`O1G0tO!CUQpO1G0tO!C^QMhO1G0tOOQ!0Lb1G5|1G5|O!ByQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$@mQ!0LrO1G0mO$@xQ!0LrO1G0mO!CUQpO1G0^ODWQpO1G0^O$AWQ!0LrO1G0mOOQO1G0^1G0^O$AlQ!0MxO1G0mPOOO-E<[-E<[POOO1G.h1G.hOOOO1G/i1G/iO$AvQ!bO,5<iO$BOQ!fO1G4jOOQO1G4p1G4pO%[QlO,5?OO$BYQ`O1G5zO$BbQ`O1G6YO$BjQ!fO1G6ZO9eQ`O,5?UO$BtQ!0MxO1G6WO%[QlO1G6WO$CUQ!0LrO1G6WO$CgQ`O1G6VO$CgQ`O1G6VO9eQ`O1G6VO$CoQ`O,5?XO9eQ`O,5?XOOQO,5?X,5?XO$DTQ`O,5?XO$+YQ`O,5?XOOQO-E<k-E<kOOQS1G0a1G0aOOQS1G0c1G0cO#.lQ`O1G0cOOQ[7+(e7+(eO!&zQMhO7+(eO%[QlO7+(eO$DcQ`O7+(eO$DnQMhO7+(eO$D|Q!0MzO,5=XO$GXQ!0MzO,5=ZO$IdQ!0MzO,5=XO$KuQ!0MzO,5=ZO$NWQ!0MzO,59uO%!]Q!0MzO,5<kO%$hQ!0MzO,5<mO%&sQ!0MzO,5<{OOQ!0Lf7+&a7+&aO%)UQ!0MxO7+&aO%)xQlO'#IfO%*VQ`O,5@cO%*_Q!fO,5@cOOQ!0Lf1G0P1G0PO%*iQ`O7+&jOOQ!0Lf7+&j7+&jO%*nQ?MtO,5:fO%[QlO7+&zO%*xQ?MtO,5:bO%+VQ?MtO,5:jO%+aQ?MtO,5:lO%+kQMhO'#IiO%+uQ`O,5@hOOQ!0Lh1G0d1G0dOOQO1G1r1G1rOOQO1G1s1G1sO%+}Q!jO,5<ZO!)[QlO,5<YOOQO-E<l-E<lOOQ!0Lf7+'Y7+'YOOOW7+'e7+'eOOOW1G1|1G1|O%,YQ`O1G1|OOQ!0Lf1G2O1G2OOOOO,59o,59oO%,_Q!dO,59oOOOO-E<`-E<`OOQ!0Lh1G/X1G/XO%,fQ!0MxO7+'kOOQ!0Lh,5?^,5?^O%-YQMhO1G2fP%-aQ`O'#IrPOQ!0Lh-E<p-E<pO%-}QMjO,5?aOOQ!0Lh-E<s-E<sO%.pQMjO,5?cOOQ!0Lh-E<u-E<uO%.zQ!dO1G2wO%/RQ!dO'#CrO%/iQMhO'#KSO$$wQlO'#JvOOQ!0Lh1G2_1G2_O%/sQ`O'#IqO%0[Q`O,5@vO%0[Q`O,5@vO%0dQ`O,5@vO%0oQ`O,5@vOOQO1G2a1G2aO%0}QMjO1G2`O$+YQ`O'#K[O!,TQMhO1G2`O%1_Q(CWO'#IsO%1lQ`O,5@wO!&zQMhO,5@wO%1tQ!dO,5@wOOQ!0Lh1G2d1G2dO%4UQ!fO'#CiO%4`Q`O,5=POOQ!0Lb,5<},5<}O%4hQpO,5<}OOQ!0Lb,5=O,5=OOCwQ`O,5<}O%4sQpO,5<}OOQ!0Lb,5=R,5=RO$+YQ`O,5=VOOQO,5?`,5?`OOQO-E<r-E<rOOQ!0Lp1G2h1G2hO#$`QpO,5<}O$$wQlO,5=PO%5RQ`O,5=OO%5^QpO,5=OO!,TQMhO'#IuO%6WQMjO1G2sO!,TQMhO'#IwO%6yQMjO1G2uO%7TQMjO1G5qO%7_QMjO1G5qOOQO,5?e,5?eOOQO-E<w-E<wOOQO1G.{1G.{O!,TQMhO1G5qO!,TQMhO1G5qO!:]QpO,59wO%[QlO,59wOOQ!0Lh,5<j,5<jO%7lQ`O1G2ZO!,TQMhO1G2bO%7qQ!0MxO7+'mOOQ!0Lf7+'m7+'mO!$wQlO7+'mO%8eQ`O,5;`OOQ!0Lb,5?g,5?gOOQ!0Lb-E<y-E<yO%8jQ!dO'#K^O#(ZQ`O7+(eO4UQ!fO7+(eO$DfQ`O7+(eO%8tQ!0MvO'#CiO%9XQ!0MvO,5=SO%9lQ`O,5=SO%9tQ`O,5=SOOQ!0Lb1G5o1G5oOOQ[7+$a7+$aO!ByQ!0LrO7+$aO!CUQpO7+$aO!$wQlO7+&aO%9yQ`O'#JQO%:bQ`O,5APOOQO1G3h1G3hO9kQ`O,5APO%:bQ`O,5APO%:jQ`O,5APOOQO,5?m,5?mOOQO-E=P-E=POOQ!0Lf7+'T7+'TO%:oQ`O7+)QO9uQ!0LrO7+)QO9kQ`O7+)QO@zQ`O7+)QO%:tQ`O7+)QOOQ[7+)Q7+)QOOQ[7+(p7+(pO%:yQ!0MvO7+(mO!&zQMhO7+(mO!E^Q`O7+(nOOQ[7+(n7+(nO!&zQMhO7+(nO%;TQ`O'#KbO%;`Q`O,5=lOOQO,5?i,5?iOOQO-E<{-E<{OOQ[7+(s7+(sO%<rQpO'#HZOOQ[1G3`1G3`O!&zQMhO1G3`O%[QlO1G3`O%<yQ`O1G3`O%=UQMhO1G3`O9uQ!0LrO1G3bO$%dQ`O1G3bO9`Q`O1G3bO!CUQpO1G3bO!C^QMhO1G3bO%=dQ`O'#JPO%=xQ`O,5@}O%>QQpO,5@}OOQ!0Lb1G3c1G3cOOQ[7+$V7+$VO@zQ`O7+$VO9uQ!0LrO7+$VO%>]Q`O7+$VO%[QlO1G6lO%[QlO1G6mO%>bQ!0LrO1G6lO%>lQlO1G3kO%>sQ`O1G3kO%>xQlO1G3kOOQ[7+)T7+)TO9uQ!0LrO7+)_O`QlO7+)aOOQ['#Kh'#KhOOQ['#JS'#JSO%?PQlO,5>`OOQ[,5>`,5>`O%[QlO'#HuO%?^Q`O'#HwOOQ[,5>f,5>fO9eQ`O,5>fOOQ[,5>h,5>hOOQ[7+)j7+)jOOQ[7+)p7+)pOOQ[7+)t7+)tOOQ[7+)v7+)vO%?cQpO1G5|O%?}Q?MtO1G0zO%@XQ`O1G0zOOQO1G/s1G/sO%@dQ?MtO1G/sO?YQ`O1G/sO!)[QlO'#DmOOQO,5?P,5?POOQO-E<c-E<cOOQO,5?V,5?VOOQO-E<i-E<iO!CUQpO1G/sOOQO-E<e-E<eOOQ!0Ln1G0]1G0]OOQ!0Lf7+%u7+%uO#(ZQ`O7+%uOOQ!0Lf7+&`7+&`O?YQ`O7+&`O!CUQpO7+&`OOQO7+%x7+%xO$AlQ!0MxO7+&XOOQO7+&X7+&XO%[QlO7+&XO%@nQ!0LrO7+&XO!ByQ!0LrO7+%xO!CUQpO7+%xO%@yQ!0LrO7+&XO%AXQ!0MxO7++rO%[QlO7++rO%AiQ`O7++qO%AiQ`O7++qOOQO1G4s1G4sO9eQ`O1G4sO%AqQ`O1G4sOOQS7+%}7+%}O#(ZQ`O<<LPO4UQ!fO<<LPO%BPQ`O<<LPOOQ[<<LP<<LPO!&zQMhO<<LPO%[QlO<<LPO%BXQ`O<<LPO%BdQ!0MzO,5?aO%DoQ!0MzO,5?cO%FzQ!0MzO1G2`O%I]Q!0MzO1G2sO%KhQ!0MzO1G2uO%MsQ!fO,5?QO%[QlO,5?QOOQO-E<d-E<dO%M}Q`O1G5}OOQ!0Lf<<JU<<JUO%NVQ?MtO1G0uO&!^Q?MtO1G1PO&!eQ?MtO1G1PO&$fQ?MtO1G1PO&$mQ?MtO1G1PO&&nQ?MtO1G1PO&(oQ?MtO1G1PO&(vQ?MtO1G1PO&(}Q?MtO1G1PO&+OQ?MtO1G1PO&+VQ?MtO1G1PO&+^Q!0MxO<<JfO&-UQ?MtO1G1PO&.RQ?MvO1G1PO&/UQ?MvO'#JlO&1[Q?MtO1G1cO&1iQ?MtO1G0UO&1sQMjO,5?TOOQO-E<g-E<gO!)[QlO'#FqOOQO'#KZ'#KZOOQO1G1u1G1uO&1}Q`O1G1tO&2SQ?MtO,5?[OOOW7+'h7+'hOOOO1G/Z1G/ZO&2^Q!dO1G4xOOQ!0Lh7+(Q7+(QP!&zQMhO,5?^O!,TQMhO7+(cO&2eQ`O,5?]O9eQ`O,5?]O$+YQ`O,5?]OOQO-E<o-E<oO&2sQ`O1G6bO&2sQ`O1G6bO&2{Q`O1G6bO&3WQMjO7+'zO&3hQ!dO,5?_O&3rQ`O,5?_O!&zQMhO,5?_OOQO-E<q-E<qO&3wQ!dO1G6cO&4RQ`O1G6cO&4ZQ`O1G2kO!&zQMhO1G2kOOQ!0Lb1G2i1G2iOOQ!0Lb1G2j1G2jO%4hQpO1G2iO!CUQpO1G2iOCwQ`O1G2iOOQ!0Lb1G2q1G2qO&4`QpO1G2iO&4nQ`O1G2kO$+YQ`O1G2jOCwQ`O1G2jO$$wQlO1G2kO&4vQ`O1G2jO&5jQMjO,5?aOOQ!0Lh-E<t-E<tO&6]QMjO,5?cOOQ!0Lh-E<v-E<vO!,TQMhO7++]O&6gQMjO7++]O&6qQMjO7++]OOQ!0Lh1G/c1G/cO&7OQ`O1G/cOOQ!0Lh7+'u7+'uO&7TQMjO7+'|O&7eQ!0MxO<<KXOOQ!0Lf<<KX<<KXO&8XQ`O1G0zO!&zQMhO'#IzO&8^Q`O,5@xO&:`Q!fO<<LPO!&zQMhO1G2nO&:gQ!0LrO1G2nOOQ[<<G{<<G{O!ByQ!0LrO<<G{O&:xQ!0MxO<<I{OOQ!0Lf<<I{<<I{OOQO,5?l,5?lO&;lQ`O,5?lO&;qQ`O,5?lOOQO-E=O-E=OO&<PQ`O1G6kO&<PQ`O1G6kO9kQ`O1G6kO@zQ`O<<LlOOQ[<<Ll<<LlO&<XQ`O<<LlO9uQ!0LrO<<LlO9kQ`O<<LlOOQ[<<LX<<LXO%:yQ!0MvO<<LXOOQ[<<LY<<LYO!E^Q`O<<LYO&<^QpO'#I|O&<iQ`O,5@|O!)[QlO,5@|OOQ[1G3W1G3WOOQO'#JO'#JOO9uQ!0LrO'#JOO&<qQpO,5=uOOQ[,5=u,5=uO&<xQpO'#EgO&=PQpO'#GeO&=UQ`O7+(zO&=ZQ`O7+(zOOQ[7+(z7+(zO!&zQMhO7+(zO%[QlO7+(zO&=cQ`O7+(zOOQ[7+(|7+(|O9uQ!0LrO7+(|O$%dQ`O7+(|O9`Q`O7+(|O!CUQpO7+(|O&=nQ`O,5?kOOQO-E<}-E<}OOQO'#H^'#H^O&=yQ`O1G6iO9uQ!0LrO<<GqOOQ[<<Gq<<GqO@zQ`O<<GqO&>RQ`O7+,WO&>WQ`O7+,XO%[QlO7+,WO%[QlO7+,XOOQ[7+)V7+)VO&>]Q`O7+)VO&>bQlO7+)VO&>iQ`O7+)VOOQ[<<Ly<<LyOOQ[<<L{<<L{OOQ[-E=Q-E=QOOQ[1G3z1G3zO&>nQ`O,5>aOOQ[,5>c,5>cO&>sQ`O1G4QO9eQ`O7+&fO!)[QlO7+&fOOQO7+%_7+%_O&>xQ?MtO1G6ZO?YQ`O7+%_OOQ!0Lf<<Ia<<IaOOQ!0Lf<<Iz<<IzO?YQ`O<<IzOOQO<<Is<<IsO$AlQ!0MxO<<IsO%[QlO<<IsOOQO<<Id<<IdO!ByQ!0LrO<<IdO&?SQ!0LrO<<IsO&?_Q!0MxO<= ^O&?oQ`O<= ]OOQO7+*_7+*_O9eQ`O7+*_OOQ[ANAkANAkO&?wQ!fOANAkO!&zQMhOANAkO#(ZQ`OANAkO4UQ!fOANAkO&@OQ`OANAkO%[QlOANAkO&@WQ!0MzO7+'zO&BiQ!0MzO,5?aO&DtQ!0MzO,5?cO&GPQ!0MzO7+'|O&IbQ!fO1G4lO&IlQ?MtO7+&aO&KpQ?MvO,5=XO&MwQ?MvO,5=ZO&NXQ?MvO,5=XO&NiQ?MvO,5=ZO&NyQ?MvO,59uO'#PQ?MvO,5<kO'%SQ?MvO,5<mO''hQ?MvO,5<{O')^Q?MtO7+'kO')kQ?MtO7+'mO')xQ`O,5<]OOQO7+'`7+'`OOQ!0Lh7+*d7+*dO')}QMjO<<K}OOQO1G4w1G4wO'*UQ`O1G4wO'*aQ`O1G4wO'*oQ`O7++|O'*oQ`O7++|O!&zQMhO1G4yO'*wQ!dO1G4yO'+RQ`O7++}O'+ZQ`O7+(VO'+fQ!dO7+(VOOQ!0Lb7+(T7+(TOOQ!0Lb7+(U7+(UO!CUQpO7+(TOCwQ`O7+(TO'+pQ`O7+(VO!&zQMhO7+(VO$+YQ`O7+(UO'+uQ`O7+(VOCwQ`O7+(UO'+}QMjO<<NwO!,TQMhO<<NwOOQ!0Lh7+$}7+$}O',XQ!dO,5?fOOQO-E<x-E<xO',cQ!0MvO7+(YO!&zQMhO7+(YOOQ[AN=gAN=gO9kQ`O1G5WOOQO1G5W1G5WO',sQ`O1G5WO',xQ`O7+,VO',xQ`O7+,VO9uQ!0LrOANBWO@zQ`OANBWOOQ[ANBWANBWO'-QQ`OANBWOOQ[ANAsANAsOOQ[ANAtANAtO'-VQ`O,5?hOOQO-E<z-E<zO'-bQ?MtO1G6hOOQO,5?j,5?jOOQO-E<|-E<|OOQ[1G3a1G3aO'-lQ`O,5=POOQ[<<Lf<<LfO!&zQMhO<<LfO&=UQ`O<<LfO'-qQ`O<<LfO%[QlO<<LfOOQ[<<Lh<<LhO9uQ!0LrO<<LhO$%dQ`O<<LhO9`Q`O<<LhO'-yQpO1G5VO'.UQ`O7+,TOOQ[AN=]AN=]O9uQ!0LrOAN=]OOQ[<= r<= rOOQ[<= s<= sO'.^Q`O<= rO'.cQ`O<= sOOQ[<<Lq<<LqO'.hQ`O<<LqO'.mQlO<<LqOOQ[1G3{1G3{O?YQ`O7+)lO'.tQ`O<<JQO'/PQ?MtO<<JQOOQO<<Hy<<HyOOQ!0LfAN?fAN?fOOQOAN?_AN?_O$AlQ!0MxOAN?_OOQOAN?OAN?OO%[QlOAN?_OOQO<<My<<MyOOQ[G27VG27VO!&zQMhOG27VO#(ZQ`OG27VO'/ZQ!fOG27VO4UQ!fOG27VO'/bQ`OG27VO'/jQ?MtO<<JfO'/wQ?MvO1G2`O'1mQ?MvO,5?aO'3pQ?MvO,5?cO'5sQ?MvO1G2sO'7vQ?MvO1G2uO'9yQ?MtO<<KXO':WQ?MtO<<I{OOQO1G1w1G1wO!,TQMhOANAiOOQO7+*c7+*cO':eQ`O7+*cO':pQ`O<= hO':xQ!dO7+*eOOQ!0Lb<<Kq<<KqO$+YQ`O<<KqOCwQ`O<<KqO';SQ`O<<KqO!&zQMhO<<KqOOQ!0Lb<<Ko<<KoO!CUQpO<<KoO';_Q!dO<<KqOOQ!0Lb<<Kp<<KpO';iQ`O<<KqO!&zQMhO<<KqO$+YQ`O<<KpO';nQMjOANDcO';xQ!0MvO<<KtOOQO7+*r7+*rO9kQ`O7+*rO'<YQ`O<= qOOQ[G27rG27rO9uQ!0LrOG27rO@zQ`OG27rO!)[QlO1G5SO'<bQ`O7+,SO'<jQ`O1G2kO&=UQ`OANBQOOQ[ANBQANBQO!&zQMhOANBQO'<oQ`OANBQOOQ[ANBSANBSO9uQ!0LrOANBSO$%dQ`OANBSOOQO'#H_'#H_OOQO7+*q7+*qOOQ[G22wG22wOOQ[ANE^ANE^OOQ[ANE_ANE_OOQ[ANB]ANB]O'<wQ`OANB]OOQ[<<MW<<MWO!)[QlOAN?lOOQOG24yG24yO$AlQ!0MxOG24yO#(ZQ`OLD,qOOQ[LD,qLD,qO!&zQMhOLD,qO'<|Q!fOLD,qO'=TQ?MvO7+'zO'>yQ?MvO,5?aO'@|Q?MvO,5?cO'CPQ?MvO7+'|O'DuQMjOG27TOOQO<<M}<<M}OOQ!0LbANA]ANA]O$+YQ`OANA]OCwQ`OANA]O'EVQ!dOANA]OOQ!0LbANAZANAZO'E^Q`OANA]O!&zQMhOANA]O'EiQ!dOANA]OOQ!0LbANA[ANA[OOQO<<N^<<N^OOQ[LD-^LD-^O9uQ!0LrOLD-^O'EsQ?MtO7+*nOOQO'#Gf'#GfOOQ[G27lG27lO&=UQ`OG27lO!&zQMhOG27lOOQ[G27nG27nO9uQ!0LrOG27nOOQ[G27wG27wO'E}Q?MtOG25WOOQOLD*eLD*eOOQ[!$(!]!$(!]O#(ZQ`O!$(!]O!&zQMhO!$(!]O'FXQ!0MzOG27TOOQ!0LbG26wG26wO$+YQ`OG26wO'HjQ`OG26wOCwQ`OG26wO'HuQ!dOG26wO!&zQMhOG26wOOQ[!$(!x!$(!xOOQ[LD-WLD-WO&=UQ`OLD-WOOQ[LD-YLD-YOOQ[!)9Ew!)9EwO#(ZQ`O!)9EwOOQ!0LbLD,cLD,cO$+YQ`OLD,cOCwQ`OLD,cO'H|Q`OLD,cO'IXQ!dOLD,cOOQ[!$(!r!$(!rOOQ[!.K;c!.K;cO'I`Q?MvOG27TOOQ!0Lb!$( }!$( }O$+YQ`O!$( }OCwQ`O!$( }O'KUQ`O!$( }OOQ!0Lb!)9Ei!)9EiO$+YQ`O!)9EiOCwQ`O!)9EiOOQ!0Lb!.K;T!.K;TO$+YQ`O!.K;TOOQ!0Lb!4/0o!4/0oO!)[QlO'#DzO1PQ`O'#EXO'KaQ!fO'#JrO'KhQ!L^O'#DvO'KoQlO'#EOO'KvQ!fO'#CiO'N^Q!fO'#CiO!)[QlO'#EQO'NnQlO,5;ZO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO'#IpO(!qQ`O,5<iO!)[QlO,5;eO(!yQMhO,5;eO($dQMhO,5;eO!)[QlO,5;wO!&zQMhO'#GmO(!yQMhO'#GmO!&zQMhO'#GoO(!yQMhO'#GoO1SQ`O'#DZO1SQ`O'#DZO!&zQMhO'#GPO(!yQMhO'#GPO!&zQMhO'#GRO(!yQMhO'#GRO!&zQMhO'#GaO(!yQMhO'#GaO!)[QlO,5:jO($kQpO'#D_O($uQpO'#JvO!)[QlO,5@oO'NnQlO1G0uO(%PQ?MtO'#CiO!)[QlO1G2PO!&zQMhO'#IuO(!yQMhO'#IuO!&zQMhO'#IwO(!yQMhO'#IwO(%ZQ!dO'#CrO!&zQMhO,5<tO(!yQMhO,5<tO'NnQlO1G2RO!)[QlO7+&zO!&zQMhO1G2`O(!yQMhO1G2`O!&zQMhO'#IuO(!yQMhO'#IuO!&zQMhO'#IwO(!yQMhO'#IwO!&zQMhO1G2bO(!yQMhO1G2bO'NnQlO7+'mO'NnQlO7+&aO!&zQMhOANAiO(!yQMhOANAiO(%nQ`O'#EoO(%sQ`O'#EoO(%{Q`O'#F]O(&QQ`O'#EyO(&VQ`O'#KTO(&bQ`O'#KRO(&mQ`O,5;ZO(&rQMjO,5<eO(&yQ`O'#GYO('OQ`O'#GYO('TQ`O,5<eO(']Q`O,5<gO('eQ`O,5;ZO('mQ?MtO1G1`O('tQ`O,5<tO('yQ`O,5<tO((OQ`O,5<vO((TQ`O,5<vO((YQ`O1G2RO((_Q`O1G0uO((dQMjO<<K}O((kQMjO<<K}O((rQMhO'#F|O9`Q`O'#F{OAuQ`O'#EnO!)[QlO,5;tO!3oQ`O'#GYO!3oQ`O'#GYO!3oQ`O'#G[O!3oQ`O'#G[O!,TQMhO7+(cO!,TQMhO7+(cO%.zQ!dO1G2wO%.zQ!dO1G2wO!&zQMhO,5=]O!&zQMhO,5=]",stateData:"()x~O'|OS'}OSTOS(ORQ~OPYOQYOSfOY!VOaqOdzOeyOl!POpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_XO!iuO!lZO!oYO!pYO!qYO!svO!uwO!xxO!|]O$W|O$niO%h}O%j!QO%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO%y!UO&W!WO&^!XO&`!YO&b!ZO&d![O&g!]O&m!^O&s!_O&u!`O&w!aO&y!bO&{!cO(TSO(VTO(YUO(aVO(o[O~OWtO~P`OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oa!wOs!nO!S!oO!b!yO!c!vO!d!vO!|<VO#T!pO#U!pO#V!xO#W!pO#X!pO#[!zO#]!zO(U!lO(VTO(YUO(e!mO(o!sO~O(O!{O~OP]XR]X[]Xa]Xj]Xr]X!Q]X!S]X!]]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X'z]X(a]X(r]X(y]X(z]X~O!g%RX~P(qO_!}O(V#PO(W!}O(X#PO~O_#QO(X#PO(Y#PO(Z#QO~Ox#SO!U#TO(b#TO(c#VO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T<ZO(VTO(YUO(aVO(o[O~O![#ZO!]#WO!Y(hP!Y(vP~P+}O!^#cO~P`OPYOQYOSfOd!jOe!iOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(VTO(YUO(aVO(o[O~Op#mO![#iO!|]O#i#lO#j#iO(T<[O!k(sP~P.iO!l#oO(T#nO~O!x#sO!|]O%h#tO~O#k#uO~O!g#vO#k#uO~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!]$_O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~Oa(fX'z(fX'w(fX!k(fX!Y(fX!_(fX%i(fX!g(fX~P1qO#S$dO#`$eO$Q$eOP(gXR(gX[(gXj(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX!_(gX%i(gX~Oa(gX'z(gX'w(gX!Y(gX!k(gXv(gX!g(gX~P4UO#`$eO~O$]$hO$_$gO$f$mO~OSfO!_$nO$i$oO$k$qO~Oh%VOj%dOk%dOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T$sO(VTO(YUO(a$uO(y$}O(z%POg(^P~Ol%[O~P7eO!l%eO~O!S%hO!_%iO(T%gO~O!g%mO~Oa%nO'z%nO~O!Q%rO~P%[O(U!lO~P%[O%n%vO~P%[Oh%VO!l%eO(T%gO(U!lO~Oe%}O!l%eO(T%gO~Oj$RO~O!_&PO(T%gO(U!lO(VTO(YUO`)WP~O!Q&SO!l&RO%j&VO&T&WO~P;SO!x#sO~O%s&YO!S)SX!_)SX(T)SX~O(T&ZO~Ol!PO!u&`O%j!QO%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO~Od&eOe&dO!x&bO%h&cO%{&aO~P<bOd&hOeyOl!PO!_&gO!u&`O!xxO!|]O%h}O%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO%y!UO~Ob&kO#`&nO%j&iO(U!lO~P=gO!l&oO!u&sO~O!l#oO~O!_XO~Oa%nO'x&{O'z%nO~Oa%nO'x'OO'z%nO~Oa%nO'x'QO'z%nO~O'w]X!Y]Xv]X!k]X&[]X!_]X%i]X!g]X~P(qO!b'_O!c'WO!d'WO(U!lO(VTO(YUO~Os'UO!S'TO!['XO(e'SO!^(iP!^(xP~P@nOn'bO!_'`O(T%gO~Oe'gO!l%eO(T%gO~O!Q&SO!l&RO~Os!nO!S!oO!|<VO#T!pO#U!pO#W!pO#X!pO(U!lO(VTO(YUO(e!mO(o!sO~O!b'mO!c'lO!d'lO#V!pO#['nO#]'nO~PBYOa%nOh%VO!g#vO!l%eO'z%nO(r'pO~O!p'tO#`'rO~PChOs!nO!S!oO(VTO(YUO(e!mO(o!sO~O!_XOs(mX!S(mX!b(mX!c(mX!d(mX!|(mX#T(mX#U(mX#V(mX#W(mX#X(mX#[(mX#](mX(U(mX(V(mX(Y(mX(e(mX(o(mX~O!c'lO!d'lO(U!lO~PDWO(P'xO(Q'xO(R'zO~O_!}O(V'|O(W!}O(X'|O~O_#QO(X'|O(Y'|O(Z#QO~Ov(OO~P%[Ox#SO!U#TO(b#TO(c(RO~O![(TO!Y'WX!Y'^X!]'WX!]'^X~P+}O!](VO!Y(hX~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!](VO!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~O!Y(hX~PHRO!Y([O~O!Y(uX!](uX!g(uX!k(uX(r(uX~O#`(uX#k#dX!^(uX~PJUO#`(]O!Y(wX!](wX~O!](^O!Y(vX~O!Y(aO~O#`$eO~PJUO!^(bO~P`OR#zO!Q#yO!S#{O!l#xO(aVOP!na[!naj!nar!na!]!na!p!na#R!na#n!na#o!na#p!na#q!na#r!na#s!na#t!na#u!na#v!na#x!na#z!na#{!na(r!na(y!na(z!na~Oa!na'z!na'w!na!Y!na!k!nav!na!_!na%i!na!g!na~PKlO!k(cO~O!g#vO#`(dO(r'pO!](tXa(tX'z(tX~O!k(tX~PNXO!S%hO!_%iO!|]O#i(iO#j(hO(T%gO~O!](jO!k(sX~O!k(lO~O!S%hO!_%iO#j(hO(T%gO~OP(gXR(gX[(gXj(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX~O!g#vO!k(gX~P! uOR(nO!Q(mO!l#xO#S$dO!|!{a!S!{a~O!x!{a%h!{a!_!{a#i!{a#j!{a(T!{a~P!#vO!x(rO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_XO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<sO!S${O!_$|O!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~O#k(xO~O![(zO!k(kP~P%[O(e(|O(o[O~O!S)OO!l#xO(e(|O(o[O~OP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_!eO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(T)]O(VTO(YUO(aVO(o[O~O!]$_Oa$qa'z$qa'w$qa!k$qa!Y$qa!_$qa%i$qa!g$qa~Ol)dO~P!&zOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Og(pP~P!,TO!Q)iO!g)hO!_$^X$Z$^X$]$^X$_$^X$f$^X~O!g)hO!_({X$Z({X$]({X$_({X$f({X~O!Q)iO~P!.^O!Q)iO!_({X$Z({X$]({X$_({X$f({X~O!_)kO$Z)oO$])jO$_)jO$f)pO~O![)sO~P!)[O$]$hO$_$gO$f)wO~On$zX!Q$zX#S$zX'y$zX(y$zX(z$zX~OgmXg$zXnmX!]mX#`mX~P!0SOx)yO(b)zO(c)|O~On*VO!Q*OO'y*PO(y$}O(z%PO~Og)}O~P!1WOg*WO~Oh%VOr%XOs$tOt$tOz%YO|%ZO!O<sO!S*YO!_*ZO!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(VTO(YUO(a$uO(y$}O(z%PO~Op*`O![*^O(T*XO!k)OP~P!1uO#k*aO~O!l*bO~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<sO!S${O!_$|O!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(T*dO(VTO(YUO(a$uO(y$}O(z%PO~O![*gO!Y)PP~P!3tOr*sOs!nO!S*iO!b*qO!c*kO!d*kO!l*bO#[*rO%`*mO(U!lO(VTO(YUO(e!mO~O!^*pO~P!5iO#S$dOn(`X!Q(`X'y(`X(y(`X(z(`X!](`X#`(`X~Og(`X$O(`X~P!6kOn*xO#`*wOg(_X!](_X~O!]*yOg(^X~Oj%dOk%dOl%dO(T&ZOg(^P~Os*|O~Og)}O(T&ZO~O!l+SO~O(T(vO~Op+WO!S%hO![#iO!_%iO!|]O#i#lO#j#iO(T%gO!k(sP~O!g#vO#k+XO~O!S%hO![+ZO!](^O!_%iO(T%gO!Y(vP~Os'[O!S+]O![+[O(VTO(YUO(e(|O~O!^(xP~P!9|O!]+^Oa)TX'z)TX~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~Oa!ja!]!ja'z!ja'w!ja!Y!ja!k!jav!ja!_!ja%i!ja!g!ja~P!:tOR#zO!Q#yO!S#{O!l#xO(aVOP!ra[!raj!rar!ra!]!ra!p!ra#R!ra#n!ra#o!ra#p!ra#q!ra#r!ra#s!ra#t!ra#u!ra#v!ra#x!ra#z!ra#{!ra(r!ra(y!ra(z!ra~Oa!ra'z!ra'w!ra!Y!ra!k!rav!ra!_!ra%i!ra!g!ra~P!=[OR#zO!Q#yO!S#{O!l#xO(aVOP!ta[!taj!tar!ta!]!ta!p!ta#R!ta#n!ta#o!ta#p!ta#q!ta#r!ta#s!ta#t!ta#u!ta#v!ta#x!ta#z!ta#{!ta(r!ta(y!ta(z!ta~Oa!ta'z!ta'w!ta!Y!ta!k!tav!ta!_!ta%i!ta!g!ta~P!?rOh%VOn+gO!_'`O%i+fO~O!g+iOa(]X!_(]X'z(]X!](]X~Oa%nO!_XO'z%nO~Oh%VO!l%eO~Oh%VO!l%eO(T%gO~O!g#vO#k(xO~Ob+tO%j+uO(T+qO(VTO(YUO!^)XP~O!]+vO`)WX~O[+zO~O`+{O~O!_&PO(T%gO(U!lO`)WP~O%j,OO~P;SOh%VO#`,SO~Oh%VOn,VO!_$|O~O!_,XO~O!Q,ZO!_XO~O%n%vO~O!x,`O~Oe,eO~Ob,fO(T#nO(VTO(YUO!^)VP~Oe%}O~O%j!QO(T&ZO~P=gO[,kO`,jO~OPYOQYOSfOdzOeyOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!iuO!lZO!oYO!pYO!qYO!svO!xxO!|]O$niO%h}O(VTO(YUO(aVO(o[O~O!_!eO!u!gO$W!kO(T!dO~P!FyO`,jOa%nO'z%nO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oa,pOl!OO!uwO%l!OO%m!OO%n!OO~P!IcO!l&oO~O&^,vO~O!_,xO~O&o,zO&q,{OP&laQ&laS&laY&laa&lad&lae&lal&lap&lar&las&lat&laz&la|&la!O&la!S&la!W&la!X&la!_&la!i&la!l&la!o&la!p&la!q&la!s&la!u&la!x&la!|&la$W&la$n&la%h&la%j&la%l&la%m&la%n&la%q&la%s&la%v&la%w&la%y&la&W&la&^&la&`&la&b&la&d&la&g&la&m&la&s&la&u&la&w&la&y&la&{&la'w&la(T&la(V&la(Y&la(a&la(o&la!^&la&e&lab&la&j&la~O(T-QO~Oh!eX!]!RX!^!RX!g!RX!g!eX!l!eX#`!RX~O!]!eX!^!eX~P#!iO!g-VO#`-UOh(jX!]#hX!^#hX!g(jX!l(jX~O!](jX!^(jX~P##[Oh%VO!g-XO!l%eO!]!aX!^!aX~Os!nO!S!oO(VTO(YUO(e!mO~OP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_!eO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(VTO(YUO(aVO(o[O~O(T=QO~P#$qO!]-]O!^(iX~O!^-_O~O!g-VO#`-UO!]#hX!^#hX~O!]-`O!^(xX~O!^-bO~O!c-cO!d-cO(U!lO~P#$`O!^-fO~P'_On-iO!_'`O~O!Y-nO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(U!{a(V!{a(Y!{a(e!{a(o!{a~P!#vO!p-sO#`-qO~PChO!c-uO!d-uO(U!lO~PDWOa%nO#`-qO'z%nO~Oa%nO!g#vO#`-qO'z%nO~Oa%nO!g#vO!p-sO#`-qO'z%nO(r'pO~O(P'xO(Q'xO(R-zO~Ov-{O~O!Y'Wa!]'Wa~P!:tO![.PO!Y'WX!]'WX~P%[O!](VO!Y(ha~O!Y(ha~PHRO!](^O!Y(va~O!S%hO![.TO!_%iO(T%gO!Y'^X!]'^X~O#`.VO!](ta!k(taa(ta'z(ta~O!g#vO~P#,wO!](jO!k(sa~O!S%hO!_%iO#j.ZO(T%gO~Op.`O!S%hO![.]O!_%iO!|]O#i._O#j.]O(T%gO!]'aX!k'aX~OR.dO!l#xO~Oh%VOn.gO!_'`O%i.fO~Oa#ci!]#ci'z#ci'w#ci!Y#ci!k#civ#ci!_#ci%i#ci!g#ci~P!:tOn>]O!Q*OO'y*PO(y$}O(z%PO~O#k#_aa#_a#`#_a'z#_a!]#_a!k#_a!_#_a!Y#_a~P#/sO#k(`XP(`XR(`X[(`Xa(`Xj(`Xr(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X'z(`X(a(`X(r(`X!k(`X!Y(`X'w(`Xv(`X!_(`X%i(`X!g(`X~P!6kO!].tO!k(kX~P!:tO!k.wO~O!Y.yO~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mia#mij#mir#mi!]#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#n#mi~P#3cO#n$OO~P#3cOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO[#mia#mij#mi!]#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#r#mi~P#6QO#r$QO~P#6QOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO(aVOa#mi!]#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#v#mi~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO(aVO(z#}Oa#mi!]#mi#z#mi#{#mi'z#mi(r#mi(y#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#x$UO~P#;VO#x#mi~P#;VO#v$SO~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO(aVO(y#|O(z#}Oa#mi!]#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#z#mi~P#={O#z$WO~P#={OP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X!]]X!^]X~O$O]X~P#@jOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO#x<eO#z<gO#{<hO(aVO(r$YO(y#|O(z#}O~O$O.{O~P#BwO#S$dO#`<nO$Q<nO$O(gX!^(gX~P! uOa'da!]'da'z'da'w'da!k'da!Y'dav'da!_'da%i'da!g'da~P!:tO[#mia#mij#mir#mi!]#mi#R#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO(y#mi(z#mi~P#EyOn>]O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P#EyO!]/POg(pX~P!1WOg/RO~Oa$Pi!]$Pi'z$Pi'w$Pi!Y$Pi!k$Piv$Pi!_$Pi%i$Pi!g$Pi~P!:tO$]/SO$_/SO~O$]/TO$_/TO~O!g)hO#`/UO!_$cX$Z$cX$]$cX$_$cX$f$cX~O![/VO~O!_)kO$Z/XO$])jO$_)jO$f/YO~O!]<iO!^(fX~P#BwO!^/ZO~O!g)hO$f({X~O$f/]O~Ov/^O~P!&zOx)yO(b)zO(c/aO~O!S/dO~O(y$}On%aa!Q%aa'y%aa(z%aa!]%aa#`%aa~Og%aa$O%aa~P#L{O(z%POn%ca!Q%ca'y%ca(y%ca!]%ca#`%ca~Og%ca$O%ca~P#MnO!]fX!gfX!kfX!k$zX(rfX~P!0SOp%WO![/mO!](^O(T/lO!Y(vP!Y)PP~P!1uOr*sO!b*qO!c*kO!d*kO!l*bO#[*rO%`*mO(U!lO(VTO(YUO~Os<}O!S/nO![+[O!^*pO(e<|O!^(xP~P$ [O!k/oO~P#/sO!]/pO!g#vO(r'pO!k)OX~O!k/uO~OnoX!QoX'yoX(yoX(zoX~O!g#vO!koX~P$#OOp/wO!S%hO![*^O!_%iO(T%gO!k)OP~O#k/xO~O!Y$zX!]$zX!g%RX~P!0SO!]/yO!Y)PX~P#/sO!g/{O~O!Y/}O~OpkO(T0OO~P.iOh%VOr0TO!g#vO!l%eO(r'pO~O!g+iO~Oa%nO!]0XO'z%nO~O!^0ZO~P!5iO!c0[O!d0[O(U!lO~P#$`Os!nO!S0]O(VTO(YUO(e!mO~O#[0_O~Og%aa!]%aa#`%aa$O%aa~P!1WOg%ca!]%ca#`%ca$O%ca~P!1WOj%dOk%dOl%dO(T&ZOg'mX!]'mX~O!]*yOg(^a~Og0hO~On0jO#`0iOg(_a!](_a~OR0kO!Q0kO!S0lO#S$dOn}a'y}a(y}a(z}a!]}a#`}a~Og}a$O}a~P$(cO!Q*OO'y*POn$sa(y$sa(z$sa!]$sa#`$sa~Og$sa$O$sa~P$)_O!Q*OO'y*POn$ua(y$ua(z$ua!]$ua#`$ua~Og$ua$O$ua~P$*QO#k0oO~Og%Ta!]%Ta#`%Ta$O%Ta~P!1WO!g#vO~O#k0rO~O!]+^Oa)Ta'z)Ta~OR#zO!Q#yO!S#{O!l#xO(aVOP!ri[!rij!rir!ri!]!ri!p!ri#R!ri#n!ri#o!ri#p!ri#q!ri#r!ri#s!ri#t!ri#u!ri#v!ri#x!ri#z!ri#{!ri(r!ri(y!ri(z!ri~Oa!ri'z!ri'w!ri!Y!ri!k!riv!ri!_!ri%i!ri!g!ri~P$+oOh%VOr%XOs$tOt$tOz%YO|%ZO!O<sO!S${O!_$|O!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(VTO(YUO(a$uO(y$}O(z%PO~Op0{O%]0|O(T0zO~P$.VO!g+iOa(]a!_(]a'z(]a!](]a~O#k1SO~O[]X!]fX!^fX~O!]1TO!^)XX~O!^1VO~O[1WO~Ob1YO(T+qO(VTO(YUO~O!_&PO(T%gO`'uX!]'uX~O!]+vO`)Wa~O!k1]O~P!:tO[1`O~O`1aO~O#`1fO~On1iO!_$|O~O(e(|O!^)UP~Oh%VOn1rO!_1oO%i1qO~O[1|O!]1zO!^)VX~O!^1}O~O`2POa%nO'z%nO~O(T#nO(VTO(YUO~O#S$dO#`$eO$Q$eOP(gXR(gX[(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX~Oj2SO&[2TOa(gX~P$3pOj2SO#`$eO&[2TO~Oa2VO~P%[Oa2XO~O&e2[OP&ciQ&ciS&ciY&cia&cid&cie&cil&cip&cir&cis&cit&ciz&ci|&ci!O&ci!S&ci!W&ci!X&ci!_&ci!i&ci!l&ci!o&ci!p&ci!q&ci!s&ci!u&ci!x&ci!|&ci$W&ci$n&ci%h&ci%j&ci%l&ci%m&ci%n&ci%q&ci%s&ci%v&ci%w&ci%y&ci&W&ci&^&ci&`&ci&b&ci&d&ci&g&ci&m&ci&s&ci&u&ci&w&ci&y&ci&{&ci'w&ci(T&ci(V&ci(Y&ci(a&ci(o&ci!^&cib&ci&j&ci~Ob2bO!^2`O&j2aO~P`O!_XO!l2dO~O&q,{OP&liQ&liS&liY&lia&lid&lie&lil&lip&lir&lis&lit&liz&li|&li!O&li!S&li!W&li!X&li!_&li!i&li!l&li!o&li!p&li!q&li!s&li!u&li!x&li!|&li$W&li$n&li%h&li%j&li%l&li%m&li%n&li%q&li%s&li%v&li%w&li%y&li&W&li&^&li&`&li&b&li&d&li&g&li&m&li&s&li&u&li&w&li&y&li&{&li'w&li(T&li(V&li(Y&li(a&li(o&li!^&li&e&lib&li&j&li~O!Y2jO~O!]!aa!^!aa~P#BwOs!nO!S!oO![2pO(e!mO!]'XX!^'XX~P@nO!]-]O!^(ia~O!]'_X!^'_X~P!9|O!]-`O!^(xa~O!^2wO~P'_Oa%nO#`3QO'z%nO~Oa%nO!g#vO#`3QO'z%nO~Oa%nO!g#vO!p3UO#`3QO'z%nO(r'pO~Oa%nO'z%nO~P!:tO!]$_Ov$qa~O!Y'Wi!]'Wi~P!:tO!](VO!Y(hi~O!](^O!Y(vi~O!Y(wi!](wi~P!:tO!](ti!k(tia(ti'z(ti~P!:tO#`3WO!](ti!k(tia(ti'z(ti~O!](jO!k(si~O!S%hO!_%iO!|]O#i3]O#j3[O(T%gO~O!S%hO!_%iO#j3[O(T%gO~On3dO!_'`O%i3cO~Oh%VOn3dO!_'`O%i3cO~O#k%aaP%aaR%aa[%aaa%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa'z%aa(a%aa(r%aa!k%aa!Y%aa'w%aav%aa!_%aa%i%aa!g%aa~P#L{O#k%caP%caR%ca[%caa%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca'z%ca(a%ca(r%ca!k%ca!Y%ca'w%cav%ca!_%ca%i%ca!g%ca~P#MnO#k%aaP%aaR%aa[%aaa%aaj%aar%aa!S%aa!]%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa'z%aa(a%aa(r%aa!k%aa!Y%aa'w%aa#`%aav%aa!_%aa%i%aa!g%aa~P#/sO#k%caP%caR%ca[%caa%caj%car%ca!S%ca!]%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca'z%ca(a%ca(r%ca!k%ca!Y%ca'w%ca#`%cav%ca!_%ca%i%ca!g%ca~P#/sO#k}aP}a[}aa}aj}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a'z}a(a}a(r}a!k}a!Y}a'w}av}a!_}a%i}a!g}a~P$(cO#k$saP$saR$sa[$saa$saj$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa'z$sa(a$sa(r$sa!k$sa!Y$sa'w$sav$sa!_$sa%i$sa!g$sa~P$)_O#k$uaP$uaR$ua[$uaa$uaj$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua'z$ua(a$ua(r$ua!k$ua!Y$ua'w$uav$ua!_$ua%i$ua!g$ua~P$*QO#k%TaP%TaR%Ta[%Taa%Taj%Tar%Ta!S%Ta!]%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta'z%Ta(a%Ta(r%Ta!k%Ta!Y%Ta'w%Ta#`%Tav%Ta!_%Ta%i%Ta!g%Ta~P#/sOa#cq!]#cq'z#cq'w#cq!Y#cq!k#cqv#cq!_#cq%i#cq!g#cq~P!:tO![3lO!]'YX!k'YX~P%[O!].tO!k(ka~O!].tO!k(ka~P!:tO!Y3oO~O$O!na!^!na~PKlO$O!ja!]!ja!^!ja~P#BwO$O!ra!^!ra~P!=[O$O!ta!^!ta~P!?rOg']X!]']X~P!,TO!]/POg(pa~OSfO!_4TO$d4UO~O!^4YO~Ov4ZO~P#/sOa$mq!]$mq'z$mq'w$mq!Y$mq!k$mqv$mq!_$mq%i$mq!g$mq~P!:tO!Y4]O~P!&zO!S4^O~O!Q*OO'y*PO(z%POn'ia(y'ia!]'ia#`'ia~Og'ia$O'ia~P%-fO!Q*OO'y*POn'ka(y'ka(z'ka!]'ka#`'ka~Og'ka$O'ka~P%.XO(r$YO~P#/sO!YfX!Y$zX!]fX!]$zX!g%RX#`fX~P!0SOp%WO(T=WO~P!1uOp4bO!S%hO![4aO!_%iO(T%gO!]'eX!k'eX~O!]/pO!k)Oa~O!]/pO!g#vO!k)Oa~O!]/pO!g#vO(r'pO!k)Oa~Og$|i!]$|i#`$|i$O$|i~P!1WO![4jO!Y'gX!]'gX~P!3tO!]/yO!Y)Pa~O!]/yO!Y)Pa~P#/sOP]XR]X[]Xj]Xr]X!Q]X!S]X!Y]X!]]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X~Oj%YX!g%YX~P%2OOj4oO!g#vO~Oh%VO!g#vO!l%eO~Oh%VOr4tO!l%eO(r'pO~Or4yO!g#vO(r'pO~Os!nO!S4zO(VTO(YUO(e!mO~O(y$}On%ai!Q%ai'y%ai(z%ai!]%ai#`%ai~Og%ai$O%ai~P%5oO(z%POn%ci!Q%ci'y%ci(y%ci!]%ci#`%ci~Og%ci$O%ci~P%6bOg(_i!](_i~P!1WO#`5QOg(_i!](_i~P!1WO!k5VO~Oa$oq!]$oq'z$oq'w$oq!Y$oq!k$oqv$oq!_$oq%i$oq!g$oq~P!:tO!Y5ZO~O!]5[O!_)QX~P#/sOa$zX!_$zX%^]X'z$zX!]$zX~P!0SO%^5_OaoX!_oX'zoX!]oX~P$#OOp5`O(T#nO~O%^5_O~Ob5fO%j5gO(T+qO(VTO(YUO!]'tX!^'tX~O!]1TO!^)Xa~O[5kO~O`5lO~O[5pO~Oa%nO'z%nO~P#/sO!]5uO#`5wO!^)UX~O!^5xO~Or6OOs!nO!S*iO!b!yO!c!vO!d!vO!|<VO#T!pO#U!pO#V!pO#W!pO#X!pO#[5}O#]!zO(U!lO(VTO(YUO(e!mO(o!sO~O!^5|O~P%;eOn6TO!_1oO%i6SO~Oh%VOn6TO!_1oO%i6SO~Ob6[O(T#nO(VTO(YUO!]'sX!^'sX~O!]1zO!^)Va~O(VTO(YUO(e6^O~O`6bO~Oj6eO&[6fO~PNXO!k6gO~P%[Oa6iO~Oa6iO~P%[Ob2bO!^6nO&j2aO~P`O!g6pO~O!g6rOh(ji!](ji!^(ji!g(ji!l(jir(ji(r(ji~O!]#hi!^#hi~P#BwO#`6sO!]#hi!^#hi~O!]!ai!^!ai~P#BwOa%nO#`6|O'z%nO~Oa%nO!g#vO#`6|O'z%nO~O!](tq!k(tqa(tq'z(tq~P!:tO!](jO!k(sq~O!S%hO!_%iO#j7TO(T%gO~O!_'`O%i7WO~On7[O!_'`O%i7WO~O#k'iaP'iaR'ia['iaa'iaj'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia'z'ia(a'ia(r'ia!k'ia!Y'ia'w'iav'ia!_'ia%i'ia!g'ia~P%-fO#k'kaP'kaR'ka['kaa'kaj'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka'z'ka(a'ka(r'ka!k'ka!Y'ka'w'kav'ka!_'ka%i'ka!g'ka~P%.XO#k$|iP$|iR$|i[$|ia$|ij$|ir$|i!S$|i!]$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i'z$|i(a$|i(r$|i!k$|i!Y$|i'w$|i#`$|iv$|i!_$|i%i$|i!g$|i~P#/sO#k%aiP%aiR%ai[%aia%aij%air%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai'z%ai(a%ai(r%ai!k%ai!Y%ai'w%aiv%ai!_%ai%i%ai!g%ai~P%5oO#k%ciP%ciR%ci[%cia%cij%cir%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci'z%ci(a%ci(r%ci!k%ci!Y%ci'w%civ%ci!_%ci%i%ci!g%ci~P%6bO!]'Ya!k'Ya~P!:tO!].tO!k(ki~O$O#ci!]#ci!^#ci~P#BwOP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mij#mir#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#n#mi~P%NdO#n<_O~P%NdOP$[OR#zOr<kO!Q#yO!S#{O!l#xO!p$[O#n<_O#o<`O#p<`O#q<`O(aVO[#mij#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#r#mi~P&!lO#r<aO~P&!lOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO(aVO#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#v#mi~P&$tOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO(aVO(z#}O#z#mi#{#mi$O#mi(r#mi(y#mi!]#mi!^#mi~O#x<eO~P&&uO#x#mi~P&&uO#v<cO~P&$tOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO#x<eO(aVO(y#|O(z#}O#{#mi$O#mi(r#mi!]#mi!^#mi~O#z#mi~P&)UO#z<gO~P&)UOa#|y!]#|y'z#|y'w#|y!Y#|y!k#|yv#|y!_#|y%i#|y!g#|y~P!:tO[#mij#mir#mi#R#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi!]#mi!^#mi~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O#n<_O#o<`O#p<`O#q<`O(aVO(y#mi(z#mi~P&,QOn>^O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P&,QO#S$dOP(`XR(`X[(`Xj(`Xn(`Xr(`X!Q(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X$O(`X'y(`X(a(`X(r(`X(y(`X(z(`X!](`X!^(`X~O$O$Pi!]$Pi!^$Pi~P#BwO$O!ri!^!ri~P$+oOg']a!]']a~P!1WO!^7nO~O!]'da!^'da~P#BwO!Y7oO~P#/sO!g#vO(r'pO!]'ea!k'ea~O!]/pO!k)Oi~O!]/pO!g#vO!k)Oi~Og$|q!]$|q#`$|q$O$|q~P!1WO!Y'ga!]'ga~P#/sO!g7vO~O!]/yO!Y)Pi~P#/sO!]/yO!Y)Pi~O!Y7yO~Oh%VOr8OO!l%eO(r'pO~Oj8QO!g#vO~Or8TO!g#vO(r'pO~O!Q*OO'y*PO(z%POn'ja(y'ja!]'ja#`'ja~Og'ja$O'ja~P&5RO!Q*OO'y*POn'la(y'la(z'la!]'la#`'la~Og'la$O'la~P&5tOg(_q!](_q~P!1WO#`8VOg(_q!](_q~P!1WO!Y8WO~Og%Oq!]%Oq#`%Oq$O%Oq~P!1WOa$oy!]$oy'z$oy'w$oy!Y$oy!k$oyv$oy!_$oy%i$oy!g$oy~P!:tO!g6rO~O!]5[O!_)Qa~O!_'`OP$TaR$Ta[$Taj$Tar$Ta!Q$Ta!S$Ta!]$Ta!l$Ta!p$Ta#R$Ta#n$Ta#o$Ta#p$Ta#q$Ta#r$Ta#s$Ta#t$Ta#u$Ta#v$Ta#x$Ta#z$Ta#{$Ta(a$Ta(r$Ta(y$Ta(z$Ta~O%i7WO~P&8fO%^8[Oa%[i!_%[i'z%[i!]%[i~Oa#cy!]#cy'z#cy'w#cy!Y#cy!k#cyv#cy!_#cy%i#cy!g#cy~P!:tO[8^O~Ob8`O(T+qO(VTO(YUO~O!]1TO!^)Xi~O`8dO~O(e(|O!]'pX!^'pX~O!]5uO!^)Ua~O!^8nO~P%;eO(o!sO~P$&YO#[8oO~O!_1oO~O!_1oO%i8qO~On8tO!_1oO%i8qO~O[8yO!]'sa!^'sa~O!]1zO!^)Vi~O!k8}O~O!k9OO~O!k9RO~O!k9RO~P%[Oa9TO~O!g9UO~O!k9VO~O!](wi!^(wi~P#BwOa%nO#`9_O'z%nO~O!](ty!k(tya(ty'z(ty~P!:tO!](jO!k(sy~O%i9bO~P&8fO!_'`O%i9bO~O#k$|qP$|qR$|q[$|qa$|qj$|qr$|q!S$|q!]$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q'z$|q(a$|q(r$|q!k$|q!Y$|q'w$|q#`$|qv$|q!_$|q%i$|q!g$|q~P#/sO#k'jaP'jaR'ja['jaa'jaj'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja'z'ja(a'ja(r'ja!k'ja!Y'ja'w'jav'ja!_'ja%i'ja!g'ja~P&5RO#k'laP'laR'la['laa'laj'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la'z'la(a'la(r'la!k'la!Y'la'w'lav'la!_'la%i'la!g'la~P&5tO#k%OqP%OqR%Oq[%Oqa%Oqj%Oqr%Oq!S%Oq!]%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq'z%Oq(a%Oq(r%Oq!k%Oq!Y%Oq'w%Oq#`%Oqv%Oq!_%Oq%i%Oq!g%Oq~P#/sO!]'Yi!k'Yi~P!:tO$O#cq!]#cq!^#cq~P#BwO(y$}OP%aaR%aa[%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa$O%aa(a%aa(r%aa!]%aa!^%aa~On%aa!Q%aa'y%aa(z%aa~P&IyO(z%POP%caR%ca[%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca$O%ca(a%ca(r%ca!]%ca!^%ca~On%ca!Q%ca'y%ca(y%ca~P&LQOn>^O!Q*OO'y*PO(z%PO~P&IyOn>^O!Q*OO'y*PO(y$}O~P&LQOR0kO!Q0kO!S0lO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a$O}a'y}a(a}a(r}a(y}a(z}a!]}a!^}a~O!Q*OO'y*POP$saR$sa[$saj$san$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa$O$sa(a$sa(r$sa(y$sa(z$sa!]$sa!^$sa~O!Q*OO'y*POP$uaR$ua[$uaj$uan$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua$O$ua(a$ua(r$ua(y$ua(z$ua!]$ua!^$ua~On>^O!Q*OO'y*PO(y$}O(z%PO~OP%TaR%Ta[%Taj%Tar%Ta!S%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta$O%Ta(a%Ta(r%Ta!]%Ta!^%Ta~P''VO$O$mq!]$mq!^$mq~P#BwO$O$oq!]$oq!^$oq~P#BwO!^9oO~O$O9pO~P!1WO!g#vO!]'ei!k'ei~O!g#vO(r'pO!]'ei!k'ei~O!]/pO!k)Oq~O!Y'gi!]'gi~P#/sO!]/yO!Y)Pq~Or9wO!g#vO(r'pO~O[9yO!Y9xO~P#/sO!Y9xO~Oj:PO!g#vO~Og(_y!](_y~P!1WO!]'na!_'na~P#/sOa%[q!_%[q'z%[q!]%[q~P#/sO[:UO~O!]1TO!^)Xq~O`:YO~O#`:ZO!]'pa!^'pa~O!]5uO!^)Ui~P#BwO!S:]O~O!_1oO%i:`O~O(VTO(YUO(e:eO~O!]1zO!^)Vq~O!k:hO~O!k:iO~O!k:jO~O!k:jO~P%[O#`:mO!]#hy!^#hy~O!]#hy!^#hy~P#BwO%i:rO~P&8fO!_'`O%i:rO~O$O#|y!]#|y!^#|y~P#BwOP$|iR$|i[$|ij$|ir$|i!S$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i$O$|i(a$|i(r$|i!]$|i!^$|i~P''VO!Q*OO'y*PO(z%POP'iaR'ia['iaj'ian'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia$O'ia(a'ia(r'ia(y'ia!]'ia!^'ia~O!Q*OO'y*POP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka$O'ka(a'ka(r'ka(y'ka(z'ka!]'ka!^'ka~O(y$}OP%aiR%ai[%aij%ain%air%ai!Q%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai$O%ai'y%ai(a%ai(r%ai(z%ai!]%ai!^%ai~O(z%POP%ciR%ci[%cij%cin%cir%ci!Q%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci$O%ci'y%ci(a%ci(r%ci(y%ci!]%ci!^%ci~O$O$oy!]$oy!^$oy~P#BwO$O#cy!]#cy!^#cy~P#BwO!g#vO!]'eq!k'eq~O!]/pO!k)Oy~O!Y'gq!]'gq~P#/sOr:|O!g#vO(r'pO~O[;QO!Y;PO~P#/sO!Y;PO~Og(_!R!](_!R~P!1WOa%[y!_%[y'z%[y!]%[y~P#/sO!]1TO!^)Xy~O!]5uO!^)Uq~O(T;XO~O!_1oO%i;[O~O!k;_O~O%i;dO~P&8fOP$|qR$|q[$|qj$|qr$|q!S$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q$O$|q(a$|q(r$|q!]$|q!^$|q~P''VO!Q*OO'y*PO(z%POP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja$O'ja(a'ja(r'ja(y'ja!]'ja!^'ja~O!Q*OO'y*POP'laR'la['laj'lan'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la$O'la(a'la(r'la(y'la(z'la!]'la!^'la~OP%OqR%Oq[%Oqj%Oqr%Oq!S%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq$O%Oq(a%Oq(r%Oq!]%Oq!^%Oq~P''VOg%e!Z!]%e!Z#`%e!Z$O%e!Z~P!1WO!Y;hO~P#/sOr;iO!g#vO(r'pO~O[;kO!Y;hO~P#/sO!]'pq!^'pq~P#BwO!]#h!Z!^#h!Z~P#BwO#k%e!ZP%e!ZR%e!Z[%e!Za%e!Zj%e!Zr%e!Z!S%e!Z!]%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z'z%e!Z(a%e!Z(r%e!Z!k%e!Z!Y%e!Z'w%e!Z#`%e!Zv%e!Z!_%e!Z%i%e!Z!g%e!Z~P#/sOr;tO!g#vO(r'pO~O!Y;uO~P#/sOr;|O!g#vO(r'pO~O!Y;}O~P#/sOP%e!ZR%e!Z[%e!Zj%e!Zr%e!Z!S%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z$O%e!Z(a%e!Z(r%e!Z!]%e!Z!^%e!Z~P''VOr<QO!g#vO(r'pO~Ov(fX~P1qO!Q%rO~P!)[O(U!lO~P!)[O!YfX!]fX#`fX~P%2OOP]XR]X[]Xj]Xr]X!Q]X!S]X!]]X!]fX!l]X!p]X#R]X#S]X#`]X#`fX#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X~O!gfX!k]X!kfX(rfX~P'LTOP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_XO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(T)]O(VTO(YUO(aVO(o[O~O!]<iO!^$qa~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<tO!S${O!_$|O!i>WO!l$xO#j<zO$W%`O$t<vO$v<xO$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Ol)dO~P(!yOr!eX(r!eX~P#!iOr(jX(r(jX~P##[O!^]X!^fX~P'LTO!YfX!Y$zX!]fX!]$zX#`fX~P!0SO#k<^O~O!g#vO#k<^O~O#`<nO~Oj<bO~O#`=OO!](wX!^(wX~O#`<nO!](uX!^(uX~O#k=PO~Og=RO~P!1WO#k=XO~O#k=YO~Og=RO(T&ZO~O!g#vO#k=ZO~O!g#vO#k=PO~O$O=[O~P#BwO#k=]O~O#k=^O~O#k=cO~O#k=dO~O#k=eO~O#k=fO~O$O=gO~P!1WO$O=hO~P!1WOl=sO~P7eOk#S#T#U#W#X#[#i#j#u$n$t$v$y%]%^%h%i%j%q%s%v%w%y%{~(OT#o!X'|(U#ps#n#qr!Q'}$]'}(T$_(e~",goto:"$9Y)]PPPPPP)^PP)aP)rP+W/]PPPP6mPP7TPP=QPPP@tPA^PA^PPPA^PCfPA^PA^PA^PCjPCoPD^PIWPPPI[PPPPI[L_PPPLeMVPI[PI[PP! eI[PPPI[PI[P!#lI[P!'S!(X!(bP!)U!)Y!)U!,gPPPPPPP!-W!(XPP!-h!/YP!2iI[I[!2n!5z!:h!:h!>gPPP!>oI[PPPPPPPPP!BOP!C]PPI[!DnPI[PI[I[I[I[I[PI[!FQP!I[P!LbP!Lf!Lp!Lt!LtP!IXP!Lx!LxP#!OP#!SI[PI[#!Y#%_CjA^PA^PA^A^P#&lA^A^#)OA^#+vA^#.SA^A^#.r#1W#1W#1]#1f#1W#1qPP#1WPA^#2ZA^#6YA^A^6mPPP#:_PPP#:x#:xP#:xP#;`#:xPP#;fP#;]P#;]#;y#;]#<e#<k#<n)aP#<q)aP#<z#<z#<zP)aP)aP)aP)aPP)aP#=Q#=TP#=T)aP#=XP#=[P)aP)aP)aP)aP)aP)a)aPP#=b#=h#=s#=y#>P#>V#>]#>k#>q#>{#?R#?]#?c#?s#?y#@k#@}#AT#AZ#Ai#BO#Cs#DR#DY#Et#FS#Gt#HS#HY#H`#Hf#Hp#Hv#H|#IW#Ij#IpPPPPPPPPPPP#IvPPPPPPP#Jk#Mx$ b$ i$ qPPP$']P$'f$*_$0x$0{$1O$1}$2Q$2X$2aP$2g$2jP$3W$3[$4S$5b$5g$5}PP$6S$6Y$6^$6a$6e$6i$7e$7|$8e$8i$8l$8o$8y$8|$9Q$9UR!|RoqOXst!Z#d%m&r&t&u&w,s,x2[2_Y!vQ'`-e1o5{Q%tvQ%|yQ&T|Q&j!VS'W!e-]Q'f!iS'l!r!yU*k$|*Z*oQ+o%}S+|&V&WQ,d&dQ-c'_Q-m'gQ-u'mQ0[*qQ1b,OQ1y,eR<{<Y%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_S#q]<V!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SU+P%]<s<tQ+t&PQ,f&gQ,m&oQ0x+gQ0}+iQ1Y+uQ2R,kQ3`.gQ5`0|Q5f1TQ6[1zQ7Y3dQ8`5gR9e7['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S!S!nQ!r!v!y!z$|'W'_'`'l'm'n*k*o*q*r-]-c-e-u0[0_1o5{5}%[$ti#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^Q&X|Q'U!eS'[%i-`Q+t&PQ,P&WQ,f&gQ0n+SQ1Y+uQ1_+{Q2Q,jQ2R,kQ5f1TQ5o1aQ6[1zQ6_1|Q6`2PQ8`5gQ8c5lQ8|6bQ:X8dQ:f8yQ;V:YR<}*ZrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R,h&k&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'b'r(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>R>S[#]WZ#W#Z'X(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ%wxQ%{yW&Q|&V&W,OQ&_!TQ'c!hQ'e!iQ(q#sS+n%|%}Q+r&PQ,_&bQ,c&dS-l'f'gQ.i(rQ1R+oQ1X+uQ1Z+vQ1^+zQ1t,`S1x,d,eQ2|-mQ5e1TQ5i1WQ5n1`Q6Z1yQ8_5gQ8b5kQ8f5pQ:T8^R;T:U!U$zi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y!^%yy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{Q+h%wQ,T&[Q,W&]Q,b&dQ.h(qQ1s,_U1w,c,d,eQ3e.iQ6U1tS6Y1x1yQ8x6Z#f>T#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^o>U<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hW%Ti%V*y>PS&[!Q&iQ&]!RQ&^!SU*}%[%d=sR,R&Y%]%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^T)z$u){V+P%]<s<tW'[!e%i*Z-`S(}#y#zQ+c%rQ+y&SS.b(m(nQ1j,XQ5T0kR8i5u'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S$i$^c#Y#e%q%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.|.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`<W=vT#TV#U'RkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ'Y!eR2q-]!W!nQ!e!r!v!y!z$|'W'_'`'l'm'n*Z*k*o*q*r-]-c-e-u0[0_1o5{5}R1l,ZnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&y!^Q'v!xS(s#u<^Q+l%zQ,]&_Q,^&aQ-j'dQ-w'oS.r(x=PS0q+X=ZQ1P+mQ1n,[Q2c,zQ2e,{Q2m-WQ2z-kQ2}-oS5Y0r=eQ5a1QS5d1S=fQ6t2oQ6x2{Q6}3SQ8]5bQ9Y6vQ9Z6yQ9^7OR:l9V$d$]c#Y#e%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`<W=vS(o#p'iQ)P#zS+b%q.|S.c(n(pR3^.d'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SS#q]<VQ&t!XQ&u!YQ&w![Q&x!]R2Z,vQ'a!hQ+e%wQ-h'cS.e(q+hQ2x-gW3b.h.i0w0yQ6w2yW7U3_3a3e5^U9a7V7X7ZU:q9c9d9fS;b:p:sQ;p;cR;x;qU!wQ'`-eT5y1o5{!Q_OXZ`st!V!Z#d#h%e%m&i&k&r&t&u&w(j,s,x.[2[2_]!pQ!r'`-e1o5{T#q]<V%^{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_S(}#y#zS.b(m(n!s=l$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SU$fd)_,mS(p#p'iU*v%R(w4OU0m+O.n7gQ5^0xQ7V3`Q9d7YR:s9em!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}Q't!uS(f#g2US-s'k'wQ/s*]Q0R*jQ3U-vQ4f/tQ4r0TQ4s0UQ4x0^Q7r4`S7}4t4vS8R4y4{Q9r7sQ9v7yQ9{8OQ:Q8TS:{9w9xS;g:|;PS;s;h;iS;{;t;uS<P;|;}R<S<QQ#wbQ's!uS(e#g2US(g#m+WQ+Y%fQ+j%xQ+p&OU-r'k't'wQ.W(fU/r*]*`/wQ0S*jQ0V*lQ1O+kQ1u,aS3R-s-vQ3Z.`S4e/s/tQ4n0PS4q0R0^Q4u0WQ6W1vQ7P3US7q4`4bQ7u4fU7|4r4x4{Q8P4wQ8v6XS9q7r7sQ9u7yQ9}8RQ:O8SQ:c8wQ:y9rS:z9v9xQ;S:QQ;^:dS;f:{;PS;r;g;hS;z;s;uS<O;{;}Q<R<PQ<T<SQ=o=jQ={=tR=|=uV!wQ'`-e%^aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_S#wz!j!r=i$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SR=o>R%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Q%fj!^%xy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{S&Oz!jQ+k%yQ,a&dW1v,b,c,d,eU6X1w1x1yS8w6Y6ZQ:d8x!r=j$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ=t>QR=u>R%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Y#bWZ#W#Z(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ,n&o!p=k$Z$n)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SR=n'XU']!e%i*ZR2s-`%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ,m&oQ0x+gQ3`.gQ7Y3dR9e7[!b$Tc#Y%q(S(Y(t(y)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<W!P<d)^)q-Z.|2k2n3p3y3z4P4X6u7b7k7l8k9X9g9m9n;W;`=v!f$Vc#Y%q(S(Y(t(y)W)X)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<W!T<f)^)q-Z.|2k2n3p3v3w3y3z4P4X6u7b7k7l8k9X9g9m9n;W;`=v!^$Zc#Y%q(S(Y(t(y)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<WQ4_/kz>S)^)q-Z.|2k2n3p4P4X6u7b7k7l8k9X9g9m9n;W;`=vQ>X>ZR>Y>['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SS$oh$pR4U/U'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>ST$kf$qQ$ifS)j$l)nR)v$qT$jf$qT)l$l)n'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>ST$oh$pQ$rhR)u$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_!s>Q$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S#glOPXZst!Z!`!o#S#d#o#{$n%m&k&n&o&r&t&u&w&{'T'b)O)s*i+]+g,p,s,x-i.g/V/n0]0l1r2S2T2V2X2[2_2a3d4T4z6T6e6f6i7[8t9T!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^Q+T%aQ/c*Oo4O<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!U$yi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>YQ*c$zU*l$|*Z*oQ+U%bQ0W*m#f=q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n=r<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hQ=w>TQ=x>UQ=y>VR=z>W!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^o4O<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hnoOXst!Z#d%m&r&t&u&w,s,x2[2_S*f${*YQ-R'OQ-S'QR4i/y%[%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^Q,U&]Q1h,WQ5s1gR8h5tV*n$|*Z*oU*n$|*Z*oT5z1o5{S0P*i/nQ4w0]T8S4z:]Q+j%xQ0V*lQ1O+kQ1u,aQ6W1vQ8v6XQ:c8wR;^:d!U%Oi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Yx*R$v)e*S*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>OS0`*t0a#f<o#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n<p<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!d=S(u)c*[*e.j.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[`=T3}7c7f7j9h:t:w;yS=_.l3iT=`7e9k!U%Qi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y|*T$v)e*U*t+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>OS0b*u0c#f<q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n<r<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!h=U(u)c*[*e.k.l.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[d=V3}7d7e7j9h9i:t:u:w;yS=a.m3jT=b7f9lrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q&f!UR,p&ornOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R&f!UQ,Y&^R1d,RsnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q1p,_S6R1s1tU8p6P6Q6US:_8r8sS;Y:^:aQ;m;ZR;w;nQ&m!VR,i&iR6_1|R:f8yW&Q|&V&W,OR1Z+vQ&r!WR,s&sR,y&xT2],x2_R,}&yQ,|&yR2f,}Q'y!{R-y'ySsOtQ#dXT%ps#dQ#OTR'{#OQ#RUR'}#RQ){$uR/`){Q#UVR(Q#UQ#XWU(W#X(X.QQ(X#YR.Q(YQ-^'YR2r-^Q.u(yS3m.u3nR3n.vQ-e'`R2v-eY!rQ'`-e1o5{R'j!rQ/Q)eR4S/QU#_W%h*YU(_#_(`.RQ(`#`R.R(ZQ-a']R2t-at`OXst!V!Z#d%m&i&k&r&t&u&w,s,x2[2_S#hZ%eU#r`#h.[R.[(jQ(k#jQ.X(gW.a(k.X3X7RQ3X.YR7R3YQ)n$lR/W)nQ$phR)t$pQ$`cU)a$`-|<jQ-|<WR<j)qQ/q*]W4c/q4d7t9sU4d/r/s/tS7t4e4fR9s7u$e*Q$v(u)c)e*[*e*t*u+Q+R+V.l.m.o.p.q/_/g/i/k/v/|0d0e0v1e3f3g3h3}4R4[4g4h4l4|5O5R5S5W5r7]7^7_7`7e7f7h7i7j7p7w7z8U8X8Z9h9i9j9t9|:R:S:t:u:v:w:x:};R;e;j;v;y=p=}>O>Z>[Q/z*eU4k/z4m7xQ4m/|R7x4lS*o$|*ZR0Y*ox*S$v)e*t*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>O!d.j(u)c*[*e.l.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/h*S.j7ca7c3}7e7f7j9h:t:w;yQ0a*tQ3i.lU4}0a3i9kR9k7e|*U$v)e*t*u+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>O!h.k(u)c*[*e.l.m.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/j*U.k7de7d3}7e7f7j9h9i:t:u:w;yQ0c*uQ3j.mU5P0c3j9lR9l7fQ*z%UR0g*zQ5]0vR8Y5]Q+_%kR0u+_Q5v1jS8j5v:[R:[8kQ,[&_R1m,[Q5{1oR8m5{Q1{,fS6]1{8zR8z6_Q1U+rW5h1U5j8a:VQ5j1XQ8a5iR:V8bQ+w&QR1[+wQ2_,xR6m2_YrOXst#dQ&v!ZQ+a%mQ,r&rQ,t&tQ,u&uQ,w&wQ2Y,sS2],x2_R6l2[Q%opQ&z!_Q&}!aQ'P!bQ'R!cQ'q!uQ+`%lQ+l%zQ,Q&XQ,h&mQ-P&|W-p'k's't'wQ-w'oQ0X*nQ1P+mQ1c,PS2O,i,lQ2g-OQ2h-RQ2i-SQ2}-oW3P-r-s-v-xQ5a1QQ5m1_Q5q1eQ6V1uQ6a2QQ6k2ZU6z3O3R3UQ6}3SQ8]5bQ8e5oQ8g5rQ8l5zQ8u6WQ8{6`S9[6{7PQ9^7OQ:W8cQ:b8vQ:g8|Q:n9]Q;U:XQ;]:cQ;a:oQ;l;VR;o;^Q%zyQ'd!iQ'o!uU+m%{%|%}Q-W'VU-k'e'f'gS-o'k'uQ0Q*jS1Q+n+oQ2o-YS2{-l-mQ3S-tS4p0R0UQ5b1RQ6v2uQ6y2|Q7O3TU7{4r4s4vQ9z7}R;O9{S$wi>PR*{%VU%Ui%V>PR0f*yQ$viS(u#v+iS)c$b$cQ)e$dQ*[$xS*e${*YQ*t%OQ*u%QQ+Q%^Q+R%_Q+V%cQ.l<oQ.m<qQ.o<uQ.p<wQ.q<yQ/_)yQ/g*RQ/i*TQ/k*VQ/v*aS/|*g/mQ0d*wQ0e*xl0v+f,V.f1i1q3c6S7W8q9b:`:r;[;dQ1e,SQ3f=SQ3g=UQ3h=XS3}<l<mQ4R/PS4[/d4^Q4g/xQ4h/yQ4l/{Q4|0`Q5O0bQ5R0iQ5S0jQ5W0oQ5r1fQ7]=]Q7^=_Q7_=aQ7`=cQ7e<pQ7f<rQ7h<vQ7i<xQ7j<zQ7p4_Q7w4jQ7z4oQ8U5QQ8X5[Q8Z5_Q9h=YQ9i=TQ9j=VQ9t7vQ9|8QQ:R8VQ:S8[Q:t=^Q:u=`Q:v=bQ:w=dQ:x9pQ:}9yQ;R:PQ;e=gQ;j;QQ;v;kQ;y=hQ=p>PQ=}>XQ>O>YQ>Z>]R>[>^Q+O%]Q.n<sR7g<tnpOXst!Z#d%m&r&t&u&w,s,x2[2_Q!fPS#fZ#oQ&|!`W'h!o*i0]4zQ(P#SQ)Q#{Q)r$nS,l&k&nQ,q&oQ-O&{S-T'T/nQ-g'bQ.x)OQ/[)sQ0s+]Q0y+gQ2W,pQ2y-iQ3a.gQ4W/VQ5U0lQ6Q1rQ6c2SQ6d2TQ6h2VQ6j2XQ6o2aQ7Z3dQ7m4TQ8s6TQ9P6eQ9Q6fQ9S6iQ9f7[Q:a8tR:k9T#[cOPXZst!Z!`!o#d#o#{%m&k&n&o&r&t&u&w&{'T'b)O*i+]+g,p,s,x-i.g/n0]0l1r2S2T2V2X2[2_2a3d4z6T6e6f6i7[8t9TQ#YWQ#eYQ%quQ%svS%uw!gS(S#W(VQ(Y#ZQ(t#uQ(y#xQ)R$OQ)S$PQ)T$QQ)U$RQ)V$SQ)W$TQ)X$UQ)Y$VQ)Z$WQ)[$XQ)^$ZQ)`$_Q)b$aQ)g$eW)q$n)s/V4TQ+d%tQ+x&RS-Z'X2pQ-x'rS-}(T.PQ.S(]Q.U(dQ.s(xQ.v(zQ.z<UQ.|<XQ.}<YQ/O<]Q/b)}Q0p+XQ2k-UQ2n-XQ3O-qQ3V.VQ3k.tQ3p<^Q3q<_Q3r<`Q3s<aQ3t<bQ3u<cQ3v<dQ3w<eQ3x<fQ3y<gQ3z<hQ3{.{Q3|<kQ4P<nQ4Q<{Q4X<iQ5X0rQ5c1SQ6u=OQ6{3QQ7Q3WQ7a3lQ7b=PQ7k=RQ7l=ZQ8k5wQ9X6sQ9]6|Q9g=[Q9m=eQ9n=fQ:o9_Q;W:ZQ;`:mQ<W#SR=v>SR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:rY,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[cY],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Wp(Z!b'|0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(X#S$i&j'}0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Wp(Z!b'}0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(V':f$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Wp(Z!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$i&j(Wp(Z!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$i&j(Z!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Z!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(WpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(WpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Wp(Z!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$i&j(o%1l(Wp(Z!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$i&j(Wp(Z!b$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$i&j(Wp(Z!b$]#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$i&j(Wp(Z!b#p(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$i&j$Q(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(z+JY$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$i&j#z(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(Y';W$i&j(WpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$i&j(WpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$i&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$d`$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(WpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$d`(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!l/.^$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!k!Lf$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$i&j(Wp(Z!b(U%&f#q(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$i&j(Wp(Z!b#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$i&j(Wp(Z!br+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!]+Jf$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$i&j(Wp(Z!b!Q.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_![!L^$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$i&j(Wp(Z!b#o(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$i&j(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$i&j(Z!b!X7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$i&j!X7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$i&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$i&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$i&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$i&j(Z!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Z!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Z!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Z!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Z!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$i&j(Wp!X7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$i&j(Wp!X7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Wp!X7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Wp!X7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(WpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$i&j(WpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$i&j(Wp(Z!b!X7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Wp(Z!b!X7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Wp(Z!b!X7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Wp(Z!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$i&j(Wp(Z!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$i&j(Wp(Z!b(O0/l!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$i&j(Wp(Z!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$i&j(Z!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$i&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(Z!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$i&j(WpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(WpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Wp(Z!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$i&j$Q(Ch(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Z#t$i&j(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-<U(Wp(Z!b$n7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$k&j(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#r(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$Q(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#s(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#`*!Y$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#k(Cl$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#s(Ch$f#|$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#s(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#r(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#r(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(r(Ct$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$i&j#{(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!|$Ip$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!S0,v$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$i&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$i&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$i&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$i&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$i&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!Y#)l$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#x(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$i&j(Wp(Z!b(a+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$i&j(Wp(Z!b(T,2j$_#t(e$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$i&j(Wp(Z!b$_#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X!_#Hb(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(y+JY$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z)>v$?V_!^(CdvBr$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Wp(Z!b'|0/l$]#t(T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[aY,sY,oY,lY,2,3,4,5,6,7,8,9,10,11,12,13,14,iY,new Ip("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Ip("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>uY[e]||-1},{term:343,get:e=>dY[e]||-1},{term:95,get:e=>fY[e]||-1}],tokenPrec:15201}),gL=[yr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),yr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),yr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),yr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),yr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),yr(`try {
118
- \${}
119
- } catch (\${error}) {
120
- \${}
121
- }`,{label:"try",detail:"/ catch block",type:"keyword"}),yr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),yr(`if (\${}) {
122
- \${}
123
- } else {
124
- \${}
125
- }`,{label:"if",detail:"/ else block",type:"keyword"}),yr(`class \${name} {
126
- constructor(\${params}) {
127
- \${}
128
- }
129
- }`,{label:"class",detail:"definition",type:"keyword"}),yr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),yr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],mY=gL.concat([yr("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),yr("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),yr("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),GE=new r5,vL=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function sd(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}var pY=["FunctionDeclaration"],gY={FunctionDeclaration:sd("function"),ClassDeclaration:sd("class"),ClassExpression:()=>!0,EnumDeclaration:sd("constant"),TypeAliasDeclaration:sd("type"),NamespaceDeclaration:sd("namespace"),VariableDefinition(e,t){e.matchContext(pY)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function OL(e,t){let n=GE.get(t);if(n)return n;let r=[],i=!0;function a(s,o){let c=e.sliceString(s.from,s.to);r.push({label:c,type:o})}return t.cursor(_t.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let o=gY[s.name];if(o&&o(s,a)||vL.has(s.name))return!1}else if(s.to-s.from>8192){for(let o of OL(e,s.node))r.push(o);return!1}}),GE.set(t,r),r}var KE=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,bL=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function vY(e){let t=$n(e.state).resolveInner(e.pos,-1);if(bL.indexOf(t.name)>-1)return null;let n=t.name=="VariableName"||t.to-t.from<20&&KE.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let i=t;i;i=i.parent)vL.has(i.name)&&(r=r.concat(OL(e.state.doc,i)));return{options:r,from:n?t.from:e.pos,validFor:KE}}var ca=xg.define({name:"javascript",parser:hY.configure({props:[qf.add({IfStatement:xc({except:/^\s*({|else\b)/}),TryStatement:xc({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:z7,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:L7({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":xc({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Yc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Fx,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name=="JSXSelfClosingTag")return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){var t;let n=(t=e.firstChild)===null||t===void 0?void 0:t.nextSibling,r=e.lastChild;return!n||n.type.isError?null:{from:n.to,to:r.type.isError?e.to:r.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),yL={test:e=>/^JSX/.test(e.name),facet:Ux({commentTokens:{block:{open:"{/*",close:"*/}"}}})},SL=ca.configure({dialect:"ts"},"typescript"),xL=ca.configure({dialect:"jsx",props:[Yx.add(e=>e.isTop?[yL]:void 0)]}),_L=ca.configure({dialect:"jsx ts",props:[Yx.add(e=>e.isTop?[yL]:void 0)]},"typescript"),wL=e=>({label:e,type:"keyword"}),kL="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(wL),OY=kL.concat(["declare","implements","private","protected","public"].map(wL));function bY(e={}){let t=e.jsx?e.typescript?_L:xL:e.typescript?SL:ca,n=e.typescript?mY.concat(OY):gL.concat(kL);return new Lc(t,[ca.data.of({autocomplete:OV(bL,vV(n))}),ca.data.of({autocomplete:vY}),e.jsx?xY:[]])}function yY(e){for(;;){if(e.name=="JSXOpenTag"||e.name=="JSXSelfClosingTag"||e.name=="JSXFragmentTag")return e;if(e.name=="JSXEscape"||!e.parent)return null;e=e.parent}}function JE(e,t,n=e.length){for(let r=t==null?void 0:t.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return e.sliceString(r.from,Math.min(r.to,n));return""}var SY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),xY=Ie.inputHandler.of((e,t,n,r,i)=>{if((SY?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=">"&&r!="/"||!ca.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:s}=a,o=s.changeByRange(c=>{var d;let{head:f}=c,m=$n(s).resolveInner(f-1,-1),p;if(m.name=="JSXStartTag"&&(m=m.parent),!(s.doc.sliceString(f-1,f)!=r||m.name=="JSXAttributeValue"&&m.to>f)){if(r==">"&&m.name=="JSXFragmentTag")return{range:c,changes:{from:f,insert:"</>"}};if(r=="/"&&m.name=="JSXStartCloseTag"){let v=m.parent,b=v.parent;if(b&&v.from==f-2&&((p=JE(s.doc,b.firstChild,f))||((d=b.firstChild)===null||d===void 0?void 0:d.name)=="JSXFragmentTag")){let S=`${p}>`;return{range:Ce.cursor(f+S.length,-1),changes:{from:f,insert:S}}}}else if(r==">"){let v=yY(m);if(v&&v.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(s.doc.sliceString(f,f+2))&&(p=JE(s.doc,v,f)))return{range:c,changes:{from:f,insert:`</${p}>`}}}}return{range:c}});return o.changes.empty?!1:(e.dispatch([a,s.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),od=["_blank","_self","_top","_parent"],Yb=["ascii","utf-8","utf-16","latin1","latin1"],Fb=["get","post","put","delete"],Wb=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],zr=["true","false"],Ne={},_Y={a:{attrs:{href:null,ping:null,type:null,media:null,target:od,hreflang:null}},abbr:Ne,address:Ne,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ne,aside:Ne,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ne,base:{attrs:{href:null,target:od}},bdi:Ne,bdo:Ne,blockquote:{attrs:{cite:null}},body:Ne,br:Ne,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Wb,formmethod:Fb,formnovalidate:["novalidate"],formtarget:od,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ne,center:Ne,cite:Ne,code:Ne,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Ne,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ne,div:Ne,dl:Ne,dt:Ne,em:Ne,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ne,figure:Ne,footer:Ne,form:{attrs:{action:null,name:null,"accept-charset":Yb,autocomplete:["on","off"],enctype:Wb,method:Fb,novalidate:["novalidate"],target:od}},h1:Ne,h2:Ne,h3:Ne,h4:Ne,h5:Ne,h6:Ne,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ne,hgroup:Ne,hr:Ne,html:{attrs:{manifest:null}},i:Ne,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Wb,formmethod:Fb,formnovalidate:["novalidate"],formtarget:od,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Ne,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ne,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Ne,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Yb,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Ne,noscript:Ne,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Ne,param:{attrs:{name:null,value:null}},pre:Ne,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ne,rt:Ne,ruby:Ne,samp:Ne,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Yb}},section:Ne,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ne,source:{attrs:{src:null,type:null,media:null}},span:Ne,strong:Ne,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ne,summary:Ne,sup:Ne,table:Ne,tbody:Ne,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ne,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Ne,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ne,time:{attrs:{datetime:null}},title:Ne,tr:Ne,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ne,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Ne},jL={accesskey:null,class:null,contenteditable:zr,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:zr,autocorrect:zr,autocapitalize:zr,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":zr,"aria-autocomplete":["inline","list","both","none"],"aria-busy":zr,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":zr,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":zr,"aria-hidden":zr,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":zr,"aria-multiselectable":zr,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":zr,"aria-relevant":null,"aria-required":zr,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},TL="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of TL)jL[e]=null;var pf=class{constructor(e,t){this.tags={..._Y,...e},this.globalAttrs={...jL,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};pf.default=new pf;function zc(e,t,n=e.length){if(!t)return"";let r=t.firstChild,i=r&&r.getChild("TagName");return i?e.sliceString(i.from,Math.min(i.to,n)):""}function Ic(e,t=!1){for(;e;e=e.parent)if(e.name=="Element")if(t)t=!1;else return e;return null}function EL(e,t,n){let r=n.tags[zc(e,Ic(t))];return(r==null?void 0:r.children)||n.allTags}function l_(e,t){let n=[];for(let r=Ic(t);r&&!r.type.isTop;r=Ic(r.parent)){let i=zc(e,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(t.name=="EndTag"||t.from>=r.firstChild.to)&&n.push(i)}return n}var CL=/^[:\-\.\w\u00b7-\uffff]*$/;function eC(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?"":">",s=Ic(n,n.name=="StartTag"||n.name=="TagName");return{from:r,to:i,options:EL(e.doc,s,t).map(o=>({label:o,type:"type"})).concat(l_(e.doc,n).map((o,c)=>({label:"/"+o,apply:"/"+o+a,type:"type",boost:99-c}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function tC(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:l_(e.doc,t).map((a,s)=>({label:a,apply:a+i,type:"type",boost:99-s})),validFor:CL}}function wY(e,t,n,r){let i=[],a=0;for(let s of EL(e.doc,n,t))i.push({label:"<"+s,type:"type"});for(let s of l_(e.doc,n))i.push({label:"</"+s+">",type:"type",boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function kY(e,t,n,r,i){let a=Ic(n),s=a?t.tags[zc(e.doc,a)]:null,o=s&&s.attrs?Object.keys(s.attrs):[],c=s&&s.globalAttrs===!1?o:o.length?o.concat(t.globalAttrNames):t.globalAttrNames;return{from:r,to:i,options:c.map(d=>({label:d,type:"property"})),validFor:CL}}function jY(e,t,n,r,i){var a;let s=(a=n.parent)===null||a===void 0?void 0:a.getChild("AttributeName"),o=[],c;if(s){let d=e.sliceDoc(s.from,s.to),f=t.globalAttrs[d];if(!f){let m=Ic(n),p=m?t.tags[zc(e.doc,m)]:null;f=(p==null?void 0:p.attrs)&&p.attrs[d]}if(f){let m=e.sliceDoc(r,i).toLowerCase(),p='"',v='"';/^['"]/.test(m)?(c=m[0]=='"'?/^[^"]*$/:/^[^']*$/,p="",v=e.sliceDoc(i,i+1)==m[0]?"":m[0],m=m.slice(1),r++):c=/^[^\s<>='"]*$/;for(let b of f)o.push({label:b,apply:p+b+v,type:"constant"})}}return{from:r,to:i,options:o,validFor:c}}function AL(e,t){let{state:n,pos:r}=t,i=$n(n).resolveInner(r,-1),a=i.resolve(r);for(let s=r,o;a==i&&(o=i.childBefore(s));){let c=o.lastChild;if(!c||!c.type.isError||c.from<c.to)break;a=i=o,s=c.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?tC(n,i,i.from,r):eC(n,e,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?eC(n,e,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?tC(n,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?kY(n,e,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?jY(n,e,i,i.name=="Is"?r:i.from,r):t.explicit&&(a.name=="Element"||a.name=="Text"||a.name=="Document")?wY(n,e,i,r):null}function TY(e){return AL(pf.default,e)}function EY(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new pf(t,n):pf.default;return i=>AL(r,i)}var CY=ca.parser.configure({top:"SingleExpression"}),PL=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:SL.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:xL.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:_L.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:CY},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:ca.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:Bp.parser}],QL=[{name:"style",parser:Bp.parser.configure({top:"Styles"})}].concat(TL.map(e=>({name:e,parser:ca.parser}))),NL=xg.define({name:"html",parser:e8.configure({props:[qf.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let r=e.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;t=r=i}return t&&!((n=t.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?e.lineIndent(t.from)+e.unit:null}}),Yc.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:n.name=="CloseTag"?n.from:e.to}}}),Z7.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),pp=NL.configure({wrap:cL(PL,QL)});function AY(e={}){let t="",n;e.matchClosingTags===!1&&(t="noMatch"),e.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=cL((e.nestedLanguages||[]).concat(PL),(e.nestedAttributes||[]).concat(QL)));let r=n?NL.configure({wrap:n,dialect:t}):t?pp.configure({dialect:t}):pp;return new Lc(r,[pp.data.of({autocomplete:EY(e)}),e.autoCloseTags!==!1?PY:[],bY().support,L8().support])}var nC=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),PY=Ie.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=">"&&r!="/"||!pp.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:s}=a,o=s.changeByRange(c=>{var d,f,m;let p=s.doc.sliceString(c.from-1,c.to)==r,{head:v}=c,b=$n(s).resolveInner(v,-1),S;if(p&&r==">"&&b.name=="EndTag"){let x=b.parent;if(((f=(d=x.parent)===null||d===void 0?void 0:d.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(S=zc(s.doc,x.parent,v))&&!nC.has(S)){let w=v+(s.doc.sliceString(v,v+1)===">"?1:0),j=`</${S}>`;return{range:c,changes:{from:v,to:w,insert:j}}}}else if(p&&r=="/"&&b.name=="IncompleteCloseTag"){let x=b.parent;if(b.from==v-2&&((m=x.lastChild)===null||m===void 0?void 0:m.name)!="CloseTag"&&(S=zc(s.doc,x,v))&&!nC.has(S)){let w=v+(s.doc.sliceString(v,v+1)===">"?1:0),j=`${S}>`;return{range:Ce.cursor(v+j.length,-1),changes:{from:v,to:w,insert:j}}}}return{range:c}});return o.changes.empty?!1:(e.dispatch([a,s.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),RL=Ux({commentTokens:{block:{open:"<!--",close:"-->"}}}),ML=new nt,LL=UV.configure({props:[Yc.add(e=>!e.is("Block")||e.is("Document")||iS(e)!=null||QY(e)?void 0:(t,n)=>({from:n.doc.lineAt(t.from).to,to:t.to})),ML.add(iS),qf.add({Document:()=>null}),Yo.add({Document:RL})]});function iS(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function QY(e){return e.name=="OrderedList"||e.name=="BulletList"}function NY(e,t){let n=e;for(;;){let r=n.nextSibling,i;if(!r||(i=iS(r.type))!=null&&i<=t)break;n=r}return n.to}var RY=I7.of((e,t,n)=>{for(let r=$n(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let i=r.type.prop(ML);if(i==null)continue;let a=NY(r,i);if(a>n)return{from:n,to:a}}return null});function c_(e){return new ui(RL,e,[],"markdown")}var MY=c_(LL),LY=LL.configure([rU,aU,iU,sU,{props:[Yc.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),Xp=c_(LY);function DY(e,t){return n=>{if(n&&e){let r=null;if(n=/\S*/.exec(n)[0],typeof e=="function"?r=e(n):r=lE.matchLanguageName(e,n,!0),r instanceof lE)return r.support?r.support.language.parser:l5.getSkippingParser(r.load());if(r)return r.parser}return t?t.parser:null}}var Hb=class{constructor(e,t,n,r,i,a,s){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=s}blank(e,t=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length<e;)n+=" ";return n}else{for(let r=this.to-this.from-n.length-this.spaceAfter.length;r>0;r--)n+=" ";return n+(t?this.spaceAfter:"")}}marker(e,t){let n=this.node.name=="OrderedList"?String(+zL(this.item,e)[2]+t):"";return this.spaceBefore+n+this.type+this.spaceAfter}};function DL(e,t){let n=[],r=[];for(let i=e;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&n.push(i)}for(let i=n.length-1;i>=0;i--){let a=n[i],s,o=t.lineAt(a.from),c=a.from-o.from;if(a.name=="Blockquote"&&(s=/^ *>( ?)/.exec(o.text.slice(c))))r.push(new Hb(a,c,c+s[0].length,"",s[1],">",null));else if(a.name=="ListItem"&&a.parent.name=="OrderedList"&&(s=/^( *)\d+([.)])( *)/.exec(o.text.slice(c)))){let d=s[3],f=s[0].length;d.length>=4&&(d=d.slice(0,d.length-4),f-=4),r.push(new Hb(a.parent,c,c+f,s[1],d,s[2],a))}else if(a.name=="ListItem"&&a.parent.name=="BulletList"&&(s=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(c)))){let d=s[4],f=s[0].length;d.length>4&&(d=d.slice(0,d.length-4),f-=4);let m=s[2];s[3]&&(m+=s[3].replace(/[xX]/," ")),r.push(new Hb(a.parent,c,c+f,s[1],d,m,a))}}return r}function zL(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function Gb(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name=="ListItem"){let o=zL(a,t),c=+o[2];if(i>=0){if(c!=i+1)return;n.push({from:a.from+o[1].length,to:a.from+o[0].length,insert:String(i+2+r)})}i=c}let s=a.nextSibling;if(!s)break;a=s}}function u_(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(d5)!=" ")return e;let r=ef(e,4,n),i="";for(let a=r;a>0;)a>=4?(i+=" ",a-=4):(i+=" ",a--);return i+e.slice(n)}var zY=(e={})=>({state:t,dispatch:n})=>{let r=$n(t),{doc:i}=t,a=null,s=t.changeByRange(o=>{if(!o.empty||!Xp.isActiveAt(t,o.from,-1)&&!Xp.isActiveAt(t,o.from,1))return a={range:o};let c=o.from,d=i.lineAt(c),f=DL(r.resolveInner(c,-1),i);for(;f.length&&f[f.length-1].from>c-d.from;)f.pop();if(!f.length)return a={range:o};let m=f[f.length-1];if(m.to-m.spaceAfter.length>c-d.from)return a={range:o};let p=c>=m.to-m.spaceAfter.length&&!/\S/.test(d.text.slice(m.to));if(m.item&&p){let w=m.node.firstChild,j=m.node.getChild("ListItem","ListItem");if(w.to>=c||j&&j.to<c||d.from>0&&!/[^\s>]/.test(i.lineAt(d.from-1).text)||e.nonTightLists===!1){let T=f.length>1?f[f.length-2]:null,A,Q="";T&&T.item?(A=d.from+T.from,Q=T.marker(i,1)):A=d.from+(T?T.to:0);let C=[{from:A,to:c,insert:Q}];return m.node.name=="OrderedList"&&Gb(m.item,i,C,-2),T&&T.node.name=="OrderedList"&&Gb(T.item,i,C),{range:Ce.cursor(A+Q.length),changes:C}}else{let T=iC(f,t,d);return{range:Ce.cursor(c+T.length+1),changes:{from:d.from,insert:T+t.lineBreak}}}}if(m.node.name=="Blockquote"&&p&&d.from){let w=i.lineAt(d.from-1),j=/>\s*$/.exec(w.text);if(j&&j.index==m.from){let T=t.changes([{from:w.from+j.index,to:w.to},{from:d.from+m.from,to:d.to}]);return{range:o.map(T),changes:T}}}let v=[];m.node.name=="OrderedList"&&Gb(m.item,i,v);let b=m.item&&m.item.from<d.from,S="";if(!b||/^[\s\d.)\-+*>]*/.exec(d.text)[0].length>=m.to)for(let w=0,j=f.length-1;w<=j;w++)S+=w==j&&!b?f[w].marker(i,1):f[w].blank(w<j?ef(d.text,4,f[w+1].from)-S.length:null);let x=c;for(;x>d.from&&/\s/.test(d.text.charAt(x-d.from-1));)x--;return S=u_(S,t),qY(m.node,t.doc)&&(S=iC(f,t,d)+t.lineBreak+S),v.push({from:x,to:c,insert:t.lineBreak+S}),{range:Ce.cursor(x+S.length+1),changes:v}});return a?!1:(n(t.update(s,{scrollIntoView:!0,userEvent:"input"})),!0)},IY=zY();function rC(e){return e.name=="QuoteMark"||e.name=="ListMark"}function qY(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let n=e.firstChild,r=e.getChild("ListItem","ListItem");if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),s=/^[\s>]*$/.test(i.text);return i.number+(s?0:1)<a.number}function iC(e,t,n){let r="";for(let i=0,a=e.length-2;i<=a;i++)r+=e[i].blank(i<a?ef(n.text,4,e[i+1].from)-r.length:null,i<a);return u_(r,t)}function BY(e,t){let n=e.resolveInner(t,-1),r=t;rC(n)&&(r=n.from,n=n.parent);for(let i;i=n.childBefore(r);)if(rC(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")n=i.lastChild,r=n.to;else break;return n}var XY=({state:e,dispatch:t})=>{let n=$n(e),r=null,i=e.changeByRange(a=>{let s=a.from,{doc:o}=e;if(a.empty&&Xp.isActiveAt(e,a.from)){let c=o.lineAt(s),d=DL(BY(n,s),o);if(d.length){let f=d[d.length-1],m=f.to-f.spaceAfter.length+(f.spaceAfter?1:0);if(s-c.from>m&&!/\S/.test(c.text.slice(m,s-c.from)))return{range:Ce.cursor(c.from+m),changes:{from:c.from+m,to:s}};if(s-c.from==m&&(!f.item||c.from<=f.item.from||!/\S/.test(c.text.slice(0,f.to)))){let p=c.from+f.from;if(f.item&&f.node.from<f.item.from&&/\S/.test(c.text.slice(f.from,f.to))){let v=f.blank(ef(c.text,4,f.to)-ef(c.text,4,f.from));return p==c.from&&(v=u_(v,e)),{range:Ce.cursor(p+v.length),changes:{from:p,to:c.from+f.to,insert:v}}}if(p<s)return{range:Ce.cursor(p),changes:{from:p,to:s}}}}}return r={range:a}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},ZY=[{key:"Enter",run:IY},{key:"Backspace",run:XY}],IL=AY({matchClosingTags:!1});function $Y(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=MY,completeHTMLTags:a=!0,pasteURLAsLink:s=!0,htmlTagLanguage:o=IL}=e;if(!(i instanceof I5))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],d=[o.support,RY],f;s&&d.push(FY),n instanceof Lc?(d.push(n.support),f=n.language):n&&(f=n);let m=t||f?DY(t,f):void 0;c.push(FV({codeParser:m,htmlParser:o.language.parser})),r&&d.push(zf.high(Bx.of(ZY)));let p=c_(i.configure(c));return a&&d.push(p.data.of({autocomplete:VY})),new Lc(p,d)}function VY(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=$n(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:n-r[0].length,to:n,options:UY(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var Kb=null;function UY(){if(Kb)return Kb;let e=TY(new pV(tn.create({extensions:IL}),0,!0));return Kb=e?e.options:[]}var YY=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,FY=Ie.domEventHandlers({paste:(e,t)=>{var n;let{main:r}=t.state.selection;if(r.empty)return!1;let i=(n=e.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!Xp.isActiveAt(t.state,r.from,1)))return!1;let a=$n(t.state),s=!1;return a.iterate({from:r.from,to:r.to,enter:o=>{(o.from>r.from||YY.test(o.name))&&(s=!0)},leave:o=>{o.to<r.to&&(s=!0)}}),s?!1:(t.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});function qL(e,t,n={}){if(!e)return!1;const{pulse:r=!1,behavior:i="smooth"}=n,a=t.querySelector(`[data-annotation-id="${CSS.escape(e)}"]`);if(!a)return!1;const s=a.closest(".semiont-browse-view__content")||a.closest(".semiont-annotate-view__content")||a.closest(".semiont-document-viewer__scrollable-body");if(s){const o=a.getBoundingClientRect(),c=s.getBoundingClientRect();if(!(o.top>=c.top&&o.bottom<=c.bottom)){const f=a.offsetTop,m=s.clientHeight,p=a.offsetHeight,v=f-m/2+p/2;s.scrollTo({top:v,behavior:i})}}return r&&(a.classList.add("annotation-pulse"),setTimeout(()=>{a.classList.remove("annotation-pulse")},2e3)),!0}function WY(e,t){if(!t.includes(`\r
130
- `))return e;const n=[];for(let i=0;i<t.length-1;i++)t[i]==="\r"&&t[i+1]===`
131
- `&&n.push(i);const r=i=>{let a=0,s=n.length;for(;a<s;){const o=a+s>>>1;n[o]<i?a=o+1:s=o}return i-a};return e.map(i=>({...i,start:r(i.start),end:r(i.end)}))}function HY(e){const t=ao(e),n=sl(e),r=Xc(e),i=ol(e),a=hi(e),s=MS(e);return t?"Comment":n?"Highlight":r?"Assessment":i?"Tag":s?"Resolved Reference":a?"Unresolved Reference":"Annotation"}function GY(e,t){var f;const n=((f=Object.values(cr).find(m=>m.matchesAnnotation(e)))==null?void 0:f.className)||"annotation-highlight",r=t?`${n} annotation-sparkle`:n,i=sl(e),a=hi(e),s=ao(e),o=Xc(e),c=ol(e);let d="highlight";return s?d="comment":a?d="reference":o?d="assessment":c?d="tag":i&&(d="highlight"),{className:r,annotationType:d,annotationId:e.id,tooltip:HY(e)}}function KY(e,t){return e.filter(n=>n.annotation).sort((n,r)=>n.start-r.start).map(n=>{const r=n.annotation,i=(t==null?void 0:t.has(r.id))||!1;return{start:n.start,end:n.end,meta:GY(r,i)}})}function JY(e,t,n){return e.filter(r=>r.annotation&&hi(r.annotation)).sort((r,i)=>r.end-i.end).map(r=>{const i=r.annotation,a=Ya(i.body),s=a?n==null?void 0:n(a):void 0,o=t?i.id===t:!1;return{annotationId:i.id,position:r.end,targetName:s,isGenerating:o,bodySource:a??void 0}})}function eF(e,t,n){const r=e.closest("[data-annotation-id]"),i=r==null?void 0:r.getAttribute("data-annotation-id");if(!i)return!1;const a=t.get(i);return a!=null&&a.annotation?(n.client.browse.click(Gn(i),a.annotation.motivation),!0):!1}function tF(e){const t=e.closest(".reference-preview-widget");if(!t||t.dataset.widgetGenerating==="true")return{handled:!1};const n=t.dataset.widgetAnnotationId,r=t.dataset.widgetBodySource,i=t.dataset.widgetResolved==="true";return n?i&&r?{handled:!0,action:"navigate",resourceId:r,annotationId:n}:{handled:!0,action:"browse-click",annotationId:n,motivation:t.dataset.widgetMotivation||"linking"}:{handled:!1}}function nF(e,t){e.handled&&(e.action==="navigate"&&e.resourceId?t.client.browse.navigateReference(Sr(e.resourceId)):e.action==="browse-click"&&e.annotationId&&t.client.browse.click(Gn(e.annotationId),e.motivation||"linking"))}function rF(e){const t=e.closest(".reference-preview-widget");if(!t||t.dataset.widgetGenerating==="true")return{showPreview:!1,widget:null};const n=t.querySelector(".reference-indicator");return n&&(n.style.opacity="1"),t.dataset.widgetResolved==="true"&&t.dataset.widgetTargetName?{showPreview:!0,targetName:t.dataset.widgetTargetName,widget:t}:{showPreview:!1,widget:t}}function iF(e){const t=e.closest(".reference-preview-widget");if(!t)return{hidePreview:!1,widget:null};const n=t.querySelector(".reference-indicator");return n&&(n.style.opacity="0.6"),t.dataset.widgetResolved==="true"?{hidePreview:!0,widget:t}:{hidePreview:!1,widget:t}}var BL=on.define(),XL=on.define();function aF(e,t){const n=new Jd,r=KY(e,t);for(const{start:i,end:a,meta:s}of r){const o=Ut.mark({class:s.className,attributes:{"data-annotation-id":s.annotationId,"data-annotation-type":s.annotationType,title:s.tooltip}});n.add(i,a,o)}return n.finish()}function sF(){return ho.define({create(){return Ut.none},update(e,t){e=e.map(t.changes);for(const n of t.effects)n.is(BL)&&(e=aF(n.value.segments,n.value.newAnnotationIds));return e},provide:e=>Ie.decorations.from(e)})}function oF(e,t,n,r){const i=new Jd,a=JY(t,n,r),s=new Map;for(const o of t)o.annotation&&hi(o.annotation)&&s.set(o.end,o);for(const o of a){const c=s.get(o.position);if(!(c!=null&&c.annotation))continue;const d=new Y7(c.annotation,o.targetName,o.isGenerating);i.add(o.position,o.position,Ut.widget({widget:d,side:1}))}return i.finish()}var lF=ho.define({create(){return Ut.none},update(e,t){e=e.map(t.changes);for(const n of t.effects)n.is(XL)&&(e=oF(n.value.content,n.value.segments,n.value.generatingReferenceId,n.value.getTargetResourceName));return e},provide:e=>Ie.decorations.from(e)});function ZL({content:e,segments:t=[],onChange:n,editable:r=!1,newAnnotationIds:i,hoveredAnnotationId:a,scrollToAnnotationId:s,sourceView:o=!1,showLineNumbers:c=!1,enableWidgets:d=!1,session:f,getTargetResourceName:m,generatingReferenceId:p,hoverDelayMs:v}){const b=k.useRef(null),S=k.useRef(null),x=k.useRef(e),w=WY(t,e),j=k.useRef(w),T=k.useRef(new Map),A=k.useRef(new Cx),Q=k.useRef(f),C=k.useRef(m);j.current=t;const R=new Map;for(const L of t)L.annotation&&R.set(L.annotation.id,L);T.current=R,Q.current=f,C.current=m,k.useEffect(()=>{if(!b.current||S.current)return;const L=sF(),P=tn.create({doc:e,extensions:[$Y(),A.current.of(c?Lp():[]),Ie.editable.of(r),Ie.lineWrapping,L,d?lF:[],Ie.updateListener.of(ce=>{if(ce.docChanged&&n){const se=ce.state.doc.toString();x.current=se,n(se)}}),Ie.domEventHandlers({click:(ce,se)=>{const N=ce.target;return Q.current&&eF(N,T.current,Q.current)?(ce.preventDefault(),!0):!1}}),Ie.baseTheme({"&.cm-editor":{height:"100%",outline:"none"},"&.cm-editor.cm-focused":{outline:"none"},".cm-scroller":{overflow:"visible !important",height:"auto !important"},".cm-content, .cm-gutters":{minHeight:"0 !important"},".cm-content":{padding:o?"1rem":"0",fontFamily:o?"ui-monospace, monospace":"inherit",fontSize:o?"0.875rem":"inherit",lineHeight:"1.6",whiteSpace:o?"pre-wrap":"pre",caretColor:"var(--cm-cursor-color, #000000)"},".cm-line":{padding:"0",wordBreak:o?"break-word":"normal"},".cm-gutters":{backgroundColor:"transparent",border:"none",paddingRight:"0.5rem"},".cm-lineNumbers .cm-gutterElement":{minWidth:"2rem",color:"rgb(156, 163, 175)",opacity:"0.7"}})]}),Z=new Ie({state:P,parent:b.current});S.current=Z,x.current=e,b.current.__cmView=Z;const X=Z.dom,{handleMouseEnter:B,handleMouseLeave:Y,cleanup:H}=WS(ce=>{var se;return(se=Q.current)==null?void 0:se.client.beckon.hover(ce)},v),q=ce=>{const N=ce.target.closest("[data-annotation-id]"),le=N==null?void 0:N.getAttribute("data-annotation-id");le&&B(Gn(le))},I=ce=>{ce.target.closest("[data-annotation-id]")&&Y()},ee=ce=>{const se=ce.target,N=tF(se);N.handled&&(ce.preventDefault(),ce.stopPropagation(),Q.current&&nF(N,Q.current))},W=ce=>{const se=ce.target,N=rF(se);N.showPreview&&N.targetName&&N.widget&&F7(N.widget,N.targetName)},z=ce=>{const se=ce.target,N=iF(se);N.hidePreview&&N.widget&&W7(N.widget)};return X.addEventListener("mouseover",q),X.addEventListener("mouseout",I),X.addEventListener("click",ee),X.addEventListener("mouseenter",W,!0),X.addEventListener("mouseleave",z,!0),()=>{X.removeEventListener("mouseover",q),X.removeEventListener("mouseout",I),X.removeEventListener("click",ee),X.removeEventListener("mouseenter",W,!0),X.removeEventListener("mouseleave",z,!0),H(),Z.destroy(),S.current=null}},[v]),k.useEffect(()=>{if(!S.current)return;const L=S.current.state.doc.toString();if(e===L)return;const P=S.current.state.selection.main;S.current.dispatch({changes:{from:0,to:S.current.state.doc.length,insert:e},selection:P.from<=e.length?P:void 0}),x.current=e},[e]),k.useEffect(()=>{S.current&&S.current.dispatch({effects:A.current.reconfigure(c?Lp():[])})},[c]),k.useEffect(()=>{S.current&&S.current.dispatch({effects:BL.of({segments:w,...i&&{newAnnotationIds:i}})})},[w,i]),k.useEffect(()=>{!S.current||!d||S.current.dispatch({effects:XL.of({content:e,segments:w,generatingReferenceId:p,getTargetResourceName:C.current})})},[e,w,d,p]),k.useEffect(()=>{if(!S.current||!a)return;const P=S.current.contentDOM.querySelector(`[data-annotation-id="${CSS.escape(a)}"]`);if(!P)return;const Z=P.closest(".semiont-annotate-view__content")||P.closest(".semiont-document-viewer__scrollable-body");if(Z){const B=P.getBoundingClientRect(),Y=Z.getBoundingClientRect();if(!(B.top>=Y.top&&B.bottom<=Y.bottom)){const q=P.offsetTop,I=Z.clientHeight,ee=P.offsetHeight,W=q-I/2+ee/2;Z.scrollTo({top:W,behavior:"smooth"})}}const X=setTimeout(()=>{P.classList.add("annotation-pulse")},100);return()=>{clearTimeout(X),P.classList.remove("annotation-pulse")}},[a]),k.useEffect(()=>{!S.current||!s||qL(s,S.current.contentDOM)},[s]);const D=o?"semiont-codemirror semiont-codemirror--source":"semiont-codemirror";return g.jsx("div",{ref:b,className:D,"data-markdown-container":!0})}function cF({progress:e,annotationType:t="reference"}){const n=hn("ReferencesPanel"),r=Me(ot().activeSession$),i=()=>{r==null||r.client.job.cancelRequest("annotation")};return e?g.jsxs("div",{className:"semiont-annotation-progress","data-status":e.stage,"data-type":t,children:[g.jsxs("div",{className:"semiont-annotation-header",children:[g.jsxs("h3",{className:"semiont-annotation-title",children:[g.jsx("span",{className:"semiont-annotation-sparkle",children:"✨"}),n("annotationProgressTitle")]}),e.stage!=="complete"&&g.jsx("button",{onClick:i,className:"semiont-annotation-cancel",title:n("cancelAnnotation"),children:"✕"})]}),e.requestParams&&e.requestParams.length>0&&g.jsxs("div",{className:"semiont-annotation-progress__params",children:[g.jsx("div",{className:"semiont-annotation-progress__params-title",children:"Request Parameters:"}),e.requestParams.map((a,s)=>g.jsxs("div",{className:"semiont-annotation-progress__param",children:[g.jsxs("span",{className:"semiont-annotation-progress__param-label",children:[a.label,":"]})," ",a.value]},s))]}),e.completedEntityTypes&&e.completedEntityTypes.length>0&&g.jsx("div",{className:"semiont-annotation-log",children:e.completedEntityTypes.map((a,s)=>g.jsxs("div",{className:"semiont-annotation-log-item",children:[g.jsx("span",{className:"semiont-annotation-check",children:"✓"}),g.jsxs("span",{className:"semiont-annotation-entity-type",children:[a.entityType,":"]}),g.jsx("span",{children:n("found",{count:a.foundCount})})]},s))}),g.jsxs("div",{className:"semiont-annotation-progress__status",children:[e.stage==="complete"?g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✅"}),g.jsx("span",{children:n("complete")})]}):e.stage==="error"?g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"❌"}),g.jsx("span",{children:e.message||n("failed")})]}):g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✨"}),g.jsx("span",{children:e.message||(e.currentEntityType?n("current",{entityType:e.currentEntityType}):n("annotating"))})]}),e.currentEntityType&&e.stage!=="complete"&&e.stage!=="error"&&g.jsxs("div",{className:"semiont-annotation-progress__details",children:["Processing: ",e.currentEntityType]})]})]}):null}var uF=class extends k.Component{constructor(t){super(t);he(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null})});this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t,errorInfo:null}}componentDidCatch(t,n){this.props.onError&&this.props.onError(t,n),this.setState({errorInfo:n})}render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback(this.state.error,this.handleReset):g.jsx(dF,{error:this.state.error,reset:this.handleReset}):this.props.children}};function dF({error:e,reset:t}){return g.jsx("div",{className:"semiont-error-boundary-container",children:g.jsxs("div",{className:"semiont-error-boundary-content",children:[g.jsxs("div",{className:"semiont-error-boundary-header",children:[g.jsx("h2",{className:"semiont-error-boundary-title",children:"Oops! Something went wrong"}),g.jsx("p",{className:"semiont-error-boundary-message",children:"We encountered an unexpected error. Please try again."})]}),!1,g.jsxs("div",{className:"semiont-error-boundary-actions",children:[g.jsx("button",{onClick:t,className:"semiont-button","data-variant":"primary",children:"Try Again"}),g.jsx("button",{onClick:()=>window.location.href="/",className:"semiont-button","data-variant":"secondary",children:"Go Home"})]})]})})}function fF({children:e,resetKeys:t}){return g.jsx(x$,{FallbackComponent:hF,onError:(n,r)=>{},...t&&{resetKeys:t},children:e})}function hF({error:e,resetErrorBoundary:t}){return g.jsx("div",{className:"min-h-[400px] flex items-center justify-center p-4",children:g.jsxs("div",{className:"max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[g.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[g.jsx("div",{className:"flex-shrink-0 w-10 h-10 bg-red-100 dark:bg-red-900/30 rounded-full flex items-center justify-center",children:g.jsx("svg",{className:"w-6 h-6 text-red-600 dark:text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),g.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Something went wrong"})]}),g.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:"An unexpected error occurred. Try again, or refresh the page."}),!1,g.jsxs("div",{className:"flex gap-3",children:[g.jsx("button",{onClick:t,className:"flex-1 px-4 py-2 text-gray-700 dark:text-gray-200 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:"Try Again"}),g.jsx("button",{onClick:()=>window.location.reload(),className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Refresh Page"})]})]})})}function mF({onResize:e,minWidth:t,maxWidth:n,position:r="left",ariaLabel:i="Resize panel"}){const[a,s]=k.useState(!1),o=k.useRef(0),c=k.useRef(0),d=k.useRef(e);k.useEffect(()=>{d.current=e});const f=k.useCallback(b=>{b.preventDefault(),s(!0),o.current=b.clientX;const S=b.target.parentElement;S&&(c.current=S.offsetWidth)},[]),m=k.useCallback(b=>{if(!a)return;const S=b.clientX-o.current,x=r==="left"?-S:S,w=c.current+x,j=Math.max(t,Math.min(n,w));d.current(j)},[a,t,n,r]),p=k.useCallback(()=>{s(!1)},[]),v=k.useCallback(b=>{const S=b.target.parentElement;if(!S)return;const x=S.offsetWidth,w=b.shiftKey?50:10;let j=x;if(r==="left"?b.key==="ArrowLeft"?(j=x+w,b.preventDefault()):b.key==="ArrowRight"&&(j=x-w,b.preventDefault()):b.key==="ArrowRight"?(j=x+w,b.preventDefault()):b.key==="ArrowLeft"&&(j=x-w,b.preventDefault()),j!==x){const T=Math.max(t,Math.min(n,j));d.current(T)}},[t,n,r]);return k.useEffect(()=>{if(a)return document.addEventListener("mousemove",m),document.addEventListener("mouseup",p),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",p),document.body.style.userSelect="",document.body.style.cursor=""}},[a,m,p]),g.jsx("button",{type:"button",className:`semiont-resize-handle semiont-resize-handle--${r} ${a?"semiont-resize-handle--dragging":""}`,onMouseDown:f,onKeyDown:v,"aria-label":i,role:"separator","aria-orientation":"vertical",tabIndex:0})}function $L({context:e,activePanel:t,isArchived:n=!1}){const r=hn("Toolbar"),i=ot(),a=s=>{i.emit("panel:toggle",{panel:s})};return g.jsxs("div",{className:"semiont-toolbar","data-context":e,children:[e==="document"&&g.jsxs(g.Fragment,{children:[!n&&g.jsx("button",{onClick:()=>a("annotations"),className:"semiont-toolbar-button","data-active":t==="annotations","data-panel":"annotations","aria-label":r("annotations"),"aria-pressed":t==="annotations",title:r("annotations"),children:g.jsx("span",{className:"semiont-toolbar-icon semiont-toolbar-icon-large","aria-hidden":"true",children:"A"})}),g.jsx("button",{onClick:()=>a("info"),className:"semiont-toolbar-button","data-active":t==="info","data-panel":"info","aria-label":r("resourceInfo"),"aria-pressed":t==="info",title:r("resourceInfo"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"ℹ️"})}),g.jsx("button",{onClick:()=>a("history"),className:"semiont-toolbar-button","data-active":t==="history","data-panel":"history","aria-label":r("history"),"aria-pressed":t==="history",title:r("history"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"📒"})}),g.jsx("button",{onClick:()=>a("jsonld"),className:"semiont-toolbar-button","data-active":t==="jsonld","data-panel":"jsonld","aria-label":"JSON-LD","aria-pressed":t==="jsonld",title:"JSON-LD",children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"🌐"})}),g.jsx("button",{onClick:()=>a("collaboration"),className:"semiont-toolbar-button","data-active":t==="collaboration","data-panel":"collaboration","aria-label":r("collaboration"),"aria-pressed":t==="collaboration",title:r("collaboration"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"👥"})})]}),g.jsx("button",{onClick:()=>a("knowledge-base"),className:"semiont-toolbar-button","data-active":t==="knowledge-base","data-panel":"knowledge-base","aria-label":r("knowledgeBase"),"aria-pressed":t==="knowledge-base",title:r("knowledgeBase"),children:g.jsx("svg",{className:"semiont-toolbar-icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",width:"20",height:"20",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 5.625c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})})}),g.jsx("button",{onClick:()=>a("user"),className:"semiont-toolbar-button","data-active":t==="user","data-panel":"user","aria-label":r("userAccount"),"aria-pressed":t==="user",title:r("userAccount"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"👤"})}),g.jsx("button",{onClick:()=>a("settings"),className:"semiont-toolbar-button","data-active":t==="settings","data-panel":"settings","aria-label":r("settings"),"aria-pressed":t==="settings",title:r("settings"),children:g.jsx("span",{className:"semiont-toolbar-icon","aria-hidden":"true",children:"⚙️"})})]})}function Fse({showLineNumbers:e,theme:t,locale:n,isPendingLocaleChange:r=!1,hoverDelayMs:i}){const a=hn("Settings"),s=ot(),{announceLanguageChanging:o,announceLanguageChanged:c}=mV(),[d,f]=de.useState(n),m=p=>{var b;const v=((b=mc.find(S=>S.code===p))==null?void 0:b.nativeName)||p;o(v),s.emit("settings:locale-changed",{locale:p})};return k.useEffect(()=>{var p;if(n!==d&&!r){const v=((p=mc.find(b=>b.code===n))==null?void 0:p.nativeName)||n;c(v),f(n)}},[n,d,r]),g.jsxs("div",{className:"semiont-settings-panel",children:[g.jsx("h3",{className:"semiont-settings-panel__title",children:a("title")}),g.jsxs("div",{className:"semiont-settings-panel__content",children:[g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsxs("label",{className:"semiont-toggle-label",children:[g.jsx("span",{className:"semiont-toggle-label__text",children:a("lineNumbers")}),g.jsx("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>s.emit("settings:line-numbers-toggled",void 0),className:`semiont-toggle ${e?"semiont-toggle--active":""}`,children:g.jsx("span",{className:`semiont-toggle__slider ${e?"semiont-toggle__slider--active":""}`})})]}),g.jsx("p",{className:"semiont-form__help",children:a(e?"lineNumbersVisible":"lineNumbersHidden")})]}),g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsx("label",{className:"semiont-form__label",children:a("theme")}),g.jsxs("div",{className:"semiont-settings-panel__button-group",children:[g.jsxs("button",{onClick:()=>s.emit("settings:theme-changed",{theme:"light"}),className:`semiont-panel-button ${t==="light"?"semiont-panel-button-active":""}`,"aria-pressed":t==="light",children:["☀️ ",a("themeLight")]}),g.jsxs("button",{onClick:()=>s.emit("settings:theme-changed",{theme:"dark"}),className:`semiont-panel-button ${t==="dark"?"semiont-panel-button-active":""}`,"aria-pressed":t==="dark",children:["🌙 ",a("themeDark")]}),g.jsxs("button",{onClick:()=>s.emit("settings:theme-changed",{theme:"system"}),className:`semiont-panel-button ${t==="system"?"semiont-panel-button-active":""}`,"aria-pressed":t==="system",children:["💻 ",a("themeSystem")]})]}),g.jsx("p",{className:"semiont-form__help","aria-live":"polite",children:t==="system"?a("themeSystemActive"):a("themeModeActive",{mode:t.charAt(0).toUpperCase()+t.slice(1)})})]}),g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsx("label",{htmlFor:"language-select",className:"semiont-form__label",children:a("language")}),g.jsx("select",{id:"language-select",value:n,onChange:p=>m(p.target.value),disabled:r,className:"semiont-select","aria-busy":r,"aria-describedby":"language-hint",children:mc.map(p=>g.jsx("option",{value:p.code,children:p.nativeName},p.code))}),g.jsx("p",{id:"language-hint",className:"semiont-form__help",children:a("languageHint")}),r&&g.jsx("p",{className:"semiont-settings-panel__loading",role:"status","aria-live":"polite",children:a("languageChanging")})]}),g.jsxs("div",{className:"semiont-settings-panel__field",children:[g.jsx("label",{htmlFor:"hover-delay-slider",className:"semiont-form__label",children:a("hoverDelay")}),g.jsx("input",{id:"hover-delay-slider",type:"range",min:"0",max:"500",step:"50",value:i,onChange:p=>s.emit("settings:hover-delay-changed",{hoverDelayMs:Number(p.target.value)}),className:"semiont-slider","aria-describedby":"hover-delay-description"}),g.jsxs("div",{className:"semiont-slider__labels",children:[g.jsx("span",{children:a("hoverDelayFast")}),g.jsx("span",{children:a("hoverDelaySlow")})]}),g.jsx("p",{id:"hover-delay-description",className:"semiont-form__help",children:a("hoverDelayDescription",{delay:i})})]})]})]})}function qm({label:e,collapsedContent:t,expandedContent:n,isExpanded:r,onHoverChange:i,onPin:a,containerRef:s}){const o=k.useRef(null),c=d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),a())};return g.jsxs("div",{className:"semiont-dropdown-group",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[g.jsx("div",{ref:s,role:"button",tabIndex:0,"aria-haspopup":"true","aria-expanded":r,"aria-label":e,className:"semiont-dropdown-trigger",onClick:a,onKeyDown:c,children:t}),r&&g.jsx("div",{ref:o,role:"menu","aria-orientation":"vertical",className:"semiont-dropdown-menu",children:g.jsxs("div",{className:"semiont-dropdown-content",children:[g.jsx("div",{className:"semiont-dropdown-header",children:e}),n]})})]})}function wc({selectedMotivation:e,selectedClick:t,showSelectionGroup:n=!0,showDeleteButton:r=!0,showShapeGroup:i=!1,selectedShape:a="rectangle",mediaType:s,annotateMode:o=!1,annotators:c}){var Ue,Qe,De,mt,Ve,cn;const d=hn("AnnotateToolbar"),f=Me(ot().activeSession$),m=je=>{const We=Object.values(c).find(ge=>ge.motivation===je);return(We==null?void 0:We.iconEmoji)||"❓"},[p,v]=k.useState(!1),[b,S]=k.useState(!1),[x,w]=k.useState(!1),[j,T]=k.useState(!1),[A,Q]=k.useState(!1),[C,R]=k.useState(!1),[D,L]=k.useState(!1),[P,Z]=k.useState(!1),X=k.useRef(null),B=k.useRef(null),Y=k.useRef(null),H=k.useRef(null),q=p||b,I=x||j,ee=A||C,W=D||P;k.useEffect(()=>{const je=We=>{b&&X.current&&!X.current.contains(We.target)&&S(!1),j&&B.current&&!B.current.contains(We.target)&&T(!1),C&&Y.current&&!Y.current.contains(We.target)&&R(!1),P&&H.current&&!H.current.contains(We.target)&&Z(!1)};return document.addEventListener("mousedown",je),()=>document.removeEventListener("mousedown",je)},[b,j,C,P]),k.useEffect(()=>{const je=We=>{We.key==="Escape"&&(S(!1),T(!1),R(!1),Z(!1))};return document.addEventListener("keydown",je),()=>document.removeEventListener("keydown",je)},[]);const z=je=>{je===null?f==null||f.client.mark.changeSelection(null):f==null||f.client.mark.changeSelection(e===je?null:je),R(!1),Q(!1)},ce=je=>{f==null||f.client.mark.changeClick(je),T(!1),w(!1)},se=je=>{f==null||f.client.mark.changeShape(je),Z(!1),L(!1)},N=()=>{f==null||f.client.mark.toggleMode(),S(!1),v(!1)},le=()=>{o&&N()},pe=()=>{o||N()},Oe=(je,We,ge,dt,Et=!1)=>g.jsxs("button",{role:"menuitem",onClick:Zt=>{Zt.stopPropagation(),dt()},className:"semiont-toolbar-menu-button","data-selected":ge,"data-delete":Et,"aria-pressed":ge,"aria-label":We,children:[g.jsx("span",{className:"semiont-toolbar-menu-icon","aria-hidden":"true",children:je}),g.jsx("span",{className:"semiont-toolbar-menu-label",children:We})]}),Be=[{action:"detail",icon:"🔍",label:d("detail")},{action:"follow",icon:"➡️",label:d("follow")},{action:"jsonld",icon:"🌐",label:d("jsonld")}];r&&Be.push({action:"deleting",icon:"🗑️",label:d("deleting"),isDelete:!0});const Ae=[{motivation:"linking",label:d("linking")},{motivation:"highlighting",label:d("highlighting")},{motivation:"assessing",label:d("assessing")},{motivation:"commenting",label:d("commenting")},{motivation:"tagging",label:d("tagging")}],Ze=[{shape:"rectangle",icon:"▭",label:d("rectangle")},{shape:"circle",icon:"○",label:d("circle")},{shape:"polygon",icon:"⬡",label:d("polygon")}],xe=H7(s),Ye=Ze.filter(je=>xe.includes(je.shape));return g.jsxs("div",{className:"semiont-annotate-toolbar",children:[g.jsx(qm,{label:d("clickGroup"),isExpanded:I,onHoverChange:w,onPin:()=>T(!j),containerRef:B,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display","data-delete":(Ue=Be.find(je=>je.action===t))!=null&&Ue.isDelete?"true":"false",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:(Qe=Be.find(je=>je.action===t))==null?void 0:Qe.icon}),g.jsx("span",{className:"semiont-dropdown-label",children:(De=Be.find(je=>je.action===t))==null?void 0:De.label})]}),expandedContent:g.jsx(g.Fragment,{children:Be.map(({action:je,icon:We,label:ge,isDelete:dt})=>g.jsx(de.Fragment,{children:Oe(We,ge,t===je,()=>ce(je),dt)},je))})}),g.jsx("div",{className:"semiont-toolbar-separator"}),g.jsx(qm,{label:d("modeGroup"),isExpanded:q,onHoverChange:v,onPin:()=>S(!b),containerRef:X,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:o?"✏️":"📖"}),g.jsx("span",{className:"semiont-dropdown-label",children:d(o?"annotate":"browse")})]}),expandedContent:g.jsxs(g.Fragment,{children:[Oe("📖",d("browse"),!o,le),Oe("✏️",d("annotate"),o,pe)]})}),n&&g.jsx("div",{className:"semiont-toolbar-separator"}),n&&g.jsx(qm,{label:d("selectionGroup"),isExpanded:ee,onHoverChange:Q,onPin:()=>R(!C),containerRef:Y,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:e?m(e):"—"}),g.jsx("span",{className:"semiont-dropdown-label",children:e?(mt=Ae.find(je=>je.motivation===e))==null?void 0:mt.label:d("none")})]}),expandedContent:g.jsxs(g.Fragment,{children:[Oe("—",d("none"),e===null,()=>z(null)),Ae.map(({motivation:je,label:We})=>g.jsx(de.Fragment,{children:Oe(m(je),We,e===je,()=>z(je))},je))]})}),i&&g.jsx("div",{className:"semiont-toolbar-separator"}),i&&Ye.length>0&&g.jsx(qm,{label:d("shapeGroup"),isExpanded:W,onHoverChange:L,onPin:()=>Z(!P),containerRef:H,collapsedContent:g.jsxs("div",{className:"semiont-dropdown-display",children:[g.jsx("span",{className:"semiont-dropdown-icon",children:(Ve=Ye.find(je=>je.shape===a))==null?void 0:Ve.icon}),g.jsx("span",{className:"semiont-dropdown-label",children:(cn=Ye.find(je=>je.shape===a))==null?void 0:cn.label})]}),expandedContent:g.jsx(g.Fragment,{children:Ye.map(({shape:je,icon:We,label:ge})=>g.jsx(de.Fragment,{children:Oe(We,ge,a===je,()=>se(je))},je))})})]})}var pF=ml({String:$.string,Number:$.number,"True False":$.bool,PropertyName:$.propertyName,Null:$.null,", :":$.separator,"[ ]":$.squareBracket,"{ }":$.brace}),gF=wg.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[pF],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),vF=xg.define({name:"json",parser:gF.configure({props:[qf.add({Object:xc({except:/^\s*\}/}),Array:xc({except:/^\s*\]/})}),Yc.add({"Object Array":Fx})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function VL(){return new Lc(vF)}var OF="#e5c07b",aC="#e06c75",bF="#56b6c2",yF="#ffffff",gp="#abb2bf",aS="#7d8799",SF="#61afef",xF="#98c379",sC="#d19a66",_F="#c678dd",wF="#21252b",oC="#2c313a",lC="#282c34",Jb="#353a42",kF="#3E4451",cC="#528bff",jF=Ie.theme({"&":{color:gp,backgroundColor:lC},".cm-content":{caretColor:cC},".cm-cursor, .cm-dropCursor":{borderLeftColor:cC},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:kF},".cm-panels":{backgroundColor:wF,color:gp},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:lC,color:aS,border:"none"},".cm-activeLineGutter":{backgroundColor:oC},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Jb},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Jb,borderBottomColor:Jb},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:oC,color:gp}}},{dark:!0}),TF=Wx.define([{tag:$.keyword,color:_F},{tag:[$.name,$.deleted,$.character,$.propertyName,$.macroName],color:aC},{tag:[$.function($.variableName),$.labelName],color:SF},{tag:[$.color,$.constant($.name),$.standard($.name)],color:sC},{tag:[$.definition($.name),$.separator],color:gp},{tag:[$.typeName,$.className,$.number,$.changed,$.annotation,$.modifier,$.self,$.namespace],color:OF},{tag:[$.operator,$.operatorKeyword,$.url,$.escape,$.regexp,$.link,$.special($.string)],color:bF},{tag:[$.meta,$.comment],color:aS},{tag:$.strong,fontWeight:"bold"},{tag:$.emphasis,fontStyle:"italic"},{tag:$.strikethrough,textDecoration:"line-through"},{tag:$.link,color:aS,textDecoration:"underline"},{tag:$.heading,fontWeight:"bold",color:aC},{tag:[$.atom,$.bool,$.special($.variableName)],color:sC},{tag:[$.processingInstruction,$.string,$.inserted],color:xF},{tag:$.invalid,color:yF}]),UL=[jF,Hx(TF)];function EF({annotation:e,onBack:t}){const n=k.useRef(null),r=k.useRef(null),{showLineNumbers:i}=Gx(),a=k.useRef(t);k.useEffect(()=>{a.current=t}),k.useEffect(()=>{const o=c=>{c.key==="Escape"&&a.current()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[]),k.useEffect(()=>{if(!n.current)return;const o=document.documentElement.classList.contains("dark"),c=JSON.stringify(e,null,2),d=[VL(),Ie.editable.of(!1),tn.readOnly.of(!0)];i&&d.push(Lp()),o?d.push(UL):(d.push(h5),d.push(Hx(m5)));const f=tn.create({doc:c,extensions:d}),m=new Ie({state:f,parent:n.current});return r.current=m,()=>{m.destroy(),r.current=null}},[e,i]);const s=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(o){console.error("Failed to copy JSON-LD:",o)}};return g.jsxs("div",{className:"semiont-jsonld-view",children:[g.jsxs("div",{className:"semiont-jsonld-view__header",children:[g.jsx("button",{onClick:t,className:"semiont-jsonld-view__back-button",title:"Go back (Escape)",children:"<"}),g.jsx("h3",{className:"semiont-jsonld-view__title",children:"JSON-LD"}),g.jsx("button",{onClick:s,className:"semiont-jsonld-view__copy-button",title:"Copy to clipboard",children:"📋 Copy"})]}),g.jsx("div",{ref:n,className:"semiont-jsonld-view__editor"})]})}var CF=Object.defineProperty,AF=(e,t,n)=>t in e?CF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ey=(e,t,n)=>(AF(e,typeof t!="symbol"?t+"":t,n),n),PF=class{constructor(){ey(this,"current",this.detect()),ey(this,"handoffState","pending"),ey(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ua=new PF;function Zf(e){var t;return ua.isServer?null:e==null?document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function sS(e){var t,n;return ua.isServer?null:e==null?document:(n=(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))!=null?n:document}function YL(e){var t,n;return(n=(t=sS(e))==null?void 0:t.activeElement)!=null?n:null}function QF(e){return YL(e)===e}function kg(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function rs(){let e=[],t={addEventListener(n,r,i,a){return n.addEventListener(r,i,a),t.add(()=>n.removeEventListener(r,i,a))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return kg(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let a=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:a})})},group(n){let r=rs();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function jg(){let[e]=k.useState(rs);return k.useEffect(()=>()=>e.dispose(),[e]),e}var _r=(e,t)=>{ua.isServer?k.useEffect(e,t):k.useLayoutEffect(e,t)};function pl(e){let t=k.useRef(e);return _r(()=>{t.current=e},[e]),t}var qt=function(e){let t=pl(e);return de.useCallback((...n)=>t.current(...n),[t])};function $f(e){return k.useMemo(()=>e,Object.values(e))}var NF=k.createContext(void 0);function RF(){return k.useContext(NF)}function oS(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Ka(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ka),r}var Zp=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Zp||{}),Ws=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ws||{});function Oi(){let e=LF();return k.useCallback(t=>MF({mergeRefs:e,...t}),[e])}function MF({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:a=!0,name:s,mergeRefs:o}){o=o??DF;let c=FL(t,e);if(a)return Bm(c,n,r,s,o);let d=i??0;if(d&2){let{static:f=!1,...m}=c;if(f)return Bm(m,n,r,s,o)}if(d&1){let{unmount:f=!0,...m}=c;return Ka(f?0:1,{0(){return null},1(){return Bm({...m,hidden:!0,style:{display:"none"}},n,r,s,o)}})}return Bm(c,n,r,s,o)}function Bm(e,t={},n,r,i){let{as:a=n,children:s,refName:o="ref",...c}=ty(e,["unmount","static"]),d=e.ref!==void 0?{[o]:e.ref}:{},f=typeof s=="function"?s(t):s;"className"in c&&c.className&&typeof c.className=="function"&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let m={};if(t){let p=!1,v=[];for(let[b,S]of Object.entries(t))typeof S=="boolean"&&(p=!0),S===!0&&v.push(b.replace(/([A-Z])/g,x=>`-${x.toLowerCase()}`));if(p){m["data-headlessui-state"]=v.join(" ");for(let b of v)m[`data-${b}`]=""}}if(Rd(a)&&(Object.keys(qo(c)).length>0||Object.keys(qo(m)).length>0))if(!k.isValidElement(f)||Array.isArray(f)&&f.length>1||IF(f)){if(Object.keys(qo(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(qo(c)).concat(Object.keys(qo(m))).map(p=>` - ${p}`).join(`
132
- `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>` - ${p}`).join(`
133
- `)].join(`
134
- `))}else{let p=f.props,v=p==null?void 0:p.className,b=typeof v=="function"?(...w)=>oS(v(...w),c.className):oS(v,c.className),S=b?{className:b}:{},x=FL(f.props,qo(ty(c,["ref"])));for(let w in m)w in x&&delete m[w];return k.cloneElement(f,Object.assign({},x,m,d,{ref:i(zF(f),d.ref)},S))}return k.createElement(a,Object.assign({},ty(c,["ref"]),!Rd(a)&&d,!Rd(a)&&m),f)}function LF(){let e=k.useRef([]),t=k.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function DF(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function FL(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var a;return(a=i==null?void 0:i.preventDefault)==null?void 0:a.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...a){let s=n[r];for(let o of s){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;o(i,...a)}}});return t}function jr(e){var t;return Object.assign(k.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function qo(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function ty(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function zF(e){return de.version.split(".")[0]>="19"?e.props.ref:e.ref}function Rd(e){return e===k.Fragment||e===Symbol.for("react.fragment")}function IF(e){return Rd(e.type)}var qF="span",$p=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))($p||{});function BF(e,t){var n;let{features:r=1,...i}=e,a={ref:t,"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Oi()({ourProps:a,theirProps:i,slot:{},defaultTag:qF,name:"Hidden"})}var lS=jr(BF);function XF(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function Js(e){return XF(e)&&"tagName"in e}function il(e){return Js(e)&&"accessKey"in e}function Hs(e){return Js(e)&&"tabIndex"in e}function ZF(e){return Js(e)&&"style"in e}function $F(e){return il(e)&&e.nodeName==="IFRAME"}function VF(e){return il(e)&&e.nodeName==="INPUT"}var WL=Symbol();function UF(e,t=!0){return Object.assign(e,{[WL]:t})}function ma(...e){let t=k.useRef(e);k.useEffect(()=>{t.current=e},[e]);let n=qt(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[WL]))?void 0:n}var d_=k.createContext(null);d_.displayName="DescriptionContext";function HL(){let e=k.useContext(d_);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,HL),t}return e}function YF(){let[e,t]=k.useState([]);return[e.length>0?e.join(" "):void 0,k.useMemo(()=>function(n){let r=qt(a=>(t(s=>[...s,a]),()=>t(s=>{let o=s.slice(),c=o.indexOf(a);return c!==-1&&o.splice(c,1),o}))),i=k.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return de.createElement(d_.Provider,{value:i},n.children)},[t])]}var FF="p";function WF(e,t){let n=k.useId(),r=RF(),{id:i=`headlessui-description-${n}`,...a}=e,s=HL(),o=ma(t);_r(()=>s.register(i),[i,s.register]);let c=$f({...s.slot,disabled:r||!1}),d={ref:o,...s.props,id:i};return Oi()({ourProps:d,theirProps:a,slot:c,defaultTag:FF,name:s.name||"Description"})}var HF=jr(WF),GF=Object.assign(HF,{}),GL=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(GL||{}),KF=k.createContext(()=>{});function JF({value:e,children:t}){return de.createElement(KF.Provider,{value:e},t)}var KL=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}},eW=Object.defineProperty,tW=(e,t,n)=>t in e?eW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nW=(e,t,n)=>(tW(e,t+"",n),n),JL=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ri=(e,t,n)=>(JL(e,t,"read from private field"),n?n.call(e):t.get(e)),ny=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},uC=(e,t,n,r)=>(JL(e,t,"write to private field"),t.set(e,n),n),ta,Od,bd,rW=class{constructor(e){ny(this,ta,{}),ny(this,Od,new KL(()=>new Set)),ny(this,bd,new Set),nW(this,"disposables",rs()),uC(this,ta,e),ua.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return ri(this,ta)}subscribe(e,t){if(ua.isServer)return()=>{};let n={selector:e,callback:t,current:e(ri(this,ta))};return ri(this,bd).add(n),this.disposables.add(()=>{ri(this,bd).delete(n)})}on(e,t){return ua.isServer?()=>{}:(ri(this,Od).get(e).add(t),this.disposables.add(()=>{ri(this,Od).get(e).delete(t)}))}send(e){let t=this.reduce(ri(this,ta),e);if(t!==ri(this,ta)){uC(this,ta,t);for(let n of ri(this,bd)){let r=n.selector(ri(this,ta));eD(n.current,r)||(n.current=r,n.callback(r))}for(let n of ri(this,Od).get(e.type))n(ri(this,ta),e)}}};ta=new WeakMap,Od=new WeakMap,bd=new WeakMap;function eD(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:ry(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:ry(e.entries(),t.entries()):dC(e)&&dC(t)?ry(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function ry(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function dC(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}var iW=Object.defineProperty,aW=(e,t,n)=>t in e?iW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fC=(e,t,n)=>(aW(e,typeof t!="symbol"?t+"":t,n),n),sW=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(sW||{}),oW={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(i!==-1){let a=e.stack.slice();return a.splice(i,1),a.push(n),r=a,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}},lW=class tD extends rW{constructor(){super(...arguments),fC(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),fC(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new tD({stack:[]})}reduce(t,n){return Ka(n.type,oW,t,n)}},nD=new KL(()=>lW.new());function rD(e,t,n=eD){return j$.useSyncExternalStoreWithSelector(qt(r=>e.subscribe(cW,r)),qt(()=>e.state),qt(()=>e.state),qt(t),n)}function cW(e){return e}function Vf(e,t){let n=k.useId(),r=nD.get(t),[i,a]=rD(r,k.useCallback(s=>[r.selectors.isTop(s,n),r.selectors.inStack(s,n)],[r,n]));return _r(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?a?i:!0:!1}var cS=new Map,Md=new Map;function hC(e){var t;let n=(t=Md.get(e))!=null?t:0;return Md.set(e,n+1),n!==0?()=>mC(e):(cS.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>mC(e))}function mC(e){var t;let n=(t=Md.get(e))!=null?t:1;if(n===1?Md.delete(e):Md.set(e,n-1),n!==1)return;let r=cS.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,cS.delete(e))}function uW(e,{allowed:t,disallowed:n}={}){let r=Vf(e,"inert-others");_r(()=>{var i,a;if(!r)return;let s=rs();for(let c of(i=n==null?void 0:n())!=null?i:[])c&&s.add(hC(c));let o=(a=t==null?void 0:t())!=null?a:[];for(let c of o){if(!c)continue;let d=Zf(c);if(!d)continue;let f=c.parentElement;for(;f&&f!==d.body;){for(let m of f.children)o.some(p=>m.contains(p))||s.add(hC(m));f=f.parentElement}}return s.dispose},[r,t,n])}function dW(e,t,n){let r=pl(i=>{let a=i.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&n()});k.useEffect(()=>{if(!e)return;let i=t===null?null:il(t)?t:t.current;if(!i)return;let a=rs();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(i));s.observe(i),a.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(i));s.observe(i),a.add(()=>s.disconnect())}return()=>a.dispose()},[t,r,e])}var Vp=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),fW=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(","),$a=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))($a||{}),uS=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(uS||{}),hW=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(hW||{});function mW(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Vp)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function pW(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(fW)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var iD=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(iD||{});function gW(e,t=0){var n;return e===((n=Zf(e))==null?void 0:n.body)?!1:Ka(t,{0(){return e.matches(Vp)},1(){let r=e;for(;r!==null;){if(r.matches(Vp))return!0;r=r.parentElement}return!1}})}var vW=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(vW||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Fa(e){e==null||e.focus({preventScroll:!0})}var OW=["textarea","input"].join(",");function bW(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,OW))!=null?n:!1}function yW(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);if(i===null||a===null)return 0;let s=i.compareDocumentPosition(a);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Ld(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?sS(e[0]):document:sS(e),s=Array.isArray(e)?n?yW(e):e:t&64?pW(e):mW(e);i.length>0&&s.length>1&&(s=s.filter(v=>!i.some(b=>b!=null&&"current"in b?(b==null?void 0:b.current)===v:b===v))),r=r??(a==null?void 0:a.activeElement);let o=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},f=0,m=s.length,p;do{if(f>=m||f+m<=0)return 0;let v=c+f;if(t&16)v=(v+m)%m;else{if(v<0)return 3;if(v>=m)return 1}p=s[v],p==null||p.focus(d),f+=o}while(p!==YL(p));return t&6&&bW(p)&&p.select(),2}function aD(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function SW(){return/Android/gi.test(window.navigator.userAgent)}function pC(){return aD()||SW()}function Xm(e,t,n,r){let i=pl(n);k.useEffect(()=>{if(!e)return;function a(s){i.current(s)}return document.addEventListener(t,a,r),()=>document.removeEventListener(t,a,r)},[e,t,r])}function sD(e,t,n,r){let i=pl(n);k.useEffect(()=>{if(!e)return;function a(s){i.current(s)}return window.addEventListener(t,a,r),()=>window.removeEventListener(t,a,r)},[e,t,r])}var gC=30;function xW(e,t,n){let r=pl(n),i=k.useCallback(function(o,c){if(o.defaultPrevented)return;let d=c(o);if(d===null||!d.getRootNode().contains(d)||!d.isConnected)return;let f=(function m(p){return typeof p=="function"?m(p()):Array.isArray(p)||p instanceof Set?p:[p]})(t);for(let m of f)if(m!==null&&(m.contains(d)||o.composed&&o.composedPath().includes(m)))return;return!gW(d,iD.Loose)&&d.tabIndex!==-1&&o.preventDefault(),r.current(o,d)},[r,t]),a=k.useRef(null);Xm(e,"pointerdown",o=>{var c,d;pC()||(a.current=((d=(c=o.composedPath)==null?void 0:c.call(o))==null?void 0:d[0])||o.target)},!0),Xm(e,"pointerup",o=>{if(pC()||!a.current)return;let c=a.current;return a.current=null,i(o,()=>c)},!0);let s=k.useRef({x:0,y:0});Xm(e,"touchstart",o=>{s.current.x=o.touches[0].clientX,s.current.y=o.touches[0].clientY},!0),Xm(e,"touchend",o=>{let c={x:o.changedTouches[0].clientX,y:o.changedTouches[0].clientY};if(!(Math.abs(c.x-s.current.x)>=gC||Math.abs(c.y-s.current.y)>=gC))return i(o,()=>Hs(o.target)?o.target:null)},!0),sD(e,"blur",o=>i(o,()=>$F(window.document.activeElement)?window.document.activeElement:null),!0)}function f_(...e){return k.useMemo(()=>Zf(...e),[...e])}function oD(e,t,n,r){let i=pl(n);k.useEffect(()=>{e=e??window;function a(s){i.current(s)}return e.addEventListener(t,a,r),()=>e.removeEventListener(t,a,r)},[e,t,r])}function _W(e){return k.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function wW(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...a){let s=t[i].call(n,...a);s&&(n=s,r.forEach(o=>o()))}}}function kW(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=(n=t.defaultView)!=null?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),a=Math.max(0,e-i);n.style(r,"paddingRight",`${a}px`)}}}function jW(){return aD()?{before({doc:e,d:t,meta:n}){function r(i){for(let a of n().containers)for(let s of a())if(s.contains(i))return!0;return!1}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let o=rs();o.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>o.dispose()))}let a=(i=window.scrollY)!=null?i:window.pageYOffset,s=null;t.addEventListener(e,"click",o=>{if(Hs(o.target))try{let c=o.target.closest("a");if(!c)return;let{hash:d}=new URL(c.href),f=e.querySelector(d);Hs(f)&&!r(f)&&(s=f)}catch{}},!0),t.group(o=>{t.addEventListener(e,"touchstart",c=>{if(o.dispose(),Hs(c.target)&&ZF(c.target))if(r(c.target)){let d=c.target;for(;d.parentElement&&r(d.parentElement);)d=d.parentElement;o.style(d,"overscrollBehavior","contain")}else o.style(c.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",o=>{if(Hs(o.target)){if(VF(o.target))return;if(r(o.target)){let c=o.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&o.preventDefault()}else o.preventDefault()}},{passive:!1}),t.add(()=>{var o;let c=(o=window.scrollY)!=null?o:window.pageYOffset;a!==c&&window.scrollTo(0,a),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function TW(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function vC(e){let t={};for(let n of e)Object.assign(t,n(t));return t}var Fo=wW(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:rs(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=vC(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=vC(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[jW(),kW(),TW()];n.forEach(({before:r})=>r==null?void 0:r(t)),n.forEach(({after:r})=>r==null?void 0:r(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Fo.subscribe(()=>{let e=Fo.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&Fo.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Fo.dispatch("TEARDOWN",n)}});function EW(e,t,n=()=>({containers:[]})){let r=_W(Fo),i=t?r.get(t):void 0,a=i?i.count>0:!1;return _r(()=>{if(!(!t||!e))return Fo.dispatch("PUSH",t,n),()=>Fo.dispatch("POP",t,n)},[e,t]),a}function CW(e,t,n=()=>[document.body]){let r=Vf(e,"scroll-lock");EW(r,t,i=>{var a;return{containers:[...(a=i.containers)!=null?a:[],n]}})}function AW(e=0){let[t,n]=k.useState(e),r=k.useCallback(c=>n(c),[]),i=k.useCallback(c=>n(d=>d|c),[]),a=k.useCallback(c=>(t&c)===c,[t]),s=k.useCallback(c=>n(d=>d&~c),[]),o=k.useCallback(c=>n(d=>d^c),[]);return{flags:t,setFlag:r,addFlag:i,hasFlag:a,removeFlag:s,toggleFlag:o}}var OC,bC;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((OC=process==null?void 0:Wy)==null?void 0:OC.NODE_ENV)==="test"&&typeof((bC=Element==null?void 0:Element.prototype)==null?void 0:bC.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
135
- `)),[]});var PW=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(PW||{});function QW(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function NW(e,t,n,r){let[i,a]=k.useState(n),{hasFlag:s,addFlag:o,removeFlag:c}=AW(e&&i?3:0),d=k.useRef(!1),f=k.useRef(!1),m=jg();return _r(()=>{var p;if(e){if(n&&a(!0),!t){n&&o(3);return}return(p=r==null?void 0:r.start)==null||p.call(r,n),RW(t,{inFlight:d,prepare(){f.current?f.current=!1:f.current=d.current,d.current=!0,!f.current&&(n?(o(3),c(4)):(o(4),c(2)))},run(){f.current?n?(c(3),o(4)):(c(4),o(3)):n?c(1):o(1)},done(){var v;f.current&&DW(t)||(d.current=!1,c(7),n||a(!1),(v=r==null?void 0:r.end)==null||v.call(r,n))}})}},[e,n,t,m]),e?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function RW(e,{prepare:t,run:n,done:r,inFlight:i}){let a=rs();return LW(e,{prepare:t,inFlight:i}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(MW(e,r))})}),a.dispose}function MW(e,t){var n,r;let i=rs();if(!e)return i.dispose;let a=!1;i.add(()=>{a=!0});let s=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(o=>o instanceof CSSTransition))!=null?r:[];return s.length===0?(t(),i.dispose):(Promise.allSettled(s.map(o=>o.finished)).then(()=>{a||t()}),i.dispose)}function LW(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function DW(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function h_(e,t){let n=k.useRef([]),r=qt(e);k.useEffect(()=>{let i=[...n.current];for(let[a,s]of t.entries())if(n.current[a]!==s){let o=r(t,i);return n.current=t,o}},[r,...t])}var Tg=k.createContext(null);Tg.displayName="OpenClosedContext";var Ni=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ni||{});function Eg(){return k.useContext(Tg)}function zW({value:e,children:t}){return de.createElement(Tg.Provider,{value:e},t)}function IW({children:e}){return de.createElement(Tg.Provider,{value:null},e)}function qW(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}var $s=[];qW(()=>{function e(t){if(!Hs(t.target)||t.target===document.body||$s[0]===t.target)return;let n=t.target;n=n.closest(Vp),$s.unshift(n??t.target),$s=$s.filter(r=>r!=null&&r.isConnected),$s.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function lD(e){let t=qt(e),n=k.useRef(!1);k.useEffect(()=>(n.current=!1,()=>{n.current=!0,kg(()=>{n.current&&t()})}),[t])}var cD=k.createContext(!1);function BW(){return k.useContext(cD)}function yC(e){return de.createElement(cD.Provider,{value:e.force},e.children)}function XW(e){let t=BW(),n=k.useContext(dD),[r,i]=k.useState(()=>{var a;if(!t&&n!==null)return(a=n.current)!=null?a:null;if(ua.isServer)return null;let s=e==null?void 0:e.getElementById("headlessui-portal-root");if(s)return s;if(e===null)return null;let o=e.createElement("div");return o.setAttribute("id","headlessui-portal-root"),e.body.appendChild(o)});return k.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),k.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}var uD=k.Fragment,ZW=jr(function(e,t){let{ownerDocument:n=null,...r}=e,i=k.useRef(null),a=ma(UF(p=>{i.current=p}),t),s=f_(i.current),o=n??s,c=XW(o),d=k.useContext(dS),f=jg(),m=Oi();return lD(()=>{var p;c&&c.childNodes.length<=0&&((p=c.parentElement)==null||p.removeChild(c))}),c?Vo.createPortal(de.createElement("div",{"data-headlessui-portal":"",ref:p=>{f.dispose(),d&&p&&f.add(d.register(p))}},m({ourProps:{ref:a},theirProps:r,slot:{},defaultTag:uD,name:"Portal"})),c):null});function $W(e,t){let n=ma(t),{enabled:r=!0,ownerDocument:i,...a}=e,s=Oi();return r?de.createElement(ZW,{...a,ownerDocument:i,ref:n}):s({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:uD,name:"Portal"})}var VW=k.Fragment,dD=k.createContext(null);function UW(e,t){let{target:n,...r}=e,i={ref:ma(t)},a=Oi();return de.createElement(dD.Provider,{value:n},a({ourProps:i,theirProps:r,defaultTag:VW,name:"Popover.Group"}))}var dS=k.createContext(null);function YW(){let e=k.useContext(dS),t=k.useRef([]),n=qt(a=>(t.current.push(a),e&&e.register(a),()=>r(a))),r=qt(a=>{let s=t.current.indexOf(a);s!==-1&&t.current.splice(s,1),e&&e.unregister(a)}),i=k.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,k.useMemo(()=>function({children:a}){return de.createElement(dS.Provider,{value:i},a)},[i])]}var FW=jr($W),fD=jr(UW),WW=Object.assign(FW,{Group:fD});function HW(e,t=typeof document<"u"?document.defaultView:null,n){let r=Vf(e,"escape");oD(t,"keydown",i=>{r&&(i.defaultPrevented||i.key===GL.Escape&&n(i))})}function GW(){var e;let[t]=k.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=k.useState((e=t==null?void 0:t.matches)!=null?e:!1);return _r(()=>{if(!t)return;function i(a){r(a.matches)}return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[t]),n}function KW({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=qt(()=>{var i,a;let s=Zf(n),o=[];for(let c of e)c!==null&&(Js(c)?o.push(c):"current"in c&&Js(c.current)&&o.push(c.current));if(t!=null&&t.current)for(let c of t.current)o.push(c);for(let c of(i=s==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?i:[])c!==document.body&&c!==document.head&&Js(c)&&c.id!=="headlessui-portal-root"&&(n&&(c.contains(n)||c.contains((a=n==null?void 0:n.getRootNode())==null?void 0:a.host))||o.some(d=>c.contains(d))||o.push(c));return o});return{resolveContainers:r,contains:qt(i=>r().some(a=>a.contains(i)))}}var hD=k.createContext(null);function SC({children:e,node:t}){let[n,r]=k.useState(null),i=mD(t??n);return de.createElement(hD.Provider,{value:i},e,i===null&&de.createElement(lS,{features:$p.Hidden,ref:a=>{var s,o;if(a){for(let c of(o=(s=Zf(a))==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?o:[])if(c!==document.body&&c!==document.head&&Js(c)&&c!=null&&c.contains(a)){r(c);break}}}}))}function mD(e=null){var t;return(t=k.useContext(hD))!=null?t:e}function JW(){let e=typeof document>"u";return"useSyncExternalStore"in Oj?(t=>t.useSyncExternalStore)(Oj)(()=>()=>{},()=>!1,()=>!e):!1}function Cg(){let e=JW(),[t,n]=k.useState(ua.isHandoffComplete);return t&&ua.isHandoffComplete===!1&&n(!1),k.useEffect(()=>{t!==!0&&n(!0)},[t]),k.useEffect(()=>ua.handoff(),[]),e?!1:t}function m_(){let e=k.useRef(!1);return _r(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var yd=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(yd||{});function eH(){let e=k.useRef(0);return sD(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function pD(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)Js(n.current)&&t.add(n.current);return t}var tH="div",$o=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))($o||{});function nH(e,t){let n=k.useRef(null),r=ma(n,t),{initialFocus:i,initialFocusFallback:a,containers:s,features:o=15,...c}=e;Cg()||(o=0);let d=f_(n.current);sH(o,{ownerDocument:d});let f=oH(o,{ownerDocument:d,container:n,initialFocus:i,initialFocusFallback:a});lH(o,{ownerDocument:d,container:n,containers:s,previousActiveElement:f});let m=eH(),p=qt(j=>{if(!il(n.current))return;let T=n.current;(A=>A())(()=>{Ka(m.current,{[yd.Forwards]:()=>{Ld(T,$a.First,{skipElements:[j.relatedTarget,a]})},[yd.Backwards]:()=>{Ld(T,$a.Last,{skipElements:[j.relatedTarget,a]})}})})}),v=Vf(!!(o&2),"focus-trap#tab-lock"),b=jg(),S=k.useRef(!1),x={ref:r,onKeyDown(j){j.key=="Tab"&&(S.current=!0,b.requestAnimationFrame(()=>{S.current=!1}))},onBlur(j){if(!(o&4))return;let T=pD(s);il(n.current)&&T.add(n.current);let A=j.relatedTarget;Hs(A)&&A.dataset.headlessuiFocusGuard!=="true"&&(gD(T,A)||(S.current?Ld(n.current,Ka(m.current,{[yd.Forwards]:()=>$a.Next,[yd.Backwards]:()=>$a.Previous})|$a.WrapAround,{relativeTo:j.target}):Hs(j.target)&&Fa(j.target)))}},w=Oi();return de.createElement(de.Fragment,null,v&&de.createElement(lS,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:$p.Focusable}),w({ourProps:x,theirProps:c,defaultTag:tH,name:"FocusTrap"}),v&&de.createElement(lS,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:$p.Focusable}))}var rH=jr(nH),iH=Object.assign(rH,{features:$o});function aH(e=!0){let t=k.useRef($s.slice());return h_(([n],[r])=>{r===!0&&n===!1&&kg(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=$s.slice())},[e,$s,t]),qt(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function sH(e,{ownerDocument:t}){let n=!!(e&8),r=aH(n);h_(()=>{n||QF(t==null?void 0:t.body)&&Fa(r())},[n]),lD(()=>{n&&Fa(r())})}function oH(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let a=k.useRef(null),s=Vf(!!(e&1),"focus-trap#initial-focus"),o=m_();return h_(()=>{if(e===0)return;if(!s){i!=null&&i.current&&Fa(i.current);return}let c=n.current;c&&kg(()=>{if(!o.current)return;let d=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===d){a.current=d;return}}else if(c.contains(d)){a.current=d;return}if(r!=null&&r.current)Fa(r.current);else{if(e&16){if(Ld(c,$a.First|$a.AutoFocus)!==uS.Error)return}else if(Ld(c,$a.First)!==uS.Error)return;if(i!=null&&i.current&&(Fa(i.current),(t==null?void 0:t.activeElement)===i.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=t==null?void 0:t.activeElement})},[i,s,e]),a}function lH(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let a=m_(),s=!!(e&4);oD(t==null?void 0:t.defaultView,"focus",o=>{if(!s||!a.current)return;let c=pD(r);il(n.current)&&c.add(n.current);let d=i.current;if(!d)return;let f=o.target;il(f)?gD(c,f)?(i.current=f,Fa(f)):(o.preventDefault(),o.stopPropagation(),Fa(d)):Fa(i.current)},!0)}function gD(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function vD(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!Rd((t=e.as)!=null?t:bD)||de.Children.count(e.children)===1}var Ag=k.createContext(null);Ag.displayName="TransitionContext";var cH=(e=>(e.Visible="visible",e.Hidden="hidden",e))(cH||{});function uH(){let e=k.useContext(Ag);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function dH(){let e=k.useContext(Pg);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}var Pg=k.createContext(null);Pg.displayName="NestingContext";function Qg(e){return"children"in e?Qg(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function OD(e,t){let n=pl(e),r=k.useRef([]),i=m_(),a=jg(),s=qt((v,b=Ws.Hidden)=>{let S=r.current.findIndex(({el:x})=>x===v);S!==-1&&(Ka(b,{[Ws.Unmount](){r.current.splice(S,1)},[Ws.Hidden](){r.current[S].state="hidden"}}),a.microTask(()=>{var x;!Qg(r)&&i.current&&((x=n.current)==null||x.call(n))}))}),o=qt(v=>{let b=r.current.find(({el:S})=>S===v);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:v,state:"visible"}),()=>s(v,Ws.Unmount)}),c=k.useRef([]),d=k.useRef(Promise.resolve()),f=k.useRef({enter:[],leave:[]}),m=qt((v,b,S)=>{c.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([x])=>x!==v)),t==null||t.chains.current[b].push([v,new Promise(x=>{c.current.push(x)})]),t==null||t.chains.current[b].push([v,new Promise(x=>{Promise.all(f.current[b].map(([w,j])=>j)).then(()=>x())})]),b==="enter"?d.current=d.current.then(()=>t==null?void 0:t.wait.current).then(()=>S(b)):S(b)}),p=qt((v,b,S)=>{Promise.all(f.current[b].splice(0).map(([x,w])=>w)).then(()=>{var x;(x=c.current.shift())==null||x()}).then(()=>S(b))});return k.useMemo(()=>({children:r,register:o,unregister:s,onStart:m,onStop:p,wait:d,chains:f}),[o,s,r,m,p,f,d])}var bD=k.Fragment,yD=Zp.RenderStrategy;function fH(e,t){var n,r;let{transition:i=!0,beforeEnter:a,afterEnter:s,beforeLeave:o,afterLeave:c,enter:d,enterFrom:f,enterTo:m,entered:p,leave:v,leaveFrom:b,leaveTo:S,...x}=e,[w,j]=k.useState(null),T=k.useRef(null),A=vD(e),Q=ma(...A?[T,t,j]:t===null?[]:[t]),C=(n=x.unmount)==null||n?Ws.Unmount:Ws.Hidden,{show:R,appear:D,initial:L}=uH(),[P,Z]=k.useState(R?"visible":"hidden"),X=dH(),{register:B,unregister:Y}=X;_r(()=>B(T),[B,T]),_r(()=>{if(C===Ws.Hidden&&T.current){if(R&&P!=="visible"){Z("visible");return}return Ka(P,{hidden:()=>Y(T),visible:()=>B(T)})}},[P,T,B,Y,R,C]);let H=Cg();_r(()=>{if(A&&H&&P==="visible"&&T.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[T,P,H,A]);let q=L&&!D,I=D&&R&&L,ee=k.useRef(!1),W=OD(()=>{ee.current||(Z("hidden"),Y(T))},X),z=qt(Be=>{ee.current=!0;let Ae=Be?"enter":"leave";W.onStart(T,Ae,Ze=>{Ze==="enter"?a==null||a():Ze==="leave"&&(o==null||o())})}),ce=qt(Be=>{let Ae=Be?"enter":"leave";ee.current=!1,W.onStop(T,Ae,Ze=>{Ze==="enter"?s==null||s():Ze==="leave"&&(c==null||c())}),Ae==="leave"&&!Qg(W)&&(Z("hidden"),Y(T))});k.useEffect(()=>{A&&i||(z(R),ce(R))},[R,A,i]);let se=!(!i||!A||!H||q),[,N]=NW(se,w,R,{start:z,end:ce}),le=qo({ref:Q,className:((r=oS(x.className,I&&d,I&&f,N.enter&&d,N.enter&&N.closed&&f,N.enter&&!N.closed&&m,N.leave&&v,N.leave&&!N.closed&&b,N.leave&&N.closed&&S,!N.transition&&R&&p))==null?void 0:r.trim())||void 0,...QW(N)}),pe=0;P==="visible"&&(pe|=Ni.Open),P==="hidden"&&(pe|=Ni.Closed),R&&P==="hidden"&&(pe|=Ni.Opening),!R&&P==="visible"&&(pe|=Ni.Closing);let Oe=Oi();return de.createElement(Pg.Provider,{value:W},de.createElement(zW,{value:pe},Oe({ourProps:le,theirProps:x,defaultTag:bD,features:yD,visible:P==="visible",name:"Transition.Child"})))}function hH(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,s=k.useRef(null),o=vD(e),c=ma(...o?[s,t]:t===null?[]:[t]);Cg();let d=Eg();if(n===void 0&&d!==null&&(n=(d&Ni.Open)===Ni.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,m]=k.useState(n?"visible":"hidden"),p=OD(()=>{n||m("hidden")}),[v,b]=k.useState(!0),S=k.useRef([n]);_r(()=>{v!==!1&&S.current[S.current.length-1]!==n&&(S.current.push(n),b(!1))},[S,n]);let x=k.useMemo(()=>({show:n,appear:r,initial:v}),[n,r,v]);_r(()=>{n?m("visible"):!Qg(p)&&s.current!==null&&m("hidden")},[n,p]);let w={unmount:i},j=qt(()=>{var Q;v&&b(!1),(Q=e.beforeEnter)==null||Q.call(e)}),T=qt(()=>{var Q;v&&b(!1),(Q=e.beforeLeave)==null||Q.call(e)}),A=Oi();return de.createElement(Pg.Provider,{value:p},de.createElement(Ag.Provider,{value:x},A({ourProps:{...w,as:k.Fragment,children:de.createElement(SD,{ref:c,...w,...a,beforeEnter:j,beforeLeave:T})},theirProps:{},defaultTag:k.Fragment,features:yD,visible:f==="visible",name:"Transition"})))}function mH(e,t){let n=k.useContext(Ag)!==null,r=Eg()!==null;return de.createElement(de.Fragment,null,!n&&r?de.createElement(fS,{ref:t,...e}):de.createElement(SD,{ref:t,...e}))}var fS=jr(hH),SD=jr(fH),ur=jr(mH),gl=Object.assign(fS,{Child:ur,Root:fS}),pH=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(pH||{}),gH=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(gH||{}),vH={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},p_=k.createContext(null);p_.displayName="DialogContext";function Ng(e){let t=k.useContext(p_);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ng),n}return t}function OH(e,t){return Ka(t.type,vH,e,t)}var xC=jr(function(e,t){let n=k.useId(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:a,initialFocus:s,role:o="dialog",autoFocus:c=!0,__demoMode:d=!1,unmount:f=!1,...m}=e,p=k.useRef(!1);o=(function(){return o==="dialog"||o==="alertdialog"?o:(p.current||(p.current=!0,console.warn(`Invalid role [${o}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let v=Eg();i===void 0&&v!==null&&(i=(v&Ni.Open)===Ni.Open);let b=k.useRef(null),S=ma(b,t),x=f_(b.current),w=i?0:1,[j,T]=k.useReducer(OH,{titleId:null,descriptionId:null,panelRef:k.createRef()}),A=qt(()=>a(!1)),Q=qt(N=>T({type:0,id:N})),C=Cg()?w===0:!1,[R,D]=YW(),L={get current(){var N;return(N=j.panelRef.current)!=null?N:b.current}},P=mD(),{resolveContainers:Z}=KW({mainTreeNode:P,portals:R,defaultContainers:[L]}),X=v!==null?(v&Ni.Closing)===Ni.Closing:!1;uW(d||X?!1:C,{allowed:qt(()=>{var N,le;return[(le=(N=b.current)==null?void 0:N.closest("[data-headlessui-portal]"))!=null?le:null]}),disallowed:qt(()=>{var N;return[(N=P==null?void 0:P.closest("body > *:not(#headlessui-portal-root)"))!=null?N:null]})});let B=nD.get(null);_r(()=>{if(C)return B.actions.push(r),()=>B.actions.pop(r)},[B,r,C]);let Y=rD(B,k.useCallback(N=>B.selectors.isTop(N,r),[B,r]));xW(Y,Z,N=>{N.preventDefault(),A()}),HW(Y,x==null?void 0:x.defaultView,N=>{N.preventDefault(),N.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),A()}),CW(d||X?!1:C,x,Z),dW(C,b,A);let[H,q]=YF(),I=k.useMemo(()=>[{dialogState:w,close:A,setTitleId:Q,unmount:f},j],[w,A,Q,f,j]),ee=$f({open:w===0}),W={ref:S,id:r,role:o,tabIndex:-1,"aria-modal":d?void 0:w===0?!0:void 0,"aria-labelledby":j.titleId,"aria-describedby":H,unmount:f},z=!GW(),ce=$o.None;C&&!d&&(ce|=$o.RestoreFocus,ce|=$o.TabLock,c&&(ce|=$o.AutoFocus),z&&(ce|=$o.InitialFocus));let se=Oi();return de.createElement(IW,null,de.createElement(yC,{force:!0},de.createElement(WW,null,de.createElement(p_.Provider,{value:I},de.createElement(fD,{target:b},de.createElement(yC,{force:!1},de.createElement(q,{slot:ee},de.createElement(D,null,de.createElement(iH,{initialFocus:s,initialFocusFallback:b,containers:Z,features:ce},de.createElement(JF,{value:A},se({ourProps:W,theirProps:m,slot:ee,defaultTag:bH,features:yH,visible:w===0,name:"Dialog"})))))))))))}),bH="div",yH=Zp.RenderStrategy|Zp.Static;function SH(e,t){let{transition:n=!1,open:r,...i}=e,a=Eg(),s=e.hasOwnProperty("open")||a!==null,o=e.hasOwnProperty("onClose");if(!s&&!o)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!o)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?de.createElement(SC,null,de.createElement(gl,{show:r,transition:n,unmount:i.unmount},de.createElement(xC,{ref:t,...i}))):de.createElement(SC,null,de.createElement(xC,{ref:t,open:r,...i}))}var xH="div";function _H(e,t){let n=k.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...a}=e,[{dialogState:s,unmount:o},c]=Ng("Dialog.Panel"),d=ma(t,c.panelRef),f=$f({open:s===0}),m=qt(x=>{x.stopPropagation()}),p={ref:d,id:r,onClick:m},v=i?ur:k.Fragment,b=i?{unmount:o}:{},S=Oi();return de.createElement(v,{...b},S({ourProps:p,theirProps:a,slot:f,defaultTag:xH,name:"Dialog.Panel"}))}var wH="div";function kH(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:a}]=Ng("Dialog.Backdrop"),s=$f({open:i===0}),o={ref:t,"aria-hidden":!0},c=n?ur:k.Fragment,d=n?{unmount:a}:{},f=Oi();return de.createElement(c,{...d},f({ourProps:o,theirProps:r,slot:s,defaultTag:wH,name:"Dialog.Backdrop"}))}var jH="h2";function TH(e,t){let n=k.useId(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:a,setTitleId:s}]=Ng("Dialog.Title"),o=ma(t);k.useEffect(()=>(s(r),()=>s(null)),[r,s]);let c=$f({open:a===0}),d={ref:o,id:r};return Oi()({ourProps:d,theirProps:i,slot:c,defaultTag:jH,name:"Dialog.Title"})}var EH=jr(SH),vl=jr(_H);jr(kH);var Uf=jr(TH),Wc=Object.assign(EH,{Panel:vl,Title:Uf,Description:GF});function _C({children:e,position:t,onClose:n,isOpen:r,wide:i=!1}){const a=i?800:400,s=i?700:500,o={position:"fixed",left:`${Math.min(t.x,typeof window<"u"?window.innerWidth-a:t.x)}px`,top:`${Math.min(t.y,typeof window<"u"?window.innerHeight-s:t.y)}px`};return g.jsx(gl,{appear:!0,show:r,children:g.jsxs(Wc,{as:"div",className:"semiont-popup-overlay",onClose:n,children:[g.jsx(ur,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-popup-backdrop"})}),g.jsx("div",{className:"semiont-popup-container",children:g.jsx(ur,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsx(vl,{className:"semiont-popup-panel",style:o,"data-annotation-ui":!0,"data-wide":i?"true":"false",children:g.jsx(g.Fragment,{children:e})})})})]})})}function CH(e){return sl(e)?{stroke:"rgb(250, 204, 21)",fill:"rgba(250, 204, 21, 0.2)"}:hi(e)?{stroke:"rgb(59, 130, 246)",fill:"rgba(59, 130, 246, 0.2)"}:Xc(e)?{stroke:"rgb(239, 68, 68)",fill:"rgba(239, 68, 68, 0.2)"}:ao(e)?{stroke:"rgb(255, 255, 255)",fill:"rgba(255, 255, 255, 0.2)"}:ol(e)?{stroke:"rgb(234, 88, 12)",fill:"rgba(234, 88, 12, 0.2)"}:{stroke:"rgb(156, 163, 175)",fill:"rgba(156, 163, 175, 0.2)"}}function iy(e){return ao(e)?"Comment":sl(e)?"Highlight":Xc(e)?"Assessment":ol(e)?"Tag":MS(e)?"Resolved Reference":hi(e)?"Unresolved Reference":"Annotation"}function AH({annotations:e,imageWidth:t,imageHeight:n,displayWidth:r,displayHeight:i,session:a,hoveredAnnotationId:s,selectedAnnotationId:o,hoverDelayMs:c}){const d=r/t,f=i/n,{handleMouseEnter:m,handleMouseLeave:p}=k.useMemo(()=>WS(v=>a==null?void 0:a.client.beckon.hover(v),c),[a,c]);return g.jsx("svg",{className:"semiont-annotation-overlay",style:{width:r,height:i},children:e.map(v=>{if(typeof v.target=="string")return null;const b=zP(v.target.selector);if(!b)return null;const S=DS(b.value);if(!S)return null;const x=v.id===s,w=v.id===o,j=CH(v),T=hi(v),A=T&&Fd(v.body),Q=T?A?"🔗":"❓":null;switch(S.type){case"rect":{const{x:C,y:R,width:D,height:L}=S.data,P=(C+D)*d+8,Z=(R+L)*f+4;return g.jsxs("g",{children:[g.jsx("title",{children:iy(v)}),g.jsx("rect",{x:C*d,y:R*f,width:D*d,height:L*f,fill:x||w?j.fill:"transparent",stroke:j.stroke,strokeWidth:x||w?3:2,opacity:x||w?1:.7,className:"semiont-annotation-overlay__shape","data-hovered":x?"true":"false","data-selected":w?"true":"false",onClick:()=>a==null?void 0:a.client.browse.click(v.id,v.motivation),onMouseEnter:()=>m(v.id),onMouseLeave:p}),Q&&g.jsx("text",{x:P,y:Z,fontSize:"16",className:"semiont-annotation-overlay__status-indicator",style:{userSelect:"none"},onClick:X=>{X.stopPropagation(),a==null||a.client.browse.click(v.id,v.motivation)},onMouseEnter:()=>m(v.id),onMouseLeave:p,children:Q})]},v.id)}case"circle":{const{cx:C,cy:R,r:D}=S.data,L=D*Math.min(d,f),P=Math.PI/4,Z=C*d+L*Math.cos(P)+8,X=R*f+L*Math.sin(P)+4;return g.jsxs("g",{children:[g.jsx("title",{children:iy(v)}),g.jsx("circle",{cx:C*d,cy:R*f,r:L,fill:x||w?j.fill:"transparent",stroke:j.stroke,strokeWidth:x||w?3:2,opacity:x||w?1:.7,className:"semiont-annotation-overlay__shape","data-hovered":x?"true":"false","data-selected":w?"true":"false",onClick:()=>a==null?void 0:a.client.browse.click(v.id,v.motivation),onMouseEnter:()=>m(v.id),onMouseLeave:p}),Q&&g.jsx("text",{x:Z,y:X,fontSize:"16",className:"semiont-annotation-overlay__status-indicator",style:{userSelect:"none"},onClick:B=>{B.stopPropagation(),a==null||a.client.browse.click(v.id,v.motivation)},onMouseEnter:()=>m(v.id),onMouseLeave:p,children:Q})]},v.id)}case"polygon":{const C=S.data.points.map(B=>`${B.x*d},${B.y*f}`).join(" "),D=[...S.data.points.map(B=>({x:B.x*d,y:B.y*f,sum:B.x*d+B.y*f}))].sort((B,Y)=>Y.sum-B.sum),L=D[0],P=D[1],Z=(L.x+P.x)/2+8,X=(L.y+P.y)/2+4;return g.jsxs("g",{children:[g.jsx("title",{children:iy(v)}),g.jsx("polygon",{points:C,fill:x||w?j.fill:"transparent",stroke:j.stroke,strokeWidth:x||w?3:2,opacity:x||w?1:.7,className:"semiont-annotation-overlay__shape","data-hovered":x?"true":"false","data-selected":w?"true":"false",onClick:()=>a==null?void 0:a.client.browse.click(v.id,v.motivation),onMouseEnter:()=>m(v.id),onMouseLeave:p}),Q&&g.jsx("text",{x:Z,y:X,fontSize:"16",className:"semiont-annotation-overlay__status-indicator",style:{userSelect:"none"},onClick:B=>{B.stopPropagation(),a==null||a.client.browse.click(v.id,v.motivation)},onMouseEnter:()=>m(v.id),onMouseLeave:p,children:Q})]},v.id)}default:return null}})})}function PH(e){if(!e)return{stroke:"rgb(156, 163, 175)",fill:"rgba(156, 163, 175, 0.2)"};switch(e){case"highlighting":return{stroke:"rgb(250, 204, 21)",fill:"rgba(250, 204, 21, 0.2)"};case"linking":return{stroke:"rgb(59, 130, 246)",fill:"rgba(59, 130, 246, 0.2)"};case"assessing":return{stroke:"rgb(239, 68, 68)",fill:"rgba(239, 68, 68, 0.2)"};case"commenting":return{stroke:"rgb(255, 255, 255)",fill:"rgba(255, 255, 255, 0.2)"};default:return{stroke:"rgb(156, 163, 175)",fill:"rgba(156, 163, 175, 0.2)"}}}function QH({imageUrl:e,existingAnnotations:t=[],drawingMode:n,selectedMotivation:r,session:i,hoveredAnnotationId:a,selectedAnnotationId:s}){const{hoverDelayMs:o}=v5(),c=k.useRef(null),d=k.useRef(null),[f,m]=k.useState(null),[p,v]=k.useState(null),[b,S]=k.useState(!1),[x,w]=k.useState(null),[j,T]=k.useState(null);k.useEffect(()=>{const L=new Image;L.onload=()=>{m({width:L.naturalWidth,height:L.naturalHeight})},L.src=e},[e]),k.useEffect(()=>{const L=()=>{d.current&&v({width:d.current.clientWidth,height:d.current.clientHeight})};L();let P=null;try{P=new ResizeObserver(L),d.current&&P.observe(d.current)}catch{console.warn("ResizeObserver not supported, falling back to window resize listener"),window.addEventListener("resize",L)}return()=>{P?P.disconnect():window.removeEventListener("resize",L)}},[]);const A=k.useCallback(L=>{if(!d.current)return null;const P=d.current.getBoundingClientRect();return{x:L.clientX-P.left,y:L.clientY-P.top}},[]),Q=k.useCallback(L=>{if(!n)return;const P=A(L);P&&(S(!0),w(P),T(P))},[n,A]),C=k.useCallback(L=>{if(!b||!x)return;const P=A(L);P&&T(P)},[b,x,A]),R=k.useCallback(L=>{if(!b||!x||!n)return;const P=A(L);if(!P||!p||!f)return;if(Math.sqrt(Math.pow(P.x-x.x,2)+Math.pow(P.y-x.y,2))<10){if(t.length>0){const H=t.find(q=>{if(typeof q.target=="string")return!1;const I=q.target.selector;if(!I)return!1;const W=(Array.isArray(I)?I:[I]).find(N=>N.type==="SvgSelector");if(!W||W.type!=="SvgSelector")return!1;const z=DS(W.value);if(!z)return!1;const ce=p.width/f.width,se=p.height/f.height;if(z.type==="rect"){const{x:N,y:le,width:pe,height:Oe}=z.data,Be=N*ce,Ae=le*se,Ze=pe*ce,xe=Oe*se;return P.x>=Be&&P.x<=Be+Ze&&P.y>=Ae&&P.y<=Ae+xe}return!1});if(H){i==null||i.client.browse.click(H.id,H.motivation),S(!1),w(null),T(null);return}}S(!1),w(null),T(null);return}let B;switch(n){case"circle":{const H=Math.sqrt(Math.pow(P.x-x.x,2)+Math.pow(P.y-x.y,2));B=BP(x,H);break}case"polygon":{const H=(x.x+P.x)/2,q=(x.y+P.y)/2,I=Math.abs(P.x-x.x)/2,ee=Math.abs(P.y-x.y)/2,W=[{x:H,y:q-ee},{x:H+I,y:q},{x:H,y:q+ee},{x:H-I,y:q}];B=qP(W);break}case"rectangle":default:B=IP(x,P);break}const Y=GB(B,p.width,p.height,f.width,f.height);i&&r&&i.client.mark.request({type:"SvgSelector",value:Y},r),S(!1),w(null),T(null)},[b,x,n,p,f,A,r,t]),D=k.useCallback(()=>{b&&(S(!1),w(null),T(null))},[b]);return g.jsxs("div",{ref:c,className:"semiont-svg-drawing-canvas",onMouseDown:Q,onMouseMove:C,onMouseUp:R,onMouseLeave:D,"data-drawing-mode":n||"none",children:[g.jsx("img",{ref:d,src:e,alt:"Annotatable content",className:"semiont-svg-drawing-canvas__image",draggable:!1}),p&&f&&g.jsx("div",{className:"semiont-svg-drawing-canvas__overlay-container",children:g.jsxs("div",{className:"semiont-svg-drawing-canvas__overlay",style:{width:p.width,height:p.height},children:[g.jsx(AH,{annotations:t,imageWidth:f.width,imageHeight:f.height,displayWidth:p.width,displayHeight:p.height,hoverDelayMs:o,...i&&{session:i},...a!==void 0&&{hoveredAnnotationId:a},...s!==void 0&&{selectedAnnotationId:s}}),b&&x&&j&&(()=>{const L=PH(r||null);return g.jsxs("svg",{className:"semiont-svg-drawing-canvas__preview",style:{width:p.width,height:p.height},children:[n==="circle"&&(()=>{const P=Math.sqrt(Math.pow(j.x-x.x,2)+Math.pow(j.y-x.y,2));return g.jsx("circle",{cx:x.x,cy:x.y,r:P,fill:L.fill,stroke:L.stroke,strokeWidth:"2",strokeDasharray:"5,5"})})(),n==="polygon"&&(()=>{const P=(x.x+j.x)/2,Z=(x.y+j.y)/2,X=Math.abs(j.x-x.x)/2,B=Math.abs(j.y-x.y)/2,H=[{x:P,y:Z-B},{x:P+X,y:Z},{x:P,y:Z+B},{x:P-X,y:Z}].map(q=>`${q.x},${q.y}`).join(" ");return g.jsx("polygon",{points:H,fill:L.fill,stroke:L.stroke,strokeWidth:"2",strokeDasharray:"5,5"})})(),n==="rectangle"&&g.jsx("rect",{x:Math.min(x.x,j.x),y:Math.min(x.y,j.y),width:Math.abs(j.x-x.x),height:Math.abs(j.y-x.y),fill:L.fill,stroke:L.stroke,strokeWidth:"2",strokeDasharray:"5,5"})]})})()]})})]})}var NH=[{titleKey:"navigationTitle",shortcuts:[{keys:["⌘K","Ctrl K"],descriptionKey:"navOpenSearch"},{keys:["/"],descriptionKey:"navOpenSearchAlt"},{keys:["⌘N","Ctrl N"],descriptionKey:"navCreateResource"},{keys:["Esc Esc"],descriptionKey:"navCloseOverlays"},{keys:["?"],descriptionKey:"navShowHelp"}]},{titleKey:"sidebarTitle",shortcuts:[{keys:["Click <"],descriptionKey:"sidebarCollapse"},{keys:["Click ☰"],descriptionKey:"sidebarExpand"},{keys:["Space"],descriptionKey:"sidebarPickup"},{keys:["↑","↓"],descriptionKey:"sidebarMove"},{keys:["Space"],descriptionKey:"sidebarDrop"},{keys:["Esc"],descriptionKey:"sidebarCancel"}]},{titleKey:"annotationsTitle",shortcuts:[{keys:["H"],descriptionKey:"annotHighlight"},{keys:["R"],descriptionKey:"annotReference"},{keys:["Delete"],descriptionKey:"annotDelete"},{keys:["Tab"],descriptionKey:"annotNavigate"},{keys:["Shift Tab"],descriptionKey:"annotNavigateBack"}]},{titleKey:"listsTitle",shortcuts:[{keys:["←","→"],descriptionKey:"listsFilterNav"},{keys:["↑","↓","←","→"],descriptionKey:"listsGridNav"},{keys:["Home"],descriptionKey:"listsJumpFirst"},{keys:["End"],descriptionKey:"listsJumpLast"}]},{titleKey:"searchModalTitle",shortcuts:[{keys:["↑","↓"],descriptionKey:"searchNav"},{keys:["Enter"],descriptionKey:"searchSelect"},{keys:["Esc"],descriptionKey:"searchClose"}]},{titleKey:"modalTitle",shortcuts:[{keys:["Esc"],descriptionKey:"modalClose"},{keys:["Tab"],descriptionKey:"modalNavForward"},{keys:["Shift Tab"],descriptionKey:"modalNavBackward"},{keys:["Enter"],descriptionKey:"modalActivate"},{keys:["Space"],descriptionKey:"modalActivate"}]},{titleKey:"accessibilityTitle",shortcuts:[{keys:["Tab"],descriptionKey:"a11ySkipLinks"},{keys:["Enter"],descriptionKey:"a11yFollowLink"}]}];function Wse({isOpen:e,onClose:t}){const n=hn("KeyboardShortcuts"),r=typeof window<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;return g.jsx(gl,{appear:!0,show:e,children:g.jsxs(Wc,{as:"div",className:"semiont-modal",onClose:t,children:[g.jsx(ur,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-modal__backdrop"})}),g.jsx("div",{className:"semiont-modal__container",children:g.jsx("div",{className:"semiont-modal__wrapper",children:g.jsx(ur,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(vl,{className:"semiont-modal__panel semiont-modal__panel--large",children:[g.jsx("div",{className:"semiont-modal__header",children:g.jsxs("div",{className:"semiont-modal__header-content",children:[g.jsx(Uf,{className:"semiont-modal__title",children:n("title")}),g.jsx("button",{onClick:t,"aria-label":n("closeDialog"),className:"semiont-modal__close",children:g.jsx("svg",{className:"semiont-modal__close-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),g.jsxs("div",{className:"semiont-modal__body",children:[g.jsx("div",{className:"semiont-shortcuts",children:NH.map(i=>g.jsxs("div",{className:"semiont-shortcuts__group",children:[g.jsx("h3",{className:"semiont-shortcuts__group-title",children:n(i.titleKey)}),g.jsx("div",{className:"semiont-shortcuts__list",children:i.shortcuts.map((a,s)=>g.jsxs("div",{className:"semiont-shortcuts__item",children:[g.jsx("span",{className:"semiont-shortcuts__description",children:n(a.descriptionKey)}),g.jsx("div",{className:"semiont-shortcuts__keys",children:a.keys.map((o,c)=>o.includes("⌘")&&!r||o.includes("Ctrl")&&r?null:g.jsxs(de.Fragment,{children:[c>0&&!o.includes("⌘")&&!o.includes("Ctrl")&&g.jsx("span",{className:"semiont-shortcuts__separator",children:n("or")}),g.jsx("kbd",{className:"semiont-shortcuts__key",children:o})]},c))})]},s))})]},i.titleKey))}),g.jsx("div",{className:"semiont-shortcuts__note",children:g.jsx("p",{className:"semiont-shortcuts__note-text",children:n(r?"macNote":"windowsNote")})})]}),g.jsx("div",{className:"semiont-modal__footer",children:g.jsxs("div",{className:"semiont-modal__footer-content",children:[g.jsx("div",{className:"semiont-modal__hint",children:n("footerHint",{key:"?"}).split("?").map((i,a,s)=>g.jsxs(de.Fragment,{children:[i,a<s.length-1&&g.jsx("kbd",{className:"semiont-modal__hint-key",children:"?"})]},a))}),g.jsx("button",{onClick:t,className:"semiont-button semiont-button--secondary",children:n("close")})]})})]})})})})]})})}function RH(){const e=Me(ot().activeSignals$),t=Me(e==null?void 0:e.permissionDeniedAt$)??null,n=Me(e==null?void 0:e.permissionDeniedMessage$)??null,r=()=>e==null?void 0:e.acknowledgePermissionDenied(),i=t!==null,a=n??"You do not have permission to perform this action.",s=()=>{r(),window.history.back()},o=()=>{r(),window.location.href="/"},c=()=>{r(),window.location.href=`/auth/connect?callbackUrl=${encodeURIComponent(window.location.pathname)}`};return g.jsx(gl,{appear:!0,show:i,children:g.jsxs(Wc,{as:"div",className:"semiont-modal",onClose:s,children:[g.jsx(ur,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-modal__backdrop"})}),g.jsx("div",{className:"semiont-modal__container",children:g.jsx("div",{className:"semiont-modal__wrapper",children:g.jsx(ur,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(vl,{className:"semiont-modal__panel semiont-modal__panel--medium",children:[g.jsx("div",{className:"semiont-modal__icon-wrapper",children:g.jsx("div",{className:"semiont-modal__icon",children:g.jsx("svg",{style:{width:"1.5rem",height:"1.5rem",color:"var(--semiont-color-amber-600, #d97706)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})})}),g.jsxs("div",{className:"semiont-modal__content",children:[g.jsx(Uf,{className:"semiont-modal__title semiont-modal__title--centered",children:"Access Denied"}),g.jsx("p",{className:"semiont-modal__description",children:a})]}),g.jsxs("div",{style:{padding:"0.75rem",backgroundColor:"var(--semiont-bg-secondary)",borderRadius:"var(--semiont-radius-md, 0.375rem)",border:"1px solid var(--semiont-border-primary)",fontSize:"var(--semiont-text-sm, 0.875rem)",marginBottom:"1rem"},children:[g.jsx("p",{style:{color:"var(--semiont-text-secondary)",marginBottom:"0.5rem"},children:"This could be because:"}),g.jsxs("ul",{style:{listStyle:"disc",listStylePosition:"inside",color:"var(--semiont-text-tertiary)",display:"flex",flexDirection:"column",gap:"0.25rem"},children:[g.jsx("li",{children:"You don't have the required permissions"}),g.jsx("li",{children:"The resource is restricted to specific users or teams"}),g.jsx("li",{children:"Your account type doesn't include this feature"})]})]}),g.jsxs("div",{className:"semiont-modal__actions",children:[g.jsx("button",{type:"button",onClick:s,className:"semiont-button--primary semiont-button--flex",children:"Go Back"}),g.jsx("button",{type:"button",onClick:o,className:"semiont-button--secondary semiont-button--flex",children:"Go to Home"})]}),g.jsx("div",{className:"semiont-modal__actions",style:{marginTop:"0.5rem",paddingTop:"0.5rem",borderTop:"1px solid var(--semiont-border-primary)"},children:g.jsx("button",{type:"button",onClick:c,className:"semiont-button--secondary semiont-button--flex",style:{fontSize:"var(--semiont-text-sm, 0.875rem)"},children:"Switch Account"})})]})})})})]})})}function MH(){const e=Me(ot().activeSignals$),t=Me(e==null?void 0:e.sessionExpiredAt$)??null,n=Me(e==null?void 0:e.sessionExpiredMessage$)??null,r=()=>e==null?void 0:e.acknowledgeSessionExpired(),i=t!==null,a=()=>{r(),window.location.href=`/auth/connect?callbackUrl=${encodeURIComponent(window.location.pathname)}`},s=()=>{r(),window.location.href="/"};return g.jsx(gl,{appear:!0,show:i,children:g.jsxs(Wc,{as:"div",className:"semiont-modal",onClose:s,children:[g.jsx(ur,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-modal__backdrop"})}),g.jsx("div",{className:"semiont-modal__container",children:g.jsx("div",{className:"semiont-modal__wrapper",children:g.jsx(ur,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(vl,{className:"semiont-modal__panel semiont-modal__panel--medium",children:[g.jsx("div",{className:"semiont-modal__icon-wrapper",children:g.jsx("div",{className:"semiont-modal__icon",style:{background:"linear-gradient(to bottom right, var(--semiont-color-red-100, #fee2e2), var(--semiont-color-red-300, #fca5a5))"},children:g.jsx("svg",{style:{width:"1.5rem",height:"1.5rem",color:"var(--semiont-color-red-600, #dc2626)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),g.jsxs("div",{className:"semiont-modal__content",children:[g.jsx(Uf,{className:"semiont-modal__title semiont-modal__title--centered",children:"Session Expired"}),g.jsx("p",{className:"semiont-modal__description",children:n??"Your session has expired for security reasons. Please sign in again to continue working."})]}),g.jsxs("div",{className:"semiont-modal__actions",children:[g.jsx("button",{type:"button",onClick:s,className:"semiont-button--secondary semiont-button--flex",children:"Go to Home"}),g.jsx("button",{type:"button",onClick:a,className:"semiont-button--primary semiont-button--flex",children:"Sign In Again"})]})]})})})})]})})}function LH(e,t){if(!e)return[{exact:"",start:0,end:0}];const n=VB(e),r=t.map(s=>{const o=Rn(s.target),c=fi(o),d=o?ZB(o):null;let f;d&&(f=YB(e,d.exact,d.prefix,d.suffix,c==null?void 0:c.start,n));const m=(f==null?void 0:f.start)??(c==null?void 0:c.start)??0,p=(f==null?void 0:f.end)??(c==null?void 0:c.end)??0;return{annotation:s,start:m,end:p}}).filter(s=>s.start>=0&&s.end<=e.length&&s.start<s.end).sort((s,o)=>s.start-o.start);if(r.length===0)return[{exact:e,start:0,end:e.length}];const i=[];let a=0;for(const{annotation:s,start:o,end:c}of r)o<a||(o>a&&i.push({exact:e.slice(a,o),start:a,end:o}),i.push({exact:e.slice(o,c),annotation:s,start:o,end:c}),a=c);return a<e.length&&i.push({exact:e.slice(a),start:a,end:e.length}),i}function DH(e,t,n,r){if(!t||n<0||r<=n||r>e.length)return null;const i=KB(e,n,r);return[{type:"TextPositionSelector",start:n,end:r},{type:"TextQuoteSelector",exact:t,...i.prefix&&{prefix:i.prefix},...i.suffix&&{suffix:i.suffix}}]}function zH(e,t){const n=e.indexOf(t);return n===-1?null:{start:n,end:n+t.length}}var IH=k.lazy(()=>Pe(()=>import("./PdfAnnotationCanvas.client-5QESNO5H-C_S4hy6Q.js"),__vite__mapDeps([2,1,3])).then(e=>({default:e.PdfAnnotationCanvas})));function qH({content:e,mimeType:t="text/plain",resourceUri:n,annotations:r,uiState:i,onUIStateChange:a,enableWidgets:s=!1,getTargetResourceName:o,generatingReferenceId:c,showLineNumbers:d=!1,hoverDelayMs:f=150,annotateMode:m}){const{newAnnotationIds:p}=Kx(),v=k.useRef(null),b=Me(ot().activeSession$),S=IS(t),{highlights:x,references:w,assessments:j,comments:T,tags:A}=r,Q=[...x,...w,...j,...T,...A],C=LH(e,Q),{selectedMotivation:R,selectedClick:D,selectedShape:L,hoveredAnnotationId:P,scrollToAnnotationId:Z}=i,X=k.useRef(a);X.current=a;const B=k.useCallback(({motivation:I})=>{var ee;(ee=X.current)==null||ee.call(X,{selectedMotivation:I})},[]),Y=k.useCallback(({action:I})=>{var ee;(ee=X.current)==null||ee.call(X,{selectedClick:I})},[]),H=k.useCallback(({shape:I})=>{var ee;(ee=X.current)==null||ee.call(X,{selectedShape:I})},[]),q=k.useCallback(({annotationId:I})=>{var ee;(ee=X.current)==null||ee.call(X,{hoveredAnnotationId:I})},[]);switch(ns({"mark:selection-changed":B,"mark:click-changed":Y,"mark:shape-changed":H,"beckon:hover":q}),k.useEffect(()=>{const I=v.current;if(!I)return;let ee=!1;const W=ce=>{const se=ce.target;ee=!!se.closest("[data-annotation-id]"),se.closest("[data-annotation-ui]")},z=ce=>{const se=ce.target;if(se.closest(".semiont-pdf-annotation-canvas")||se.closest(".semiont-svg-drawing-canvas"))return;const N=window.getSelection();if(!N||N.isCollapsed||!N.toString()){ee=!1;return}if(ee){ee=!1;return}ee=!1;const le=N.getRangeAt(0),pe=N.toString(),Oe=I.querySelector(".codemirror-renderer"),Be=Oe==null?void 0:Oe.__cmView;let Ae,Ze;if(!Be||!Be.posAtDOM){const xe=zH(e,pe);if(!xe)return;Ae=xe.start,Ze=xe.end}else Ae=Be.posAtDOM(le.startContainer,le.startOffset),Ze=Ae+pe.length;if(Ae>=0&&R){const xe=DH(e,pe,Ae,Ze);if(!xe)return;b==null||b.client.mark.request(xe,R),N.removeAllRanges()}};return I.addEventListener("mouseup",z),I.addEventListener("mousedown",W),()=>{I.removeEventListener("mouseup",z),I.removeEventListener("mousedown",W)}},[R,e]),S){case"text":return g.jsxs("div",{className:"semiont-annotate-view","data-mime-type":"text",ref:v,children:[g.jsx(wc,{selectedMotivation:R,selectedClick:D,mediaType:t,annotateMode:m,annotators:cr}),g.jsx("div",{className:"semiont-annotate-view__content",children:g.jsx(ZL,{content:e,segments:C,editable:!1,newAnnotationIds:p,...P!==void 0&&{hoveredAnnotationId:P},...Z!==void 0&&{scrollToAnnotationId:Z},sourceView:!0,showLineNumbers:d,hoverDelayMs:f,enableWidgets:s,session:b,...o&&{getTargetResourceName:o},...c!==void 0&&{generatingReferenceId:c}})})]});case"image":return Zc(t)?g.jsxs("div",{className:"semiont-annotate-view","data-mime-type":"pdf",ref:v,children:[g.jsx(wc,{selectedMotivation:R,selectedClick:D,showShapeGroup:!0,selectedShape:L,mediaType:t,annotateMode:m,annotators:cr}),g.jsx("div",{className:"semiont-annotate-view__content",children:e&&g.jsx(k.Suspense,{fallback:g.jsx("div",{className:"semiont-annotate-view__loading",children:"Loading PDF viewer..."}),children:g.jsx(IH,{pdfUrl:e,existingAnnotations:Q,drawingMode:R?L:null,selectedMotivation:R,session:b,hoveredAnnotationId:P||null,hoverDelayMs:f})})})]}):g.jsxs("div",{className:"semiont-annotate-view","data-mime-type":"image",ref:v,children:[g.jsx(wc,{selectedMotivation:R,selectedClick:D,showShapeGroup:!0,selectedShape:L,mediaType:t,annotateMode:m,annotators:cr}),g.jsx("div",{className:"semiont-annotate-view__content",children:e&&g.jsx(QH,{imageUrl:e,existingAnnotations:Q,drawingMode:R?L:null,selectedMotivation:R,session:b,hoveredAnnotationId:P||null,hoverDelayMs:f})})]});case"unsupported":default:return g.jsx("div",{ref:v,className:"semiont-annotate-view semiont-annotate-view--unsupported","data-mime-type":"unsupported",children:g.jsxs("div",{className:"semiont-annotate-view__empty",children:[g.jsxs("p",{className:"semiont-annotate-view__empty-message",children:["Annotation not supported for ",t]}),n&&g.jsx("a",{href:`/api/resources/${n}`,download:!0,className:"semiont-button semiont-button--primary",children:"Download File"})]})})}}function wC(e){if(!e.startsWith("did:"))return e;const t=e.match(/^did:web:system:(.+)$/);if(t){const r=t[1];return r.charAt(0).toUpperCase()+r.slice(1)}const n=e.match(/^did:web:[^:]+:users:(.+)$/);return n?decodeURIComponent(n[1]):e}function kC(e,t,n){var r;switch(e){case"yield:created":return t("resourceCreated");case"yield:cloned":return t("resourceCloned");case"mark:archived":return t("resourceArchived");case"mark:unarchived":return t("resourceUnarchived");case"mark:added":{const i=(r=n==null?void 0:n.annotation)==null?void 0:r.motivation;return t(i==="highlighting"?"highlightAdded":i==="linking"?"referenceCreated":i==="assessing"?"assessmentAdded":"annotationAdded")}case"mark:removed":return t("annotationRemoved");case"mark:body-updated":return t("annotationBodyUpdated");case"mark:entity-tag-added":return t("entitytagAdded");case"mark:entity-tag-removed":return t("entitytagRemoved");case"job:completed":case"job:started":case"job:progress":case"job:failed":return t("jobEvent");case"yield:representation-added":case"yield:representation-removed":return t("representationEvent");default:return e}}function BH(e,t){var n;switch(e){case"yield:created":case"yield:cloned":case"mark:archived":case"mark:unarchived":return"📄";case"mark:added":{const r=(n=t==null?void 0:t.annotation)==null?void 0:n.motivation;return r==="highlighting"?cr.highlight.iconEmoji||"📝":r==="linking"?cr.reference.iconEmoji||"📝":r==="assessing"&&cr.assessment.iconEmoji||"📝"}case"mark:removed":return"🗑️";case"mark:body-updated":return"✏️";case"mark:entity-tag-added":case"mark:entity-tag-removed":return"🏷️";case"job:completed":return"🔗";case"job:started":case"job:progress":return"⚙️";case"job:failed":return"❌";case"yield:representation-added":case"yield:representation-removed":return"📄";default:return"📝"}}function XH(e,t){const n=new Date(e),i=new Date().getTime()-n.getTime(),a=Math.floor(i/6e4),s=Math.floor(i/36e5),o=Math.floor(i/864e5);return a<1?t("justNow"):a<60?t("minutesAgo",{count:a}):s<24?t("hoursAgo",{count:s}):o<7?t("daysAgo",{count:o}):n.toLocaleDateString()}function Zm(e,t=50){const n=e.trim();return n.length>t?n.substring(0,t)+"...":n}function ZH(e,t,n){const r=e,i=r.payload;switch(r.type){case"yield:created":case"yield:cloned":return{exact:i.name,isQuoted:!1,isTag:!1};case"mark:body-updated":{const a=t.find(s=>s.id.endsWith(`/annotations/${i.annotationId}`));if(a!=null&&a.target)try{const s=Rn(a.target),o=Us(s);if(o)return{exact:Zm(o),isQuoted:!0,isTag:!1}}catch{}return null}case"mark:removed":{const a=n.find(s=>s.type==="mark:added"&&s.payload.annotation.id.endsWith(`/annotations/${i.annotationId}`));if(a&&a.type==="mark:added")try{const s=a.payload.annotation.target;if(typeof s!="string"&&s.selector){const o=Us(s.selector);if(o)return{exact:Zm(o),isQuoted:!0,isTag:!1}}}catch{}return null}case"mark:added":{try{const a=i.annotation.target;if(typeof a!="string"&&a.selector){const s=Us(a.selector);if(s)return{exact:Zm(s),isQuoted:!0,isTag:!1}}}catch{}return null}case"mark:entity-tag-added":case"mark:entity-tag-removed":return{exact:i.entityType,isQuoted:!1,isTag:!0};case"job:completed":{if(i.annotationUri){const a=t.find(s=>s.id===i.annotationUri);if(a!=null&&a.target)try{const s=Rn(a.target),o=Us(s);if(o)return{exact:Zm(o),isQuoted:!0,isTag:!1}}catch{}}return null}case"job:started":case"job:progress":case"job:failed":case"yield:representation-added":case"yield:representation-removed":return null;default:return null}}function $H(e){const t=e,n=t.payload;if(t.type==="mark:added"){const r=n.annotation.motivation,i=n.annotation.body;if(r==="linking"&&i&&"entityTypes"in i)return i.entityTypes??[]}return[]}function VH(e){const t=e,n=t.payload;return t.type==="yield:created"?{type:"created",method:n.creationMethod||"unknown",userId:t.userId,metadata:void 0}:t.type==="yield:cloned"?{type:"cloned",method:n.creationMethod||"clone",userId:t.userId,sourceDocId:n.parentResourceId,parentResourceId:n.parentResourceId,metadata:void 0}:null}function UH({event:e,annotations:t,allEvents:n,isRelated:r,t:i,Link:a,routes:s,onEventRef:o,onEventClick:c,onEventHover:d}){const f=ZH(e,t,n),m=RP(e),p=VH(e),v=$H(e),b=k.useRef(null),S=k.useRef(d);k.useEffect(()=>{S.current=d});const x=k.useCallback(()=>{!m||!S.current||(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{var A;(A=S.current)==null||A.call(S,m)},300))},[m]),w=k.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),S.current&&S.current(null)},[]),j=m?"button":"div",T=m?{type:"button",onClick:()=>c==null?void 0:c(m),"aria-label":i("viewAnnotation",{content:(f==null?void 0:f.exact)||kC(e.type,i)}),className:"semiont-history-event","data-related":r?"true":"false","data-interactive":"true"}:{className:"semiont-history-event","data-related":r?"true":"false"};return g.jsxs(j,{ref:A=>{o&&o(m,A)},...T,children:[g.jsxs("div",{className:"semiont-history-event__content",children:[g.jsx("span",{className:"semiont-history-event__emoji",onMouseEnter:x,onMouseLeave:w,children:BH(e.type,e.payload)}),f?f.isTag?g.jsx("span",{className:"semiont-history-event__tag",children:f.exact}):f.isQuoted?g.jsxs("span",{className:"semiont-history-event__text semiont-history-event__text--quoted",children:["“",f.exact,"”"]}):g.jsx("span",{className:"semiont-history-event__text",children:f.exact}):g.jsx("span",{className:"semiont-history-event__text",children:kC(e.type,i,e.payload)}),e.userId&&g.jsx("span",{className:"semiont-history-event__user",children:wC(e.userId)}),g.jsx("span",{className:"semiont-history-event__timestamp",children:XH(e.timestamp,i)})]}),v.length>0&&g.jsx("div",{className:"semiont-history-event__entity-types",children:v.map(A=>g.jsx("span",{className:"semiont-tag semiont-tag--small","data-variant":"blue",children:A},A))}),p&&g.jsxs("div",{className:"semiont-history-event__details",children:[g.jsxs("span",{className:"semiont-history-event__detail",children:[i("user"),": ",g.jsx("span",{className:"semiont-history-event__detail-value",children:p.userId?wC(p.userId):""})]}),g.jsxs("span",{className:"semiont-history-event__detail",children:[i("method"),": ",g.jsx("span",{className:"semiont-history-event__detail-value semiont-history-event__detail-value--uppercase",children:p.method})]}),p.type==="cloned"&&p.sourceDocId&&g.jsx(a,{href:s.resourceDetail(p.sourceDocId),className:"semiont-history-event__link",onClick:A=>A.stopPropagation(),children:i("viewOriginal")})]})]})}function YH({rUri:e,hoveredAnnotationId:t,onEventHover:n,onEventClick:r,Link:i,routes:a}){var S;const s=hn("AnnotationHistory"),o=(S=Me(ot().activeSession$))==null?void 0:S.client,c=Me(o==null?void 0:o.browse.events(e)),d=Me(o==null?void 0:o.browse.annotations(e)),f=c===void 0,m=d??[],p=k.useRef(new Map),v=k.useRef(null),b=c?c.filter(x=>x.type!=="job:started"&&x.type!=="job:progress"&&x.type!=="job:completed").sort((x,w)=>x.metadata.sequenceNumber-w.metadata.sequenceNumber):[];return k.useEffect(()=>{v.current&&b.length>0&&requestAnimationFrame(()=>{v.current&&(v.current.scrollTop=v.current.scrollHeight)})},[b.length]),k.useEffect(()=>{if(!t)return;const x=p.current.get(t);x&&v.current&&(x.scrollIntoView({behavior:"smooth",block:"nearest"}),x.classList.add("bg-blue-100","dark:bg-blue-900/30"),setTimeout(()=>{x.classList.remove("bg-blue-100","dark:bg-blue-900/30")},1500))},[t]),f?g.jsxs("div",{className:"semiont-history-panel",children:[g.jsx("h3",{className:"semiont-history-panel__title",children:s("history")}),g.jsx("div",{className:"semiont-history-panel__loading",children:s("loading")})]}):b.length===0?null:g.jsxs("div",{className:"semiont-history-panel",children:[g.jsx("h3",{className:"semiont-history-panel__title",children:s("history")}),g.jsx("div",{ref:v,className:"semiont-history-panel__list",children:b.map(x=>{const w=t?(()=>{const j=RP(x);return j?j===t:!1})():!1;return g.jsx(UH,{event:x,annotations:m,allEvents:b,isRelated:w,t:s,Link:i,routes:a,onEventRef:(j,T)=>{T&&j?p.current.set(j,T):!T&&j&&p.current.delete(j)},...r&&{onEventClick:r},...n&&{onEventHover:n}},x.id)})})]})}function FH(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var WH=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HH=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GH={};function jC(e,t){return(GH.jsx?HH:WH).test(e)}var KH=/[ \t\n\f\r]/g;function JH(e){return typeof e=="object"?e.type==="text"?TC(e.value):!1:TC(e)}function TC(e){return e.replace(KH,"")===""}var Yf=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Yf.prototype.normal={};Yf.prototype.property={};Yf.prototype.space=void 0;function xD(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Yf(n,r,t)}function hS(e){return e.toLowerCase()}var Tr=class{constructor(e,t){this.attribute=t,this.property=e}};Tr.prototype.attribute="";Tr.prototype.booleanish=!1;Tr.prototype.boolean=!1;Tr.prototype.commaOrSpaceSeparated=!1;Tr.prototype.commaSeparated=!1;Tr.prototype.defined=!1;Tr.prototype.mustUseProperty=!1;Tr.prototype.number=!1;Tr.prototype.overloadedBoolean=!1;Tr.prototype.property="";Tr.prototype.spaceSeparated=!1;Tr.prototype.space=void 0;var Up={};aP(Up,{boolean:()=>Ke,booleanish:()=>xn,commaOrSpaceSeparated:()=>qr,commaSeparated:()=>kc,number:()=>me,overloadedBoolean:()=>mS,spaceSeparated:()=>$t});var e4=0,Ke=Ol(),xn=Ol(),mS=Ol(),me=Ol(),$t=Ol(),kc=Ol(),qr=Ol();function Ol(){return 2**++e4}var ay=Object.keys(Up),g_=class extends Tr{constructor(e,t,n,r){let i=-1;if(super(e,t),EC(this,"space",r),typeof n=="number")for(;++i<ay.length;){const a=ay[i];EC(this,ay[i],(n&Up[a])===Up[a])}}};g_.prototype.defined=!0;function EC(e,t,n){n&&(e[t]=n)}function Hc(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new g_(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[hS(r)]=r,n[hS(a.attribute)]=r}return new Yf(t,n,e.space)}var _D=Hc({properties:{ariaActiveDescendant:null,ariaAtomic:xn,ariaAutoComplete:null,ariaBusy:xn,ariaChecked:xn,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:$t,ariaCurrent:null,ariaDescribedBy:$t,ariaDetails:null,ariaDisabled:xn,ariaDropEffect:$t,ariaErrorMessage:null,ariaExpanded:xn,ariaFlowTo:$t,ariaGrabbed:xn,ariaHasPopup:null,ariaHidden:xn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$t,ariaLevel:me,ariaLive:null,ariaModal:xn,ariaMultiLine:xn,ariaMultiSelectable:xn,ariaOrientation:null,ariaOwns:$t,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:xn,ariaReadOnly:xn,ariaRelevant:null,ariaRequired:xn,ariaRoleDescription:$t,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:xn,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function wD(e,t){return t in e?e[t]:t}function kD(e,t){return wD(e,t.toLowerCase())}var t4=Hc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:kc,acceptCharset:$t,accessKey:$t,action:null,allow:null,allowFullScreen:Ke,allowPaymentRequest:Ke,allowUserMedia:Ke,alt:null,as:null,async:Ke,autoCapitalize:null,autoComplete:$t,autoFocus:Ke,autoPlay:Ke,blocking:$t,capture:null,charSet:null,checked:Ke,cite:null,className:$t,cols:me,colSpan:null,content:null,contentEditable:xn,controls:Ke,controlsList:$t,coords:me|kc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ke,defer:Ke,dir:null,dirName:null,disabled:Ke,download:mS,draggable:xn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ke,formTarget:null,headers:$t,height:me,hidden:mS,high:me,href:null,hrefLang:null,htmlFor:$t,httpEquiv:$t,id:null,imageSizes:null,imageSrcSet:null,inert:Ke,inputMode:null,integrity:null,is:null,isMap:Ke,itemId:null,itemProp:$t,itemRef:$t,itemScope:Ke,itemType:$t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ke,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:Ke,muted:Ke,name:null,nonce:null,noModule:Ke,noValidate:Ke,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ke,optimum:me,pattern:null,ping:$t,placeholder:null,playsInline:Ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ke,referrerPolicy:null,rel:$t,required:Ke,reversed:Ke,rows:me,rowSpan:me,sandbox:$t,scope:null,scoped:Ke,seamless:Ke,selected:Ke,shadowRootClonable:Ke,shadowRootDelegatesFocus:Ke,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:xn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:Ke,useMap:null,value:xn,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$t,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ke,declare:Ke,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:Ke,noHref:Ke,noShade:Ke,noWrap:Ke,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:xn,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ke,disableRemotePlayback:Ke,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:kD}),n4=Hc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qr,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:$t,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:Ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:kc,g2:kc,glyphName:kc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:qr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:me,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$t,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qr,rev:qr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qr,requiredFeatures:qr,requiredFonts:qr,requiredFormats:qr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:qr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qr,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:wD}),jD=Hc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),TD=Hc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:kD}),ED=Hc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),r4={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},i4=/[A-Z]/g,CC=/-[a-z]/g,a4=/^data[-\w.:]+$/i;function s4(e,t){const n=hS(t);let r=t,i=Tr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&a4.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(CC,l4);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!CC.test(a)){let s=a.replace(i4,o4);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=g_}return new i(r,t)}function o4(e){return"-"+e.toLowerCase()}function l4(e){return e.charAt(1).toUpperCase()}var c4=xD([_D,t4,jD,TD,ED],"html"),v_=xD([_D,n4,jD,TD,ED],"svg");function u4(e){return e.join(" ").trim()}var d4=Kn(R$(),1),CD=AD("end"),O_=AD("start");function AD(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function f4(e){const t=O_(e),n=CD(e);if(t&&n)return{start:t,end:n}}function Dd(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?AC(e.position):"start"in e||"end"in e?AC(e):"line"in e||"column"in e?pS(e):""}function pS(e){return PC(e&&e.line)+":"+PC(e&&e.column)}function AC(e){return pS(e&&e.start)+"-"+pS(e&&e.end)}function PC(e){return e&&typeof e=="number"?e:1}var nr=class extends Error{constructor(e,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof e=="string"?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n=="string"){const o=n.indexOf(":");o===-1?i.ruleId=n:(i.source=n.slice(0,o),i.ruleId=n.slice(o+1))}if(!i.place&&i.ancestors&&i.ancestors){const o=i.ancestors[i.ancestors.length-1];o&&(i.place=o.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=s?s.line:void 0,this.name=Dd(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};nr.prototype.file="";nr.prototype.name="";nr.prototype.reason="";nr.prototype.message="";nr.prototype.stack="";nr.prototype.column=void 0;nr.prototype.line=void 0;nr.prototype.ancestors=void 0;nr.prototype.cause=void 0;nr.prototype.fatal=void 0;nr.prototype.place=void 0;nr.prototype.ruleId=void 0;nr.prototype.source=void 0;var b_={}.hasOwnProperty,h4=new Map,m4=/[A-Z]/g,p4=new Set(["table","tbody","thead","tfoot","tr"]),g4=new Set(["td","th"]),PD="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function v4(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=k4(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=w4(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?v_:c4,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=QD(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function QD(e,t,n){if(t.type==="element")return O4(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return b4(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return S4(e,t,n);if(t.type==="mdxjsEsm")return y4(e,t);if(t.type==="root")return x4(e,t,n);if(t.type==="text")return _4(e,t)}function O4(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=v_,e.schema=i),e.ancestors.push(t);const a=RD(e,t.tagName,!1),s=j4(e,t);let o=S_(e,t);return p4.has(t.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!JH(c):!0})),ND(e,s,a,t),y_(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function b4(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}gf(e,t.position)}function y4(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);gf(e,t.position)}function S4(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=v_,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:RD(e,t.name,!0),s=T4(e,t),o=S_(e,t);return ND(e,s,a,t),y_(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function x4(e,t,n){const r={};return y_(r,S_(e,t)),e.create(t,e.Fragment,r,n)}function _4(e,t){return t.value}function ND(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function y_(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function w4(e,t,n){return r;function r(i,a,s,o){const d=Array.isArray(s.children)?n:t;return o?d(a,s,o):d(a,s)}}function k4(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),c=O_(r);return t(i,a,s,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function j4(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&b_.call(t.properties,i)){const a=E4(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&g4.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function T4(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else gf(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else gf(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function S_(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:h4;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const d=i.get(c)||0;s=c+"-"+d,i.set(c,d+1)}}const o=QD(e,a,s);o!==void 0&&n.push(o)}return n}function E4(e,t,n){const r=s4(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?FH(n):u4(n)),r.property==="style"){let i=typeof n=="object"?n:C4(e,String(n));return e.stylePropertyNameCase==="css"&&(i=A4(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?r4[r.property]||r.property:r.attribute,n]}}function C4(e,t){try{return(0,d4.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new nr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=PD+"#cannot-parse-style-attribute",i}}function RD(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=jC(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=jC(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return b_.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);gf(e)}function gf(e,t){const n=new nr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=PD+"#cannot-handle-mdx-estrees-without-createevaluater",n}function A4(e){const t={};let n;for(n in e)b_.call(e,n)&&(t[P4(n)]=e[n]);return t}function P4(e){let t=e.replace(m4,Q4);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Q4(e){return"-"+e.toLowerCase()}var sy={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},N4={};function x_(e,t){const n=N4,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return MD(e,r,i)}function MD(e,t,n){if(R4(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return QC(e.children,t,n)}return Array.isArray(e)?QC(e,t,n):""}function QC(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=MD(e[i],t,n);return r.join("")}function R4(e){return!!(e&&typeof e=="object")}var NC={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
136
- `,Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},M4={}.hasOwnProperty;function __(e){return M4.call(NC,e)?NC[e]:!1}function Zr(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function oi(e,t){return e.length>0?(Zr(e,e.length,0,t),e):t}var RC={}.hasOwnProperty;function LD(e){const t={};let n=-1;for(;++n<e.length;)L4(t,e[n]);return t}function L4(e,t){let n;for(n in t){const i=(RC.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){RC.call(i,s)||(i[s]=[]);const o=a[s];D4(i[s],Array.isArray(o)?o:o?[o]:[])}}}function D4(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Zr(e,0,0,r)}function DD(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Mi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var or=mo(/[A-Za-z]/),Hn=mo(/[\dA-Za-z]/),z4=mo(/[#-'*+\--9=?A-Z^-~]/);function Yp(e){return e!==null&&(e<32||e===127)}var gS=mo(/\d/),I4=mo(/[\dA-Fa-f]/),q4=mo(/[!-/:-@[-`{-~]/);function ze(e){return e!==null&&e<-2}function Bt(e){return e!==null&&(e<0||e===32)}function st(e){return e===-2||e===-1||e===32}var Rg=mo(new RegExp("\\p{P}|\\p{S}","u")),al=mo(/\s/);function mo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Gc(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&Hn(e.charCodeAt(n+1))&&Hn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function gt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(c){return st(c)?(e.enter(n),o(c)):t(c)}function o(c){return st(c)&&a++<i?(e.consume(c),o):(e.exit(n),t(c))}}var B4={tokenize:X4};function X4(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),gt(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return ze(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}var Z4={tokenize:$4},MC={tokenize:V4};function $4(e){const t=this,n=[];let r=0,i,a,s;return o;function o(T){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,c,d)(T)}return d(T)}function c(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&j();const A=t.events.length;let Q=A,C;for(;Q--;)if(t.events[Q][0]==="exit"&&t.events[Q][1].type==="chunkFlow"){C=t.events[Q][1].end;break}w(r);let R=A;for(;R<t.events.length;)t.events[R][1].end={...C},R++;return Zr(t.events,Q+1,0,t.events.slice(A)),t.events.length=R,d(T)}return o(T)}function d(T){if(r===n.length){if(!i)return p(T);if(i.currentConstruct&&i.currentConstruct.concrete)return b(T);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(MC,f,m)(T)}function f(T){return i&&j(),w(r),p(T)}function m(T){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(T)}function p(T){return t.containerState={},e.attempt(MC,v,b)(T)}function v(T){return r++,n.push([t.currentConstruct,t.containerState]),p(T)}function b(T){if(T===null){i&&j(),w(0),e.consume(T);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),S(T)}function S(T){if(T===null){x(e.exit("chunkFlow"),!0),w(0),e.consume(T);return}return ze(T)?(e.consume(T),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(T),S)}function x(T,A){const Q=t.sliceStream(T);if(A&&Q.push(null),T.previous=a,a&&(a.next=T),a=T,i.defineSkip(T.start),i.write(Q),t.parser.lazy[T.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<s&&(!i.events[C][1].end||i.events[C][1].end.offset>s))return;const R=t.events.length;let D=R,L,P;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(L){P=t.events[D][1].end;break}L=!0}for(w(r),C=R;C<t.events.length;)t.events[C][1].end={...P},C++;Zr(t.events,D+1,0,t.events.slice(R)),t.events.length=C}}function w(T){let A=n.length;for(;A-- >T;){const Q=n[A];t.containerState=Q[1],Q[0].exit.call(t,e)}n.length=T}function j(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function V4(e,t,n){return gt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qc(e){if(e===null||Bt(e)||al(e))return 1;if(Rg(e))return 2}function Mg(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var vS={name:"attention",resolveAll:U4,tokenize:Y4};function U4(e,t){let n=-1,r,i,a,s,o,c,d,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},p={...e[n][1].start};LC(m,-c),LC(p,c),s={type:c>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=oi(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=oi(d,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),d=oi(d,Mg(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=oi(d,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,d=oi(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Zr(e,r-1,n-r+3,d),n=r+d.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Y4(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=qc(r);let a;return s;function s(c){return a=c,e.enter("attentionSequence"),o(c)}function o(c){if(c===a)return e.consume(c),o;const d=e.exit("attentionSequence"),f=qc(c),m=!f||f===2&&i||n.includes(c),p=!i||i===2&&f||n.includes(r);return d._open=!!(a===42?m:m&&(i||!p)),d._close=!!(a===42?p:p&&(f||!m)),t(c)}}function LC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var F4={name:"autolink",tokenize:W4};function W4(e,t,n){let r=0;return i;function i(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(v){return or(v)?(e.consume(v),s):v===64?n(v):d(v)}function s(v){return v===43||v===45||v===46||Hn(v)?(r=1,o(v)):d(v)}function o(v){return v===58?(e.consume(v),r=0,c):(v===43||v===45||v===46||Hn(v))&&r++<32?(e.consume(v),o):(r=0,d(v))}function c(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Yp(v)?n(v):(e.consume(v),c)}function d(v){return v===64?(e.consume(v),f):z4(v)?(e.consume(v),d):n(v)}function f(v){return Hn(v)?m(v):n(v)}function m(v){return v===46?(e.consume(v),r=0,f):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):p(v)}function p(v){if((v===45||Hn(v))&&r++<63){const b=v===45?p:m;return e.consume(v),b}return n(v)}}var Ff={partial:!0,tokenize:H4};function H4(e,t,n){return r;function r(a){return st(a)?gt(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||ze(a)?t(a):n(a)}}var zD={continuation:{tokenize:K4},exit:J4,name:"blockQuote",tokenize:G4};function G4(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return st(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function K4(e,t,n){const r=this;return i;function i(s){return st(s)?gt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(zD,t,n)(s)}}function J4(e){e.exit("blockQuote")}var ID={name:"characterEscape",tokenize:eG};function eG(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return q4(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}var qD={name:"characterReference",tokenize:tG};function tG(e,t,n){const r=this;let i=0,a,s;return o;function o(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),c}function c(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,s=Hn,f(m))}function d(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=I4,f):(e.enter("characterReferenceValue"),a=7,s=gS,f(m))}function f(m){if(m===59&&i){const p=e.exit("characterReferenceValue");return s===Hn&&!__(r.sliceSerialize(p))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(m)&&i++<a?(e.consume(m),f):n(m)}}var DC={partial:!0,tokenize:rG},zC={concrete:!0,name:"codeFenced",tokenize:nG};function nG(e,t,n){const r=this,i={partial:!0,tokenize:Q};let a=0,s=0,o;return c;function c(C){return d(C)}function d(C){const R=r.events[r.events.length-1];return a=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,o=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===o?(s++,e.consume(C),f):s<3?n(C):(e.exit("codeFencedFenceSequence"),st(C)?gt(e,m,"whitespace")(C):m(C))}function m(C){return C===null||ze(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(DC,S,A)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||ze(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(C)):st(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),gt(e,v,"whitespace")(C)):C===96&&C===o?n(C):(e.consume(C),p)}function v(C){return C===null||ze(C)?m(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(C))}function b(C){return C===null||ze(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(C)):C===96&&C===o?n(C):(e.consume(C),b)}function S(C){return e.attempt(i,A,x)(C)}function x(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),w}function w(C){return a>0&&st(C)?gt(e,j,"linePrefix",a+1)(C):j(C)}function j(C){return C===null||ze(C)?e.check(DC,S,A)(C):(e.enter("codeFlowValue"),T(C))}function T(C){return C===null||ze(C)?(e.exit("codeFlowValue"),j(C)):(e.consume(C),T)}function A(C){return e.exit("codeFenced"),t(C)}function Q(C,R,D){let L=0;return P;function P(H){return C.enter("lineEnding"),C.consume(H),C.exit("lineEnding"),Z}function Z(H){return C.enter("codeFencedFence"),st(H)?gt(C,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):X(H)}function X(H){return H===o?(C.enter("codeFencedFenceSequence"),B(H)):D(H)}function B(H){return H===o?(L++,C.consume(H),B):L>=s?(C.exit("codeFencedFenceSequence"),st(H)?gt(C,Y,"whitespace")(H):Y(H)):D(H)}function Y(H){return H===null||ze(H)?(C.exit("codeFencedFence"),R(H)):D(H)}}}function rG(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}var oy={name:"codeIndented",tokenize:aG},iG={partial:!0,tokenize:sG};function aG(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),gt(e,a,"linePrefix",5)(d)}function a(d){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?c(d):ze(d)?e.attempt(iG,s,c)(d):(e.enter("codeFlowValue"),o(d))}function o(d){return d===null||ze(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),o)}function c(d){return e.exit("codeIndented"),t(d)}}function sG(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):gt(e,a,"linePrefix",5)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):ze(s)?i(s):n(s)}}var oG={name:"codeText",previous:cG,resolve:lG,tokenize:uG};function lG(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function cG(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uG(e,t,n){let r=0,i,a;return s;function s(m){return e.enter("codeText"),e.enter("codeTextSequence"),o(m)}function o(m){return m===96?(e.consume(m),r++,o):(e.exit("codeTextSequence"),c(m))}function c(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),c):m===96?(a=e.enter("codeTextSequence"),i=0,f(m)):ze(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("codeTextData"),d(m))}function d(m){return m===null||m===32||m===96||ze(m)?(e.exit("codeTextData"),c(m)):(e.consume(m),d)}function f(m){return m===96?(e.consume(m),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",d(m))}}var dG=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&ld(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),ld(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ld(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);ld(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);ld(this.left,t.reverse())}}};function ld(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function BD(e){const t={};let n=-1,r,i,a,s,o,c,d;const f=new dG(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,fG(f,n)),n=t[n],d=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=f.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},o=f.slice(i,n),o.unshift(r),f.splice(i,n-i+1,o))}}return Zr(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!d}function fG(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,c=[],d={};let f,m,p=-1,v=n,b=0,S=0;const x=[S];for(;v;){for(;e.get(++i)[1]!==v;);a.push(i),v._tokenizer||(f=r.sliceStream(v),v.next||f.push(null),m&&s.defineSkip(v.start),v._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),v._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(S=p+1,x.push(S),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(s.events=[],v?(v._tokenizer=void 0,v.previous=void 0):x.pop(),p=x.length;p--;){const w=o.slice(x[p],x[p+1]),j=a.pop();c.push([j,j+w.length-1]),e.splice(j,2,w)}for(c.reverse(),p=-1;++p<c.length;)d[b+c[p][0]]=b+c[p][1],b+=c[p][1]-c[p][0]-1;return d}var hG={resolve:pG,tokenize:gG},mG={partial:!0,tokenize:vG};function pG(e){return BD(e),e}function gG(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):ze(o)?e.check(mG,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function vG(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),gt(e,a,"linePrefix")}function a(s){if(s===null||ze(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function XD(e,t,n,r,i,a,s,o,c){const d=c||Number.POSITIVE_INFINITY;let f=0;return m;function m(w){return w===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(w),e.exit(a),p):w===null||w===32||w===41||Yp(w)?n(w):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),S(w))}function p(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),v(w))}function v(w){return w===62?(e.exit("chunkString"),e.exit(o),p(w)):w===null||w===60||ze(w)?n(w):(e.consume(w),w===92?b:v)}function b(w){return w===60||w===62||w===92?(e.consume(w),v):v(w)}function S(w){return!f&&(w===null||w===41||Bt(w))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(w)):f<d&&w===40?(e.consume(w),f++,S):w===41?(e.consume(w),f--,S):w===null||w===32||w===40||Yp(w)?n(w):(e.consume(w),w===92?x:S)}function x(w){return w===40||w===41||w===92?(e.consume(w),S):S(w)}}function ZD(e,t,n,r,i,a){const s=this;let o=0,c;return d;function d(v){return e.enter(r),e.enter(i),e.consume(v),e.exit(i),e.enter(a),f}function f(v){return o>999||v===null||v===91||v===93&&!c||v===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(v):v===93?(e.exit(a),e.enter(i),e.consume(v),e.exit(i),e.exit(r),t):ze(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||ze(v)||o++>999?(e.exit("chunkString"),f(v)):(e.consume(v),c||(c=!st(v)),v===92?p:m)}function p(v){return v===91||v===92||v===93?(e.consume(v),o++,m):m(v)}}function $D(e,t,n,r,i,a){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,c):n(p)}function c(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),d(p))}function d(p){return p===s?(e.exit(a),c(s)):p===null?n(p):ze(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),gt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===s||p===null||ze(p)?(e.exit("chunkString"),d(p)):(e.consume(p),p===92?m:f)}function m(p){return p===s||p===92?(e.consume(p),f):f(p)}}function zd(e,t){let n;return r;function r(i){return ze(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):st(i)?gt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var OG={name:"definition",tokenize:yG},bG={partial:!0,tokenize:SG};function yG(e,t,n){const r=this;let i;return a;function a(v){return e.enter("definition"),s(v)}function s(v){return ZD.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function o(v){return i=Mi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),c):n(v)}function c(v){return Bt(v)?zd(e,d)(v):d(v)}function d(v){return XD(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function f(v){return e.attempt(bG,m,m)(v)}function m(v){return st(v)?gt(e,p,"whitespace")(v):p(v)}function p(v){return v===null||ze(v)?(e.exit("definition"),r.parser.defined.push(i),t(v)):n(v)}}function SG(e,t,n){return r;function r(o){return Bt(o)?zd(e,i)(o):n(o)}function i(o){return $D(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return st(o)?gt(e,s,"whitespace")(o):s(o)}function s(o){return o===null||ze(o)?t(o):n(o)}}var xG={name:"hardBreakEscape",tokenize:_G};function _G(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return ze(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}var wG={name:"headingAtx",resolve:kG,tokenize:jG};function kG(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Zr(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function jG(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||Bt(f)?(e.exit("atxHeadingSequence"),o(f)):n(f)}function o(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||ze(f)?(e.exit("atxHeading"),t(f)):st(f)?gt(e,o,"whitespace")(f):(e.enter("atxHeadingText"),d(f))}function c(f){return f===35?(e.consume(f),c):(e.exit("atxHeadingSequence"),o(f))}function d(f){return f===null||f===35||Bt(f)?(e.exit("atxHeadingText"),o(f)):(e.consume(f),d)}}var TG=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],IC=["pre","script","style","textarea"],EG={concrete:!0,name:"htmlFlow",resolveTo:PG,tokenize:QG},CG={partial:!0,tokenize:RG},AG={partial:!0,tokenize:NG};function PG(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function QG(e,t,n){const r=this;let i,a,s,o,c;return d;function d(N){return f(N)}function f(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),m}function m(N){return N===33?(e.consume(N),p):N===47?(e.consume(N),a=!0,S):N===63?(e.consume(N),i=3,r.interrupt?t:z):or(N)?(e.consume(N),s=String.fromCharCode(N),x):n(N)}function p(N){return N===45?(e.consume(N),i=2,v):N===91?(e.consume(N),i=5,o=0,b):or(N)?(e.consume(N),i=4,r.interrupt?t:z):n(N)}function v(N){return N===45?(e.consume(N),r.interrupt?t:z):n(N)}function b(N){const le="CDATA[";return N===le.charCodeAt(o++)?(e.consume(N),o===le.length?r.interrupt?t:X:b):n(N)}function S(N){return or(N)?(e.consume(N),s=String.fromCharCode(N),x):n(N)}function x(N){if(N===null||N===47||N===62||Bt(N)){const le=N===47,pe=s.toLowerCase();return!le&&!a&&IC.includes(pe)?(i=1,r.interrupt?t(N):X(N)):TG.includes(s.toLowerCase())?(i=6,le?(e.consume(N),w):r.interrupt?t(N):X(N)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):a?j(N):T(N))}return N===45||Hn(N)?(e.consume(N),s+=String.fromCharCode(N),x):n(N)}function w(N){return N===62?(e.consume(N),r.interrupt?t:X):n(N)}function j(N){return st(N)?(e.consume(N),j):P(N)}function T(N){return N===47?(e.consume(N),P):N===58||N===95||or(N)?(e.consume(N),A):st(N)?(e.consume(N),T):P(N)}function A(N){return N===45||N===46||N===58||N===95||Hn(N)?(e.consume(N),A):Q(N)}function Q(N){return N===61?(e.consume(N),C):st(N)?(e.consume(N),Q):T(N)}function C(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),c=N,R):st(N)?(e.consume(N),C):D(N)}function R(N){return N===c?(e.consume(N),c=null,L):N===null||ze(N)?n(N):(e.consume(N),R)}function D(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Bt(N)?Q(N):(e.consume(N),D)}function L(N){return N===47||N===62||st(N)?T(N):n(N)}function P(N){return N===62?(e.consume(N),Z):n(N)}function Z(N){return N===null||ze(N)?X(N):st(N)?(e.consume(N),Z):n(N)}function X(N){return N===45&&i===2?(e.consume(N),q):N===60&&i===1?(e.consume(N),I):N===62&&i===4?(e.consume(N),ce):N===63&&i===3?(e.consume(N),z):N===93&&i===5?(e.consume(N),W):ze(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(CG,se,B)(N)):N===null||ze(N)?(e.exit("htmlFlowData"),B(N)):(e.consume(N),X)}function B(N){return e.check(AG,Y,se)(N)}function Y(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),H}function H(N){return N===null||ze(N)?B(N):(e.enter("htmlFlowData"),X(N))}function q(N){return N===45?(e.consume(N),z):X(N)}function I(N){return N===47?(e.consume(N),s="",ee):X(N)}function ee(N){if(N===62){const le=s.toLowerCase();return IC.includes(le)?(e.consume(N),ce):X(N)}return or(N)&&s.length<8?(e.consume(N),s+=String.fromCharCode(N),ee):X(N)}function W(N){return N===93?(e.consume(N),z):X(N)}function z(N){return N===62?(e.consume(N),ce):N===45&&i===2?(e.consume(N),z):X(N)}function ce(N){return N===null||ze(N)?(e.exit("htmlFlowData"),se(N)):(e.consume(N),ce)}function se(N){return e.exit("htmlFlow"),t(N)}}function NG(e,t,n){const r=this;return i;function i(s){return ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function RG(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ff,t,n)}}var MG={name:"htmlText",tokenize:LG};function LG(e,t,n){const r=this;let i,a,s;return o;function o(z){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(z),c}function c(z){return z===33?(e.consume(z),d):z===47?(e.consume(z),Q):z===63?(e.consume(z),T):or(z)?(e.consume(z),D):n(z)}function d(z){return z===45?(e.consume(z),f):z===91?(e.consume(z),a=0,b):or(z)?(e.consume(z),j):n(z)}function f(z){return z===45?(e.consume(z),v):n(z)}function m(z){return z===null?n(z):z===45?(e.consume(z),p):ze(z)?(s=m,I(z)):(e.consume(z),m)}function p(z){return z===45?(e.consume(z),v):m(z)}function v(z){return z===62?q(z):z===45?p(z):m(z)}function b(z){const ce="CDATA[";return z===ce.charCodeAt(a++)?(e.consume(z),a===ce.length?S:b):n(z)}function S(z){return z===null?n(z):z===93?(e.consume(z),x):ze(z)?(s=S,I(z)):(e.consume(z),S)}function x(z){return z===93?(e.consume(z),w):S(z)}function w(z){return z===62?q(z):z===93?(e.consume(z),w):S(z)}function j(z){return z===null||z===62?q(z):ze(z)?(s=j,I(z)):(e.consume(z),j)}function T(z){return z===null?n(z):z===63?(e.consume(z),A):ze(z)?(s=T,I(z)):(e.consume(z),T)}function A(z){return z===62?q(z):T(z)}function Q(z){return or(z)?(e.consume(z),C):n(z)}function C(z){return z===45||Hn(z)?(e.consume(z),C):R(z)}function R(z){return ze(z)?(s=R,I(z)):st(z)?(e.consume(z),R):q(z)}function D(z){return z===45||Hn(z)?(e.consume(z),D):z===47||z===62||Bt(z)?L(z):n(z)}function L(z){return z===47?(e.consume(z),q):z===58||z===95||or(z)?(e.consume(z),P):ze(z)?(s=L,I(z)):st(z)?(e.consume(z),L):q(z)}function P(z){return z===45||z===46||z===58||z===95||Hn(z)?(e.consume(z),P):Z(z)}function Z(z){return z===61?(e.consume(z),X):ze(z)?(s=Z,I(z)):st(z)?(e.consume(z),Z):L(z)}function X(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),i=z,B):ze(z)?(s=X,I(z)):st(z)?(e.consume(z),X):(e.consume(z),Y)}function B(z){return z===i?(e.consume(z),i=void 0,H):z===null?n(z):ze(z)?(s=B,I(z)):(e.consume(z),B)}function Y(z){return z===null||z===34||z===39||z===60||z===61||z===96?n(z):z===47||z===62||Bt(z)?L(z):(e.consume(z),Y)}function H(z){return z===47||z===62||Bt(z)?L(z):n(z)}function q(z){return z===62?(e.consume(z),e.exit("htmlTextData"),e.exit("htmlText"),t):n(z)}function I(z){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),ee}function ee(z){return st(z)?gt(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):W(z)}function W(z){return e.enter("htmlTextData"),s(z)}}var w_={name:"labelEnd",resolveAll:qG,resolveTo:BG,tokenize:XG},DG={tokenize:ZG},zG={tokenize:$G},IG={tokenize:VG};function qG(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Zr(e,0,e.length,n),e}function BG(e,t){let n=e.length,r=0,i,a,s,o;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",c,t],["enter",d,t]],o=oi(o,e.slice(a+1,a+r+3)),o=oi(o,[["enter",f,t]]),o=oi(o,Mg(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),o=oi(o,[["exit",f,t],e[s-2],e[s-1],["exit",d,t]]),o=oi(o,e.slice(s+1)),o=oi(o,[["exit",c,t]]),Zr(e,a,e.length,o),e}function XG(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return o;function o(p){return a?a._inactive?m(p):(s=r.parser.defined.includes(Mi(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(DG,f,s?f:m)(p):p===91?e.attempt(zG,f,s?d:m)(p):s?f(p):m(p)}function d(p){return e.attempt(IG,f,m)(p)}function f(p){return t(p)}function m(p){return a._balanced=!0,n(p)}}function ZG(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),i}function i(m){return Bt(m)?zd(e,a)(m):a(m)}function a(m){return m===41?f(m):XD(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function s(m){return Bt(m)?zd(e,c)(m):f(m)}function o(m){return n(m)}function c(m){return m===34||m===39||m===40?$D(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):f(m)}function d(m){return Bt(m)?zd(e,f)(m):f(m)}function f(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function $G(e,t,n){const r=this;return i;function i(o){return ZD.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(Mi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function VG(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}var UG={name:"labelStartImage",resolveAll:w_.resolveAll,tokenize:YG};function YG(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}var FG={name:"labelStartLink",resolveAll:w_.resolveAll,tokenize:WG};function WG(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}var ly={name:"lineEnding",tokenize:HG};function HG(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),gt(e,t,"linePrefix")}}var vp={name:"thematicBreak",tokenize:GG};function GG(e,t,n){let r=0,i;return a;function a(d){return e.enter("thematicBreak"),s(d)}function s(d){return i=d,o(d)}function o(d){return d===i?(e.enter("thematicBreakSequence"),c(d)):r>=3&&(d===null||ze(d))?(e.exit("thematicBreak"),t(d)):n(d)}function c(d){return d===i?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),st(d)?gt(e,o,"whitespace")(d):o(d))}}var br={continuation:{tokenize:tK},exit:rK,name:"list",tokenize:eK},KG={partial:!0,tokenize:iK},JG={partial:!0,tokenize:nK};function eK(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(v){const b=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:gS(v)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(vp,n,d)(v):d(v);if(!r.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(v)}return n(v)}function c(v){return gS(v)&&++s<10?(e.consume(v),c):(!r.interrupt||s<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),d(v)):n(v)}function d(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,e.check(Ff,r.interrupt?n:f,e.attempt(KG,p,m))}function f(v){return r.containerState.initialBlankLine=!0,a++,p(v)}function m(v){return st(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),p):n(v)}function p(v){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function tK(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ff,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,gt(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!st(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(JG,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,gt(e,e.attempt(br,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function nK(e,t,n){const r=this;return gt(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function rK(e){e.exit(this.containerState.type)}function iK(e,t,n){const r=this;return gt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!st(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}var qC={name:"setextUnderline",resolveTo:aK,tokenize:sK};function aK(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function sK(e,t,n){const r=this;let i;return a;function a(d){let f=r.events.length,m;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){m=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),i=d,s(d)):n(d)}function s(d){return e.enter("setextHeadingLineSequence"),o(d)}function o(d){return d===i?(e.consume(d),o):(e.exit("setextHeadingLineSequence"),st(d)?gt(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||ze(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}var oK={tokenize:lK};function lK(e){const t=this,n=e.attempt(Ff,r,e.attempt(this.parser.constructs.flowInitial,i,gt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(hG,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var cK={resolveAll:UD()},uK=VD("string"),dK=VD("text");function VD(e){return{resolveAll:UD(e==="text"?fK:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(f){return d(f)?a(f):o(f)}function o(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),c}function c(f){return d(f)?(n.exit("data"),a(f)):(n.consume(f),c)}function d(f){if(f===null)return!0;const m=i[f];let p=-1;if(m)for(;++p<m.length;){const v=m[p];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function UD(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function fK(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,o=0,c;for(;a--;){const d=i[a];if(typeof d=="string"){for(s=d.length;d.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(d===-2)c=!0,o++;else if(d!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const d={type:n===e.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}var YD={};aP(YD,{attentionMarkers:()=>yK,contentInitial:()=>mK,disable:()=>SK,document:()=>hK,flow:()=>gK,flowInitial:()=>pK,insideSpan:()=>bK,string:()=>vK,text:()=>OK});var hK={42:br,43:br,45:br,48:br,49:br,50:br,51:br,52:br,53:br,54:br,55:br,56:br,57:br,62:zD},mK={91:OG},pK={[-2]:oy,[-1]:oy,32:oy},gK={35:wG,42:vp,45:[qC,vp],60:EG,61:qC,95:vp,96:zC,126:zC},vK={38:qD,92:ID},OK={[-5]:ly,[-4]:ly,[-3]:ly,33:UG,38:qD,42:vS,60:[F4,MG],91:FG,92:[xG,ID],93:w_,95:vS,96:oG},bK={null:[vS,cK]},yK={null:[42,95]},SK={null:[]};function xK(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],o=[];const c={attempt:R(Q),check:R(C),consume:j,enter:T,exit:A,interrupt:R(C,{interrupt:!0})},d={code:null,containerState:{},defineSkip:S,events:[],now:b,parser:e,previous:null,sliceSerialize:p,sliceStream:v,write:m};let f=t.tokenize.call(d,c);return t.resolveAll&&a.push(t),d;function m(Z){return s=oi(s,Z),x(),s[s.length-1]!==null?[]:(D(t,0),d.events=Mg(a,d.events,d),d.events)}function p(Z,X){return wK(v(Z),X)}function v(Z){return _K(s,Z)}function b(){const{_bufferIndex:Z,_index:X,line:B,column:Y,offset:H}=r;return{_bufferIndex:Z,_index:X,line:B,column:Y,offset:H}}function S(Z){i[Z.line]=Z.column,P()}function x(){let Z;for(;r._index<s.length;){const X=s[r._index];if(typeof X=="string")for(Z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Z&&r._bufferIndex<X.length;)w(X.charCodeAt(r._bufferIndex));else w(X)}}function w(Z){f=f(Z)}function j(Z){ze(Z)?(r.line++,r.column=1,r.offset+=Z===-3?2:1,P()):Z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=Z}function T(Z,X){const B=X||{};return B.type=Z,B.start=b(),d.events.push(["enter",B,d]),o.push(B),B}function A(Z){const X=o.pop();return X.end=b(),d.events.push(["exit",X,d]),X}function Q(Z,X){D(Z,X.from)}function C(Z,X){X.restore()}function R(Z,X){return B;function B(Y,H,q){let I,ee,W,z;return Array.isArray(Y)?se(Y):"tokenize"in Y?se([Y]):ce(Y);function ce(Oe){return Be;function Be(Ae){const Ze=Ae!==null&&Oe[Ae],xe=Ae!==null&&Oe.null,Ye=[...Array.isArray(Ze)?Ze:Ze?[Ze]:[],...Array.isArray(xe)?xe:xe?[xe]:[]];return se(Ye)(Ae)}}function se(Oe){return I=Oe,ee=0,Oe.length===0?q:N(Oe[ee])}function N(Oe){return Be;function Be(Ae){return z=L(),W=Oe,Oe.partial||(d.currentConstruct=Oe),Oe.name&&d.parser.constructs.disable.null.includes(Oe.name)?pe():Oe.tokenize.call(X?Object.assign(Object.create(d),X):d,c,le,pe)(Ae)}}function le(Oe){return Z(W,z),H}function pe(Oe){return z.restore(),++ee<I.length?N(I[ee]):q}}}function D(Z,X){Z.resolveAll&&!a.includes(Z)&&a.push(Z),Z.resolve&&Zr(d.events,X,d.events.length-X,Z.resolve(d.events.slice(X),d)),Z.resolveTo&&(d.events=Z.resolveTo(d.events,d))}function L(){const Z=b(),X=d.previous,B=d.currentConstruct,Y=d.events.length,H=Array.from(o);return{from:Y,restore:q};function q(){r=Z,d.previous=X,d.currentConstruct=B,d.events.length=Y,o=H,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function _K(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function wK(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
137
- `;break}case-3:{s=`\r
138
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function kK(e){const r={constructs:LD([YD,...(e||{}).extensions||[]]),content:i(B4),defined:[],document:i(Z4),flow:i(oK),lazy:{},string:i(uK),text:i(dK)};return r;function i(a){return s;function s(o){return xK(r,a,o)}}}function jK(e){for(;!BD(e););return e}var BC=/[\0\t\n\r]/g;function TK(){let e=1,t="",n=!0,r;return i;function i(a,s,o){const c=[];let d,f,m,p,v;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(BC.lastIndex=m,d=BC.exec(a),p=d&&d.index!==void 0?d.index:a.length,v=a.charCodeAt(p),!d){t=a.slice(m);break}if(v===10&&m===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),m<p&&(c.push(a.slice(m,p)),e+=p-m),v){case 0:{c.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,c.push(-2);e++<f;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}m=p+1}return o&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}var EK=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function CK(e){return e.replace(EK,AK)}function AK(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return DD(n.slice(a?2:1),a?16:10)}return __(n)||e}var FD={}.hasOwnProperty;function PK(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),QK(n)(jK(kK(n).document().write(TK()(e,t,!0))))}function QK(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(We),autolinkProtocol:L,autolinkEmail:L,atxHeading:a(mt),blockQuote:a(xe),characterEscape:L,characterReference:L,codeFenced:a(Ye),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Ye,s),codeText:a(Ue,s),codeTextData:L,data:L,codeFlowValue:L,definition:a(Qe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(De),hardBreakEscape:a(Ve),hardBreakTrailing:a(Ve),htmlFlow:a(cn,s),htmlFlowData:L,htmlText:a(cn,s),htmlTextData:L,image:a(je),label:s,link:a(We),listItem:a(dt),listItemValue:p,listOrdered:a(ge,m),listUnordered:a(ge),paragraph:a(Et),reference:N,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(mt),strong:a(Zt),thematicBreak:a(Mn)},exit:{atxHeading:c(),atxHeadingSequence:Q,autolink:c(),autolinkEmail:Ze,autolinkProtocol:Ae,blockQuote:c(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:Oe,characterReference:Be,codeFenced:c(x),codeFencedFence:S,codeFencedFenceInfo:v,codeFencedFenceMeta:b,codeFlowValue:P,codeIndented:c(w),codeText:c(H),codeTextData:P,data:P,definition:c(),definitionDestinationString:A,definitionLabelString:j,definitionTitleString:T,emphasis:c(),hardBreakEscape:c(X),hardBreakTrailing:c(X),htmlFlow:c(B),htmlFlowData:P,htmlText:c(Y),htmlTextData:P,image:c(I),label:W,labelText:ee,lineEnding:Z,link:c(q),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:le,resourceDestinationString:z,resourceTitleString:ce,resource:se,setextHeading:c(D),setextHeadingLineSequence:R,setextHeadingText:C,strong:c(),thematicBreak:c()}};WD(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(re){let fe={type:"root",children:[]};const Te={stack:[fe],tokenStack:[],config:t,enter:o,exit:d,buffer:s,resume:f,data:n},$e=[];let rt=-1;for(;++rt<re.length;)if(re[rt][1].type==="listOrdered"||re[rt][1].type==="listUnordered")if(re[rt][0]==="enter")$e.push(rt);else{const Ct=$e.pop();rt=i(re,Ct,rt)}for(rt=-1;++rt<re.length;){const Ct=t[re[rt][0]];FD.call(Ct,re[rt][1].type)&&Ct[re[rt][1].type].call(Object.assign({sliceSerialize:re[rt][2].sliceSerialize},Te),re[rt][1])}if(Te.tokenStack.length>0){const Ct=Te.tokenStack[Te.tokenStack.length-1];(Ct[1]||XC).call(Te,void 0,Ct[0])}for(fe.position={start:Ms(re.length>0?re[0][1].start:{line:1,column:1,offset:0}),end:Ms(re.length>0?re[re.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)fe=t.transforms[rt](fe)||fe;return fe}function i(re,fe,Te){let $e=fe-1,rt=-1,Ct=!1,Cn,Jt,Lt,Ht;for(;++$e<=Te;){const lt=re[$e];switch(lt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{lt[0]==="enter"?rt++:rt--,Ht=void 0;break}case"lineEndingBlank":{lt[0]==="enter"&&(Cn&&!Ht&&!rt&&!Lt&&(Lt=$e),Ht=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ht=void 0}if(!rt&&lt[0]==="enter"&&lt[1].type==="listItemPrefix"||rt===-1&&lt[0]==="exit"&&(lt[1].type==="listUnordered"||lt[1].type==="listOrdered")){if(Cn){let Vn=$e;for(Jt=void 0;Vn--;){const mn=re[Vn];if(mn[1].type==="lineEnding"||mn[1].type==="lineEndingBlank"){if(mn[0]==="exit")continue;Jt&&(re[Jt][1].type="lineEndingBlank",Ct=!0),mn[1].type="lineEnding",Jt=Vn}else if(!(mn[1].type==="linePrefix"||mn[1].type==="blockQuotePrefix"||mn[1].type==="blockQuotePrefixWhitespace"||mn[1].type==="blockQuoteMarker"||mn[1].type==="listItemIndent"))break}Lt&&(!Jt||Lt<Jt)&&(Cn._spread=!0),Cn.end=Object.assign({},Jt?re[Jt][1].start:lt[1].end),re.splice(Jt||$e,0,["exit",Cn,lt[2]]),$e++,Te++}if(lt[1].type==="listItemPrefix"){const Vn={type:"listItem",_spread:!1,start:Object.assign({},lt[1].start),end:void 0};Cn=Vn,re.splice($e,0,["enter",Vn,lt[2]]),$e++,Te++,Lt=void 0,Ht=!0}}}return re[fe][1]._spread=Ct,Te}function a(re,fe){return Te;function Te($e){o.call(this,re($e),$e),fe&&fe.call(this,$e)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(re,fe,Te){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([fe,Te||void 0]),re.position={start:Ms(fe.start),end:void 0}}function c(re){return fe;function fe(Te){re&&re.call(this,Te),d.call(this,Te)}}function d(re,fe){const Te=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==re.type&&(fe?fe.call(this,re,$e[0]):($e[1]||XC).call(this,re,$e[0]));else throw new Error("Cannot close `"+re.type+"` ("+Dd({start:re.start,end:re.end})+"): it’s not open");Te.position.end=Ms(re.end)}function f(){return x_(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function p(re){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function v(){const re=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=re}function b(){const re=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=re}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const re=this.resume(),fe=this.stack[this.stack.length-1];fe.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const re=this.resume(),fe=this.stack[this.stack.length-1];fe.value=re.replace(/(\r?\n|\r)$/g,"")}function j(re){const fe=this.resume(),Te=this.stack[this.stack.length-1];Te.label=fe,Te.identifier=Mi(this.sliceSerialize(re)).toLowerCase()}function T(){const re=this.resume(),fe=this.stack[this.stack.length-1];fe.title=re}function A(){const re=this.resume(),fe=this.stack[this.stack.length-1];fe.url=re}function Q(re){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Te=this.sliceSerialize(re).length;fe.depth=Te}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function R(re){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function L(re){const Te=this.stack[this.stack.length-1].children;let $e=Te[Te.length-1];(!$e||$e.type!=="text")&&($e=et(),$e.position={start:Ms(re.start),end:void 0},Te.push($e)),this.stack.push($e)}function P(re){const fe=this.stack.pop();fe.value+=this.sliceSerialize(re),fe.position.end=Ms(re.end)}function Z(re){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Te=fe.children[fe.children.length-1];Te.position.end=Ms(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(L.call(this,re),P.call(this,re))}function X(){this.data.atHardBreak=!0}function B(){const re=this.resume(),fe=this.stack[this.stack.length-1];fe.value=re}function Y(){const re=this.resume(),fe=this.stack[this.stack.length-1];fe.value=re}function H(){const re=this.resume(),fe=this.stack[this.stack.length-1];fe.value=re}function q(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=fe,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function I(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=fe,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function ee(re){const fe=this.sliceSerialize(re),Te=this.stack[this.stack.length-2];Te.label=CK(fe),Te.identifier=Mi(fe).toLowerCase()}function W(){const re=this.stack[this.stack.length-1],fe=this.resume(),Te=this.stack[this.stack.length-1];if(this.data.inReference=!0,Te.type==="link"){const $e=re.children;Te.children=$e}else Te.alt=fe}function z(){const re=this.resume(),fe=this.stack[this.stack.length-1];fe.url=re}function ce(){const re=this.resume(),fe=this.stack[this.stack.length-1];fe.title=re}function se(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function le(re){const fe=this.resume(),Te=this.stack[this.stack.length-1];Te.label=fe,Te.identifier=Mi(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function pe(re){this.data.characterReferenceType=re.type}function Oe(re){const fe=this.sliceSerialize(re),Te=this.data.characterReferenceType;let $e;Te?($e=DD(fe,Te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=__(fe);const rt=this.stack[this.stack.length-1];rt.value+=$e}function Be(re){const fe=this.stack.pop();fe.position.end=Ms(re.end)}function Ae(re){P.call(this,re);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(re)}function Ze(re){P.call(this,re);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(re)}function xe(){return{type:"blockquote",children:[]}}function Ye(){return{type:"code",lang:null,meta:null,value:""}}function Ue(){return{type:"inlineCode",value:""}}function Qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function De(){return{type:"emphasis",children:[]}}function mt(){return{type:"heading",depth:0,children:[]}}function Ve(){return{type:"break"}}function cn(){return{type:"html",value:""}}function je(){return{type:"image",title:null,url:"",alt:null}}function We(){return{type:"link",title:null,url:"",children:[]}}function ge(re){return{type:"list",ordered:re.type==="listOrdered",start:null,spread:re._spread,children:[]}}function dt(re){return{type:"listItem",spread:re._spread,checked:null,children:[]}}function Et(){return{type:"paragraph",children:[]}}function Zt(){return{type:"strong",children:[]}}function et(){return{type:"text",value:""}}function Mn(){return{type:"thematicBreak"}}}function Ms(e){return{line:e.line,column:e.column,offset:e.offset}}function WD(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?WD(e,r):NK(e,r)}}function NK(e,t){let n;for(n in t)if(FD.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function XC(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Dd({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Dd({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Dd({start:t.start,end:t.end})+") is still open")}function RK(e){const t=this;t.parser=n;function n(r){return PK(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function MK(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function LK(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
139
- `}]}function DK(e,t){const n=t.value?t.value+`
140
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function zK(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IK(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qK(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Gc(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,d),e.applyData(t,d)}function BK(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XK(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function HD(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function ZK(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return HD(e,t);const i={src:Gc(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function $K(e,t){const n={src:Gc(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function VK(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function UK(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return HD(e,t);const i={href:Gc(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function YK(e,t){const n={href:Gc(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function FK(e,t,n){const r=e.all(t),i=n?WK(n):GD(t),a={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let m;f&&f.type==="element"&&f.tagName==="p"?m=f:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const f=r[o];(i||o!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
141
- `}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
142
- `});const d={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,d),e.applyData(t,d)}function WK(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=GD(n[r])}return t}function GD(e){const t=e.spread;return t??e.children.length>1}function HK(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function GK(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KK(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function JK(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eJ(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=O_(t.children[1]),c=CD(t.children[t.children.length-1]);o&&c&&(s.position={start:o,end:c}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function tJ(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let c=-1;const d=[];for(;++c<o;){const m=t.children[c],p={},v=s?s[c]:void 0;v&&(p.align=v);let b={type:"element",tagName:a,properties:p,children:[]};m&&(b.children=e.all(m),e.patch(m,b),b=e.applyData(m,b)),d.push(b)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,f),e.applyData(t,f)}function nJ(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var ZC=9,$C=32;function rJ(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(VC(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(VC(t.slice(i),i>0,!1)),a.join("")}function VC(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===ZC||a===$C;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===ZC||a===$C;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function iJ(e,t){const n={type:"text",value:rJ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function aJ(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var sJ={blockquote:MK,break:LK,code:DK,delete:zK,emphasis:IK,footnoteReference:qK,heading:BK,html:XK,imageReference:ZK,image:$K,inlineCode:VK,linkReference:UK,link:YK,listItem:FK,list:HK,paragraph:GK,root:KK,strong:JK,table:eJ,tableCell:nJ,tableRow:tJ,text:iJ,thematicBreak:aJ,toml:$m,yaml:$m,definition:$m,footnoteDefinition:$m};function $m(){}var KD=-1,Lg=0,Id=1,Fp=2,k_=3,j_=4,T_=5,E_=6,JD=7,e3=8,UC=typeof self=="object"?self:globalThis,oJ=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case Lg:case KD:return n(s,i);case Id:{const o=n([],i);for(const c of s)o.push(r(c));return o}case Fp:{const o=n({},i);for(const[c,d]of s)o[r(c)]=r(d);return o}case k_:return n(new Date(s),i);case j_:{const{source:o,flags:c}=s;return n(new RegExp(o,c),i)}case T_:{const o=n(new Map,i);for(const[c,d]of s)o.set(r(c),r(d));return o}case E_:{const o=n(new Set,i);for(const c of s)o.add(r(c));return o}case JD:{const{name:o,message:c}=s;return n(new UC[o](c),i)}case e3:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return n(new DataView(o),s)}}return n(new UC[a](s),i)};return r},YC=e=>oJ(new Map,e)(0),sc="",{toString:lJ}={},{keys:cJ}=Object,cd=e=>{const t=typeof e;if(t!=="object"||!e)return[Lg,t];const n=lJ.call(e).slice(8,-1);switch(n){case"Array":return[Id,sc];case"Object":return[Fp,sc];case"Date":return[k_,sc];case"RegExp":return[j_,sc];case"Map":return[T_,sc];case"Set":return[E_,sc];case"DataView":return[Id,n]}return n.includes("Array")?[Id,n]:n.includes("Error")?[JD,n]:[Fp,n]},Vm=([e,t])=>e===Lg&&(t==="function"||t==="symbol"),uJ=(e,t,n,r)=>{const i=(s,o)=>{const c=r.push(s)-1;return n.set(o,c),c},a=s=>{if(n.has(s))return n.get(s);let[o,c]=cd(s);switch(o){case Lg:{let f=s;switch(c){case"bigint":o=e3,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([KD],s)}return i([o,f],s)}case Id:{if(c){let p=s;return c==="DataView"?p=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(s)),i([c,[...p]],s)}const f=[],m=i([o,f],s);for(const p of s)f.push(a(p));return m}case Fp:{if(c)switch(c){case"BigInt":return i([c,s.toString()],s);case"Boolean":case"Number":case"String":return i([c,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const f=[],m=i([o,f],s);for(const p of cJ(s))(e||!Vm(cd(s[p])))&&f.push([a(p),a(s[p])]);return m}case k_:return i([o,s.toISOString()],s);case j_:{const{source:f,flags:m}=s;return i([o,{source:f,flags:m}],s)}case T_:{const f=[],m=i([o,f],s);for(const[p,v]of s)(e||!(Vm(cd(p))||Vm(cd(v))))&&f.push([a(p),a(v)]);return m}case E_:{const f=[],m=i([o,f],s);for(const p of s)(e||!Vm(cd(p)))&&f.push(a(p));return m}}const{message:d}=s;return i([o,{name:c,message:d}],s)};return a},FC=(e,{json:t,lossy:n}={})=>{const r=[];return uJ(!(t||n),!!t,new Map,r)(e),r},Wp=typeof structuredClone=="function"?((e,t)=>t&&("json"in t||"lossy"in t)?YC(FC(e,t)):structuredClone(e)):(e,t)=>YC(FC(e,t));function dJ(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function fJ(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function hJ(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||dJ,r=e.options.footnoteBackLabel||fJ,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[c]);if(!d)continue;const f=e.all(d),m=String(d.identifier).toUpperCase(),p=Gc(m.toLowerCase());let v=0;const b=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++v<=S;){b.length>0&&b.push({type:"text",value:" "});let j=typeof n=="string"?n:n(c,v);typeof j=="string"&&(j={type:"text",value:j}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,v),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const x=f[f.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const j=x.children[x.children.length-1];j&&j.type==="text"?j.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...b)}else f.push(...b);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(d,w),o.push(w)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Wp(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
143
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
144
- `}]}}var Dg=(function(e){if(e==null)return vJ;if(typeof e=="function")return zg(e);if(typeof e=="object")return Array.isArray(e)?mJ(e):pJ(e);if(typeof e=="string")return gJ(e);throw new Error("Expected function, string, or object as test")});function mJ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Dg(e[n]);return zg(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function pJ(e){const t=e;return zg(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function gJ(e){return zg(t);function t(n){return n&&n.type===e}}function zg(e){return t;function t(n,r,i){return!!(OJ(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function vJ(){return!0}function OJ(e){return e!==null&&typeof e=="object"&&"type"in e}function bJ(e){return"\x1B[33m"+e+"\x1B[39m"}var t3=[],yJ=!0,OS=!1,SJ="skip";function n3(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Dg(i),s=r?-1:1;o(e,void 0,[])();function o(c,d,f){const m=c&&typeof c=="object"?c:{};if(typeof m.type=="string"){const v=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(p,"name",{value:"node ("+bJ(c.type+(v?"<"+v+">":""))+")"})}return p;function p(){let v=t3,b,S,x;if((!t||a(c,d,f[f.length-1]||void 0))&&(v=xJ(n(c,f)),v[0]===OS))return v;if("children"in c&&c.children){const w=c;if(w.children&&v[0]!==SJ)for(S=(r?w.children.length:-1)+s,x=f.concat(w);S>-1&&S<w.children.length;){const j=w.children[S];if(b=o(j,S,x)(),b[0]===OS)return b;S=typeof b[1]=="number"?b[1]:S+s}}return v}}}function xJ(e){return Array.isArray(e)?e:typeof e=="number"?[yJ,e]:e==null?t3:[e]}function C_(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),n3(e,a,o,i);function o(c,d){const f=d[d.length-1],m=f?f.children.indexOf(c):void 0;return s(c,m,f)}}var bS={}.hasOwnProperty,_J={};function wJ(e,t){const n=t||_J,r=new Map,i=new Map,a=new Map,s={...sJ,...n.handlers},o={all:d,applyData:jJ,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:c,options:n,patch:kJ,wrap:EJ};return C_(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const m=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();m.has(p)||m.set(p,f)}}),o;function c(f,m){const p=f.type,v=o.handlers[p];if(bS.call(o.handlers,p)&&v)return v(o,f,m);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in f){const{children:S,...x}=f,w=Wp(x);return w.children=o.all(f),w}return Wp(f)}return(o.options.unknownHandler||TJ)(o,f,m)}function d(f){const m=[];if("children"in f){const p=f.children;let v=-1;for(;++v<p.length;){const b=o.one(p[v],f);if(b){if(v&&p[v-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=WC(b.value)),!Array.isArray(b)&&b.type==="element")){const S=b.children[0];S&&S.type==="text"&&(S.value=WC(S.value))}Array.isArray(b)?m.push(...b):m.push(b)}}}return m}}function kJ(e,t){e.position&&(t.position=f4(e))}function jJ(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,Wp(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function TJ(e,t){const n=t.data||{},r="value"in t&&!(bS.call(n,"hProperties")||bS.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function EJ(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
145
- `});++r<e.length;)r&&n.push({type:"text",value:`
146
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
147
- `}),n}function WC(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function HC(e,t){const n=wJ(e,t),r=n.one(e,void 0),i=hJ(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
148
- `},i),a}function CJ(e,t){return e&&"run"in e?async function(n,r){const i=HC(n,{file:r,...t});await e.run(i,r)}:function(n,r){return HC(n,{file:r,...e||t})}}function GC(e){if(e)throw e}var cy=Kn(M$(),1);function yS(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function AJ(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(c,...d){const f=e[++a];let m=-1;if(c){s(c);return}for(;++m<i.length;)(d[m]===null||d[m]===void 0)&&(d[m]=i[m]);i=d,f?PJ(f,o)(...d):s(null,...d)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function PJ(e,t){let n;return r;function r(...s){const o=e.length>s.length;let c;o&&s.push(i);try{c=e.apply(this,s)}catch(d){const f=d;if(o&&n)throw f;return i(f)}o||(c&&c.then&&typeof c.then=="function"?c.then(a,i):c instanceof Error?i(c):a(c))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}function KC(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var uy=["history","path","basename","stem","extname","dirname"],r3=class{constructor(e){let t;e?KC(e)?t={path:e}:typeof e=="string"||QJ(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":C$.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<uy.length;){const i=uy[n];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let r;for(r in t)uy.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path=="string"?na.basename(this.path):void 0}set basename(e){fy(e,"basename"),dy(e,"basename"),this.path=na.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?na.dirname(this.path):void 0}set dirname(e){JC(this.basename,"dirname"),this.path=na.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?na.extname(this.path):void 0}set extname(e){if(dy(e,"extname"),JC(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=na.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){KC(e)&&(e=A$(e)),fy(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?na.basename(this.path,this.extname):void 0}set stem(e){fy(e,"stem"),dy(e,"stem"),this.path=na.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new nr(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function dy(e,t){if(e&&e.includes(na.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+na.sep+"`")}function fy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function JC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function QJ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var NJ=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),RJ={}.hasOwnProperty,MJ=class i3 extends NJ{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=AJ()}copy(){const t=new i3;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data((0,cy.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(py("data",this.frozen),this.namespace[t]=n,this):RJ.call(this.namespace,t)&&this.namespace[t]||void 0:t?(py("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Um(t),r=this.parser||this.Parser;return hy("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),hy("process",this.parser||this.Parser),my("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const o=Um(t),c=r.parse(o);r.run(c,o,function(f,m,p){if(f||!m||!p)return d(f);const v=m,b=r.stringify(v,p);zJ(b)?p.value=b:p.result=b,d(f,p)});function d(f,m){f||!m?s(f):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),hy("processSync",this.parser||this.Parser),my("processSync",this.compiler||this.Compiler),this.process(t,i),tA("processSync","process",n),r;function i(a,s){n=!0,GC(a),r=s}}run(t,n,r){eA(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const c=Um(n);i.run(t,c,d);function d(f,m,p){const v=m||t;f?o(f):s?s(v):r(void 0,v,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),tA("runSync","run",r),i;function a(s,o){GC(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=Um(n),i=this.compiler||this.Compiler;return my("stringify",i),eA(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(py("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(d){if(typeof d=="function")c(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[f,...m]=d;c(f,m)}else s(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function s(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(d.plugins),d.settings&&(i.settings=(0,cy.default)(!0,i.settings,d.settings))}function o(d){let f=-1;if(d!=null)if(Array.isArray(d))for(;++f<d.length;){const m=d[f];a(m)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function c(d,f){let m=-1,p=-1;for(;++m<r.length;)if(r[m][0]===d){p=m;break}if(p===-1)r.push([d,...f]);else if(f.length>0){let[v,...b]=f;const S=r[p][1];yS(S)&&yS(v)&&(v=(0,cy.default)(!0,S,v)),r[p]=[d,v,...b]}}}},LJ=new MJ().freeze();function hy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function my(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function py(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function eA(e){if(!yS(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function tA(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Um(e){return DJ(e)?e:new r3(e)}function DJ(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function zJ(e){return typeof e=="string"||IJ(e)}function IJ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var qJ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",nA=[],rA={allowDangerousHtml:!0},BJ=/^(https?|ircs?|mailto|xmpp)$/i,XJ=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ZJ(e){const t=$J(e),n=VJ(e);return UJ(t.runSync(t.parse(n),n),e)}function $J(e){const t=e.rehypePlugins||nA,n=e.remarkPlugins||nA,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rA}:rA;return LJ().use(RK).use(n).use(CJ,r).use(t)}function VJ(e){const t=e.children||"",n=new r3;return typeof t=="string"&&(n.value=t),n}function UJ(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,s=t.skipHtml,o=t.unwrapDisallowed,c=t.urlTransform||YJ;for(const f of XJ)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+qJ+f.id,void 0);return C_(e,d),v4(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function d(f,m,p){if(f.type==="raw"&&p&&typeof m=="number")return s?p.children.splice(m,1):p.children[m]={type:"text",value:f.value},m;if(f.type==="element"){let v;for(v in sy)if(Object.hasOwn(sy,v)&&Object.hasOwn(f.properties,v)){const b=f.properties[v],S=sy[v];(S===null||S.includes(f.tagName))&&(f.properties[v]=c(String(b||""),v,f))}}if(f.type==="element"){let v=n?!n.includes(f.tagName):a?a.includes(f.tagName):!1;if(!v&&r&&typeof m=="number"&&(v=!r(f,m,p)),v&&p&&typeof m=="number")return o&&f.children?p.children.splice(m,1,...f.children):p.children.splice(m,1),m}}}function YJ(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||BJ.test(e.slice(0,t))?e:""}function iA(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function FJ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function WJ(e,t,n){const i=Dg((n||{}).ignore||[]),a=HJ(t);let s=-1;for(;++s<a.length;)n3(e,"text",o);function o(d,f){let m=-1,p;for(;++m<f.length;){const v=f[m],b=p?p.children:void 0;if(i(v,b?b.indexOf(v):void 0,p))return;p=v}if(p)return c(d,f)}function c(d,f){const m=f[f.length-1],p=a[s][0],v=a[s][1];let b=0;const x=m.children.indexOf(d);let w=!1,j=[];p.lastIndex=0;let T=p.exec(d.value);for(;T;){const A=T.index,Q={index:T.index,input:T.input,stack:[...f,d]};let C=v(...T,Q);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?p.lastIndex=A+1:(b!==A&&j.push({type:"text",value:d.value.slice(b,A)}),Array.isArray(C)?j.push(...C):C&&j.push(C),b=A+T[0].length,w=!0),!p.global)break;T=p.exec(d.value)}return w?(b<d.value.length&&j.push({type:"text",value:d.value.slice(b)}),m.children.splice(x,1,...j)):j=[d],x+j.length}}function HJ(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([GJ(i[0]),KJ(i[1])])}return t}function GJ(e){return typeof e=="string"?new RegExp(FJ(e),"g"):e}function KJ(e){return typeof e=="function"?e:function(){return e}}var gy="phrasing",vy=["autolink","link","image","label"];function JJ(){return{transforms:[see],enter:{literalAutolink:tee,literalAutolinkEmail:Oy,literalAutolinkHttp:Oy,literalAutolinkWww:Oy},exit:{literalAutolink:aee,literalAutolinkEmail:iee,literalAutolinkHttp:nee,literalAutolinkWww:ree}}}function eee(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:gy,notInConstruct:vy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:gy,notInConstruct:vy},{character:":",before:"[ps]",after:"\\/",inConstruct:gy,notInConstruct:vy}]}}function tee(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Oy(e){this.config.enter.autolinkProtocol.call(this,e)}function nee(e){this.config.exit.autolinkProtocol.call(this,e)}function ree(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function iee(e){this.config.exit.autolinkEmail.call(this,e)}function aee(e){this.exit(e)}function see(e){WJ(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,oee],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),lee]],{ignore:["link","linkReference"]})}function oee(e,t,n,r,i){let a="";if(!a3(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!cee(n)))return!1;const s=uee(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function lee(e,t,n,r){return!a3(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function cee(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function uee(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=iA(e,"(");let a=iA(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function a3(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||al(n)||Rg(n))&&(!t||n!==47)}s3.peek=bee;function dee(){this.buffer()}function fee(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function hee(){this.buffer()}function mee(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function pee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gee(e){this.exit(e)}function vee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Oee(e){this.exit(e)}function bee(){return"["}function s3(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function yee(){return{enter:{gfmFootnoteCallString:dee,gfmFootnoteCall:fee,gfmFootnoteDefinitionLabelString:hee,gfmFootnoteDefinition:mee},exit:{gfmFootnoteCallString:pee,gfmFootnoteCall:gee,gfmFootnoteDefinitionLabelString:vee,gfmFootnoteDefinition:Oee}}}function See(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:s3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let c=o.move("[^");const d=a.enter("footnoteDefinition"),f=a.enter("label");return c+=o.move(a.safe(a.associationId(r),{before:c,after:"]"})),f(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((t?`
149
- `:" ")+a.indentLines(a.containerFlow(r,o.current()),t?o3:xee))),d(),c}}function xee(e,t,n){return t===0?e:o3(e,t,n)}function o3(e,t,n){return(n?"":" ")+e}var _ee=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];l3.peek=Eee;function wee(){return{canContainEols:["delete"],enter:{strikethrough:jee},exit:{strikethrough:Tee}}}function kee(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_ee}],handlers:{delete:l3}}}function jee(e){this.enter({type:"delete",children:[]},e)}function Tee(e){this.exit(e)}function l3(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function Eee(){return"~"}function Cee(e){return e.length}function Aee(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Cee,a=[],s=[],o=[],c=[];let d=0,f=-1;for(;++f<e.length;){const S=[],x=[];let w=-1;for(e[f].length>d&&(d=e[f].length);++w<e[f].length;){const j=Pee(e[f][w]);if(n.alignDelimiters!==!1){const T=i(j);x[w]=T,(c[w]===void 0||T>c[w])&&(c[w]=T)}S.push(j)}s[f]=S,o[f]=x}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<d;)a[m]=aA(r[m]);else{const S=aA(r);for(;++m<d;)a[m]=S}m=-1;const p=[],v=[];for(;++m<d;){const S=a[m];let x="",w="";S===99?(x=":",w=":"):S===108?x=":":S===114&&(w=":");let j=n.alignDelimiters===!1?1:Math.max(1,c[m]-x.length-w.length);const T=x+"-".repeat(j)+w;n.alignDelimiters!==!1&&(j=x.length+j+w.length,j>c[m]&&(c[m]=j),v[m]=j),p[m]=T}s.splice(1,0,p),o.splice(1,0,v),f=-1;const b=[];for(;++f<s.length;){const S=s[f],x=o[f];m=-1;const w=[];for(;++m<d;){const j=S[m]||"";let T="",A="";if(n.alignDelimiters!==!1){const Q=c[m]-(x[m]||0),C=a[m];C===114?T=" ".repeat(Q):C===99?Q%2?(T=" ".repeat(Q/2+.5),A=" ".repeat(Q/2-.5)):(T=" ".repeat(Q/2),A=T):A=" ".repeat(Q)}n.delimiterStart!==!1&&!m&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||m)&&w.push(" "),n.alignDelimiters!==!1&&w.push(T),w.push(j),n.alignDelimiters!==!1&&w.push(A),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||m!==d-1)&&w.push("|")}b.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return b.join(`
150
- `)}function Pee(e){return e==null?"":String(e)}function aA(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Qee(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),Nee);return i(),s}function Nee(e,t,n){return">"+(n?"":" ")+e}function Ree(e,t){return sA(e,t.inConstruct,!0)&&!sA(e,t.notInConstruct,!1)}function sA(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function oA(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
151
- `&&Ree(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
152
- `}function Mee(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function Lee(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Dee(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function zee(e,t,n,r){const i=Dee(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Lee(e,n)){const m=n.enter("codeIndented"),p=n.indentLines(a,Iee);return m(),p}const o=n.createTracker(r),c=i.repeat(Math.max(Mee(a,i)+1,3)),d=n.enter("codeFenced");let f=o.move(c);if(e.lang){const m=n.enter(`codeFencedLang${s}`);f+=o.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...o.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${s}`);f+=o.move(" "),f+=o.move(n.safe(e.meta,{before:f,after:`
153
- `,encode:["`"],...o.current()})),m()}return f+=o.move(`
154
- `),a&&(f+=o.move(a+`
155
- `)),f+=o.move(c),d(),f}function Iee(e,t,n){return(n?"":" ")+e}function A_(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function qee(e,t,n,r){const i=A_(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const c=n.createTracker(r);let d=c.move("[");return d+=c.move(n.safe(n.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(o=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":`
156
- `,...c.current()}))),o(),e.title&&(o=n.enter(`title${a}`),d+=c.move(" "+i),d+=c.move(n.safe(e.title,{before:d,after:i,...c.current()})),d+=c.move(i),o()),s(),d}function Bee(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function vf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Hp(e,t,n){const r=qc(e),i=qc(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}c3.peek=Xee;function c3(e,t,n,r){const i=Bee(n),a=n.enter("emphasis"),s=n.createTracker(r),o=s.move(i);let c=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const d=c.charCodeAt(0),f=Hp(r.before.charCodeAt(r.before.length-1),d,i);f.inside&&(c=vf(d)+c.slice(1));const m=c.charCodeAt(c.length-1),p=Hp(r.after.charCodeAt(0),m,i);p.inside&&(c=c.slice(0,-1)+vf(m));const v=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},o+c+v}function Xee(e,t,n){return n.options.emphasis||"*"}function Zee(e,t){let n=!1;return C_(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,OS}),!!((!e.depth||e.depth<3)&&x_(e)&&(t.options.setext||n))}function $ee(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Zee(e,n)){const f=n.enter("headingSetext"),m=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
157
- `,after:`
158
- `});return m(),f(),p+`
159
- `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
160
- `))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),c=n.enter("phrasing");a.move(s+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
161
- `,...a.current()});return/^[\t ]/.test(d)&&(d=vf(d.charCodeAt(0))+d.slice(1)),d=d?s+" "+d:s,n.options.closeAtx&&(d+=" "+s),c(),o(),d}u3.peek=Vee;function u3(e){return e.value||""}function Vee(){return"<"}d3.peek=Uee;function d3(e,t,n,r){const i=A_(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const c=n.createTracker(r);let d=c.move("![");return d+=c.move(n.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(o=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=n.enter(`title${a}`),d+=c.move(" "+i),d+=c.move(n.safe(e.title,{before:d,after:i,...c.current()})),d+=c.move(i),o()),d+=c.move(")"),s(),d}function Uee(){return"!"}f3.peek=Yee;function f3(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let c=o.move("![");const d=n.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(d+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return s(),n.stack=f,a(),i==="full"||!d||d!==m?c+=o.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function Yee(){return"!"}h3.peek=Fee;function h3(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],o=n.compilePattern(s);let c;if(s.atBreak)for(;c=o.exec(r);){let d=c.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(c.index+1)}}return i+r+i}function Fee(){return"`"}function m3(e,t){const n=x_(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}p3.peek=Wee;function p3(e,t,n,r){const i=A_(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,c;if(m3(e,n)){const f=n.stack;n.stack=[],o=n.enter("autolink");let m=s.move("<");return m+=s.move(n.containerPhrasing(e,{before:m,after:">",...s.current()})),m+=s.move(">"),o(),n.stack=f,m}o=n.enter("link"),c=n.enter("label");let d=s.move("[");return d+=s.move(n.containerPhrasing(e,{before:d,after:"](",...s.current()})),d+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=s.move("<"),d+=s.move(n.safe(e.url,{before:d,after:">",...s.current()})),d+=s.move(">")):(c=n.enter("destinationRaw"),d+=s.move(n.safe(e.url,{before:d,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=s.move(" "+i),d+=s.move(n.safe(e.title,{before:d,after:i,...s.current()})),d+=s.move(i),c()),d+=s.move(")"),o(),d}function Wee(e,t,n){return m3(e,n)?"<":"["}g3.peek=Hee;function g3(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let c=o.move("[");const d=n.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(d+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return s(),n.stack=f,a(),i==="full"||!d||d!==m?c+=o.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function Hee(){return"["}function P_(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Gee(e){const t=P_(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Kee(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function v3(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Jee(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?Kee(n):P_(n);const o=e.ordered?s==="."?")":".":Gee(n);let c=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),v3(n)===s&&f){let m=-1;for(;++m<e.children.length;){const p=e.children[m];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=o),n.bulletCurrent=s;const d=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),d}function ete(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function tte(e,t,n,r){const i=ete(n);let a=n.bulletCurrent||P_(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const c=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,o.current()),f);return c(),d;function f(m,p,v){return p?(v?"":" ".repeat(s))+m:(v?a:a+" ".repeat(s-a.length))+m}}function nte(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}var rte=Dg(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ite(e,t,n,r){return(e.children.some(function(s){return rte(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ate(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}O3.peek=ste;function O3(e,t,n,r){const i=ate(n),a=n.enter("strong"),s=n.createTracker(r),o=s.move(i+i);let c=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const d=c.charCodeAt(0),f=Hp(r.before.charCodeAt(r.before.length-1),d,i);f.inside&&(c=vf(d)+c.slice(1));const m=c.charCodeAt(c.length-1),p=Hp(r.after.charCodeAt(0),m,i);p.inside&&(c=c.slice(0,-1)+vf(m));const v=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},o+c+v}function ste(e,t,n){return n.options.strong||"*"}function ote(e,t,n,r){return n.safe(e.value,r)}function lte(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function cte(e,t,n){const r=(v3(n)+(n.options.ruleSpaces?" ":"")).repeat(lte(n));return n.options.ruleSpaces?r.slice(0,-1):r}var b3={blockquote:Qee,break:oA,code:zee,definition:qee,emphasis:c3,hardBreak:oA,heading:$ee,html:u3,image:d3,imageReference:f3,inlineCode:h3,link:p3,linkReference:g3,list:Jee,listItem:tte,paragraph:nte,root:ite,strong:O3,text:ote,thematicBreak:cte};function ute(){return{enter:{table:dte,tableData:lA,tableHeader:lA,tableRow:hte},exit:{codeText:mte,table:fte,tableData:by,tableHeader:by,tableRow:by}}}function dte(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function fte(e){this.exit(e),this.data.inTable=void 0}function hte(e){this.enter({type:"tableRow",children:[]},e)}function by(e){this.exit(e)}function lA(e){this.enter({type:"tableCell",children:[]},e)}function mte(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,pte));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function pte(e,t){return t==="|"?t:e}function gte(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
162
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:c,tableRow:o}};function s(v,b,S,x){return d(f(v,S,x),v.align)}function o(v,b,S,x){const w=m(v,S,x),j=d([w]);return j.slice(0,j.indexOf(`
163
- `))}function c(v,b,S,x){const w=S.enter("tableCell"),j=S.enter("phrasing"),T=S.containerPhrasing(v,{...x,before:a,after:a});return j(),w(),T}function d(v,b){return Aee(v,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function f(v,b,S){const x=v.children;let w=-1;const j=[],T=b.enter("table");for(;++w<x.length;)j[w]=m(x[w],b,S);return T(),j}function m(v,b,S){const x=v.children;let w=-1;const j=[],T=b.enter("tableRow");for(;++w<x.length;)j[w]=c(x[w],v,b,S);return T(),j}function p(v,b,S){let x=b3.inlineCode(v,b,S);return S.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function vte(){return{exit:{taskListCheckValueChecked:cA,taskListCheckValueUnchecked:cA,paragraph:bte}}}function Ote(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:yte}}}function cA(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function bte(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function yte(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let c=b3.listItem(e,t,n,{...r,...o.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),c;function d(f){return f+s}}function Ste(){return[JJ(),yee(),wee(),ute(),vte()]}function xte(e){return{extensions:[eee(),See(e),kee(),gte(e),Ote()]}}var _te={tokenize:Cte,partial:!0},y3={tokenize:Ate,partial:!0},S3={tokenize:Pte,partial:!0},x3={tokenize:Qte,partial:!0},wte={tokenize:Nte,partial:!0},_3={name:"wwwAutolink",tokenize:Tte,previous:k3},w3={name:"protocolAutolink",tokenize:Ete,previous:j3},is={name:"emailAutolink",tokenize:jte,previous:T3},pa={};function kte(){return{text:pa}}var Do=48;for(;Do<123;)pa[Do]=is,Do++,Do===58?Do=65:Do===91&&(Do=97);pa[43]=is;pa[45]=is;pa[46]=is;pa[95]=is;pa[72]=[is,w3];pa[104]=[is,w3];pa[87]=[is,_3];pa[119]=[is,_3];function jte(e,t,n){const r=this;let i,a;return s;function s(m){return!SS(m)||!T3.call(r,r.previous)||Q_(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(m))}function o(m){return SS(m)?(e.consume(m),o):m===64?(e.consume(m),c):n(m)}function c(m){return m===46?e.check(wte,f,d)(m):m===45||m===95||Hn(m)?(a=!0,e.consume(m),c):f(m)}function d(m){return e.consume(m),i=!0,c}function f(m){return a&&i&&or(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function Tte(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!k3.call(r,r.previous)||Q_(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_te,e.attempt(y3,e.attempt(S3,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function Ete(e,t,n){const r=this;let i="",a=!1;return s;function s(m){return(m===72||m===104)&&j3.call(r,r.previous)&&!Q_(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(m),e.consume(m),o):n(m)}function o(m){if(or(m)&&i.length<5)return i+=String.fromCodePoint(m),e.consume(m),o;if(m===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(m),c}return n(m)}function c(m){return m===47?(e.consume(m),a?d:(a=!0,c)):n(m)}function d(m){return m===null||Yp(m)||Bt(m)||al(m)||Rg(m)?n(m):e.attempt(y3,e.attempt(S3,f),n)(m)}function f(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function Cte(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function Ate(e,t,n){let r,i,a;return s;function s(d){return d===46||d===95?e.check(x3,c,o)(d):d===null||Bt(d)||al(d)||d!==45&&Rg(d)?c(d):(a=!0,e.consume(d),s)}function o(d){return d===95?r=!0:(i=r,r=void 0),e.consume(d),s}function c(d){return i||r||!a?n(d):t(d)}}function Pte(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(x3,t,a)(s):s===null||Bt(s)||al(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function Qte(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Bt(o)||al(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Bt(o)||al(o)?t(o):r(o)}function a(o){return or(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):or(o)?(e.consume(o),s):n(o)}}function Nte(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Hn(a)?n(a):t(a)}}function k3(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Bt(e)}function j3(e){return!or(e)}function T3(e){return!(e===47||SS(e))}function SS(e){return e===43||e===45||e===46||e===95||Hn(e)}function Q_(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Rte={tokenize:Xte,partial:!0};function Mte(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ite,continuation:{tokenize:qte},exit:Bte}},text:{91:{name:"gfmFootnoteCall",tokenize:zte},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Lte,resolveTo:Dte}}}}function Lte(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!s||!s._balanced)return n(c);const d=Mi(r.sliceSerialize({start:s.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Dte(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function zte(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),c}function c(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(a>999||m===93&&!s||m===null||m===91||Bt(m))return n(m);if(m===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Mi(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Bt(m)||(s=!0),a++,e.consume(m),m===92?f:d}function f(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}}function Ite(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(b)}function f(b){if(s>999||b===93&&!o||b===null||b===91||Bt(b))return n(b);if(b===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Mi(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Bt(b)||(o=!0),s++,e.consume(b),b===92?m:f}function m(b){return b===91||b===92||b===93?(e.consume(b),s++,f):f(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),gt(e,v,"gfmFootnoteDefinitionWhitespace")):n(b)}function v(b){return t(b)}}function qte(e,t,n){return e.check(Ff,t,e.attempt(Rte,t,n))}function Bte(e){e.exit("gfmFootnoteDefinition")}function Xte(e,t,n){const r=this;return gt(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function Zte(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let d=c;for(;d--;)if(s[d][0]==="exit"&&s[d][1].type==="strikethroughSequenceTemporary"&&s[d][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[d][1].end.offset-s[d][1].start.offset){s[c][1].type="strikethroughSequence",s[d][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[d][1].start),end:Object.assign({},s[c][1].end)},m={type:"strikethroughText",start:Object.assign({},s[d][1].end),end:Object.assign({},s[c][1].start)},p=[["enter",f,o],["enter",s[d][1],o],["exit",s[d][1],o],["enter",m,o]],v=o.parser.constructs.insideSpan.null;v&&Zr(p,p.length,0,Mg(v,s.slice(d+1,c),o)),Zr(p,p.length,0,[["exit",m,o],["enter",s[c][1],o],["exit",s[c][1],o],["exit",f,o]]),Zr(s,d-1,c-d+3,p),c=d+p.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function a(s,o,c){const d=this.previous,f=this.events;let m=0;return p;function p(b){return d===126&&f[f.length-1][1].type!=="characterEscape"?c(b):(s.enter("strikethroughSequenceTemporary"),v(b))}function v(b){const S=qc(d);if(b===126)return m>1?c(b):(s.consume(b),m++,v);if(m<2&&!n)return c(b);const x=s.exit("strikethroughSequenceTemporary"),w=qc(b);return x._open=!w||w===2&&!!S,x._close=!S||S===2&&!!w,o(b)}}}var $te=class{constructor(){this.map=[]}add(e,t,n){Vte(this,e,t,n)}consume(e){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const i of r)e.push(i);r=n.pop()}this.map.length=0}};function Vte(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Ute(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Yte(){return{flow:{null:{name:"table",tokenize:Fte,resolveAll:Wte}}}}function Fte(e,t,n){const r=this;let i=0,a=0,s;return o;function o(P){let Z=r.events.length-1;for(;Z>-1;){const Y=r.events[Z][1].type;if(Y==="lineEnding"||Y==="linePrefix")Z--;else break}const X=Z>-1?r.events[Z][1].type:null,B=X==="tableHead"||X==="tableRow"?C:c;return B===C&&r.parser.lazy[r.now().line]?n(P):B(P)}function c(P){return e.enter("tableHead"),e.enter("tableRow"),d(P)}function d(P){return P===124||(s=!0,a+=1),f(P)}function f(P){return P===null?n(P):ze(P)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),v):n(P):st(P)?gt(e,f,"whitespace")(P):(a+=1,s&&(s=!1,i+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),m(P)))}function m(P){return P===null||P===124||Bt(P)?(e.exit("data"),f(P)):(e.consume(P),P===92?p:m)}function p(P){return P===92||P===124?(e.consume(P),m):m(P)}function v(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(P):(e.enter("tableDelimiterRow"),s=!1,st(P)?gt(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):b(P))}function b(P){return P===45||P===58?x(P):P===124?(s=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),S):Q(P)}function S(P){return st(P)?gt(e,x,"whitespace")(P):x(P)}function x(P){return P===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),w):P===45?(a+=1,w(P)):P===null||ze(P)?A(P):Q(P)}function w(P){return P===45?(e.enter("tableDelimiterFiller"),j(P)):Q(P)}function j(P){return P===45?(e.consume(P),j):P===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(P))}function T(P){return st(P)?gt(e,A,"whitespace")(P):A(P)}function A(P){return P===124?b(P):P===null||ze(P)?!s||i!==a?Q(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):Q(P)}function Q(P){return n(P)}function C(P){return e.enter("tableRow"),R(P)}function R(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),R):P===null||ze(P)?(e.exit("tableRow"),t(P)):st(P)?gt(e,R,"whitespace")(P):(e.enter("data"),D(P))}function D(P){return P===null||P===124||Bt(P)?(e.exit("data"),R(P)):(e.consume(P),P===92?L:D)}function L(P){return P===92||P===124?(e.consume(P),D):D(P)}}function Wte(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,c=0,d,f,m;const p=new $te;for(;++n<e.length;){const v=e[n],b=v[1];v[0]==="enter"?b.type==="tableHead"?(o=!1,c!==0&&(uA(p,t,c,d,f),f=void 0,c=0),d={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",d,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,f={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",f,t]])),i=b.type==="tableDelimiterRow"?2:f?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],m=Ym(p,t,a,i,void 0,m),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],m=Ym(p,t,a,i,void 0,m)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(o=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,a[1]!==0?(s[0]=s[1],m=Ym(p,t,a,i,n,m)):s[1]!==0&&(m=Ym(p,t,s,i,n,m)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(c!==0&&uA(p,t,c,d,f),p.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=Ute(t.events,n))}return e}function Ym(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},cc(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=cc(t.events,n[1]);if(a={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const d=cc(t.events,n[2]),f=cc(t.events,n[3]),m={type:o,start:Object.assign({},d),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const p=t.events[n[2]],v=t.events[n[3]];if(p[1].end=Object.assign({},v[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,S=n[3]-n[2]-1;e.add(b,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(a.end=Object.assign({},cc(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function uA(e,t,n,r,i){const a=[],s=cc(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function cc(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}var Hte={name:"tasklistCheck",tokenize:Kte};function Gte(){return{text:{91:Hte}}}function Kte(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return Bt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(c)}function o(c){return ze(c)?t(c):st(c)?e.check({tokenize:Jte},t,n)(c):n(c)}}function Jte(e,t,n){return gt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function ene(e){return LD([kte(),Mte(),Zte(e),Yte(),Gte()])}var tne={};function nne(e){const t=this,n=e||tne,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ene(n)),a.push(Ste()),s.push(xte(n))}function rne({imageUrl:e,alt:t="Resource image"}){return g.jsx("div",{className:"semiont-image-viewer",children:g.jsx("img",{src:e,alt:t,className:"semiont-image-viewer__image",style:{imageRendering:"auto"}})})}var ine=k.lazy(()=>Pe(()=>import("./PdfAnnotationCanvas.client-5QESNO5H-C_S4hy6Q.js"),__vite__mapDeps([2,1,3])).then(e=>({default:e.PdfAnnotationCanvas}))),ane=k.memo(function({content:t}){return g.jsx(ZJ,{remarkPlugins:[nne],children:t})}),sne=k.memo(function({content:t,mimeType:n,resourceUri:r,annotations:i,selectedClick:a="detail",annotateMode:s,hoverDelayMs:o=150}){const{newAnnotationIds:c}=Kx(),d=Me(ot().activeSession$),f=k.useRef(null),m=IS(n),{highlights:p,references:v,assessments:b,comments:S,tags:x}=i,w=k.useMemo(()=>[...p,...v,...b,...S,...x],[p,v,b,S,x]),j=k.useMemo(()=>iV(w),[w]),T=k.useRef(null);k.useEffect(()=>{f.current&&(T.current=J7(t,f.current))},[t]),k.useEffect(()=>{if(!f.current||!T.current||j.length===0)return;const R=f.current,D=eV(R),L=tV(j,T.current,D);return nV(L),()=>rV(R)},[j]),k.useEffect(()=>{if(!f.current||!d)return;const R=f.current,D=Y=>{const q=Y.target.closest("[data-annotation-id]");if(!q)return;const I=q.getAttribute("data-annotation-id"),ee=q.getAttribute("data-annotation-type");if(I&&ee==="reference"){const W=w.find(z=>z.id===I);W&&d.client.browse.click(W.id,W.motivation)}},{handleMouseEnter:L,handleMouseLeave:P,cleanup:Z}=WS(Y=>d.client.beckon.hover(Y),o),X=Y=>{const q=Y.target.closest("[data-annotation-id]"),I=q==null?void 0:q.getAttribute("data-annotation-id");I&&L(Gn(I))},B=Y=>{Y.target.closest("[data-annotation-id]")&&P()};return c&&R.querySelectorAll("[data-annotation-id]").forEach(H=>{const q=H.getAttribute("data-annotation-id");q&&c.has(q)&&H.classList.add("annotation-sparkle")}),R.addEventListener("click",D),R.addEventListener("mouseover",X),R.addEventListener("mouseout",B),()=>{R.removeEventListener("click",D),R.removeEventListener("mouseover",X),R.removeEventListener("mouseout",B),Z()}},[t,w,c,o,d]);const A=k.useCallback((R,D=!1)=>{f.current&&qL(R,f.current,{pulse:D})},[]),Q=k.useCallback(({annotationId:R})=>{A(R)},[A]),C=k.useCallback(({annotationId:R})=>{A(R??null,!0)},[A]);switch(ns({"beckon:hover":Q,"beckon:focus":C}),m){case"text":return g.jsxs("div",{className:"semiont-browse-view","data-mime-type":"text",children:[g.jsx(wc,{selectedMotivation:null,selectedClick:a,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:s,annotators:cr}),g.jsx("div",{ref:f,className:"semiont-browse-view__content",children:g.jsx(ane,{content:t})})]});case"image":return Zc(n)?g.jsxs("div",{className:"semiont-browse-view","data-mime-type":"pdf",children:[g.jsx(wc,{selectedMotivation:null,selectedClick:a,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:s,annotators:cr}),g.jsx("div",{ref:f,className:"semiont-browse-view__content",children:g.jsx(k.Suspense,{fallback:g.jsx("div",{className:"semiont-browse-view__loading",children:"Loading PDF viewer..."}),children:g.jsx(ine,{pdfUrl:t,existingAnnotations:w,drawingMode:null,selectedMotivation:null})})})]}):g.jsxs("div",{className:"semiont-browse-view","data-mime-type":"image",children:[g.jsx(wc,{selectedMotivation:null,selectedClick:a,showSelectionGroup:!1,showDeleteButton:!1,annotateMode:s,annotators:cr}),g.jsx("div",{ref:f,className:"semiont-browse-view__content",children:g.jsx(rne,{imageUrl:t,mimeType:n,alt:"Resource content"})})]});case"unsupported":return g.jsx("div",{ref:f,className:"semiont-browse-view semiont-browse-view--unsupported","data-mime-type":"unsupported",children:g.jsxs("div",{className:"semiont-browse-view__empty",children:[g.jsxs("p",{className:"semiont-browse-view__empty-message",children:["Preview not available for ",n]}),g.jsx("a",{href:`/api/resources/${r}`,download:!0,className:"semiont-button semiont-button--primary",children:"Download File"})]})})}});function one({resource:e,annotations:t,generatingReferenceId:n,showLineNumbers:r=!1,hoverDelayMs:i,hoveredAnnotationId:a}){const s=hn("ResourceViewer"),o=k.useRef(null),c=ot(),d=Me(c.activeSession$),f=O5(),{highlights:m,references:p,assessments:v,comments:b,tags:S}=t;if(!e["@id"])throw new Error("Resource has no @id");const x=e["@id"],j=(()=>{const ge=e.representations;return Array.isArray(ge)&&ge.length>0&&ge[0]?ge[0].mediaType:"text/plain"})(),[T,A]=k.useState(()=>typeof window<"u"?localStorage.getItem("annotateMode")==="true":!1);k.useEffect(()=>{typeof window<"u"&&localStorage.setItem("annotateMode",T.toString())},[T]);const Q=k.useCallback(()=>{A(ge=>!ge)},[]),C=T?"annotate":"browse",R=d==null?void 0:d.client,D=k.useCallback(()=>{R==null||R.browse.invalidateAnnotationList(x)},[R,x]),L=k.useCallback(()=>{R==null||R.browse.invalidateAnnotationList(x)},[R,x]),P=k.useCallback(()=>{R==null||R.browse.invalidateAnnotationList(x)},[R,x]),[Z,X]=k.useState(()=>{if(typeof window<"u"){const ge=localStorage.getItem("semiont-toolbar-selection");if(ge==="null")return null;if(ge&&["linking","highlighting","assessing","commenting","tagging"].includes(ge))return ge}return"linking"}),[B,Y]=k.useState(()=>{if(typeof window<"u"){const ge=localStorage.getItem("semiont-toolbar-click");if(ge&&["detail","follow","jsonld","deleting"].includes(ge))return ge}return"detail"}),H=G7(j),[q,I]=k.useState(()=>fE(H)),ee=k.useCallback(({motivation:ge})=>{X(ge)},[]),W=k.useCallback(({action:ge})=>{Y(ge)},[]),z=k.useCallback(({shape:ge})=>{I(ge)},[]);k.useEffect(()=>{Z===null?localStorage.setItem("semiont-toolbar-selection","null"):localStorage.setItem("semiont-toolbar-selection",Z)},[Z]),k.useEffect(()=>{localStorage.setItem("semiont-toolbar-click",B)},[B]),k.useEffect(()=>{K7(H,q)},[H,q]),k.useEffect(()=>{const ge=fE(H);ge!==q&&I(ge)},[H]);const[ce,se]=k.useState(!1),[N,le]=k.useState(null),[pe,Oe]=k.useState(null),Be=a??null,[Ae,Ze]=k.useState(null),[xe,Ye]=k.useState(null),Ue=k.useCallback(ge=>{Ye(ge),Ze(ge),setTimeout(()=>Ye(null),3e3)},[]),Qe=()=>typeof window>"u"?{x:0,y:0}:{x:Math.max(0,(window.innerWidth-800)/2),y:Math.max(0,(window.innerHeight-700)/2)},De=k.useCallback(ge=>{d==null||d.client.mark.delete(x,ge)},[d,x]),mt=k.useCallback((ge,dt)=>{const Et=Object.values(cr).find(et=>et.matchesAnnotation(ge));if(Et!=null&&Et.hasSidePanel){if(B==="detail"){Ue(ge.id);return}if(B!=="deleting"&&B!=="jsonld"&&B!=="follow")return}const Zt=sl(ge)||Xc(ge)||ao(ge)||hi(ge)||ol(ge);if(B==="follow"&&hi(ge)){const et=Ya(ge.body);et&&f(`/know/resource/${et}`,{resourceId:et});return}if(B==="jsonld"&&Zt){le(ge),se(!0);return}if(T&&B==="deleting"&&Zt){const et=dt?{x:dt.clientX,y:dt.clientY+10}:{x:window.innerWidth/2-150,y:window.innerHeight/2-75};Oe({annotation:ge,position:et});return}},[T,B,Ue]),Ve=k.useCallback(({annotationId:ge,motivation:dt})=>{const Et=Object.values(cr).find(Zt=>Zt.matchesAnnotation({motivation:dt}));if(!(Et!=null&&Et.hasSidePanel)){const et=[...m,...p,...v,...b,...S].find(Mn=>Mn.id===ge);et&&mt(et);return}if(B!=="detail"){const et=[...m,...p,...v,...b,...S].find(Mn=>Mn.id===ge);et&&mt(et);return}c.emit("panel:open",{panel:"annotations",scrollToAnnotationId:ge,motivation:dt})},[m,p,v,b,S,mt,B,d]);ns({"mark:mode-toggled":Q,"mark:added":D,"mark:removed":L,"mark:body-updated":P,"mark:selection-changed":ee,"mark:click-changed":W,"mark:shape-changed":z,"browse:click":Ve});const cn=k.useMemo(()=>({highlights:m,references:p,assessments:v,comments:b,tags:S}),[m,p,v,b,S]),je={selectedMotivation:Z,selectedClick:B,selectedShape:q,hoveredAnnotationId:Be,scrollToAnnotationId:Ae},We=k.useCallback(ge=>{const dt=p.find(Et=>Ya(Et.body)===ge);return dt?Us(Rn(dt.target)):void 0},[p]);return g.jsxs("div",{ref:o,className:"semiont-resource-viewer",children:[C==="annotate"?g.jsx(qH,{content:e.content,mimeType:j,resourceUri:e["@id"],annotations:cn,uiState:je,onUIStateChange:ge=>{"selectedMotivation"in ge&&X(ge.selectedMotivation),"selectedClick"in ge&&Y(ge.selectedClick),"selectedShape"in ge&&I(ge.selectedShape)},enableWidgets:!0,getTargetResourceName:We,...n!==void 0&&{generatingReferenceId:n},showLineNumbers:r,hoverDelayMs:i,annotateMode:T}):g.jsx(sne,{content:e.content,mimeType:j,resourceUri:e["@id"],annotations:cn,selectedClick:B,hoverDelayMs:i,annotateMode:T}),N&&g.jsx(_C,{isOpen:ce,onClose:()=>se(!1),position:Qe(),wide:!0,children:g.jsx(EF,{annotation:N,onBack:()=>{se(!1),le(null)}})}),pe&&(()=>{const ge=pe.annotation,dt=Object.values(cr).find(Mn=>Mn.matchesAnnotation(ge)),Et=Rn(ge.target),Zt=Us(Et),et=(dt==null?void 0:dt.iconEmoji)||"📝";return g.jsx(_C,{isOpen:!!pe,onClose:()=>Oe(null),position:pe.position,children:g.jsxs("div",{className:"semiont-delete-confirmation",children:[g.jsxs("div",{className:"semiont-delete-confirmation__header",children:[g.jsx("span",{className:"semiont-delete-confirmation__icon",children:et}),g.jsx("h3",{className:"semiont-delete-confirmation__title",children:s("deleteConfirmationTitle")})]}),Zt&&g.jsx("div",{className:"semiont-delete-confirmation__quote",children:g.jsxs("p",{className:"semiont-delete-confirmation__text",children:['"',Zt.length>100?Zt.substring(0,100)+"...":Zt,'"']})}),g.jsx("p",{className:"semiont-delete-confirmation__message",children:s("deleteConfirmationMessage")}),g.jsxs("div",{className:"semiont-delete-confirmation__actions",children:[g.jsx("button",{onClick:()=>Oe(null),className:"semiont-button semiont-button--secondary",children:s("deleteConfirmationCancel")}),g.jsx("button",{onClick:()=>{De(pe.annotation.id),Oe(null)},className:"semiont-button semiont-button--danger",children:s("deleteConfirmationDelete")})]})]})})})()]})}function lne(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),s=Math.floor(a/60),o=Math.floor(s/24);return i<60?"just now":a<60?`${a} minute${a>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:o<7?`${o} day${o>1?"s":""} ago`:t.toLocaleDateString()}function dA(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="TextualBody"&&"value"in e&&typeof e.value=="string"}function cne(e){if(!e.body)return null;if(dA(e.body))return e.body.value||null;if(Array.isArray(e.body)&&e.body.length>0){const t=e.body.find(dA);return(t==null?void 0:t.value)||null}return null}function une({assessment:e,isFocused:t,isHovered:n=!1,ref:r}){var c;const i=Me(ot().activeSession$),a=Bf(e.id),s=_f(e),o=cne(e);return g.jsxs("div",{ref:r,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"assessment","data-focused":t?"true":"false",onClick:()=>{i==null||i.client.browse.click(e.id,e.motivation)},...a,children:[s&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"assessment",children:['"',s.substring(0,100),s.length>100?"...":"",'"']}),o&&g.jsx("div",{className:"semiont-annotation-entry__body","data-type":"assessment",children:o}),g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["By ",typeof e.creator=="string"?e.creator:((c=e.creator)==null?void 0:c.name)||"Unknown"," • ",lne(e.created||new Date().toISOString())]}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function N_({annotationType:e,isAssisting:t,locale:n,sourceLanguage:r,progress:i}){const s=hn(e==="highlight"?"HighlightPanel":e==="assessment"?"AssessmentPanel":"CommentsPanel"),o=Me(ot().activeSession$),[c,d]=k.useState(""),[f,m]=k.useState(""),p=e==="comment"?5:e==="assessment"?4:5,[v,b]=k.useState(p),[S,x]=k.useState(!0),[w,j]=k.useState(()=>{if(typeof window>"u")return!0;const Q=localStorage.getItem(`assist-section-expanded-${e}`);return Q?Q==="true":!0});k.useEffect(()=>{typeof window>"u"||localStorage.setItem(`assist-section-expanded-${e}`,String(w))},[w,e]);const T=k.useCallback(()=>{const Q=e==="highlight"?"highlighting":e==="assessment"?"assessing":"commenting";o==null||o.client.mark.requestAssist(Q,{instructions:c.trim()||void 0,tone:(e==="comment"||e==="assessment")&&f?f:void 0,density:(e==="comment"||e==="assessment"||e==="highlight")&&S?v:void 0,language:e==="comment"||e==="assessment"?n:void 0,sourceLanguage:r}),d(""),m("")},[e,c,f,S,v,n,r,o]),A=k.useCallback(()=>{o==null||o.client.mark.dismissProgress()},[o]);return g.jsxs("div",{className:"semiont-panel__section",children:[g.jsxs("button",{onClick:()=>j(!w),className:"semiont-panel__section-title semiont-panel__section-title--collapsible","aria-expanded":w,type:"button",children:[g.jsx("span",{children:s(e==="highlight"?"annotateHighlights":e==="assessment"?"annotateAssessments":"annotateComments")}),g.jsx("span",{className:"semiont-panel__section-chevron","data-expanded":w,children:"›"})]}),w&&g.jsxs("div",{className:"semiont-assist-widget","data-assisting":t&&i?"true":"false","data-type":e,children:[!i&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"semiont-form-field",children:[g.jsxs("label",{className:"semiont-form-field__label",children:[s("instructions")," ",s("optional")]}),g.jsx("textarea",{value:c,onChange:Q=>d(Q.target.value),className:"semiont-textarea",rows:3,placeholder:s("instructionsPlaceholder"),maxLength:500}),g.jsxs("div",{className:"semiont-form-field__char-count",children:[c.length,"/500"]})]}),(e==="comment"||e==="assessment")&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsxs("label",{className:"semiont-form-field__label",children:[s("toneLabel")," ",s("toneOptional")]}),g.jsxs("select",{value:f,onChange:Q=>m(Q.target.value),className:"semiont-select",children:[g.jsx("option",{value:"",children:"Default"}),e==="comment"&&g.jsxs(g.Fragment,{children:[g.jsx("option",{value:"scholarly",children:s("toneScholarly")}),g.jsx("option",{value:"explanatory",children:s("toneExplanatory")}),g.jsx("option",{value:"conversational",children:s("toneConversational")}),g.jsx("option",{value:"technical",children:s("toneTechnical")})]}),e==="assessment"&&g.jsxs(g.Fragment,{children:[g.jsx("option",{value:"analytical",children:s("toneAnalytical")}),g.jsx("option",{value:"critical",children:s("toneCritical")}),g.jsx("option",{value:"balanced",children:s("toneBalanced")}),g.jsx("option",{value:"constructive",children:s("toneConstructive")})]})]})]}),(e==="comment"||e==="assessment"||e==="highlight")&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsxs("div",{className:"semiont-form-field__header",children:[g.jsxs("label",{className:"semiont-form-field__label semiont-form-field__label--with-checkbox",children:[g.jsx("input",{type:"checkbox",checked:S,onChange:Q=>x(Q.target.checked),className:"semiont-checkbox","data-variant":e}),g.jsx("span",{children:s("densityLabel")})]}),S&&g.jsxs("span",{className:"semiont-form-field__info",children:[v," per 2000 words"]})]}),S&&g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"range",min:e==="comment"?"2":"1",max:e==="comment"?"12":e==="assessment"?"10":"15",value:v,onChange:Q=>b(Number(Q.target.value)),className:"semiont-slider"}),g.jsxs("div",{className:"semiont-slider__labels",children:[g.jsx("span",{children:s("densitySparse")}),g.jsx("span",{children:s("densityDense")})]})]})]}),g.jsxs("button",{onClick:T,className:"semiont-button","data-variant":"assist","data-type":e,children:[g.jsx("span",{className:"semiont-button-icon",children:"✨"}),g.jsx("span",{children:s("annotate")})]})]}),i&&g.jsxs("div",{className:"semiont-annotation-progress","data-type":e,children:[i.requestParams&&i.requestParams.length>0&&g.jsxs("div",{className:"semiont-annotation-progress__params","data-type":e,children:[g.jsx("div",{className:"semiont-annotation-progress__params-title",children:"Request Parameters:"}),i.requestParams.map((Q,C)=>g.jsxs("div",{className:"semiont-annotation-progress__param",children:[g.jsxs("span",{className:"semiont-annotation-progress__param-label",children:[Q.label,":"]})," ",Q.value]},C))]}),g.jsxs("div",{className:"semiont-annotation-progress__status",children:[g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✨"}),g.jsx("span",{children:i.message})]}),!t&&g.jsx("button",{onClick:A,className:"semiont-annotation-progress__close","aria-label":s("closeProgress"),title:s("closeProgress"),type:"button",children:"×"})]})]})]})]})}function Wf({count:e,title:t}){return g.jsx("div",{className:"semiont-panel-header",children:g.jsxs("h2",{className:"semiont-panel-header__title",children:[g.jsx("span",{className:"semiont-panel-header__text",children:t}),g.jsxs("span",{className:"semiont-panel-header__count",children:["(",e,")"]})]})})}function dne(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function fne({annotations:e,pendingAnnotation:t,isAssisting:n=!1,progress:r,locale:i,sourceLanguage:a,annotateMode:s=!0,scrollToAnnotationId:o,onScrollCompleted:c,hoveredAnnotationId:d}){const f=hn("AssessmentPanel"),m=Me(ot().activeSession$),[p,v]=k.useState(""),[b,S]=k.useState(null),x=k.useRef(null),w=k.useRef(new Map),j=k.useMemo(()=>[...e].sort((C,R)=>{const D=fi(Rn(C.target)),L=fi(Rn(R.target));return!D||!L?0:D.start-L.start}),[e]),T=k.useCallback((C,R)=>{R?w.current.set(C,R):w.current.delete(C)},[]);k.useEffect(()=>{if(!o)return;const C=w.current.get(o);if(C&&x.current){const R=C.offsetTop,D=x.current.clientHeight,L=C.offsetHeight,P=R-D/2+L/2;x.current.scrollTo({top:P,behavior:"smooth"}),C.classList.remove("semiont-annotation-pulse"),C.offsetWidth,C.classList.add("semiont-annotation-pulse"),c&&c()}},[o]),k.useEffect(()=>{if(!d)return;const C=w.current.get(d);if(!C||!x.current)return;const R=x.current,D=C.getBoundingClientRect(),L=R.getBoundingClientRect();if(!(D.top>=L.top&&D.bottom<=L.bottom)){const Z=C.offsetTop,X=R.clientHeight,B=C.offsetHeight,Y=Z-X/2+B/2;R.scrollTo({top:Y,behavior:"smooth"})}},[d]);const A=()=>{if(t){const C=p.trim(),R=C?{type:"TextualBody",value:C,purpose:"assessing"}:void 0;m==null||m.client.mark.submit({motivation:"assessing",selector:t.selector,...R!==void 0?{body:R}:{}}),v("")}};k.useEffect(()=>{if(!t)return;const C=R=>{R.key==="Escape"&&(m==null||m.client.mark.cancelPending(),v(""))};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[t,m]);const Q=k.useCallback(({annotationId:C})=>{S(C),setTimeout(()=>S(null),3e3)},[]);return ns({"browse:click":Q}),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Wf,{annotationType:"assessment",count:e.length,title:f("title")}),t&&t.motivation==="assessing"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"assessment",children:[g.jsx("div",{className:"semiont-annotation-prompt__quote",children:(()=>{const C=dne(t.selector);return C?`"${C.substring(0,100)}${C.length>100?"...":""}"`:f("fragmentSelected")})()}),g.jsx("textarea",{value:p,onChange:C=>v(C.target.value),className:"semiont-textarea",rows:3,placeholder:f("assessmentPlaceholder"),autoFocus:!0,maxLength:2e3}),g.jsxs("div",{className:"semiont-annotation-prompt__footer",children:[g.jsxs("span",{className:"semiont-annotation-prompt__char-count",children:[p.length,"/2000"]}),g.jsxs("div",{className:"semiont-annotation-prompt__actions",children:[g.jsx("button",{onClick:()=>{m==null||m.client.mark.cancelPending(),v("")},className:"semiont-button semiont-button--secondary","data-type":"assessment",children:f("cancel")}),g.jsx("button",{onClick:A,className:"semiont-button semiont-button--primary","data-type":"assessment",children:f("save")})]})]})]}),g.jsxs("div",{ref:x,className:"semiont-panel__content",children:[s&&g.jsx(N_,{annotationType:"assessment",isAssisting:n,locale:i,sourceLanguage:a,progress:r}),g.jsx("div",{className:"semiont-panel__list",children:j.length===0?g.jsx("p",{className:"semiont-panel__empty",children:f("noAssessments")}):j.map(C=>g.jsx(une,{assessment:C,isFocused:C.id===b,isHovered:C.id===d,ref:R=>T(C.id,R)},C.id))})]})]})}function hne({state:e,eventCount:t,lastEventTimestamp:n,knowledgeBaseName:r}){const i=hn("CollaborationPanel"),a=e==="open"||e==="reconnecting"||e==="initial"||e==="connecting";let s;if(!n)s=i("noActivity");else{const o=new Date,c=new Date(n),d=o.getTime()-c.getTime(),f=Math.floor(d/1e3),m=Math.floor(f/60),p=Math.floor(m/60);f<10?s=i("justNow"):f<60?s=i("secondsAgo",{count:f}):m===1?s=i("minuteAgo"):m<60?s=i("minutesAgo",{count:m}):p===1?s=i("hourAgo"):p<24?s=i("hoursAgo",{count:p}):s=c.toLocaleDateString()}return g.jsxs("div",{className:"semiont-collaboration-panel",children:[g.jsx("h3",{className:"semiont-collaboration-panel__title",children:i("title")}),r&&g.jsx("div",{style:{padding:"0 0.75rem 0.5rem",fontSize:"0.8rem",color:"var(--semiont-color-neutral-400)"},children:r}),g.jsxs("div",{className:"semiont-collaboration-panel__section",children:[g.jsx("h3",{className:"semiont-collaboration-panel__heading",children:i("connectionStatus")}),g.jsxs("div",{className:"semiont-collaboration-panel__status",children:[g.jsxs("span",{className:"semiont-collaboration-panel__indicator",children:[g.jsx("span",{className:"semiont-collaboration-panel__dot","data-connected":a?"true":"false"}),g.jsx("span",{className:"semiont-collaboration-panel__status-text","data-connected":a?"true":"false",children:i(a?"live":"disconnected")})]}),a&&t>0&&g.jsxs("span",{className:"semiont-collaboration-panel__event-count",children:["(",i("events",{count:t}),")"]})]}),g.jsxs("div",{className:"semiont-collaboration-panel__details",children:[g.jsxs("div",{children:[g.jsx("span",{className:"semiont-collaboration-panel__label",children:i("lastSync")})," ",s]}),g.jsx("div",{children:i(a?"realtimeActive":"reconnecting")})]})]}),g.jsxs("div",{className:"semiont-collaboration-panel__section semiont-collaboration-panel__section--bordered",children:[g.jsx("h3",{className:"semiont-collaboration-panel__heading",children:i("sharing")}),g.jsx("p",{className:"semiont-collaboration-panel__description",children:i("collaborationComingSoon")})]})]})}function mne(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),s=Math.floor(a/60),o=Math.floor(s/24);return i<60?"just now":a<60?`${a} minute${a>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:o<7?`${o} day${o>1?"s":""} ago`:t.toLocaleDateString()}function pne({comment:e,isFocused:t,isHovered:n=!1,annotateMode:r=!0,ref:i}){var j;const a=hn("CommentsPanel"),s=Me(ot().activeSession$),o=Bf(e.id),[c,d]=k.useState(!1),[f,m]=k.useState(""),p=k.useRef(null);k.useImperativeHandle(i,()=>p.current);const v=XB(e)||"",b=_f(e);k.useEffect(()=>{t&&p.current&&p.current.scrollIntoView({behavior:"smooth",block:"center"})},[t]);const S=()=>{m(v),d(!0)},x=()=>{d(!1)},w=()=>{d(!1),m("")};return g.jsxs("div",{ref:p,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"comment","data-focused":t?"true":"false",onClick:()=>{s==null||s.client.browse.click(e.id,e.motivation)},...o,children:[b&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"comment",children:['"',b.substring(0,100),b.length>100?"...":"",'"']}),c?g.jsxs("div",{className:"semiont-annotation-entry__edit",onClick:T=>T.stopPropagation(),children:[g.jsx("textarea",{value:f,onChange:T=>m(T.target.value),className:"semiont-textarea",rows:3,autoFocus:!0,maxLength:2e3}),g.jsxs("div",{className:"semiont-annotation-entry__edit-footer",children:[g.jsxs("span",{className:"semiont-annotation-entry__char-count",children:[f.length,"/2000"]}),g.jsxs("div",{className:"semiont-annotation-entry__button-group",children:[g.jsx("button",{onClick:x,className:"semiont-button semiont-button--primary","data-type":"comment",children:a("save")}),g.jsx("button",{onClick:w,className:"semiont-button semiont-button--secondary",children:a("cancel")})]})]})]}):g.jsx("div",{className:"semiont-annotation-entry__body",children:v}),!c&&g.jsxs("div",{className:"semiont-annotation-entry__footer",children:[g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["By ",typeof e.creator=="string"?e.creator:((j=e.creator)==null?void 0:j.name)||"Unknown"," • ",mne(e.created||new Date().toISOString())]}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]}),r&&g.jsx("div",{className:"semiont-annotation-entry__actions",onClick:T=>T.stopPropagation(),children:g.jsx("button",{onClick:S,className:"semiont-text-button","data-variant":"comment",children:a("edit")})})]})]})}function gne(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function vne({annotations:e,pendingAnnotation:t,annotateMode:n=!0,isAssisting:r=!1,progress:i,locale:a,sourceLanguage:s,scrollToAnnotationId:o,onScrollCompleted:c,hoveredAnnotationId:d}){const f=hn("CommentsPanel"),m=Me(ot().activeSession$),[p,v]=k.useState(""),[b,S]=k.useState(null),x=k.useRef(null),w=k.useRef(new Map),j=k.useMemo(()=>[...e].sort((C,R)=>{const D=fi(Rn(C.target)),L=fi(Rn(R.target));return!D||!L?0:D.start-L.start}),[e]),T=k.useCallback((C,R)=>{R?w.current.set(C,R):w.current.delete(C)},[]);k.useEffect(()=>{if(!o)return;const C=w.current.get(o);if(C&&x.current){const R=C.offsetTop,D=x.current.clientHeight,L=C.offsetHeight,P=R-D/2+L/2;x.current.scrollTo({top:P,behavior:"smooth"}),C.classList.remove("semiont-annotation-pulse"),C.offsetWidth,C.classList.add("semiont-annotation-pulse"),c&&c()}},[o]),k.useEffect(()=>{if(!d)return;const C=w.current.get(d);if(!C||!x.current)return;const R=x.current,D=C.getBoundingClientRect(),L=R.getBoundingClientRect();if(!(D.top>=L.top&&D.bottom<=L.bottom)){const Z=C.offsetTop,X=R.clientHeight,B=C.offsetHeight,Y=Z-X/2+B/2;R.scrollTo({top:Y,behavior:"smooth"})}},[d]);const A=k.useCallback(({annotationId:C})=>{S(C),setTimeout(()=>S(null),3e3)},[]);ns({"browse:click":A});const Q=()=>{p.trim()&&t&&(m==null||m.client.mark.submit({motivation:"commenting",selector:t.selector,body:[{type:"TextualBody",value:p,purpose:"commenting"}]}),v(""))};return k.useEffect(()=>{if(!t)return;const C=R=>{R.key==="Escape"&&(m==null||m.client.mark.cancelPending(),v(""))};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[t,m]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Wf,{annotationType:"comment",count:e.length,title:f("title")}),t&&t.motivation==="commenting"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"comment",children:[g.jsx("div",{className:"semiont-annotation-prompt__quote",children:(()=>{const C=gne(t.selector);return C?`"${C.substring(0,100)}${C.length>100?"...":""}"`:f("fragmentSelected")})()}),g.jsx("textarea",{value:p,onChange:C=>v(C.target.value),className:"semiont-textarea",rows:3,placeholder:f("commentPlaceholder"),autoFocus:!0,maxLength:2e3}),g.jsxs("div",{className:"semiont-annotation-prompt__footer",children:[g.jsxs("span",{className:"semiont-annotation-prompt__char-count",children:[p.length,"/2000"]}),g.jsxs("div",{className:"semiont-annotation-prompt__actions",children:[g.jsx("button",{onClick:()=>{m==null||m.client.mark.cancelPending(),v("")},className:"semiont-button semiont-button--secondary","data-type":"comment",children:f("cancel")}),g.jsx("button",{onClick:Q,disabled:!p.trim(),className:"semiont-button semiont-button--primary","data-type":"comment",children:f("save")})]})]})]}),g.jsxs("div",{ref:x,className:"semiont-panel__content",children:[n&&g.jsx(N_,{annotationType:"comment",isAssisting:r,locale:a,sourceLanguage:s,progress:i}),g.jsx("div",{className:"semiont-panel__list",children:j.length===0?g.jsx("p",{className:"semiont-panel__empty",children:f("noComments")}):j.map(C=>g.jsx(pne,{comment:C,isFocused:C.id===b,isHovered:C.id===d,annotateMode:n,ref:R=>T(C.id,R)},C.id))})]})]})}function One(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),s=Math.floor(a/60),o=Math.floor(s/24);return i<60?"just now":a<60?`${a} minute${a>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:o<7?`${o} day${o>1?"s":""} ago`:t.toLocaleDateString()}function bne({highlight:e,isFocused:t,isHovered:n=!1,ref:r}){var o;const i=Me(ot().activeSession$),a=Bf(e.id),s=_f(e);return g.jsxs("div",{ref:r,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"highlight","data-focused":t?"true":"false",onClick:()=>{i==null||i.client.browse.click(e.id,e.motivation)},...a,children:[s&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"highlight",children:['"',s.substring(0,200),s.length>200?"...":"",'"']}),g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["By ",typeof e.creator=="string"?e.creator:((o=e.creator)==null?void 0:o.name)||"Unknown"," • ",One(e.created||new Date().toISOString())]}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function yne({annotations:e,pendingAnnotation:t,isAssisting:n=!1,progress:r,annotateMode:i=!0,scrollToAnnotationId:a,onScrollCompleted:s,hoveredAnnotationId:o,sourceLanguage:c}){const d=hn("HighlightPanel"),f=Me(ot().activeSession$),[m,p]=k.useState(null),v=k.useRef(null),b=k.useRef(new Map),S=k.useMemo(()=>[...e].sort((j,T)=>{const A=fi(Rn(j.target)),Q=fi(Rn(T.target));return!A||!Q?0:A.start-Q.start}),[e]),x=k.useCallback((j,T)=>{T?b.current.set(j,T):b.current.delete(j)},[]);k.useEffect(()=>{if(!a)return;const j=b.current.get(a);if(j&&v.current){const T=j.offsetTop,A=v.current.clientHeight,Q=j.offsetHeight,C=T-A/2+Q/2;v.current.scrollTo({top:C,behavior:"smooth"}),j.classList.remove("semiont-annotation-pulse"),j.offsetWidth,j.classList.add("semiont-annotation-pulse"),s&&s()}},[a]),k.useEffect(()=>{if(!o)return;const j=b.current.get(o);if(!j||!v.current)return;const T=v.current,A=j.getBoundingClientRect(),Q=T.getBoundingClientRect();if(!(A.top>=Q.top&&A.bottom<=Q.bottom)){const R=j.offsetTop,D=T.clientHeight,L=j.offsetHeight,P=R-D/2+L/2;T.scrollTo({top:P,behavior:"smooth"})}},[o]);const w=k.useCallback(({annotationId:j})=>{p(j),setTimeout(()=>p(null),3e3)},[]);return ns({"browse:click":w}),k.useEffect(()=>{t&&t.motivation==="highlighting"&&(f==null||f.client.mark.submit({motivation:"highlighting",selector:t.selector}))},[t,f]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Wf,{annotationType:"highlight",count:e.length,title:d("title")}),g.jsxs("div",{ref:v,className:"semiont-panel__content",children:[i&&g.jsx(N_,{annotationType:"highlight",isAssisting:n,progress:r,sourceLanguage:c}),g.jsx("div",{className:"semiont-panel__list",children:S.length===0?g.jsx("p",{className:"semiont-panel__empty",children:d("noHighlights")}):S.map(j=>g.jsx(bne,{highlight:j,isFocused:j.id===m,isHovered:j.id===o,ref:T=>x(j.id,T)},j.id))})]})]})}function Sne({resource:e}){const t=k.useRef(null),n=k.useRef(null),{showLineNumbers:r}=Gx();k.useEffect(()=>{var f;if(!t.current)return;const a=((f=document.documentElement)==null?void 0:f.classList.contains("dark"))??!1,s=JSON.stringify(e,null,2),o=[VL(),Ie.editable.of(!1),tn.readOnly.of(!0)];r&&o.push(Lp()),a?o.push(UL):(o.push(h5),o.push(Hx(m5)));const c=tn.create({doc:s,extensions:o}),d=new Ie({state:c,parent:t.current});return n.current=d,()=>{d.destroy(),n.current=null}},[e,r]);const i=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(a){console.error("Failed to copy JSON-LD:",a)}};return g.jsxs("div",{className:"semiont-jsonld-panel",children:[g.jsxs("div",{className:"semiont-jsonld-panel__header",children:[g.jsx("h3",{className:"semiont-jsonld-panel__title",children:"JSON-LD"}),g.jsx("button",{onClick:i,className:"semiont-button semiont-button--icon",title:"Copy to clipboard",children:"📋 Copy"})]}),g.jsx("div",{ref:t,className:"semiont-jsonld-panel__editor"})]})}function E3(e){if(Array.isArray(e.body)){const t=[];for(const n of e.body)if(typeof n=="object"&&n!==null&&"type"in n&&"value"in n&&"purpose"in n){const r=n.type,i=n.value,a=n.purpose;r==="TextualBody"&&a==="tagging"&&typeof i=="string"&&i.length>0&&t.push(i)}return t}return[]}function C3(e){return e.motivation==="tagging"}function xne(e){if(!C3(e))return;const n=(Array.isArray(e.body)?e.body:[e.body]).find(r=>r!==null&&typeof r=="object"&&"purpose"in r&&r.purpose==="tagging");if(n&&"value"in n)return n.value}function _ne(e){if(!C3(e))return;const n=(Array.isArray(e.body)?e.body:[e.body]).find(r=>r!==null&&typeof r=="object"&&"purpose"in r&&r.purpose==="classifying");if(n&&"value"in n)return n.value}function wne({reference:e,isFocused:t,isHovered:n=!1,routes:r,annotateMode:i=!0,isGenerating:a=!1,ref:s}){const o=hn("ReferencesPanel"),c=Me(ot().activeSession$),d=c==null?void 0:c.client,f=O5(),m=Bf(e.id),p=_f(e)||"",v=Fd(e.body),b=v?Ya(e.body):null,S=E3(e),x=Rn(e.target),w=BB(x),j=zP(x),T=w?"Fragment annotation":j?"Image annotation":"Annotation",A=e,Q=A._resolvedDocumentName,C=A._resolvedDocumentMediaType,R=p5(C),D=()=>{b&&f(r.resourceDetail(b),{resourceId:b})},L=typeof e.target=="object"&&"source"in e.target?e.target.source:"",P=()=>{L&&b&&d&&d.bind.body(Sr(L),e.id,[{op:"remove",item:{type:"SpecificResource",source:b,purpose:"linking"}}]).catch(()=>{})},Z=()=>{c==null||c.client.bind.initiate({annotationId:e.id,resourceId:Sr(L),defaultTitle:p,entityTypes:S})},X=Y=>{Y.stopPropagation(),v?D():i&&Z()},B=v||i;return g.jsxs("div",{ref:s,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"reference","data-focused":t?"true":"false",onClick:()=>{c==null||c.client.browse.click(e.id,e.motivation)},...m,children:[g.jsxs("div",{className:"semiont-annotation-entry__header",children:[g.jsxs("div",{className:"semiont-reference-icon-group",children:[g.jsx("button",{className:`semiont-reference-icon${B?" semiont-reference-icon--clickable":""}`,title:o(v?"open":i?"resolve":"stub"),onClick:B?X:void 0,"data-generating":!v&&a?"true":"false",tabIndex:B?0:-1,children:v?"🔗":"❓"}),i&&v&&g.jsx("button",{className:"semiont-reference-unlink",title:o("unlink"),onClick:Y=>{Y.stopPropagation(),P()},children:"⛓️‍💥"})]}),g.jsxs("div",{className:"semiont-annotation-entry__content",children:[p&&g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"reference",children:['"',p.substring(0,100),p.length>100?"...":"",'"']}),!p&&g.jsx("div",{className:"semiont-annotation-entry__meta",children:T}),Q&&g.jsx("div",{className:"semiont-reference-link",children:g.jsxs("span",{children:["→ ",R," ",Q]})})]})]}),S.length>0&&g.jsx("div",{className:"semiont-annotation-entry__tags",children:S.map((Y,H)=>g.jsx("span",{className:"semiont-tag","data-variant":"blue",children:Y},H))}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function kne(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function jne({annotations:e=[],isAssisting:t,progress:n,annotateMode:r=!0,Link:i,routes:a,allEntityTypes:s,generatingReferenceId:o,referencedBy:c=[],referencedByLoading:d=!1,pendingAnnotation:f,scrollToAnnotationId:m,onScrollCompleted:p,hoveredAnnotationId:v,locale:b,sourceLanguage:S}){const x=hn("ReferencesPanel"),w=Me(ot().activeSession$),[j,T]=k.useState([]),[A,Q]=k.useState(null),[C,R]=k.useState([]),[D,L]=k.useState(!1),[P,Z]=k.useState(null),X=k.useRef(null),[B,Y]=k.useState(()=>{if(typeof window>"u")return!0;const N=localStorage.getItem("assist-section-expanded-reference");return N?N==="true":!0});k.useEffect(()=>{typeof window>"u"||localStorage.setItem("assist-section-expanded-reference",String(B))},[B]);const H=k.useRef(new Map),q=k.useMemo(()=>[...e].sort((N,le)=>{const pe=fi(Rn(N.target)),Oe=fi(Rn(le.target));return!pe||!Oe?0:pe.start-Oe.start}),[e]),I=k.useCallback((N,le)=>{le?H.current.set(N,le):H.current.delete(N)},[]);k.useEffect(()=>{if(!m)return;const N=H.current.get(m);if(N&&X.current){const le=N.offsetTop,pe=X.current.clientHeight,Oe=N.offsetHeight,Be=le-pe/2+Oe/2;X.current.scrollTo({top:Be,behavior:"smooth"}),N.classList.remove("semiont-annotation-pulse"),N.offsetWidth,N.classList.add("semiont-annotation-pulse"),p&&p()}else console.warn("[ReferencesPanel] Element not found for scrollToAnnotationId:",m)},[m]),k.useEffect(()=>{if(!v)return;const N=H.current.get(v);if(!N||!X.current)return;const le=X.current,pe=N.getBoundingClientRect(),Oe=le.getBoundingClientRect();if(!(pe.top>=Oe.top&&pe.bottom<=Oe.bottom)){const Ae=N.offsetTop,Ze=le.clientHeight,xe=N.offsetHeight,Ye=Ae-Ze/2+xe/2;le.scrollTo({top:Ye,behavior:"smooth"})}},[v]);const ee=k.useCallback(({annotationId:N})=>{Z(N),setTimeout(()=>Z(null),3e3)},[]);ns({"browse:click":ee});const W=()=>{Q(null),w==null||w.client.mark.requestAssist("linking",{entityTypes:j,includeDescriptiveReferences:D,language:b,sourceLanguage:S})},z=k.useRef(!1);k.useEffect(()=>{if(t){z.current=!1;return}!t&&!z.current&&(n!=null&&n.completedEntityTypes)&&(z.current=!0,Q(n.completedEntityTypes),T([]))},[t,n==null?void 0:n.completedEntityTypes]);const ce=N=>{R(le=>le.includes(N)?le.filter(pe=>pe!==N):[...le,N])},se=()=>{if(f){const N=C.join(",")||void 0;w==null||w.client.mark.submit({motivation:"linking",selector:f.selector,body:N?[{type:"TextualBody",value:N,purpose:"tagging"}]:[]}),R([])}};return k.useEffect(()=>{if(!f)return;const N=le=>{le.key==="Escape"&&(w==null||w.client.mark.cancelPending(),R([]))};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[f,w]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Wf,{annotationType:"reference",count:e.length,title:x("title")}),f&&f.motivation==="linking"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"reference",children:[g.jsx("div",{className:"semiont-annotation-prompt__quote",children:(()=>{const N=kne(f.selector);return N?`"${N.substring(0,100)}${N.length>100?"...":""}"`:x("fragmentSelected")})()}),s.length>0&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("p",{className:"semiont-form-field__label",children:x("entityTypesOptional")}),g.jsx("div",{className:"semiont-tag-selector",children:s.map(N=>g.jsx("button",{onClick:()=>ce(N),className:"semiont-tag-selector__item","data-selected":C.includes(N)?"true":"false",children:N},N))})]}),g.jsx("div",{className:"semiont-annotation-prompt__footer",children:g.jsxs("div",{className:"semiont-annotation-prompt__actions",children:[g.jsx("button",{onClick:()=>{w==null||w.client.mark.cancelPending(),R([])},className:"semiont-button semiont-button--secondary","data-type":"reference",children:x("cancel")}),g.jsxs("button",{onClick:se,className:"semiont-button semiont-button--primary","data-type":"reference",children:["🔗 ",x("createReference")]})]})})]}),g.jsxs("div",{ref:X,className:"semiont-panel__content",children:[r&&g.jsxs("div",{className:"semiont-panel__section",children:[g.jsxs("button",{onClick:()=>Y(!B),className:"semiont-panel__section-title semiont-panel__section-title--collapsible","aria-expanded":B,type:"button",children:[g.jsx("span",{children:x("annotateReferences")}),g.jsx("span",{className:"semiont-panel__section-chevron","data-expanded":B,children:"›"})]}),B&&g.jsxs(g.Fragment,{children:[!t&&g.jsx("div",{className:"semiont-assist-widget","data-type":"reference",children:g.jsxs(g.Fragment,{children:[A&&A.length>0&&g.jsx("div",{className:"semiont-assist-widget__log",children:g.jsx("div",{className:"semiont-assist-widget__log-items",children:A.map((N,le)=>g.jsxs("div",{className:"semiont-assist-widget__log-item",children:[g.jsx("span",{className:"semiont-assist-widget__log-check",children:"✓"}),g.jsxs("span",{className:"semiont-assist-widget__log-type",children:[N.entityType,":"]}),g.jsx("span",{children:x("found",{count:N.foundCount})})]},le))})}),g.jsxs("div",{className:"semiont-assist-widget__entity-types",children:[g.jsx("p",{className:"semiont-assist-widget__label",children:x("selectEntityTypes")}),g.jsx("div",{className:"semiont-assist-widget__chips",children:s.length>0?s.map(N=>g.jsx("button",{onClick:()=>{T(le=>le.includes(N)?le.filter(pe=>pe!==N):[...le,N])},"aria-pressed":j.includes(N),"aria-label":`${j.includes(N)?x("deselect"):x("select")} ${N}`,className:"semiont-chip semiont-chip--selectable","data-selected":j.includes(N),children:N},N)):g.jsx("p",{className:"semiont-assist-widget__no-types",children:x("noEntityTypes")})})]}),j.length>0&&g.jsx("p",{className:"semiont-assist-widget__count",children:x("typesSelected",{count:j.length})}),g.jsxs("div",{className:"semiont-assist-widget__checkbox-group",children:[g.jsxs("label",{className:"semiont-assist-widget__checkbox-label",children:[g.jsx("input",{type:"checkbox",checked:D,onChange:N=>L(N.target.checked),className:"semiont-assist-widget__checkbox"}),g.jsx("span",{children:x("includeDescriptiveReferences")})]}),g.jsx("p",{className:"semiont-assist-widget__checkbox-hint",children:x("descriptiveReferencesTooltip")})]}),g.jsxs("button",{onClick:W,disabled:j.length===0,title:x("annotate"),className:"semiont-button","data-variant":"assist","data-type":"reference",children:[g.jsx("span",{className:"semiont-button-icon",children:"✨"}),g.jsx("span",{children:x("annotate")})]})]})}),t&&n&&g.jsx(cF,{progress:n,annotationType:"reference"})]})]}),g.jsxs("div",{children:[g.jsx("div",{className:"semiont-panel__divider",children:g.jsxs("h3",{className:"semiont-panel__subtitle",children:[x("outgoingReferences")," (",q.length,")"]})}),g.jsx("div",{className:"semiont-panel__list",children:q.length===0?g.jsx("p",{className:"semiont-panel__empty-message",children:x("noReferences")}):q.map(N=>g.jsx(wne,{reference:N,isFocused:N.id===P,isHovered:N.id===v,routes:a,annotateMode:r,isGenerating:N.id===o,ref:le=>I(N.id,le)},N.id))})]}),g.jsxs("div",{children:[g.jsx("div",{className:"semiont-panel__divider",children:g.jsxs("h3",{className:"semiont-panel__subtitle",children:[x("incomingReferences")," (",c.length,")",d&&g.jsxs("span",{className:"semiont-panel__loading-indicator",children:["(",x("loading"),")"]})]})}),c.length>0?g.jsx("div",{className:"semiont-panel__list",children:c.map(N=>{var pe;const le=N.target.source;return g.jsxs("div",{className:"semiont-reference-item semiont-reference-item--incoming",children:[g.jsxs("div",{className:"semiont-reference-item__header",children:[g.jsx("span",{className:"semiont-reference-item__title",children:N.resourceName||x("untitledResource")}),g.jsx(i,{href:a.resourceDetail(le),className:"semiont-reference-item__link",title:x("open"),children:"🔗"})]}),g.jsxs("span",{className:"semiont-reference-item__excerpt",children:['"',((pe=N.target.selector)==null?void 0:pe.exact)||x("noText"),'"']})]},N.id)})}):g.jsx("p",{className:"semiont-panel__empty-message semiont-panel__empty-message--small",children:x(d?"loadingEllipsis":"noIncomingReferences")})]})]})]})}function Tne({resourceId:e,documentEntityTypes:t,documentLocale:n,primaryMediaType:r,primaryByteSize:i,storageUri:a,isArchived:s=!1,dateCreated:o,dateModified:c,creationMethod:d,wasAttributedTo:f,wasDerivedFrom:m,generator:p}){const v=hn("ResourceInfoPanel"),b=Me(ot().activeSession$);return g.jsxs("div",{className:"semiont-resource-info-panel",children:[g.jsx("h3",{className:"semiont-resource-info-panel__title",children:v("title")}),g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:v("locale")}),n?g.jsx("div",{className:"semiont-resource-info-panel__value",children:HB(n)}):g.jsx("div",{className:"semiont-resource-info-panel__value semiont-resource-info-panel__value--empty",children:v("notSpecified")})]}),(r||i!==void 0)&&g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:v("representation")}),g.jsxs("div",{className:"semiont-resource-info-panel__field-group",children:[r&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:v("mediaType")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:r})]}),i!==void 0&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:v("byteSize")}),g.jsxs("span",{className:"semiont-resource-info-panel__value",children:[i.toLocaleString()," bytes"]})]}),a&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:v("storageUri")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:a})]})]})]}),(o||c||d||f||m||p)&&g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:v("provenance")}),g.jsxs("div",{className:"semiont-resource-info-panel__field-group",children:[o&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:v("createdAt")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:new Date(o).toLocaleString()})]}),c&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:v("modifiedAt")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:new Date(c).toLocaleString()})]}),d&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:v("creationMethod")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:d})]}),f&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:v("attributedTo")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:(Array.isArray(f)?f:[f]).map(S=>S.name).join(", ")})]}),m&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:v("derivedFrom")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:(Array.isArray(m)?m:[m]).map((S,x)=>g.jsxs("button",{className:"semiont-resource-info-panel__link",onClick:()=>b==null?void 0:b.client.browse.navigateReference(Sr(S)),children:[x>0&&", ",S]},S))})]}),p&&g.jsxs("div",{children:[g.jsx("span",{className:"semiont-resource-info-panel__label",children:v("generatedBy")}),g.jsx("span",{className:"semiont-resource-info-panel__value",children:(Array.isArray(p)?p:[p]).map(S=>S.name).join(", ")})]})]})]}),t.length>0&&g.jsxs("div",{className:"semiont-resource-info-panel__section",children:[g.jsx("h3",{className:"semiont-resource-info-panel__heading",children:v("entityTypeTags")}),g.jsx("div",{className:"semiont-resource-info-panel__tag-list",children:t.map(S=>g.jsx("span",{className:"semiont-tag","data-variant":"blue",children:S},S))})]}),g.jsxs("div",{className:"semiont-resource-info-panel__action-section",children:[g.jsxs("button",{onClick:()=>b==null?void 0:b.client.yield.clone(),className:"semiont-resource-button semiont-resource-button--secondary",children:["🔗 ",v("clone")]}),g.jsx("p",{className:"semiont-resource-info-panel__description",children:v("cloneDescription")})]}),g.jsx("div",{className:"semiont-resource-info-panel__action-section",children:s?g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>b==null?void 0:b.client.mark.unarchive(Sr(e)),className:"semiont-resource-button semiont-resource-button--secondary",children:["📤 ",v("unarchive")]}),g.jsx("p",{className:"semiont-resource-info-panel__description",children:v("unarchiveDescription")})]}):g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>b==null?void 0:b.client.mark.archive(Sr(e)),className:"semiont-resource-button semiont-resource-button--archive",children:["📦 ",v("archive")]}),g.jsx("p",{className:"semiont-resource-info-panel__description",children:v("archiveDescription")})]})})]})}function Ene({highlights:e,comments:t,assessments:n,references:r,tags:i}){const a=hn("StatisticsPanel"),s=r.filter(f=>!Fd(f.body)).length,o=r.filter(f=>Fd(f.body)).length,c=new Map;r.forEach(f=>{E3(f).forEach(p=>{c.set(p,(c.get(p)||0)+1)})});const d=Array.from(c.entries()).sort((f,m)=>m[1]-f[1]);return g.jsx("div",{className:"semiont-statistics-panel",children:g.jsxs("div",{className:"semiont-statistics-panel__content",children:[g.jsx("h2",{className:"semiont-statistics-panel__title",children:a("title")}),g.jsxs("div",{className:"semiont-statistics-panel__list",children:[g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("highlights")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:e.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("comments")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:t.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("assessments")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:n.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("tags")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:i.length})]}),g.jsxs("div",{className:"semiont-statistics-panel__item",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("references")}),g.jsx("span",{className:"semiont-statistics-panel__value",children:r.length}),g.jsxs("div",{className:"semiont-statistics-panel__subitems",children:[g.jsxs("div",{className:"semiont-statistics-panel__subitem",children:[g.jsx("span",{className:"semiont-statistics-panel__sublabel",children:a("stub")}),g.jsx("span",{className:"semiont-statistics-panel__subvalue",children:s})]}),g.jsxs("div",{className:"semiont-statistics-panel__subitem",children:[g.jsx("span",{className:"semiont-statistics-panel__sublabel",children:a("resolved")}),g.jsx("span",{className:"semiont-statistics-panel__subvalue",children:o})]})]})]}),d.length>0&&g.jsxs("div",{className:"semiont-statistics-panel__entity-types",children:[g.jsx("span",{className:"semiont-statistics-panel__label",children:a("entityTypes")}),g.jsx("div",{className:"semiont-statistics-panel__entity-list",children:d.map(([f,m])=>g.jsxs("div",{className:"semiont-statistics-panel__entity-item",children:[g.jsx("span",{className:"semiont-statistics-panel__entity-name",children:f}),g.jsx("span",{className:"semiont-tag","data-variant":"blue",children:m})]},f))})]})]})]})})}function Cne({tag:e,isFocused:t,isHovered:n=!1,ref:r}){const i=Me(ot().activeSession$),a=Bf(e.id),s=_f(e),o=xne(e),c=_ne(e),d=k.useMemo(()=>(i==null?void 0:i.client.browse.tagSchemas())??null,[i]),f=Me(d),m=c&&f?f.find(p=>p.id===c)??null:null;return g.jsxs("div",{ref:r,onClick:()=>{i==null||i.client.browse.click(e.id,e.motivation)},...a,className:`semiont-annotation-entry${n?" semiont-annotation-pulse":""}`,"data-type":"tag","data-focused":t?"true":"false",children:[g.jsxs("div",{className:"semiont-annotation-entry__header",children:[g.jsx("span",{className:"semiont-tag-badge","data-variant":"tag",children:o}),m&&g.jsx("span",{className:"semiont-annotation-entry__meta",children:m.name})]}),g.jsxs("div",{className:"semiont-annotation-entry__quote","data-type":"tag",children:['"',s.substring(0,150),s.length>150?"...":"",'"']}),e.generator&&g.jsxs("div",{className:"semiont-annotation-entry__metadata",children:["Via ",typeof e.generator=="string"?e.generator:e.generator.name]})]})}function Ane(e){if(Array.isArray(e)){const t=e.find(n=>n.type==="TextQuoteSelector");if(t&&"exact"in t)return t.exact}else if(e.type==="TextQuoteSelector"&&"exact"in e)return e.exact;return null}function Pne({annotations:e,annotateMode:t=!0,isAssisting:n=!1,progress:r,pendingAnnotation:i,scrollToAnnotationId:a,onScrollCompleted:s,hoveredAnnotationId:o,locale:c,sourceLanguage:d}){const f=hn("TaggingPanel"),m=Me(ot().activeSession$),p=k.useMemo(()=>(m==null?void 0:m.client.browse.tagSchemas())??null,[m]),v=Me(p),b=v??[],S=v!==void 0&&v.length===0,[x,w]=k.useState(""),[j,T]=k.useState(new Set);k.useEffect(()=>{!x&&b.length>0&&w(b[0].id)},[b,x]);const[A,Q]=k.useState(null),C=k.useRef(null),[R,D]=k.useState(()=>{if(typeof window>"u")return!0;const W=localStorage.getItem("assist-section-expanded-tag");return W?W==="true":!0});k.useEffect(()=>{typeof window>"u"||localStorage.setItem("assist-section-expanded-tag",String(R))},[R]);const L=k.useCallback(({annotationId:W})=>{Q(W),setTimeout(()=>Q(null),3e3)},[]);ns({"browse:click":L});const P=k.useRef(new Map),Z=k.useMemo(()=>[...e].sort((W,z)=>{const ce=fi(Rn(W.target)),se=fi(Rn(z.target));return!ce||!se?0:ce.start-se.start}),[e]),X=k.useCallback((W,z)=>{z?P.current.set(W,z):P.current.delete(W)},[]);k.useEffect(()=>{if(!a)return;const W=P.current.get(a);if(W&&C.current){const z=W.offsetTop,ce=C.current.clientHeight,se=W.offsetHeight,N=z-ce/2+se/2;C.current.scrollTo({top:N,behavior:"smooth"}),W.classList.remove("semiont-annotation-pulse"),W.offsetWidth,W.classList.add("semiont-annotation-pulse"),s&&s()}},[a]),k.useEffect(()=>{if(!o)return;const W=P.current.get(o);if(!W||!C.current)return;const z=C.current,ce=W.getBoundingClientRect(),se=z.getBoundingClientRect();if(!(ce.top>=se.top&&ce.bottom<=se.bottom)){const le=W.offsetTop,pe=z.clientHeight,Oe=W.offsetHeight,Be=le-pe/2+Oe/2;z.scrollTo({top:Be,behavior:"smooth"})}},[o]);const B=b.find(W=>W.id===x),Y=W=>{w(W),T(new Set)},H=W=>{const z=new Set(j);z.has(W)?z.delete(W):z.add(W),T(z)},q=()=>{B&&T(new Set(B.tags.map(W=>W.name)))},I=()=>{T(new Set)},ee=()=>{j.size>0&&(m==null||m.client.mark.requestAssist("tagging",{schemaId:x,categories:Array.from(j),language:c,sourceLanguage:d}),T(new Set))};return k.useEffect(()=>{if(!i)return;const W=z=>{z.key==="Escape"&&(m==null||m.client.mark.cancelPending())};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[i,m]),g.jsxs("div",{className:"semiont-panel",children:[g.jsx(Wf,{annotationType:"tag",count:e.length,title:f("title")}),g.jsxs("div",{ref:C,className:"semiont-panel__content",children:[i&&i.motivation==="tagging"&&g.jsxs("div",{className:"semiont-annotation-prompt","data-type":"tag",children:[g.jsx("h3",{className:"semiont-annotation-prompt__title",children:f("createTagForSelection")}),g.jsx("div",{className:"semiont-annotation-prompt__quote",children:g.jsx("p",{className:"semiont-annotation-prompt__text",children:(()=>{const W=Ane(i.selector);return W?`"${W.substring(0,100)}${W.length>100?"...":""}"`:f("fragmentSelected")})()})}),S&&g.jsx("p",{className:"semiont-form__help","data-type":"tag-no-schemas",children:f("noSchemas")}),!S&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:f("selectSchema")}),g.jsx("select",{value:x,onChange:W=>Y(W.target.value),className:"semiont-select",children:b.map(W=>g.jsx("option",{value:W.id,children:W.name},W.id))})]}),B&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:f("selectCategory")}),g.jsxs("select",{className:"semiont-select",onChange:W=>{W.target.value&&i&&(m==null||m.client.mark.submit({motivation:"tagging",selector:i.selector,body:[{type:"TextualBody",value:W.target.value,purpose:"tagging"},{type:"TextualBody",value:x,purpose:"classifying"}]}))},defaultValue:"",children:[g.jsx("option",{value:"",children:f("chooseCategory")}),B.tags.map(W=>g.jsx("option",{value:W.name,children:W.name},W.name))]})]}),g.jsx("div",{className:"semiont-annotation-prompt__footer",children:g.jsx("button",{onClick:()=>m==null?void 0:m.client.mark.cancelPending(),className:"semiont-button semiont-button--secondary","data-type":"tag",children:f("cancel")})})]}),t&&g.jsxs("div",{className:"semiont-panel__section",children:[g.jsxs("button",{onClick:()=>D(!R),className:"semiont-panel__section-title semiont-panel__section-title--collapsible","aria-expanded":R,type:"button",children:[g.jsx("span",{children:f("annotateTags")}),g.jsx("span",{className:"semiont-panel__section-chevron","data-expanded":R,children:"›"})]}),R&&g.jsxs("div",{className:"semiont-assist-widget","data-assisting":n&&r?"true":"false","data-type":"tag",children:[!n&&!r&&g.jsxs(g.Fragment,{children:[S&&g.jsx("p",{className:"semiont-form__help","data-type":"tag-no-schemas",children:f("noSchemas")}),!S&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:f("selectSchema")}),g.jsx("select",{value:x,onChange:W=>Y(W.target.value),className:"semiont-select",children:b.map(W=>g.jsx("option",{value:W.id,children:W.name},W.id))}),B&&g.jsx("p",{className:"semiont-form__help",children:B.description})]}),B&&g.jsxs("div",{className:"semiont-form-field",children:[g.jsx("label",{className:"semiont-form-field__label",children:f("selectCategories")}),g.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginBottom:"0.75rem"},children:[g.jsx("button",{onClick:q,type:"button",className:"semiont-button--secondary",style:{fontSize:"var(--semiont-text-xs)",padding:"0.25rem 0.5rem"},children:f("selectAll")}),g.jsx("button",{onClick:I,type:"button",className:"semiont-button--secondary",style:{fontSize:"var(--semiont-text-xs)",padding:"0.25rem 0.5rem"},children:f("deselectAll")})]}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:B.tags.map(W=>g.jsxs("div",{className:"semiont-form__checkbox-field",children:[g.jsx("input",{type:"checkbox",id:`category-${W.name.replace(/\s+/g,"-")}`,checked:j.has(W.name),onChange:()=>H(W.name),className:"semiont-checkbox"}),g.jsxs("label",{htmlFor:`category-${W.name.replace(/\s+/g,"-")}`,className:"semiont-form__checkbox-label",style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:[g.jsx("span",{style:{fontWeight:500},children:W.name}),g.jsx("span",{style:{fontSize:"var(--semiont-text-xs)",color:"var(--semiont-text-secondary)"},children:W.description})]})]},W.name))}),g.jsx("p",{className:"semiont-form__help",children:f("categoriesSelected",{count:j.size})})]})]}),g.jsxs("button",{onClick:ee,disabled:j.size===0||n,className:"semiont-button","data-variant":"assist","data-type":"tag",children:[g.jsx("span",{className:"semiont-button-icon",children:"✨"}),g.jsx("span",{children:f("annotate")})]}),n&&r&&g.jsxs("div",{className:"semiont-annotation-progress","data-type":"tag",children:[r.requestParams&&r.requestParams.length>0&&g.jsxs("div",{className:"semiont-annotation-progress__params","data-type":"tag",children:[g.jsx("div",{className:"semiont-annotation-progress__params-title",children:"Request Parameters:"}),r.requestParams.map((W,z)=>g.jsxs("div",{className:"semiont-annotation-progress__param",children:[g.jsxs("span",{className:"semiont-annotation-progress__param-label",children:[W.label,":"]})," ",W.value]},z))]}),g.jsxs("div",{className:"semiont-annotation-progress__status",children:[g.jsxs("div",{className:"semiont-annotation-progress__message",children:[g.jsx("span",{className:"semiont-annotation-progress__icon",children:"✨"}),g.jsx("span",{children:r.message})]}),r.currentCategory&&g.jsxs("div",{className:"semiont-annotation-progress__details",children:["Processing: ",r.currentCategory,r.processedCategories!==void 0&&r.totalCategories!==void 0&&g.jsxs(g.Fragment,{children:[" (",r.processedCategories,"/",r.totalCategories,")"]})]})]}),r.percentage!==void 0&&g.jsx("div",{className:"semiont-progress-bar",children:g.jsx("div",{className:"semiont-progress-bar__fill","data-type":"tag",style:{width:`${r.percentage}%`}})})]})]})]}),g.jsx("div",{className:"semiont-panel__list",children:Z.length===0?g.jsx("p",{className:"semiont-panel__empty",children:f("noTags")}):Z.map(W=>g.jsx(Cne,{tag:W,isFocused:W.id===A,isHovered:W.id===o,ref:z=>X(W.id,z)},W.id))})]})]})}var fA=["statistics","reference","highlight","assessment","comment","tag"];function Qne(e){const t=hn("UnifiedAnnotationsPanel"),n={highlight:[],comment:[],assessment:[],reference:[],tag:[]};for(const c of e.annotations){const d=Object.values(e.annotators).find(f=>f.matchesAnnotation(c));d&&(n[d.internalType]||(n[d.internalType]=[]),n[d.internalType].push(c))}const r=n,[i,a]=k.useState(()=>{if(typeof window>"u")return e.initialTab||"statistics";const c=e.resourceId?`annotations-tab-${e.resourceId}`:"annotations-tab-global",d=localStorage.getItem(c);return d&&fA.includes(d)?d:e.initialTab||"statistics"});k.useEffect(()=>{if(typeof window>"u")return;const c=e.resourceId?`annotations-tab-${e.resourceId}`:"annotations-tab-global";localStorage.setItem(c,i)},[i,e.resourceId]),k.useEffect(()=>{e.initialTab&&e.initialTabGeneration!==void 0&&a(e.initialTab)},[e.initialTabGeneration]),k.useEffect(()=>{if(e.pendingAnnotation){const d={linking:"reference",commenting:"comment",tagging:"tag",assessing:"assessment",highlighting:"highlight"}[e.pendingAnnotation.motivation];d&&a(d)}},[e.pendingAnnotation]);const s=c=>{a(c)},o=c=>`semiont-unified-panel__tab-button${i===c?" semiont-unified-panel__tab-button--active":""}`;return g.jsxs("div",{className:"semiont-unified-panel",children:[g.jsx("h3",{className:"semiont-unified-panel__title",children:t("title")}),g.jsx("div",{className:"semiont-unified-panel__tabs",children:fA.map(c=>{if(c==="statistics")return g.jsx("button",{onClick:()=>s(c),className:o(c),title:t(c),"aria-pressed":i===c,children:g.jsx("span",{className:"semiont-unified-panel__tab-icon",children:"📊"})},c);const d=e.annotators[c];return d?g.jsx("button",{onClick:()=>s(c),className:o(c),title:t(c),"aria-pressed":i===c,children:g.jsx("span",{className:"semiont-unified-panel__tab-icon",children:d.iconEmoji})},c):null})}),g.jsx("div",{className:"semiont-unified-panel__content",children:(()=>{if(i==="statistics")return g.jsx(Ene,{highlights:r.highlight||[],comments:r.comment||[],assessments:r.assessment||[],references:r.reference||[],tags:r.tag||[]});const c=e.annotators[i];if(!c)return null;const d=r[i]||[],f=e.assistingMotivation===c.motivation,m=f?e.progress??null:null,p={annotations:d,pendingAnnotation:e.pendingAnnotation,isAssisting:f,progress:m,annotateMode:e.annotateMode,locale:e.locale,sourceLanguage:e.sourceLanguage,scrollToAnnotationId:e.scrollToAnnotationId,onScrollCompleted:e.onScrollCompleted,hoveredAnnotationId:e.hoveredAnnotationId};return i==="highlight"?g.jsx(yne,{...p}):i==="reference"?g.jsx(jne,{annotations:p.annotations,pendingAnnotation:p.pendingAnnotation,isAssisting:p.isAssisting,progress:p.progress,annotateMode:p.annotateMode,scrollToAnnotationId:p.scrollToAnnotationId,onScrollCompleted:p.onScrollCompleted,hoveredAnnotationId:p.hoveredAnnotationId,locale:p.locale,sourceLanguage:p.sourceLanguage,allEntityTypes:e.allEntityTypes||[],generatingReferenceId:e.generatingReferenceId,referencedBy:e.referencedBy,referencedByLoading:e.referencedByLoading,Link:e.Link,routes:e.routes}):i==="assessment"?g.jsx(fne,{...p}):i==="comment"?g.jsx(vne,{...p}):i==="tag"?g.jsx(Pne,{...p}):null})()})]})}function Nne({Link:e,routes:t,t:n,CookiePreferences:r,onOpenKeyboardHelp:i,sourceCodeUrl:a="https://github.com/The-AI-Alliance/semiont",showPolicyLinks:s=!0}){var d,f,m;const[o,c]=k.useState(!1);return g.jsxs(g.Fragment,{children:[g.jsx("footer",{role:"contentinfo",className:"semiont-footer",children:g.jsx("div",{className:"semiont-footer__container",children:g.jsxs("div",{className:"semiont-footer__content",children:[g.jsx("div",{className:"semiont-footer__copyright",children:n("copyright",{year:new Date().getFullYear()})}),g.jsxs("div",{className:"semiont-footer__links",children:[s&&g.jsxs(g.Fragment,{children:[g.jsx(e,{href:((d=t.about)==null?void 0:d.call(t))||"/about",className:"semiont-footer__link",children:n("about")}),g.jsx(e,{href:((f=t.privacy)==null?void 0:f.call(t))||"/privacy",className:"semiont-footer__link",children:n("privacyPolicy")}),r&&g.jsx("button",{onClick:()=>c(!0),className:"semiont-footer__link",children:n("cookiePreferences")}),g.jsx(e,{href:((m=t.terms)==null?void 0:m.call(t))||"/terms",className:"semiont-footer__link",children:n("termsOfService")})]}),i&&g.jsxs("button",{onClick:i,className:"semiont-footer__link semiont-footer__link--keyboard",children:[n("keyboardShortcuts"),g.jsx("kbd",{className:"semiont-footer__kbd",children:"?"})]}),g.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"semiont-footer__link",children:n("sourceCode")})]})]})})}),s&&r&&g.jsx(r,{isOpen:o,onClose:()=>c(!1)})]})}function xS({Link:e,routes:t,t:n,isAdmin:r=!1,isModerator:i=!1,onItemClick:a,className:s="",currentPath:o}){var f,m,p,v,b,S;const c=s?`semiont-navigation-menu ${s}`:"semiont-navigation-menu",d=x=>o?o===x||o.startsWith(x+"/"):!1;return g.jsxs("nav",{className:c,"aria-label":"Main navigation",children:[g.jsx(e,{href:((f=t.knowledge)==null?void 0:f.call(t))||"/know",...a&&{onClick:a},className:"semiont-navigation-menu__link","aria-current":d(((m=t.knowledge)==null?void 0:m.call(t))||"/know")?"page":void 0,children:n("know")}),(i||r)&&g.jsxs(g.Fragment,{children:[g.jsx("hr",{className:"semiont-navigation-menu__divider"}),g.jsx(e,{href:((p=t.moderate)==null?void 0:p.call(t))||"/moderate",...a&&{onClick:a},className:"semiont-navigation-menu__link","aria-current":d(((v=t.moderate)==null?void 0:v.call(t))||"/moderate")?"page":void 0,children:n("moderate")})]}),r&&g.jsxs(g.Fragment,{children:[g.jsx("hr",{className:"semiont-navigation-menu__divider"}),g.jsx(e,{href:((b=t.admin)==null?void 0:b.call(t))||"/admin",...a&&{onClick:a},className:"semiont-navigation-menu__link","aria-current":d(((S=t.admin)==null?void 0:S.call(t))||"/admin")?"page":void 0,children:n("administer")})]})]})}function Hse({title:e,items:t,currentPath:n,LinkComponent:r,dropdownContent:i,isCollapsed:a,icons:s,collapseSidebarLabel:o,expandSidebarLabel:c}){const d=s.chevronLeft,f=s.bars,[m,p]=k.useState(!1),v=k.useRef(null),b=ot(),S=()=>p(!m),x=()=>p(!1);return k.useEffect(()=>{const w=j=>{v.current&&!v.current.contains(j.target)&&x()};if(m)return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[m]),g.jsxs("div",{className:"semiont-simple-nav",children:[g.jsxs("div",{style:{position:"relative"},ref:i?v:void 0,children:[g.jsxs("div",{className:"semiont-nav-section__header",children:[i?g.jsx("button",{onClick:S,className:"semiont-nav-section__header-button","aria-expanded":m,"aria-haspopup":"true",type:"button",children:!a&&g.jsx("span",{className:"semiont-nav-section__header-text",children:e})}):!a&&g.jsx("span",{className:"semiont-nav-section__header-text",children:e}),g.jsx("button",{onClick:()=>b.emit("shell:sidebar-toggle",void 0),className:"semiont-nav-section__header-icon",title:a?c:o,"aria-label":a?c:o,type:"button",children:a?g.jsx(f,{}):g.jsx(d,{})})]}),m&&i&&!a&&g.jsx("div",{className:"semiont-nav-section__dropdown",children:i(x)})]}),!a&&g.jsx("nav",{className:"semiont-nav-tabs",children:t.map(w=>{const j=n===w.href;return g.jsxs(r,{href:w.href,className:`semiont-nav-tab ${j?"semiont-nav-tab--active":""}`,title:w.description||w.name,"aria-current":j?"page":void 0,children:[g.jsx(w.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"}),g.jsx("span",{className:"semiont-nav-tab__text",children:w.name})]},w.href)})}),a&&g.jsx("nav",{className:"semiont-nav-tabs",children:t.map(w=>{const j=n===w.href;return g.jsx(r,{href:w.href,className:`semiont-nav-tab ${j?"semiont-nav-tab--active":""}`,title:w.description||w.name,"aria-current":j?"page":void 0,"aria-label":w.name,children:g.jsx(w.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"})},w.href)})})]})}function Rne(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return k.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}var Ig=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Kc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function R_(e){return"nodeType"in e}function Er(e){var t,n;return e?Kc(e)?e:R_(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function M_(e){const{Document:t}=Er(e);return e instanceof t}function Hf(e){return Kc(e)?!1:e instanceof Er(e).HTMLElement}function A3(e){return e instanceof Er(e).SVGElement}function Jc(e){return e?Kc(e)?e.document:R_(e)?M_(e)?e:Hf(e)||A3(e)?e.ownerDocument:document:document:document}var ha=Ig?k.useLayoutEffect:k.useEffect;function L_(e){const t=k.useRef(e);return ha(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function Mne(){const e=k.useRef(null),t=k.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=k.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Of(e,t){t===void 0&&(t=[e]);const n=k.useRef(e);return ha(()=>{n.current!==e&&(n.current=e)},t),n}function Gf(e,t){const n=k.useRef();return k.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Gp(e){const t=L_(e),n=k.useRef(null),r=k.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function _S(e){const t=k.useRef();return k.useEffect(()=>{t.current=e},[e]),t.current}var yy={};function Kf(e,t){return k.useMemo(()=>{if(t)return t;const n=yy[e]==null?0:yy[e]+1;return yy[e]=n,e+"-"+n},[e,t])}function P3(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((a,s)=>{const o=Object.entries(s);for(const[c,d]of o){const f=a[c];f!=null&&(a[c]=f+e*d)}return a},{...t})}}var jc=P3(1),bf=P3(-1);function Lne(e){return"clientX"in e&&"clientY"in e}function D_(e){if(!e)return!1;const{KeyboardEvent:t}=Er(e.target);return t&&e instanceof t}function Dne(e){if(!e)return!1;const{TouchEvent:t}=Er(e.target);return t&&e instanceof t}function wS(e){if(Dne(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Lne(e)?{x:e.clientX,y:e.clientY}:null}var yf=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[yf.Translate.toString(e),yf.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),hA="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function zne(e){return e.matches(hA)?e:e.querySelector(hA)}var Ine={display:"none"};function qne(e){let{id:t,value:n}=e;return de.createElement("div",{id:t,style:Ine},n)}function Bne(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return de.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function Xne(){const[e,t]=k.useState("");return{announce:k.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}var Q3=k.createContext(null);function Zne(e){const t=k.useContext(Q3);k.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function $ne(){const[e]=k.useState(()=>new Set),t=k.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[k.useCallback(r=>{let{type:i,event:a}=r;e.forEach(s=>{var o;return(o=s[i])==null?void 0:o.call(s,a)})},[e]),t]}var Vne={draggable:`
164
- To pick up a draggable item, press the space bar.
165
- While dragging, use the arrow keys to move the item.
166
- Press space again to drop the item in its new position, or press escape to cancel.
167
- `},Une={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Yne(e){let{announcements:t=Une,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Vne}=e;const{announce:a,announcement:s}=Xne(),o=Kf("DndLiveRegion"),[c,d]=k.useState(!1);if(k.useEffect(()=>{d(!0)},[]),Zne(k.useMemo(()=>({onDragStart(m){let{active:p}=m;a(t.onDragStart({active:p}))},onDragMove(m){let{active:p,over:v}=m;t.onDragMove&&a(t.onDragMove({active:p,over:v}))},onDragOver(m){let{active:p,over:v}=m;a(t.onDragOver({active:p,over:v}))},onDragEnd(m){let{active:p,over:v}=m;a(t.onDragEnd({active:p,over:v}))},onDragCancel(m){let{active:p,over:v}=m;a(t.onDragCancel({active:p,over:v}))}}),[a,t])),!c)return null;const f=de.createElement(de.Fragment,null,de.createElement(qne,{id:r,value:i.draggable}),de.createElement(Bne,{id:o,announcement:s}));return n?Vo.createPortal(f,n):f}var En;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(En||(En={}));function Kp(){}function mA(e,t){return k.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Fne(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return k.useMemo(()=>[...t].filter(r=>r!=null),[...t])}var Di=Object.freeze({x:0,y:0});function N3(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function R3(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Wne(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function pA(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function M3(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function gA(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var Hne=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=gA(t,t.left,t.top),a=[];for(const s of r){const{id:o}=s,c=n.get(o);if(c){const d=N3(gA(c),i);a.push({id:o,data:{droppableContainer:s,value:d}})}}return a.sort(R3)},Gne=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=pA(t),a=[];for(const s of r){const{id:o}=s,c=n.get(o);if(c){const d=pA(c),f=i.reduce((p,v,b)=>p+N3(d[b],v),0),m=Number((f/4).toFixed(4));a.push({id:o,data:{droppableContainer:s,value:m}})}}return a.sort(R3)};function Kne(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=i-r,o=a-n;if(r<i&&n<a){const c=t.width*t.height,d=e.width*e.height,f=s*o,m=f/(c+d-f);return Number(m.toFixed(4))}return 0}var Jne=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const a of r){const{id:s}=a,o=n.get(s);if(o){const c=Kne(o,t);c>0&&i.push({id:s,data:{droppableContainer:a,value:c}})}}return i.sort(Wne)};function ere(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function L3(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Di}function tre(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return i.reduce((s,o)=>({...s,top:s.top+e*o.y,bottom:s.bottom+e*o.y,left:s.left+e*o.x,right:s.right+e*o.x}),{...n})}}var nre=tre(1);function rre(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function ire(e,t,n){const r=rre(t);if(!r)return e;const{scaleX:i,scaleY:a,x:s,y:o}=r,c=e.left-s-(1-i)*parseFloat(n),d=e.top-o-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),f=i?e.width/i:e.width,m=a?e.height/a:e.height;return{width:f,height:m,top:d,right:c+f,bottom:d+m,left:c}}var are={ignoreTransform:!1};function eu(e,t){t===void 0&&(t=are);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:f}=Er(e).getComputedStyle(e);d&&(n=ire(n,d,f))}const{top:r,left:i,width:a,height:s,bottom:o,right:c}=n;return{top:r,left:i,width:a,height:s,bottom:o,right:c}}function vA(e){return eu(e,{ignoreTransform:!0})}function sre(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function ore(e,t){return t===void 0&&(t=Er(e).getComputedStyle(e)),t.position==="fixed"}function lre(e,t){t===void 0&&(t=Er(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?n.test(a):!1})}function qg(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(M_(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Hf(i)||A3(i)||n.includes(i))return n;const a=Er(e).getComputedStyle(i);return i!==e&&lre(i,a)&&n.push(i),ore(i,a)?n:r(i.parentNode)}return e?r(e):n}function D3(e){const[t]=qg(e,1);return t??null}function Sy(e){return!Ig||!e?null:Kc(e)?e:R_(e)?M_(e)||e===Jc(e).scrollingElement?window:Hf(e)?e:null:null}function z3(e){return Kc(e)?e.scrollX:e.scrollLeft}function I3(e){return Kc(e)?e.scrollY:e.scrollTop}function kS(e){return{x:z3(e),y:I3(e)}}var Nn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Nn||(Nn={}));function q3(e){return!Ig||!e?!1:e===document.scrollingElement}function B3(e){const t={x:0,y:0},n=q3(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,o=e.scrollLeft>=r.x;return{isTop:i,isLeft:a,isBottom:s,isRight:o,maxScroll:r,minScroll:t}}var cre={x:.2,y:.2};function ure(e,t,n,r,i){let{top:a,left:s,right:o,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=cre);const{isTop:d,isBottom:f,isLeft:m,isRight:p}=B3(e),v={x:0,y:0},b={x:0,y:0},S={height:t.height*i.y,width:t.width*i.x};return!d&&a<=t.top+S.height?(v.y=Nn.Backward,b.y=r*Math.abs((t.top+S.height-a)/S.height)):!f&&c>=t.bottom-S.height&&(v.y=Nn.Forward,b.y=r*Math.abs((t.bottom-S.height-c)/S.height)),!p&&o>=t.right-S.width?(v.x=Nn.Forward,b.x=r*Math.abs((t.right-S.width-o)/S.width)):!m&&s<=t.left+S.width&&(v.x=Nn.Backward,b.x=r*Math.abs((t.left+S.width-s)/S.width)),{direction:v,speed:b}}function dre(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:s}=window;return{top:0,left:0,right:a,bottom:s,width:a,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function X3(e){return e.reduce((t,n)=>jc(t,kS(n)),Di)}function fre(e){return e.reduce((t,n)=>t+z3(n),0)}function hre(e){return e.reduce((t,n)=>t+I3(n),0)}function mre(e,t){if(t===void 0&&(t=eu),!e)return;const{top:n,left:r,bottom:i,right:a}=t(e);D3(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}var pre=[["x",["left","right"],fre],["y",["top","bottom"],hre]],z_=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=qg(t),r=X3(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,a,s]of pre)for(const o of a)Object.defineProperty(this,o,{get:()=>{const c=s(n),d=r[i]-c;return this.rect[o]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},qd=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...t)})},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function gre(e){const{EventTarget:t}=Er(e);return e instanceof t?e:Jc(e)}function xy(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var si;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(si||(si={}));function OA(e){e.preventDefault()}function vre(e){e.stopPropagation()}var ht;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ht||(ht={}));var Z3={start:[ht.Space,ht.Enter],cancel:[ht.Esc],end:[ht.Space,ht.Enter,ht.Tab]},Ore=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ht.Right:return{...n,x:n.x+25};case ht.Left:return{...n,x:n.x-25};case ht.Down:return{...n,y:n.y+25};case ht.Up:return{...n,y:n.y-25}}},I_=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new qd(Jc(t)),this.windowListeners=new qd(Er(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(si.Resize,this.handleCancel),this.windowListeners.add(si.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(si.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&mre(n),t(Di)}handleKeyDown(e){if(D_(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Z3,coordinateGetter:a=Ore,scrollBehavior:s="smooth"}=r,{code:o}=e;if(i.end.includes(o)){this.handleEnd(e);return}if(i.cancel.includes(o)){this.handleCancel(e);return}const{collisionRect:c}=n.current,d=c?{x:c.left,y:c.top}:Di;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(e,{active:t,context:n.current,currentCoordinates:d});if(f){const m=bf(f,d),p={x:0,y:0},{scrollableAncestors:v}=n.current;for(const b of v){const S=e.code,{isTop:x,isRight:w,isLeft:j,isBottom:T,maxScroll:A,minScroll:Q}=B3(b),C=dre(b),R={x:Math.min(S===ht.Right?C.right-C.width/2:C.right,Math.max(S===ht.Right?C.left:C.left+C.width/2,f.x)),y:Math.min(S===ht.Down?C.bottom-C.height/2:C.bottom,Math.max(S===ht.Down?C.top:C.top+C.height/2,f.y))},D=S===ht.Right&&!w||S===ht.Left&&!j,L=S===ht.Down&&!T||S===ht.Up&&!x;if(D&&R.x!==f.x){const P=b.scrollLeft+m.x,Z=S===ht.Right&&P<=A.x||S===ht.Left&&P>=Q.x;if(Z&&!m.y){b.scrollTo({left:P,behavior:s});return}Z?p.x=b.scrollLeft-P:p.x=S===ht.Right?b.scrollLeft-A.x:b.scrollLeft-Q.x,p.x&&b.scrollBy({left:-p.x,behavior:s});break}else if(L&&R.y!==f.y){const P=b.scrollTop+m.y,Z=S===ht.Down&&P<=A.y||S===ht.Up&&P>=Q.y;if(Z&&!m.x){b.scrollTo({top:P,behavior:s});return}Z?p.y=b.scrollTop-P:p.y=S===ht.Down?b.scrollTop-A.y:b.scrollTop-Q.y,p.y&&b.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(e,jc(bf(f,this.referenceCoordinates),p))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};I_.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Z3,onActivation:i}=t,{active:a}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const o=a.activatorNode.current;return o&&e.target!==o?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function bA(e){return!!(e&&"distance"in e)}function yA(e){return!!(e&&"delay"in e)}var q_=class{constructor(e,t,n){var r;n===void 0&&(n=gre(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:a}=i;this.props=e,this.events=t,this.document=Jc(a),this.documentListeners=new qd(this.document),this.listeners=new qd(n),this.windowListeners=new qd(Er(a)),this.initialCoordinates=(r=wS(i))!=null?r:Di,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(si.Resize,this.handleCancel),this.windowListeners.add(si.DragStart,OA),this.windowListeners.add(si.VisibilityChange,this.handleCancel),this.windowListeners.add(si.ContextMenu,OA),this.documentListeners.add(si.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(yA(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(bA(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(si.Click,vre,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(si.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!r)return;const o=(t=wS(e))!=null?t:Di,c=bf(r,o);if(!n&&s){if(bA(s)){if(s.tolerance!=null&&xy(c,s.tolerance))return this.handleCancel();if(xy(c,s.distance))return this.handleStart()}if(yA(s)&&xy(c,s.tolerance))return this.handleCancel();this.handlePending(s,c);return}e.cancelable&&e.preventDefault(),a(o)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===ht.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},bre={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},B_=class extends q_{constructor(e){const{event:t}=e,n=Jc(t.target);super(e,bre,n)}};B_.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];var yre={move:{name:"mousemove"},end:{name:"mouseup"}},jS;(function(e){e[e.RightClick=2]="RightClick"})(jS||(jS={}));var Sre=class extends q_{constructor(e){super(e,yre,Jc(e.event.target))}};Sre.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===jS.RightClick?!1:(r==null||r({event:n}),!0)}}];var _y={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},xre=class extends q_{constructor(e){super(e,_y)}static setup(){return window.addEventListener(_y.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(_y.move.name,e)};function e(){}}};xre.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var Bd;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Bd||(Bd={}));var Jp;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Jp||(Jp={}));function _re(e){let{acceleration:t,activator:n=Bd.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:s=5,order:o=Jp.TreeOrder,pointerCoordinates:c,scrollableAncestors:d,scrollableAncestorRects:f,delta:m,threshold:p}=e;const v=kre({delta:m,disabled:!a}),[b,S]=Mne(),x=k.useRef({x:0,y:0}),w=k.useRef({x:0,y:0}),j=k.useMemo(()=>{switch(n){case Bd.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Bd.DraggableRect:return i}},[n,i,c]),T=k.useRef(null),A=k.useCallback(()=>{const C=T.current;if(!C)return;const R=x.current.x*w.current.x,D=x.current.y*w.current.y;C.scrollBy(R,D)},[]),Q=k.useMemo(()=>o===Jp.TreeOrder?[...d].reverse():d,[o,d]);k.useEffect(()=>{if(!a||!d.length||!j){S();return}for(const C of Q){if((r==null?void 0:r(C))===!1)continue;const R=d.indexOf(C),D=f[R];if(!D)continue;const{direction:L,speed:P}=ure(C,D,j,t,p);for(const Z of["x","y"])v[Z][L[Z]]||(P[Z]=0,L[Z]=0);if(P.x>0||P.y>0){S(),T.current=C,b(A,s),x.current=P,w.current=L;return}}x.current={x:0,y:0},w.current={x:0,y:0},S()},[t,A,r,S,a,s,JSON.stringify(j),JSON.stringify(v),b,d,Q,f,JSON.stringify(p)])}var wre={x:{[Nn.Backward]:!1,[Nn.Forward]:!1},y:{[Nn.Backward]:!1,[Nn.Forward]:!1}};function kre(e){let{delta:t,disabled:n}=e;const r=_S(t);return Gf(i=>{if(n||!r||!i)return wre;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Nn.Backward]:i.x[Nn.Backward]||a.x===-1,[Nn.Forward]:i.x[Nn.Forward]||a.x===1},y:{[Nn.Backward]:i.y[Nn.Backward]||a.y===-1,[Nn.Forward]:i.y[Nn.Forward]||a.y===1}}},[n,t,r])}function jre(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Gf(i=>{var a;return t==null?null:(a=r??i)!=null?a:null},[r,t])}function Tre(e,t){return k.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,a=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...a]},[]),[e,t])}var Sf;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Sf||(Sf={}));var TS;(function(e){e.Optimized="optimized"})(TS||(TS={}));var SA=new Map;function Ere(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,s]=k.useState(null),{frequency:o,measure:c,strategy:d}=i,f=k.useRef(e),m=x(),p=Of(m),v=k.useCallback(function(w){w===void 0&&(w=[]),!p.current&&s(j=>j===null?w:j.concat(w.filter(T=>!j.includes(T))))},[p]),b=k.useRef(null),S=Gf(w=>{if(m&&!n)return SA;if(!w||w===SA||f.current!==e||a!=null){const j=new Map;for(let T of e){if(!T)continue;if(a&&a.length>0&&!a.includes(T.id)&&T.rect.current){j.set(T.id,T.rect.current);continue}const A=T.node.current,Q=A?new z_(c(A),A):null;T.rect.current=Q,Q&&j.set(T.id,Q)}return j}return w},[e,a,n,m,c]);return k.useEffect(()=>{f.current=e},[e]),k.useEffect(()=>{m||v()},[n,m]),k.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),k.useEffect(()=>{m||typeof o!="number"||b.current!==null||(b.current=setTimeout(()=>{v(),b.current=null},o))},[o,m,v,...r]),{droppableRects:S,measureDroppableContainers:v,measuringScheduled:a!=null};function x(){switch(d){case Sf.Always:return!1;case Sf.BeforeDragging:return n;default:return!n}}}function $3(e,t){return Gf(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Cre(e,t){return $3(e,t)}function Are(e){let{callback:t,disabled:n}=e;const r=L_(t),i=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return k.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Bg(e){let{callback:t,disabled:n}=e;const r=L_(t),i=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return k.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Pre(e){return new z_(eu(e),e)}function xA(e,t,n){t===void 0&&(t=Pre);const[r,i]=k.useState(null);function a(){i(c=>{if(!e)return null;if(e.isConnected===!1){var d;return(d=c??n)!=null?d:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const s=Are({callback(c){if(e)for(const d of c){const{type:f,target:m}=d;if(f==="childList"&&m instanceof HTMLElement&&m.contains(e)){a();break}}}}),o=Bg({callback:a});return ha(()=>{a(),e?(o==null||o.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(o==null||o.disconnect(),s==null||s.disconnect())},[e]),r}function Qre(e){const t=$3(e);return L3(e,t)}var _A=[];function Nre(e){const t=k.useRef(e),n=Gf(r=>e?r&&r!==_A&&e&&t.current&&e.parentNode===t.current.parentNode?r:qg(e):_A,[e]);return k.useEffect(()=>{t.current=e},[e]),n}function Rre(e){const[t,n]=k.useState(null),r=k.useRef(e),i=k.useCallback(a=>{const s=Sy(a.target);s&&n(o=>o?(o.set(s,kS(s)),new Map(o)):null)},[]);return k.useEffect(()=>{const a=r.current;if(e!==a){s(a);const o=e.map(c=>{const d=Sy(c);return d?(d.addEventListener("scroll",i,{passive:!0}),[d,kS(d)]):null}).filter(c=>c!=null);n(o.length?new Map(o):null),r.current=e}return()=>{s(e),s(a)};function s(o){o.forEach(c=>{const d=Sy(c);d==null||d.removeEventListener("scroll",i)})}},[i,e]),k.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,s)=>jc(a,s),Di):X3(e):Di,[e,t])}function wA(e,t){t===void 0&&(t=[]);const n=k.useRef(null);return k.useEffect(()=>{n.current=null},t),k.useEffect(()=>{const r=e!==Di;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?bf(e,n.current):Di}function Mre(e){k.useEffect(()=>{if(!Ig)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Lre(e,t){return k.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:a}=r;return n[i]=s=>{a(s,t)},n},{}),[e,t])}function V3(e){return k.useMemo(()=>e?sre(e):null,[e])}var kA=[];function Dre(e,t){t===void 0&&(t=eu);const[n]=e,r=V3(n?Er(n):null),[i,a]=k.useState(kA);function s(){a(()=>e.length?e.map(c=>q3(c)?r:new z_(t(c),c)):kA)}const o=Bg({callback:s});return ha(()=>{o==null||o.disconnect(),s(),e.forEach(c=>o==null?void 0:o.observe(c))},[e]),i}function zre(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Hf(t)?t:e}function Ire(e){let{measure:t}=e;const[n,r]=k.useState(null),i=k.useCallback(d=>{for(const{target:f}of d)if(Hf(f)){r(m=>{const p=t(f);return m?{...m,width:p.width,height:p.height}:p});break}},[t]),a=Bg({callback:i}),s=k.useCallback(d=>{const f=zre(d);a==null||a.disconnect(),f&&(a==null||a.observe(f)),r(f?t(f):null)},[t,a]),[o,c]=Gp(s);return k.useMemo(()=>({nodeRef:o,rect:n,setRef:c}),[n,o,c])}var qre=[{sensor:B_,options:{}},{sensor:I_,options:{}}],Bre={current:{}},Op={draggable:{measure:vA},droppable:{measure:vA,strategy:Sf.WhileDragging,frequency:TS.Optimized},dragOverlay:{measure:eu}},Xd=class extends Map{get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return(t=(n=this.get(e))==null?void 0:n.node.current)!=null?t:void 0}},Xre={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Xd,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Kp},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Op,measureDroppableContainers:Kp,windowRect:null,measuringScheduled:!1},Zre={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Kp,draggableNodes:new Map,over:null,measureDroppableContainers:Kp},Xg=k.createContext(Zre),U3=k.createContext(Xre);function $re(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Xd}}}function Vre(e,t){switch(t.type){case En.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case En.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case En.DragEnd:case En.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case En.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Xd(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case En.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const s=new Xd(e.droppable.containers);return s.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case En.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Xd(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Ure(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=k.useContext(Xg),a=_S(r),s=_S(n==null?void 0:n.id);return k.useEffect(()=>{if(!t&&!r&&a&&s!=null){if(!D_(a)||document.activeElement===a.target)return;const o=i.get(s);if(!o)return;const{activatorNode:c,node:d}=o;if(!c.current&&!d.current)return;requestAnimationFrame(()=>{for(const f of[c.current,d.current]){if(!f)continue;const m=zne(f);if(m){m.focus();break}}})}},[r,t,i,s,a]),null}function Yre(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...r}),n):n}function Fre(e){return k.useMemo(()=>({draggable:{...Op.draggable,...e==null?void 0:e.draggable},droppable:{...Op.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Op.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Wre(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const a=k.useRef(!1),{x:s,y:o}=typeof i=="boolean"?{x:i,y:i}:i;ha(()=>{if(!s&&!o||!t){a.current=!1;return}if(a.current||!r)return;const d=t==null?void 0:t.node.current;if(!d||d.isConnected===!1)return;const f=n(d),m=L3(f,r);if(s||(m.x=0),o||(m.y=0),a.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const p=D3(d);p&&p.scrollBy({top:m.y,left:m.x})}},[t,s,o,r,n])}var Y3=k.createContext({...Di,scaleX:1,scaleY:1}),Xs;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Xs||(Xs={}));var Hre=k.memo(function(t){var n,r,i,a;let{id:s,accessibility:o,autoScroll:c=!0,children:d,sensors:f=qre,collisionDetection:m=Jne,measuring:p,modifiers:v,...b}=t;const S=k.useReducer(Vre,void 0,$re),[x,w]=S,[j,T]=$ne(),[A,Q]=k.useState(Xs.Uninitialized),C=A===Xs.Initialized,{draggable:{active:R,nodes:D,translate:L},droppable:{containers:P}}=x,Z=R!=null?D.get(R):null,X=k.useRef({initial:null,translated:null}),B=k.useMemo(()=>{var At;return R!=null?{id:R,data:(At=Z==null?void 0:Z.data)!=null?At:Bre,rect:X}:null},[R,Z]),Y=k.useRef(null),[H,q]=k.useState(null),[I,ee]=k.useState(null),W=Of(b,Object.values(b)),z=Kf("DndDescribedBy",s),ce=k.useMemo(()=>P.getEnabled(),[P]),se=Fre(p),{droppableRects:N,measureDroppableContainers:le,measuringScheduled:pe}=Ere(ce,{dragging:C,dependencies:[L.x,L.y],config:se.droppable}),Oe=jre(D,R),Be=k.useMemo(()=>I?wS(I):null,[I]),Ae=Cr(),Ze=Cre(Oe,se.draggable.measure);Wre({activeNode:R!=null?D.get(R):null,config:Ae.layoutShiftCompensation,initialRect:Ze,measure:se.draggable.measure});const xe=xA(Oe,se.draggable.measure,Ze),Ye=xA(Oe?Oe.parentElement:null),Ue=k.useRef({activatorEvent:null,active:null,activeNode:Oe,collisionRect:null,collisions:null,droppableRects:N,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Qe=P.getNodeFor((n=Ue.current.over)==null?void 0:n.id),De=Ire({measure:se.dragOverlay.measure}),mt=(r=De.nodeRef.current)!=null?r:Oe,Ve=C?(i=De.rect)!=null?i:xe:null,cn=!!(De.nodeRef.current&&De.rect),je=Qre(cn?null:xe),We=V3(mt?Er(mt):null),ge=Nre(C?Qe??Oe:null),dt=Dre(ge),Et=Yre(v,{transform:{x:L.x-je.x,y:L.y-je.y,scaleX:1,scaleY:1},activatorEvent:I,active:B,activeNodeRect:xe,containerNodeRect:Ye,draggingNodeRect:Ve,over:Ue.current.over,overlayNodeRect:De.rect,scrollableAncestors:ge,scrollableAncestorRects:dt,windowRect:We}),Zt=Be?jc(Be,L):null,et=Rre(ge),Mn=wA(et),re=wA(et,[xe]),fe=jc(Et,Mn),Te=Ve?nre(Ve,Et):null,$e=B&&Te?m({active:B,collisionRect:Te,droppableRects:N,droppableContainers:ce,pointerCoordinates:Zt}):null,rt=M3($e,"id"),[Ct,Cn]=k.useState(null),Jt=cn?Et:jc(Et,re),Lt=ere(Jt,(a=Ct==null?void 0:Ct.rect)!=null?a:null,xe),Ht=k.useRef(null),lt=k.useCallback((At,Dt)=>{let{sensor:kt,options:pn}=Dt;if(Y.current==null)return;const gn=D.get(Y.current);if(!gn)return;const en=At.nativeEvent,vn=new kt({active:Y.current,activeNode:gn,event:en,options:pn,context:Ue,onAbort(Yt){if(!D.get(Yt))return;const{onDragAbort:_e}=W.current,He={id:Yt};_e==null||_e(He),j({type:"onDragAbort",event:He})},onPending(Yt,Ln,_e,He){if(!D.get(Yt))return;const{onDragPending:rr}=W.current,Dn={id:Yt,constraint:Ln,initialCoordinates:_e,offset:He};rr==null||rr(Dn),j({type:"onDragPending",event:Dn})},onStart(Yt){const Ln=Y.current;if(Ln==null)return;const _e=D.get(Ln);if(!_e)return;const{onDragStart:He}=W.current,nn={activatorEvent:en,active:{id:Ln,data:_e.data,rect:X}};Vo.unstable_batchedUpdates(()=>{He==null||He(nn),Q(Xs.Initializing),w({type:En.DragStart,initialCoordinates:Yt,active:Ln}),j({type:"onDragStart",event:nn}),q(Ht.current),ee(en)})},onMove(Yt){w({type:En.DragMove,coordinates:Yt})},onEnd:An(En.DragEnd),onCancel:An(En.DragCancel)});Ht.current=vn;function An(Yt){return async function(){const{active:_e,collisions:He,over:nn,scrollAdjustedTranslate:rr}=Ue.current;let Dn=null;if(_e&&rr){const{cancelDrop:dr}=W.current;Dn={activatorEvent:en,active:_e,collisions:He,delta:rr,over:nn},Yt===En.DragEnd&&typeof dr=="function"&&await Promise.resolve(dr(Dn))&&(Yt=En.DragCancel)}Y.current=null,Vo.unstable_batchedUpdates(()=>{w({type:Yt}),Q(Xs.Uninitialized),Cn(null),q(null),ee(null),Ht.current=null;const dr=Yt===En.DragEnd?"onDragEnd":"onDragCancel";if(Dn){const Un=W.current[dr];Un==null||Un(Dn),j({type:dr,event:Dn})}})}}},[D]),Vn=k.useCallback((At,Dt)=>(kt,pn)=>{const gn=kt.nativeEvent,en=D.get(pn);if(Y.current!==null||!en||gn.dndKit||gn.defaultPrevented)return;const vn={active:en};At(kt,Dt.options,vn)===!0&&(gn.dndKit={capturedBy:Dt.sensor},Y.current=pn,lt(kt,Dt))},[D,lt]),mn=Tre(f,Vn);Mre(f),ha(()=>{xe&&A===Xs.Initializing&&Q(Xs.Initialized)},[xe,A]),k.useEffect(()=>{const{onDragMove:At}=W.current,{active:Dt,activatorEvent:kt,collisions:pn,over:gn}=Ue.current;if(!Dt||!kt)return;const en={active:Dt,activatorEvent:kt,collisions:pn,delta:{x:fe.x,y:fe.y},over:gn};Vo.unstable_batchedUpdates(()=>{At==null||At(en),j({type:"onDragMove",event:en})})},[fe.x,fe.y]),k.useEffect(()=>{const{active:At,activatorEvent:Dt,collisions:kt,droppableContainers:pn,scrollAdjustedTranslate:gn}=Ue.current;if(!At||Y.current==null||!Dt||!gn)return;const{onDragOver:en}=W.current,vn=pn.get(rt),An=vn&&vn.rect.current?{id:vn.id,rect:vn.rect.current,data:vn.data,disabled:vn.disabled}:null,Yt={active:At,activatorEvent:Dt,collisions:kt,delta:{x:gn.x,y:gn.y},over:An};Vo.unstable_batchedUpdates(()=>{Cn(An),en==null||en(Yt),j({type:"onDragOver",event:Yt})})},[rt]),ha(()=>{Ue.current={activatorEvent:I,active:B,activeNode:Oe,collisionRect:Te,collisions:$e,droppableRects:N,draggableNodes:D,draggingNode:mt,draggingNodeRect:Ve,droppableContainers:P,over:Ct,scrollableAncestors:ge,scrollAdjustedTranslate:fe},X.current={initial:Ve,translated:Te}},[B,Oe,$e,Te,D,mt,Ve,N,P,Ct,ge,fe]),_re({...Ae,delta:L,draggingRect:Te,pointerCoordinates:Zt,scrollableAncestors:ge,scrollableAncestorRects:dt});const va=k.useMemo(()=>({active:B,activeNode:Oe,activeNodeRect:xe,activatorEvent:I,collisions:$e,containerNodeRect:Ye,dragOverlay:De,draggableNodes:D,droppableContainers:P,droppableRects:N,over:Ct,measureDroppableContainers:le,scrollableAncestors:ge,scrollableAncestorRects:dt,measuringConfiguration:se,measuringScheduled:pe,windowRect:We}),[B,Oe,xe,I,$e,Ye,De,D,P,N,Ct,le,ge,dt,se,pe,We]),Fr=k.useMemo(()=>({activatorEvent:I,activators:mn,active:B,activeNodeRect:xe,ariaDescribedById:{draggable:z},dispatch:w,draggableNodes:D,over:Ct,measureDroppableContainers:le}),[I,mn,B,xe,w,z,D,Ct,le]);return de.createElement(Q3.Provider,{value:T},de.createElement(Xg.Provider,{value:Fr},de.createElement(U3.Provider,{value:va},de.createElement(Y3.Provider,{value:Lt},d)),de.createElement(Ure,{disabled:(o==null?void 0:o.restoreFocus)===!1})),de.createElement(Yne,{...o,hiddenTextDescribedById:z}));function Cr(){const At=(H==null?void 0:H.autoScrollEnabled)===!1,Dt=typeof c=="object"?c.enabled===!1:c===!1,kt=C&&!At&&!Dt;return typeof c=="object"?{...c,enabled:kt}:{enabled:kt}}}),Gre=k.createContext(null),jA="button",Kre="Draggable";function Jre(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=Kf(Kre),{activators:s,activatorEvent:o,active:c,activeNodeRect:d,ariaDescribedById:f,draggableNodes:m,over:p}=k.useContext(Xg),{role:v=jA,roleDescription:b="draggable",tabIndex:S=0}=i??{},x=(c==null?void 0:c.id)===t,w=k.useContext(x?Y3:Gre),[j,T]=Gp(),[A,Q]=Gp(),C=Lre(s,t),R=Of(n);ha(()=>(m.set(t,{id:t,key:a,node:j,activatorNode:A,data:R}),()=>{const L=m.get(t);L&&L.key===a&&m.delete(t)}),[m,t]);const D=k.useMemo(()=>({role:v,tabIndex:S,"aria-disabled":r,"aria-pressed":x&&v===jA?!0:void 0,"aria-roledescription":b,"aria-describedby":f.draggable}),[r,v,S,x,b,f.draggable]);return{active:c,activatorEvent:o,activeNodeRect:d,attributes:D,isDragging:x,listeners:r?void 0:C,node:j,over:p,setNodeRef:T,setActivatorNodeRef:Q,transform:w}}function eie(){return k.useContext(U3)}var tie="Droppable",nie={timeout:25};function rie(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=Kf(tie),{active:s,dispatch:o,over:c,measureDroppableContainers:d}=k.useContext(Xg),f=k.useRef({disabled:n}),m=k.useRef(!1),p=k.useRef(null),v=k.useRef(null),{disabled:b,updateMeasurementsFor:S,timeout:x}={...nie,...i},w=Of(S??r),j=k.useCallback(()=>{if(!m.current){m.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{d(Array.isArray(w.current)?w.current:[w.current]),v.current=null},x)},[x]),T=Bg({callback:j,disabled:b||!s}),A=k.useCallback((D,L)=>{T&&(L&&(T.unobserve(L),m.current=!1),D&&T.observe(D))},[T]),[Q,C]=Gp(A),R=Of(t);return k.useEffect(()=>{!T||!Q.current||(T.disconnect(),m.current=!1,T.observe(Q.current))},[Q,T]),k.useEffect(()=>(o({type:En.RegisterDroppable,element:{id:r,key:a,disabled:n,node:Q,rect:p,data:R}}),()=>o({type:En.UnregisterDroppable,key:a,id:r})),[r]),k.useEffect(()=>{n!==f.current.disabled&&(o({type:En.SetDroppableDisabled,id:r,key:a,disabled:n}),f.current.disabled=n)},[r,a,n,o]),{active:s,rect:p,isOver:(c==null?void 0:c.id)===r,node:Q,over:c,setNodeRef:C}}function F3(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function iie(e,t){return e.reduce((n,r,i)=>{const a=t.get(r);return a&&(n[i]=a),n},Array(e.length))}function Fm(e){return e!==null&&e>=0}function aie(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function sie(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}var W3=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const a=F3(t,r,n),s=t[i],o=a[i];return!o||!s?null:{x:o.left-s.left,y:o.top-s.top,scaleX:o.width/s.width,scaleY:o.height/s.height}},Wm={scaleX:1,scaleY:1},oie=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:a,overIndex:s}=e;const o=(t=a[n])!=null?t:r;if(!o)return null;if(i===n){const d=a[s];return d?{x:0,y:n<s?d.top+d.height-(o.top+o.height):d.top-o.top,...Wm}:null}const c=lie(a,i,n);return i>n&&i<=s?{x:0,y:-o.height-c,...Wm}:i<n&&i>=s?{x:0,y:o.height+c,...Wm}:{x:0,y:0,...Wm}};function lie(e,t,n){const r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var H3="Sortable",G3=de.createContext({activeIndex:-1,containerId:H3,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:W3,disabled:{draggable:!1,droppable:!1}});function cie(e){let{children:t,id:n,items:r,strategy:i=W3,disabled:a=!1}=e;const{active:s,dragOverlay:o,droppableRects:c,over:d,measureDroppableContainers:f}=eie(),m=Kf(H3,n),p=o.rect!==null,v=k.useMemo(()=>r.map(C=>typeof C=="object"&&"id"in C?C.id:C),[r]),b=s!=null,S=s?v.indexOf(s.id):-1,x=d?v.indexOf(d.id):-1,w=k.useRef(v),j=!aie(v,w.current),T=x!==-1&&S===-1||j,A=sie(a);ha(()=>{j&&b&&f(v)},[j,v,b,f]),k.useEffect(()=>{w.current=v},[v]);const Q=k.useMemo(()=>({activeIndex:S,containerId:m,disabled:A,disableTransforms:T,items:v,overIndex:x,useDragOverlay:p,sortedRects:iie(v,c),strategy:i}),[S,m,A.draggable,A.droppable,T,v,x,c,p,i]);return de.createElement(G3.Provider,{value:Q},t)}var uie=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return F3(n,r,i).indexOf(t)},die=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:s,previousItems:o,previousContainerId:c,transition:d}=e;return!d||!r||o!==a&&i===s?!1:n?!0:s!==i&&t===c},fie={duration:200,easing:"ease"},K3="transform",hie=yf.Transition.toString({property:K3,duration:0,easing:"linear"}),mie={roleDescription:"sortable"};function pie(e){let{disabled:t,index:n,node:r,rect:i}=e;const[a,s]=k.useState(null),o=k.useRef(n);return ha(()=>{if(!t&&n!==o.current&&r.current){const c=i.current;if(c){const d=eu(r.current,{ignoreTransform:!0}),f={x:c.left-d.left,y:c.top-d.top,scaleX:c.width/d.width,scaleY:c.height/d.height};(f.x||f.y)&&s(f)}}n!==o.current&&(o.current=n)},[t,n,r,i]),k.useEffect(()=>{a&&s(null)},[a]),a}function gie(e){let{animateLayoutChanges:t=die,attributes:n,disabled:r,data:i,getNewIndex:a=uie,id:s,strategy:o,resizeObserverConfig:c,transition:d=fie}=e;const{items:f,containerId:m,activeIndex:p,disabled:v,disableTransforms:b,sortedRects:S,overIndex:x,useDragOverlay:w,strategy:j}=k.useContext(G3),T=vie(r,v),A=f.indexOf(s),Q=k.useMemo(()=>({sortable:{containerId:m,index:A,items:f},...i}),[m,i,A,f]),C=k.useMemo(()=>f.slice(f.indexOf(s)),[f,s]),{rect:R,node:D,isOver:L,setNodeRef:P}=rie({id:s,data:Q,disabled:T.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...c}}),{active:Z,activatorEvent:X,activeNodeRect:B,attributes:Y,setNodeRef:H,listeners:q,isDragging:I,over:ee,setActivatorNodeRef:W,transform:z}=Jre({id:s,data:Q,attributes:{...mie,...n},disabled:T.draggable}),ce=Rne(P,H),se=!!Z,N=se&&!b&&Fm(p)&&Fm(x),le=!w&&I,pe=le&&N?z:null,Be=N?pe??(o??j)({rects:S,activeNodeRect:B,activeIndex:p,overIndex:x,index:A}):null,Ae=Fm(p)&&Fm(x)?a({id:s,items:f,activeIndex:p,overIndex:x}):A,Ze=Z==null?void 0:Z.id,xe=k.useRef({activeId:Ze,items:f,newIndex:Ae,containerId:m}),Ye=f!==xe.current.items,Ue=t({active:Z,containerId:m,isDragging:I,isSorting:se,id:s,index:A,items:f,newIndex:xe.current.newIndex,previousItems:xe.current.items,previousContainerId:xe.current.containerId,transition:d,wasDragging:xe.current.activeId!=null}),Qe=pie({disabled:!Ue,index:A,node:D,rect:R});return k.useEffect(()=>{se&&xe.current.newIndex!==Ae&&(xe.current.newIndex=Ae),m!==xe.current.containerId&&(xe.current.containerId=m),f!==xe.current.items&&(xe.current.items=f)},[se,Ae,m,f]),k.useEffect(()=>{if(Ze===xe.current.activeId)return;if(Ze!=null&&xe.current.activeId==null){xe.current.activeId=Ze;return}const mt=setTimeout(()=>{xe.current.activeId=Ze},50);return()=>clearTimeout(mt)},[Ze]),{active:Z,activeIndex:p,attributes:Y,data:Q,rect:R,index:A,newIndex:Ae,items:f,isOver:L,isSorting:se,isDragging:I,listeners:q,node:D,overIndex:x,over:ee,setNodeRef:ce,setActivatorNodeRef:W,setDroppableNodeRef:P,setDraggableNodeRef:H,transform:Qe??Be,transition:De()};function De(){if(Qe||Ye&&xe.current.newIndex===A)return hie;if(!(le&&!D_(X)||!d)&&(se||Ue))return yf.Transition.toString({...d,property:K3})}}function vie(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function eg(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}var Oie=[ht.Down,ht.Right,ht.Up,ht.Left],bie=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:s,scrollableAncestors:o}}=t;if(Oie.includes(e.code)){if(e.preventDefault(),!n||!r)return;const c=[];a.getEnabled().forEach(m=>{if(!m||m!=null&&m.disabled)return;const p=i.get(m.id);if(p)switch(e.code){case ht.Down:r.top<p.top&&c.push(m);break;case ht.Up:r.top>p.top&&c.push(m);break;case ht.Left:r.left>p.left&&c.push(m);break;case ht.Right:r.left<p.left&&c.push(m);break}});const d=Gne({collisionRect:r,droppableRects:i,droppableContainers:c});let f=M3(d,"id");if(f===(s==null?void 0:s.id)&&d.length>1&&(f=d[1].id),f!=null){const m=a.get(n.id),p=a.get(f),v=p?i.get(p.id):null,b=p==null?void 0:p.node.current;if(b&&v&&m&&p){const x=qg(b).some((C,R)=>o[R]!==C),w=J3(m,p),j=yie(m,p),T=x||!w?{x:0,y:0}:{x:j?r.width-v.width:0,y:j?r.height-v.height:0},A={x:v.left,y:v.top};return T.x&&T.y?A:bf(A,T)}}}};function J3(e,t){return!eg(e)||!eg(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function yie(e,t){return!eg(e)||!eg(t)||!J3(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function TA({resource:e,isCollapsed:t,isActive:n,href:r,onClose:i,onReorder:a,index:s,totalCount:o,LinkComponent:c,translations:d={},isDragging:f=!1}){const{attributes:m,listeners:p,setNodeRef:v,transform:b,transition:S,isDragging:x}=gie({id:e.id}),w=k.useRef(a);k.useEffect(()=>{w.current=a});const j={transform:yf.Transform.toString(b),transition:S,opacity:x||f?.5:1},T=p5(e.mediaType),A=x||f,Q=e.storageUri?e.storageUri.replace(/^file:\/\//,""):e.name,C=k.useCallback(R=>{w.current&&R.altKey&&(R.key==="ArrowUp"?(R.preventDefault(),w.current(e.id,"up")):R.key==="ArrowDown"&&(R.preventDefault(),w.current(e.id,"down")))},[e.id]);return g.jsxs("div",{ref:v,style:j,...m,...p,"aria-selected":n,onKeyDown:C,"aria-label":`${e.name}, position ${s!==void 0?s+1:""} of ${o||""}`,className:`semiont-resource-tab ${n?"semiont-resource-tab--active":""} ${A?"semiont-resource-tab--dragging":""}`,role:"tab",children:[g.jsxs(c,{href:r,className:"semiont-resource-tab__link",title:Q,children:[g.jsx("span",{className:"semiont-resource-tab__icon","aria-hidden":"true",children:T}),!t&&g.jsx("span",{className:"semiont-resource-tab__text",children:e.name})]}),!t&&g.jsx("button",{onClick:R=>i(e.id,R),className:"semiont-resource-tab__close",title:d.closeResource||"Close resource","aria-label":`Close ${e.name}`,type:"button",children:g.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",width:"16",height:"16",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}function Sie(){const{announce:e}=Fc(),t=k.useCallback(o=>{e(o,"assertive")},[e]),n=k.useCallback((o,c,d)=>{e(`Picked up ${o}. Position ${c} of ${d}. Use arrow keys to move, space to drop.`,"assertive")},[e]),r=k.useCallback((o,c,d)=>{e(`Dropped ${o} at position ${c} of ${d}.`,"assertive")},[e]),i=k.useCallback((o,c,d,f)=>{e(`Moved ${o} ${c} to position ${d} of ${f}.`,"polite")},[e]),a=k.useCallback((o,c,d,f)=>{e(`${o} moved ${c} to position ${d} of ${f}.`,"assertive")},[e]),s=k.useCallback(o=>{e(`Cannot move ${o}. Already at the ${o==="up"?"top":"bottom"} of the list.`,"polite")},[e]);return{announceReorder:t,announcePickup:n,announceDrop:r,announceMove:i,announceKeyboardReorder:a,announceCannotMove:s}}function Gse({fixedItems:e,resources:t,isCollapsed:n,currentPath:r,LinkComponent:i,onNavigate:a,getResourceHref:s,className:o="",translations:c={},icons:d,navigationMenu:f}){const m=d.chevronLeft,p=d.bars,[v,b]=k.useState(!1),S=k.useRef(null),{announcePickup:x,announceDrop:w,announceKeyboardReorder:j,announceCannotMove:T}=Sie(),A=hn("CollapsibleResourceNavigation"),Q=ot(),C={title:(c==null?void 0:c.title)||A("title"),collapseSidebar:(c==null?void 0:c.collapseSidebar)||A("collapseSidebar"),expandSidebar:(c==null?void 0:c.expandSidebar)||A("expandSidebar"),dragToReorder:(c==null?void 0:c.dragToReorder)||A("dragToReorder"),dragToReorderDoc:(c==null?void 0:c.dragToReorderDoc)||A("dragToReorderDoc"),closeResource:(c==null?void 0:c.closeResource)||A("closeResource"),dragInstructions:(c==null?void 0:c.dragInstructions)||A("dragInstructions")},R=()=>b(!v),D=()=>b(!1);k.useEffect(()=>{const Y=H=>{S.current&&!S.current.contains(H.target)&&D()};if(v)return document.addEventListener("mousedown",Y),()=>document.removeEventListener("mousedown",Y)},[v]);const L=Fne(mA(B_,{activationConstraint:{distance:8}}),mA(I_,{coordinateGetter:bie})),P=k.useCallback((Y,H)=>{const q=t.findIndex(W=>W.id===Y);if(q===-1)return;const I=H==="up"?q-1:q+1;if(I<0||I>=t.length){T(H);return}Q.emit("tabs:reorder",{oldIndex:q,newIndex:I});const ee=t[q];j(ee.name,H,I+1,t.length)},[t,Q]),Z=(Y,H)=>{H.preventDefault(),H.stopPropagation(),Q.emit("tabs:close",{resourceId:Y});const q=s(Y);r===q&&a&&e.length>0&&a(e[0].href)},X=Y=>{const{active:H}=Y,q=t.find(I=>I.id===H.id);if(q){const I=t.indexOf(q);x(q.name,I+1,t.length)}},B=Y=>{const{active:H,over:q}=Y;if(q&&H.id!==q.id){const I=t.findIndex(W=>W.id===H.id),ee=t.findIndex(W=>W.id===q.id);if(I!==-1&&ee!==-1){Q.emit("tabs:reorder",{oldIndex:I,newIndex:ee});const W=t[I];w(W.name,ee+1,t.length)}}};return g.jsxs("div",{className:`semiont-collapsible-nav ${o}`,children:[g.jsx("div",{id:"drag-instructions",className:"sr-only","aria-live":"polite",children:C.dragInstructions}),g.jsx("div",{className:"sr-only",role:"status","aria-atomic":"true",children:"Resources can be reordered using Alt+Up or Alt+Down arrow keys."}),g.jsxs("div",{className:"semiont-collapsible-nav__container",children:[g.jsxs("div",{style:{position:"relative"},ref:f?S:void 0,children:[g.jsxs("div",{className:"semiont-nav-section__header",children:[!n&&f&&g.jsx("button",{onClick:R,className:"semiont-nav-section__header-text","aria-expanded":v,"aria-haspopup":"true",type:"button",children:C.title}),!n&&!f&&g.jsx("span",{className:"semiont-nav-section__header-text",children:C.title}),g.jsx("button",{onClick:()=>Q.emit("shell:sidebar-toggle",void 0),className:"semiont-nav-section__header-icon",title:n?C.expandSidebar:C.collapseSidebar,"aria-label":n?C.expandSidebar:C.collapseSidebar,type:"button",children:n?g.jsx(p,{}):g.jsx(m,{})})]}),v&&f&&!n&&g.jsx("div",{className:"semiont-nav-section__dropdown",children:f(D)})]}),!n&&g.jsx("nav",{className:"semiont-nav-tabs",children:e.map(Y=>{const H=r===Y.href;return g.jsxs(i,{href:Y.href,className:`semiont-nav-tab ${H?"semiont-nav-tab--active":""}`,title:Y.description||Y.name,"aria-current":H?"page":void 0,children:[g.jsx(Y.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"}),g.jsx("span",{className:"semiont-nav-tab__text",children:Y.name})]},Y.href)})}),n&&g.jsx("nav",{className:"semiont-nav-tabs",children:e.map(Y=>{const H=r===Y.href;return g.jsx(i,{href:Y.href,className:`semiont-nav-tab ${H?"semiont-nav-tab--active":""}`,title:Y.description||Y.name,"aria-current":H?"page":void 0,"aria-label":Y.name,children:g.jsx(Y.icon,{className:"semiont-nav-tab__icon","aria-hidden":"true"})},Y.href)})}),g.jsx("div",{className:"semiont-resource-tabs",role:"tablist","aria-label":"Open resources",children:n?t.map(Y=>{const H=s(Y.id),q=r===H;return g.jsx(TA,{resource:Y,isCollapsed:n,isActive:q,href:H,onClose:Z,LinkComponent:i,translations:{dragToReorder:C.dragToReorder,dragToReorderDoc:C.dragToReorderDoc,closeResource:C.closeResource}},Y.id)}):g.jsx(Hre,{sensors:L,collisionDetection:Hne,onDragStart:X,onDragEnd:B,children:g.jsx(cie,{items:t.map(Y=>Y.id),strategy:oie,children:t.map((Y,H)=>{const q=s(Y.id),I=r===q;return g.jsx(TA,{resource:Y,isCollapsed:n,isActive:I,href:q,onClose:Z,onReorder:P,index:H,totalCount:t.length,LinkComponent:i,translations:{dragToReorder:C.dragToReorder,dragToReorderDoc:C.dragToReorderDoc,closeResource:C.closeResource}},Y.id)})})})})]})]})}function ez({context:e,translations:t}){const n=e.graphContext,r=(n==null?void 0:n.connections)??[],i=(n==null?void 0:n.citedBy)??[],a=(n==null?void 0:n.citedByCount)??0;return g.jsx(g.Fragment,{children:n&&(r.length>0||a>0)&&g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[r.length>0&&g.jsxs("div",{children:[g.jsx("div",{style:{fontSize:"var(--semiont-text-xs)",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--semiont-text-tertiary)",marginBottom:"0.375rem"},children:t.connectionsLabel}),g.jsx("ul",{style:{display:"flex",flexDirection:"column",gap:"0.375rem",listStyle:"none",padding:0,margin:0},children:r.map(s=>g.jsxs("li",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.375rem",fontSize:"var(--semiont-text-sm)"},children:[g.jsx("span",{style:{color:"var(--semiont-text-primary)",fontWeight:500},children:s.resourceName}),s.bidirectional&&g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem"},children:"mutual"}),s.entityTypes&&s.entityTypes.map(o=>g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem"},children:o},o))]},s.resourceId))})]}),a>0&&g.jsxs("div",{children:[g.jsxs("div",{style:{fontSize:"var(--semiont-text-xs)",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--semiont-text-tertiary)",marginBottom:"0.375rem"},children:[t.citedByLabel," (",a,")"]}),i.length>0&&g.jsx("ul",{style:{display:"flex",flexDirection:"column",gap:"0.25rem",listStyle:"none",padding:0,margin:0},children:i.map(s=>g.jsx("li",{style:{fontSize:"var(--semiont-text-sm)",color:"var(--semiont-text-primary)",fontWeight:500},children:s.resourceName},s.resourceId))})]})]})})}function xie({context:e,contextLoading:t,contextError:n,userHint:r,onUserHintChange:i,onBind:a,onGenerate:s,onCompose:o,translations:c}){var b,S,x;const[d,f]=k.useState(!1),m=!t&&!n&&!!e,p=e==null?void 0:e.sourceContext,v=k.useRef(null);return k.useEffect(()=>{v.current&&v.current.scrollIntoView({block:"center",behavior:"instant"})},[e]),g.jsxs("div",{className:"semiont-gather__outer",children:[t&&g.jsxs("div",{className:"semiont-gather__loading",children:[g.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[g.jsx("span",{className:"semiont-gather__loading-dot"}),g.jsx("span",{className:"semiont-gather__loading-dot"}),g.jsx("span",{className:"semiont-gather__loading-dot"})]}),g.jsx("span",{className:"semiont-gather__loading-text",children:c.loadingContext})]}),!!n&&g.jsx("div",{style:{textAlign:"center",padding:"1rem 0",color:"var(--semiont-color-red-600)"},children:c.failedContext}),e&&g.jsxs(g.Fragment,{children:[p&&g.jsxs("div",{className:"semiont-gather__source-strip",children:[g.jsxs("label",{className:"semiont-form__label",style:{marginBottom:"0.375rem"},children:[c.sourceContextLabel,(b=e.sourceResource)!=null&&b.name?` "${e.sourceResource.name}"`:""]}),g.jsxs("div",{className:`semiont-gather__source-box${d?" semiont-gather__source-box--expanded":""}`,children:[g.jsx("div",{className:"semiont-gather__source-context",children:g.jsxs("div",{style:{fontSize:"var(--semiont-text-sm)",fontFamily:"monospace",whiteSpace:"pre-wrap",color:"var(--semiont-text-secondary)"},children:[p.before&&g.jsx("span",{children:p.before}),g.jsx("span",{ref:v,style:{backgroundColor:"var(--semiont-color-primary-100)",padding:"0 0.25rem",fontWeight:600,color:"var(--semiont-color-primary-900)"},children:p.selected}),(((S=e.metadata)==null?void 0:S.entityTypes)??[]).map(w=>g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem",fontWeight:400,verticalAlign:"middle",marginLeft:"0.25rem"},children:w},w)),((x=e.annotation)==null?void 0:x.motivation)&&g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.375rem",fontWeight:400,verticalAlign:"middle",marginLeft:"0.25rem"},children:e.annotation.motivation}),p.after&&g.jsx("span",{children:p.after})]})}),g.jsx("button",{type:"button",className:"semiont-gather__expand-btn",onClick:()=>f(w=>!w),children:d?"▲ less":"▼ more"})]})]}),g.jsxs("div",{className:"semiont-gather__body",children:[g.jsx("div",{className:"semiont-gather__left",children:g.jsx(ez,{context:e,translations:c})}),g.jsx("div",{className:"semiont-gather__right",children:g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{className:"semiont-form__label",children:c.userHintLabel}),g.jsx("textarea",{value:r,onChange:w=>i(w.target.value),placeholder:c.userHintPlaceholder,className:"semiont-search-modal__search-input semiont-gather__hint-textarea",style:{resize:"vertical",fontFamily:"inherit"}})]})})]}),g.jsxs("div",{className:"semiont-gather__footer",children:[g.jsx("div",{className:"semiont-gather__footer-label",children:c.resolutionStrategyLabel}),g.jsxs("div",{className:"semiont-gather__actions",children:[g.jsxs("button",{type:"button",onClick:a,disabled:!m,className:"semiont-button--primary semiont-button--flex",children:["🔍 ",c.search,"…"]}),g.jsxs("button",{type:"button",onClick:s,disabled:!m,className:"semiont-button--primary semiont-button--flex",children:["✨ ",c.generate,"…"]}),g.jsxs("button",{type:"button",onClick:o,disabled:!m,className:"semiont-button--secondary semiont-button--flex",children:["✍️ ",c.compose]})]})]})]})]})}function _ie({defaultTitle:e,locale:t,context:n,onBack:r,onCancel:i,onGenerate:a,translations:s}){const[o,c]=k.useState(e),[d,f]=k.useState(""),[m,p]=k.useState(""),[v,b]=k.useState(t),[S,x]=k.useState(.7),[w,j]=k.useState(500),T=A=>{A.preventDefault();const Q=m.trim();a({title:o,storagePath:`file://${d}`,...Q?{prompt:Q}:{},language:v,temperature:S,maxTokens:w,context:n})};return g.jsxs("form",{onSubmit:T,className:"semiont-form semiont-form--scrollable",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-title",className:"semiont-form__label",children:s.resourceTitle}),g.jsx("input",{id:"wizard-title",type:"text",value:o,onChange:A=>c(A.target.value),required:!0,className:"semiont-input",placeholder:s.resourceTitlePlaceholder})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-storagePath",className:"semiont-form__label",children:"Save location"}),g.jsxs("div",{className:"semiont-input-addon",children:[g.jsx("span",{className:"semiont-input-addon__prefix",children:"file://"}),g.jsx("input",{id:"wizard-storagePath",type:"text",value:d,onChange:A=>f(A.target.value),required:!0,className:"semiont-input semiont-input--addon",placeholder:"generated/my-resource.md"})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-prompt",className:"semiont-form__label",children:s.additionalInstructions}),g.jsx("textarea",{id:"wizard-prompt",value:m,onChange:A=>p(A.target.value),rows:2,className:"semiont-textarea",placeholder:s.additionalInstructionsPlaceholder})]}),g.jsxs("div",{className:"semiont-form__inline-row",children:[g.jsxs("div",{className:"semiont-form__field semiont-form__field--inline",children:[g.jsx("label",{htmlFor:"wizard-language",className:"semiont-form__label",children:s.language}),g.jsx("select",{id:"wizard-language",value:v,onChange:A=>b(A.target.value),className:"semiont-select",children:mc.map(A=>g.jsx("option",{value:A.code,children:A.nativeName},A.code))})]}),g.jsxs("div",{className:"semiont-form__field semiont-form__field--inline semiont-form__field--grow",children:[g.jsxs("label",{htmlFor:"wizard-temperature",className:"semiont-form__label",children:[s.creativity," (",S.toFixed(1),")"]}),g.jsx("input",{id:"wizard-temperature",type:"range",min:"0",max:"1",step:"0.1",value:S,onChange:A=>x(parseFloat(A.target.value)),className:"semiont-slider"}),g.jsxs("div",{className:"semiont-slider__labels semiont-slider__labels--small",children:[g.jsx("span",{children:s.creativityFocused}),g.jsx("span",{children:s.creativityCreative})]})]}),g.jsxs("div",{className:"semiont-form__field semiont-form__field--inline semiont-form__field--narrow",children:[g.jsx("label",{htmlFor:"wizard-maxTokens",className:"semiont-form__label",children:s.maxLength}),g.jsx("input",{id:"wizard-maxTokens",type:"number",min:"100",max:"4000",step:"100",value:w,onChange:A=>j(parseInt(A.target.value)),className:"semiont-input"})]})]}),g.jsxs("div",{className:"semiont-modal__actions",style:{paddingTop:"0.5rem"},children:[g.jsxs("button",{type:"button",onClick:i,className:"semiont-button--secondary semiont-button--flex",children:["✕ ",s.cancel]}),g.jsxs("button",{type:"button",onClick:r,className:"semiont-button--secondary semiont-button--flex",children:["◀ ",s.back]}),g.jsxs("button",{type:"submit",className:"semiont-button--primary semiont-button--flex",children:["✨ ",s.generate]})]})]})}function wie({isSearching:e=!1,onBack:t,onCancel:n,onSearch:r,translations:i}){const[a,s]=k.useState(10),[o,c]=k.useState(!0),d=f=>{f.preventDefault(),r({limit:a,useSemanticScoring:o})};return g.jsxs("form",{onSubmit:d,className:"semiont-form",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"wizard-limit",className:"semiont-form__label",children:i.maxResults}),g.jsxs("select",{id:"wizard-limit",value:a,onChange:f=>s(parseInt(f.target.value)),className:"semiont-select",children:[g.jsx("option",{value:1,children:"1"}),g.jsx("option",{value:5,children:"5"}),g.jsx("option",{value:10,children:"10"}),g.jsx("option",{value:20,children:"20"})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsxs("label",{className:"semiont-form__label",style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[g.jsx("input",{type:"checkbox",checked:o,onChange:f=>c(f.target.checked)}),i.semanticScoring]}),g.jsx("p",{className:"semiont-form__help",children:i.semanticScoringHelp})]}),g.jsxs("div",{className:"semiont-modal__actions",style:{paddingTop:"0.5rem"},children:[g.jsxs("button",{type:"button",onClick:n,className:"semiont-button--secondary semiont-button--flex",disabled:e,children:["✕ ",i.cancel]}),g.jsxs("button",{type:"button",onClick:t,className:"semiont-button--secondary semiont-button--flex",disabled:e,children:["◀ ",i.back]}),g.jsx("button",{type:"submit",className:"semiont-button--primary semiont-button--flex",disabled:e,"data-generating":e?"true":"false",children:e?`✨ ${i.searching}`:`🔍 ${i.search}`})]})]})}function kie({results:e,context:t,onLink:n,onBack:r,onCancel:i,translations:a}){return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"semiont-search-results__two-pane",children:[g.jsx("div",{className:"semiont-search-results__context-pane",children:g.jsx(ez,{context:t,translations:a})}),g.jsx("div",{className:"semiont-search-results__results-pane",children:e.length===0?g.jsx("div",{className:"semiont-modal__empty-state",style:{textAlign:"center",padding:"2rem 0"},children:a.noResults}):e.map(s=>{const o=s["@id"];return g.jsxs("div",{style:{padding:"0.75rem",borderBottom:"1px solid var(--semiont-border-primary)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"0.75rem"},children:[g.jsxs("div",{style:{flex:1,minWidth:0},children:[g.jsx("div",{style:{fontWeight:500,color:"var(--semiont-text-primary)"},children:s.name}),s.description&&g.jsx("div",{style:{fontSize:"var(--semiont-text-sm)",color:"var(--semiont-text-secondary)",marginTop:"0.25rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.description}),g.jsxs("div",{style:{fontSize:"var(--semiont-text-xs)",color:"var(--semiont-text-tertiary)",marginTop:"0.25rem",display:"flex",gap:"0.5rem"},children:[s.score!==void 0&&g.jsxs("span",{children:[a.score,": ",s.score]}),s.matchReason&&g.jsx("span",{children:s.matchReason})]})]}),g.jsxs("button",{type:"button",onClick:()=>n(o),className:"semiont-button--primary",style:{flexShrink:0},children:["🔗 ",a.link]})]},o)})})]}),g.jsxs("div",{className:"semiont-modal__actions",style:{paddingTop:"0.5rem"},children:[g.jsxs("button",{type:"button",onClick:i,className:"semiont-button--secondary semiont-button--flex",children:["✕ ",a.cancel]}),g.jsxs("button",{type:"button",onClick:r,className:"semiont-button--secondary semiont-button--flex",children:["◀ ",a.back]})]})]})}function jie({isOpen:e,onClose:t,annotationId:n,resourceId:r,defaultTitle:i,entityTypes:a,locale:s,context:o,contextLoading:c,contextError:d,onGenerateSubmit:f,onLinkResource:m,onComposeNavigate:p,translations:v}){const b=Me(ot().activeSession$),[S,x]=k.useState({step:"gather"}),[w,j]=k.useState(!1),[T,A]=k.useState("");k.useEffect(()=>{e&&(x({step:"gather"}),j(!1),A(""))},[e]),dV("match:search-results",B=>{e&&n&&B.referenceId===n&&(j(!1),x({step:"search-results",results:B.response}))});const Q=k.useCallback(()=>{x({step:"configure-search"})},[]),C=k.useCallback(()=>{x({step:"configure-generation"})},[]),R=k.useCallback(()=>{if(!o||!n||!r)return;const B=T?{...o,userHint:T}:o;p(B,n,r,i,a),t()},[o,n,r,i,a,p,t,T]),D=k.useCallback(()=>{x({step:"gather"})},[]),L=k.useCallback(B=>{if(!n||!o||!r)return;j(!0);const Y=T?{...o,userHint:T}:o;b==null||b.client.match.requestSearch({correlationId:crypto.randomUUID(),resourceId:r,referenceId:n,context:Y,limit:B.limit,useSemanticScoring:B.useSemanticScoring})},[n,r,o,b,T]),P=k.useCallback(B=>{n&&(f(n,B),t())},[n,f,t]),Z=k.useCallback(B=>{n&&(m(n,B),t())},[n,m,t]),X=S.step==="gather"?v.gatherTitle:S.step==="configure-generation"?v.configureGenerationTitle:S.step==="configure-search"?v.configureSearchTitle:v.searchResultsTitle;return g.jsx(gl,{appear:!0,show:e,children:g.jsxs(Wc,{as:"div",className:"semiont-search-modal",onClose:t,children:[g.jsx(ur,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-search-modal__backdrop"})}),g.jsx("div",{className:"semiont-search-modal__wrapper",children:g.jsx("div",{className:"semiont-search-modal__centering semiont-search-modal__centering--center",children:g.jsx(ur,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(vl,{className:`semiont-search-modal__panel semiont-search-modal__panel--with-border${S.step==="search-results"?" semiont-search-modal__panel--wide":""}${S.step==="gather"?" semiont-search-modal__panel--gather":""}`,children:[g.jsxs("div",{className:"semiont-search-modal__header",children:[g.jsx(Uf,{className:"semiont-search-modal__title",children:X}),g.jsx("button",{onClick:t,className:"semiont-search-modal__close-button","aria-label":"Close",children:"✕"})]}),S.step==="gather"&&g.jsx(xie,{context:o,contextLoading:c,contextError:d,userHint:T,onUserHintChange:A,onBind:Q,onGenerate:C,onCompose:R,translations:{title:v.gatherTitle,sourceContextLabel:v.sourceContextLabel,connectionsLabel:v.connectionsLabel,citedByLabel:v.citedByLabel,userHintLabel:v.userHintLabel,userHintPlaceholder:v.userHintPlaceholder,loadingContext:v.loadingContext,failedContext:v.failedContext,search:v.search,generate:v.generate,compose:v.compose,resolutionStrategyLabel:v.resolutionStrategyLabel}}),S.step==="configure-generation"&&o&&g.jsx(_ie,{defaultTitle:i,locale:s,context:o,onBack:D,onCancel:t,onGenerate:P,translations:{resourceTitle:v.resourceTitle,resourceTitlePlaceholder:v.resourceTitlePlaceholder,additionalInstructions:v.additionalInstructions,additionalInstructionsPlaceholder:v.additionalInstructionsPlaceholder,language:v.language,languageHelp:v.languageHelp,creativity:v.creativity,creativityFocused:v.creativityFocused,creativityCreative:v.creativityCreative,maxLength:v.maxLength,maxLengthHelp:v.maxLengthHelp,cancel:v.cancel,back:v.back,generate:v.generate}}),S.step==="configure-search"&&g.jsx(wie,{isSearching:w,onBack:D,onCancel:t,onSearch:L,translations:{maxResults:v.maxResults,semanticScoring:v.semanticScoring,semanticScoringHelp:v.semanticScoringHelp,cancel:v.cancel,back:v.back,search:v.search,searching:v.searching}}),S.step==="search-results"&&o&&g.jsx(kie,{results:S.results,context:o,onLink:Z,onBack:D,onCancel:t,translations:{noResults:v.noResults,link:v.link,back:v.back,cancel:v.cancel,score:v.score,sourceContextLabel:v.sourceContextLabel,connectionsLabel:v.connectionsLabel,citedByLabel:v.citedByLabel,userHintLabel:v.userHintLabel,userHintPlaceholder:v.userHintPlaceholder}})]})})})})]})})}var Tie=Kn(jx());function Eie(){const{announce:e}=Fc(),t=k.useCallback(()=>{e("Searching...","polite")},[e]),n=k.useCallback((a,s)=>{e(a===0?`No results found for ${s}`:a===1?`1 result found for ${s}`:`${a} results found for ${s}`,"polite")},[e]),r=k.useCallback((a,s)=>{e(`Selected ${s}: ${a}. Press Enter to navigate.`,"polite")},[e]),i=k.useCallback((a,s)=>{e(`Navigating to ${s}: ${a}`,"assertive")},[e]);return{announceSearching:t,announceSearchResults:n,announceSelection:r,announceNavigation:i}}var Cie=300,Aie=5;function Kse({isOpen:e,onClose:t,onNavigate:n,translations:r={}}){var j;const{announceSearchResults:i,announceSearching:a}=Eie(),s=(j=Me(ot().activeSession$))==null?void 0:j.client,o=k.useRef(s);o.current=s;const[c,d]=k.useState(0),f={placeholder:r.placeholder||"Search resources, entities...",searching:r.searching||"Searching...",noResults:r.noResults||"No results found for",startTyping:r.startTyping||"Start typing to search...",navigate:r.navigate||"Navigate",select:r.select||"Select",close:r.close||"Close",enter:r.enter||"Enter",esc:r.esc||"ESC"},[m]=k.useState(()=>fQ(T=>o.current.browse.resources({search:T,limit:Aie}).pipe((0,Tie.map)(A=>{if(A!==void 0)return A.map(Q=>{var R;const C=Ry(Q);return C?{type:"resource",id:C,name:Q.name,content:(R=Q.content)==null?void 0:R.substring(0,150)}:null}).filter(Q=>Q!==null)})),{debounceMs:Cie}));k.useEffect(()=>()=>m.dispose(),[m]);const p=Me(m.query$)??"",v=Me(m.state$),b=(v==null?void 0:v.results)??[],S=(v==null?void 0:v.isSearching)??!1;k.useEffect(()=>{e&&(m.setQuery(""),d(0))},[e,m]),k.useEffect(()=>{d(0)},[b.length]),k.useEffect(()=>{p.trim()&&(S?a():i(b.length,p))},[S,b.length]);const x=T=>{T.key==="ArrowDown"?(T.preventDefault(),d(A=>(A+1)%Math.max(1,b.length))):T.key==="ArrowUp"?(T.preventDefault(),d(A=>(A-1+Math.max(1,b.length))%Math.max(1,b.length))):T.key==="Enter"&&b[c]&&(T.preventDefault(),w(b[c]))},w=T=>{t(),n(T.type,T.id)};return g.jsx(gl,{appear:!0,show:e,children:g.jsxs(Wc,{as:"div",className:"semiont-search-modal",onClose:t,children:[g.jsx(ur,{enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:g.jsx("div",{className:"semiont-search-modal__backdrop"})}),g.jsx("div",{className:"semiont-search-modal__wrapper",children:g.jsx("div",{className:"semiont-search-modal__centering",children:g.jsx(ur,{enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:g.jsxs(vl,{className:"semiont-search-modal__panel",children:[g.jsxs("div",{className:"semiont-search-modal__input-container",children:[g.jsx("div",{className:"semiont-search-modal__search-icon-wrapper",children:g.jsx("svg",{className:"semiont-search-modal__search-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),g.jsx("input",{type:"text",value:p,onChange:T=>m.setQuery(T.target.value),onKeyDown:x,placeholder:f.placeholder,className:"semiont-search-modal__input",autoFocus:!0}),g.jsx("div",{className:"semiont-search-modal__esc-wrapper",children:g.jsx("kbd",{className:"semiont-search-modal__kbd",children:f.esc})})]}),g.jsxs("div",{className:"semiont-search-modal__results",children:[S&&g.jsx("div",{className:"semiont-search-modal__empty",children:f.searching}),!S&&p&&b.length===0&&g.jsxs("div",{className:"semiont-search-modal__empty",children:[f.noResults,' "',p,'"']}),!S&&b.length>0&&g.jsx("div",{className:"semiont-search-modal__results-list",children:b.map((T,A)=>g.jsxs("button",{onClick:()=>w(T),onMouseEnter:()=>d(A),className:`semiont-search-modal__result ${A===c?"semiont-search-modal__result--selected":""}`,children:[g.jsx("div",{className:"semiont-search-modal__result-icon-wrapper",children:T.type==="resource"?g.jsx("svg",{className:"semiont-search-modal__result-icon semiont-search-modal__result-icon--resource",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}):g.jsx("svg",{className:"semiont-search-modal__result-icon semiont-search-modal__result-icon--entity",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"})})}),g.jsxs("div",{className:"semiont-search-modal__result-content",children:[g.jsxs("div",{className:"semiont-search-modal__result-header",children:[g.jsx("span",{className:"semiont-search-modal__result-name",children:T.name}),T.type==="entity"&&T.entityType&&g.jsx("span",{className:"semiont-search-modal__result-badge",children:T.entityType})]}),T.content&&g.jsx("p",{className:"semiont-search-modal__result-description",children:T.content})]}),A===c&&g.jsx("div",{className:"semiont-search-modal__result-action",children:g.jsx("kbd",{className:"semiont-search-modal__kbd",children:f.enter})})]},`${T.type}-${T.id}`))}),!S&&!p&&g.jsxs("div",{className:"semiont-search-modal__help",children:[g.jsx("div",{className:"semiont-search-modal__help-text",children:f.startTyping}),g.jsxs("div",{className:"semiont-search-modal__shortcuts",children:[g.jsxs("div",{className:"semiont-search-modal__shortcut",children:[g.jsx("kbd",{className:"semiont-search-modal__kbd semiont-search-modal__kbd--small",children:"↑↓"}),f.navigate]}),g.jsxs("div",{className:"semiont-search-modal__shortcut",children:[g.jsx("kbd",{className:"semiont-search-modal__kbd semiont-search-modal__kbd--small",children:f.enter}),f.select]}),g.jsxs("div",{className:"semiont-search-modal__shortcut",children:[g.jsx("kbd",{className:"semiont-search-modal__kbd semiont-search-modal__kbd--small",children:"Esc"}),f.close]})]})]})]})]})})})})]})})}Kn(jx());function Pie(){return g.jsx("div",{className:"semiont-skip-links",children:g.jsxs("div",{className:"semiont-skip-links-container",children:[g.jsx("a",{href:"#main-content",className:"semiont-skip-link semiont-skip-link-first",children:"Skip to main content"}),g.jsx("a",{href:"#main-navigation",className:"semiont-skip-link",children:"Skip to navigation"}),g.jsx("a",{href:"#search",className:"semiont-skip-link semiont-skip-link-last",children:"Skip to search"})]})})}function Jse({isFullyAuthenticated:e=!1,isAuthenticated:t=!1,hasValidBackendToken:n=!1}){var p;const r=(p=Me(ot().activeSession$))==null?void 0:p.client,[i,a]=k.useState(null),[s,o]=k.useState(!0),[c,d]=k.useState(null);k.useEffect(()=>{if(!r){o(!1);return}const v=()=>{r.admin.status().then(S=>{a(S),d(null),o(!1)}).catch(S=>{d(S instanceof Error?S:new Error(String(S))),o(!1)})};v();const b=setInterval(v,3e4);return()=>clearInterval(b)},[r]);const f=()=>{if(t&&!n)return"🚀 Frontend Status: Ready • Backend: Please sign out and sign in again to reconnect";if(!e)return"🚀 Frontend Status: Ready • Backend: Authentication required";if(i)return`🚀 Frontend Status: Ready • Backend: ${i.status} (v${i.version})`;if(s)return"🚀 Frontend Status: Ready • Backend: Connecting...";if(c){const v=c.message;return v.includes("401")||v.includes("Unauthorized")?"🚀 Frontend Status: Ready • Backend: Please sign out and sign in again":"🚀 Frontend Status: Ready • Backend: Connection failed"}return"🚀 Frontend Status: Ready • Backend: Unknown"},m=()=>t&&!n?"warning":e?i?"success":s?"loading":"error":"info";return g.jsxs("section",{className:"semiont-status-display","data-status":m(),role:"status","aria-live":"polite","aria-label":"System status information",children:[g.jsxs("p",{className:"semiont-status-message",children:[g.jsx("span",{className:"sr-only",children:"System status: "}),f()]}),e?c?g.jsxs("p",{className:"semiont-status-hint semiont-status-error-hint",role:"alert",children:[g.jsx("span",{className:"sr-only",children:"Error: "}),"Check that the backend server is running and accessible"]}):null:g.jsx("p",{className:"semiont-status-hint",children:"Sign in to view backend status"})]})}function tg({t:e,className:t="",size:n="lg",showTagline:r=!0,animated:i=!0,compactTagline:a=!1}){return g.jsxs("div",{className:`semiont-branding ${t}`,"data-size":n,"data-animated":i,"data-compact-tagline":a,children:[g.jsx("h1",{className:"semiont-branding-title",children:g.jsx("span",{className:"semiont-branding-text",children:"Semiont"})}),r&&g.jsx("h2",{className:"semiont-branding-tagline",children:e("tagline")})]})}function Qie({Link:e,routes:t,t:n,tHome:r,showBranding:i=!0,brandingLink:a="/",variant:s="standalone",isAuthenticated:o=!1,isAdmin:c=!1,isModerator:d=!1,currentPath:f}){const{isOpen:m,toggle:p,close:v,dropdownRef:b}=cV();if(s==="floating"&&i)return g.jsxs("div",{className:"semiont-unified-header semiont-unified-header--floating","data-variant":"floating",ref:b,children:[g.jsx("button",{onClick:p,className:"semiont-unified-header__branding-button","aria-label":"Navigation menu","aria-expanded":m,"aria-controls":"nav-menu-dropdown-1","aria-haspopup":"true",id:"nav-menu-button-1",children:g.jsx(tg,{t:r,size:"sm",showTagline:!0,animated:!1,compactTagline:!0,className:"semiont-unified-header__branding"})}),m&&o&&g.jsx("div",{id:"nav-menu-dropdown-1",className:"semiont-unified-header__dropdown",role:"menu","aria-orientation":"vertical","aria-labelledby":"nav-menu-button-1",children:g.jsx(xS,{Link:e,routes:t,t:n,isAdmin:c,isModerator:d,brandingLink:a,onItemClick:v,currentPath:f})})]});const S=g.jsxs("div",{className:"semiont-unified-header__content","data-variant":s,children:[i?g.jsxs("div",{className:"semiont-unified-header__branding-wrapper",ref:b,children:[g.jsx("button",{onClick:p,className:"semiont-unified-header__branding-button","aria-label":"Navigation menu","aria-expanded":m,"aria-controls":"nav-menu-dropdown-2","aria-haspopup":"true",id:"nav-menu-button-2",children:g.jsx(tg,{t:r,size:"sm",showTagline:!0,animated:!1,compactTagline:!0,className:"semiont-unified-header__branding"})}),m&&o&&g.jsx("div",{id:"nav-menu-dropdown-2",className:"semiont-unified-header__dropdown",role:"menu","aria-orientation":"vertical","aria-labelledby":"nav-menu-button-2",children:g.jsx(xS,{Link:e,routes:t,t:n,isAdmin:c,isModerator:d,brandingLink:a,onItemClick:v,currentPath:f})})]}):g.jsx("div",{}),g.jsx("div",{className:"semiont-unified-header__actions","data-variant":s})]});return s==="standalone"?g.jsx("header",{className:"semiont-unified-header semiont-unified-header--standalone","data-variant":"standalone",children:g.jsx("div",{className:"semiont-unified-header__container",children:S})}):S}function eoe({Link:e,routes:t,t:n,tHome:r,children:i,brandingLink:a="/",collapsible:s=!1,storageKey:o="leftSidebarCollapsed",isAdmin:c=!1,isModerator:d=!1,currentPath:f}){const[m,p]=k.useState(!1),{width:v,setWidth:b,minWidth:S,maxWidth:x}=oV({defaultWidth:256,minWidth:192,maxWidth:400,storageKey:"semiont-left-sidebar-width"});k.useEffect(()=>{s&&localStorage.getItem(o)==="true"&&p(!0)},[s,o]);const w=()=>{if(!s)return;const T=!m;p(T),localStorage.setItem(o,T.toString())},j=T=>g.jsx(xS,{Link:e,routes:t,t:n,isAdmin:c,isModerator:d,brandingLink:a,onItemClick:T,currentPath:f});return g.jsxs("aside",{className:"semiont-left-sidebar","data-collapsed":m,style:m?void 0:{width:`${v}px`,position:"relative"},children:[!m&&g.jsx(mF,{onResize:b,minWidth:S,maxWidth:x,position:"right",ariaLabel:"Resize left sidebar"}),g.jsx("div",{className:"semiont-left-sidebar__header","data-collapsed":m,children:g.jsx(e,{href:a,className:"semiont-left-sidebar__branding-button","aria-label":"Go to home page",children:m?g.jsx("div",{className:"semiont-left-sidebar__logo-collapsed",children:g.jsx("span",{className:"semiont-left-sidebar__logo-text",children:"S"})}):g.jsx(tg,{t:r,size:"sm",showTagline:!1,animated:!1,className:""})})}),g.jsx("nav",{role:"navigation","aria-label":"Main navigation",id:"main-navigation",className:"semiont-left-sidebar__content",children:typeof i=="function"?i(m,w,j):i})]})}function toe({Link:e,routes:t,t:n,tNav:r,tHome:i,children:a,className:s="",showAuthLinks:o=!0,CookiePreferences:c,onOpenKeyboardHelp:d}){return g.jsxs("div",{className:"semiont-page-layout",children:[g.jsx(Pie,{}),g.jsx("header",{role:"banner",className:"semiont-page-layout__header",children:g.jsx("div",{className:"semiont-page-layout__header-container",children:g.jsx(Qie,{Link:e,routes:t,t:r,tHome:i,showAuthLinks:o,brandingLink:"/",variant:"embedded"})})}),g.jsx("main",{role:"main",id:"main-content",tabIndex:-1,className:`semiont-page-layout__main ${s}`,children:a}),g.jsx(Nne,{Link:e,routes:t,t:n,...c&&{CookiePreferences:c},...d&&{onOpenKeyboardHelp:d}})]})}var ii={colors:{primary:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#0080ff",600:"#0066cc",700:"#0052a3",800:"#1e40af",900:"#1e3a8a"},secondary:{50:"#f0fffe",100:"#e0fffd",200:"#b3fffa",300:"#66fff6",400:"#1afff1",500:"#00ffff",600:"#00cccc",700:"#00a3a3",800:"#007a7a",900:"#005252"},semantic:{error:"#ef4444",errorLight:"#fca5a5",errorDark:"#b91c1c",warning:"#f59e0b",warningLight:"#fcd34d",warningDark:"#d97706",success:"#10b981",successLight:"#6ee7b7",successDark:"#047857",info:"#3b82f6",infoLight:"#93c5fd",infoDark:"#1d4ed8"},neutral:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",1e3:"#000000"}},spacing:{0:"0",xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"2.5rem","3xl":"3rem","4xl":"4rem","5xl":"5rem"},typography:{fontFamily:{sans:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',mono:'JetBrains Mono, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem"},fontWeight:{thin:100,light:300,normal:400,medium:500,semibold:600,bold:700,black:900}},borderRadius:{none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},shadows:{none:"none",xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",base:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",md:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",lg:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",xl:"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},transitions:{duration:{fast:"150ms",base:"250ms",slow:"350ms",slower:"500ms"}}};function Nie(){const e=[":root {"];return Object.entries(ii.colors.primary).forEach(([t,n])=>{e.push(` --semiont-color-primary-${t}: ${n};`)}),Object.entries(ii.colors.secondary).forEach(([t,n])=>{e.push(` --semiont-color-secondary-${t}: ${n};`)}),Object.entries(ii.colors.semantic).forEach(([t,n])=>{e.push(` --semiont-color-${t.toLowerCase().replace(/([A-Z])/g,"-$1").toLowerCase()}: ${n};`)}),Object.entries(ii.colors.neutral).forEach(([t,n])=>{e.push(` --semiont-color-neutral-${t}: ${n};`)}),Object.entries(ii.spacing).forEach(([t,n])=>{e.push(` --semiont-spacing-${t}: ${n};`)}),Object.entries(ii.typography.fontSize).forEach(([t,n])=>{e.push(` --semiont-text-${t}: ${n};`)}),Object.entries(ii.typography.fontWeight).forEach(([t,n])=>{e.push(` --semiont-font-${t}: ${n};`)}),e.push(` --semiont-font-sans: ${ii.typography.fontFamily.sans};`),e.push(` --semiont-font-mono: ${ii.typography.fontFamily.mono};`),Object.entries(ii.borderRadius).forEach(([t,n])=>{e.push(` --semiont-radius-${t}: ${n};`)}),Object.entries(ii.shadows).forEach(([t,n])=>{e.push(` --semiont-shadow-${t}: ${n};`)}),Object.entries(ii.transitions.duration).forEach(([t,n])=>{e.push(` --semiont-duration-${t}: ${n};`)}),e.push("}"),e.join(`
168
- `)}Nie();function noe({message:e}){return g.jsx("div",{className:"semiont-loading-state-wrapper",children:g.jsx("div",{className:"semiont-loading-state semiont-loading-state-compose",children:g.jsx("p",{className:"semiont-loading-message",children:e})})})}function roe(){return g.jsx("div",{className:"semiont-loading-state semiont-loading-state-resource",children:g.jsx("p",{className:"semiont-loading-message",children:"Loading resource..."})})}function Rie({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5"}))}var Mie=k.forwardRef(Rie),Lie=Mie;function Die({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}var zie=k.forwardRef(Die),Iie=zie;function qie({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}var Bie=k.forwardRef(qie),Xie=Bie;function Zie({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z"}))}var $ie=k.forwardRef(Zie),Vie=$ie;function Uie({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}var Yie=k.forwardRef(Uie),Fie=Yie;function Wie({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}var Hie=k.forwardRef(Wie),Gie=Hie;function Kie({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}var Jie=k.forwardRef(Kie),eae=Jie;function tae({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}var nae=k.forwardRef(tae),rae=nae;function iae({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"}))}var aae=k.forwardRef(iae),tz=aae;function sae({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}var oae=k.forwardRef(sae),lae=oae;function cae({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}var uae=k.forwardRef(cae),dae=uae;function fae({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}var hae=k.forwardRef(fae),nz=hae;function mae({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v17.25m0 0c-1.472 0-2.882.265-4.185.75M12 20.25c1.472 0 2.882.265 4.185.75M18.75 4.97A48.416 48.416 0 0 0 12 4.5c-2.291 0-4.545.16-6.75.47m13.5 0c1.01.143 2.01.317 3 .52m-3-.52 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.988 5.988 0 0 1-2.031.352 5.988 5.988 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L18.75 4.971Zm-16.5.52c.99-.203 1.99-.377 3-.52m0 0 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.989 5.989 0 0 1-2.031.352 5.989 5.989 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L5.25 4.971Z"}))}var pae=k.forwardRef(mae),gae=pae;function vae({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"}))}var Oae=k.forwardRef(vae),X_=Oae;function bae({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z"}),k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6Z"}))}var yae=k.forwardRef(bae),Sae=yae;function xae({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}var _ae=k.forwardRef(xae),wae=_ae;function kae({title:e,titleId:t,...n},r){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?k.createElement("title",{id:t},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}var jae=k.forwardRef(kae),ES=jae,wy=Kn(zi()),ga=["knowledge-base","user","settings"],Tae={linking:"reference",commenting:"comment",tagging:"tag",highlighting:"highlight",assessing:"assessment"},Eae=0;function Cae(e,t){const n=[],r=new wy.BehaviorSubject((t==null?void 0:t.initialPanel)??null),i=new wy.BehaviorSubject(null),a=new wy.BehaviorSubject(null);if(t!=null&&t.onPanelChange){const s=t.onPanelChange;n.push(r.subscribe(s))}return n.push(e.stream("panel:toggle").subscribe(({panel:s})=>{const o=r.getValue();r.next(o===s?null:s)})),n.push(e.stream("panel:open").subscribe(({panel:s,scrollToAnnotationId:o,motivation:c})=>{if(o&&i.next(o),c){const d=Tae[c]||"highlight";a.next({tab:d,generation:++Eae})}r.next(s)})),n.push(e.stream("panel:close").subscribe(()=>{r.next(null)})),{activePanel$:r.asObservable(),scrollToAnnotationId$:i.asObservable(),panelInitialTab$:a.asObservable(),openPanel:s=>e.emit("panel:open",{panel:s}),closePanel:()=>e.emit("panel:close",void 0),togglePanel:s=>e.emit("panel:toggle",{panel:s}),onScrollCompleted:()=>i.next(null),dispose(){n.forEach(s=>s.unsubscribe()),r.complete(),i.complete(),a.complete()}}}function ioe({suggestedFeatures:e,theme:t,showLineNumbers:n,activePanel:r,translations:i,StatusDisplay:a,ToolbarPanels:s,Toolbar:o}){return g.jsxs("div",{className:`semiont-page${r&&ga.includes(r)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:i.title}),g.jsx("p",{className:"semiont-page__subtitle",children:i.subtitle})]}),g.jsxs("div",{className:"semiont-admin__section",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:i.systemStatus}),g.jsx(a,{})]}),g.jsxs("div",{className:"semiont-admin__section",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:i.cliOperations}),g.jsx("p",{className:"semiont-admin__section-description",children:i.cliOperationsDescription}),g.jsx("div",{className:"semiont-admin__features-grid",children:e.map(c=>g.jsx("div",{className:"semiont-devops-feature",children:g.jsxs("div",{className:"semiont-devops-feature__header",children:[g.jsx("div",{className:"semiont-devops-feature__icon-box",children:g.jsx(c.icon,{className:"semiont-devops-feature__icon"})}),g.jsxs("div",{className:"semiont-devops-feature__content",children:[g.jsx("h3",{className:"semiont-devops-feature__title",children:c.title}),g.jsx("p",{className:"semiont-devops-feature__description",children:c.description}),g.jsx("p",{className:"semiont-devops-feature__available",children:c.available})]})]})},c.title))})]}),g.jsx("div",{className:"semiont-admin__info-box",children:g.jsxs("div",{className:"semiont-admin__info-box-content",children:[g.jsx("div",{className:"semiont-admin__info-box-icon",children:g.jsx(Vie,{className:"semiont-icon semiont-icon--info"})}),g.jsxs("div",{className:"semiont-admin__info-box-text",children:[g.jsx("h3",{className:"semiont-admin__info-box-title",children:i.cliTitle}),g.jsxs("div",{className:"semiont-admin__info-box-description",children:[g.jsx("p",{children:i.cliDescription}),g.jsx("code",{className:"semiont-admin__info-box-code",children:"semiont --help"})]})]})]})})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(s,{activePanel:r,theme:t,showLineNumbers:n}),g.jsx(o,{context:"simple",activePanel:r})]})]})}function rz({onExport:e,isExporting:t,translations:n}){return g.jsxs("div",{className:"semiont-admin__card",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:n.title}),g.jsx("p",{className:"semiont-admin__section-description",children:n.description}),g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--primary",onClick:e,disabled:t,children:t?n.exporting:n.exportButton})]})}function iz({onFileSelected:e,onImport:t,onCancel:n,selectedFile:r,preview:i,isImporting:a,translations:s}){const o=k.useRef(null),[c,d]=k.useState(!1),[f,m]=k.useState(!1),p=k.useCallback(T=>{T.preventDefault(),d(!0)},[]),v=k.useCallback(()=>{d(!1)},[]),b=k.useCallback(T=>{T.preventDefault(),d(!1),m(!1);const A=T.dataTransfer.files[0];A&&e(A)},[e]),S=k.useCallback(T=>{var Q;m(!1);const A=(Q=T.target.files)==null?void 0:Q[0];A&&e(A)},[e]),x=()=>{m(!0)},w=()=>{m(!1),t()},j=()=>{m(!1)};return g.jsxs("div",{className:"semiont-admin__card",children:[g.jsx("h2",{className:"semiont-admin__section-title",children:s.title}),g.jsx("p",{className:"semiont-admin__section-description",children:s.description}),g.jsxs("div",{className:`semiont-exchange__dropzone${c?" semiont-exchange__dropzone--active":""}`,onDragOver:p,onDragLeave:v,onDrop:b,onClick:()=>{var T;return(T=o.current)==null?void 0:T.click()},children:[g.jsx("p",{className:"semiont-exchange__dropzone-text",children:c?s.dropzoneActive:s.dropzoneLabel}),r&&g.jsxs("p",{className:"semiont-exchange__file-info",children:[r.name," (",(r.size/1024).toFixed(1)," KB)"]})]}),g.jsx("input",{ref:o,type:"file",accept:".tar.gz,.jsonl,.gz",onChange:S,style:{display:"none"}}),i&&g.jsxs("div",{className:"semiont-exchange__preview",children:[g.jsxs("div",{className:"semiont-exchange__preview-row",children:[g.jsx("span",{className:"semiont-exchange__preview-label",children:s.detectedFormat}),g.jsxs("span",{className:"semiont-exchange__preview-value",children:[i.format," v",i.version]})]}),i.sourceUrl&&g.jsxs("div",{className:"semiont-exchange__preview-row",children:[g.jsx("span",{className:"semiont-exchange__preview-label",children:"Source"}),g.jsx("span",{className:"semiont-exchange__preview-value",children:i.sourceUrl})]}),Object.keys(i.stats).length>0&&g.jsxs("div",{className:"semiont-exchange__preview-row",children:[g.jsx("span",{className:"semiont-exchange__preview-label",children:s.statsPreview}),g.jsx("span",{className:"semiont-exchange__preview-value",children:Object.entries(i.stats).map(([T,A])=>`${A} ${T}`).join(", ")})]})]}),f&&g.jsxs("div",{className:"semiont-exchange__confirm",children:[g.jsx("p",{className:"semiont-exchange__confirm-title",children:s.importConfirmTitle}),g.jsx("p",{className:"semiont-exchange__confirm-message",children:s.importConfirmMessage}),g.jsxs("div",{className:"semiont-exchange__confirm-actions",children:[g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--primary",onClick:w,children:s.confirmImport}),g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--secondary",onClick:j,children:s.cancelImport})]})]}),!f&&g.jsxs("div",{className:"semiont-exchange__actions",children:[g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--primary",onClick:x,disabled:!i||a,children:a?s.importing:s.importButton}),r&&g.jsx("button",{className:"semiont-exchange__button semiont-exchange__button--secondary",onClick:n,disabled:a,children:s.cancelImport})]})]})}var Aae={started:"phaseStarted","entity-types":"phaseEntityTypes",resources:"phaseResources",annotations:"phaseAnnotations",complete:"phaseComplete",error:"phaseError"};function az({phase:e,message:t,result:n,translations:r}){const i=Aae[e],a=i?r[i]:e,s=e==="complete",o=e==="error";return g.jsxs("div",{className:"semiont-exchange__progress",children:[g.jsx("div",{className:`semiont-exchange__phase-label${o?" semiont-exchange__phase-label--error":s?" semiont-exchange__phase-label--complete":""}`,children:a}),t&&!s&&!o&&g.jsx("p",{className:"semiont-exchange__progress-message",children:t}),s&&n&&g.jsxs("div",{className:"semiont-exchange__result",children:[n.stats!=null&&typeof n.stats=="object"&&g.jsx(g.Fragment,{children:Object.entries(n.stats).map(([c,d])=>{const f=c==="streams"?r.streams:c==="events"?r.events:c==="blobs"?r.blobs:c;return g.jsxs("div",{className:"semiont-exchange__result-stat",children:[g.jsx("span",{className:"semiont-exchange__result-value",children:d}),g.jsx("span",{className:"semiont-exchange__result-label",children:f})]},c)})}),n.hashChainValid!==void 0&&g.jsx("div",{className:`semiont-exchange__hash-badge${n.hashChainValid?" semiont-exchange__hash-badge--valid":" semiont-exchange__hash-badge--invalid"}`,children:n.hashChainValid?r.hashChainValid:r.hashChainInvalid})]}),o&&t&&g.jsx("p",{className:"semiont-exchange__error-message",children:t})]})}function aoe({onExport:e,isExporting:t,onFileSelected:n,onImport:r,onCancelImport:i,selectedFile:a,preview:s,isImporting:o,importPhase:c,importMessage:d,importResult:f,theme:m,showLineNumbers:p,activePanel:v,translations:b,ToolbarPanels:S,Toolbar:x}){return g.jsxs("div",{className:`semiont-page${v&&ga.includes(v)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:b.title}),g.jsx("p",{className:"semiont-page__subtitle",children:b.subtitle})]}),g.jsxs("div",{className:"semiont-exchange__cards",children:[g.jsx(rz,{onExport:e,isExporting:t,translations:b.export}),g.jsx(iz,{onFileSelected:n,onImport:r,onCancel:i,selectedFile:a,preview:s,isImporting:o,translations:b.import})]}),c&&g.jsx(az,{phase:c,message:d,result:f,translations:b.progress})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(S,{activePanel:v,theme:m,showLineNumbers:p}),g.jsx(x,{context:"simple",activePanel:v})]})]})}function soe({providers:e,allowedDomains:t,isLoading:n,theme:r,showLineNumbers:i,activePanel:a,translations:s,ToolbarPanels:o,Toolbar:c}){return g.jsxs("div",{className:`semiont-page${a&&ga.includes(a)?" semiont-page--panel-open":""}`,children:[g.jsx("div",{className:"semiont-page__content",children:g.jsxs("div",{className:"semiont-page__sections",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:s.title}),g.jsx("p",{className:"semiont-page__subtitle",children:s.subtitle})]}),g.jsxs("div",{className:"semiont-admin__card",children:[g.jsxs("div",{className:"semiont-admin__card-header",children:[g.jsx(X_,{className:"semiont-admin__card-icon semiont-admin__card-icon--primary"}),g.jsxs("div",{children:[g.jsx("h3",{className:"semiont-admin__card-title",children:s.oauthProviders}),g.jsx("p",{className:"semiont-admin__card-description",children:s.oauthProvidersDescription})]})]}),n?g.jsx("div",{className:"semiont-skeleton-group",children:g.jsx("div",{className:"semiont-skeleton semiont-skeleton--bar"})}):e.length>0?g.jsx("div",{className:"semiont-provider-list",children:e.map(d=>g.jsxs("div",{className:"semiont-provider-item",children:[g.jsxs("div",{className:"semiont-provider-item__info",children:[g.jsx(Iie,{className:"semiont-provider-item__icon semiont-provider-item__icon--success"}),g.jsx("span",{className:"semiont-provider-item__name",children:d.name}),d.clientId&&g.jsxs("span",{className:"semiont-provider-item__client-id",children:[s.clientId,": ",d.clientId]})]}),g.jsx("span",{className:"semiont-badge semiont-badge--success",children:s.configured})]},d.name))}):g.jsx("div",{className:"semiont-empty-message",children:s.noProvidersConfigured})]}),g.jsxs("div",{className:"semiont-admin__card",children:[g.jsxs("div",{className:"semiont-admin__card-header",children:[g.jsx(eae,{className:"semiont-admin__card-icon semiont-admin__card-icon--primary"}),g.jsxs("div",{children:[g.jsx("h3",{className:"semiont-admin__card-title",children:s.allowedDomains}),g.jsx("p",{className:"semiont-admin__card-description",children:s.allowedDomainsDescription})]})]}),n?g.jsxs("div",{className:"semiont-skeleton-group",children:[g.jsx("div",{className:"semiont-skeleton semiont-skeleton--chip"}),g.jsx("div",{className:"semiont-skeleton semiont-skeleton--chip semiont-skeleton--chip-lg"})]}):t.length>0?g.jsx("div",{className:"semiont-domain-list",children:t.map(d=>g.jsxs("div",{className:"semiont-chip semiont-chip--primary",children:["@",d]},d))}):g.jsx("div",{className:"semiont-empty-message",children:s.noDomainsConfigured})]}),g.jsx("div",{className:"semiont-admin__info-box",children:g.jsxs("div",{className:"semiont-info-box__content",children:[g.jsx(rae,{className:"semiont-info-box__icon"}),g.jsxs("div",{className:"semiont-info-box__text",children:[g.jsx("p",{className:"semiont-info-box__title",children:s.configManagementTitle}),g.jsx("p",{className:"semiont-info-box__description",children:s.configManagementDescription}),g.jsxs("ul",{className:"semiont-info-box__list",children:[g.jsx("li",{children:s.configLocalDev}),g.jsxs("li",{children:[s.configCloudDeploy," ",g.jsx("code",{className:"semiont-code-inline",children:s.configCloudDeployCommand})," ",s.configCloudDeployEnd]}),g.jsx("li",{children:s.configAWS})]})]})]})})]})}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(o,{activePanel:a,theme:r,showLineNumbers:i}),g.jsx(c,{context:"simple",activePanel:a})]})]})}function ooe({onExport:e,isExporting:t,onFileSelected:n,onImport:r,onCancelImport:i,selectedFile:a,preview:s,isImporting:o,importPhase:c,importMessage:d,importResult:f,theme:m,showLineNumbers:p,activePanel:v,translations:b,ToolbarPanels:S,Toolbar:x}){return g.jsxs("div",{className:`semiont-page${v&&ga.includes(v)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:b.title}),g.jsx("p",{className:"semiont-page__subtitle",children:b.subtitle})]}),g.jsxs("div",{className:"semiont-exchange__cards",children:[g.jsx(rz,{onExport:e,isExporting:t,translations:b.export}),g.jsx(iz,{onFileSelected:n,onImport:r,onCancel:i,selectedFile:a,preview:s,isImporting:o,translations:b.import})]}),c&&g.jsx(az,{phase:c,message:d,result:f,translations:b.progress})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(S,{activePanel:v,theme:m,showLineNumbers:p}),g.jsx(x,{context:"simple",activePanel:v})]})]})}function Pae({user:e,onUpdate:t,onDelete:n,translations:r}){const i={admin:"semiont-badge semiont-badge--danger",user:"semiont-badge semiont-badge--default"},a={active:"semiont-badge semiont-badge--success",inactive:"semiont-badge semiont-badge--default"},s=e.isAdmin?"admin":"user",o=e.isActive?"active":"inactive";return g.jsxs("tr",{className:"semiont-table__row",children:[g.jsx("td",{className:"semiont-table__cell",children:g.jsxs("div",{className:"semiont-user-info",children:[g.jsx(ES,{className:"semiont-user-info__avatar"}),g.jsxs("div",{children:[g.jsx("div",{className:"semiont-user-info__name",children:e.name||r.noName}),g.jsx("div",{className:"semiont-user-info__email",children:e.email})]})]})}),g.jsx("td",{className:"semiont-table__cell",children:g.jsxs("span",{className:"semiont-table__text--secondary",children:["@",e.domain]})}),g.jsx("td",{className:"semiont-table__cell",children:g.jsx("span",{className:i[s],children:r[s]})}),g.jsx("td",{className:"semiont-table__cell",children:g.jsx("span",{className:a[o],children:r[o]})}),g.jsx("td",{className:"semiont-table__cell semiont-table__text--secondary",children:e.lastLogin?new Date(e.lastLogin).toLocaleDateString():r.never}),g.jsx("td",{className:"semiont-table__cell semiont-table__text--secondary",children:new Date(e.created).toLocaleDateString()}),g.jsx("td",{className:"semiont-table__cell semiont-table__cell--actions",children:g.jsxs("div",{className:"semiont-table__actions",children:[g.jsx("button",{onClick:()=>t(e.id,{isAdmin:!e.isAdmin}),className:"semiont-action-button semiont-action-button--info",title:e.isAdmin?r.removeAdmin:r.makeAdmin,children:g.jsx(X_,{className:"semiont-action-button__icon"})}),g.jsx("button",{onClick:()=>t(e.id,{isActive:!e.isActive}),className:"semiont-action-button semiont-action-button--warning",title:e.isActive?r.deactivateUser:r.activateUser,children:g.jsx(dae,{className:"semiont-action-button__icon"})}),g.jsx("button",{onClick:()=>n(e.id),className:"semiont-action-button semiont-action-button--danger",title:r.deleteUser,children:g.jsx(wae,{className:"semiont-action-button__icon"})})]})})]})}function loe({users:e,userStats:t,isLoadingUsers:n,isLoadingStats:r,onUpdateUser:i,onDeleteUser:a,onAddUser:s,onExportUsers:o,theme:c,showLineNumbers:d,activePanel:f,translations:m,ToolbarPanels:p,Toolbar:v,buttonStyles:b}){var C;const[S,x]=k.useState(""),[w,j]=k.useState("all"),[T,A]=k.useState("all"),Q=e.filter(R=>{const D=(R.name||"").toLowerCase().includes(S.toLowerCase())||R.email.toLowerCase().includes(S.toLowerCase()),L=R.isAdmin?"admin":"user",P=R.isActive?"active":"inactive";return D&&(w==="all"||L===w)&&(T==="all"||P===T)});return g.jsxs("div",{className:`semiont-page${f&&ga.includes(f)?" semiont-page--panel-open":""}`,children:[g.jsx("div",{className:"semiont-page__content",children:g.jsxs("div",{className:"semiont-page__sections",children:[g.jsxs("div",{className:"semiont-page__header-with-action",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"semiont-page__title",children:m.title}),g.jsx("p",{className:"semiont-page__subtitle",children:m.subtitle})]}),g.jsxs("button",{onClick:s,className:b.primary.base,children:[g.jsx(nz,{className:"semiont-button__icon"}),m.addUser]})]}),g.jsx("div",{className:"semiont-admin__stats-grid",children:r?Array(4).fill(0).map((R,D)=>g.jsx("div",{className:"semiont-stat-card semiont-stat-card--loading",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-skeleton semiont-skeleton--icon"}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("div",{className:"semiont-skeleton semiont-skeleton--text"}),g.jsx("div",{className:"semiont-skeleton semiont-skeleton--number"})]})]})},D)):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx(ES,{className:"semiont-stat-card__icon semiont-stat-card__icon--primary"})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.totalUsers}),g.jsx("p",{className:"semiont-stat-card__value",children:(t==null?void 0:t.totalUsers)??0})]})]})}),g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx("div",{className:"semiont-stat-card__status-indicator semiont-stat-card__status-indicator--active",children:g.jsx("div",{className:"semiont-stat-card__status-dot"})})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.activeUsers}),g.jsx("p",{className:"semiont-stat-card__value",children:(t==null?void 0:t.activeUsers)??0})]})]})}),g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx(X_,{className:"semiont-stat-card__icon semiont-stat-card__icon--danger"})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.administrators}),g.jsx("p",{className:"semiont-stat-card__value",children:(t==null?void 0:t.adminUsers)??0})]})]})}),g.jsx("div",{className:"semiont-stat-card",children:g.jsxs("div",{className:"semiont-stat-card__content",children:[g.jsx("div",{className:"semiont-stat-card__icon-wrapper",children:g.jsx(Gie,{className:"semiont-stat-card__icon semiont-stat-card__icon--warning"})}),g.jsxs("div",{className:"semiont-stat-card__text",children:[g.jsx("p",{className:"semiont-stat-card__label",children:m.recentUsers}),g.jsx("p",{className:"semiont-stat-card__value",children:((C=t==null?void 0:t.recentSignups)==null?void 0:C.length)??0})]})]})})]})}),g.jsx("div",{className:"semiont-admin__filters-card",children:g.jsxs("div",{className:"semiont-admin__filters-grid",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"search",className:"semiont-form__label",children:m.searchUsers}),g.jsxs("div",{className:"semiont-search-input",children:[g.jsx("div",{className:"semiont-search-input__icon",children:g.jsx(lae,{className:"semiont-icon semiont-icon--small"})}),g.jsx("input",{type:"text",id:"search",className:"semiont-search-input__field",placeholder:m.searchPlaceholder,value:S,onChange:R=>x(R.target.value)})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"role",className:"semiont-form__label",children:m.role}),g.jsxs("select",{id:"role",className:"semiont-select",value:w,onChange:R=>j(R.target.value),children:[g.jsx("option",{value:"all",children:m.allRoles}),g.jsx("option",{value:"admin",children:m.admin}),g.jsx("option",{value:"user",children:m.user})]})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"status",className:"semiont-form__label",children:m.status}),g.jsxs("select",{id:"status",className:"semiont-select",value:T,onChange:R=>A(R.target.value),children:[g.jsx("option",{value:"all",children:m.allStatus}),g.jsx("option",{value:"active",children:m.active}),g.jsx("option",{value:"inactive",children:m.inactive})]})]}),g.jsx("div",{className:"semiont-form__field semiont-form__field--align-end",children:g.jsx("button",{onClick:o,className:`${b.secondary.base} semiont-button--full-width`,children:m.exportUsers})})]})}),g.jsxs("div",{className:"semiont-admin__table-card",children:[g.jsx("div",{className:"semiont-table-container",children:n?g.jsxs("div",{className:"semiont-loading-state",children:[g.jsx("div",{className:"semiont-spinner"}),g.jsx("p",{className:"semiont-loading-state__text",children:m.loadingUsers})]}):g.jsxs("table",{className:"semiont-table",children:[g.jsx("thead",{className:"semiont-table__head",children:g.jsxs("tr",{children:[g.jsx("th",{className:"semiont-table__header",children:m.userColumn}),g.jsx("th",{className:"semiont-table__header",children:m.domainColumn}),g.jsx("th",{className:"semiont-table__header",children:m.roleColumn}),g.jsx("th",{className:"semiont-table__header",children:m.statusColumn}),g.jsx("th",{className:"semiont-table__header",children:m.lastLoginColumn}),g.jsx("th",{className:"semiont-table__header",children:m.joinedColumn}),g.jsx("th",{className:"semiont-table__header semiont-table__header--actions",children:m.actionsColumn})]})}),g.jsx("tbody",{className:"semiont-table__body",children:Q.map(R=>g.jsx(Pae,{user:R,onUpdate:i,onDelete:a,translations:m},R.id))})]})}),!n&&Q.length===0&&g.jsxs("div",{className:"semiont-empty-state",children:[g.jsx(ES,{className:"semiont-empty-state__icon"}),g.jsx("h3",{className:"semiont-empty-state__title",children:m.noUsersFound}),g.jsx("p",{className:"semiont-empty-state__description",children:m.noUsersFoundDescription})]})]})]})}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(p,{activePanel:f,theme:c,showLineNumbers:d}),g.jsx(v,{context:"simple",activePanel:f})]})]})}function Qae(){return g.jsxs("svg",{className:"semiont-icon semiont-icon--small semiont-icon--inline",viewBox:"0 0 24 24",children:[g.jsx("path",{fill:"currentColor",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),g.jsx("path",{fill:"currentColor",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),g.jsx("path",{fill:"currentColor",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),g.jsx("path",{fill:"currentColor",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}function coe({onSignUp:e,Link:t,translations:n}){const[r,i]=k.useState(!1),a=async()=>{i(!0);try{await e()}catch(s){console.error("Failed to initiate Google sign-up:",s),i(!1)}};return g.jsx("main",{className:"semiont-auth__main",role:"main",children:g.jsx("div",{className:"semiont-auth__container",children:g.jsxs("div",{className:"semiont-auth__content",children:[g.jsxs("section",{"aria-labelledby":"signup-heading",className:"semiont-auth__branding",children:[g.jsx("h1",{id:"signup-heading",className:"sr-only",children:n.pageTitle}),g.jsx(tg,{t:s=>n[s]||s,size:"xl",animated:!0,className:"semiont-auth__logo"}),g.jsx("p",{className:"semiont-auth__welcome",children:n.pageTitle}),g.jsx("p",{className:"semiont-auth__subtitle",children:n.signUpPrompt})]}),g.jsxs("div",{className:"semiont-auth__forms",children:[g.jsxs("button",{onClick:a,disabled:r,className:`${kd.primary.base} semiont-button--full-width`,children:[r?g.jsx("div",{className:"semiont-auth__spinner"}):g.jsx(Qae,{}),r?n.creatingAccount:n.signUpWithGoogle]}),g.jsxs("div",{className:"semiont-auth__info",children:[n.approvedDomainsInfo,g.jsx("br",{}),n.termsAgreement]})]}),g.jsxs("div",{className:"semiont-auth__links",children:[g.jsx(t,{href:"/",className:kd.secondary.base,children:n.backToHome}),g.jsx(t,{href:"/auth/signin",className:kd.primary.base,children:n.alreadyHaveAccount})]})]})})})}function Nae(e,t){switch(e){case"Configuration":return t.errorConfiguration;case"AccessDenied":return t.errorAccessDenied;case"Verification":return t.errorVerification;default:return t.errorGeneric}}function uoe({errorType:e,Link:t,translations:n}){const r=Nae(e,n);return g.jsx("div",{className:"semiont-auth-error-display",children:g.jsxs("div",{className:"semiont-auth-error-display__container",children:[g.jsx("div",{children:g.jsx("h2",{className:"semiont-auth-error-display__title",children:n.pageTitle})}),g.jsx("div",{className:"semiont-auth-error-display__error-box",children:g.jsx("div",{className:"semiont-auth-error-display__error-message",children:r})}),g.jsx("div",{className:"semiont-auth-error-display__actions",children:g.jsx(t,{href:"/auth/signin",className:"semiont-auth-error-display__link",children:n.tryAgain})})]})})}function doe({userName:e,status:t,isProcessing:n,onAccept:r,onDecline:i,translations:a,PageLayout:s,Link:o}){return t==="loading"?g.jsx(s,{className:"semiont-welcome-page__layout",children:g.jsx("div",{className:"semiont-welcome-page__loading",children:g.jsxs("div",{className:"semiont-welcome-page__loading-content",children:[g.jsx("div",{className:"semiont-welcome-page__spinner"}),g.jsx("p",{className:"semiont-welcome-page__loading-text",children:a.loading})]})})}):t==="accepted"?g.jsx(s,{className:"semiont-welcome-page__layout",children:g.jsx("div",{className:"semiont-welcome-page__accepted",children:g.jsxs("div",{className:"semiont-welcome-page__accepted-content",children:[g.jsx("div",{className:"semiont-welcome-page__accepted-icon",children:g.jsx("svg",{className:"semiont-welcome-page__accepted-checkmark",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),g.jsxs("div",{children:[g.jsx("h2",{className:"semiont-welcome-page__accepted-title",children:a.welcomeTitle}),g.jsx("p",{className:"semiont-welcome-page__accepted-subtitle",children:a.thanksForAccepting})]})]})})}):g.jsx(s,{className:"semiont-welcome-page__layout",children:g.jsx("div",{className:"semiont-welcome-page__form-wrapper",children:g.jsxs("div",{className:"semiont-welcome-page__form",children:[g.jsxs("div",{className:"semiont-welcome-page__form-header",children:[g.jsx("div",{className:"semiont-welcome-page__form-icon",children:g.jsx("svg",{className:"semiont-welcome-page__form-icon-svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),g.jsx("h1",{className:"semiont-welcome-page__form-title",children:a.welcomeUser.replace("{firstName}",e||"")}),g.jsx("p",{className:"semiont-welcome-page__form-subtitle",children:a.reviewTermsPrompt})]}),g.jsx("div",{className:"semiont-welcome-page__terms-content",children:g.jsxs("div",{className:"semiont-welcome-page__prose",children:[g.jsx("h3",{children:a.termsSummaryTitle}),g.jsx("p",{children:a.termsSummaryIntro}),g.jsx("h4",{children:a.acceptableUseTitle}),g.jsxs("ul",{children:[g.jsx("li",{children:a.acceptableUseResponsible}),g.jsx("li",{children:a.acceptableUseRespect}),g.jsx("li",{children:a.acceptableUseConduct})]}),g.jsx("h4",{children:a.prohibitedContentTitle}),g.jsx("p",{children:a.prohibitedContentIntro}),g.jsxs("ul",{children:[g.jsx("li",{children:a.prohibitedIllegal}),g.jsx("li",{children:a.prohibitedAdult}),g.jsx("li",{children:a.prohibitedHate}),g.jsx("li",{children:a.prohibitedViolence}),g.jsx("li",{children:a.prohibitedMisinformation}),g.jsx("li",{children:a.prohibitedPrivacy}),g.jsx("li",{children:a.prohibitedCopyright}),g.jsx("li",{children:a.prohibitedMalware}),g.jsx("li",{children:a.prohibitedSpam})]}),g.jsx("h4",{children:a.conductTitle}),g.jsxs("p",{children:[a.conductDescription," ",g.jsx("a",{href:"https://ai-alliance.cdn.prismic.io/ai-alliance/Zl-MG5m069VX1dgH_AIAllianceCodeofConduct.pdf",target:"_blank",rel:"noopener noreferrer",className:"semiont-link",children:a.conductLink}),a.conductPromotion]}),g.jsx("h4",{children:a.responsibilitiesTitle}),g.jsxs("ul",{children:[g.jsx("li",{children:a.responsibilitiesSecure}),g.jsx("li",{children:a.responsibilitiesReport}),g.jsx("li",{children:a.responsibilitiesAccurate}),g.jsx("li",{children:a.responsibilitiesComply})]}),g.jsx("p",{className:"semiont-welcome-page__warning",children:a.violationsWarning})]})}),g.jsxs("div",{className:"semiont-welcome-page__actions",children:[g.jsxs("p",{className:"semiont-welcome-page__legal-links",children:[a.readFullTerms," ",g.jsx(o,{href:"/terms",target:"_blank",className:"semiont-welcome-page__link",children:a.termsOfService})," ",a.and," ",g.jsx(o,{href:"/privacy",target:"_blank",className:"semiont-welcome-page__link",children:a.privacyPolicy})]}),g.jsxs("div",{className:"semiont-welcome-page__buttons",children:[g.jsx("button",{onClick:i,disabled:n,className:"semiont-welcome-page__button semiont-welcome-page__button--secondary",children:a.declineAndSignOut}),g.jsx("button",{onClick:r,disabled:n,className:"semiont-welcome-page__button semiont-welcome-page__button--primary",children:n?a.processing:a.acceptAndContinue})]}),g.jsx("p",{className:"semiont-welcome-page__legal-notice",children:a.legallyBound})]})]})})})}function foe({entityTypes:e,error:t,newTag:n,onNewTagChange:r,onAddTag:i,isAddingTag:a,theme:s,showLineNumbers:o,activePanel:c,translations:d,ToolbarPanels:f,Toolbar:m}){const p=v=>{v.key==="Enter"&&i()};return g.jsxs("div",{className:`semiont-page${c&&ga.includes(c)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:d.pageTitle}),g.jsx("p",{className:"semiont-page__subtitle",children:d.pageDescription})]}),g.jsxs("div",{className:"semiont-card",children:[g.jsxs("div",{className:"semiont-entity-tags__header",children:[g.jsx("div",{className:"semiont-entity-tags__icon-box",children:g.jsx(Sae,{className:"semiont-entity-tags__icon"})}),g.jsxs("div",{className:"semiont-entity-tags__content",children:[g.jsx("h3",{className:"semiont-entity-tags__title",children:d.sectionTitle}),g.jsx("p",{className:"semiont-entity-tags__description",children:d.sectionDescription})]})]}),g.jsx("div",{className:"semiont-entity-tags__tags-section",children:g.jsx("div",{className:"semiont-tags",children:e.map(v=>g.jsx("span",{className:"semiont-tag semiont-tag--info semiont-tag--rounded-md",children:v},v))})}),g.jsxs("div",{className:"semiont-entity-tags__input-group",children:[g.jsx("input",{type:"text",value:n,onChange:v=>r(v.target.value),onKeyDown:p,placeholder:d.inputPlaceholder,className:"semiont-entity-tags__input",disabled:a}),g.jsx("button",{onClick:i,disabled:a||!n.trim(),className:"semiont-button semiont-button--primary",children:a?d.adding:g.jsxs(g.Fragment,{children:[g.jsx(nz,{className:"semiont-icon semiont-icon--small semiont-icon--inline"}),d.addTag]})})]}),t&&g.jsxs("div",{className:"semiont-entity-tags__error",children:[g.jsx(Fie,{className:"semiont-entity-tags__error-icon"}),t]})]})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(f,{activePanel:c,theme:s,showLineNumbers:o}),g.jsx(m,{context:"simple",activePanel:c})]})]})}function hoe({isLoading:e,theme:t,showLineNumbers:n,activePanel:r,translations:i,ToolbarPanels:a,Toolbar:s}){return e?g.jsx("div",{className:"semiont-page__loading",children:g.jsx("p",{className:"semiont-page__loading-text",children:i.loading})}):g.jsxs("div",{className:`semiont-page${r&&ga.includes(r)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:i.pageTitle}),g.jsx("p",{className:"semiont-page__subtitle",children:i.pageDescription})]}),g.jsxs("div",{className:"semiont-card",children:[g.jsxs("div",{className:"semiont-recent-docs__header",children:[g.jsx("div",{className:"semiont-recent-docs__icon-box",children:g.jsx(Xie,{className:"semiont-recent-docs__icon"})}),g.jsxs("div",{className:"semiont-recent-docs__content",children:[g.jsx("h3",{className:"semiont-recent-docs__title",children:i.sectionTitle}),g.jsx("p",{className:"semiont-recent-docs__description",children:i.sectionDescription})]})]}),g.jsxs("div",{className:"semiont-recent-docs__empty-state",children:[g.jsx("svg",{className:"semiont-recent-docs__empty-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),g.jsx("p",{className:"semiont-recent-docs__empty-message",children:i.noDocuments}),g.jsx("p",{className:"semiont-recent-docs__empty-hint",children:i.activityWillAppear})]})]})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(a,{activePanel:r,theme:t,showLineNumbers:n}),g.jsx(s,{context:"simple",activePanel:r})]})]})}var Rae={legal:gae,scientific:Lie,general:tz},EA={legal:"semiont-schema-domain--legal",scientific:"semiont-schema-domain--scientific",general:"semiont-schema-domain--general"};function moe({schemas:e,isLoading:t,theme:n,showLineNumbers:r,activePanel:i,translations:a,ToolbarPanels:s,Toolbar:o}){return t?g.jsx("div",{className:"semiont-page__loading",children:g.jsx("p",{className:"semiont-page__loading-text",children:a.loading})}):g.jsxs("div",{className:`semiont-page${i&&ga.includes(i)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:a.pageTitle}),g.jsx("p",{className:"semiont-page__subtitle",children:a.pageDescription})]}),g.jsx("div",{className:"semiont-card-grid semiont-card-grid--two-columns",children:e.map(c=>{const d=Rae[c.domain]||tz,f=EA[c.domain]||EA.general;return g.jsxs("div",{className:"semiont-card",children:[g.jsxs("div",{className:"semiont-schema__header",children:[g.jsx("div",{className:`semiont-schema__icon-wrapper ${f}`,children:d&&g.jsx(d,{className:"semiont-schema__icon"})}),g.jsxs("div",{className:"semiont-schema__content",children:[g.jsx("h3",{className:"semiont-schema__title",children:c.name}),g.jsx("p",{className:"semiont-schema__description",children:c.description}),g.jsx("span",{className:`semiont-schema__badge ${f}`,children:c.domain})]})]}),g.jsxs("div",{className:"semiont-schema__categories",children:[g.jsx("h4",{className:"semiont-schema__categories-title",children:a.categories}),c.tags.map(m=>g.jsxs("div",{className:"semiont-schema__category",children:[g.jsx("div",{className:"semiont-schema__category-name",children:m.name}),g.jsx("div",{className:"semiont-schema__category-description",children:m.description}),g.jsxs("div",{className:"semiont-schema__examples",children:[m.examples.slice(0,2).map((p,v)=>g.jsx("span",{className:"semiont-schema__example",children:p},v)),m.examples.length>2&&g.jsxs("span",{className:"semiont-schema__example-more",children:["+",m.examples.length-2," more"]})]})]},m.name))]})]},c.id)})})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(s,{activePanel:i,theme:n,showLineNumbers:r}),g.jsx(o,{context:"simple",activePanel:i})]})]})}function ky(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`}function Mae({progress:e,label:t="Upload"}){if(!e)return null;if(e.phase==="started")return g.jsxs("div",{className:"semiont-progress-wrapper",role:"status","aria-live":"polite",children:[g.jsx("div",{className:"semiont-progress__label",children:g.jsxs("span",{children:[t,": starting…"]})}),g.jsx("div",{className:"semiont-progress semiont-progress--indeterminate",children:g.jsx("div",{className:"semiont-progress__fill"})})]});if(e.phase==="progress"){const n=e.totalBytes<=0,r=n?0:Math.min(100,Math.round(e.bytesUploaded/e.totalBytes*100));return g.jsxs("div",{className:"semiont-progress-wrapper",role:"status","aria-live":"polite",children:[g.jsx("div",{className:"semiont-progress__label",children:n?g.jsxs("span",{children:[t,": ",ky(e.bytesUploaded),"…"]}):g.jsxs(g.Fragment,{children:[g.jsxs("span",{children:[t,": ",r,"%"]}),g.jsxs("span",{children:[ky(e.bytesUploaded)," / ",ky(e.totalBytes)]})]})}),g.jsx("div",{className:`semiont-progress${n?" semiont-progress--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":n?void 0:100,"aria-valuenow":n?void 0:r,children:g.jsx("div",{className:"semiont-progress__fill",style:n?void 0:{width:`${r}%`}})})]})}return g.jsxs("div",{className:"semiont-progress-wrapper",role:"status","aria-live":"polite",children:[g.jsx("div",{className:"semiont-progress__label",children:g.jsxs("span",{children:[t,": uploaded"]})}),g.jsx("div",{className:"semiont-progress",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":100,children:g.jsx("div",{className:"semiont-progress__fill semiont-progress__fill--success",style:{width:"100%"}})})]})}function poe({mode:e,cloneData:t,referenceData:n,gatheredContext:r,availableEntityTypes:i,initialLocale:a,theme:s,showLineNumbers:o,hoverDelayMs:c,activePanel:d,onSaveResource:f,onCancel:m,uploadProgress:p=null,translations:v,ToolbarPanels:b,Toolbar:S}){const{announceFormSubmitting:x,announceFormSuccess:w,announceFormError:j}=hV(),[T,A]=k.useState(""),[Q,C]=k.useState(""),[R,D]=k.useState([]),[L,P]=k.useState(!1),[Z,X]=k.useState("write"),[B,Y]=k.useState(null),[H,q]=k.useState("text/markdown"),[I,ee]=k.useState(null),[W,z]=k.useState("text/markdown"),[ce,se]=k.useState(a),[N,le]=k.useState(""),[pe,Oe]=k.useState(""),[Be,Ae]=k.useState(!0);k.useEffect(()=>{e==="clone"&&t?(A(t.sourceResource.name),C(t.sourceContent)):e==="reference"&&n&&(A(n.name),n.entityTypes.length>0&&D(n.entityTypes))},[e,t,n]);const Ze=Qe=>{var mt;const De=(mt=Qe.target.files)==null?void 0:mt[0];if(De){if(Y(De),q(De.type),X("upload"),!T){const Ve=De.name.replace(/\.[^/.]+$/,"");A(Ve)}if(Ly(De.type)||Zc(De.type)){const Ve=URL.createObjectURL(De);ee(Ve)}else{const Ve=new FileReader;Ve.onload=cn=>{var We;const je=(We=cn.target)==null?void 0:We.result;C(je)},Ve.readAsText(De)}}};k.useEffect(()=>()=>{I&&URL.revokeObjectURL(I)},[I]);const xe=async Qe=>{if(Qe.preventDefault(),!!T.trim()){P(!0),x();try{const De={mode:e,name:T,storageUri:`file://${pe}`,content:Q,format:B?H:W,entityTypes:R,language:ce};B&&(De.file=B),N&&(De.charset=N),e==="clone"&&(De.archiveOriginal=Be),n!=null&&n.annotationUri&&(De.annotationUri=n.annotationUri),n!=null&&n.sourceDocumentId&&(De.sourceDocumentId=n.sourceDocumentId),await f(De),w(e==="clone"?"Resource cloned successfully":e==="reference"?"Reference completed successfully":"Resource created successfully")}catch(De){throw j("Failed to save resource. Please try again."),De}finally{P(!1)}}},Ye=e==="clone",Ue=e==="reference";return g.jsxs("div",{className:`semiont-page${d&&ga.includes(d)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content semiont-page__compose",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:Ye?v.titleEditClone:Ue?v.titleCompleteReference:v.title}),(Ye||Ue)&&g.jsx("p",{className:"semiont-page__subtitle",children:Ye?v.subtitleClone:v.subtitleReference}),Ue&&g.jsx("div",{className:"semiont-page__reference-notice",children:g.jsx("p",{className:"semiont-page__reference-notice-text",children:v.linkedNoticePrefix})})]}),r&&g.jsxs("div",{className:"semiont-form__field",style:{marginBottom:"1.5rem",padding:"1rem",backgroundColor:"var(--semiont-bg-secondary)",borderRadius:"var(--semiont-radius-md)",border:"1px solid var(--semiont-border-primary)"},children:[g.jsx("h3",{className:"semiont-form__label",style:{marginBottom:"0.75rem"},children:"Gathered Context"}),r.sourceContext&&g.jsx("div",{style:{padding:"0.75rem",backgroundColor:"var(--semiont-bg-primary)",borderRadius:"var(--semiont-radius-md)",border:"1px solid var(--semiont-border-primary)",maxHeight:"150px",overflowY:"auto",marginBottom:"0.5rem"},children:g.jsxs("div",{style:{fontSize:"var(--semiont-text-sm)",fontFamily:"monospace",whiteSpace:"pre-wrap",color:"var(--semiont-text-secondary)"},children:[r.sourceContext.before&&g.jsx("span",{children:r.sourceContext.before}),g.jsx("span",{style:{backgroundColor:"var(--semiont-color-primary-100)",padding:"0 0.25rem",fontWeight:600,color:"var(--semiont-color-primary-900)"},children:r.sourceContext.selected}),r.sourceContext.after&&g.jsx("span",{children:r.sourceContext.after})]})}),r.graphContext&&r.graphContext.connections&&r.graphContext.connections.length>0&&g.jsxs("div",{style:{padding:"0.5rem 0",fontSize:"var(--semiont-text-sm)",color:"var(--semiont-text-secondary)"},children:[g.jsx("span",{style:{fontSize:"var(--semiont-text-xs)",fontWeight:500,marginRight:"0.5rem"},children:"Connections:"}),r.graphContext.connections.map(Qe=>g.jsx("span",{className:"semiont-chip",style:{fontSize:"var(--semiont-text-xs)",padding:"0.125rem 0.5rem",marginRight:"0.25rem"},children:Qe.resourceName},Qe.resourceId))]})]}),g.jsx("div",{className:"semiont-form",children:g.jsxs("form",{onSubmit:xe,className:"semiont-form__fields semiont-compose-grid",children:[g.jsxs("div",{className:"semiont-compose-grid__meta",children:[g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"docName",className:"semiont-form__label",children:v.resourceName}),g.jsx("input",{id:"docName",type:"text",value:T,onChange:Qe=>A(Qe.target.value),placeholder:v.resourceNamePlaceholder,className:"semiont-input",required:!0,disabled:L})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"storagePath",className:"semiont-form__label",children:"Save location"}),g.jsxs("div",{className:"semiont-input-addon",children:[g.jsx("span",{className:"semiont-input-addon__prefix",children:"file://"}),g.jsx("input",{id:"storagePath",type:"text",value:pe,onChange:Qe=>Oe(Qe.target.value),placeholder:"docs/my-resource.md",required:!0,className:"semiont-input semiont-input--addon",disabled:L})]})]}),(!Ue||R.length===0)&&g.jsxs("div",{className:"semiont-form__field semiont-form__entity-types",children:[g.jsx("div",{className:"semiont-form__label",children:v.entityTypes}),g.jsx("div",{className:"semiont-form__entity-type-buttons",role:"group","aria-describedby":"entity-types-description",children:i.map(Qe=>{const De=R.includes(Qe);return g.jsx("button",{type:"button",onClick:()=>{D(mt=>mt.includes(Qe)?mt.filter(Ve=>Ve!==Qe):[...mt,Qe])},className:"semiont-form__entity-type-button","data-selected":De,disabled:L,"aria-pressed":De,"aria-label":`${Qe} entity type, ${De?"selected":"not selected"}`,children:Qe},Qe)})}),R.length>0&&g.jsxs("div",{className:"sr-only","aria-live":"polite","aria-atomic":"true",children:[R.length," entity type",R.length!==1?"s":""," selected: ",R.join(", ")]})]}),Ue&&R.length>0&&g.jsxs("div",{className:"semiont-form__field semiont-form__entity-types-display",role:"region","aria-labelledby":"selected-entity-types-label",children:[g.jsx("h3",{id:"selected-entity-types-label",className:"semiont-form__label",children:v.entityTypes}),g.jsx("div",{className:"semiont-form__entity-type-tags",role:"list",children:R.map(Qe=>g.jsx("span",{role:"listitem",className:"semiont-form__entity-type-tag","aria-label":`Entity type: ${Qe}`,children:Qe},Qe))}),g.jsx("p",{className:"semiont-form__helper-text",id:"reference-entity-types-description",children:"These entity types were selected when creating the reference"})]}),g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"language-select",className:"semiont-form__label",children:v.language}),g.jsx("select",{id:"language-select",value:ce,onChange:Qe=>se(Qe.target.value),disabled:L,className:"semiont-select",children:mc.map(Qe=>g.jsx("option",{value:Qe.code,children:Qe.nativeName},Qe.code))})]})]}),g.jsxs("div",{className:"semiont-compose-grid__content",children:[!Ye&&!Ue&&g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{className:"semiont-form__label",children:v.contentSource}),g.jsxs("div",{className:"semiont-form__content-source-toggle",children:[g.jsxs("button",{type:"button",onClick:()=>X("upload"),disabled:L,className:"semiont-form__content-source-button","data-active":Z==="upload",children:[g.jsxs("div",{className:"semiont-form__content-source-icon-wrapper",children:[g.jsx("span",{className:"semiont-form__content-source-icon",children:"📎"}),g.jsx("span",{className:"semiont-form__content-source-label",children:v.uploadFile})]}),g.jsx("div",{className:"semiont-form__content-source-description",children:v.uploadFileDescription})]}),g.jsxs("button",{type:"button",onClick:()=>X("write"),disabled:L,className:"semiont-form__content-source-button","data-active":Z==="write",children:[g.jsxs("div",{className:"semiont-form__content-source-icon-wrapper",children:[g.jsx("span",{className:"semiont-form__content-source-icon",children:"✍️"}),g.jsx("span",{className:"semiont-form__content-source-label",children:v.writeContent})]}),g.jsx("div",{className:"semiont-form__content-source-description",children:v.writeContentDescription})]})]})]}),!Ye&&!Ue&&Z==="upload"&&g.jsxs("div",{className:"semiont-form__upload-section",children:[g.jsx("div",{children:g.jsxs("div",{className:"semiont-form__upload-container",children:[g.jsx("label",{className:"semiont-form__upload-dropzone",children:g.jsxs("div",{className:"semiont-form__upload-area",children:[g.jsx("input",{type:"file",accept:"text/plain,text/markdown,image/png,image/jpeg,application/pdf",onChange:Ze,className:"semiont-form__upload-input",disabled:L}),g.jsx("p",{className:"semiont-form__upload-text",children:B?B.name:v.dropFileOrClick}),g.jsx("p",{className:"semiont-form__upload-hint",children:v.supportedFormats})]})}),B&&g.jsx("button",{type:"button",onClick:()=>{Y(null),ee(null),q("text/markdown")},className:"semiont-button semiont-button--danger semiont-button--small",disabled:L,children:"Clear"})]})}),B&&g.jsxs("div",{className:"semiont-form__media-type",children:[g.jsxs("span",{className:"semiont-form__media-type-label",children:[v.mediaType,":"]}),g.jsx("code",{className:"semiont-form__media-type-value",children:H}),g.jsx("span",{className:"semiont-form__media-type-lock",title:v.autoDetected,children:"🔒"})]}),B&&I&&Ly(H)&&g.jsxs("div",{className:"semiont-form__image-preview",children:[g.jsx("p",{className:"semiont-form__image-preview-label",children:"Preview:"}),g.jsx("div",{className:"semiont-form__image-preview-container",children:g.jsx("img",{src:I,alt:"Upload preview",className:"semiont-form__image-preview-img"})})]})]}),(Ye||Ue||Z==="write")&&g.jsxs("div",{className:"semiont-form__write-section",children:[!Ye&&!Ue&&g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"format-select",className:"semiont-form__label",children:v.format}),g.jsxs("select",{id:"format-select",value:W,onChange:Qe=>z(Qe.target.value),disabled:L,className:"semiont-select",children:[g.jsx("option",{value:"text/markdown",children:"Markdown (text/markdown)"}),g.jsx("option",{value:"text/plain",children:"Plain Text (text/plain)"}),g.jsx("option",{value:"text/html",children:"HTML (text/html)"})]})]}),g.jsxs("div",{className:"semiont-form__field semiont-form__editor",children:[g.jsx("label",{className:"semiont-form__label",children:Ye?v.resourceContent:v.content}),g.jsx("div",{className:"semiont-form__editor-wrapper",lang:ce,children:g.jsx(ZL,{content:Q,editable:!L,sourceView:!0,showLineNumbers:o,hoverDelayMs:c,onChange:Qe=>C(Qe)})})]}),!Ye&&!Ue&&g.jsxs("div",{className:"semiont-form__field",children:[g.jsx("label",{htmlFor:"charset-select",className:"semiont-form__label",children:v.encoding}),g.jsxs("select",{id:"charset-select",value:N,onChange:Qe=>le(Qe.target.value),disabled:L,className:"semiont-select",children:[g.jsx("option",{value:"",children:"UTF-8 (default)"}),g.jsx("option",{value:"iso-8859-1",children:"ISO-8859-1 (Latin-1)"}),g.jsx("option",{value:"windows-1252",children:"Windows-1252"}),g.jsx("option",{value:"ascii",children:"ASCII"}),g.jsx("option",{value:"utf-16le",children:"UTF-16LE"})]})]})]}),Ye&&g.jsxs("div",{className:"semiont-form__checkbox-field",children:[g.jsx("input",{id:"archiveOriginal",type:"checkbox",checked:Be,onChange:Qe=>Ae(Qe.target.checked),className:"semiont-checkbox",disabled:L}),g.jsx("label",{htmlFor:"archiveOriginal",className:"semiont-form__checkbox-label",children:v.archiveOriginal})]})]}),g.jsxs("div",{className:"semiont-form__actions",children:[g.jsx("button",{type:"button",onClick:m,disabled:L||p!==null,className:kd.tertiary.base,children:v.cancel}),g.jsx("button",{type:"submit",disabled:L||p!==null||!T.trim(),className:kd.primary.base,children:L?Ye?v.saving:Ue?v.creatingAndLinking:v.creating:Ye?v.saveClonedResource:Ue?v.createAndLinkResource:v.createResource})]}),g.jsx(Mae,{progress:p})]})})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(b,{activePanel:d,theme:s,showLineNumbers:o}),g.jsx(S,{context:"simple",activePanel:d})]})]})}var sz=de.memo(({resource:e,onOpen:t,tabIndex:n=0,archivedLabel:r,createdLabel:i})=>g.jsxs("div",{onClick:()=>t(e),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),t(e))},role:"button",tabIndex:n,"aria-label":`Open resource: ${e.name}`,className:"semiont-resource-card",children:[g.jsxs("div",{className:"semiont-resource-card__header",children:[g.jsx("h4",{className:"semiont-resource-card__title",children:e.name}),e.archived&&g.jsx("span",{className:"semiont-resource-card__badge","data-type":"archived",children:r})]}),g.jsxs("div",{className:"semiont-resource-card__metadata",children:[g.jsxs("span",{className:"semiont-resource-card__date",children:[i," ",e.dateCreated?new Date(e.dateCreated).toLocaleDateString():"N/A"]}),e.entityTypes&&e.entityTypes.length>0&&g.jsxs("div",{className:"semiont-tags",children:[e.entityTypes.slice(0,2).map(a=>g.jsx("span",{className:"semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm",children:a},a)),e.entityTypes.length>2&&g.jsxs("span",{className:"semiont-tag semiont-tag--secondary semiont-tag--compact semiont-tag--rounded-sm",children:["+",e.entityTypes.length-2]})]})]})]}));sz.displayName="ResourceCard";function goe({recentDocuments:e,searchDocuments:t,entityTypes:n,isLoadingRecent:r,isSearching:i,searchQuery:a,onSearchQueryChange:s,theme:o,showLineNumbers:c,activePanel:d,onNavigateToResource:f,onNavigateToCompose:m,translations:p,ToolbarPanels:v}){const[b,S]=k.useState(""),x=a.trim()!=="",w=x?t:e,j=b?w.filter(L=>L.entityTypes&&L.entityTypes.includes(b)):w,T=pE(n.length+1,{orientation:"horizontal"}),A=pE(j.length,{orientation:"grid",cols:2}),Q=k.useRef(f);Q.current=f;const C=k.useCallback(L=>{S(L)},[]),R=k.useCallback(L=>{const P=Ry(L);P&&Q.current(P)},[]);if(r)return g.jsx("div",{className:"semiont-page__loading",children:g.jsx("p",{className:"semiont-page__loading-text",children:p.loadingKnowledgeBase})});const D=x&&t.length===0&&!i;return g.jsxs("div",{className:`semiont-page${d&&ga.includes(d)?" semiont-page--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-page__content",children:[g.jsxs("div",{className:"semiont-page__header",children:[g.jsx("h1",{className:"semiont-page__title",children:p.title}),g.jsx("p",{className:"semiont-page__subtitle",children:p.subtitle})]}),g.jsxs("div",{className:"semiont-card",children:[g.jsx("div",{className:"semiont-card__search-form",children:g.jsxs("div",{className:"semiont-card__search-wrapper",children:[g.jsx("input",{type:"text",value:a,onChange:L=>s(L.target.value),placeholder:p.searchPlaceholder,className:"semiont-card__search-input","aria-label":p.searchPlaceholder}),i&&g.jsx("span",{className:"semiont-card__search-status","aria-live":"polite",children:p.searching})]})}),n.length>0&&g.jsxs("div",{className:"semiont-card__filters",children:[g.jsx("h3",{className:"semiont-card__filters-label",children:p.filterByEntityType}),g.jsxs("div",{ref:T.containerRef,onKeyDown:T.handleKeyDown,className:"semiont-card__filter-buttons",role:"group","aria-label":"Entity type filters",children:[g.jsx("button",{onClick:()=>C(""),tabIndex:0,"aria-pressed":b==="",className:"semiont-card__filter-button","data-active":b==="",children:p.all}),n.map(L=>g.jsx("button",{onClick:()=>C(L),tabIndex:-1,"aria-pressed":b===L,className:"semiont-card__filter-button","data-active":b===L,children:L},L))]})]}),g.jsxs("div",{className:"semiont-card__documents",children:[g.jsx("h3",{className:"semiont-card__documents-label",children:x&&t.length>0?p.searchResults(t.length):b?p.documentsTaggedWith(b):p.recentResources}),D&&g.jsx("div",{className:"semiont-card__warning",children:g.jsx("p",{className:"semiont-card__warning-text",children:p.noResultsFound(a)})}),j.length>0?g.jsx("div",{ref:A.containerRef,onKeyDown:A.handleKeyDown,className:"semiont-card-grid",role:"group","aria-label":"Document grid",children:j.map((L,P)=>g.jsx(sz,{resource:L,onOpen:R,tabIndex:P===0?0:-1,archivedLabel:p.archived,createdLabel:p.created},Ry(L)))}):g.jsxs("div",{className:"semiont-card__empty",children:[g.jsx("p",{className:"semiont-card__empty-text",children:p.noResourcesAvailable}),!x&&g.jsx("button",{onClick:m,className:"semiont-card__empty-button",children:p.composeFirstResource})]})]})]})]}),g.jsxs("div",{className:"semiont-page__sidebar",children:[g.jsx(v,{activePanel:d,theme:o,showLineNumbers:c}),g.jsx($L,{context:"simple",activePanel:d})]})]})}function Lae(e){var s;const t=(s=Me(ot().activeSession$))==null?void 0:s.client,[n,r]=k.useState(void 0),[i,a]=k.useState(!0);return k.useEffect(()=>{if(!t||!e){a(!1);return}let o=!1;a(!0),t.auth.mediaToken(e).then(({token:d})=>{o||(r(d),a(!1))}).catch(()=>{o||a(!1)});const c=setInterval(()=>{t.auth.mediaToken(e).then(({token:d})=>{o||r(d)}).catch(()=>{})},240*1e3);return()=>{o=!0,clearInterval(c)}},[t,e]),{token:n,loading:i}}var Ia=Kn(zi()),CA={open:!1,annotationId:null,resourceId:null,defaultTitle:"",entityTypes:[]};function Dae(e,t,n,r,i){const a=so(),s=wZ(e),o=EZ(e,t),c=kZ(e,t),d=jZ(e),f=TZ(e,t,n);a.add(s),a.add(r),a.add(o),a.add(c),a.add(d),a.add(f);const m=e.browse.annotations(t).pipe((0,Ia.map)(D=>D??[])),p=m.pipe((0,Ia.map)(D=>{const L={highlights:[],comments:[],assessments:[],references:[],tags:[]};for(const P of D)sl(P)?L.highlights.push(P):ao(P)?L.comments.push(P):Xc(P)?L.assessments.push(P):hi(P)?L.references.push(P):ol(P)&&L.tags.push(P);return L})),v=e.browse.entityTypes().pipe((0,Ia.map)(D=>D??[])),b=e.browse.events(t).pipe((0,Ia.map)(D=>D??[])),S=e.browse.referencedBy(t).pipe((0,Ia.map)(D=>D??[])),x=new Ia.BehaviorSubject(""),w=new Ia.BehaviorSubject(!1),j=new Ia.BehaviorSubject(null),T="text/plain",A=T.startsWith("image/")||T==="application/pdf";!A&&T&&(w.next(!0),e.browse.resourceRepresentation(t,{accept:T}).then(({data:D})=>{x.next(zS(D,T)),w.next(!1)}).catch(()=>{w.next(!1)})),A&&e.auth.mediaToken(t).then(({token:D})=>j.next(D)).catch(()=>{});const Q=new Ia.BehaviorSubject(CA),C=e.subscribeToResource(t);a.add(C);const R=e.bus.get("bind:initiate").subscribe(D=>{Q.next({open:!0,annotationId:D.annotationId,resourceId:D.resourceId,defaultTitle:D.defaultTitle,entityTypes:D.entityTypes}),e.bus.get("gather:requested").next({correlationId:crypto.randomUUID(),annotationId:D.annotationId,resourceId:D.resourceId,options:{contextWindow:2e3}})});return a.add(()=>R.unsubscribe()),{beckon:s,browse:r,mark:o,gather:c,yield:f,annotations$:m,annotationGroups$:p,entityTypes$:v,events$:b,referencedBy$:S,content$:x.asObservable(),contentLoading$:w.asObservable(),mediaToken$:j.asObservable(),wizard$:Q.asObservable(),closeWizard:()=>Q.next(CA),dispose:()=>{Q.complete(),x.complete(),w.complete(),j.complete(),a.dispose()}}}function zae(){return typeof window>"u"?null:localStorage.getItem("activeToolbarPanel")||"knowledge-base"}function Iae(e){typeof window>"u"||(e?localStorage.setItem("activeToolbarPanel",e):localStorage.removeItem("activeToolbarPanel"))}function qae(){const e=ot();return g5(()=>Cae(e,{initialPanel:zae(),onPanelChange:Iae}))}function voe({resource:e,rUri:t,locale:n,Link:r,routes:i,ToolbarPanels:a,refetchDocument:s,streamStatus:o,knowledgeBaseName:c}){const d=hn("ReferenceWizard"),f=ot(),m=Me(f.activeSession$),p=m==null?void 0:m.client,{showError:v,showSuccess:b,showInfo:S}=pR(),{theme:x,setTheme:w}=lV(),{showLineNumbers:j,toggleLineNumbers:T}=Gx(),{hoverDelayMs:A}=v5(),{triggerSparkleAnimation:Q,clearNewAnnotationId:C}=Kx(),R=Sp(e)||"text/plain",D=IS(R)==="image",{content:L,loading:P}=uV(t,e,!D),{token:Z,loading:X}=Lae(t),B=D&&Z&&p?`${p.baseUrl}/api/resources/${t}?token=${Z}`:"",Y=D?B:L,H=D?X:P,q=qae(),I=g5(()=>Dae(p,t,n,q)),ee=Me(I.annotations$)??[],W=Me(I.annotationGroups$),z=Me(I.entityTypes$)??[],ce=Me(I.referencedBy$),se=ce??[],N=ce===void 0,le=Me(I.beckon.hoveredAnnotationId$)??null,pe=Me(I.mark.pendingAnnotation$)??null,Oe=Me(I.mark.assistingMotivation$)??null,Be=Me(I.mark.progress$)??null,Ae=Me(I.browse.activePanel$)??null,Ze=Me(I.browse.scrollToAnnotationId$)??null,xe=Me(I.browse.panelInitialTab$)??null,Ye=I.browse.onScrollCompleted,Ue=Me(I.yield.progress$)??null,Qe=Me(I.gather.context$)??null,De=Me(I.gather.loading$)??!1,mt=Me(I.gather.error$)??null,Ve=Me(I.wizard$),cn=(Ve==null?void 0:Ve.open)??!1,je=(Ve==null?void 0:Ve.annotationId)??null,We=(Ve==null?void 0:Ve.resourceId)??null,ge=(Ve==null?void 0:Ve.defaultTitle)??"",dt=(Ve==null?void 0:Ve.entityTypes)??[],Et=k.useCallback(()=>{I.closeWizard()},[I]),Zt=k.useCallback((_e,He)=>{C(Gn(_e)),I.yield.generate(_e,{title:He.title,storageUri:He.storagePath,prompt:He.prompt,language:He.language,sourceLanguage:gm(e),temperature:He.temperature,maxTokens:He.maxTokens,context:He.context})},[I,C,e]),et=k.useCallback(async(_e,He)=>{if(p)try{await p.bind.body(t,Gn(_e),[{op:"add",item:{type:"SpecificResource",source:He,purpose:"linking"}}]),b("Reference linked successfully")}catch(nn){v(`Failed to link reference: ${nn instanceof Error?nn.message:String(nn)}`)}},[t,p,b,v]),Mn=k.useCallback((_e,He,nn,rr,Dn)=>{sessionStorage.setItem(`gather-context:${He}`,JSON.stringify(_e));const dr=new URLSearchParams({annotationUri:He,sourceDocumentId:nn,name:rr,entityTypes:Dn.join(",")});f.emit("nav:push",{path:`/know/compose?${dr.toString()}`,reason:"compose-from-wizard"})},[m]);k.useEffect(()=>{if(e&&t){const _e=Sp(e);f.addOpenResource(t,e.name,_e||void 0,e.storageUri),typeof localStorage<"u"&&localStorage.setItem("lastViewedDocumentId",t)}},[e,t,f]),k.useEffect(()=>{pe&&f.emit("panel:open",{panel:"annotations"})},[pe,f]);const re=k.useCallback(async()=>{if(p)try{await p.mark.archive(t),await s()}catch(_e){console.error("Failed to archive document:",_e),v("Failed to archive document")}},[p,t,s,v]),fe=k.useCallback(async()=>{if(p)try{await p.mark.unarchive(t),await s()}catch(_e){console.error("Failed to unarchive document:",_e),v("Failed to unarchive document")}},[p,t,s,v]),Te=k.useCallback(async()=>{if(p)try{const He=(await p.yield.cloneToken(t)).token;f.emit("nav:push",{path:`/know/compose?mode=clone&token=${He}`,reason:"clone"})}catch(_e){console.error("Failed to generate clone token:",_e),v("Failed to generate clone link")}},[p,t,v,m]),$e=k.useCallback(({annotationId:_e})=>{Q(_e)},[Q]),rt=k.useCallback(_e=>{Q(_e.payload.annotation.id)},[Q]),Ct=k.useCallback(({message:_e})=>v(`Failed to create annotation: ${_e||"unknown error"}`),[v]),Cn=k.useCallback(({message:_e})=>v(`Failed to delete annotation: ${_e||"unknown error"}`),[v]),Jt=k.useCallback(()=>{},[]),Lt=k.useCallback(({message:_e})=>v(`Failed to update reference: ${_e}`),[v]),Ht=k.useCallback(({theme:_e})=>w(_e),[w]),lt=k.useCallback(_e=>{if(_e.resourceId===e.id)if(_e.jobType==="generation"){const He=_e.result,nn=He==null?void 0:He.resourceName;b(nn?`Resource "${nn}" created successfully!`:"Resource created successfully!")}else b("Annotation complete")},[e.id,b]),Vn=k.useCallback(_e=>{_e.resourceId===e.id&&(_e.jobType==="generation"?v(`Resource generation failed: ${_e.error}`):v(_e.error||"Annotation failed"))},[e.id,v]),mn=k.useCallback(({resourceId:_e})=>{if(i.resourceDetail){const He=i.resourceDetail(_e);f.emit("nav:push",{path:He,reason:"reference-link"})}},[i.resourceDetail,m]),va=k.useCallback(({entityType:_e})=>{if(i.know){const He=`${i.know}?entityType=${encodeURIComponent(_e)}`;f.emit("nav:push",{path:He,reason:"entity-type-filter"})}},[i.know,m]),Fr=k.useCallback(()=>{vn(_e=>!_e)},[]);ns({"mark:mode-toggled":Fr,"mark:archive":re,"mark:unarchive":fe,"yield:clone":Te,"beckon:sparkle":$e,"mark:added":rt,"mark:create-failed":Ct,"mark:delete-failed":Cn,"mark:body-updated":Jt,"bind:body-update-failed":Lt,"settings:theme-changed":Ht,"settings:line-numbers-toggled":T,"job:complete":lt,"job:fail":Vn,"mark:assist-cancelled":()=>S("Annotation cancelled"),"browse:reference-navigate":mn,"browse:entity-type-clicked":va});const{announceResourceLoading:Cr,announceResourceLoaded:At}=fV();k.useEffect(()=>{H?Cr(e.name):Y&&At(e.name)},[H,Y,e.name,Cr,At]);const Dt=e.entityTypes||[],kt=LS(e),pn=kt==null?void 0:kt.mediaType,gn=kt==null?void 0:kt.byteSize,[en,vn]=k.useState(()=>typeof window<"u"?localStorage.getItem("annotateMode")==="true":!1),An={...e,content:Y},Yt=k.useCallback(_e=>{_e&&(m==null||m.client.beckon.sparkle(Gn(_e)))},[m]),Ln=k.useCallback(_e=>{},[]);return g.jsxs("div",{className:`semiont-document-viewer${Ae?" semiont-document-viewer--panel-open":""}`,children:[g.jsxs("div",{className:"semiont-document-viewer__main",children:[g.jsxs("div",{className:"semiont-document-viewer__content",children:[g.jsx("div",{className:"semiont-document-viewer__header",children:g.jsx("div",{className:"semiont-document-viewer__header-inner",children:g.jsx("h2",{className:"semiont-document-viewer__title",children:e.name})})}),g.jsx("div",{className:"semiont-document-viewer__scrollable-body",lang:gm(e)||void 0,children:g.jsx(uF,{fallback:(_e,He)=>g.jsxs("div",{className:"semiont-document-viewer__error",children:[g.jsx("h3",{className:"semiont-document-viewer__error-title",children:"Error loading document viewer"}),g.jsx("p",{className:"semiont-document-viewer__error-message",children:_e.message}),g.jsx("button",{onClick:He,className:"semiont-document-viewer__error-button",children:"Try again"})]}),children:H?g.jsx("div",{className:"semiont-document-viewer__loading",children:"Loading document content..."}):g.jsx(one,{resource:An,annotations:W??{highlights:[],comments:[],assessments:[],references:[],tags:[]},generatingReferenceId:(Ue==null?void 0:Ue.annotationId)??null,showLineNumbers:j,hoverDelayMs:A,hoveredAnnotationId:le})})})]}),g.jsxs("div",{className:"semiont-document-viewer__sidebar",children:[g.jsxs(a,{activePanel:Ae,theme:x,showLineNumbers:j,width:Ae==="jsonld"?"w-[600px]":Ae==="annotations"?"w-[400px]":"w-64",children:[en&&e.archived&&g.jsx("div",{className:"semiont-document-viewer__archived-status",children:g.jsx("div",{className:"semiont-document-viewer__archived-text",children:"📦 Archived"})}),Ae==="annotations"&&!e.archived&&g.jsx(Qne,{annotations:ee,annotators:cr,annotateMode:en,assistingMotivation:Oe,progress:Be,pendingAnnotation:pe,allEntityTypes:z,generatingReferenceId:(Ue==null?void 0:Ue.annotationId)??null,referencedBy:se,referencedByLoading:N,resourceId:t,locale:n,sourceLanguage:gm(e),scrollToAnnotationId:Ze,hoveredAnnotationId:le,onScrollCompleted:Ye,initialTab:xe==null?void 0:xe.tab,initialTabGeneration:xe==null?void 0:xe.generation,Link:r,routes:i}),Ae==="history"&&g.jsx(YH,{rUri:t,hoveredAnnotationId:le,onEventHover:Yt,onEventClick:Ln,Link:r,routes:i}),Ae==="info"&&g.jsx(Tne,{resourceId:t,documentEntityTypes:Dt,documentLocale:gm(e),primaryMediaType:pn,primaryByteSize:gn,storageUri:e.storageUri,isArchived:e.archived??!1,dateCreated:e.dateCreated,dateModified:e.dateModified,creationMethod:e.creationMethod,wasAttributedTo:e.wasAttributedTo,wasDerivedFrom:e.wasDerivedFrom,generator:e.generator}),Ae==="collaboration"&&g.jsx(hne,{state:o,eventCount:0,knowledgeBaseName:c}),Ae==="jsonld"&&g.jsx(Sne,{resource:e})]}),g.jsx($L,{context:"document",activePanel:Ae,isArchived:e.archived??!1})]})]}),g.jsx(jie,{isOpen:cn,onClose:Et,annotationId:je,resourceId:We,defaultTitle:ge,entityTypes:dt,locale:n,context:Qe,contextLoading:De,contextError:mt,onGenerateSubmit:Zt,onLinkResource:et,onComposeNavigate:Mn,translations:{gatherTitle:d("gatherTitle"),configureGenerationTitle:d("configureGenerationTitle"),configureSearchTitle:d("configureSearchTitle"),searchResultsTitle:d("searchResultsTitle"),sourceContextLabel:d("sourceContextLabel"),connectionsLabel:d("connectionsLabel"),citedByLabel:d("citedByLabel"),userHintLabel:d("userHintLabel"),userHintPlaceholder:d("userHintPlaceholder"),loadingContext:d("loadingContext"),failedContext:d("failedContext"),cancel:d("cancel"),search:d("search"),searching:d("searching"),generate:d("generate"),compose:d("compose"),resolutionStrategyLabel:d("resolutionStrategyLabel"),back:d("back"),link:d("link"),score:d("score"),noResults:d("noResults"),resourceTitle:d("resourceTitle"),resourceTitlePlaceholder:d("resourceTitlePlaceholder"),additionalInstructions:d("additionalInstructions"),additionalInstructionsPlaceholder:d("additionalInstructionsPlaceholder"),language:d("language"),languageHelp:d("languageHelp"),creativity:d("creativity"),creativityFocused:d("creativityFocused"),creativityCreative:d("creativityCreative"),maxLength:d("maxLength"),maxLengthHelp:d("maxLengthHelp"),maxResults:d("maxResults"),semanticScoring:d("semanticScoring"),semanticScoringHelp:d("semanticScoringHelp")}})]})}var Bae=Kn(zi());function Ooe(e){const t=new Bae.BehaviorSubject(!1),n=async()=>{t.next(!0);try{await e.auth.logout()}catch{}finally{t.next(!1)}};return{isLoggingOut$:t.asObservable(),logout:n,dispose:()=>{t.complete()}}}var zo=Kn(zi());function boe(e,t,n,r){const i=so();i.add(t);const a=!!(n.annotationUri&&n.sourceDocumentId&&n.name),s=n.mode==="clone"&&!!n.token,o=s?"clone":a?"reference":"new",c=new zo.BehaviorSubject(o),d=new zo.BehaviorSubject(!0),f=new zo.BehaviorSubject(null),m=new zo.BehaviorSubject(null),p=new zo.BehaviorSubject(null),v=new zo.BehaviorSubject(null),b=e.browse.entityTypes().pipe((0,zo.map)(x=>x??[]));if(a){const x=n.entityTypes?n.entityTypes.split(","):[];if(m.next({annotationUri:n.annotationUri,sourceDocumentId:n.sourceDocumentId,name:n.name,entityTypes:x}),n.storedContext)try{p.next(JSON.parse(n.storedContext))}catch{}d.next(!1)}else s?(async()=>{try{const x=await e.yield.fromToken(n.token);if(x&&r){const w=Sr(x["@id"]),j=Sp(x)||"text/plain",{data:T}=await e.browse.resourceRepresentation(w,{accept:j}),A=zS(T,j);f.next({sourceResource:x,sourceContent:A})}}catch{}d.next(!1)})():d.next(!1);const S=async x=>{if(x.mode==="clone")return(await e.yield.createFromToken({token:n.token,name:x.name,content:x.content,archiveOriginal:x.archiveOriginal??!0})).resourceId;let w,j;if(x.file)w=x.file,j=x.format??"application/octet-stream";else{const Q=new Blob([x.content||""],{type:x.format??"application/octet-stream"}),C=x.format==="text/plain"?".txt":x.format==="text/html"?".html":".md";w=new File([Q],x.name+C,{type:x.format??"application/octet-stream"}),j=x.format??"application/octet-stream"}const T=x.charset&&!x.file?`${j}; charset=${x.charset}`:j,A=await new Promise((Q,C)=>{e.yield.resource({name:x.name,file:w,format:T,entityTypes:x.entityTypes||[],language:x.language,creationMethod:"ui",storageUri:x.storageUri}).subscribe({next:R=>{v.next(R),R.phase==="finished"&&Q(R.resourceId)},error:R=>{v.next(null),C(R)},complete:()=>v.next(null)})});return x.mode==="reference"&&x.annotationUri&&x.sourceDocumentId&&await e.bind.body(Sr(x.sourceDocumentId),Gn(x.annotationUri),[{op:"add",item:{type:"SpecificResource",source:A,purpose:"linking"}}]),A};return{browse:t,mode$:c.asObservable(),loading$:d.asObservable(),cloneData$:f.asObservable(),referenceData$:m.asObservable(),gatheredContext$:p.asObservable(),entityTypes$:b,uploadProgress$:v.asObservable(),save:S,dispose:()=>{c.complete(),d.complete(),f.complete(),m.complete(),p.complete(),i.dispose()}}}var Xae=Kn(zi());function yoe(e,t){const n=e.browse.resource(t),r=n,i=n.pipe((0,Xae.map)(a=>a===void 0));return{resource$:r,isLoading$:i,invalidate:()=>e.browse.invalidateResourceDetail(t),dispose:()=>{}}}var Hm=Kn(zi());function Soe(e,t){const n=so();n.add(t);const r=new Hm.BehaviorSubject([]),i=new Hm.BehaviorSubject(null),a=new Hm.BehaviorSubject(!0),s=new Hm.BehaviorSubject(!0),o=()=>{a.next(!0),e.admin.users().then(f=>{r.next(f.users??[]),a.next(!1)}).catch(()=>a.next(!1))},c=()=>{s.next(!0),e.admin.userStats().then(f=>{i.next(f.stats??null),s.next(!1)}).catch(()=>s.next(!1))};o(),c();const d=async(f,m)=>{await e.admin.updateUser(f,m),o(),c()};return{browse:t,users$:r.asObservable(),stats$:i.asObservable(),usersLoading$:a.asObservable(),statsLoading$:s.asObservable(),updateUser:d,dispose:()=>{r.complete(),i.complete(),a.complete(),s.complete(),n.dispose()}}}var jy=Kn(zi());function xoe(e,t){const n=so();n.add(t);const r=new jy.BehaviorSubject([]),i=new jy.BehaviorSubject([]),a=new jy.BehaviorSubject(!0);return e.admin.oauthConfig().then(s=>{const o=s;r.next(o.providers??[]),i.next(o.allowedDomains??[]),a.next(!1)}).catch(()=>a.next(!1)),{browse:t,providers$:r.asObservable(),allowedDomains$:i.asObservable(),isLoading$:a.asObservable(),dispose:()=>{r.complete(),i.complete(),a.complete(),n.dispose()}}}var Ls=Kn(zi()),Zae=Kn(jx());function _oe(e,t,n){const r=so();r.add(e);const i=new Ls.BehaviorSubject(null),a=new Ls.BehaviorSubject(null),s=new Ls.BehaviorSubject(null),o=new Ls.BehaviorSubject(void 0),c=new Ls.BehaviorSubject(void 0),d=new Ls.BehaviorSubject(!1),f=new Ls.BehaviorSubject(!1),m=S=>{i.next(S),s.next(null),o.next(void 0),c.next(void 0),a.next({format:S.name.endsWith(".tar.gz")||S.name.endsWith(".gz")?"semiont-linked-data":"unknown",version:1,sourceUrl:"",stats:{}})},p=()=>{i.next(null),a.next(null),s.next(null),o.next(void 0),c.next(void 0)},v=async()=>{d.next(!0);try{const S=await t(),x=await new Response(S.stream).blob(),w=S.filename??`semiont-export-${Date.now()}.tar.gz`;return{blob:x,filename:w}}finally{d.next(!1)}},b=async()=>{const S=i.getValue();if(S){f.next(!0),s.next("started"),o.next(void 0),c.next(void 0);try{await(0,Ls.lastValueFrom)(n(S).pipe((0,Zae.tap)(x=>{s.next(x.phase),o.next(x.message),x.result&&c.next(x.result)})))}finally{f.next(!1)}}};return{browse:e,selectedFile$:i.asObservable(),preview$:a.asObservable(),importPhase$:s.asObservable(),importMessage$:o.asObservable(),importResult$:c.asObservable(),isExporting$:d.asObservable(),isImporting$:f.asObservable(),selectFile:m,cancelImport:p,doExport:v,doImport:b,dispose:()=>{i.complete(),a.complete(),s.complete(),o.complete(),c.complete(),d.complete(),f.complete(),r.dispose()}}}var AA=Kn(zi());function woe(e){const t=so(),n=new AA.BehaviorSubject(null),r=new AA.BehaviorSubject(!1);e.auth.me().then(a=>n.next(a)).catch(()=>{});const i=async()=>{r.next(!0);try{await e.auth.acceptTerms(),n.next({...n.getValue(),termsAcceptedAt:new Date().toISOString()})}finally{r.next(!1)}};return{userData$:n.asObservable(),isProcessing$:r.asObservable(),acceptTerms:i,dispose:()=>{n.complete(),r.complete(),t.dispose()}}}var Ty=Kn(zi()),$ae=10,Vae=20;function koe(e,t){const n=so(),r=fQ(c=>e.browse.resources({search:c,limit:Vae}));n.add(r),n.add(t);const i=e.browse.resources({limit:$ae,archived:!1}),a=i.pipe((0,Ty.map)(c=>c??[])),s=i.pipe((0,Ty.map)(c=>c===void 0)),o=e.browse.entityTypes().pipe((0,Ty.map)(c=>c??[]));return{browse:t,search:r,recentResources$:a,entityTypes$:o,isLoadingRecent$:s,dispose:()=>n.dispose()}}var ud=Kn(zi());function joe(e,t){const n=so();n.add(t);const r=new ud.BehaviorSubject(""),i=new ud.BehaviorSubject(""),a=new ud.BehaviorSubject(!1),s=e.browse.entityTypes(),o=s.pipe((0,ud.map)(f=>f??[])),c=s.pipe((0,ud.map)(f=>f===void 0)),d=async()=>{const f=r.getValue().trim();if(f){i.next(""),a.next(!0);try{await e.frame.addEntityType(f),r.next("")}catch(m){i.next(m instanceof Error?m.message:"Failed to add entity type")}finally{a.next(!1)}}};return{browse:t,entityTypes$:o,isLoading$:c,newTag$:r.asObservable(),error$:i.asObservable(),isAdding$:a.asObservable(),setNewTag:f=>r.next(f),addTag:d,dispose:()=>{r.complete(),i.complete(),a.complete(),n.dispose()}}}function Uae({children:e}){const t=cq();return g.jsxs(fF,{resetKeys:[t.pathname],children:[g.jsx(MH,{}),g.jsx(RH,{}),e]})}const Yae=de.lazy(()=>Pe(()=>import("./layout-C-P8uUyx.js"),__vite__mapDeps([4,5,1,6,3]))),Fae=de.lazy(()=>Pe(()=>import("./page-D6saO7D3.js"),__vite__mapDeps([7,1,6,3]))),Wae=de.lazy(()=>Pe(()=>import("./page-E4A7Vkwl.js"),__vite__mapDeps([8,1,9,5,6,3,10,11]))),Hae=de.lazy(()=>Pe(()=>import("./page-OFxNMOoF.js"),__vite__mapDeps([12,1,9,5,6,3,10,11]))),Gae=de.lazy(()=>Pe(()=>import("./page-Dj5UZ_d6.js"),__vite__mapDeps([13,1,6,3,9,5,10,11]))),Kae=de.lazy(()=>Pe(()=>import("./page-BfKm2iQ2.js"),__vite__mapDeps([14,1,6,3]))),Jae=de.lazy(()=>Pe(()=>import("./page-RRMlL_4-.js"),__vite__mapDeps([15,1,6,3,9,5,10,11]))),ese=de.lazy(()=>Pe(()=>import("./page-DyGU2n2w.js"),__vite__mapDeps([16,1,9,5,6,3,10,11]))),tse=de.lazy(()=>Pe(()=>import("./page-8S-MQzsq.js"),__vite__mapDeps([17,1,6,3]))),nse=de.lazy(()=>Pe(()=>import("./layout-BO_gP65g.js"),__vite__mapDeps([18,1,6,3,19,10,20,11,9,5]))),rse=de.lazy(()=>Pe(()=>import("./page-B-leMN2k.js"),__vite__mapDeps([21,1,6,3]))),ise=de.lazy(()=>Pe(()=>import("./page-3CgxsYbh.js"),__vite__mapDeps([22,1,6,3,19,10]))),ase=de.lazy(()=>Pe(()=>import("./page-B5Dz_Nh-.js"),__vite__mapDeps([23,1,6,3,19,10]))),sse=de.lazy(()=>Pe(()=>import("./page-CqV1yD4w.js"),__vite__mapDeps([24,1,6,3,11,19,10]))),ose=de.lazy(()=>Pe(()=>import("./layout-DVrTweI_.js"),__vite__mapDeps([25,1,6,3,9,5,10,26,27,20,11]))),lse=de.lazy(()=>Pe(()=>import("./page-C6_MlYjr.js"),__vite__mapDeps([28,6,1,3]))),cse=de.lazy(()=>Pe(()=>import("./client-BrB8xl9P.js"),__vite__mapDeps([29,1,19,6,3,10]))),use=de.lazy(()=>Pe(()=>import("./client-D6q4B6bq.js"),__vite__mapDeps([30,1,19,6,3,10]))),dse=de.lazy(()=>Pe(()=>import("./client-C5p1ZZtM.js"),__vite__mapDeps([31,1,19,6,3,10]))),fse=de.lazy(()=>Pe(()=>import("./page-Br5SeiDL.js"),__vite__mapDeps([32,1,19,6,3,10,27]))),hse=de.lazy(()=>Pe(()=>import("./layout-C7qxASOF.js"),__vite__mapDeps([33,1,6,3,26,20,9,5,10,11]))),mse=de.lazy(()=>Pe(()=>import("./page-DaL8x94G.js"),__vite__mapDeps([34,1,6,3]))),pse=de.lazy(()=>Pe(()=>import("./page-D7ZN9Yo5.js"),__vite__mapDeps([35,1,19,6,3,10]))),gse=de.lazy(()=>Pe(()=>import("./page-Cg1IhnH2.js"),__vite__mapDeps([36,1,19,6,3,10]))),vse=de.lazy(()=>Pe(()=>import("./page-CXE3Zhkq.js"),__vite__mapDeps([37,1,19,6,3,10]))),Ose=de.lazy(()=>Pe(()=>import("./client-SkLMw-j7.js"),__vite__mapDeps([38,1,19,6,3,10]))),bse=de.lazy(()=>Pe(()=>import("./not-found-CVsHHn2n.js"),__vite__mapDeps([39,6,1,3])));function yse({children:e}){const{locale:t}=hq(),{i18n:n}=vq();return k.useEffect(()=>{if(!t)return;const r=Ay(t)?t:Ec;n.language!==r&&n.changeLanguage(r)},[t,n]),!t||!Ay(t)?g.jsx(RA,{to:`/${Ec}`,replace:!0}):g.jsx(g.Fragment,{children:e})}function Sse(){return g.jsx(Uae,{children:g.jsx(fq,{})})}function xse(){const e=dq();return k.useEffect(()=>{const t=navigator.language.split("-")[0]??Ec,n=Ay(t)?t:Ec;e(`/${n}`,{replace:!0})},[e]),null}function _se(){return g.jsx(de.Suspense,{fallback:null,children:g.jsxs(uq,{children:[g.jsx(xt,{path:"/",element:g.jsx(xse,{})}),g.jsxs(xt,{path:"/:locale",element:g.jsx(yse,{children:g.jsx(Yae,{})}),children:[g.jsx(xt,{index:!0,element:g.jsx(Fae,{})}),g.jsx(xt,{path:"about",element:g.jsx(Wae,{})}),g.jsx(xt,{path:"privacy",element:g.jsx(Hae,{})}),g.jsx(xt,{path:"terms",element:g.jsx(Gae,{})}),g.jsx(xt,{path:"auth/connect",element:g.jsx(Kae,{})}),g.jsx(xt,{path:"auth/signup",element:g.jsx(Jae,{})}),g.jsx(xt,{path:"auth/error",element:g.jsx(ese,{})}),g.jsxs(xt,{element:g.jsx(Sse,{}),children:[g.jsx(xt,{path:"auth/welcome",element:g.jsx(tse,{})}),g.jsxs(xt,{path:"know",element:g.jsx(nse,{}),children:[g.jsx(xt,{index:!0,element:g.jsx(rse,{})}),g.jsx(xt,{path:"discover",element:g.jsx(ise,{})}),g.jsx(xt,{path:"compose",element:g.jsx(ase,{})}),g.jsx(xt,{path:"resource/:id",element:g.jsx(sse,{})})]}),g.jsxs(xt,{path:"admin",element:g.jsx(ose,{}),children:[g.jsx(xt,{index:!0,element:g.jsx(lse,{})}),g.jsx(xt,{path:"users",element:g.jsx(cse,{})}),g.jsx(xt,{path:"security",element:g.jsx(use,{})}),g.jsx(xt,{path:"exchange",element:g.jsx(dse,{})}),g.jsx(xt,{path:"devops",element:g.jsx(fse,{})})]}),g.jsxs(xt,{path:"moderate",element:g.jsx(hse,{}),children:[g.jsx(xt,{index:!0,element:g.jsx(mse,{})}),g.jsx(xt,{path:"recent",element:g.jsx(pse,{})}),g.jsx(xt,{path:"entity-tags",element:g.jsx(gse,{})}),g.jsx(xt,{path:"tag-schemas",element:g.jsx(vse,{})}),g.jsx(xt,{path:"linked-data",element:g.jsx(Ose,{})})]})]}),g.jsx(xt,{path:"*",element:g.jsx(bse,{})})]}),g.jsx(xt,{path:"*",element:g.jsx(RA,{to:`/${Ec}`,replace:!0})})]})})}const wse={},PA=wse.VITE_OTEL_OTLP_ENDPOINT;PA&&Pe(async()=>{const{initObservabilityWeb:e}=await import("./web-C8yeWrxL.js");return{initObservabilityWeb:e}},__vite__mapDeps([40,1,3])).then(({initObservabilityWeb:e})=>{e({serviceName:"semiont-frontend",otlpEndpoint:PA})});const oz=document.getElementById("root");if(!oz)throw new Error("Root element not found");Tq.createRoot(oz).render(g.jsx(de.StrictMode,{children:g.jsx(mq,{children:g.jsx(_se,{})})}));const kse=Object.freeze(Object.defineProperty({__proto__:null,AnnotateToolbar:KA,AnnotateView:nP,AnnotationHistory:ZA,AssessmentPanel:UA,CollaborationPanel:XA,CollapsibleResourceNavigation:JA,CommentsPanel:$A,HighlightPanel:VA,KeyboardShortcuts:GA,ReferenceWizard:rP,ReferencesPanel:HA,ResourceInfoPanel:BA,ResourceViewer:eP,Settings:tP,StatisticsPanel:WA,TaggingPanel:YA,Toolbar:qA,UnifiedAnnotationsPanel:FA,default:Ho},Symbol.toStringTag,{value:"Module"}));export{Ooe as $,uoe as A,hoe as B,noe as C,joe as D,foe as E,moe as F,Ec as G,Ay as H,Rn as I,WS as J,Gse as K,ooe as L,eoe as M,Use as N,Nne as O,toe as P,Hse as Q,goe as R,tg as S,$L as T,ioe as U,Jse as V,doe as W,Kse as X,Bse as Y,Xse as Z,Wse as _,coe as a,Zse as a0,Ise as a1,qse as a2,Qse as a3,gZ as a4,Go as a5,Cse as a6,_d as a7,Ko as a8,oV as a9,ga as aa,mF as ab,Fse as ac,Mse as ad,Nse as ae,Rse as af,Vse as ag,$se as ah,Pie as ai,Ha as aj,JP as ak,Ase as al,sQ as am,FS as an,US as ao,Xy as ap,Zy as aq,bX as ar,Gd as as,Pse as at,hX as au,Ks as av,Z2 as aw,kd as b,Me as c,pR as d,g5 as e,woe as f,qae as g,lV as h,Gx as i,g as j,ns as k,koe as l,boe as m,v5 as n,poe as o,yoe as p,roe as q,Sr as r,voe as s,loe as t,ot as u,Soe as v,soe as w,xoe as x,aoe as y,_oe as z};
169
- //# sourceMappingURL=index-QjYSiWWG.js.map