@tickernelz/paperclip-pro-ui 2026.925.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (424) hide show
  1. package/README.md +30 -0
  2. package/dist/android-chrome-192x192.png +0 -0
  3. package/dist/android-chrome-512x512.png +0 -0
  4. package/dist/announcement-preview.svg +11 -0
  5. package/dist/apple-touch-icon.png +0 -0
  6. package/dist/assets/AgentAvatar-BR1Z_L_Z.js +1 -0
  7. package/dist/assets/AgentIdentity-BgihkjQU.js +1 -0
  8. package/dist/assets/Agents.production-BsKiBknO.js +2 -0
  9. package/dist/assets/CompanyActivity.production-Bp4gxpq3.js +1 -0
  10. package/dist/assets/CompanyExport-BvUhFYBr.js +4 -0
  11. package/dist/assets/CompanySkills.production-htb9HH0N.js +10 -0
  12. package/dist/assets/Costs.production-CzulNW6Y.js +1 -0
  13. package/dist/assets/EmptyState-DOb3I5aU.js +1 -0
  14. package/dist/assets/MarkdownBody-AdwNLx7A.js +16 -0
  15. package/dist/assets/MarkdownEditor-B3NYD32f.js +85 -0
  16. package/dist/assets/OrgChart.production-DbBigpMZ.js +1 -0
  17. package/dist/assets/PageSkeleton-C-C3Xlc_.js +1 -0
  18. package/dist/assets/RoutineDetail.production-DJn3YZiR.js +1 -0
  19. package/dist/assets/RoutineRunVariablesDialog-BkLLbP3a.js +5 -0
  20. package/dist/assets/Routines.production-BBDkh1yN.js +1 -0
  21. package/dist/assets/SidebarContext-9UFQ2Pex.js +1 -0
  22. package/dist/assets/StatusIcon-DMDp_WJw.js +1 -0
  23. package/dist/assets/abnfDiagram-VCTEODGH-wiE_K2ku.js +1 -0
  24. package/dist/assets/agents-DrLpWAcm.js +1 -0
  25. package/dist/assets/apl-MHzTCvfx.js +1 -0
  26. package/dist/assets/arc-BQ55EiX2.js +1 -0
  27. package/dist/assets/architecture-7GRP2DOG-B-bRgmfI.js +1 -0
  28. package/dist/assets/architectureDiagram-5GKGNRK7-BkhBoP5_.js +36 -0
  29. package/dist/assets/array-CL5Tisss.js +1 -0
  30. package/dist/assets/asciiarmor-DFLNSgns.js +1 -0
  31. package/dist/assets/asn1-CfPVWRYE.js +1 -0
  32. package/dist/assets/asterisk-CJ4OeA7Y.js +1 -0
  33. package/dist/assets/badge-BLr1M3ne.js +1 -0
  34. package/dist/assets/blockDiagram-I7D4REHJ-fyVn7r-9.js +129 -0
  35. package/dist/assets/bot-CET4VfU-.js +1 -0
  36. package/dist/assets/brainfuck-NEHkmXMc.js +1 -0
  37. package/dist/assets/button-DCI8NFig.js +1 -0
  38. package/dist/assets/c4Diagram-7LVT6UL2-BqC3qTZS.js +38 -0
  39. package/dist/assets/card-BD8MkPAL.js +1 -0
  40. package/dist/assets/channel-0B5iAV5A.js +1 -0
  41. package/dist/assets/character-CguPM7IG.js +1 -0
  42. package/dist/assets/check-C6myARng.js +1 -0
  43. package/dist/assets/checkbox-CmYq-YMP.js +1 -0
  44. package/dist/assets/chevron-down-D2wNtbQf.js +1 -0
  45. package/dist/assets/chevron-right-CU6xIk8W.js +1 -0
  46. package/dist/assets/chunk-2Q5K7J3B-CkPHWFj-.js +1 -0
  47. package/dist/assets/chunk-4HAMMTFA-CGGd_Pxz.js +62 -0
  48. package/dist/assets/chunk-5VM5RSS4-2H3r6wq0.js +15 -0
  49. package/dist/assets/chunk-75Z2AOVW-BaPl5WA6.js +2 -0
  50. package/dist/assets/chunk-DU6HZSFF-2P5iNHqg.js +127 -0
  51. package/dist/assets/chunk-F27PBJKO-Ci7GmRgM.js +1 -0
  52. package/dist/assets/chunk-FOHPRMQF-7Ogwfo6e.js +153 -0
  53. package/dist/assets/chunk-GMAD6QVW-BfvaaEBW.js +70 -0
  54. package/dist/assets/chunk-GVQU2GXP-Cwp_Wpj2.js +1 -0
  55. package/dist/assets/chunk-IMKFNOWR-BjXu-u1C.js +231 -0
  56. package/dist/assets/chunk-JWPE2WC7--HEGjv3t.js +1 -0
  57. package/dist/assets/chunk-L3NEJ4N5-JUd1UqX1.js +1 -0
  58. package/dist/assets/chunk-OSK3NFVY-DlrxddG-.js +10 -0
  59. package/dist/assets/chunk-P2QGCYS3-CjqEi3mx.js +1 -0
  60. package/dist/assets/chunk-POPQ4Y6H-BytmIqFc.js +1 -0
  61. package/dist/assets/chunk-PWAF6VOD-CR3rNBNB.js +1 -0
  62. package/dist/assets/chunk-SHT3W25Y-B1Klag0Z.js +168 -0
  63. package/dist/assets/chunk-SVP7TREG-A4BO1_5v.js +88 -0
  64. package/dist/assets/chunk-TICWLB2K-B4lRXha0.js +206 -0
  65. package/dist/assets/chunk-XXDRQBXY-BhrH-9FX.js +1 -0
  66. package/dist/assets/chunk-Y2CYZVJY-OvsAdhaO.js +1 -0
  67. package/dist/assets/classDiagram-ZZMXUADV-icHQAbF4.js +1 -0
  68. package/dist/assets/classDiagram-v2-VYDZK3BY-icHQAbF4.js +1 -0
  69. package/dist/assets/clike-CIx9nZSv.js +1 -0
  70. package/dist/assets/clipboard-BZT4l65i.js +1 -0
  71. package/dist/assets/clojure-DFaIEz5O.js +1 -0
  72. package/dist/assets/cmake-koz-qBlo.js +1 -0
  73. package/dist/assets/cobol-Bo8Zw9gB.js +1 -0
  74. package/dist/assets/coffeescript-CXYzYf-Y.js +1 -0
  75. package/dist/assets/commonlisp-C4OOCwkD.js +1 -0
  76. package/dist/assets/company-members-C1IoXITE.js +1 -0
  77. package/dist/assets/cose-bilkent-JH36ORCC-ShY6JvWh.js +1 -0
  78. package/dist/assets/createLucideIcon-D-iIM3hK.js +92 -0
  79. package/dist/assets/crystal-BlJXQDvy.js +1 -0
  80. package/dist/assets/css-DEZwfVpY.js +1 -0
  81. package/dist/assets/cynefin-OW5HDTMX-SmJ8tLYh.js +1 -0
  82. package/dist/assets/cynefinDiagram-5FMLGOSQ-Qp2NNXUx.js +62 -0
  83. package/dist/assets/cypher-z2oFsVv2.js +1 -0
  84. package/dist/assets/cytoscape.esm-B68Piqei.js +321 -0
  85. package/dist/assets/d-Dkt6y7AQ.js +1 -0
  86. package/dist/assets/dagre-Bnei_7lW.js +1 -0
  87. package/dist/assets/dagre-GXQ25YYZ-C1bu-Sbk.js +4 -0
  88. package/dist/assets/defaultLocale-C2Bpu8Ih.js +1 -0
  89. package/dist/assets/definition-qmfin__X.js +1 -0
  90. package/dist/assets/diagram-S7CK7UJ4-D0cqRe3j.js +30 -0
  91. package/dist/assets/diagram-UQ7AKVKN-DdEgR6LR.js +41 -0
  92. package/dist/assets/diagram-VSXAHHWV-B_APewr5.js +3 -0
  93. package/dist/assets/diagram-VX7I27RA-B2quR8-z.js +24 -0
  94. package/dist/assets/diagram-Z3DM3KII-BpQRCt5N.js +24 -0
  95. package/dist/assets/diff-C60bAYOU.js +1 -0
  96. package/dist/assets/dist-B0TRtKS8.js +1 -0
  97. package/dist/assets/dist-B3Uu-urE.js +1 -0
  98. package/dist/assets/dist-BRrJTSwu.js +1 -0
  99. package/dist/assets/dist-BX-OCtve.js +7 -0
  100. package/dist/assets/dist-BXoB5t8y.js +1 -0
  101. package/dist/assets/dist-BeN6V24C.js +1 -0
  102. package/dist/assets/dist-Bs8B1orN.js +1 -0
  103. package/dist/assets/dist-BuzarGBs.js +1 -0
  104. package/dist/assets/dist-C2jegCUe.js +2 -0
  105. package/dist/assets/dist-C8CoeHVO.js +6 -0
  106. package/dist/assets/dist-CBo4NvFW.js +1 -0
  107. package/dist/assets/dist-CSbL7rtN.js +1 -0
  108. package/dist/assets/dist-CWrRKmYk.js +1 -0
  109. package/dist/assets/dist-CXeuJs-w.js +1 -0
  110. package/dist/assets/dist-Cc3Bt6H4.js +1 -0
  111. package/dist/assets/dist-Cj4C2HPs.js +1 -0
  112. package/dist/assets/dist-DCJXgQu0.js +13 -0
  113. package/dist/assets/dist-DKJ0FdKS.js +1 -0
  114. package/dist/assets/dist-DZgNtG8a.js +1 -0
  115. package/dist/assets/dist-DoBOMP6Y.js +1 -0
  116. package/dist/assets/dist-DpmnjHX9.js +1 -0
  117. package/dist/assets/dist-DsLYqWnM.js +1 -0
  118. package/dist/assets/dist-DyyIM2uF.js +3 -0
  119. package/dist/assets/dist-YH7EZ8d1.js +1 -0
  120. package/dist/assets/dist-oQmcCiSD.js +1 -0
  121. package/dist/assets/dist-sLIQSVjm.js +13 -0
  122. package/dist/assets/dist-xQwUswee.js +1 -0
  123. package/dist/assets/dockerfile-BttNdtK0.js +1 -0
  124. package/dist/assets/dtd-CCVZU5Da.js +1 -0
  125. package/dist/assets/dylan-3pmV5wzs.js +1 -0
  126. package/dist/assets/ebnf-bm-I2WIh.js +1 -0
  127. package/dist/assets/ebnfDiagram-PWID7BFC-C9x73jSZ.js +1 -0
  128. package/dist/assets/ecl-BIv3PrZb.js +1 -0
  129. package/dist/assets/eiffel-DuLnr4-r.js +1 -0
  130. package/dist/assets/elm-njbaCU-L.js +1 -0
  131. package/dist/assets/environments-Cd-g_MmN.js +1 -0
  132. package/dist/assets/erDiagram-RLTQ6QDP-Dkp7z94L.js +99 -0
  133. package/dist/assets/erlang-CuhOC2I8.js +1 -0
  134. package/dist/assets/eventmodeling-NTZA5JFV-CCSRuDgA.js +1 -0
  135. package/dist/assets/external-link-BKz-OKDG.js +1 -0
  136. package/dist/assets/factor-CM3-9V3b.js +1 -0
  137. package/dist/assets/fcl-nWsMJ92o.js +1 -0
  138. package/dist/assets/file-text-DXa-cUrm.js +1 -0
  139. package/dist/assets/flowDiagram-HODETNUW-CDvpIOlT.js +1 -0
  140. package/dist/assets/forth-BQ9HrCVY.js +1 -0
  141. package/dist/assets/fortran-DHJe28ev.js +1 -0
  142. package/dist/assets/ganttDiagram-EL5Y4UJY-CJs7mNJX.js +292 -0
  143. package/dist/assets/gas-ByO0qYMr.js +1 -0
  144. package/dist/assets/gherkin-CwOmHL5K.js +1 -0
  145. package/dist/assets/gitGraph-4MIJSDKK-SUTvd_QT.js +1 -0
  146. package/dist/assets/gitGraphDiagram-WWUBYQGX-ByeD7NPE.js +106 -0
  147. package/dist/assets/graphlib-DHhK3saS.js +1 -0
  148. package/dist/assets/groovy-ByXGF8cx.js +1 -0
  149. package/dist/assets/haskell-CHSpCNOy.js +1 -0
  150. package/dist/assets/haxe-P2jh68ck.js +1 -0
  151. package/dist/assets/health-Dc13TJNg.js +1 -0
  152. package/dist/assets/heartbeats-CY77VTM_.js +1 -0
  153. package/dist/assets/http-0jwMmfWP.js +1 -0
  154. package/dist/assets/idl-DTVVj6r5.js +1 -0
  155. package/dist/assets/index-CWuperHN.css +1 -0
  156. package/dist/assets/index-ZrmXLuMX.js +733 -0
  157. package/dist/assets/info-A6RAGUB7-DP8pqSDg.js +1 -0
  158. package/dist/assets/infoDiagram-27XIBGKW-B6sR9qVK.js +2 -0
  159. package/dist/assets/init-BXPE0p7i.js +1 -0
  160. package/dist/assets/input-BkGpMopE.js +1 -0
  161. package/dist/assets/ishikawaDiagram-5VMMS53U-HFQ3gYGN.js +70 -0
  162. package/dist/assets/javascript-Cblpdx44.js +1 -0
  163. package/dist/assets/journeyDiagram-3NMN7TZE-BtoNErTz.js +139 -0
  164. package/dist/assets/julia-KVJvUu_F.js +1 -0
  165. package/dist/assets/kanban-definition-UXKFOSKX-Y55yoRj4.js +89 -0
  166. package/dist/assets/katex-Du_FPwxl.js +257 -0
  167. package/dist/assets/label-C-aWneNy.js +5 -0
  168. package/dist/assets/line-CJEZO7lL.js +1 -0
  169. package/dist/assets/linear-s0r5e4qh.js +1 -0
  170. package/dist/assets/livescript-DSHsJPcD.js +1 -0
  171. package/dist/assets/loader-circle-DwlcG9aS.js +1 -0
  172. package/dist/assets/lua-Vher-70I.js +1 -0
  173. package/dist/assets/mathematica-CE9SaVsW.js +1 -0
  174. package/dist/assets/mbox-JGl1Fgvq.js +1 -0
  175. package/dist/assets/mention-chips-pBjlxGok.js +17 -0
  176. package/dist/assets/mermaid-parser.core-CHJSk6z0.js +7 -0
  177. package/dist/assets/mermaid.core-G_BSi0G0.js +42 -0
  178. package/dist/assets/mindmap-definition-YA3MSWOX-BnlANYwV.js +96 -0
  179. package/dist/assets/mirc-BGWbO906.js +1 -0
  180. package/dist/assets/mllike-DuNQsEw8.js +1 -0
  181. package/dist/assets/model-DL5biheO.js +1 -0
  182. package/dist/assets/modelica-5XCgKQt8.js +1 -0
  183. package/dist/assets/mscgen-mVFg19ri.js +1 -0
  184. package/dist/assets/mumps-C7oS353s.js +1 -0
  185. package/dist/assets/nginx-DXVlpyCz.js +1 -0
  186. package/dist/assets/nsis-KFC6hioG.js +1 -0
  187. package/dist/assets/ntriples-5ckCopnn.js +1 -0
  188. package/dist/assets/octagon-alert-CTp78pR9.js +1 -0
  189. package/dist/assets/octave-D1J2QQNt.js +1 -0
  190. package/dist/assets/ordinal-BJyFM1v8.js +1 -0
  191. package/dist/assets/oz-CPsllMDD.js +1 -0
  192. package/dist/assets/packet-AYTQ26CC-DHxu-C4z.js +1 -0
  193. package/dist/assets/pascal-B-I6JP0Y.js +1 -0
  194. package/dist/assets/path-D6mommQw.js +1 -0
  195. package/dist/assets/pegDiagram-XKGWAZYB-CHhCzuLt.js +1 -0
  196. package/dist/assets/perl-CI8WIWBi.js +1 -0
  197. package/dist/assets/pie-WAS4IAKB-CP_gIBKD.js +1 -0
  198. package/dist/assets/pieDiagram-E7YTZNPT-CEGI1j0Q.js +39 -0
  199. package/dist/assets/pig-FQI0W3S3.js +1 -0
  200. package/dist/assets/powershell-BAu6x78A.js +1 -0
  201. package/dist/assets/preload-helper-CceJXRIF.js +1 -0
  202. package/dist/assets/prod-COP_vZWu.js +495 -0
  203. package/dist/assets/properties-BKTTDgau.js +1 -0
  204. package/dist/assets/protobuf-UWh8gh_j.js +1 -0
  205. package/dist/assets/pug-C20tNwmy.js +1 -0
  206. package/dist/assets/puppet-BAHVzCkO.js +1 -0
  207. package/dist/assets/python-C2DOnsac.js +1 -0
  208. package/dist/assets/q-Cooe-Nh8.js +1 -0
  209. package/dist/assets/quadrantDiagram-AXDQQJYC-BfVC-A1t.js +7 -0
  210. package/dist/assets/r-CktBKya9.js +1 -0
  211. package/dist/assets/radar-RG4KPBEZ-DbvKbV6l.js +1 -0
  212. package/dist/assets/railroad-74A4TZTK-BPHjMWIu.js +1 -0
  213. package/dist/assets/railroad-abnf-HS5TGJTU-DKY8xCGL.js +1 -0
  214. package/dist/assets/railroad-ebnf-LZEXJU2U-DK75GN4x.js +1 -0
  215. package/dist/assets/railroad-peg-WCYAUIDC-0bHp9JB9.js +1 -0
  216. package/dist/assets/railroadDiagram-O6MQD6OU-Bwh6snZb.js +1 -0
  217. package/dist/assets/requirementDiagram-BXWQKSXE-NEvTOdsw.js +84 -0
  218. package/dist/assets/rolldown-runtime-ZpX3ckPj.js +1 -0
  219. package/dist/assets/rotate-ccw-BhopZISX.js +1 -0
  220. package/dist/assets/rough.esm-DnC5Tr1g.js +1 -0
  221. package/dist/assets/router-BxwR1PwE.js +15 -0
  222. package/dist/assets/rpm-Csj9nLHl.js +1 -0
  223. package/dist/assets/ruby-bGx9eo-K.js +1 -0
  224. package/dist/assets/runtime-IAg0vdY9.js +4137 -0
  225. package/dist/assets/sankeyDiagram-P5KCCOFB-AvKb1lr-.js +40 -0
  226. package/dist/assets/sas-Drou_EQ9.js +1 -0
  227. package/dist/assets/save-D5KpMLil.js +1 -0
  228. package/dist/assets/scheme-DcjG9bAf.js +1 -0
  229. package/dist/assets/select-BqqjvKLd.js +1 -0
  230. package/dist/assets/sequenceDiagram-WJ2MYXX4-BP0QZnHN.js +162 -0
  231. package/dist/assets/sheet-Z4n6AEBA.js +1 -0
  232. package/dist/assets/shell-BSKClwid.js +1 -0
  233. package/dist/assets/sieve-CcvsXPZo.js +1 -0
  234. package/dist/assets/simple-mode-B79cVo-x.js +1 -0
  235. package/dist/assets/sizeCapture-INFHLROL-XURNLuv_.js +1 -0
  236. package/dist/assets/skeleton-BxD7FB8M.js +1 -0
  237. package/dist/assets/smalltalk-Cmg-4mjQ.js +1 -0
  238. package/dist/assets/solr-Dj8ahEwG.js +1 -0
  239. package/dist/assets/sparql-LAJYmgfk.js +1 -0
  240. package/dist/assets/spreadsheet-B8doD_pL.js +1 -0
  241. package/dist/assets/sql-C3kWxFGw.js +1 -0
  242. package/dist/assets/src-Bssc388C.js +1 -0
  243. package/dist/assets/stateDiagram-D77RDMKH-Ce0Wj7yz.js +1 -0
  244. package/dist/assets/stateDiagram-v2-MP3YSRHH-CREL-f_f.js +1 -0
  245. package/dist/assets/stex-CW6K5Nmu.js +1 -0
  246. package/dist/assets/stylus-BS-Ienrc.js +1 -0
  247. package/dist/assets/swift-BD82LMDK.js +1 -0
  248. package/dist/assets/swimlanes-42K2YHIH-CX7zPtNU.js +1 -0
  249. package/dist/assets/swimlanesDiagram-VR7AAH4N-B22pD4D6.js +8 -0
  250. package/dist/assets/tabs-Dqn3cNzC.js +1 -0
  251. package/dist/assets/tcl-RZa1cqc-.js +1 -0
  252. package/dist/assets/textile-C-BY_OGF.js +1 -0
  253. package/dist/assets/tiddlywiki-C9bm_Oju.js +1 -0
  254. package/dist/assets/tiki-DJOT-rFT.js +1 -0
  255. package/dist/assets/timeline-definition-24CTP7MA-Bw21rjHm.js +120 -0
  256. package/dist/assets/toml-Civ2fTsu.js +1 -0
  257. package/dist/assets/treeView-Q6P3EWNA-CzxfDhvq.js +1 -0
  258. package/dist/assets/treemap-WGGIJYW6-DNWYF4zd.js +1 -0
  259. package/dist/assets/triangle-alert-DOta-xfM.js +1 -0
  260. package/dist/assets/troff-Lns35Xcq.js +1 -0
  261. package/dist/assets/ttcn-7vlxVTUK.js +1 -0
  262. package/dist/assets/ttcn-cfg-B8qhhp6o.js +1 -0
  263. package/dist/assets/turtle-DTIS1YQ7.js +1 -0
  264. package/dist/assets/use-adapter-capabilities-0-4PhK9y.js +1 -0
  265. package/dist/assets/useHiddenSettings-D9d6LOsg.js +1 -0
  266. package/dist/assets/vb-BO8UacKu.js +1 -0
  267. package/dist/assets/vbscript-DWLru3lT.js +1 -0
  268. package/dist/assets/velocity-BIIn-Nl2.js +1 -0
  269. package/dist/assets/vennDiagram-4TSXK5OY-BuncstTm.js +34 -0
  270. package/dist/assets/verilog-BVYlmXGg.js +1 -0
  271. package/dist/assets/vhdl-Cn8cC8Yb.js +1 -0
  272. package/dist/assets/wardley-WFR3VGLG-C18JBEVS.js +1 -0
  273. package/dist/assets/wardleyDiagram-VM6X3IG4-DOHY7xcd.js +78 -0
  274. package/dist/assets/webidl-ChvzbZ5-.js +1 -0
  275. package/dist/assets/xquery-BKN7qEbU.js +1 -0
  276. package/dist/assets/xychartDiagram-S5SC5T6Z-qOWxoNte.js +7 -0
  277. package/dist/assets/yacas-BG9ha7tU.js +1 -0
  278. package/dist/assets/z80-CB2cGLew.js +1 -0
  279. package/dist/assets/zap-gf6Ev631.js +41 -0
  280. package/dist/brands/adapters/LICENSE +21 -0
  281. package/dist/brands/adapters/README.md +7 -0
  282. package/dist/brands/adapters/cursor-dark.svg +1 -0
  283. package/dist/brands/adapters/cursor.svg +1 -0
  284. package/dist/brands/adapters/gemini-color.svg +1 -0
  285. package/dist/brands/adapters/grok-dark.svg +1 -0
  286. package/dist/brands/adapters/grok.svg +1 -0
  287. package/dist/brands/adapters/hermesagent-dark.svg +1 -0
  288. package/dist/brands/adapters/hermesagent.svg +1 -0
  289. package/dist/brands/adapters/kimi-color-light.svg +1 -0
  290. package/dist/brands/adapters/kimi-color.svg +1 -0
  291. package/dist/brands/adapters/pi-dark.svg +1 -0
  292. package/dist/brands/adapters/pi.svg +1 -0
  293. package/dist/brands/apps/LOBE-LICENSE +21 -0
  294. package/dist/brands/apps/agentmail-dark.svg +16 -0
  295. package/dist/brands/apps/agentmail.svg +17 -0
  296. package/dist/brands/apps/airtable.svg +1 -0
  297. package/dist/brands/apps/anthropic-dark.svg +1 -0
  298. package/dist/brands/apps/anthropic.svg +1 -0
  299. package/dist/brands/apps/api-key-generic.svg +1 -0
  300. package/dist/brands/apps/arcade.png +0 -0
  301. package/dist/brands/apps/asana.svg +12 -0
  302. package/dist/brands/apps/beehiiv.png +0 -0
  303. package/dist/brands/apps/bitly.svg +1 -0
  304. package/dist/brands/apps/box.svg +1 -0
  305. package/dist/brands/apps/brex-dark.svg +1 -0
  306. package/dist/brands/apps/brex.svg +1 -0
  307. package/dist/brands/apps/candid.png +0 -0
  308. package/dist/brands/apps/clickhouse-dark.svg +1 -0
  309. package/dist/brands/apps/clickhouse.svg +1 -0
  310. package/dist/brands/apps/cloudflare.svg +1 -0
  311. package/dist/brands/apps/cloudinary-dark.svg +1 -0
  312. package/dist/brands/apps/cloudinary.svg +3 -0
  313. package/dist/brands/apps/coda.svg +1 -0
  314. package/dist/brands/apps/composio-dark.svg +11 -0
  315. package/dist/brands/apps/composio.svg +16 -0
  316. package/dist/brands/apps/context7-dark.svg +8 -0
  317. package/dist/brands/apps/context7.svg +8 -0
  318. package/dist/brands/apps/discord-dark.svg +1 -0
  319. package/dist/brands/apps/discord.svg +1 -0
  320. package/dist/brands/apps/egnyte.svg +1 -0
  321. package/dist/brands/apps/embat.svg +1 -0
  322. package/dist/brands/apps/executor.png +0 -0
  323. package/dist/brands/apps/fireflies.svg +76 -0
  324. package/dist/brands/apps/github-dark.svg +10 -0
  325. package/dist/brands/apps/github.svg +10 -0
  326. package/dist/brands/apps/gmail.svg +1 -0
  327. package/dist/brands/apps/google-calendar.svg +1 -0
  328. package/dist/brands/apps/google-chat.svg +1 -0
  329. package/dist/brands/apps/google-docs.svg +1 -0
  330. package/dist/brands/apps/google-drive.svg +1 -0
  331. package/dist/brands/apps/google-people.svg +1 -0
  332. package/dist/brands/apps/google-sheets.svg +1 -0
  333. package/dist/brands/apps/google-slides.svg +1 -0
  334. package/dist/brands/apps/google-workspace-search.svg +1 -0
  335. package/dist/brands/apps/hugging-face.svg +8 -0
  336. package/dist/brands/apps/imessage-photon.png +0 -0
  337. package/dist/brands/apps/jam-dev-dark.svg +1 -0
  338. package/dist/brands/apps/jam-dev.svg +1 -0
  339. package/dist/brands/apps/jira-dark.svg +1 -0
  340. package/dist/brands/apps/jira.svg +4 -0
  341. package/dist/brands/apps/kernel.svg +3 -0
  342. package/dist/brands/apps/linear-dark.svg +5 -0
  343. package/dist/brands/apps/linear.svg +5 -0
  344. package/dist/brands/apps/local-falcon.png +0 -0
  345. package/dist/brands/apps/make-dark.svg +1 -0
  346. package/dist/brands/apps/make.svg +1 -0
  347. package/dist/brands/apps/manifest.json +496 -0
  348. package/dist/brands/apps/manufact-dark.svg +6 -0
  349. package/dist/brands/apps/manufact.svg +5 -0
  350. package/dist/brands/apps/mem0.svg +1 -0
  351. package/dist/brands/apps/microsoft-teams.svg +68 -0
  352. package/dist/brands/apps/miro-dark.svg +1 -0
  353. package/dist/brands/apps/miro.svg +4 -0
  354. package/dist/brands/apps/mixpanel-dark.svg +1 -0
  355. package/dist/brands/apps/mixpanel.svg +1 -0
  356. package/dist/brands/apps/netlify-dark.svg +1 -0
  357. package/dist/brands/apps/netlify.svg +16 -0
  358. package/dist/brands/apps/notion-dark.svg +1 -0
  359. package/dist/brands/apps/notion.svg +1 -0
  360. package/dist/brands/apps/oauth-generic.svg +1 -0
  361. package/dist/brands/apps/openai-dark.svg +1 -0
  362. package/dist/brands/apps/openai.svg +1 -0
  363. package/dist/brands/apps/openrouter-dark.svg +3 -0
  364. package/dist/brands/apps/openrouter.svg +3 -0
  365. package/dist/brands/apps/oreilly.svg +1 -0
  366. package/dist/brands/apps/pagerduty.svg +4 -0
  367. package/dist/brands/apps/planetscale-dark.svg +1 -0
  368. package/dist/brands/apps/planetscale.svg +1 -0
  369. package/dist/brands/apps/posthog-dark.svg +1 -0
  370. package/dist/brands/apps/posthog.svg +1 -0
  371. package/dist/brands/apps/postman.svg +1 -0
  372. package/dist/brands/apps/railway-dark.svg +1 -0
  373. package/dist/brands/apps/railway.svg +1 -0
  374. package/dist/brands/apps/razorpay-dark.svg +1 -0
  375. package/dist/brands/apps/razorpay.svg +1 -0
  376. package/dist/brands/apps/resend-dark.svg +1 -0
  377. package/dist/brands/apps/resend.svg +1 -0
  378. package/dist/brands/apps/sanity-dark.svg +1 -0
  379. package/dist/brands/apps/sanity.svg +1 -0
  380. package/dist/brands/apps/sentry-dark.svg +1 -0
  381. package/dist/brands/apps/sentry.svg +1 -0
  382. package/dist/brands/apps/shopify.svg +24 -0
  383. package/dist/brands/apps/similarweb-dark.svg +1 -0
  384. package/dist/brands/apps/similarweb.svg +1 -0
  385. package/dist/brands/apps/slack.png +0 -0
  386. package/dist/brands/apps/slack.svg +17 -0
  387. package/dist/brands/apps/stripe.svg +11 -0
  388. package/dist/brands/apps/supabase.svg +15 -0
  389. package/dist/brands/apps/telegram.svg +12 -0
  390. package/dist/brands/apps/ticket-tailor-dark.svg +1 -0
  391. package/dist/brands/apps/ticket-tailor.svg +1 -0
  392. package/dist/brands/apps/ticktick.svg +1 -0
  393. package/dist/brands/apps/todoist.svg +1 -0
  394. package/dist/brands/apps/vercel-dark.svg +1 -0
  395. package/dist/brands/apps/vercel.svg +1 -0
  396. package/dist/brands/apps/webflow.svg +1 -0
  397. package/dist/brands/apps/wix-dark.svg +12 -0
  398. package/dist/brands/apps/wix.svg +12 -0
  399. package/dist/brands/apps/xai-dark.svg +1 -0
  400. package/dist/brands/apps/xai.svg +1 -0
  401. package/dist/brands/apps/xero.svg +1 -0
  402. package/dist/brands/apps/youcom-dark.svg +13 -0
  403. package/dist/brands/apps/youcom.svg +13 -0
  404. package/dist/brands/apps/zapier.svg +1 -0
  405. package/dist/brands/claude-color.svg +17 -0
  406. package/dist/brands/codex-color.svg +17 -0
  407. package/dist/brands/opencode-logo-dark-square.svg +18 -0
  408. package/dist/brands/opencode-logo-light-square.svg +18 -0
  409. package/dist/favicon-16x16.png +0 -0
  410. package/dist/favicon-32x32.png +0 -0
  411. package/dist/favicon.ico +0 -0
  412. package/dist/favicon.svg +9 -0
  413. package/dist/fonts/InterVariable-Italic.woff2 +0 -0
  414. package/dist/fonts/InterVariable.woff2 +0 -0
  415. package/dist/fonts/NOTICE.md +17 -0
  416. package/dist/index.html +97 -0
  417. package/dist/paperclip-thinking.svg +17 -0
  418. package/dist/site.webmanifest +30 -0
  419. package/dist/sw.js +85 -0
  420. package/dist/worktree-favicon-16x16.png +0 -0
  421. package/dist/worktree-favicon-32x32.png +0 -0
  422. package/dist/worktree-favicon.ico +0 -0
  423. package/dist/worktree-favicon.svg +9 -0
  424. package/package.json +22 -0
@@ -0,0 +1,85 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-C2jegCUe.js","assets/dist-DCJXgQu0.js","assets/dist-BXoB5t8y.js","assets/dist-Bs8B1orN.js","assets/dist-DsLYqWnM.js","assets/dist-CWrRKmYk.js","assets/rolldown-runtime-ZpX3ckPj.js","assets/dist-BX-OCtve.js","assets/dist-BeN6V24C.js","assets/dist-sLIQSVjm.js","assets/dist-xQwUswee.js","assets/dist-DKJ0FdKS.js","assets/dist-YH7EZ8d1.js","assets/dist-oQmcCiSD.js","assets/dist-CSbL7rtN.js","assets/dist-C8CoeHVO.js","assets/dist-CBo4NvFW.js","assets/dist-DyyIM2uF.js","assets/dist-DpmnjHX9.js","assets/dist-B0TRtKS8.js","assets/dist-DoBOMP6Y.js","assets/dist-CXeuJs-w.js","assets/dist-DZgNtG8a.js","assets/dockerfile-BttNdtK0.js","assets/simple-mode-B79cVo-x.js","assets/factor-CM3-9V3b.js","assets/nsis-KFC6hioG.js","assets/pug-C20tNwmy.js","assets/javascript-Cblpdx44.js","assets/dist-BuzarGBs.js","assets/dist-BRrJTSwu.js"])))=>i.map(i=>d[i]);
2
+ var Hk=Object.defineProperty;var s=(e,t)=>Hk(e,"name",{value:t,configurable:!0});import{i as va,n as Vx,t as Is}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as Kk,Ir as Uk,Lr as Wk,S as no,U as zk,Xn as Ce,Y as g0,a as _a,c as od,f as jk,i as ya,l as er,m as xa,nr as p0,o as op,p as Jk,r as Sc,s as Bn,t as sd}from"./createLucideIcon-D-iIM3hK.js";import{t as V}from"./preload-helper-CceJXRIF.js";import{A as lr,B as Gk,D as sp,E as qk,G as Ir,I as m0,K as ro,L as Zk,M as Xa,N as v0,O as Zs,P as Xe,Q as Yk,R as Xk,T as _0,V as y0,X as lf,Y as Ti,at as Bx,b as Qk,c as e9,d as t9,f as n9,i as lp,it as r9,j as un,l as i9,m as o9,n as s9,nt as l9,ot as a9,p as c9,q as Gc,rt as u9,st as d9,t as Qa,u as f9,v as h9,w as sh,y as g9,z as p9}from"./mention-chips-pBjlxGok.js";import{_ as m9,a as v9,f as _9,h as y9,i as x9,l as C9,m as b9,n as E9,p as T9,s as S9,t as w9}from"./dist-Cc3Bt6H4.js";import{i as Hx,n as Kx,r as ld,t as Ux}from"./dist-B3Uu-urE.js";import{$ as Wx,B as ap,F as k9,G as M9,I as cp,K as A9,L as I9,N as N9,Q as O9,R as zx,U as D9,V as up,W as R9,X as L9,Y as $9,Z as x0,et as P9,nt as F9,q as jx,tt as Jx,z as Gx}from"./zap-gf6Ev631.js";import{t as V9}from"./AgentAvatar-BR1Z_L_Z.js";import{$ as B9,A as qx,B as H9,Ct as ad,E as Zx,F as Dt,G as K9,H as U9,I as Yx,J as W9,K as z9,L as dt,O as ts,Ot as lh,P as ve,Q as j9,R as dp,S as Xx,St as Ca,T as Rl,Tt as fp,U as hp,V as J9,W as Qx,X as eC,Y as gp,Z as ah,_t as ba,a as P,at as tC,bt as Hn,c as G9,ct as Se,dt as q9,et as Z9,f as Y9,ft as pp,g as X9,gt as rn,ht as Q9,it as cd,j as Ns,l as eM,lt as qc,mt as nC,n as rC,nt as tM,o as nM,ot as iC,pt as rM,q as iM,rt as Ct,st as dn,t as oM,tt as oC,ut as Lo,v as sM,vt as sC,w as lM,wt as Eo,x as Zc,xt as Xr,yt as af,z as aM}from"./dist-DCJXgQu0.js";var m=va(Wk(),1),H=va(Kk(),1),cM=Object.defineProperty,Fn=s((e,t)=>cM(e,"name",{value:t,configurable:!0}),"__name$5"),mp="Dialog",[lC,NW]=od(mp),[uM,br]=lC(mp),dM=Fn(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,a=m.useRef(null),c=m.useRef(null),[d,u]=_a({prop:r,defaultProp:i??!1,onChange:o,caller:mp}),[f,h]=m.useState(0),[g,p]=m.useState(0);return(0,H.jsx)(uM,{scope:t,triggerRef:a,contentRef:c,contentId:Sc(),titleId:Sc(),descriptionId:Sc(),titlePresent:f>0,descriptionPresent:g>0,setTitleCount:h,setDescriptionCount:p,open:d,onOpenChange:u,onOpenToggle:m.useCallback(()=>u(v=>!v),[u]),modal:l,children:n})},"Dialog"),fM="DialogTrigger",OW=m.forwardRef(Fn(s(function(t,n){const{__scopeDialog:r,...i}=t,o=br(fM,r),l=xa(n,o.triggerRef);return(0,H.jsx)(er.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":ud(o.open),...i,ref:l,onClick:Bn(t.onClick,o.onOpenToggle)})},"DialogTrigger2"),"DialogTrigger")),aC="DialogPortal",[hM,cC]=lC(aC,{forceMount:void 0}),gM=Fn(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=br(aC,t);return(0,H.jsx)(hM,{scope:t,forceMount:n,children:m.Children.map(r,l=>(0,H.jsx)(ya,{present:n||o.open,children:(0,H.jsx)(Wx,{asChild:!0,container:i,children:l})}))})},"DialogPortal"),ch="DialogOverlay",pM=m.forwardRef(Fn(s(function(t,n){const r=cC(ch,t.__scopeDialog),{forceMount:i=r.forceMount,...o}=t,l=br(ch,t.__scopeDialog);return l.modal?(0,H.jsx)(ya,{present:i||l.open,children:(0,H.jsx)(vM,{...o,ref:n})}):null},"DialogOverlay2"),"DialogOverlay")),mM=jk("DialogOverlay.RemoveScroll"),vM=m.forwardRef(Fn(s(function(t,n){const{__scopeDialog:r,...i}=t,o=br(ch,r),l=F9(),a=xa(n,l);return(0,H.jsx)(L9,{as:mM,allowPinchZoom:!0,shards:[o.contentRef],children:(0,H.jsx)(er.div,{"data-state":ud(o.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl2"),"DialogOverlayImpl")),Ll="DialogContent",_M=m.forwardRef(Fn(s(function(t,n){const r=cC(Ll,t.__scopeDialog),{forceMount:i=r.forceMount,...o}=t,l=br(Ll,t.__scopeDialog);return(0,H.jsx)(ya,{present:i||l.open,children:l.modal?(0,H.jsx)(yM,{...o,ref:n}):(0,H.jsx)(xM,{...o,ref:n})})},"DialogContent2"),"DialogContent")),yM=m.forwardRef(Fn(s(function(t,n){const r=br(Ll,t.__scopeDialog),i=m.useRef(null),o=xa(n,r.contentRef,i);return m.useEffect(()=>{const l=i.current;if(l)return $9(l)},[]),(0,H.jsx)(uC,{...t,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:Bn(t.onCloseAutoFocus,l=>{l.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Bn(t.onPointerDownOutside,l=>{const a=l.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&l.preventDefault()}),onFocusOutside:Bn(t.onFocusOutside,l=>l.preventDefault())})},"DialogContentModal2"),"DialogContentModal")),xM=m.forwardRef(Fn(s(function(t,n){const r=br(Ll,t.__scopeDialog),i=m.useRef(!1),o=m.useRef(!1);return(0,H.jsx)(uC,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s(l=>{t.onCloseAutoFocus?.(l),l.defaultPrevented||(i.current||r.triggerRef.current?.focus(),l.preventDefault()),i.current=!1,o.current=!1},"onCloseAutoFocus"),onInteractOutside:s(l=>{t.onInteractOutside?.(l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=l.target;r.triggerRef.current?.contains(a)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()},"onInteractOutside")})},"DialogContentNonModal2"),"DialogContentNonModal")),uC=m.forwardRef(Fn(s(function(t,n){const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,...a}=t,c=br(Ll,r);return O9(),(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(P9,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:l,children:(0,H.jsx)(Jx,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionPresent?c.descriptionId:void 0,"aria-labelledby":c.titlePresent?c.titleId:void 0,"data-state":ud(c.open),...a,ref:n,deferPointerDownOutside:!0,onDismiss:s(()=>c.onOpenChange(!1),"onDismiss")})})})},"DialogContentImpl2"),"DialogContentImpl")),CM="DialogTitle",bM=m.forwardRef(Fn(s(function(t,n){const{__scopeDialog:r,...i}=t,o=br(CM,r),{setTitleCount:l}=o;return op(()=>(l(a=>a+1),()=>l(a=>a-1)),[l]),(0,H.jsx)(er.h2,{id:o.titleId,...i,ref:n})},"DialogTitle2"),"DialogTitle")),EM="DialogDescription",DW=m.forwardRef(Fn(s(function(t,n){const{__scopeDialog:r,...i}=t,o=br(EM,r),{setDescriptionCount:l}=o;return op(()=>(l(a=>a+1),()=>l(a=>a-1)),[l]),(0,H.jsx)(er.p,{id:o.descriptionId,...i,ref:n})},"DialogDescription2"),"DialogDescription")),TM="DialogClose",SM=m.forwardRef(Fn(s(function(t,n){const{__scopeDialog:r,...i}=t,o=br(TM,r);return(0,H.jsx)(er.button,{type:"button",...i,ref:n,onClick:Bn(t.onClick,()=>o.onOpenChange(!1))})},"DialogClose2"),"DialogClose"));function ud(e){return e?"open":"closed"}s(ud,"getState$1");Fn(ud,"getState");var Yc=va(Uk(),1),wM=Object.defineProperty,dC=s((e,t)=>wM(e,"name",{value:t,configurable:!0}),"__name$4"),C0="horizontal",kM=["horizontal","vertical"],MM=m.forwardRef(dC(s(function(t,n){const{decorative:r,orientation:i=C0,...o}=t,l=fC(i)?i:C0,a=r?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return(0,H.jsx)(er.div,{"data-orientation":l,...a,...o,ref:n})},"Separator2"),"Separator"));function fC(e){return kM.includes(e)}s(fC,"isValidOrientation");dC(fC,"isValidOrientation");var AM=MM,IM=Object.defineProperty,NM=s((e,t)=>IM(e,"name",{value:t,configurable:!0}),"__name$3"),OM="Toggle",DM=m.forwardRef(NM(s(function(t,n){const{pressed:r,defaultPressed:i,onPressedChange:o,...l}=t,[a,c]=_a({prop:r,onChange:o,defaultProp:i??!1,caller:OM});return(0,H.jsx)(er.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":t.disabled?"":void 0,...l,ref:n,onClick:Bn(t.onClick,()=>{t.disabled||c(!a)})})},"Toggle2"),"Toggle")),RM=Object.defineProperty,Bi=s((e,t)=>RM(e,"name",{value:t,configurable:!0}),"__name$2"),Os="ToggleGroup",[hC,gC]=od(Os,[ld]),pC=ld(),LM=m.forwardRef(Bi(s(function(t,n){const{type:r,...i}=t;if(r==="single")return(0,H.jsx)($M,{role:"radiogroup",...i,ref:n});if(r==="multiple")return(0,H.jsx)(PM,{role:"toolbar",...i,ref:n});throw new Error(`Missing prop \`type\` expected on \`${Os}\``)},"ToggleGroup2"),"ToggleGroup")),[mC,vC]=hC(Os),$M=m.forwardRef(Bi(s(function(t,n){const{value:r,defaultValue:i,onValueChange:o=Bi(()=>{},"onValueChange"),...l}=t,[a,c]=_a({prop:r,defaultProp:i??"",onChange:o,caller:Os});return(0,H.jsx)(mC,{scope:t.__scopeToggleGroup,type:"single",value:m.useMemo(()=>a?[a]:[],[a]),onItemActivate:c,onItemDeactivate:m.useCallback(()=>c(""),[c]),children:(0,H.jsx)(_C,{...l,ref:n})})},"ToggleGroupImplSingle2"),"ToggleGroupImplSingle")),PM=m.forwardRef(Bi(s(function(t,n){const{value:r,defaultValue:i,onValueChange:o=Bi(()=>{},"onValueChange"),...l}=t,[a,c]=_a({prop:r,defaultProp:i??[],onChange:o,caller:Os}),d=m.useCallback(f=>c((h=[])=>[...h,f]),[c]),u=m.useCallback(f=>c((h=[])=>h.filter(g=>g!==f)),[c]);return(0,H.jsx)(mC,{scope:t.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:d,onItemDeactivate:u,children:(0,H.jsx)(_C,{...l,ref:n})})},"ToggleGroupImplMultiple2"),"ToggleGroupImplMultiple")),[FM,VM]=hC(Os),_C=m.forwardRef(Bi(s(function(t,n){const{__scopeToggleGroup:r,disabled:i=!1,rovingFocus:o=!0,orientation:l,dir:a,loop:c=!0,...d}=t,u=pC(r),f=Hx(a),h={dir:f,...d};return(0,H.jsx)(FM,{scope:r,rovingFocus:o,disabled:i,children:o?(0,H.jsx)(Kx,{asChild:!0,...u,orientation:l,dir:f,loop:c,children:(0,H.jsx)(er.div,{...h,ref:n})}):(0,H.jsx)(er.div,{...h,ref:n})})},"ToggleGroupImpl2"),"ToggleGroupImpl")),uh="ToggleGroupItem",BM=m.forwardRef(Bi(s(function(t,n){const r=vC(uh,t.__scopeToggleGroup),i=VM(uh,t.__scopeToggleGroup),o=pC(t.__scopeToggleGroup),l=r.value.includes(t.value),a=i.disabled||t.disabled,c={...t,pressed:l,disabled:a},d=m.useRef(null);return i.rovingFocus?(0,H.jsx)(Ux,{asChild:!0,...o,focusable:!a,active:l,ref:d,children:(0,H.jsx)(b0,{...c,ref:n})}):(0,H.jsx)(b0,{...c,ref:n})},"ToggleGroupItem2"),"ToggleGroupItem")),b0=m.forwardRef(Bi(s(function(t,n){const{__scopeToggleGroup:r,value:i,...o}=t,l=vC(uh,r),a={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},c=l.type==="single"?a:void 0;return(0,H.jsx)(DM,{...c,...o,ref:n,onPressedChange:s(d=>{d?l.onItemActivate(i):l.onItemDeactivate(i)},"onPressedChange")})},"ToggleGroupItemImpl2"),"ToggleGroupItemImpl")),HM=Object.defineProperty,Ea=s((e,t)=>HM(e,"name",{value:t,configurable:!0}),"__name$1"),yC="Toolbar",[KM,RW]=od(yC,[ld,gC]),xC=ld(),CC=gC(),[UM,bC]=KM(yC),WM=m.forwardRef(Ea(s(function(t,n){const{__scopeToolbar:r,orientation:i="horizontal",dir:o,loop:l=!0,...a}=t,c=xC(r),d=Hx(o);return(0,H.jsx)(UM,{scope:r,orientation:i,dir:d,children:(0,H.jsx)(Kx,{asChild:!0,...c,orientation:i,dir:d,loop:l,children:(0,H.jsx)(er.div,{role:"toolbar","aria-orientation":i,dir:d,...a,ref:n})})})},"Toolbar2"),"Toolbar")),zM="ToolbarSeparator",jM=m.forwardRef(Ea(s(function(t,n){const{__scopeToolbar:r,...i}=t,o=bC(zM,r);return(0,H.jsx)(AM,{orientation:o.orientation==="horizontal"?"vertical":"horizontal",...i,ref:n})},"ToolbarSeparator2"),"ToolbarSeparator")),EC=m.forwardRef(Ea(s(function(t,n){const{__scopeToolbar:r,...i}=t,o=xC(r);return(0,H.jsx)(Ux,{asChild:!0,...o,focusable:!t.disabled,children:(0,H.jsx)(er.button,{type:"button",...i,ref:n})})},"ToolbarButton2"),"ToolbarButton")),JM="ToolbarToggleGroup",GM=m.forwardRef(Ea(s(function(t,n){const{__scopeToolbar:r,...i}=t,o=bC(JM,r),l=CC(r);return(0,H.jsx)(LM,{"data-orientation":o.orientation,dir:o.dir,...l,...i,ref:n,rovingFocus:!1})},"ToolbarToggleGroup2"),"ToolbarToggleGroup")),qM=m.forwardRef(Ea(s(function(t,n){const{__scopeToolbar:r,...i}=t,o=CC(r),l={__scopeToolbar:t.__scopeToolbar};return(0,H.jsx)(EC,{asChild:!0,...l,children:(0,H.jsx)(BM,{...o,...i,ref:n})})},"ToolbarToggleItem2"),"ToolbarToggleItem")),TC=WM,ZM=jM,us=EC,YM=GM,cf=qM,XM=Object.defineProperty,Lt=s((e,t)=>XM(e,"name",{value:t,configurable:!0}),"__name"),[vp,LW]=od("Tooltip",[jx]),dd=jx(),QM="TooltipProvider",e8=700,dh="tooltip.open",[t8,_p]=vp(QM),n8=Lt(e=>{const{__scopeTooltip:t,delayDuration:n=e8,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,l=m.useRef(!0),a=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),(0,H.jsx)(t8,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:m.useCallback(()=>{r<=0||(window.clearTimeout(c.current),l.current=!1)},[r]),onClose:m.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>l.current=!0,r))},[r]),isPointerInTransitRef:a,onPointerInTransitChange:m.useCallback(d=>{a.current=d},[]),disableHoverableContent:i,children:o})},"TooltipProvider"),fh="Tooltip",[r8,Ta]=vp(fh),i8=Lt(e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:l,delayDuration:a}=e,c=_p(fh,e.__scopeTooltip),d=dd(t),[u,f]=m.useState(null),[h,g]=m.useState(void 0),p=Sc(),v=m.useRef(0),_=l??c.disableHoverableContent,y=a??c.delayDuration,x=m.useRef(!1),[C,b]=_a({prop:r,defaultProp:i??!1,onChange:Lt(D=>{D?(c.onOpen(),document.dispatchEvent(new CustomEvent(dh))):c.onClose(),o?.(D)},"onChange"),caller:fh}),T=m.useMemo(()=>C?x.current?"delayed-open":"instant-open":"closed",[C]),M=m.useCallback(()=>{window.clearTimeout(v.current),v.current=0,x.current=!1,b(!0)},[b]),S=m.useCallback(()=>{window.clearTimeout(v.current),v.current=0,b(!1)},[b]),E=m.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{x.current=!0,b(!0),v.current=0},y)},[y,b]);m.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]);const A=h??p;return(0,H.jsx)(A9,{...d,children:(0,H.jsx)(r8,{scope:t,contentId:A,setContentId:g,open:C,stateAttribute:T,trigger:u,onTriggerChange:f,onTriggerEnter:m.useCallback(()=>{c.isOpenDelayedRef.current?E():M()},[c.isOpenDelayedRef,E,M]),onTriggerLeave:m.useCallback(()=>{_?S():(window.clearTimeout(v.current),v.current=0)},[S,_]),onOpen:M,onClose:S,disableHoverableContent:_,children:n})})},"Tooltip"),E0="TooltipTrigger",o8=m.forwardRef(Lt(s(function(t,n){const{__scopeTooltip:r,...i}=t,o=Ta(E0,r),l=_p(E0,r),a=dd(r),c=m.useRef(null),d=xa(n,c,o.onTriggerChange),u=m.useRef(!1),f=m.useRef(!1),h=m.useCallback(()=>u.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),(0,H.jsx)(D9,{asChild:!0,...a,children:(0,H.jsx)(er.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:d,onPointerMove:Bn(t.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Bn(t.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Bn(t.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Bn(t.onFocus,()=>{u.current||o.onOpen()}),onBlur:Bn(t.onBlur,o.onClose),onClick:Bn(t.onClick,o.onClose)})})},"TooltipTrigger2"),"TooltipTrigger")),SC="TooltipPortal",[s8,l8]=vp(SC,{forceMount:void 0}),a8=Lt(e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Ta(SC,t);return(0,H.jsx)(s8,{scope:t,forceMount:n,children:(0,H.jsx)(ya,{present:n||o.open,children:(0,H.jsx)(Wx,{asChild:!0,container:i,children:r})})})},"TooltipPortal"),$l="TooltipContent",c8=m.forwardRef(Lt(s(function(t,n){const r=l8($l,t.__scopeTooltip),{forceMount:i=r.forceMount,side:o="top",...l}=t,a=Ta($l,t.__scopeTooltip);return(0,H.jsx)(ya,{present:i||a.open,children:a.disableHoverableContent?(0,H.jsx)(wC,{side:o,...l,ref:n}):(0,H.jsx)(u8,{side:o,...l,ref:n})})},"TooltipContent2"),"TooltipContent")),u8=m.forwardRef(Lt(s(function(t,n){const r=Ta($l,t.__scopeTooltip),i=_p($l,t.__scopeTooltip),o=m.useRef(null),l=xa(n,o),[a,c]=m.useState(null),{trigger:d,onClose:u}=r,f=o.current,{onPointerInTransitChange:h}=i,g=m.useCallback(()=>{c(null),h(!1)},[h]),p=m.useCallback((v,_)=>{const y=v.currentTarget,x={x:v.clientX,y:v.clientY},C=MC(x,kC(x,y.getBoundingClientRect())),b=AC(_.getBoundingClientRect()),T=NC([...C,...b]);c(T),h(!0)},[h]);return m.useEffect(()=>()=>g(),[g]),m.useEffect(()=>{if(d&&f){const v=Lt(y=>p(y,f),"handleTriggerLeave"),_=Lt(y=>p(y,d),"handleContentLeave");return d.addEventListener("pointerleave",v),f.addEventListener("pointerleave",_),()=>{d.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",_)}}},[d,f,p,g]),m.useEffect(()=>{if(a){const v=Lt(_=>{const y=_.target,x={x:_.clientX,y:_.clientY},C=d?.contains(y)||f?.contains(y),b=!IC(x,a);C?g():b&&(g(),u())},"handleTrackPointerGrace");return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[d,f,a,u,g]),(0,H.jsx)(wC,{...t,ref:l})},"TooltipContentHoverable2"),"TooltipContentHoverable")),d8=Jk("TooltipContent"),wC=m.forwardRef(Lt(s(function(t,n){const{__scopeTooltip:r,children:i,"aria-label":o,id:l,onEscapeKeyDown:a,onPointerDownOutside:c,...d}=t,u=Ta($l,r),f=dd(r),{onClose:h}=u;m.useEffect(()=>(document.addEventListener(dh,h),()=>document.removeEventListener(dh,h)),[h]),m.useEffect(()=>{if(u.trigger){const p=Lt(v=>{v.target instanceof Node&&v.target.contains(u.trigger)&&h()},"handleScroll");return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,h]);const{setContentId:g}=u;return op(()=>(g(l),()=>{g(void 0)}),[l,g]),(0,H.jsx)(Jx,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:s(p=>p.preventDefault(),"onFocusOutside"),onDismiss:h,children:(0,H.jsxs)(M9,{"data-state":u.stateAttribute,role:o?void 0:"tooltip",id:o?void 0:u.contentId,...f,...d,ref:n,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,H.jsx)(d8,{children:i}),o?(0,H.jsx)(m9,{id:u.contentId,role:"tooltip",children:o}):null]})})},"TooltipContentImpl2"),"TooltipContentImpl")),f8=m.forwardRef(Lt(s(function(t,n){const{__scopeTooltip:r,...i}=t,o=dd(r);return(0,H.jsx)(R9,{...o,...i,ref:n})},"TooltipArrow2"),"TooltipArrow"));function kC(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}s(kC,"getExitSideFromRect");Lt(kC,"getExitSideFromRect");function MC(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}s(MC,"getPaddedExitPoints");Lt(MC,"getPaddedExitPoints");function AC(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}s(AC,"getPointsFromRect");Lt(AC,"getPointsFromRect");function IC(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const a=t[o],c=t[l],d=a.x,u=a.y,f=c.x,h=c.y;u>r!=h>r&&n<(f-d)*(r-u)/(h-u)+d&&(i=!i)}return i}s(IC,"isPointInPolygon");Lt(IC,"isPointInPolygon");function NC(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),OC(t)}s(NC,"getHull");Lt(NC,"getHull");function OC(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}s(OC,"getHullPresorted");Lt(OC,"getHullPresorted");var DC=n8,RC=i8,LC=o8,$C=a8,PC=c8,h8=f8,g8=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v3",key:"otl347"}],["path",{d:"M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338",key:"7hb8p4"}],["path",{d:"M3 9h5.859",key:"numkqi"}],["path",{d:"M8 2v3",key:"1ioesn"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],p8=sd("calendar-clock",g8),m8=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],v8=sd("flag",m8),_8=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],y8=sd("hash",_8),x8=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],C8=sd("user",x8),uf={list:s((e,t,n)=>{const r=new URLSearchParams;t?.entityType&&r.set("entityType",t.entityType),t?.entityId&&r.set("entityId",t.entityId),t?.agentId&&r.set("agentId",t.agentId),t?.limit&&r.set("limit",String(t.limit));const i=r.toString();return Ce.get(`/companies/${e}/activity${i?`?${i}`:""}`,n)},"list"),forIssue:s(e=>Ce.get(`/issues/${e}/activity`),"forIssue"),runsForIssue:s(e=>Ce.get(`/issues/${e}/runs`),"runsForIssue"),issuesForRun:s(e=>Ce.get(`/heartbeat-runs/${e}/issues`),"issuesForRun")},b8={list:s((e,t)=>{const n=new URLSearchParams;t?.projectId&&n.set("projectId",t.projectId);const r=n.toString();return Ce.get(`/companies/${e}/routines${r?`?${r}`:""}`)},"list"),create:s((e,t)=>Ce.post(`/companies/${e}/routines`,t),"create"),get:s(e=>Ce.get(`/routines/${e}`),"get"),update:s((e,t)=>Ce.patch(`/routines/${e}`,t),"update"),listRevisions:s(e=>Ce.get(`/routines/${e}/revisions`),"listRevisions"),restoreRevision:s((e,t,n={})=>Ce.post(`/routines/${e}/revisions/${t}/restore`,n),"restoreRevision"),listRuns:s((e,t=50)=>Ce.get(`/routines/${e}/runs?limit=${t}`),"listRuns"),createTrigger:s((e,t)=>Ce.post(`/routines/${e}/triggers`,t),"createTrigger"),updateTrigger:s((e,t)=>Ce.patch(`/routine-triggers/${e}`,t),"updateTrigger"),deleteTrigger:s(e=>Ce.delete(`/routine-triggers/${e}`),"deleteTrigger"),rotateTriggerSecret:s(e=>Ce.post(`/routine-triggers/${e}/rotate-secret`,{}),"rotateTriggerSecret"),run:s((e,t)=>Ce.post(`/routines/${e}/run`,t??{}),"run"),activity:s(async(e,t,n)=>{const r=[uf.list(e,{entityType:"routine",entityId:t}),...(n?.triggerIds??[]).map(o=>uf.list(e,{entityType:"routine_trigger",entityId:o})),...(n?.runIds??[]).map(o=>uf.list(e,{entityType:"routine_run",entityId:o}))],i=(await Promise.all(r)).flat();return[...new Map(i.map(o=>[o.id,o])).values()].sort((o,l)=>new Date(l.createdAt).getTime()-new Date(o.createdAt).getTime())},"activity")},E8=Object.defineProperty,T8=s((e,t,n)=>t in e?E8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,"P$1"),Zr=s((e,t,n)=>T8(e,typeof t!="symbol"?t+"":t,n),"p$6"),S8=class FC{static{s(this,"S$1")}constructor(t=new Map){this.map=t}clone(){return new FC(new Map(this.map))}increment(t){const n=this.map.get(t)??0;this.map.set(t,n+1)}decrement(t,n){let r=this.map.get(t);r!==void 0&&(r-=1,this.map.set(t,r),r===0&&n())}},ec=class{static{s(this,"k$1")}constructor(){Zr(this,"map",new Map)}getOrCreate(e){let t=this.map.get(e);return t===void 0&&(t=new Set,this.map.set(e,t)),t}get(e){return this.map.get(e)}use(e,t){const n=this.get(e);n!==void 0&&t(n)}delete(e){return this.map.delete(e)}};function ds(e,t){return t(e),e}s(ds,"d$4");function yp(){}s(yp,"x$6");var VC="cell";function T0(e,t){return e===t}s(T0,"O$3");var fd=new Map,df,w8=class{static{s(this,"T$1")}constructor(e={}){Zr(this,"subscriptions",new ec),Zr(this,"singletonSubscriptions",new Map),Zr(this,"graph",new ec),Zr(this,"state",new Map),Zr(this,"distinctNodes",new Map),Zr(this,"executionMaps",new Map),Zr(this,"definitionRegistry",new Set),Zr(this,"combinedCells",[]);for(const t of Object.getOwnPropertySymbols(e))this.state.set(t,e[t])}cellInstance(e,t=!0,n=Symbol()){return this.state.has(n)||this.state.set(n,e),t!==!1&&!this.distinctNodes.has(n)&&this.distinctNodes.set(n,t===!0?T0:t),n}signalInstance(e=!0,t=Symbol()){return e!==!1&&this.distinctNodes.set(t,e===!0?T0:e),t}sub(e,t){this.register(e);const n=this.subscriptions.getOrCreate(e);return n.add(t),()=>n.delete(t)}singletonSub(e,t){return this.register(e),t===void 0?this.singletonSubscriptions.delete(e):this.singletonSubscriptions.set(e,t),()=>this.singletonSubscriptions.delete(e)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(e,t){const n=this.signalInstance();return this.connect({map:s(r=>(...i)=>{r(i)},"map"),sink:n,sources:e}),this.sub(n,t)}pubIn(e){var t;const n=Reflect.ownKeys(e),r=this.getExecutionMap(n),i=r.refCount.clone(),o=r.participatingNodes.slice(),l=new Map(this.state),a=s(c=>{this.graph.use(c,d=>{for(const{sources:u,sink:f}of d)u.has(c)&&i.decrement(f,()=>{o.splice(o.indexOf(f),1),a(f)})})},"l");for(;;){const c=o.shift();if(c===void 0)break;const d=c;let u=!1;const f=s(h=>{const g=this.distinctNodes.get(d);if(g!=null&&g(l.get(d),h)){u=!1;return}u=!0,l.set(d,h),this.state.has(d)&&this.state.set(d,h)},"y");if(Object.prototype.hasOwnProperty.call(e,d)?f(e[d]):r.projections.use(d,h=>{for(const g of h){const p=[...Array.from(g.sources),...Array.from(g.pulls)].map(v=>l.get(v));g.map(f)(...p)}}),u){const h=l.get(d);this.inContext(()=>{this.subscriptions.use(d,g=>{for(const p of g)p(h)})}),(t=this.singletonSubscriptions.get(d))==null||t(h)}else a(d)}}connect({sources:e,pulls:t=[],map:n,sink:r}){const i={map:n,pulls:new Set(t),sink:this.register(r),sources:new Set(e)};for(const o of[...e,...t])this.register(o),this.graph.getOrCreate(o).add(i);this.executionMaps.clear()}pub(e,t){this.pubIn({[e]:t})}pipe(e,...t){return this.combineOperators(...t)(e)}transformer(...e){return t=>ds(this.signalInstance(),n=>(this.link(this.pipe(n,...e),t),n))}link(e,t){this.connect({map:s(n=>r=>{n(r)},"map"),sink:t,sources:[e]})}combine(...e){return ds(this.signalInstance(),t=>{this.connect({map:s(n=>(...r)=>{n(r)},"map"),sink:t,sources:e})})}combineCells(...e){const t=this.combinedCells.find(r=>e.length===r.sources.length&&e.every((i,o)=>i===r.sources[o]));if(t)return t.cell;const n=this.cellInstance(e.map(r=>this.getValue(r)),!0);return this.connect({map:s(r=>(...i)=>{r(i)},"map"),sink:n,sources:e}),this.combinedCells.push({sources:e,cell:n}),n}getValue(e){return this.register(e),this.state.get(e)}getValues(e){return e.map(t=>this.getValue(t))}register(e){const t=fd.get(e);return t===void 0||this.definitionRegistry.has(e)?e:(this.definitionRegistry.add(e),ds(t.type===VC?this.cellInstance(t.initial,t.distinct,e):this.signalInstance(t.distinct,e),n=>{this.inContext(()=>{t.init(this,n)})}))}inContext(e){const t=df;df=this;const n=e();return df=t,n}changeWith(e,t,n){this.connect({sources:[t],pulls:[e],sink:e,map:s(r=>(i,o)=>{r(n(o,i))},"map")})}calculateExecutionMap(e){const t=[],n=new Set,r=new ec,i=new S8,o=new ec,l=s((a,c=0)=>{i.increment(a),!n.has(a)&&(this.register(a),r.use(a,d=>{c=Math.max(...Array.from(d).map(u=>t.indexOf(u)))+1}),this.graph.use(a,d=>{for(const u of d)u.sources.has(a)?(o.getOrCreate(u.sink).add(u),l(u.sink,c)):r.getOrCreate(u.sink).add(a)}),n.add(a),t.splice(c,0,a))},"l");return e.forEach(l),{participatingNodes:t,pendingPulls:r,projections:o,refCount:i}}getExecutionMap(e){let t=e;if(e.length===1){t=e[0];const r=this.executionMaps.get(t);if(r!==void 0)return r}else for(const[r,i]of this.executionMaps.entries())if(Array.isArray(r)&&r.length===e.length&&r.every(o=>e.includes(o)))return i;const n=this.calculateExecutionMap(e);return this.executionMaps.set(t,n),n}combineOperators(...e){return t=>{for(const n of e)t=n(t,this);return t}}};function fe(e,t=yp,n=!0){return ds(Symbol(),r=>{fd.set(r,{type:VC,distinct:n,initial:e,init:t})})}s(fe,"$$2");function kt(e=yp,t=!1){return ds(Symbol(),n=>{fd.set(n,{type:"signal",distinct:t,init:e})})}s(kt,"K$1");function Xi(e=yp){return ds(Symbol(),t=>{fd.set(t,{type:"signal",distinct:!1,init:e})})}s(Xi,"q$3");var BC=m.createContext(null);function hd(){const e=m.useContext(BC);if(e===null)throw new Error("useRealm must be used within a RealmContextProvider");return e}s(hd,"R$2");function li(e){const t=hd();t.register(e);const n=m.useCallback(r=>t.sub(e,r),[t,e]);return m.useSyncExternalStore(n,()=>t.getValue(e),()=>t.getValue(e))}s(li,"E$3");function Er(...e){const t=hd();return li(m.useMemo(()=>t.combineCells.apply(t,e),[t,...e]))}s(Er,"X$4");function Nn(e){const t=hd();return t.register(e),m.useCallback(n=>{t.pub(e,n)},[t,e])}s(Nn,"A$1");function Hi(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:s(i=>o=>{i(e(o))},"map"),sink:r,sources:[t]}),r}}s(Hi,"_$2");function mt(...e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:s(i=>(...o)=>{i(o)},"map"),pulls:e,sink:r,sources:[t]}),r}}s(mt,"tt$2");function HC(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:s(i=>()=>{i(e)},"map"),sink:r,sources:[t]}),r}}s(HC,"et$3");function gd(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:s(i=>o=>{e(o)&&i(o)},"map"),sink:r,sources:[t]}),r}}s(gd,"nt$5");function KC(e,t){return(n,r)=>{const i=r.signalInstance();return r.connect({map:s(o=>l=>{o(t=e(t,l))},"map"),sink:i,sources:[n]}),i}}s(KC,"it$4");var Xc=new WeakMap;function S0(e,t){let n=Xc.get(e);return n||(n=new Set,Xc.set(e,n)),n.add(t),()=>{n.delete(t)}}s(S0,"registerRealmCleanup");function w0(e){const t=Xc.get(e);if(Xc.delete(e),!t)return;let n=!1,r;for(const i of[...t].reverse())try{i()}catch(o){n||(n=!0,r=o)}if(n)throw r instanceof Error?r:new Error("Realm cleanup failed with a non-Error value")}s(w0,"disposeRealmSession");function Sn(e){return function(t){return{init:s(n=>{var r;return(r=e.init)==null?void 0:r.call(e,n,t)},"init"),postInit:s(n=>{var r;return(r=e.postInit)==null?void 0:r.call(e,n,t)},"postInit"),update:s(n=>{var r;return(r=e.update)==null?void 0:r.call(e,n,t)},"update")}}}s(Sn,"realmPlugin");function k8({children:e,plugins:t}){const[n,r]=m.useState(null);return m.useEffect(()=>{var i,o;const l=new w8;try{for(const a of t)(i=a.init)==null||i.call(a,l);for(const a of t)(o=a.postInit)==null||o.call(a,l)}catch(a){try{w0(l)}catch(c){throw new AggregateError([a,c],"Realm plugin initialization and cleanup both failed")}throw a}return r(l),()=>{w0(l)}},[]),m.useEffect(()=>{var i;if(n)for(const o of t)(i=o.update)==null||i.call(o,n)}),n?m.createElement(BC.Provider,{value:n},e):null}s(k8,"RealmWithPlugins");var M8=Vx({$addUpdateTag:s(()=>Mo,"$addUpdateTag"),$applyNodeReplacement:s(()=>Oa,"$applyNodeReplacement"),$assumeActiveEditor:s(()=>JA,"$assumeActiveEditor"),$caretFromPoint:s(()=>oi,"$caretFromPoint"),$caretRangeFromSelection:s(()=>Kh,"$caretRangeFromSelection"),$cloneWithProperties:s(()=>sm,"$cloneWithProperties"),$cloneWithPropertiesEphemeral:s(()=>b7,"$cloneWithPropertiesEphemeral"),$comparePointCaretNext:s(()=>fm,"$comparePointCaretNext"),$copyNode:s(()=>nm,"$copyNode"),$create:s(()=>T7,"$create"),$createChildrenArray:s(()=>Yl,"$createChildrenArray"),$createLineBreakNode:s(()=>Aa,"$createLineBreakNode"),$createNodeSelection:s(()=>au,"$createNodeSelection"),$createParagraphNode:s(()=>_n,"$createParagraphNode"),$createPoint:s(()=>_r,"$createPoint"),$createRangeSelection:s(()=>l2,"$createRangeSelection"),$createRangeSelectionFromDom:s(()=>UA,"$createRangeSelectionFromDom"),$createTabNode:s(()=>Bp,"$createTabNode"),$createTextNode:s(()=>Bt,"$createTextNode"),$extendCaretToRange:s(()=>um,"$extendCaretToRange"),$findMatchingParent:s(()=>ki,"$findMatchingParent"),$formatText:s(()=>Y5,"$formatText"),$fullReconcile:s(()=>d2,"$fullReconcile"),$generateNodesFromRawText:s(()=>Hp,"$generateNodesFromRawText"),$getAdjacentChildCaret:s(()=>Cs,"$getAdjacentChildCaret"),$getAdjacentNode:s(()=>$2,"$getAdjacentNode"),$getAdjacentSiblingOrParentSiblingCaret:s(()=>$7,"$getAdjacentSiblingOrParentSiblingCaret"),$getCaretInDirection:s(()=>$r,"$getCaretInDirection"),$getCaretRange:s(()=>Ji,"$getCaretRange"),$getCaretRangeInDirection:s(()=>gm,"$getCaretRangeInDirection"),$getCharacterOffsets:s(()=>Nh,"$getCharacterOffsets"),$getChildCaret:s(()=>ui,"$getChildCaret"),$getChildCaretAtIndex:s(()=>yb,"$getChildCaretAtIndex"),$getChildCaretOrSelf:s(()=>fb,"$getChildCaretOrSelf"),$getCollapsedCaretRange:s(()=>pb,"$getCollapsedCaretRange"),$getCommonAncestor:s(()=>yu,"$getCommonAncestor"),$getCommonAncestorResultBranchOrder:s(()=>hm,"$getCommonAncestorResultBranchOrder"),$getDOMSlot:s(()=>Pn,"$getDOMSlot"),$getDOMTextNode:s(()=>ii,"$getDOMTextNode"),$getDocument:s(()=>xn,"$getDocument"),$getEditor:s(()=>Sr,"$getEditor"),$getEditorDOMRenderConfig:s(()=>om,"$getEditorDOMRenderConfig"),$getNearestNodeFromDOMNode:s(()=>Gp,"$getNearestNodeFromDOMNode"),$getNearestRootOrShadowRoot:s(()=>em,"$getNearestRootOrShadowRoot"),$getNodeByKey:s(()=>rt,"$getNodeByKey"),$getNodeByKeyOrThrow:s(()=>B2,"$getNodeByKeyOrThrow"),$getNodeFromDOMNode:s(()=>Jp,"$getNodeFromDOMNode"),$getPreviousSelection:s(()=>$o,"$getPreviousSelection"),$getRoot:s(()=>$n,"$getRoot"),$getSelection:s(()=>Ve,"$getSelection"),$getSiblingCaret:s(()=>vt,"$getSiblingCaret"),$getSlot:s(()=>Wi,"$getSlot"),$getSlotFrame:s(()=>sb,"$getSlotFrame"),$getSlotHost:s(()=>zn,"$getSlotHost"),$getSlotNameWithinHost:s(()=>ob,"$getSlotNameWithinHost"),$getSlotNames:s(()=>Zn,"$getSlotNames"),$getState:s(()=>tu,"$getState"),$getStateChange:s(()=>Q8,"$getStateChange"),$getTextContent:s(()=>zA,"$getTextContent"),$getTextNodeOffset:s(()=>vr,"$getTextNodeOffset"),$getTextPointCaret:s(()=>ji,"$getTextPointCaret"),$getTextPointCaretSlice:s(()=>Hh,"$getTextPointCaretSlice"),$getWritableNodeState:s(()=>Tp,"$getWritableNodeState"),$hasAncestor:s(()=>ql,"$hasAncestor"),$hasUpdateTag:s(()=>u7,"$hasUpdateTag"),$insertNodeToNearestRootAtCaret:s(()=>Cb,"$insertNodeToNearestRootAtCaret"),$insertNodes:s(()=>WA,"$insertNodes"),$isBlockElementNode:s(()=>o2,"$isBlockElementNode"),$isChildCaret:s(()=>Yn,"$isChildCaret"),$isDecoratorNode:s(()=>We,"$isDecoratorNode"),$isEditorState:s(()=>ZA,"$isEditorState"),$isElementDOMSlot:s(()=>Y2,"$isElementDOMSlot"),$isElementNode:s(()=>F,"$isElementNode"),$isExtendableTextPointCaret:s(()=>_b,"$isExtendableTextPointCaret"),$isInlineElementOrDecoratorNode:s(()=>V2,"$isInlineElementOrDecoratorNode"),$isInlineFormattable:s(()=>lu,"$isInlineFormattable"),$isLeafNode:s(()=>s7,"$isLeafNode"),$isLexicalNode:s(()=>Pp,"$isLexicalNode"),$isLineBreakNode:s(()=>Lr,"$isLineBreakNode"),$isNodeCaret:s(()=>I7,"$isNodeCaret"),$isNodeSelection:s(()=>Ds,"$isNodeSelection"),$isParagraphNode:s(()=>T2,"$isParagraphNode"),$isRangeSelection:s(()=>_e,"$isRangeSelection"),$isRootNode:s(()=>At,"$isRootNode"),$isRootOrShadowRoot:s(()=>Mt,"$isRootOrShadowRoot"),$isSelectionCapturedInDecoratorInput:s(()=>Td,"$isSelectionCapturedInDecoratorInput"),$isShadowRootNode:s(()=>tm,"$isShadowRootNode"),$isSiblingCaret:s(()=>zi,"$isSiblingCaret"),$isSlotChild:s(()=>Ui,"$isSlotChild"),$isSlotHost:s(()=>Dr,"$isSlotHost"),$isTabNode:s(()=>vd,"$isTabNode"),$isTextNode:s(()=>Q,"$isTextNode"),$isTextPointCaret:s(()=>mr,"$isTextPointCaret"),$isTextPointCaretSlice:s(()=>L7,"$isTextPointCaretSlice"),$isTokenOrSegmented:s(()=>On,"$isTokenOrSegmented"),$isTokenOrTab:s(()=>Fi,"$isTokenOrTab"),$markSlotEditable:s(()=>nb,"$markSlotEditable"),$needsBlockCursorBeside:s(()=>Rc,"$needsBlockCursorBeside"),$nodesOfType:s(()=>c7,"$nodesOfType"),$normalizeCaret:s(()=>pr,"$normalizeCaret"),$normalizeSelection__EXPERIMENTAL:s(()=>ns,"$normalizeSelection__EXPERIMENTAL"),$onUpdate:s(()=>F2,"$onUpdate"),$parseSerializedNode:s(()=>GA,"$parseSerializedNode"),$removeFromParent:s(()=>gr,"$removeFromParent"),$removeSlot:s(()=>cb,"$removeSlot"),$removeTextFromCaretRange:s(()=>vb,"$removeTextFromCaretRange"),$rewindSiblingCaret:s(()=>Fo,"$rewindSiblingCaret"),$selectAll:s(()=>a7,"$selectAll"),$setCompositionKey:s(()=>Rt,"$setCompositionKey"),$setDirectionFromDOM:s(()=>Q2,"$setDirectionFromDOM"),$setFormatFromDOM:s(()=>eb,"$setFormatFromDOM"),$setPointFromCaret:s(()=>bs,"$setPointFromCaret"),$setSelection:s(()=>hn,"$setSelection"),$setSelectionFromCaretRange:s(()=>mb,"$setSelectionFromCaretRange"),$setSlot:s(()=>am,"$setSlot"),$setState:s(()=>eA,"$setState"),$setTextFormat:s(()=>HA,"$setTextFormat"),$splitAtPointCaretNext:s(()=>xb,"$splitAtPointCaretNext"),$splitNode:s(()=>h7,"$splitNode"),$updateDOMSelection:s(()=>a2,"$updateDOMSelection"),$updateRangeSelectionFromCaretRange:s(()=>El,"$updateRangeSelectionFromCaretRange"),ArtificialNode__DO_NOT_USE:s(()=>y2,"ArtificialNode__DO_NOT_USE"),BEFORE_INPUT_COMMAND:s(()=>wp,"BEFORE_INPUT_COMMAND"),BLUR_COMMAND:s(()=>N5,"BLUR_COMMAND"),CAN_REDO_COMMAND:s(()=>pA,"CAN_REDO_COMMAND"),CAN_UNDO_COMMAND:s(()=>mA,"CAN_UNDO_COMMAND"),CAN_USE_BEFORE_INPUT:s(()=>Pl,"CAN_USE_BEFORE_INPUT"),CAN_USE_DOM:s(()=>ir,"CAN_USE_DOM"),CLEAR_EDITOR_COMMAND:s(()=>hA,"CLEAR_EDITOR_COMMAND"),CLEAR_HISTORY_COMMAND:s(()=>gA,"CLEAR_HISTORY_COMMAND"),CLICK_COMMAND:s(()=>h5,"CLICK_COMMAND"),COLLABORATION_TAG:s(()=>MA,"COLLABORATION_TAG"),COMMAND_PRIORITY_BEFORE_CRITICAL:s(()=>-4,"COMMAND_PRIORITY_BEFORE_CRITICAL"),COMMAND_PRIORITY_BEFORE_EDITOR:s(()=>-8,"COMMAND_PRIORITY_BEFORE_EDITOR"),COMMAND_PRIORITY_BEFORE_HIGH:s(()=>-5,"COMMAND_PRIORITY_BEFORE_HIGH"),COMMAND_PRIORITY_BEFORE_LOW:s(()=>-7,"COMMAND_PRIORITY_BEFORE_LOW"),COMMAND_PRIORITY_BEFORE_NORMAL:s(()=>-6,"COMMAND_PRIORITY_BEFORE_NORMAL"),COMMAND_PRIORITY_CRITICAL:s(()=>4,"COMMAND_PRIORITY_CRITICAL"),COMMAND_PRIORITY_EDITOR:s(()=>0,"COMMAND_PRIORITY_EDITOR"),COMMAND_PRIORITY_HIGH:s(()=>3,"COMMAND_PRIORITY_HIGH"),COMMAND_PRIORITY_LOW:s(()=>1,"COMMAND_PRIORITY_LOW"),COMMAND_PRIORITY_NORMAL:s(()=>2,"COMMAND_PRIORITY_NORMAL"),COMPOSITION_END_COMMAND:s(()=>Ap,"COMPOSITION_END_COMMAND"),COMPOSITION_END_TAG:s(()=>Fp,"COMPOSITION_END_TAG"),COMPOSITION_START_COMMAND:s(()=>Mp,"COMPOSITION_START_COMMAND"),COMPOSITION_START_TAG:s(()=>OA,"COMPOSITION_START_TAG"),CONTROLLED_TEXT_INSERTION_COMMAND:s(()=>fs,"CONTROLLED_TEXT_INSERTION_COMMAND"),COPY_COMMAND:s(()=>Rp,"COPY_COMMAND"),CUT_COMMAND:s(()=>Lp,"CUT_COMMAND"),CUT_TAG:s(()=>"cut","CUT_TAG"),DEFAULT_EDITOR_DOM_CONFIG:s(()=>Gl,"DEFAULT_EDITOR_DOM_CONFIG"),DELETE_CHARACTER_COMMAND:s(()=>Wl,"DELETE_CHARACTER_COMMAND"),DELETE_LINE_COMMAND:s(()=>jl,"DELETE_LINE_COMMAND"),DELETE_WORD_COMMAND:s(()=>zl,"DELETE_WORD_COMMAND"),DRAGEND_COMMAND:s(()=>M5,"DRAGEND_COMMAND"),DRAGOVER_COMMAND:s(()=>k5,"DRAGOVER_COMMAND"),DRAGSTART_COMMAND:s(()=>w5,"DRAGSTART_COMMAND"),DROP_COMMAND:s(()=>S5,"DROP_COMMAND"),DecoratorNode:s(()=>Kp,"DecoratorNode"),ElementNode:s(()=>Rs,"ElementNode"),FOCUS_COMMAND:s(()=>I5,"FOCUS_COMMAND"),FORMAT_ELEMENT_COMMAND:s(()=>fA,"FORMAT_ELEMENT_COMMAND"),FORMAT_TEXT_COMMAND:s(()=>Ii,"FORMAT_TEXT_COMMAND"),HISTORIC_TAG:s(()=>SA,"HISTORIC_TAG"),HISTORY_MERGE_TAG:s(()=>Nc,"HISTORY_MERGE_TAG"),HISTORY_PUSH_TAG:s(()=>wA,"HISTORY_PUSH_TAG"),INDENT_CONTENT_COMMAND:s(()=>uA,"INDENT_CONTENT_COMMAND"),INPUT_COMMAND:s(()=>kp,"INPUT_COMMAND"),INSERT_LINE_BREAK_COMMAND:s(()=>Cl,"INSERT_LINE_BREAK_COMMAND"),INSERT_PARAGRAPH_COMMAND:s(()=>Th,"INSERT_PARAGRAPH_COMMAND"),INSERT_TAB_COMMAND:s(()=>cA,"INSERT_TAB_COMMAND"),INTERNAL_$isBlock:s(()=>pn,"INTERNAL_$isBlock"),IS_ALL_FORMATTING:s(()=>D8,"IS_ALL_FORMATTING"),IS_ANDROID:s(()=>xp,"IS_ANDROID"),IS_ANDROID_CHROME:s(()=>Fl,"IS_ANDROID_CHROME"),IS_APPLE:s(()=>Kn,"IS_APPLE"),IS_APPLE_WEBKIT:s(()=>wa,"IS_APPLE_WEBKIT"),IS_BOLD:s(()=>1,"IS_BOLD"),IS_CHROME:s(()=>Cp,"IS_CHROME"),IS_CODE:s(()=>16,"IS_CODE"),IS_FIREFOX:s(()=>ai,"IS_FIREFOX"),IS_HIGHLIGHT:s(()=>128,"IS_HIGHLIGHT"),IS_IOS:s(()=>To,"IS_IOS"),IS_ITALIC:s(()=>2,"IS_ITALIC"),IS_SAFARI:s(()=>Sa,"IS_SAFARI"),IS_STRIKETHROUGH:s(()=>4,"IS_STRIKETHROUGH"),IS_SUBSCRIPT:s(()=>32,"IS_SUBSCRIPT"),IS_SUPERSCRIPT:s(()=>64,"IS_SUPERSCRIPT"),IS_UNDERLINE:s(()=>8,"IS_UNDERLINE"),KEY_ARROW_DOWN_COMMAND:s(()=>y5,"KEY_ARROW_DOWN_COMMAND"),KEY_ARROW_LEFT_COMMAND:s(()=>m5,"KEY_ARROW_LEFT_COMMAND"),KEY_ARROW_RIGHT_COMMAND:s(()=>g5,"KEY_ARROW_RIGHT_COMMAND"),KEY_ARROW_UP_COMMAND:s(()=>_5,"KEY_ARROW_UP_COMMAND"),KEY_BACKSPACE_COMMAND:s(()=>C5,"KEY_BACKSPACE_COMMAND"),KEY_DELETE_COMMAND:s(()=>E5,"KEY_DELETE_COMMAND"),KEY_DOWN_COMMAND:s(()=>Dp,"KEY_DOWN_COMMAND"),KEY_ENTER_COMMAND:s(()=>ru,"KEY_ENTER_COMMAND"),KEY_ESCAPE_COMMAND:s(()=>b5,"KEY_ESCAPE_COMMAND"),KEY_MODIFIER_COMMAND:s(()=>O5,"KEY_MODIFIER_COMMAND"),KEY_SPACE_COMMAND:s(()=>x5,"KEY_SPACE_COMMAND"),KEY_TAB_COMMAND:s(()=>T5,"KEY_TAB_COMMAND"),LineBreakNode:s(()=>Cd,"LineBreakNode"),MOVE_TO_END:s(()=>p5,"MOVE_TO_END"),MOVE_TO_START:s(()=>v5,"MOVE_TO_START"),NODE_STATE_DIRECT:s(()=>ph,"NODE_STATE_DIRECT"),NODE_STATE_KEY:s(()=>"$","NODE_STATE_KEY"),NODE_STATE_LATEST:s(()=>t5,"NODE_STATE_LATEST"),OUTDENT_CONTENT_COMMAND:s(()=>dA,"OUTDENT_CONTENT_COMMAND"),PASTE_COMMAND:s(()=>Ip,"PASTE_COMMAND"),PASTE_TAG:s(()=>kA,"PASTE_TAG"),ParagraphNode:s(()=>bd,"ParagraphNode"),REDO_COMMAND:s(()=>Op,"REDO_COMMAND"),REMOVE_TEXT_COMMAND:s(()=>Mc,"REMOVE_TEXT_COMMAND"),RootNode:s(()=>xd,"RootNode"),SELECTION_CHANGE_COMMAND:s(()=>Sp,"SELECTION_CHANGE_COMMAND"),SELECTION_INSERT_CLIPBOARD_NODES_COMMAND:s(()=>lA,"SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),SELECT_ALL_COMMAND:s(()=>A5,"SELECT_ALL_COMMAND"),SET_TEXT_FORMAT_COMMAND:s(()=>aA,"SET_TEXT_FORMAT_COMMAND"),SKIP_COLLAB_TAG:s(()=>AA,"SKIP_COLLAB_TAG"),SKIP_DOM_SELECTION_TAG:s(()=>NA,"SKIP_DOM_SELECTION_TAG"),SKIP_SCROLL_INTO_VIEW_TAG:s(()=>IA,"SKIP_SCROLL_INTO_VIEW_TAG"),SKIP_SELECTION_FOCUS_TAG:s(()=>B5,"SKIP_SELECTION_FOCUS_TAG"),TEXT_TYPE_TO_FORMAT:s(()=>qt,"TEXT_TYPE_TO_FORMAT"),TabNode:s(()=>md,"TabNode"),TextNode:s(()=>ka,"TextNode"),UNDO_COMMAND:s(()=>Np,"UNDO_COMMAND"),addClassNamesToElement:s(()=>W7,"addClassNamesToElement"),buildImportMap:s(()=>TA,"buildImportMap"),configExtension:s(()=>B7,"configExtension"),createCommand:s(()=>ke,"createCommand"),createEditor:s(()=>e7,"createEditor"),createRefCountedRegistry:s(()=>D5,"createRefCountedRegistry"),createSharedNodeState:s(()=>n5,"createSharedNodeState"),createState:s(()=>X8,"createState"),declarePeerDependency:s(()=>H7,"declarePeerDependency"),defineExtension:s(()=>V7,"defineExtension"),findAllLexicalElementsDeep:s(()=>U2,"findAllLexicalElementsDeep"),flipDirection:s(()=>Qi,"flipDirection"),getActiveElement:s(()=>mu,"getActiveElement"),getActiveElementDeep:s(()=>xs,"getActiveElementDeep"),getComposedEventTarget:s(()=>rm,"getComposedEventTarget"),getComposedStaticRange:s(()=>Ps,"getComposedStaticRange"),getDOMOwnerDocument:s(()=>wd,"getDOMOwnerDocument"),getDOMSelection:s(()=>or,"getDOMSelection"),getDOMSelectionFromTarget:s(()=>H2,"getDOMSelectionFromTarget"),getDOMSelectionPoints:s(()=>tr,"getDOMSelectionPoints"),getDOMSelectionRange:s(()=>z2,"getDOMSelectionRange"),getDOMSelectionRangeAndPoints:s(()=>f7,"getDOMSelectionRangeAndPoints"),getDOMShadowRoots:s(()=>K2,"getDOMShadowRoots"),getDOMTextNode:s(()=>M2,"getDOMTextNode"),getDeclaredSlots:s(()=>lb,"getDeclaredSlots"),getEditorPropertyFromDOMNode:s(()=>Na,"getEditorPropertyFromDOMNode"),getNearestEditorFromDOMNode:s(()=>vo,"getNearestEditorFromDOMNode"),getParentElement:s(()=>Po,"getParentElement"),getRegisteredNode:s(()=>Ed,"getRegisteredNode"),getRegisteredNodeOrThrow:s(()=>jp,"getRegisteredNodeOrThrow"),getRegisteredSubtypeMap:s(()=>E7,"getRegisteredSubtypeMap"),getRootOwnerDocument:s(()=>W2,"getRootOwnerDocument"),getStaticNodeConfig:s(()=>Da,"getStaticNodeConfig"),getStyleObjectFromCSS:s(()=>Ah,"getStyleObjectFromCSS"),getTextDirection:s(()=>o7,"getTextDirection"),getTransformSetFromKlass:s(()=>w2,"getTransformSetFromKlass"),isBlockDomNode:s(()=>im,"isBlockDomNode"),isCurrentlyReadOnlyMode:s(()=>ko,"isCurrentlyReadOnlyMode"),isDOMCapturingSelection:s(()=>Zl,"isDOMCapturingSelection"),isDOMDocumentNode:s(()=>Ls,"isDOMDocumentNode"),isDOMNode:s(()=>Fs,"isDOMNode"),isDOMShadowRoot:s(()=>ci,"isDOMShadowRoot"),isDOMTextNode:s(()=>Tr,"isDOMTextNode"),isDOMUnmanaged:s(()=>lm,"isDOMUnmanaged"),isDocumentFragment:s(()=>q2,"isDocumentFragment"),isExactShortcutMatch:s(()=>qe,"isExactShortcutMatch"),isHTMLAnchorElement:s(()=>g7,"isHTMLAnchorElement"),isHTMLElement:s(()=>_t,"isHTMLElement"),isHTMLTableCellElement:s(()=>m7,"isHTMLTableCellElement"),isHTMLTableRowElement:s(()=>p7,"isHTMLTableRowElement"),isInlineDomNode:s(()=>Z2,"isInlineDomNode"),isLastChildInBlockNode:s(()=>b2,"isLastChildInBlockNode"),isLexicalEditor:s(()=>Sd,"isLexicalEditor"),isModifierMatch:s(()=>L2,"isModifierMatch"),isOnlyChildInBlockNode:s(()=>C2,"isOnlyChildInBlockNode"),isSelectionCapturedInDecoratorInput:s(()=>i7,"isSelectionCapturedInDecoratorInput"),isSelectionWithinEditor:s(()=>Ia,"isSelectionWithinEditor"),iterStaticNodeConfigChain:s(()=>Ra,"iterStaticNodeConfigChain"),makeStepwiseIterator:s(()=>dm,"makeStepwiseIterator"),mergeRegister:s(()=>pm,"mergeRegister"),mountSlotContainer:s(()=>y7,"mountSlotContainer"),normalizeClassNames:s(()=>La,"normalizeClassNames"),registerEventListener:s(()=>$p,"registerEventListener"),registerEventListeners:s(()=>j7,"registerEventListeners"),removeClassNamesFromElement:s(()=>z7,"removeClassNamesFromElement"),removeFromParent:s(()=>l7,"removeFromParent"),resetRandomKey:s(()=>n7,"resetRandomKey"),safeCast:s(()=>K7,"safeCast"),setDOMStyleFromCSS:s(()=>Ih,"setDOMStyleFromCSS"),setDOMStyleObject:s(()=>RA,"setDOMStyleObject"),setDOMUnmanaged:s(()=>tb,"setDOMUnmanaged"),setNodeIndentFromDOM:s(()=>X2,"setNodeIndentFromDOM"),shallowMergeConfig:s(()=>U7,"shallowMergeConfig"),stopLexicalPropagation:s(()=>kh,"stopLexicalPropagation"),toggleTextFormatType:s(()=>Ki,"toggleTextFormatType"),tokenizeRawText:s(()=>c2,"tokenizeRawText"),unmountSlotContainer:s(()=>x7,"unmountSlotContainer")});function B(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}s(B,"t$5");function UC(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);n.search=r.toString()}s(UC,"e$4");var ir=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,A8=ir&&"documentMode"in document?document.documentMode:null,Kn=ir&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ai=ir&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Pl=!(!ir||!("InputEvent"in window)||A8)&&"getTargetRanges"in new window.InputEvent("input"),To=ir&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,xp=ir&&/Android/.test(navigator.userAgent),Sa=ir&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!xp,Cp=ir&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Fl=ir&&xp&&Cp,wa=ir&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Kn&&!Cp,I8=0,N8=1,O8=2;var D8=2047,R8=1,L8=2,$8=3,P8=4,F8=5,V8=6,Vl=Sa||To||wa?" ":"​",ho=`
3
+
4
+ `,bp=ai?" ":Vl,WC="֑-߿יִ-﷽ﹰ-ﻼ",zC="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",B8=new RegExp("^[^"+zC+"]*["+WC+"]"),H8=new RegExp("^[^"+WC+"]*["+zC+"]"),qt={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},K8={directionless:1,unmergeable:2},Qc={center:2,end:6,justify:4,left:1,right:3,start:5},U8={[L8]:"center",[V8]:"end",[P8]:"justify",[R8]:"left",[$8]:"right",[F8]:"start"},W8={normal:0,segmented:2,token:1},z8={[I8]:"normal",[O8]:"segmented",[N8]:"token"};var k0="$config";function M0(){return Sr()._blockCursorElement}s(M0,"j$1");function j8(e){return e!==null&&e.nodeType===1&&e.hasAttribute("data-lexical-slot")}s(j8,"V$2");var jC=class wc{static{s(this,"q$2")}element;before;after;constructor(t,n,r){this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new wc(this.element,t,this.after)}withAfter(t){return new wc(this.element,this.before,t)}withElement(t){return this.element===t?this:new wc(t,this.before,this.after)}insertChild(t){const n=this.getInsertionAnchor();return n!==null&&n.parentElement!==this.element&&B(357),this.element.insertBefore(t,n),this}removeChild(t){return t.parentElement!==this.element&&B(358),this.element.removeChild(t),this}replaceChild(t,n){return n.parentElement!==this.element&&B(359),this.element.replaceChild(t,n),this}getFirstChild(){const t=this.getFirstChildAnchor(),n=t?t.nextSibling:this.element.firstChild;return n===this.getInsertionAnchor()?null:n}getFirstChildAnchor(){return this.after}resolveLeafPosition(t,n,r){if(this.element===t)return n===t&&r===0?"before":"after";const i=A0(t,this.element);if(i===null)return"after";const o=Array.prototype.indexOf.call(t.childNodes,i);if(o<0)return"after";if(n===t)return r<=o?"before":"after";const l=A0(t,n);if(l===null)return"after";const a=Array.prototype.indexOf.call(t.childNodes,l);return a>=0&&a<=o?"before":"after"}getInsertionAnchor(){return this.before}};function A0(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;return n}s(A0,"Y$1");var JC=class kc extends jC{static{s(this,"G$1")}withBefore(t){return new kc(this.element,t,this.after)}withAfter(t){return new kc(this.element,this.before,t)}withElement(t){return this.element===t?this:new kc(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),n=t?t.nextSibling:this.element.firstChild;for(;j8(n);)t=n,n=n.nextSibling;const r=t?t.nextSibling:this.element.firstChild;return r!==null&&r===M0()?r:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,t===null)this.removeManagedLineBreak();else{const n=t==="decorator"&&(wa||To||Sa);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const n=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&n.removeChild(r),n.removeChild(t),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const n=this.getManagedLineBreak();if(n){if(t===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,o=xn().createElement("br");if(o.setAttribute("data-lexical-managed-linebreak","true"),r.insertBefore(o,i),t){const l=xn().createElement("img");l.setAttribute("data-lexical-managed-linebreak","true"),l.style.setProperty("display","inline","important"),l.style.setProperty("border","0px","important"),l.style.setProperty("margin","0px","important"),l.alt="",r.insertBefore(l,o),r.__lexicalLineBreak=l}else r.__lexicalLineBreak=o}getFirstChildOffset(){const t=this.getFirstChild(),n=this.getInsertionAnchor();let r=0;for(let i=this.element.firstChild;i!==null&&i!==t&&i!==n;i=i.nextSibling)r++;return r}resolveChildIndex(t,n,r,i){if(r===this.element){const c=this.getFirstChildOffset(),d=M0(),u=this.element.childNodes,f=Math.min(i,u.length);let h=0;for(let g=c;g<f;g++)u[g]!==d&&h++;return[t,Math.min(h,t.getChildrenSize())]}const o=I0(n,r);o.push(i);const l=I0(n,this.element);let a=t.getIndexWithinParent();for(let c=0;c<l.length;c++){const d=o[c],u=l[c];if(d===void 0||d<u)break;if(d>u){a+=1;break}}return[t.getParentOrThrow(),a]}};function I0(e,t){const n=[];let r=t;for(;r!==e&&r!==null;r=r.parentNode){let i=0;for(let o=r.previousSibling;o!==null;o=o.previousSibling)i++;n.push(i)}return r!==e&&B(225),n.reverse()}s(I0,"X$3");var GC;try{GC="0.48.0+prod.esm"}catch{}var qC=GC??'"<unknown>+source"',Ys=class{static{s(this,"tt$1")}_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){const e=Array.from(this._front).reverse();for(const t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}},io=null;function ZC(e,t=1e3){return e instanceof hh?e.clone():e.size<t?new Map(e):new hh().init(new Map(e),void 0,e.size)}s(ZC,"nt$4");var hh=class YC{static{s(this,"ot$4")}_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new YC().init(this._old,this._nursery,this._size)}init(t,n,r){return this._old=t,this._nursery=n,this._size=r,this}get size(){return this._size}has(t){return this.get(t)!==void 0}getWithTombstone(t){const n=this._nursery&&this._nursery.get(t);return n!==void 0?n:this._old&&this._old.get(t)}get(t){const n=this.getWithTombstone(t);return n===io?void 0:n}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(t=!1){if(this._nursery&&this._nursery.size>0&&(t||this.shouldCompact())){const n=new Map(this._old);for(const[r,i]of this._nursery)i!==io?n.set(r,i):n.delete(r);this._old=n,this._nursery=void 0}return this._mutable=!1,this}set(t,n){const r=this.getWithTombstone(t);if(r===n)return this;const i=this.getNursery();return r!==io&&r!==void 0||(this._size++,r===io&&i.delete(t)),i.set(t,n),this}delete(t){const n=this.has(t);return n&&(this.getNursery().set(t,io),this._size--),n}getOrInsert(t,n){const r=this.get(t);return r!==void 0?r:(this.set(t,n),n)}getOrInsertComputed(t,n){const r=this.get(t);if(r!==void 0)return r;const i=n(t);return this.set(t,i),i}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const t of this.entries())yield t[0]}*values(){for(const t of this.entries())yield t[1]}*entries(){const t=this._nursery,n=this._old;if(n)for(const r of n){const i=r[0],o=t?t.get(i):void 0;o!==io&&(o!==void 0&&(r[1]=o),yield r)}if(t)for(const r of t)r[1]===io||n&&n.has(r[0])||(yield r)}forEach(t,n){n!==void 0&&(t=t.bind(n));for(const[r,i]of this.entries())t(i,r,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function eu(e,t,n,r,i,o){if(F(e)){let l=e.getFirstChild();for(;l!==null;){const a=l.__key;l.__parent===t&&((F(l)||Dr(l)&&l.__slots!==null)&&eu(l,a,n,r,i,o),n.has(a)||o.delete(a),i.push(a)),l=l.getNextSibling()}}for(const l of Dr(e)&&e.__slots!==null?e.__slots.values():[]){const a=r.get(l);a!==void 0&&Ui(a)&&a.__slotHost===t&&((F(a)||Dr(a)&&a.__slots!==null)&&eu(a,l,n,r,i,o),n.has(l)||o.delete(l),i.push(l))}}s(eu,"rt$4");var gh=!1,Ep=0;function J8(e){Ep=e.timeStamp}s(J8,"lt$4");function ff(e,t,n){const r=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&$s(e,n)!==void 0}s(ff,"ct$3");function G8(e,t,n){const r=or(wn(n)),i=r&&tr(r,n._rootElement);let o=null,l=null;i!==null&&i.anchorNode===e&&(o=i.anchorOffset,l=i.focusOffset);const a=e.nodeValue;a!==null&&Yp(t,a,o,l,!1)}s(G8,"at$1");function q8(e,t,n){if(_e(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return Tr(t)&&n.isAttached()}s(q8,"ut$3");function Z8(e,t,n){for(let r=e;r&&!lm(r);r=Po(r)){const i=$s(r,t);if(i!==void 0){const o=rt(i,n);if(o)return We(o)||!_t(r)?void 0:[r,o]}}}s(Z8,"ft$3");function XC(e,t,n){gh=!0;const r=performance.now()-Ep>100;try{qn(e,()=>{const i=Ve()||(function(f){return f.read("latest",()=>{const h=Ve();return h!==null?h.clone():null})})(e),o=new Map,l=e._editorState,a=e._blockCursorElement;let c=!1,d="";for(let f=0;f<t.length;f++){const h=t[f],g=h.type,p=h.target,v=Z8(p,e,l);if(!v)continue;const[_,y]=v;if(g==="characterData")r&&Q(y)&&Tr(p)&&q8(i,p,y)&&G8(p,y,e);else if(g==="childList"){c=!0;const x=h.addedNodes;for(let T=0;T<x.length;T++){const M=x[T],S=Jp(M),E=M.parentNode;if(!(E==null||M===a||S!==null||ff(M,E,e)||e._slotsUsed&&_t(M)&&M.hasAttribute("data-lexical-slot")||lm(M))){if(ai){const A=(_t(M)?M.innerText:null)||M.nodeValue;A&&(d+=A)}E.removeChild(M)}}const C=h.removedNodes,b=C.length;if(b>0){let T=0;for(let M=0;M<b;M++){const S=C[M];(ff(S,p,e)||a===S)&&(p.appendChild(S),T++)}b!==T&&o.set(_,y)}}}if(o.size>0)for(const[f,h]of o)h.reconcileObservedMutation(f,e);const u=n.takeRecords();if(u.length>0){for(let f=0;f<u.length;f++){const h=u[f],g=h.addedNodes,p=h.target;for(let v=0;v<g.length;v++){const _=g[v],y=_.parentNode;y==null||_.nodeName!=="BR"||ff(_,p,e)||y.removeChild(_)}}n.takeRecords()}i!==null&&(c&&hn(i),ai&&P2(e)&&i.insertRawText(d))})}finally{gh=!1}}s(XC,"dt$5");function QC(e){const t=e._observer;t!==null&&XC(e,t.takeRecords(),t)}s(QC,"ht$4");function e5(e){(function(t){Ep===0&&wn(t).addEventListener("textInput",J8,!0)})(e),e._observer=new MutationObserver((t,n)=>{XC(e,t,n)})}s(e5,"gt$1");var ph="direct",t5="latest",Y8=class{static{s(this,"yt$4")}key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||nA).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}};function X8(e,t){return new Y8(e,t)}s(X8,"mt$5");function tu(e,t,n=t5){const r=(n==="latest"?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}s(tu,"xt$5");function Q8(e,t,n){const r=tu(e,n,ph),i=tu(t,n,ph);return n.isEqual(r,i)?null:[r,i]}s(Q8,"Ct$5");function eA(e,t,n){let r;if(Ut(),typeof n=="function"){const o=e.getLatest(),l=tu(o,t);if(r=n(l),t.isEqual(l,r))return o}else r=n;const i=e.getWritable();return Tp(i).updateFromKnown(t,r),i}s(eA,"St$6");function n5(e){const t=new Map,n=new Set;for(const{ownNodeConfig:r}of Ra(typeof e=="function"?e:e.replace))if(r&&r.stateConfigs)for(const i of r.stateConfigs){let o;"stateConfig"in i?(o=i.stateConfig,i.flat&&n.add(o.key)):o=i,t.set(o.key,o)}return{flatKeys:n,sharedConfigMap:t}}s(n5,"vt$5");var N0=new Set(["__proto__","constructor","prototype"]),tA=class r5{static{s(this,"kt$6")}node;knownState;unknownState;sharedNodeState;size;constructor(t,n,r=void 0,i=new Map,o=void 0){this.node=t,this.sharedNodeState=n,this.unknownState=r,this.knownState=i;const{sharedConfigMap:l}=this.sharedNodeState,a=o!==void 0?o:(function(c,d,u){let f=u.size;if(d)for(const h in d){const g=c.get(h);g&&u.has(g)||f++}return f})(l,r,i);this.size=a}getValue(t){const n=this.knownState.get(t);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(t.key,t);let r=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(r=t.parse(i)),this.updateFromKnown(t,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},n={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete t[r.key]:t[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in t&&(n[r]=t[r],delete t[r]);return O0(t)&&(n.$=t),n}getWritable(t){if(this.node===t)return this;const{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new r5(t,n,(function(o,l,a){let c;if(a)for(const[d,u]of Object.entries(a)){if(N0.has(d))continue;const f=o.get(d);f?l.has(f)||l.set(f,f.parse(u)):(c=c||{},c[d]=u)}return c})(n.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(const t of this.knownState.keys())t.resetOnCopyNode&&this.knownState.set(t,t.defaultValue);return this}updateFromKnown(t,n){const r=t.key;this.sharedNodeState.sharedConfigMap.set(r,t);const{knownState:i,unknownState:o}=this;i.has(t)||o&&r in o||(o&&(delete o[r],this.unknownState=O0(o)),this.size++),i.set(t,n)}updateFromUnknown(t,n){if(N0.has(t))return;const r=this.sharedNodeState.sharedConfigMap.get(t);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=n)}updateFromJSON(t){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState=void 0,t)for(const[r,i]of Object.entries(t))this.updateFromUnknown(r,i)}};function Tp(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new tA(t,i5(t));return t.__state=n,n}s(Tp,"bt$4");function i5(e){return e.__state?e.__state.sharedNodeState:jp(Sr(),e.getType()).sharedNodeState}s(i5,"Nt$6");function O0(e){if(e)for(const t in e)return e}s(O0,"wt$4");function nA(e){return e}s(nA,"Et$5");function D0(e,t,n){for(const[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);const o=n?n.getValue(r):r.defaultValue;if(o!==i&&!r.isEqual(o,i))return!0}return!1}s(D0,"Ot$6");function R0(e,t,n){const{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(const[o,l]of Object.entries(r))if(!e.has(o)&&(e.add(o),l!==(i?i[o]:void 0)))return!0}return!1}s(R0,"Mt$5");function L0(e,t){const n=e.__state;return n&&n.node===e?n.getWritable(t):n}s(L0,"At$4");function $0(e,t){const n=e.__mode,r=e.__format,i=e.__style,o=t.__mode,l=t.__format,a=t.__style,c=e.__state,d=t.__state;return(n===null||n===o)&&(r===null||r===l)&&(i===null||i===a)&&(e.__state===null||c===d||(function(u,f){if(u===f)return!0;const h=new Set;return!(u&&D0(h,u,f)||f&&D0(h,f,u)||u&&R0(h,u,f)||f&&R0(h,f,u))})(c,d))}s($0,"Dt$5");function P0(e,t){const n=e.mergeWithSibling(t),r=Ue()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}s(P0,"Pt$5");function F0(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&Q(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if($0(t,r)){r=P0(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&Q(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if($0(r,n)){r=P0(r,n);break}break}n.remove()}}else r.remove()}s(F0,"Ft$5");function ns(e){return V0(e.anchor),V0(e.focus),e}s(ns,"It$4");function V0(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),Q(r)){e.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!F(r))break;e.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}s(V0,"Lt$4");var Bl=Symbol.for("@lexical/CachedTextSize");function B0(e,t){return vh.read(()=>{let n=0,r=e;for(let i=0;i<t&&r!==null;i++){const o=hr.get(r);if(o===void 0&&B(345,r),F(o)){const l=gt.get(r);if(l!==void 0&&F(l)&&l.__parent!==o.__parent)n+=o.getTextContentSize();else{const a=So.get(r),c=a&&a.__lexicalTextContent;typeof c!="string"&&B(346,o.getType()),n+=c.length}i<t-1&&!o.isInline()&&(n+=2)}else{const l=o[Bl];l===void 0&&B(347,o.getType(),r),n+=l}r=o.__next}return n},{editor:Be})}s(B0,"zt$4");function o5(e){F(e)||e[Bl]===void 0&&(e[Bl]=Q(e)?e.__text.length:e.getTextContentSize())}s(o5,"Bt$4");var rA=4,Hl,Be,Kl,Oe="",xt=null,en=null,Zt=null;function Nr(){return{firstTextKey:Zt,format:xt,style:en}}s(Nr,"qt$3");function Un(e){e.firstTextKey!==null&&(xt=e.format,en=e.style,Zt=e.firstTextKey)}s(Un,"Yt$2");function mh(e){if(Zt!==null)return;const t=e.__lexicalFirstTextKey;if(t===void 0&&B(348),t===null)return;const n=gt.get(t);Q(n)&&(xt=n.getFormat(),en=n.getStyle(),Zt=t)}s(mh,"Gt$2");var pd,yl,xl,hr,vh,gt,So,_h,Ul,wo,Qr=!1,nu=!1;function $i(e,t){const n=hr.get(e),r=gt.has(e);if(t!==null){const i=Eh(e);i.parentNode===t&&t.removeChild(i)}if(!r){if(Be._keyToDOMMap.delete(e),F(n)){const i=Yl(n,hr);yh(i,0,i.length-1,null)}if(n!==void 0){for(const i of In(n).values()){const o=Ch(i);$i(i,null),o!==null&&o.remove()}Xp(Ul,Kl,pd,n,"destroyed")}}}s($i,"ae$2");function yh(e,t,n,r){for(let i=t;i<=n;++i){const o=e[i];o!==void 0&&$i(o,r)}}s(yh,"ue$3");function oo(e,t){e.setProperty("text-align",t)}s(oo,"fe$1");var iA="40px";function s5(e,t){const n=Hl.theme.indent;if(typeof n=="string"){const r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * var(--lexical-indent-base-value, ${iA}))`)}s(s5,"he$2");function l5(e,t){const n=e.style;t===0?oo(n,""):t===1?oo(n,"left"):t===2?oo(n,"center"):t===3?oo(n,"right"):t===4?oo(n,"justify"):t===5?oo(n,"start"):t===6&&oo(n,"end")}s(l5,"ge$2");function xh(e,t){const n=(function(r){const i=r.__dir;if(i!==null)return i;if(At(r))return null;const o=r.getParent();return o===null||Mt(o)&&o.__dir===null?"auto":null})(t);n!==null?e.dir=n:e.removeAttribute("dir")}s(xh,"_e$2");function a5(e){const t=xn().createElement("div");return t.setAttribute("data-lexical-slot",e),t.style.display="none",t}s(a5,"pe$2");function c5(e,t,n){t||e.contentEditable==="false"?nb(n,Be):n.removeAttribute("contenteditable")}s(c5,"ye$2");function H0(e,t,n){const r=Oe,i=Nr();Oe="";let o="";const l=We(e);for(const[a,c]of n){const d=a5(a);c5(t,l,d),t.appendChild(d),Oe="";const u=Nr();Pi(c,Pn(e,d,Be)),Un(u),u5(e,a,t,d),o+=Oe}return Un(i),Oe=r,o}s(H0,"me$2");function In(e){return Dr(e)&&e.__slots!==null?e.__slots:ib}s(In,"xe$3");function u5(e,t,n,r){const i=wo.$getSlotTargetElement(e,t,n,Be);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display="")}s(u5,"Ce$2");function Ch(e){const t=So.get(e);return t!==void 0?t.parentElement:null}s(Ch,"Se$2");function K0(e,t,n){const r=In(e),i=In(t);for(const[u,f]of r)if(!i.has(u)){const h=Ch(f);$i(f,null),h!==null&&h.remove()}const o=Oe,l=Nr();let a="",c=null;const d=We(t);for(const[u,f]of i){const h=r.get(u);let g=h!==void 0?Ch(h):null;Oe="";const p=Nr();if(g===null){g=a5(u);let v=null;for(const _ of n.children)if(!_.hasAttribute("data-lexical-slot")){v=_;break}n.insertBefore(g,v),Pi(f,Pn(t,g,Be))}else h===f?Yr(f,g):(h!==void 0&&$i(h,g),Pi(f,Pn(t,g,Be)));if(Un(p),c5(n,d,g),u5(t,u,n,g),a+=Oe,g.parentElement===n){const v=c===null?n.firstChild:c.nextSibling;v!==g&&n.insertBefore(g,v),c=g}}return Un(l),Oe=o,a}s(K0,"ve$2");function Pi(e,t){const n=gt.get(e);if(n===void 0&&B(60),t!==null){const i=hr.get(e);if(i!==void 0){const o=So.get(e);if(o!==void 0){const l=Ui(i)?i.__slotHost:null,a=Ui(n)?n.__slotHost:null,c=i.__parent!==n.__parent||l!==a,d=a!==null&&o.parentElement!==t.element;if(c||d)return t.insertChild(o),Yr(e,t.element)}}}const r=wo.$createDOM(n,Be);if((function(i,o,l){const a=l._keyToDOMMap;I2(o,l,i),a.set(i,o)})(e,r,Be),Q(n)?r.setAttribute("data-lexical-text","true"):We(n)&&(r.setAttribute("data-lexical-decorator","true"),tb(r,{captureSelection:!0})),F(n)){const i=n.__indent,o=n.__size;xh(r,n),i!==0&&s5(r,i);const l=In(n),a=l.size>0?H0(n,r,l):"";if(o===0)r.__lexicalTextContent=a,r.__lexicalFirstTextKey=null,Oe+=a,l.size>0&&(r.__lexicalSlotTextLength=a.length);else{const d=Oe,u=o-1;if(bh(Yl(n,gt),n,0,u,Pn(n,r,Be)),a!==""){const f=r.__lexicalTextContent||"";r.__lexicalTextContent=a+f,Oe=d+a+f}l.size>0&&(r.__lexicalSlotTextLength=a.length)}const c=n.__format;c!==0&&l5(r,c),n.isInline()||d5(null,n,r)}else{const i=n.getTextContent();if(We(n)){const o=n.decorate(Be,Hl);o!==null&&f5(e,o),r.contentEditable="false";const l=In(n);l.size>0&&H0(n,r,l)}Oe+=i}return t!==null&&t.insertChild(r),wo.$decorateDOM(n,null,r,Be),o5(n),Xp(Ul,Kl,pd,n,"created"),r}s(Pi,"Te$3");function bh(e,t,n,r,i){const o=Oe,l=Nr();Oe="",xt=null,en=null,Zt=null;let a=n;for(;a<=r;++a){const d=Nr();Pi(e[a],i);const u=gt.get(e[a]);u!==null&&Q(u)?xt===null&&(xt=u.getFormat(),en=u.getStyle(),Zt=u.__key):F(u)&&a<r&&!u.isInline()&&(Oe+=ho),Un(d)}const c=Be._keyToDOMMap.get(t.__key);c===void 0&&B(349,t.__key),c.__lexicalTextContent=Oe,c.__lexicalFirstTextKey=Zt,Oe=o+Oe,Un(l)}s(bh,"ke$3");function d5(e,t,n){const r=Pn(t,n,Be),i=r.element.__lexicalLastChildKind??null,o=(function(l,a){if(l){const c=l.__last;if(c){const d=a.get(c);if(d)return Lr(d)?"line-break":We(d)&&d.isInline()?"decorator":null}return In(l).size>0?null:"empty"}return null})(t,gt);i!==o&&r.setManagedLineBreak(o)}s(d5,"be$1");function oA(e,t,n){var r;xt=null,en=null,Zt=null,(function(i,o,l){const a=Oe,c=i.__size,d=o.__size;Oe="";const u=l.element,f=Be._keyToDOMMap.get(o.__key);f===void 0&&B(351,o.__key);const h=d-c;if(!Qr&&Math.abs(h)<=1&&c>=rA&&i.__first===o.__first&&(h!==0||!Be._cloneNotNeeded.has(i.__key))){const g=f.__lexicalTextContent,p=_h.get(i.__key);if(!Qr&&typeof g=="string"&&p!==void 0){const v=(function(_,y){const x=y.size;if(x===0||x>=_.__size)return null;let C=_.__last,b=null,T=0;for(;C!==null&&T<x;){if(!y.has(C))return null;b=C;const M=gt.get(C);if(M===void 0)return null;C=M.__prev,T++}return T!==x||C!==null&&y.has(C)?null:b})(o,p);if(v!==null){const _=p.size;if(h===0){const y=B0(v,_);let x=v,C=0;for(;x!==null&&C<_;){const E=gt.get(x);if(E===void 0)break;const A=Nr();Yr(x,u),Q(E)&&xt===null&&(xt=E.getFormat(),en=E.getStyle(),Zt=E.__key),Un(A),x=E.__next,C++}let b="";for(x=v,C=0;x!==null&&C<_;){const E=gt.get(x);if(E===void 0)break;let A;if(F(E)){const D=Be._keyToDOMMap.get(x),L=D&&D.__lexicalTextContent;typeof L!="string"&&B(352,E.getType()),A=L}else A=E.getTextContent();b+=A,C<_-1&&F(E)&&!E.isInline()&&(b+=ho),x=E.__next,C++}const T=f.__lexicalSlotTextLength||0,M=T>0?g.slice(T):g,S=M.slice(0,M.length-y)+b;f.__lexicalTextContent=S,Oe=a+S,U0(o,f,p);return}if((function(y,x,C,b,T,M,S,E){if(E!==1&&E!==-1||S!==(E===1?2:1))return!1;const A=S-E;let D=y.__last;for(let Z=0;Z<A-1;Z++){if(D===null)return!1;const ee=hr.get(D);if(ee===void 0)return!1;D=ee.__prev}if(D===null)return!1;const L=gt.get(M),G=hr.get(D);if(L===void 0||G===void 0||L.__prev!==G.__prev)return!1;const $=[];let W=M;for(let Z=0;Z<S;Z++){if(W===null)return!1;$.push(W);const ee=gt.get(W);W=ee?ee.__next:null}const z=[];W=D;for(let Z=0;Z<A;Z++){if(W===null)return!1;z.push(W);const ee=hr.get(W);W=ee?ee.__next:null}const me=new Set(z),q=new Set($),le=[];let ye=0,X=0;for(;ye<A&&X<S;)if($[X]===z[ye])le.push({key:$[X],kind:"reconcile"}),ye++,X++;else if(q.has(z[ye])){if(me.has($[X]))return!1;le.push({key:$[X],kind:"create",nextIndex:X}),X++}else le.push({key:z[ye],kind:"destroy"}),ye++;for(;ye<A;)le.push({key:z[ye++],kind:"destroy"});for(;X<S;)le.push({key:$[X],kind:"create",nextIndex:X}),X++;const ne=B0(D,A);for(const Z of le){const ee=Nr();if(Z.kind==="reconcile")Yr(Z.key,C.element);else if(Z.kind==="destroy")$i(Z.key,C.element);else{let pe=null;for(let De=Z.nextIndex+1;De<S;De++){const Ae=Be._keyToDOMMap.get($[De]);if(Ae!==void 0){pe=Ae;break}}Pi(Z.key,C.withBefore(pe??C.before))}if(Z.kind!=="destroy"){const pe=gt.get(Z.key);pe&&Q(pe)&&xt===null&&(xt=pe.getFormat(),en=pe.getStyle(),Zt=pe.__key)}Un(ee)}let he="";for(let Z=0;Z<S;Z++){const ee=gt.get($[Z]);if(ee===void 0)return!1;let pe;if(F(ee)){const De=Be._keyToDOMMap.get($[Z]),Ae=De&&De.__lexicalTextContent;typeof Ae!="string"&&B(350,ee.getType()),pe=Ae}else pe=ee.getTextContent();he+=pe,Z<S-1&&F(ee)&&!ee.isInline()&&(he+=ho)}const ge=b.__lexicalSlotTextLength||0,se=ge>0?T.slice(ge):T;return b.__lexicalTextContent=se.slice(0,se.length-ne)+he,!0})(i,0,l,f,g,v,_,h)){const y=f.__lexicalTextContent;typeof y!="string"&&B(353),Oe=a+y,U0(o,f,p);return}}}if(h===0){let v=i.__first,_=0;for(;v!==null;){const y=gt.get(v);if(y===void 0)break;const x=Qr||xl.has(v)||yl.has(v),C=Nr();if(x)Yr(v,u);else{let b,T;if(F(y)){T=So.get(v);const M=T&&T.__lexicalTextContent;typeof M!="string"&&B(354,y.getType()),b=M}else b=y.getTextContent();Oe+=b,T!==void 0&&mh(T)}Q(y)?xt===null&&(xt=y.getFormat(),en=y.getStyle(),Zt=y.__key):F(y)&&_<d-1&&!y.isInline()&&(Oe+=ho),Un(C),v=y.__next,_++}f.__lexicalTextContent=Oe,f.__lexicalFirstTextKey=Zt,Oe=a+Oe;return}}if(c===1&&d===1){const g=i.__first,p=o.__first;if(g===p)Yr(g,u);else{const _=Eh(g),y=Pi(p,null);try{_.parentNode===u?u.replaceChild(y,_):l.insertChild(y)}catch(x){if(typeof x=="object"&&x!=null){const C=`${x.toString()} Parent: ${u.tagName}, new child: {tag: ${y.tagName} key: ${p}}, old child: {tag: ${_.tagName}, key: ${g}}.`;throw new Error(C)}throw x}$i(g,null)}const v=gt.get(p);Q(v)&&xt===null&&(xt=v.getFormat(),en=v.getStyle(),Zt=v.__key)}else{const g=Yl(i,hr),p=Yl(o,gt);if(g.length!==c&&B(227),p.length!==d&&B(228),c===0)d!==0&&bh(p,o,0,d-1,l);else if(d===0){if(c!==0){const v=l.after==null&&l.before==null&&In(o).size===0&&l.element.__lexicalLineBreak==null;yh(g,0,c-1,v?null:u),v&&(u.textContent="")}}else(function(v,_,y,x,C,b){const T=x-1,M=C-1;let S,E,A=b.getFirstChild(),D=0,L=0;for(;D<=T&&L<=M;){const W=_[D],z=y[L],me=Nr();if(W===z)A=hf(Yr(z,b.element)),D++,L++;else{if(E===void 0&&(E=W0(y,L)),S===void 0)S=W0(_,D);else if(!S.has(W)){D++,Un(me);continue}if(!E.has(W)){A=hf(Eh(W)),$i(W,b.element),D++,S.delete(W),Un(me);continue}if(S.has(z)){const le=ys(Be,z);le!==A&&b.withBefore(A??b.before).insertChild(le),A=hf(Yr(z,b.element)),D++,L++}else Pi(z,b.withBefore(A??b.before)),L++}const q=gt.get(z);q!==null&&Q(q)?xt===null&&(xt=q.getFormat(),en=q.getStyle(),Zt=q.__key):F(q)&&L<=M&&!q.isInline()&&(Oe+=ho),Un(me)}const G=D>T,$=L>M;if(G&&!$){const W=y[M+1],z=W===void 0?null:Be.getElementByKey(W);bh(y,v,L,M,b.withBefore(z??b.before))}else $&&!G&&yh(_,D,T,b.element)})(o,g,p,c,d,l)}f.__lexicalTextContent=Oe,f.__lexicalFirstTextKey=Zt,Oe=a+Oe})(e,t,Pn(t,n,Be)),Mt(t)||(r=t,xt==null||xt===r.__textFormat||nu||r.setTextFormat(xt),(function(i){en==null||en===i.__textStyle||nu||i.setTextStyle(en)})(t))}s(oA,"Ne$2");function U0(e,t,n){const r=t.__lexicalFirstTextKey;if(r!=null){const i=e.__key;let o=r;for(;o!==null;){const l=gt.get(o);if(l===void 0){o=null;break}if(l.__parent===i)break;o=l.__parent}if(o!==null&&!n.has(o)){const l=gt.get(r);if(Q(l))return xt=l.getFormat(),void(en=l.getStyle())}}t.__lexicalFirstTextKey=Zt}s(U0,"we$2");function Yr(e,t){const n=hr.get(e);let r=gt.get(e);n!==void 0&&r!==void 0||B(61);const i=Qr||xl.has(e)||yl.has(e),o=ys(Be,e);if(n===r&&!i){let l;if(F(n)){const a=o.__lexicalTextContent;typeof a!="string"&&B(355,n.getType()),l=a,mh(o)}else l=n.getTextContent();return Oe+=l,o}if(n!==r&&i&&Xp(Ul,Kl,pd,r,"updated"),wo.$updateDOM(r,n,o,Be)){const l=Pi(e,null);return t===null&&B(62),t.replaceChild(l,o),$i(e,null),l}if(F(n)){F(r)||B(334,e);const l=r.__indent;(Qr||l!==n.__indent)&&s5(o,l);const a=r.__format;(Qr||a!==n.__format)&&l5(o,a);const c=i&&(In(r).size>0||In(n).size>0)?K0(n,r,o):"";if(i){const d=Oe;if(oA(n,r,o),At(r)||r.isInline()||d5(0,r,o),c!==""){const u=o.__lexicalTextContent||"";o.__lexicalTextContent=c+u,Oe=d+c+u,o.__lexicalSlotTextLength=c.length}else(In(r).size>0||In(n).size>0)&&(o.__lexicalSlotTextLength=0)}else{const d=o.__lexicalTextContent;typeof d!="string"&&B(356,n.getType()),Oe+=d,mh(o)}if((Qr||r.__dir!==n.__dir||r.__parent!==n.__parent)&&(xh(o,r),At(r)&&!Qr))for(const d of r.getChildren())F(d)&&xh(ys(Be,d.getKey()),d)}else{const l=r.getTextContent();if(We(r)){const a=r.decorate(Be,Hl);a!==null&&f5(e,a),i&&(In(r).size>0||In(n).size>0)&&K0(n,r,o)}Oe+=l}if(!nu&&At(r)){const l=r.getLatest();if(l.__cachedText!==Oe){const a=l.getWritable();a.__cachedText=Oe,r=a}}return wo.$decorateDOM(r,n,o,Be),o5(r),o}s(Yr,"Ee$1");function f5(e,t){let n=Be._pendingDecorators;const r=Be._decorators;if(n===null){if(r[e]===t)return;n=N2(Be)}n[e]=t}s(f5,"Oe$2");function hf(e){let t=e.nextSibling;return t!==null&&t===Be._blockCursorElement&&(t=t.nextSibling),t}s(hf,"Me$2");function W0(e,t){const n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}s(W0,"Ae$2");function sA(e,t,n,r,i,o){Oe="",xt=null,en=null,Zt=null,Qr=r===2,Be=n,Hl=n._config,wo=n._config.dom||Gl,Kl=n._nodes,pd=Be._listeners.mutation,yl=i,xl=o,hr=e._nodeMap,vh=e,gt=t._nodeMap,nu=t._readOnly,So=ZC(n._keyToDOMMap),_h=(function(){const a=new Map,c=s(d=>{for(const u of d){const f=gt.get(u);if(f===void 0)continue;const h=f.__parent;if(h===null)continue;let g=a.get(h);g===void 0&&(g=new Set,a.set(h,g)),g.add(u)}},"e");return c(yl.keys()),c(xl),a})();const l=new Map;return Ul=l,Yr("root",null),Be=void 0,Kl=void 0,yl=void 0,xl=void 0,hr=void 0,vh=void 0,gt=void 0,Hl=void 0,So=void 0,_h=void 0,Ul=void 0,wo=Gl,l}s(sA,"De$2");function Eh(e){const t=So.get(e);return t===void 0&&B(75,e),t}s(Eh,"Pe$3");function ke(e){return{type:e}}s(ke,"Fe$3");var Sp=ke("SELECTION_CHANGE_COMMAND"),lA=ke("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),h5=ke("CLICK_COMMAND"),wp=ke("BEFORE_INPUT_COMMAND"),kp=ke("INPUT_COMMAND"),Mp=ke("COMPOSITION_START_COMMAND"),Ap=ke("COMPOSITION_END_COMMAND"),Wl=ke("DELETE_CHARACTER_COMMAND"),Cl=ke("INSERT_LINE_BREAK_COMMAND"),Th=ke("INSERT_PARAGRAPH_COMMAND"),fs=ke("CONTROLLED_TEXT_INSERTION_COMMAND"),Ip=ke("PASTE_COMMAND"),Mc=ke("REMOVE_TEXT_COMMAND"),zl=ke("DELETE_WORD_COMMAND"),jl=ke("DELETE_LINE_COMMAND"),Ii=ke("FORMAT_TEXT_COMMAND"),aA=ke("SET_TEXT_FORMAT_COMMAND"),Np=ke("UNDO_COMMAND"),Op=ke("REDO_COMMAND"),Dp=ke("KEYDOWN_COMMAND"),g5=ke("KEY_ARROW_RIGHT_COMMAND"),p5=ke("MOVE_TO_END"),m5=ke("KEY_ARROW_LEFT_COMMAND"),v5=ke("MOVE_TO_START"),_5=ke("KEY_ARROW_UP_COMMAND"),y5=ke("KEY_ARROW_DOWN_COMMAND"),ru=ke("KEY_ENTER_COMMAND"),x5=ke("KEY_SPACE_COMMAND"),C5=ke("KEY_BACKSPACE_COMMAND"),b5=ke("KEY_ESCAPE_COMMAND"),E5=ke("KEY_DELETE_COMMAND"),T5=ke("KEY_TAB_COMMAND"),cA=ke("INSERT_TAB_COMMAND"),uA=ke("INDENT_CONTENT_COMMAND"),dA=ke("OUTDENT_CONTENT_COMMAND"),S5=ke("DROP_COMMAND"),fA=ke("FORMAT_ELEMENT_COMMAND"),w5=ke("DRAGSTART_COMMAND"),k5=ke("DRAGOVER_COMMAND"),M5=ke("DRAGEND_COMMAND"),Rp=ke("COPY_COMMAND"),Lp=ke("CUT_COMMAND"),A5=ke("SELECT_ALL_COMMAND"),hA=ke("CLEAR_EDITOR_COMMAND"),gA=ke("CLEAR_HISTORY_COMMAND"),pA=ke("CAN_REDO_COMMAND"),mA=ke("CAN_UNDO_COMMAND"),I5=ke("FOCUS_COMMAND"),N5=ke("BLUR_COMMAND"),O5=ke("KEY_MODIFIER_COMMAND");function D5(e){const t=new Map;return{dispose(){for(const n of t.values())n.dispose();t.clear()},register(n,r){let i=t.get(n);i===void 0&&(i={dispose:e(n,r),holders:new Set},t.set(n,i));const o=s(()=>{const l=t.get(n);l&&l.holders.delete(o)&&l.holders.size===0&&(t.delete(n),l.dispose())},"i");return i.holders.add(o),o}}}s(D5,"Dn$1");function $p(e,t,n,r){return e.addEventListener(t,n,r),e.removeEventListener.bind(e,t,n,r)}s($p,"Pn");var Jr=Object.freeze({}),Sh=[["keydown",function(e,t){const n=t._inputState;n.lastKeyDownTimeStamp=e.timeStamp,n.lastKeyCode=e.key,e.key!=="Backspace"&&Jl(n),!t.isComposing()&&de(t,Dp,e)}],["pointerdown",function(e,t){const n=rm(e),r=e.pointerType;Fs(n)&&r!=="touch"&&r!=="pen"&&e.button===0&&qn(t,()=>{Zl(n,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(e,t){de(t,Mp,e)}],["compositionend",function(e,t){const n=t._inputState;ai?n.compositionPhase="ending-firefox":To||!Sa&&!wa?de(t,Ap,e):(n.compositionPhase="ending-safari",n.compositionEndData=e.data)}],["input",function(e,t){e.stopPropagation();const n=t._inputState;Jl(n),qn(t,()=>{P5(e,t)||t.dispatchCommand(kp,e)},{event:e}),n.unprocessedBeforeInputData=null}],["click",function(e,t){qn(t,()=>{const n=Ve(),r=or(wn(t)),i=$o();if(r){if(_e(n)){const o=n.anchor,l=o.getNode();o.type==="element"&&o.offset===0&&n.isCollapsed()&&!At(l)&&$n().getChildrenSize()===1&&l.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if(e.pointerType==="touch"||e.pointerType==="pen"){const o=tr(r,t._rootElement).anchorNode;(_t(o)||Tr(o))&&hn(_d(i,r,t,e))}}de(t,h5,e)})}],["cut",Jr],["copy",Jr],["dragstart",Jr],["dragover",Jr],["dragend",Jr],["paste",Jr],["focus",Jr],["blur",Jr],["drop",Jr]];Pl&&Sh.push(["beforeinput",(e,t)=>(function(n,r){const i=n.inputType;i==="deleteCompositionText"||ai&&P2(r)||i!=="insertCompositionText"&&qn(r,()=>{P5(n,r)||de(r,wp,n)},{event:n})})(e,t)]);var wh=new WeakMap,iu=new WeakMap,vA=D5(e=>(e.addEventListener("selectionchange",q0),()=>e.removeEventListener("selectionchange",q0)));function R5(e,t,n,r,i,o){const l=e.anchor,a=e.focus,c=l.getNode(),d=Ue();let u;if(o!==void 0)u=o;else{const v=or(wn(d));u=v!==null?tr(v,d._rootElement):null}const f=u!==null?u.anchorNode:null,h=l.key,g=d.getElementByKey(h),p=n.length;return h!==a.key||!Q(c)||(!i&&(!Pl||d._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||c.isDirty()&&p<2||O2(n))&&l.offset!==a.offset&&!c.isComposing()||On(c)||c.isDirty()&&p>1||(i||!Pl)&&g!==null&&!c.isComposing()&&f!==ii(c,g,d)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||!c.isComposing()&&(c.getFormat()!==e.format||c.getStyle()!==e.style)||(function(v,_){if(_.isSegmented())return!0;if(!v.isCollapsed())return!1;const y=v.anchor.offset,x=_.getParentOrThrow(),C=Fi(_);return y===0?!_.canInsertTextBefore()||!x.canInsertTextBefore()&&!_.isComposing()||C||(function(b){const T=b.getPreviousSibling();return(Q(T)||F(T)&&T.isInline())&&!T.canInsertTextAfter()})(_):y===_.getTextContentSize()&&(!_.canInsertTextAfter()||!x.canInsertTextAfter()&&!_.isComposing()||C)})(e,c)}s(R5,"Bn");function z0(e,t){return Tr(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}s(z0,"Rn");function j0(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:l}=tr(e,t._rootElement),a=t._inputState;a.isSelectionChangeFromDOMUpdate&&(a.isSelectionChangeFromDOMUpdate=!1,z0(r,i)&&z0(o,l)&&!a.postDeleteSelectionToRestore)||qn(t,()=>{if(!n)return void hn(null);if(!Ia(t,r,o))return;let c=Ve();if(a.postDeleteSelectionToRestore&&_e(c)&&c.isCollapsed()){const d=c.anchor,u=a.postDeleteSelectionToRestore.anchor;(d.key===u.key&&d.offset===u.offset+1||d.offset===1&&u.getNode().is(d.getNode().getPreviousSibling()))&&(c=a.postDeleteSelectionToRestore.clone(),hn(c))}if(a.postDeleteSelectionToRestore=null,_e(c)){const d=c.anchor,u=d.getNode();if(c.isCollapsed()){e.type==="Range"&&r===o&&(c.dirty=!0);const f=wn(t).event,h=f?f.timeStamp:performance.now(),{format:g,style:p,offset:v,key:_,timeStamp:y}=a.collapsedSelectionFormat,x=$n(),C=t.isComposing()===!1&&x.getTextContent()==="";if(h<y+200&&d.offset===v&&d.key===_)Ac(c,g,p);else if(d.type==="text")Q(u)||B(141),L5(c,u);else if(d.type==="element"&&!C){F(u)||B(259);const b=d.getNode();b.isEmpty()?(function(T,M){Ac(T,M.getTextFormat(),M.getTextStyle())})(c,b):Ac(c,c.format,"")}}else{const f=d.key,h=c.focus.key,g=c.getNodes(),p=g.length,v=c.isBackward(),_=v?l:i,y=v?i:l,x=v?h:f,C=v?f:h;let b=2047,T=!1;for(let M=0;M<p;M++){const S=g[M],E=S.getTextContentSize();if(Q(S)&&E!==0&&!(M===0&&S.__key===x&&_===E||M===p-1&&S.__key===C&&y===0)&&(T=!0,b&=S.getFormat(),b===0))break}c.format=T?b:0}}de(t,Sp,void 0)})}s(j0,"Wn");function Ac(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}s(Ac,"Un");function L5(e,t){Ac(e,t.getFormat(),t.getStyle())}s(L5,"$n");function $5(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}s($5,"Hn");function J0(e){const{lastKeyCode:t}=Ue()._inputState;if(e==null||e.length<=1||t==null)return;const n=t.length===1?t:t==="Enter"?`
5
+ `:t==="Tab"?" ":null;if(!n)return;const r=Ve();if(!_e(r)||!r.isCollapsed())return;const i=r.anchor.getNode();if(!Q(i))return;const{offset:o}=r.anchor;if(i.getTextContentSize()===o){const l=i.getNextSibling();if(n===`
6
+ `){if(Lr(l))l.selectEnd();else if(!l){const a=ki(i,o2),c=a&&a.getNextSibling();F(c)&&c.selectStart()}}else n===" "?vd(l)&&l.selectEnd():Q(l)&&l.getTextContent()[0]===n&&l.select(1,1)}else i.getTextContent()[o]===n&&i.select(o+1,o+1)}s(J0,"Jn");function Jl(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}s(Jl,"jn");function G0(e){Jl(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>Jl(e),0)}s(G0,"Vn");function P5(e,t){const n=rm(e);if(_t(n)&&Zl(n,t))return!0;const r=t.getRootElement();if(r===null)return!1;const i=xs(r.ownerDocument);return i!==null&&r.contains(i)&&Zl(i,t)}s(P5,"qn");function _A(e){const t=e.inputType,n=$5(e),r=Ue(),i=r._inputState,o=Ve();if(t==="insertText"&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(Jl(i),e.preventDefault(),_e(o)&&!o.isCollapsed()){const f=o.isBackward()?o.anchor:o.focus;o.anchor.set(f.key,f.offset,f.type),o.focus.set(f.key,f.offset,f.type)}return!0}if(t==="deleteContentBackward"){if(o===null){const f=$o();if(!_e(f))return!0;hn(f.clone())}if(_e(o)){const f=o.anchor.key===o.focus.key;if((function(h,g){return h.lastKeyCode==="MediaLast"&&g<h.lastKeyDownTimeStamp+30})(i,e.timeStamp)&&r.isComposing()&&f){if(Rt(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{qn(r,()=>{Rt(null)})},30),_e(o)){const h=o.anchor.getNode();h.markDirty(),Q(h)||B(142),L5(o,h)}}else{if(Rt(null),To&&n!==null&&!n.collapsed&&(o.applyDOMRange(n),!o.isCollapsed()))return e.preventDefault(),o.removeText(),!0;e.preventDefault();const h=o.anchor.getNode(),g=h.getTextContent(),p=h.canInsertTextAfter(),v=o.anchor.offset===0&&o.focus.offset===g.length;let _=Fl&&f&&!v&&p;if(_&&o.isCollapsed()&&(_=!We($2(o.anchor,!0))),!_){de(r,Wl,!0);const y=Ve();Fl&&_e(y)&&y.isCollapsed()&&(i.postDeleteSelectionToRestore=y,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!_e(o))return!0;const l=e.data;i.unprocessedBeforeInputData!==null&&Zp(!1,r,i.unprocessedBeforeInputData),o.dirty&&i.unprocessedBeforeInputData===null||!o.isCollapsed()||At(o.anchor.getNode())||n===null||o.applyDOMRange(n),i.unprocessedBeforeInputData=null;const a=o.anchor,c=o.focus,d=a.getNode(),u=c.getNode();if(t==="insertText"||t==="insertTranspose"){if(l===`
7
+ `)e.preventDefault(),de(r,Cl,!1);else if(l===ho)e.preventDefault(),de(r,Th,void 0);else if(l==null&&e.dataTransfer){const f=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(f)}else l!=null&&R5(o,n,l,e.timeStamp,!0)?(e.preventDefault(),de(r,fs,l),J0(l)):i.unprocessedBeforeInputData=l;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":de(r,fs,e),J0((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const f=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const h=r._compositionKey;Rt(null),f||de(r,fs,e),Ic(h);break}case"insertLineBreak":Rt(null),de(r,Cl,!1);break;case"insertParagraph":Rt(null),i.isInsertLineBreak&&!To?(i.isInsertLineBreak=!1,de(r,Cl,!1)):de(r,Th,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":de(r,Ip,e);break;case"deleteByComposition":(function(f,h){return f!==h||F(f)||F(h)||!Fi(f)||!Fi(h)})(d,u)&&de(r,Mc,e);break;case"deleteByDrag":Mo(B5),de(r,Mc,e);break;case"deleteByCut":de(r,Mc,e);break;case"deleteContent":de(r,Wl,!1);break;case"deleteWordBackward":de(r,zl,!0);break;case"deleteWordForward":de(r,zl,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":de(r,jl,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":de(r,jl,!1);break;case"formatStrikeThrough":de(r,Ii,"strikethrough");break;case"formatBold":de(r,Ii,"bold");break;case"formatItalic":de(r,Ii,"italic");break;case"formatUnderline":de(r,Ii,"underline");break;case"historyUndo":de(r,Np,void 0);break;case"historyRedo":de(r,Op,void 0)}return!0}s(_A,"Yn");function yA(e){const t=Ue(),n=t._inputState,r=Ve(),i=e.data,o=$5(e);let l=!1;if(i!=null&&_e(r)){const a=or(wn(t)),c=a!==null?tr(a,t._rootElement):null,d=e.inputType==="insertCompositionText"&&n.compositionPhase!=="ending-firefox"&&!t.isComposing();d&&(n.hadOrphanedCompositionEvents=!0);const u=r.anchor.getNode(),f=e.inputType==="insertCompositionText"&&n.compositionPhase!=="ending-firefox"&&t.isComposing()&&Q(u)&&On(u);if(!d&&!f&&R5(r,o,i,e.timeStamp,!1,c)){if(l=!0,n.compositionPhase==="ending-firefox"){const y=ou(t,i);if(n.compositionPhase="idle",y)return Mo(Fp),yv(),!0}const h=r.anchor.getNode();if(a===null||c===null)return!0;const g=r.isBackward(),p=g?r.anchor.offset:r.focus.offset,v=g?r.focus.offset:r.anchor.offset;Pl&&!r.isCollapsed()&&Q(h)&&c.anchorNode!==null&&h.getTextContent().slice(0,p)+i+h.getTextContent().slice(p+v)===R2(c.anchorNode)||de(t,fs,i);const _=i.length;ai&&_>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(r.anchor.offset-=_,r._cachedNodes=null,r._cachedIsBackward=null),Fl&&t.isComposing()&&(n.lastKeyDownTimeStamp=0,Rt(null))}}return l||(Zp(!1,t,i!==null?i:void 0),n.compositionPhase==="ending-firefox"&&(ou(t,i||void 0),Mo("composition-end"),n.compositionPhase="idle")),yv(),!0}s(yA,"Gn");function xA(e){const t=Ue(),n=t._inputState,r=Ve();if(_e(r)&&!t.isComposing()){n.compositionPhase="composing",n.hadOrphanedCompositionEvents=!1;const i=r.anchor,o=r.anchor.getNode();if(Rt(i.key),Mo("composition-start"),e.timeStamp<n.lastKeyDownTimeStamp+30||i.type==="element"||!r.isCollapsed()||!Fl&&(o.getFormat()!==r.format||Q(o)&&o.getStyle()!==r.style)||Q(o)&&(On(o)||i.offset===0&&!o.canInsertTextBefore()||i.offset===o.getTextContentSize()&&!o.canInsertTextAfter())){de(t,fs,bp);const l=Ve();_e(l)&&Rt(l.anchor.key)}}return!0}s(xA,"Xn");function CA(e){const t=Ue();return t._inputState.compositionPhase="idle",ou(t,e.data),Mo(Fp),!0}s(CA,"Qn");function Ic(e){if(e===null)return;const t=rt(e);if(!Q(t)||t.getType()==="text"||On(t)||!t.isAttached())return;const n=Ve(),r=_e(n)&&n.anchor.key===e?n.anchor.offset:null,i=Bt(t.getTextContent());if(i.setFormat(t.getFormat()),i.setStyle(t.getStyle()),t.replace(i),r!==null){const o=Math.min(r,i.getTextContentSize());i.select(o,o)}}s(Ic,"Zn");function ou(e,t){const n=e._compositionKey;if(Rt(null),n!==null&&t!=null){if(t===""){const i=rt(n),o=e.getElementByKey(n),l=o!==null&&Q(i)?ii(i,o,e):null;if(l!==null&&l.nodeValue!==null&&Q(i)){const a=or(wn(e)),c=a&&tr(a,e._rootElement);let d=null,u=null;c!==null&&c.anchorNode===l&&(d=c.anchorOffset,u=c.focusOffset),Yp(i,l.nodeValue,d,u,!0)}return Ic(n),!1}if(t[t.length-1]===`
8
+ `){const i=Ve();if(_e(i)||Ds(i)){if(_e(i)){const o=i.focus;i.anchor.set(o.key,o.offset,o.type)}return de(e,ru,null),Ic(n),!1}}const r=rt(n);if(r!==null&&Q(r)&&On(r)){r.markDirty();const i=Ve(),o=r.getTextContentSize(),l=_e(i)&&i.anchor.key===n?i.anchor.offset:o;return r.select(l,l).insertText(t),!0}}return Zp(!0,e,t),Ic(n),!1}s(ou,"to");function bA(e){const t=Ue(),n=t._inputState;if(e.key==null)return!0;if(n.compositionPhase==="ending-safari"){const r=Cv(e);if(r&&qn(t,()=>{ou(t,n.compositionEndData)}),n.compositionPhase="idle",n.compositionEndData="",r)return!0}if((function(r){return qe(r,"ArrowRight",{shiftKey:"any"})})(e))de(t,g5,e);else if((function(r){return qe(r,"ArrowRight",{...qr,shiftKey:"any"})})(e))de(t,p5,e);else if((function(r){return qe(r,"ArrowLeft",{shiftKey:"any"})})(e))de(t,m5,e);else if((function(r){return qe(r,"ArrowLeft",{...qr,shiftKey:"any"})})(e))de(t,v5,e);else if((function(r){return qe(r,"ArrowUp",{altKey:"any",shiftKey:"any"})})(e))de(t,_5,e);else if((function(r){return qe(r,"ArrowDown",{altKey:"any",shiftKey:"any"})})(e))de(t,y5,e);else if((function(r){return qe(r,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(e))n.isInsertLineBreak=!0,de(t,ru,e);else if((function(r){return r.key===" "})(e))de(t,x5,e);else if((function(r){return Kn&&qe(r,"o",{ctrlKey:!0})})(e))e.preventDefault(),n.isInsertLineBreak=!0,de(t,Cl,!0);else if((function(r){return qe(r,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(e))n.isInsertLineBreak=!1,de(t,ru,e);else if((function(r){return qe(r,"Backspace",{shiftKey:"any"})||Kn&&qe(r,"h",{ctrlKey:!0})})(e))Cv(e)?de(t,C5,e)&&G0(n):(e.preventDefault(),de(t,Wl,!0));else if((function(r){return r.key==="Escape"})(e))de(t,b5,e);else if((function(r){return qe(r,"Delete",{})||Kn&&qe(r,"d",{ctrlKey:!0})})(e))(function(r){return r.key==="Delete"})(e)?de(t,E5,e):(e.preventDefault(),de(t,Wl,!1));else if((function(r){return qe(r,"Backspace",xv)})(e))e.preventDefault(),de(t,zl,!0);else if((function(r){return qe(r,"Delete",xv)})(e))e.preventDefault(),de(t,zl,!1);else if((function(r){return Kn&&qe(r,"Backspace",{metaKey:!0})})(e))e.preventDefault(),de(t,jl,!0);else if((function(r){return Kn&&(qe(r,"Delete",{metaKey:!0})||qe(r,"k",{ctrlKey:!0}))})(e))e.preventDefault(),de(t,jl,!1);else if((function(r){return qe(r,"b",qr)})(e))e.preventDefault(),de(t,Ii,"bold");else if((function(r){return qe(r,"u",qr)})(e))e.preventDefault(),de(t,Ii,"underline");else if((function(r){return qe(r,"i",qr)})(e))e.preventDefault(),de(t,Ii,"italic");else if((function(r){return qe(r,"Tab",{shiftKey:"any"})})(e))de(t,T5,e);else if((function(r){return qe(r,"z",qr)})(e))e.preventDefault(),de(t,Np,void 0);else if((function(r){return Kn?qe(r,"z",{metaKey:!0,shiftKey:!0}):qe(r,"y",{ctrlKey:!0})||qe(r,"z",{ctrlKey:!0,shiftKey:!0})})(e))e.preventDefault(),de(t,Op,void 0);else{const r=t._editorState._selection;(function(i){return qe(i,"a",qr)})(e)?(e.preventDefault(),de(t,A5,e)&&G0(n)):r===null||_e(r)||((function(i){return qe(i,"c",qr)})(e)?(e.preventDefault(),de(t,Rp,e)):(function(i){return qe(i,"x",qr)})(e)&&(e.preventDefault(),de(t,Lp,e)))}return(function(r){return r.ctrlKey||r.shiftKey||r.altKey||r.metaKey})(e)&&t.dispatchCommand(O5,e),!0}s(bA,"eo");function F5(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}s(F5,"no");var hs=new Map;function q0(e){const t=H2(e.target);if(t===null)return;const n=wd(e.target);let r=null,i=null;const o=n!==null?iu.get(n):void 0;if(n!==null){if(o!==void 0){const f=o.editors;let h=o.hasShadowEditor;if(h===void 0){h=!1;for(const g of f)if(g._rootElement!==null&&ci(g._rootElement.getRootNode())){h=!0;break}o.hasShadowEditor=h}if(h){let g=null,p=null;for(const v of f){const _=v._rootElement;if(_===null)continue;const y=tr(t,_).anchorNode;if(y!==null&&vo(y)===v){if(ci(_.getRootNode())){r=v,i=y;break}g===null&&(g=v,p=y)}}r===null&&g!==null&&(r=g,i=p)}else{const g=t.anchorNode;g===null||_t(g)&&g.shadowRoot!==null||(r=vo(g),r!==null&&(i=g))}}if(r===null){const f=xs(n);r=f!==null?vo(f):null}}if(r===null)return;if(r._inputState.isSelectionChangeFromMouseDown){if(o!==void 0)for(const f of o.editors)f._inputState.isSelectionChangeFromMouseDown=!1;qn(r,()=>{const f=$o(),h=i??tr(t,r._rootElement).anchorNode;(_t(h)||Tr(h))&&hn(_d(f,t,r,e))})}const l=qp(r),a=l[l.length-1],c=a._key,d=hs.get(c),u=d||a;u!==r&&j0(t,u,!1),j0(t,r,!0),r!==a?hs.set(c,r):d&&hs.delete(c)}s(q0,"ro");function kh(e){e._lexicalHandled=!0}s(kh,"io");function Z0(e){return e._lexicalHandled===!0}s(Z0,"so");function EA(e){const t=wh.get(e);if(t===void 0)return;const n=iu.get(t);if(n===void 0)return;wh.delete(e);const r=Na(e);Sd(r)?((function(o){if(o._parentEditor!==null){const l=qp(o),a=l[l.length-1]._key;hs.get(a)===o&&hs.delete(a)}else hs.delete(o._key)})(r),n.editors.delete(r),n.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&B(198);const i=F5(e);for(let o=0;o<i.length;o++)i[o]();e.__lexicalEventHandles=[]}s(EA,"co");function Mh(e,t,n){Ut();const r=e.__key,i=e.getParent();if(i===null)return void(Yt(e)!==null&&B(367,r,String(Yt(e))));const o=(function(a){const c=Ve();if(!_e(c)||!F(a))return c;const{anchor:d,focus:u}=c,f=d.getNode(),h=u.getNode();return ql(f,a)&&d.set(a.__key,0,"element"),ql(h,a)&&u.set(a.__key,0,"element"),c})(e);let l=!1;if(_e(o)&&t){const a=o.anchor,c=o.focus;a.key===r&&(cu(a,e,i,e.getPreviousSibling(),e.getNextSibling()),l=!0),c.key===r&&(cu(c,e,i,e.getPreviousSibling(),e.getNextSibling()),l=!0)}else Ds(o)&&t&&e.isSelected()&&e.selectPrevious();if(_e(o)&&t&&!l){const a=e.getIndexWithinParent();gr(e),uo(o,i,a,-1)}else gr(e);n||Mt(i)||i.canBeEmpty()||!i.isEmpty()||Mh(i,t),t&&o&&At(i)&&i.isEmpty()&&i.selectEnd()}s(Mh,"ao");function TA(e){return e}s(TA,"uo");var V5=Symbol.for("ephemeral");function su(e){return e[V5]||!1}s(su,"ho");var Y0={configurable:!0,enumerable:!1,value:void 0,writable:!0},Ln=class{static{s(this,"_o")}__type;__key;__parent;__prev;__next;__state;[Bl];static getType(){const{ownNodeType:e}=Da(this);return e===void 0&&B(64,this.name),e}static clone(e){B(65,this.name)}$config(){return{}}config(e,t){const n=t.extends||rb(this.constructor);return Object.assign(t,{extends:n}),typeof e=="string"&&Object.assign(t,{type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&(this.__state=this.__state.getWritable(this).resetOnCopyNode())}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",Y0),Object.defineProperty(this,Bl,Y0),A2(this,e)}getType(){return this.__type}isInline(){B(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=rt(e);if(t===null)break;e=t.__parent!==null?t.__parent:Yt(t)}return!1}isSelected(e){const t=e||Ve();if(t==null)return!1;const n=t.getNodes().some(r=>r.__key===this.__key);if(Q(this))return n;if(_e(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const r=this.getParent();if(We(this)&&this.isInline()&&r){const i=t.isBackward()?t.focus:t.anchor;if(r.is(i.getNode())&&i.offset===r.getChildrenSize()&&this.is(r.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:rt(e)}getParentOrThrow(){const e=this.getParent();return e===null&&B(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(Mt(t)||Yt(e)!==null)return F(e)||e===this&&We(e)||B(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&B(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:rt(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(t===null)return e;let n=t.getFirstChild();for(;n!==null&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:rt(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=F(this)?this:this.getParent(),n=F(e)?e:e.getParent(),r=t&&n?yu(t,n):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const t=yu(this,e);return t!==null&&(t.type==="descendant"||(t.type==="branch"?hm(t)===-1:(t.type!=="same"&&t.type!=="ancestor"&&B(279),!1)))}isParentOf(e){return ql(e,this)}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let i=this;for(;i!==null;){const o=i.__key;if(r.has(o)||(r.add(o),n.push(i)),i===e)break;const l=F(i)?t?i.getFirstChild():i.getLastChild():null;if(l!==null){i=l;continue}const a=t?i.getNextSibling():i.getPreviousSibling();if(a!==null){i=a;continue}const c=i.getParentOrThrow();if(r.has(c.__key)||n.push(c),c===e)break;let d=null,u=c;do{if(u===null&&B(68),d=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),u===null)break;d!==null||r.has(u.__key)||n.push(u)}while(d===null);i=d}return t||n.reverse(),n}isDirty(){const e=Ue()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(su(this))return this;const e=rt(this.__key);return e===null&&B(113),e}getWritable(){if(su(this))return this;Ut();const e=Kr(),t=Ue(),n=e._nodeMap,r=this.__key,i=this.getLatest(),o=t._cloneNotNeeded,l=Ve();if(l!==null&&l.setCachedNodes(null),o.has(r))return gu(i),i;const a=sm(i);return o.add(r),gu(a),n.set(r,a),a}getTextContent(){return ab(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){B(70)}updateDOM(e,t,n){B(71)}getDOMSlot(e){return new jC(e)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){B(18,this.name)}updateFromJSON(e){return(function(t,n){const r=t.getWritable(),i=n.$;let o=i;for(const l of i5(r).flatKeys)l in n&&(o!==void 0&&o!==i||(o={...i}),o[l]=n[l]);return(r.__state||o)&&Tp(t).updateFromJSON(o),r})(this,e)}static transform(){return null}remove(e){Mh(this,!0,e)}replace(e,t){Ut();let n=Ve();n!==null&&(n=n.clone()),bf(this,e);const r=this.getLatest(),i=this.__key,o=e.__key,l=e.getWritable(),a=this.getParentOrThrow().getWritable(),c=a.__size,d=l.getParent(),u=d!==null?l.getIndexWithinParent():-1;gr(l),d!==null&&_e(n)&&uo(n,d,u,-1);const f=r.getPreviousSibling(),h=r.getNextSibling(),g=r.__prev,p=r.__next,v=r.__parent;Mh(r,!1,!0),f===null?a.__first=o:f.getWritable().__next=o,l.__prev=g,h===null?a.__last=o:h.getWritable().__prev=o,l.__next=p,l.__parent=v,a.__size=c;let _=0;t&&(F(this)&&F(l)||B(139),_=l.getChildrenSize(),l.splice(_,0,this.getChildren()));const y=Zn(this);if(y.length>0){Dr(this)&&Dr(l)||B(368,this.__key,l.__key);for(const x of y){const C=Wi(this,x);C!==null&&(cb(this,x),am(l,x,C))}}if(_e(n)){hn(n);const x=n.anchor,C=n.focus;x.key===i&&(t&&x.type==="element"?x.set(l.__key,_+x.offset,"element"):tv(x,l)),C.key===i&&(t&&C.type==="element"?C.set(l.__key,_+C.offset,"element"):tv(C,l))}return ei()===i&&Rt(o),l}insertAfter(e,t=!0){Ut(),bf(this,e);const n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();const i=r.getParent(),o=Ve();let l=!1,a=!1;if(i!==null){const h=e.getIndexWithinParent();if(_e(o)){const g=i.__key,p=o.anchor,v=o.focus;l=p.type==="element"&&p.key===g&&p.offset===h+1,a=v.type==="element"&&v.key===g&&v.offset===h+1}gr(r),t&&_e(o)&&uo(o,i,h,-1)}else gr(r);const c=this.getNextSibling(),d=this.getParentOrThrow().getWritable(),u=r.__key,f=n.__next;if(c===null?d.__last=u:c.getWritable().__prev=u,d.__size++,n.__next=u,r.__next=f,r.__prev=n.__key,r.__parent=n.__parent,t&&_e(o)){const h=this.getIndexWithinParent();uo(o,d,h+1);const g=d.__key;l&&o.anchor.set(g,h+2,"element"),a&&o.focus.set(g,h+2,"element")}return e}insertBefore(e,t=!0){Ut(),bf(this,e);const n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();const i=r.__key,o=Ve(),l=r.getParent(),a=l!==null?r.getIndexWithinParent():-1;gr(r),l!==null&&t&&_e(o)&&uo(o,l,a,-1);const c=this.getPreviousSibling(),d=this.getParentOrThrow().getWritable(),u=n.__prev,f=this.getIndexWithinParent();return c===null?d.__first=i:c.getWritable().__next=i,d.__size++,n.__prev=i,r.__prev=u,r.__next=n.__key,r.__parent=n.__parent,t&&_e(o)&&uo(o,this.getParentOrThrow(),f),e}isParentRequired(){return!1}createParentElementNode(){return _n()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){Ut();const n=zn(this);if(n!==null)return n.selectPrevious(e,t);const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(F(r))return r.select();if(!Q(r)){const o=r.getIndexWithinParent()+1;return i.select(o,o)}return r.select(e,t)}selectNext(e,t){Ut();const n=zn(this);if(n!==null)return n.selectNext(e,t);const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(F(r))return r.select(0,0);if(!Q(r)){const o=r.getIndexWithinParent();return i.select(o,o)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function Pp(e){return e instanceof Ln}s(Pp,"po");var SA="historic",wA="history-push",Nc="history-merge",kA="paste";var MA="collaboration",AA="skip-collab",IA="skip-scroll-into-view",NA="skip-dom-selection",B5="skip-selection-focus",OA="composition-start",Fp="composition-end",DA="!important";function Ah(e){const t={};if(!e)return t;let n="",r="",i=null,o=!1,l=!1,a=!1,c=0;const d=e.length;let u=-1;for(let g=0;g<d;g++){const p=e[g];if(o)p==="*"&&e[g+1]==="/"&&(o=!1,g++);else if(l)u===-1&&(u=g),l=!1;else if(i===null)if(p!=="/"||e[g+1]!=="*")if(p!=='"'&&p!=="'")if(p!=="(")if(p!==")")if(a||p!==":"||c!==0){if(p===";"&&c===0){u!==-1&&(a?r+=e.slice(u,g):n+=e.slice(u,g),u=-1);const v=n.trim(),_=r.trim();v!==""&&_!==""&&(t[v]=_),n="",r="",a=!1;continue}u===-1&&(u=g)}else u!==-1&&(n+=e.slice(u,g),u=-1),a=!0;else u===-1&&(u=g),c=Math.max(0,c-1);else u===-1&&(u=g),c++;else u===-1&&(u=g),i=p;else u!==-1&&(a?r+=e.slice(u,g):n+=e.slice(u,g),u=-1),o=!0,g++;else u===-1&&(u=g),p==="\\"?l=!0:p===i&&(i=null)}u!==-1&&(a?r+=e.slice(u,d):n+=e.slice(u,d));const f=n.trim(),h=r.trim();return f!==""&&h!==""&&(t[f]=h),t}s(Ah,"Mo");function H5(e,t,n){const r=n.trimEnd(),i=r.length-10;i>=0&&r.slice(i).toLowerCase()===DA?e.setProperty(t,r.slice(0,i).trim(),"important"):e.setProperty(t,n,"")}s(H5,"Ao");function RA(e,t){for(const n in t){const r=t[n];r==null?e.removeProperty(n):H5(e,n,r)}}s(RA,"Do");function Ih(e,t,n=""){if(t===n)return;const r=Ah(n),i=Ah(t);for(const o in i)delete r[o],H5(e,o,i[o]);for(const o in r)e.removeProperty(o)}s(Ih,"Po");function gf(e,t){return 16&t?"code":t&128?"mark":32&t?"sub":64&t?"sup":null}s(gf,"Fo");function pf(e,t){return 1&t?"strong":2&t?"em":"span"}s(pf,"Io");function K5(e,t,n,r,i){const o=r.classList;let l=gs(i,"base");l!==void 0&&o.add(...l),l=gs(i,"underlineStrikethrough");let a=!1;const c=8&t&&4&t;l!==void 0&&(8&n&&4&n?(a=!0,c||o.add(...l)):c&&o.remove(...l));for(const d in qt){const u=qt[d];if(l=gs(i,d),l!==void 0)if(n&u){if(a&&(d==="underline"||d==="strikethrough")){t&u&&o.remove(...l);continue}((t&u)===0||c&&d==="underline"||d==="strikethrough")&&o.add(...l)}else t&u&&o.remove(...l)}}s(K5,"Lo");function U5(e,t,n){const r=n.isComposing(),i=e+(r?Vl:""),o=Sr(),l=om(o).$getDOMSlot(n,t,o),a=l.getFirstChild();if(a===null||a.nodeType!==Node.TEXT_NODE)return void l.insertChild(xn().createTextNode(i));const c=a,d=c.nodeValue;if(d!==i)if(r||ai){const[u,f,h]=(function(g,p){const v=g.length,_=p.length;let y=0,x=0;for(;y<v&&y<_&&g[y]===p[y];)y++;for(;x+y<v&&x+y<_&&g[v-x-1]===p[_-x-1];)x++;return[y,v-y-x,p.slice(y,_-x)]})(d,i);f!==0&&c.deleteData(u,f),c.insertData(u,h)}else c.nodeValue=i}s(U5,"Ko");function X0(e,t,n,r,i,o){U5(i,e,t);const l=o.theme.text;l!==void 0&&K5(0,0,r,e,l)}s(X0,"zo");function tc(e,t){const n=xn().createElement(t);return n.appendChild(e),n}s(tc,"Bo");function lu(e){return e!=null&&e.__isInlineFormattable===!0}s(lu,"Ro");var ka=class W5 extends Ln{static{s(this,"Wo")}__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}static getType(){return"text"}static clone(t){return new W5(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",n){super(n),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return z8[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ei()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const n=qt[t];return(this.getFormat()&n)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){return Ki(this.getLatest().__format,t,n)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,n){const r=this.__format,i=gf(0,r),o=pf(0,r),l=i===null?o:i,a=xn().createElement(l);let c=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),i!==null&&(c=xn().createElement(o),a.appendChild(c)),X0(c,this,0,r,this.__text,t);const d=this.__style;return d!==""&&Ih(a.style,d),a}updateDOM(t,n,r){const i=this.__text,o=t.__format,l=this.__format,a=gf(0,o),c=gf(0,l),d=pf(0,o),u=pf(0,l);if((a===null?d:a)!==(c===null?u:c))return!0;if(a===c&&d!==u){const v=n.firstChild;v??B(48);const _=xn().createElement(u);return X0(_,this,0,l,i,r),n.replaceChild(_,v),!1}let f=n;c!==null&&a!==null&&(f=n.firstChild,f??B(49)),U5(i,f,this);const h=r.theme.text;h!==void 0&&o!==l&&K5(0,o,l,f,h);const g=t.__style,p=this.__style;return g!==p&&Ih(n.style,p,g),!1}static importDOM(){return{"#text":s(()=>({conversion:FA,priority:0}),"#text"),b:s(()=>({conversion:$A,priority:0}),"b"),code:s(()=>({conversion:Gr,priority:0}),"code"),em:s(()=>({conversion:Gr,priority:0}),"em"),i:s(()=>({conversion:Gr,priority:0}),"i"),mark:s(()=>({conversion:Gr,priority:0}),"mark"),s:s(()=>({conversion:Gr,priority:0}),"s"),span:s(()=>({conversion:LA,priority:0}),"span"),strong:s(()=>({conversion:Gr,priority:0}),"strong"),sub:s(()=>({conversion:Gr,priority:0}),"sub"),sup:s(()=>({conversion:Gr,priority:0}),"sup"),u:s(()=>({conversion:Gr,priority:0}),"u")}}static importJSON(t){return Bt().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:n}=super.exportDOM(t);return _t(n)||B(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=tc(n,"b")),this.hasFormat("italic")&&(n=tc(n,"i")),this.hasFormat("strikethrough")&&(n=tc(n,"s")),this.hasFormat("underline")&&(n=tc(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,n){}setFormat(t){const n=this.getWritable();return n.__format=typeof t=="string"?qt[t]:t,n}setDetail(t){const n=this.getWritable();return n.__detail=typeof t=="string"?K8[t]:t,n}setStyle(t){const n=this.getWritable();return n.__style=t,n}toggleFormat(t){const n=Ki(this.getFormat(),t,null);return this.setFormat(n)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const n=W8[t];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(t){if(this.__text===t)return this;const n=this.getWritable();return n.__text=t,n}select(t,n){Ut();let r=t,i=n;const o=Ve(),l=this.getTextContent(),a=this.__key;if(typeof l=="string"){const c=l.length;r===void 0&&(r=c),i===void 0&&(i=c)}else r=0,i=0;if(!_e(o))return s2(a,r,a,i,"text","text");{const c=ei();c!==o.anchor.key&&c!==o.focus.key||Rt(a),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,n,r,i){const o=this.getWritable(),l=o.__text,a=r.length;let c=t;c<0&&(c=a+c,c<0&&(c=0));const d=Ve();if(i&&_e(d)){const u=t+a;d.setTextNodeRange(o,u,o,u)}return o.__text=l.slice(0,c)+r+l.slice(c+n),o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){Ut();const n=this.getLatest(),r=n.getTextContent();if(r==="")return[];const i=n.__key,o=ei(),l=r.length;t.sort((E,A)=>E-A),t.push(l);const a=[],c=t.length;for(let E=0,A=0;E<l&&A<=c;A++){const D=t[A];D>E&&(a.push(r.slice(E,D)),E=D)}const d=a.length;if(d===1)return[n];const u=a[0],f=n.getParent();let h;const g=n.getFormat(),p=n.getStyle(),v=n.__detail;let _=!1,y=null,x=null;const C=Ve();if(_e(C)){const[E,A]=C.isBackward()?[C.focus,C.anchor]:[C.anchor,C.focus];E.type==="text"&&E.key===i&&(y=E),A.type==="text"&&A.key===i&&(x=A)}n.isSegmented()?(h=Bt(u),h.__format=g,h.__style=p,h.__detail=v,h.__state=L0(n,h),_=!0):h=n.setTextContent(u);const b=[h];for(let E=1;E<d;E++){const A=Bt(a[E]);A.__format=g,A.__style=p,A.__detail=v,A.__state=L0(n,A);const D=A.__key;o===i&&Rt(D),b.push(A)}const T=y?y.offset:null,M=x?x.offset:null;let S=0;for(const E of b){if(!y&&!x)break;const A=S+E.getTextContentSize();if(y!==null&&T!==null&&T<=A&&T>=S&&(y.set(E.getKey(),T-S,"text"),T<A&&(y=null)),x!==null&&M!==null&&M<=A&&M>=S){x.set(E.getKey(),M-S,"text");break}S=A}if(f!==null){(function(D){const L=D.getPreviousSibling(),G=D.getNextSibling();L!==null&&gu(L),G!==null&&gu(G)})(this);const E=f.getWritable(),A=this.getIndexWithinParent();_?(E.splice(A,0,b),this.remove()):E.splice(A,1,b),_e(C)&&uo(C,f,A,d-1)}return b}mergeWithSibling(t){const n=t===this.getPreviousSibling();n||t===this.getNextSibling()||B(50);const r=this.__key,i=t.__key,o=this.__text,l=o.length;ei()===i&&Rt(r);const a=Ve();if(_e(a)){const f=a.anchor,h=a.focus;f!==null&&f.key===i&&av(f,n,r,t,l),h!==null&&h.key===i&&av(h,n,r,t,l)}const c=t.__text,d=n?c+o:o+c;this.setTextContent(d);const u=this.getWritable();return t.remove(),u}isTextEntity(){return!1}};function LA(e){return{forChild:Vp(e.style),node:null}}s(LA,"Uo");function $A(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:Vp(t.style,n?void 0:"bold"),node:null}}s($A,"$o");var Q0=new WeakMap;function PA(e){if(!_t(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}s(PA,"Jo");function FA(e){const t=e;e.parentElement===null&&B(129);let n=t.textContent||"";if((function(r){let i,o=r.parentNode;const l=[r];for(;o!==null&&(i=Q0.get(o))===void 0&&!PA(o);)l.push(o),o=o.parentNode;const a=i===void 0?o:i;for(let c=0;c<l.length;c++)Q0.set(l[c],a);return a})(t)!==null)return{node:Hp(n)};if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=t,i=!0;for(;r!==null&&(r=ev(r,!1))!==null;){const o=r.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=ev(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:Bt(n)}}s(FA,"jo");function ev(e,t){let n=e;for(;;){let r;for(;(r=t?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=r,_t(n)){const o=n.style.display;if(o===""&&!Z2(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(Tr(n))return n;if(n.nodeName==="BR")return null}}s(ev,"Vo");var VA={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Gr(e){const t=VA[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:Vp(e.style,t),node:null}}s(Gr,"Yo");function Bt(e=""){return Oa(new ka(e))}s(Bt,"Go");function Q(e){return e instanceof ka}s(Q,"Xo");function Vp(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),i=n==="700"||n==="bold",o=r.includes("line-through"),l=e.fontStyle==="italic",a=r.includes("underline"),c=e.verticalAlign;return d=>((Q(d)||lu(d))&&(i&&!d.hasFormat("bold")&&d.toggleFormat("bold"),o&&!d.hasFormat("strikethrough")&&d.toggleFormat("strikethrough"),l&&!d.hasFormat("italic")&&d.toggleFormat("italic"),a&&!d.hasFormat("underline")&&d.toggleFormat("underline"),c!=="sub"||d.hasFormat("subscript")||d.toggleFormat("subscript"),c!=="super"||d.hasFormat("superscript")||d.toggleFormat("superscript"),t&&!d.hasFormat(t)&&d.toggleFormat(t)),d)}s(Vp,"Qo");var md=class z5 extends ka{static{s(this,"Zo")}static getType(){return"tab"}static clone(t){return new z5(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const n=super.createDOM(t),r=gs(t.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(t){return Bp().updateFromJSON(t)}setTextContent(t){return super.setTextContent(" ")}spliceText(t,n,r,i){return r===""&&n===0||r===" "&&n===1||B(286),this}setDetail(t){return t!==2&&B(127),this}setMode(t){return t!=="normal"&&B(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function Bp(){return Oa(new md)}s(Bp,"tr");function vd(e){return e instanceof md}s(vd,"er");var BA=class{static{s(this,"nr")}key;offset;type;_selection;constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:fm(pr(oi(this,"next")),pr(oi(e,"next")))<0}getNode(){const e=rt(this.key);return e===null&&B(20),e}set(e,t,n,r){const i=this._selection,o=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,ko()||(ei()===o&&Rt(e),i!==null&&(i.setCachedNodes(null),_e(i)&&(i._cachedIsBackward=null),i.dirty=!0)))}};function _r(e,t,n){return new BA(e,t,n)}s(_r,"or");function mf(e,t){let n=t.__key,r=e.offset,i="element";if(Q(t)){i="text";const o=t.getTextContentSize();r>o&&(r=o)}else if(!F(t)){const o=t.getNextSibling();if(Q(o))n=o.__key,r=0,i="text";else{const l=t.getParent();l&&(n=l.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}s(mf,"rr");function tv(e,t){if(F(t)){const n=t.getLastDescendant();F(n)||Q(n)?mf(e,n):mf(e,t)}else mf(e,t)}s(tv,"ir");var j5=class J5{static{s(this,"sr")}_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!Ds(t))return!1;const n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new J5(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const n=this.getNodes().filter(l=>Yt(l)===null),r=n.length;if(r===0)return;const i=n[r-1];let o;if(Q(i))o=i.select();else{const l=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(l,l)}o.insertNodes(t);for(let l=0;l<r;l++)n[l].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=this._nodes,r=[];for(const i of n){const o=rt(i);o!==null&&r.push(o)}return ko()||(this._cachedNodes=r),r}getTextContent(){const t=this.getNodes();let n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}deleteNodes(){const t=this.getNodes().filter(n=>Yt(n)===null);if((Ve()||$o())===this&&t[0]){const n=vt(t[0],"next");mb(Ji(n,n))}for(const n of t)n.remove();G5()}};function G5(){const e=$n();if(e.isEmpty()){const t=_n();e.append(t),t.select()}}s(G5,"lr");function _e(e){return e instanceof Ma}s(_e,"cr");var Ma=class q5{static{s(this,"ar")}format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,n,r,i){this.anchor=t,this.focus=n,t._selection=this,n._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!_e(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=(function(r){const i=[],[o,l]=r.getTextSlices();o&&i.push(o.caret.origin);const a=new Set,c=new Set;for(const d of r)if(Yn(d)){const{origin:u}=d;i.length===0?a.add(u):(c.add(u),i.push(u))}else{const{origin:u}=d;F(u)&&c.has(u)||i.push(u)}if(l&&i.push(l.caret.origin),zi(r.focus)&&F(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let d=ui(r.focus.origin,"previous");Yn(d)&&a.has(d.origin)&&!d.origin.isEmpty()&&d.origin.is(i[i.length-1]);d=Cs(d))a.delete(d.origin),i.pop();for(;i.length>1;){const d=i[i.length-1];if(!F(d)||c.has(d)||d.isEmpty()||a.has(d))break;i.pop()}if(i.length===0&&r.isCollapsed()){const d=pr(r.anchor),u=pr(r.anchor.getFlipped()),f=s(g=>mr(g)?g.origin:g.getNodeAtCaret(),"r"),h=f(d)||f(u)||(r.anchor.getNodeAtCaret()?d.origin:u.origin);i.push(h)}return i})(gm(Kh(this),"next"));return ko()||(this._cachedNodes=n),n}setTextNodeRange(t,n,r,i){return this.anchor.set(t.__key,n,"text"),this.focus.set(r.__key,i,"text"),this}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const n=t[0],r=t[t.length-1],i=this.anchor,o=this.focus,l=i.isBefore(o),[a,c]=Nh(this);let d="",u=!0;for(let f=0;f<t.length;f++){const h=t[f];if(F(h)&&!h.isInline()){u||(d+=`
9
+ `);let g="";for(const p of Zn(h)){const v=Wi(h,p);v!==null&&(g+=v.getTextContent())}g!==""?(d+=g,u=!1):u=!h.isEmpty()}else if(u=!1,Q(h)){let g=h.getTextContent();h===n?h===r?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(g=a<c?g.slice(a,c):g.slice(c,a)):g=l?g.slice(a):g.slice(c):h===r&&(g=l?g.slice(0,c):g.slice(0,a)),d+=g}else!We(h)&&!Lr(h)||h===r&&this.isCollapsed()||(d+=h.getTextContent())}return d}applyDOMRange(t){const n=Ue(),r=n.getEditorState()._selection,i=i2(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r);if(i===null)return;const[o,l,a]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(l.key,l.offset,l.type,!0),a&&(this.dirty=!0),ns(this)}clone(){const t=this.anchor,n=this.focus;return new q5(_r(t.key,t.offset,t.type),_r(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=Ki(this.format,t,null),this.dirty=!0}setFormat(t){this.format=t,this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const n=qt[t];return(this.format&n)!==0}insertRawText(t){this.insertNodes(Hp(t))}insertText(t){const n=this.anchor,r=this.focus,i=this.format,o=this.style;let l=n,a=r;!this.isCollapsed()&&r.isBefore(n)&&(l=r,a=n),l.type==="element"&&(function(_,y,x,C){const b=_.getNode(),T=b.getChildAtIndex(_.offset),M=Bt();if(M.setFormat(x),M.setStyle(C),T2(T))T.splice(0,0,[M]);else if(T!==null){const S=Mt(b)?_n().append(M):M;T.insertBefore(S)}else if(Mt(b)){const S=b.getLastChild();F(S)&&!S.isInline()&&S.isEmpty()?S.append(M):b.append(_n().append(M))}else b.append(M);_.is(y)&&y.set(M.__key,0,"text"),_.set(M.__key,0,"text")})(l,a,i,o),a.type==="element"&&bs(a,pr(oi(a,"next")));const c=l.offset;let d=a.offset;const u=this.getNodes(),f=u.length;let h=u[0];Q(h)||B(26);const g=h.getTextContent().length,p=h.getParentOrThrow();let v=u[f-1];if(f===1&&a.type==="element"&&(d=g,a.set(l.key,d,"text")),this.isCollapsed()&&c===g&&(On(h)||!h.canInsertTextAfter()||!p.canInsertTextAfter()&&h.getNextSibling()===null)){const _=h.getNextSibling();let y;if(Q(_)&&_.canInsertTextBefore()&&!On(_)?y=_:(y=Bt(),y.setFormat(i),y.setStyle(o),p.canInsertTextAfter()?h.insertAfter(y):p.insertAfter(y)),y.select(0,0),h=y,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&c===0&&(On(h)||!h.canInsertTextBefore()||!p.canInsertTextBefore()&&h.getPreviousSibling()===null)){const _=h.getPreviousSibling();let y;if(!Q(_)||On(_)?(y=Bt(),y.setFormat(i),p.canInsertTextBefore()?h.insertBefore(y):p.insertBefore(y)):y=_,y.select(),h=y,t!=="")return void this.insertText(t)}else if(h.isSegmented()&&c!==g)if(ei()!==null)h=h.setMode("normal").setFormat(i).setStyle(o);else{const _=Bt(h.getTextContent());_.setFormat(i),h.replace(_),h=_}else if(!this.isCollapsed()&&t!==""){const _=v.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||F(_)&&(!_.canInsertTextBefore()||!_.canInsertTextAfter()))return this.insertText(""),t2(this.anchor,this.focus),void this.insertText(t)}if(f===1){if(Fi(h)){const C=Bt(t);C.select(),h.replace(C);return}const _=h.getFormat(),y=h.getStyle();if(c!==d||_===i&&y===o){if(vd(h)){const C=Bt(t);C.setFormat(i),C.setStyle(o),C.select(),h.replace(C);return}}else{if(h.getTextContent()!==""){const C=Bt(t);if(C.setFormat(i),C.setStyle(o),C.select(),c===0)h.insertBefore(C,!1);else{const[b]=h.splitText(c);b.insertAfter(C,!1)}C.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null);return}h.setFormat(i),h.setStyle(o)}const x=d-c;h=h.spliceText(c,x,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=_,this.style=y,h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}else{const _=new Set([...h.getParentKeys(),...v.getParentKeys()]),y=F(h)?h:h.getParentOrThrow();let x=F(v)?v:v.getParentOrThrow(),C=v;if(!y.is(x)&&x.isInline())do C=x,x=x.getParentOrThrow();while(x.isInline());if(a.type==="text"&&(d!==0||v.getTextContent()==="")||a.type==="element"&&v.getIndexWithinParent()<d)if(Q(v)&&!Fi(v)&&d!==v.getTextContentSize()){if(v.isSegmented()){const E=Bt(v.getTextContent());v.replace(E),v=E}At(a.getNode())||a.type!=="text"||(Q(v)||B(395),v=v.spliceText(0,d,"")),_.add(v.__key)}else{const E=v.getParentOrThrow();E.canBeEmpty()||E.getChildrenSize()!==1?v.remove():E.remove()}else _.add(v.__key);const b=x.getChildren(),T=new Set(u),M=y.is(x),S=y.isInline()&&h.getNextSibling()===null?y:h;for(let E=b.length-1;E>=0;E--){const A=b[E];if(A.is(h)||F(A)&&A.isParentOf(h))break;A.isAttached()&&(!T.has(A)||A.is(C)?M||S.insertAfter(A,!1):A.remove())}if(!M){let E=x,A=null;for(;E!==null;){const D=E.getChildren(),L=D.length;(L===0||D[L-1].is(A))&&(_.delete(E.__key),A=E),E=E.getParent()}}if(Fi(h))if(c===g)h.select();else{const E=Bt(t);E.select(),h.replace(E)}else h=h.spliceText(c,g-c,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=h.getFormat(),this.style=h.getStyle(),h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let E=1;E<f;E++){const A=u[E],D=A.__key;_.has(D)||A.remove()}}}removeText(){const t=Ve()===this;El(this,vb(Kh(this))),t&&Ve()!==this&&hn(this)}formatText(t,n=null){Y5(this,t,n)}insertNodes(t){if(t.length===0)return;this.isCollapsed()||this.removeText();const n=this.anchor.getNode();if(this.anchor.type==="element"&&F(n)&&Yt(n)!==null){let v=n.isShadowRoot()?n.getFirstChild()??n.append(_n()).getFirstChild():n.getFirstChild();if(n.isShadowRoot()&&v!==null&&!F(v)){const _=_n();v.insertBefore(_),v=_}if(v!==null){v.selectStart();const _=Ve();return _e(_)||B(369),_.insertNodes(t)}}if(this.anchor.type==="element"&&Mt(n)){const v=_f(t),_=v.getLastDescendant();n.splice(this.anchor.offset,0,v.getChildren()),_!==null&&_.selectEnd();return}let r=(this.isBackward()?this.focus:this.anchor).getNode(),i=ki(r,pn);const o=t[t.length-1];if(F(i)&&"__language"in i){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const v=Xs(this);i.splice(v,0,t),o.selectEnd()}return}if(!t.some(v=>(F(v)||We(v))&&!v.isInline())){F(i)||B(211,r.constructor.name,r.getType());const v=Xs(this);i.splice(v,0,t),o.selectEnd();return}if(F(i)&&Yt(i)!==null){const v=Xs(this),_=Dh(t);i.splice(v,0,_);const y=_[_.length-1];y!==void 0?y.selectEnd():i.select(v,v);return}if(i===null){const v=_f(t),_=v.getLastDescendant();let y=oi(this.anchor,"next");for(const x of v.getChildren())y=Cb(x,y);_!==null&&_.selectEnd();return}if(F(i)&&!i.isParentRequired()&&!Mt(i.getParentOrThrow())){const v=Xs(this),_=Dh(t);i.splice(v,0,_);const y=_[_.length-1];y!==void 0?y.selectEnd():i.select(v,v);return}const l=_f(t),a=l.getLastDescendant(),c=l.getChildren(),d=!F(i)||!i.isEmpty()?this.insertParagraph():null;d&&!i.isAttached()&&(r=this.anchor.getNode(),i=ki(r,pn));const u=c[c.length-1];let f=c[0];var h;F(h=f)&&pn(h)&&!h.isEmpty()&&F(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(F(i)||B(211,r.constructor.name,r.getType()),i.append(...f.getChildren()),f=c[1]),f&&(i===null&&B(212,r.constructor.name,r.getType()),(function(v,_){const y=_.getParentOrThrow().getLastChild();let x=_;const C=[_];for(;x!==y;)x.getNextSibling()||B(140),x=x.getNextSibling(),C.push(x);let b=v;for(const T of C)b=b.insertAfter(T)})(i,f));const g=ki(a,pn);d&&F(g)&&(d.canMergeWhenEmpty()||pn(u))&&(g.append(...d.getChildren()),d.remove()),F(i)&&i.isEmpty()&&i.remove(),a.selectEnd();const p=F(i)?i.getLastChild():null;Lr(p)&&g!==i&&p.remove()}insertParagraph(){const t=this.anchor.getNode();if(this.anchor.type==="element"&&Mt(t)){const a=_n();return t.splice(this.anchor.offset,0,[a]),a.select(),a}const n=Xs(this),r=ki(this.anchor.getNode(),pn);if(r!==null&&Yt(r)!==null)return null;F(r)||B(213);const i=r.getChildAtIndex(n),o=i?[i,...i.getNextSiblings()]:[],l=r.insertNewAfter(this,!1);return l?(l.append(...o),l.selectStart(),l):null}insertLineBreak(t){const n=Aa();if(this.insertNodes([n]),t){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const t=[...this.getNodes()],n=t.length;let r=t[0],i=t[n-1];const[o,l]=Nh(this),a=this.isBackward(),[c,d]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[u,f]=a?[l,o]:[o,l];if(n===0)return[];if(n===1){if(Q(r)&&!this.isCollapsed()){const h=r.splitText(u,f),g=u===0?h[0]:h[1];return g?(c.set(g.getKey(),0,"text"),d.set(g.getKey(),g.getTextContentSize(),"text"),[g]):[]}return[r]}if(Q(r)&&(u===r.getTextContentSize()?t.shift():u!==0&&([,r]=r.splitText(u),t[0]=r,c.set(r.getKey(),0,"text"))),Q(i)){const h=i.getTextContent().length;f===0?t.pop():f!==h&&([i]=i.splitText(f),t[t.length-1]=i,d.set(i.getKey(),i.getTextContentSize(),"text"))}return t}modify(t,n,r){if(du(this,t,n,r))return;const i=t==="move",o=Ue(),l=or(wn(o));if(!l)return;const a=o._blockCursorElement,c=o._rootElement,d=this.focus.getNode();c===null||a===null||!F(d)||d.isInline()||d.canBeEmpty()||pu(a,o,c);const u=ys(o,this.focus.key);let f=u;if(this.focus.type==="text"&&(f=Q(d)?ii(d,u,o):null),this.dirty){const h=ys(o,this.anchor.key);let g=h;if(this.anchor.type==="text"){const p=this.anchor.getNode();g=Q(p)?ii(p,h,o):null}g&&f&&uu(l,g,this.anchor.offset,f,this.focus.offset)}if(r==="character"&&Q(d)&&d.isUnmergeable()&&(n?this.focus.offset===0:this.focus.offset===d.getTextContentSize())){const h=vt(d,n?"previous":"next").getNodeAtCaret();if(Q(h)){if(!i){const g=h.getTextContentSize();n?this.focus.set(h.__key,g-1,"text"):this.focus.set(h.__key,1,"text"),this.dirty=!0;return}{const g=o.getElementByKey(h.getKey()),p=g?ii(h,g,o):null;if(p){const v=n?p.length:0;uu(l,p,v,p,v)}}}}if(Q5(l,t,n?"backward":"forward",r),l.rangeCount>0){const h=Ps(l,o._rootElement),g=h||l.getRangeAt(0),p=this.anchor.getNode(),v=At(p)?p:em(p);this.applyDOMRange(g),this.dirty=!0,!i&&(e2(this,n,v),(h?l.direction!=="backward":l.anchorNode===g.startContainer&&l.anchorOffset===g.startOffset)||X5(this))}r==="lineboundary"&&du(this,t,n,r,"decorators")}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&F(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const i=n.getParent(),o=n.getNextSibling()||(i===null?null:i.getNextSibling());if(F(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const o=um(oi(r,t?"previous":"next"));if(o.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const c of o.iterNodeCarets("shadowRoot"))if(Yn(c)){if(!c.origin.isInline()){if(c.origin.isShadowRoot()){if(a.type==="merge-block")break;if(F(o.anchor.origin)&&o.anchor.origin.isEmpty()){const d=pr(c);El(this,Ji(d,d)),o.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:c,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(zi(c)){if(F(c.origin)){if(c.origin.isInline()){if(!c.origin.isParentOf(o.anchor.origin))break}else a={block:c.origin,type:"merge-next-block"};continue}if(We(c.origin)){if(!c.origin.isIsolated())if(Zn(c.origin).length>0){if(F(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const d=au();d.add(c.origin.getKey()),hn(d)}}else if(a.type==="merge-next-block"&&(c.origin.isKeyboardSelectable()||!c.origin.isInline())&&F(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const d=au();d.add(c.origin.getKey()),hn(d)}else c.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:c,block:d}=a;return Zn(d).length>0?void 0:c.origin.isEmpty()&&!d.isEmpty()&&c.origin.getParent()===d.getParent()?void c.origin.remove(!0):(El(this,Ji(!c.origin.isEmpty()&&d.isEmpty()?Fo(vt(d,c.direction)):o.anchor,c)),this.removeText())}for(let c=r.getNode();c!==null;){if(Yt(c)!==null)return;if(F(c)&&c.isShadowRoot())break;c=c.getParent()}}const l=this.focus;if(vf(this,t,"character"),this.isCollapsed()){if(t&&r.offset===0&&rv(this,r.getNode()))return}else{const a=l.type==="text"?l.getNode():null;if(i=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const c=l.offset,d=a.getTextContentSize();if(a.is(i)||t&&c!==d||!t&&c!==0)return void iv(a,t,c)}else if(i!==null&&i.isSegmented()){const c=r.offset,d=i.getTextContentSize();if(i.is(a)||t&&c!==0||!t&&c!==d)return void iv(i,t,c)}(function(c,d){const u=c.anchor,f=c.focus,h=u.getNode();if(h===f.getNode()&&u.type==="text"&&f.type==="text"){const g=u.offset,p=f.offset,v=g<p,_=v?g:p,y=v?p:g,x=y-1;_!==x&&(function(C){return!(O2(C)||KA(C))})(h.getTextContent().slice(_,y))&&(d?f.set(f.key,x,f.type):u.set(u.key,x,u.type))}})(this,t)}}if(this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&At(r.getParent())&&r.getPreviousSibling()===null&&rv(this,r),G5()}}deleteLine(t){const n=Oh(this.anchor);if(n!==null&&We(zn(n)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(t);this.isCollapsed()&&vf(this,t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):ki(this.anchor.getNode(),pn)!==ki(this.focus.getNode(),pn)?(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(t)):this.removeText()}deleteWord(t){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;vf(this,t,"word")}this.isCollapsed()?this.deleteCharacter(t):this.removeText()}isBackward(){const t=this._cachedIsBackward;if(t!==null)return t;const n=this.focus.isBefore(this.anchor);return ko()||(this._cachedIsBackward=n),n}getStartEndPoints(){return[this.anchor,this.focus]}};function Ds(e){return e instanceof j5}s(Ds,"ur");function Z5(e,t){if(Ds(e)){for(const y of e.getNodes())lu(y)&&y.setFormat(t(y.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void Rt(null);const n=[];for(const y of e.getNodes())Q(y)?n.push(y):F(y)?y.setTextFormat(t(y.getTextFormat())):lu(y)&&y.setFormat(t(y.getFormat()));const r=n.length;if(r===0)return e.setFormat(t(e.format)),void Rt(null);const i=e.anchor,o=e.focus,l=e.isBackward(),a=l?o:i,c=l?i:o;let d=0,u=n[0],f=a.type==="element"?0:a.offset;if(a.type==="text"&&f===u.getTextContentSize()&&(d=1,u=n[1],f=0),u==null)return;const h=r-1;let g=n[h];const p=c.type==="text"?c.offset:g.getTextContentSize();if(u.is(g)){if(f===p)return;const y=t(u.getFormat());if(On(u)||f===0&&p===u.getTextContentSize())u.setFormat(y);else{const x=u.splitText(f,p),C=f===0?x[0]:x[1];C.setFormat(y),a.type==="text"&&a.set(C.__key,0,"text"),c.type==="text"&&c.set(C.__key,p-f,"text")}e.format=y;return}f===0||On(u)||([,u]=u.splitText(f),f=0);const v=t(u.getFormat());u.setFormat(v);const _=t(g.getFormat());p>0&&(p===g.getTextContentSize()||On(g)||([g]=g.splitText(p)),g.setFormat(_));for(let y=d+1;y<h;y++){const x=n[y];x.setFormat(t(x.getFormat()))}a.type==="text"&&a.set(u.__key,f,"text"),c.type==="text"&&c.set(g.__key,p,"text"),e.format=v|_}s(Z5,"fr");function HA(e,t){const n=[];for(const[r,i]of Object.entries(t))typeof i=="boolean"&&n.push([r,i]);n.length!==0&&Z5(e,r=>{for(const[i,o]of n)r=Ki(r,i,o?qt[i]:0);return r})}s(HA,"dr");function Y5(e,t,n=null){const r=n===null&&_e(e)?Ki(e.format,t,null):n;Z5(e,i=>Ki(i,t,r))}s(Y5,"hr");function nv(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}s(nv,"gr");function Nh(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[n,r]=t;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[nv(n),nv(r)]}s(Nh,"_r");function rv(e,t){for(let n=t;n;n=n.getParent()){if(F(n)){if(n.collapseAtStart(e))return!0;if(Mt(n))break}if(n.getPreviousSibling())break}return!1}s(rv,"pr");function X5(e){const t=e.focus,n=e.anchor,r=n.key,i=n.offset,o=n.type;n.set(t.key,t.offset,t.type,!0),t.set(r,i,o,!0)}s(X5,"yr");function Q5(e,t,n,r){e.modify(t,n,r)}s(Q5,"mr");function e2(e,t,n){const r=e.getNodes(),i=r.filter(a=>ql(a,n));if(i.length===0||i.length===r.length)return!1;const o=t?i[0]:i[i.length-1],l=F(o)?o:o.getParentOrThrow();return t?l.selectStart():l.selectEnd(),!0}s(e2,"xr");function vf(e,t,n){if(du(e,"extend",t,n))return;const r=Ue(),i=or(wn(r));if(!i||typeof i.modify!="function")return;const o=r._blockCursorElement,l=r._rootElement,a=e.anchor,c=e.focus.getNode();l===null||o===null||!F(c)||c.isInline()||c.canBeEmpty()||pu(o,r,l);const d=s(A=>{const D=A.getNode(),L=r.getElementByKey(A.key);return L!==null&&A.type==="text"&&Q(D)?ii(D,L,r):L},"a"),u=a.getNode(),f=d(a);if(f===null)return;const h=a.offset,g=e.isCollapsed(),p=e.focus,v=g?f:d(p);if(v===null)return;const _=p.offset;if(uu(i,v,_,v,_),Q5(i,"move",t?"backward":"forward",n),i.rangeCount===0)return;const y=Ps(i,l)||i.getRangeAt(0),x=y.startContainer,C=y.startOffset;if(g&&n==="character"&&a.type==="text"&&Q(u)&&u.isUnmergeable()&&h===(t?0:u.getTextContentSize())){const A=vt(u,t?"previous":"next").getNodeAtCaret();if(Q(A)){const D=t?A.getTextContentSize()-1:1;e.focus.set(A.__key,D,"text"),e.dirty=!0;return}}if(g&&n==="character"&&a.type==="text"){const A=t?0:u.getTextContentSize(),D=x===f?C:h!==A?A:-1;if(D>=0)return void(D!==h&&(e.focus.set(a.key,D,"text"),e.dirty=!0))}const[b,T,M,S]=t?[x,C,f,h]:[f,h,x,C],E=At(u)?u:em(u);e.applyDOMRange({collapsed:!1,endContainer:M,endOffset:S,startContainer:b,startOffset:T}),e.dirty=!0,!e2(e,t,E)&&t&&X5(e),n==="lineboundary"&&du(e,"extend",t,n,"decorators")}s(vf,"Cr");var KA=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function iv(e,t,n){const r=e,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let l=0,a=0;for(let d=0;d<o;d++){const u=d===o-1;if(a=l,l+=i[d].length,t&&l===n||l>n||u){i.splice(d,1),u&&(a=void 0);break}}const c=i.join("").trim();c===""?r.remove():(r.setTextContent(c),r.select(a,a))}s(iv,"vr");function ov(e,t,n,r){let i,o=t,l=!1;if(_t(e)){let a=!1;const c=e.childNodes,d=c.length,u=r._blockCursorElement;o===d&&d>0&&(a=!0,o=d-1),$s(e,r)!==void 0||Zl(e,r)||(l=!0);let f=c[o],h=!1;if(f===u)f=c[o+1],h=!0;else if(u!==null){const g=u.parentNode;e===g&&t>Array.prototype.indexOf.call(g.children,u)&&o--}if(i=rs(f),Q(i))o=vr(i,a?"next":"previous");else{let g=rs(e);if(g===null)return null;if(F(g)){const p=r.getElementByKey(g.getKey());p===null&&B(214),[g,o]=Pn(g,p,r).resolveChildIndex(g,p,e,t),F(g)||B(215),a&&o>=g.getChildrenSize()&&(o=Math.max(0,g.getChildrenSize()-1));let _=g.getChildAtIndex(o);if(F(_)&&(function(y,x,C){const b=y.getParent();return C===null||b===null||!b.canBeEmpty()||b!==C.getNode()})(_,0,n)){const y=a?_.getLastDescendant():_.getFirstDescendant();y===null?g=_:(_=y,g=F(_)?_:_.getParentOrThrow()),o=0}Q(_)?(i=_,g=null,o=vr(_,a?"next":"previous")):_!==g&&a&&!h&&(F(g)||B(216),o=Math.min(g.getChildrenSize(),o+1))}else{const p=zn(g),v=p!==null?p:g,_=v.getIndexWithinParent(),y=r.getElementByKey(g.getKey());let x="after";if(y!==null&&rs(e)===g){const C=Pn(g,y,r);C.element!==y?x=C.resolveLeafPosition(y,e,t):t===0&&We(g)&&(x="before")}o=x==="before"?_:_+1,g=v.getParentOrThrow()}if(F(g))return[_r(g.__key,o,"element"),l]}}else i=rs(e);return Q(i)?[_r(i.__key,vr(i,o,"clamp"),"text"),l]:null}s(ov,"Tr");function sv(e,t,n){const r=e.offset,i=e.getNode();if(r===0){const o=i.getPreviousSibling(),l=i.getParent();if(t){if((n||!t)&&o===null&&F(l)&&l.isInline()){const a=l.getPreviousSibling();Q(a)&&e.set(a.__key,a.getTextContent().length,"text")}}else F(o)&&!n&&o.isInline()?e.set(o.__key,o.getChildrenSize(),"element"):Q(o)&&!i.isUnmergeable()&&e.set(o.__key,o.getTextContent().length,"text")}else if(r===i.getTextContent().length){const o=i.getNextSibling(),l=i.getParent();if(t&&F(o)&&o.isInline())e.set(o.__key,0,"element");else if((n||t)&&o===null&&F(l)&&l.isInline()&&!l.canInsertTextAfter()&&l.getTextContentSize()>1){const a=l.getNextSibling();Q(a)&&e.set(a.__key,0,"text")}}}s(sv,"kr");function t2(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);sv(e,r,i),sv(t,!r,i),i&&t.set(e.key,e.offset,e.type)}}s(t2,"br");function Oh(e){const t=rt(e.key);return t===null?null:sb(t)}s(Oh,"Nr");function n2(e,t,n){const r=Oh(e),i=Oh(t);if(r===i||r!==null&&i!==null&&r.is(i))return!1;const o=n(r,i);if(r!==null)return F(r)?t.set(r.getKey(),o?r.getChildrenSize():0,"element"):t.set(r.getKey(),o?r.getTextContentSize():0,"text"),!0;const l=zn(i);if(l===null)return!1;const a=l.getParent();if(a===null)return!1;const c=l.getIndexWithinParent();return t.set(a.getKey(),o?c+1:c,"element"),!0}s(n2,"wr");function r2(e){const t=n2(e.anchor,e.focus,(n,r)=>(function(i,o,l,a){if(l!==null&&a!==null){const u=zn(l),f=zn(a);if(u!==null&&u.is(f)){for(const h of kd(u).values()){if(h===l.getKey())return!0;if(h===a.getKey())return!1}return!0}return u===null||f===null||u.isBefore(f)}if(l!==null){const u=zn(l),f=rt(o.key);return u===null||f===null||!(!u.is(f)&&!u.isParentOf(f))||u.isBefore(f)}const c=zn(a),d=rt(i.key);return c!==null&&d!==null&&!c.is(d)&&!c.isParentOf(d)&&d.isBefore(c)})(e.anchor,e.focus,n,r));return t&&(e.dirty=!0),t}s(r2,"Er");function i2(e,t,n,r,i,o){if(e===null||n===null||!Ia(i,e,n))return null;const l=ov(e,t,_e(o)?o.anchor:null,i);if(l===null)return null;const a=ov(n,r,_e(o)?o.focus:null,i);if(a===null)return null;const[c,d]=l,[u,f]=a;if(c.type==="element"&&u.type==="element"){const g=rs(e),p=rs(n);if(We(g)&&We(p))return null}const h=i._slotsUsed&&n2(c,u,()=>(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return t2(c,u),[c,u,d||f||h]}s(i2,"Or");function o2(e){return F(e)&&!e.isInline()}s(o2,"Mr");function s2(e,t,n,r,i,o){const l=Kr(),a=new Ma(_r(e,t,i),_r(n,r,o),0,"");return a.dirty=!0,l._selection=a,a}s(s2,"Ar");function l2(){const e=_r("root",0,"element"),t=_r("root",0,"element");return new Ma(e,t,0,"")}s(l2,"Dr");function au(){return new j5(new Set)}s(au,"Pr");function UA(e,t){return _d(null,e,t,null)}s(UA,"Fr");function _d(e,t,n,r){const i=n._window;if(i===null)return null;const o=r||i.event,l=o?o.type:void 0,a=l==="selectionchange",c=!gh&&(a||l==="beforeinput"||l==="compositionstart"||l==="compositionend"||l==="click"&&o&&o.detail===3||l==="drop"||l===void 0);let d,u,f,h;if(_e(e)&&!c)return e.clone();{if(t===null)return null;const b=tr(t,n._rootElement);if(d=b.anchorNode,u=b.focusNode,f=b.anchorOffset,h=b.focusOffset,(a||l===void 0)&&_e(e)&&!Ia(n,d,u))return e.clone()}const g=i2(d,f,u,h,n,e);if(g===null)return null;const[p,v,_]=g;let y=0,x="";if(_e(e)){const b=e.anchor;if(p.key===b.key)y=e.format,x=e.style;else{const T=p.getNode();Q(T)?(y=T.getFormat(),x=T.getStyle()):F(T)&&(y=T.getTextFormat(),x=T.getTextStyle())}}const C=new Ma(p,v,y,x);return _&&(C.dirty=!0),C}s(_d,"Ir");function Ve(){return Kr()._selection}s(Ve,"Lr");function $o(){return Ue()._editorState._selection}s($o,"Kr");function uo(e,t,n,r=1){const i=e.anchor,o=e.focus,l=i.getNode(),a=o.getNode();if(!t.is(l)&&!t.is(a))return;const c=t.__key;if(e.isCollapsed()){const d=i.offset;if(n<=d&&r>0||n<d&&r<0){const u=Math.max(0,d+r);i.set(c,u,"element"),o.set(c,u,"element"),lv(e)}}else{const d=e.isBackward(),u=d?o:i,f=u.getNode(),h=d?i:o,g=h.getNode();if(t.is(f)){const p=u.offset;(n<=p&&r>0||n<p&&r<0)&&u.set(c,Math.max(0,p+r),"element")}if(t.is(g)){const p=h.offset;(n<=p&&r>0||n<p&&r<0)&&h.set(c,Math.max(0,p+r),"element")}}lv(e)}s(uo,"zr");function lv(e){const t=e.anchor,n=t.offset,r=e.focus,i=r.offset,o=t.getNode(),l=r.getNode();if(e.isCollapsed()){if(!F(o))return;const a=o.getChildrenSize(),c=n>=a,d=c?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(Q(d)){let u=0;c&&(u=d.getTextContentSize()),t.set(d.__key,u,"text"),r.set(d.__key,u,"text")}return}if(F(o)){const a=o.getChildrenSize(),c=n>=a,d=c?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(Q(d)){let u=0;c&&(u=d.getTextContentSize()),t.set(d.__key,u,"text")}}if(F(l)){const a=l.getChildrenSize(),c=i>=a,d=c?l.getChildAtIndex(a-1):l.getChildAtIndex(i);if(Q(d)){let u=0;c&&(u=d.getTextContentSize()),r.set(d.__key,u,"text")}}}s(lv,"Br");function cu(e,t,n,r,i){let o=null,l=0,a=null;r!==null?(o=r.__key,Q(r)?(l=r.getTextContentSize(),a="text"):F(r)&&(l=r.getChildrenSize(),a="element")):i!==null&&(o=i.__key,Q(i)?a="text":F(i)&&(a="element")),o!==null&&a!==null?e.set(o,l,a):(l=t.getIndexWithinParent(),l===-1&&(l=n.getChildrenSize()),e.set(n.__key,l,"element"))}s(cu,"Rr");function av(e,t,n,r,i){e.type==="text"?e.set(n,e.offset+(t?0:i),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}s(av,"Wr");function uu(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}s(uu,"Ur");function cv(e,t,n){const r=ys(e,t.getKey());if(F(t)){const i=Pn(t,r,e);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}s(cv,"$r");function a2(e,t,n,r,i,o){const l=o.getRootNode(),a=Ls(l)||ci(l)?xs(l):null;if(i.has("collaboration")&&a!==o||a!==null&&Td(a,a))return;const c=tr(r,o);let d;if(!_e(t))return void(e!==null&&Ia(n,c.anchorNode,c.focusNode)&&r.removeAllRanges());const u=t.anchor,f=t.focus,h=u.getNode(),g=f.getNode(),[p,v]=cv(n,h,u.offset),[_,y]=cv(n,g,f.offset),x=t.format,C=t.style,b=t.isCollapsed();let T=p,M=_,S=!1;if(u.type==="text"?(T=Q(h)?ii(h,p,n):null,S=h.getFormat()!==x||h.getStyle()!==C):_e(e)&&e.anchor.type==="text"&&(S=!0),f.type==="text"&&(M=Q(g)?ii(g,_,n):null),T!==null&&M!==null){if(b&&(e===null||S||_e(e)&&(e.format!==x||e.style!==C))&&(function(E,A,D,L,G,$){E._inputState.collapsedSelectionFormat={format:A,key:G,offset:L,style:D,timeStamp:$}})(n,x,C,v,u.key,performance.now()),(r.type!=="Range"||!b)&&c.anchorOffset===v&&c.focusOffset===y&&c.anchorNode===T&&c.focusNode===M){if(a===null||!o.contains(a)){const E=a!==null?vo(a):null;E!==null&&E!==n||i.has("skip-selection-focus")||o.focus({preventScroll:!0})}if(u.type!=="element")return}if(uu(r,T,v,M,y),ai&&t.isCollapsed()&&o!==null&&!i.has("skip-selection-focus")){const E=mu(o);if(E===null||!o.contains(E)){const A=xs(o.ownerDocument),D=A!==null?vo(A):null;D!==null&&D!==n||o.focus({preventScroll:!0})}}if(!i.has("skip-scroll-into-view")&&t.isCollapsed()&&o!==null&&o===mu(o)){const E=_e(t)&&t.anchor.type==="element"?T.childNodes[v]||null:(d===void 0&&(d=z2(r,o)),d);if(E!==null){let A;if(Tr(E)){const D=E.ownerDocument.createRange();D.selectNode(E),A=D.getBoundingClientRect()}else A=E.getBoundingClientRect();(function(D,L,G){const $=wd(G),W=Qp($);if($===null||W===null)return;const z=G.getBoundingClientRect();if(L.bottom<z.top)return;let{top:me,bottom:q}=L,le=0,ye=0,X=G;for(;X!==null;){const ne=X===$.body;if(ne){const ge=W.visualViewport;if(ge){const pe=ge.offsetTop;le=pe,ye=pe+ge.height}else le=0,ye=wn(D).innerHeight;const se=W.getComputedStyle($.documentElement),Z=parseFloat(se.scrollPaddingTop),ee=parseFloat(se.scrollPaddingBottom);isFinite(Z)&&(le+=Z),isFinite(ee)&&(ye-=ee)}else{const ge=X===G?z:X.getBoundingClientRect();le=ge.top,ye=ge.bottom}let he=0;if(me<le?he=-(le-me):q>ye&&(he=q-ye),he!==0)if(ne)W.scrollBy(0,he);else{const ge=X.scrollTop;X.scrollTop+=he;const se=X.scrollTop-ge;me-=se,q-=se}if(ne)break;X=Po(X)}})(n,A,o)}}(function(E){E._inputState.isSelectionChangeFromDOMUpdate=!0})(n)}}s(a2,"Hr");function WA(e){let t=Ve()||$o();t===null&&(t=$n().selectEnd()),t.insertNodes(e)}s(WA,"Jr");function c2(e,t){for(const n of e.split(/(\r?\n|\t)/))n===`
10
+ `||n===`\r
11
+ `?t.linebreak():n===" "?t.tab():n!==""&&t.text(n)}s(c2,"jr");function Hp(e){const t=[];return c2(e,{linebreak:s(()=>t.push(Aa()),"linebreak"),tab:s(()=>t.push(Bp()),"tab"),text:s(n=>t.push(Bt(n)),"text")}),t}s(Hp,"Vr");function zA(){const e=Ve();return e===null?"":e.getTextContent()}s(zA,"qr");function Dh(e){const t=[];for(const n of e)Lr(n)||(!F(n)&&!We(n)||n.isInline()?t.push(n):F(n)&&t.push(...Dh(n.getChildren())));return t}s(Dh,"Yr");function Xs(e){let t=e;e.isCollapsed()||t.removeText();const n=Ve();_e(n)&&(t=n),_e(t)||B(161);const r=t.anchor;let i=r.getNode(),o=r.offset;for(;!pn(i)&&Yt(i)===null;){const l=i;if([i,o]=jA(i,o),l.is(i))break}return o}s(Xs,"Gr");function jA(e,t){const n=e.getParent();if(!n){const i=_n();return $n().append(i),i.select(),[$n(),0]}if(Q(e)){const i=e.splitText(t);if(i.length===0)return[n,e.getIndexWithinParent()];const o=t===0?0:1;return[n,i[0].getIndexWithinParent()+o]}if(!F(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const i=new Ma(_r(e.__key,t,"element"),_r(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}s(jA,"Xr");function uv(e){return Lr(e)||V2(e)||Q(e)||e.isParentRequired()}s(uv,"Qr");function _f(e){const t=_n();let n=null;for(let r=0;r<e.length;r++){const i=e[r];if(uv(i)){if(n===null){n=i.createParentElementNode(),t.append(n);const o=e[r+1];if(Lr(i)&&(o===void 0||!uv(o)))continue}n.append(i)}else t.append(i),n=null}return t}s(_f,"Zr");function du(e,t,n,r,i="decorators-and-blocks"){if(t==="move"&&r==="character"&&!e.isCollapsed()){const[u,f]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return f.set(u.key,u.offset,u.type),!0}const o=oi(e.focus,n?"previous":"next"),l=r==="lineboundary",a=t==="move";let c=o,d=i==="decorators-and-blocks";if(!_b(c)){for(const u of c){d=!1;const{origin:f}=u;if(!We(f)||f.isIsolated()||(c=u,!l||!f.isInline()))break}if(d)for(const u of um(o).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(Yn(u))u.origin.isInline()||(c=u);else{if(F(u.origin))continue;We(u.origin)&&!u.origin.isInline()&&(c=u)}break}}if(c===o)return!1;if(a&&!l&&We(c.origin)&&c.origin.isKeyboardSelectable()){const u=au();return u.add(c.origin.getKey()),hn(u),!0}return c=pr(c),a&&bs(e.anchor,c),bs(e.focus,c),d||!l}s(du,"ti");var Wt=null,wt=null,yn=!1,yf=!1,Oc=!1,xf=new Set,Dc=0,dv={characterData:!0,childList:!0,subtree:!0};function ko(){return yn||Wt!==null&&Wt._readOnly}s(ko,"ai");function Ut(){yn&&B(13)}s(Ut,"ui");function u2(){Dc>99&&B(14)}s(u2,"fi");function Kr(){return Wt===null&&B(195,f2()),Wt}s(Kr,"di");function JA(e){Kr()!==null&&wt===null&&(wt=e),wt!==e&&UC(378)}s(JA,"hi");function Ue(){return wt===null&&B(337,f2()),wt}s(Ue,"gi");function d2(){Ue()._dirtyType=2}s(d2,"_i");function f2(){let e=0;const t=new Set,n=_s.version;if(typeof window<"u")for(const i of U2(document)){const o=Na(i);if(Sd(o))e++;else if(o){let l=String(o.constructor.version||"<0.17.1");l===n&&(l+=" (separately built, likely a bundler configuration issue)"),t.add(l)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}s(f2,"pi");function h2(){return wt}s(h2,"yi");function fv(e,t,n){const r=t.__type,i=jp(e,r);let o=n.get(r);o===void 0&&(o=Array.from(i.transforms),n.set(r,o));const l=o.length;for(let a=0;a<l&&(o[a](t),t.isAttached());a++);}s(fv,"mi");function hv(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}s(hv,"xi");function g2(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const i of r)n.add(i)}s(g2,"Ci");function GA(e){return fu(e,Ue()._nodes)}s(GA,"Si");function fu(e,t){const n=e.type,r=t.get(n);r===void 0&&B(17,n);const i=r.klass;e.type!==i.getType()&&B(18,i.name);const o=i.importJSON(e),l=e.children;if(F(o)&&Array.isArray(l))for(let c=0;c<l.length;c++){const d=fu(l[c],t);o.append(d)}const a=e.$slots;if(a){Dr(o)||B(379,i.name);for(const c in a)am(o,c,fu(a[c],t))}return o}s(fu,"vi");function gv(e,t,n){const r=Wt,i=yn,o=wt;Wt=t,yn=!0,wt=e;try{return n()}finally{Wt=r,yn=i,wt=o}}s(gv,"Ti");function Ni(e,t){const n=Oc;Oc=!0;try{(function(r,i){const o=r._pendingEditorState,l=r._rootElement,a=r._headless||l===null;if(o===null)return void(!r._updating&&r._deferred.length>0&&pv(r,r._deferred));const c=r._editorState,d=c._selection,u=o._selection,f=r._dirtyType!==0,h=Wt,g=yn,p=wt,v=r._updating,_=r._observer;let y=null;if(r._pendingEditorState=null,r._editorState=o,!a&&f&&_!==null){wt=r,Wt=o,yn=!1,r._updating=!0;try{const E=r._dirtyType,A=r._dirtyElements,D=r._dirtyLeaves;_.disconnect(),y=sA(c,o,r,E,A,D)}catch(E){if(E instanceof Error&&r._onError(E),yf)throw E;S2(r,null,l,o),e5(r),r._dirtyType=2,yf=!0,Ni(r,c),yf=!1;return}finally{_.observe(l,dv),r._updating=v,Wt=h,yn=g,wt=p}}o._readOnly||(o._readOnly=!0);const x=r._dirtyLeaves,C=r._dirtyElements,b=r._normalizedNodes,T=r._updateTags;f&&(r._dirtyType=0,r._cloneNotNeeded.clear(),r._dirtyLeaves=new Set,r._dirtyElements=new Map,r._normalizedNodes=new Set),r._updateTags=new Set,(function(E,A){const D=E._decorators;let L=E._pendingDecorators||D;const G=A._nodeMap;let $;for($ in L)G.has($)||(L===D&&(L=N2(E)),delete L[$])})(r,o);const M=a?null:or(wn(r));if(r._editable&&M!==null&&(f||u===null||u.dirty||!u.is(d))&&l!==null&&!T.has("skip-dom-selection")){wt=r,Wt=o;try{if(_!==null&&_.disconnect(),f||u===null||u.dirty){const E=r._blockCursorElement;E!==null&&pu(E,r,l),a2(d,u,r,M,T,l)}(function(E,A,D){let L=E._blockCursorElement;if(_e(D)&&D.isCollapsed()&&D.anchor.type==="element"&&A.contains(mu(A))){const G=D.anchor,$=G.getNode(),W=G.offset;let z=!1,me=null;if(W===$.getChildrenSize())Rc($.getChildAtIndex(W-1))&&(z=!0);else{const q=$.getChildAtIndex(W);if(q!==null&&Rc(q)){const le=q.getPreviousSibling();(le===null||Rc(le))&&(z=!0,me=E.getElementByKey(q.__key))}}if(z){const q=Pn($,E.getElementByKey($.__key),E).element;L===null&&(E._blockCursorElement=L=(function(le){const ye=le.theme,X=xn().createElement("div");X.contentEditable="false",X.setAttribute("data-lexical-cursor","true");let ne=ye.blockCursor;return ne!==void 0&&(typeof ne=="string"&&(ne=ye.blockCursor=La(ne)),ne!==void 0&&X.classList.add(...ne)),X})(E._config)),A.style.caretColor="transparent",me===null?q.appendChild(L):q.insertBefore(L,me);return}}L!==null&&pu(L,E,A)})(r,l,u)}finally{_!==null&&_.observe(l,dv),wt=p,Wt=h}}y!==null&&(function(E,A,D,L,G){const $=Array.from(E._listeners.mutation),W=$.length;for(let z=0;z<W;z++){const[me,q]=$[z];for(const le of q){const ye=A.get(le);ye!==void 0&&me(ye,{dirtyLeaves:L,prevEditorState:G,updateTags:D})}}})(r,y,T,x,c),_e(u)||u===null||d!==null&&d.is(u)||r.dispatchCommand(Sp,void 0);const S=r._pendingDecorators;S!==null&&(r._decorators=S,r._pendingDecorators=null,bl("decorator",r,!0,S)),(function(E,A,D){const L=_v(A),G=_v(D);L!==G&&bl("textcontent",E,!0,G)})(r,i||c,o),bl("update",r,!0,{dirtyElements:C,dirtyLeaves:x,editorState:o,mutatedNodes:y,normalizedNodes:b,prevEditorState:i||c,tags:T}),!v&&pv(r,r._deferred),(function(E){const A=E._updates;if(A.length===0)return void(E._cascadeCount=0);if((function(L){xf.has(L)||(xf.add(L),setTimeout(()=>{xf.delete(L),L._cascadeCount=0},0))})(E),E._cascadeCount++>99)return E._updates=[],E._cascadeCount=0,void E._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${E._config.namespace}`));const D=A.shift();if(D){const[L,G]=D;yd(E,L,G)}})(r)})(e,t)}finally{Oc=n}}s(Ni,"ki");function bl(e,t,n,...r){const i=t._updating;t._updating=n;try{const o=t._listeners[e],l=Array.from(o);for(const[a,c]of l){c&&c();const d=a(...r);o.has(a)?o.set(a,d):d&&d()}}finally{t._updating=i}}s(bl,"bi");function p2(e,t,n,r){const i=qp(e);let o;if(!Oc)for(let l=0;l<i.length;l++)i[l]._updating||(i[l]._cascadeCount=0);for(let l=4;l>=0;l--)for(let a=0;a<i.length;a++){const c=i[a];if(a>0&&c._updating){o=c;break}const d=c._commands.get(t);if(d!==void 0){const u=d[l];if(u.size>0){let f=!1;if(qn(c,()=>{for(const h of u)if(h(n,r))return void(f=!0)}),f)return f}}}return o&&o.update(()=>{p2(o,t,n,r)}),!1}s(p2,"Ni");function pv(e,t){if(e._deferred=[],t.length!==0){const n=e._updating;e._updating=!0;try{for(let r=0;r<t.length;r++)t[r]()}finally{e._updating=n}}}s(pv,"wi");function mv(e,t){const n=e._updates;let r=t||!1;for(;n.length!==0;){const i=n.shift();if(i){const[o,l]=i,a=e._pendingEditorState;let c;l!==void 0&&(c=l.onUpdate,l.skipTransforms&&(r=!0),l.discrete&&(a===null&&B(191),a._flushSync=!0),c&&e._deferred.push(c),g2(e,l.tag)),a==null?yd(e,o,l):o()}}return r}s(mv,"Ei");function yd(e,t,n){const r=e._updateTags;let i,o=!1,l=!1;n!==void 0&&(i=n.onUpdate,g2(e,n.tag),o=n.skipTransforms||!1,l=n.discrete||!1),i&&e._deferred.push(i);const a=e._editorState;let c=e._pendingEditorState,d=!1;(c===null||c._readOnly)&&(c=e._pendingEditorState=v2(c||a),d=!0),c._flushSync=l;const u=Wt,f=yn,h=wt,g=e._updating;Wt=c,yn=!1,e._updating=!0,wt=e;const p=e._headless||e.getRootElement()===null;zp(null);try{d&&(p?a._selection!==null&&(c._selection=a._selection.clone()):c._selection=(function(y,x){const C=y.getEditorState()._selection,b=or(wn(y));return _e(C)||C==null?_d(C,b,y,x):C.clone()})(e,n&&n.event||null));const v=e._compositionKey;t(),o=mv(e,o),(function(y,x){const C=x.getEditorState()._selection,b=y._selection;if(_e(b)){const T=b.anchor,M=b.focus;let S;if(T.type==="text"&&(S=T.getNode(),S.selectionTransform(C,b)),M.type==="text"){const E=M.getNode();S!==E&&E.selectionTransform(C,b)}}})(c,e),e._dirtyType!==0&&(o?(function(y,x){const C=x._dirtyLeaves,b=y._nodeMap;for(const T of C){const M=b.get(T);Q(M)&&M.isAttached()&&M.isSimpleText()&&!M.isUnmergeable()&&F0(M)}})(c,e):(function(y,x){const C=x._dirtyLeaves,b=x._dirtyElements,T=y._nodeMap,M=ei(),S=new Map;let E=C,A=E.size,D=b,L=D.size;for(;A>0||L>0;){if(A>0){x._dirtyLeaves=new Set;for(const G of E){const $=T.get(G);Q($)&&$.isAttached()&&$.isSimpleText()&&!$.isUnmergeable()&&F0($),$!==void 0&&hv($,M)&&fv(x,$,S),C.add(G)}if(E=x._dirtyLeaves,A=E.size,A>0){Dc++;continue}}x._dirtyLeaves=new Set,x._dirtyElements=new Map,D.delete("root")&&D.set("root",!0);for(const G of D){const $=G[0],W=G[1];if(b.set($,W),!W)continue;const z=T.get($);z!==void 0&&hv(z,M)&&fv(x,z,S)}E=x._dirtyLeaves,A=E.size,D=x._dirtyElements,L=D.size,Dc++}x._dirtyLeaves=C,x._dirtyElements=b})(c,e),mv(e),(function(y,x,C,b){const T=y._nodeMap,M=x._nodeMap,S=[];for(const[D]of b){const L=M.get(D);L!==void 0&&(L.isAttached()||(F(L)&&eu(L,D,T,M,S,b),T.has(D)||b.delete(D),S.push(D)))}for(const D of C){const L=M.get(D);L===void 0||L.isAttached()||(Dr(L)&&L.__slots!==null&&eu(L,D,T,M,S,C),T.has(D)||C.delete(D),S.push(D))}for(const D of S)M.delete(D);const E=Ue(),A=E._compositionKey;A===null||M.has(A)||(E._compositionKey=null)})(a,c,e._dirtyLeaves,e._dirtyElements)),v!==e._compositionKey&&(c._flushSync=!0);const _=c._selection;if(_e(_)){e._slotsUsed&&r2(_);const y=c._nodeMap,x=_.anchor.key,C=_.focus.key;y.get(x)!==void 0&&y.get(C)!==void 0||B(19)}else Ds(_)&&_._nodes.size===0&&(c._selection=null)}catch(v){v instanceof Error&&e._onError(v),e._pendingEditorState=a,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),Ni(e);return}finally{Wt=u,yn=f,wt=h,e._updating=g,Dc=0}e._dirtyType!==0||e._deferred.length>0||(function(v,_){const y=_.getEditorState()._selection,x=v._selection;if(x!==null){if(x.dirty||!x.is(y))return!0}else if(y!==null)return!0;return!1})(c,e)?c._flushSync?(c._flushSync=!1,Ni(e)):d&&r7(()=>{Ni(e)}):(c._flushSync=!1,d&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}s(yd,"Oi");function qn(e,t,n){wt===e&&n===void 0?t():yd(e,t,n)}s(qn,"Mi");function qA(e){if(Mt(e)){let t=null;for(const n of e.getChildren())t=n.isInline()?(t||n.replace(n.createParentElementNode())).append(n):null}}s(qA,"Ai");var Rs=class extends Ln{static{s(this,"Di")}__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:qA,extends:Ln})}constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&B(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return U8[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0&&Zn(this).length===0}isDirty(){const e=Ue()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){const e=[];for(const n of Zn(this)){const r=Wi(this,n);F(r)&&e.push(...r.getAllTextNodes())}let t=this.getFirstChild();for(;t!==null;){if(Q(t)&&e.push(t),F(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;F(e);){const t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;F(e);){const t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const i=t[n-1];return F(i)&&i.getLastDescendant()||i||null}const r=t[e];return F(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:rt(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&B(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:rt(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&B(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;n!==null&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;n!==null&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e=ab(this);const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const i=t[r];e+=i.getTextContent(),F(i)&&r!==n-1&&!i.isInline()&&(e+=ho)}return e}getTextContentSize(){let e=(function(r){let i=0;for(const o of Zn(r)){const l=Wi(r,o);l!==null&&(i+=l.getTextContentSize())}return i})(this);const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const i=t[r];e+=i.getTextContentSize(),F(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const t=Qc[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){const t=qt[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return Ki(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){Ut();const n=Ve();let r=e,i=t;const o=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){const a=this.getFirstChild();if(Q(a)||F(a))return a.select(0,0)}else if(!(e!==void 0&&e!==o||t!==void 0&&t!==o)){const a=this.getLastChild();if(Q(a)||F(a))return a.select()}}r===void 0&&(r=o),i===void 0&&(i=o);const l=this.__key;return _e(n)?(n.anchor.set(l,r,"element"),n.focus.set(l,i,"element"),n.dirty=!0,n):s2(l,r,l,i,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(t=>t.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e!==""&&Qc[e]||0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){su(this)&&B(324,this.__key,this.__type);const r=this.getChildrenSize(),i=this.getWritable();e+t<=r||B(226,String(e),String(t),String(r));for(const h of n);const o=i.__key,l=[],a=[],c=this.getChildAtIndex(e+t);let d=null,u=r-t+n.length;if(e!==0)if(e===r)d=this.getLastChild();else{const h=this.getChildAtIndex(e);h!==null&&(d=h.getPreviousSibling())}if(t>0){let h=d===null?this.getFirstChild():d.getNextSibling();for(let g=0;g<t;g++){h===null&&B(100);const p=h.getNextSibling(),v=h.__key;gr(h.getWritable()),a.push(v),h=p}}let f=d;for(const h of n){f!==null&&h.is(f)&&(d=f=f.getPreviousSibling());const g=h.getWritable();g.__parent===o&&u--,gr(g);const p=h.__key;if(f===null)i.__first=p,g.__prev=null;else{const v=f.getWritable();v.__next=p,g.__prev=v.__key}h.__key===o&&B(76),g.__parent=o,l.push(p),f=h}if(e+t===r)f!==null&&(f.getWritable().__next=null,i.__last=f.__key);else if(c!==null){const h=c.getWritable();if(f!==null){const g=f.getWritable();h.__prev=f.__key,g.__next=c.__key}else h.__prev=null}if(i.__size=u,a.length){const h=Ve();if(_e(h)){const g=new Set(a),p=new Set(l),{anchor:v,focus:_}=h;vv(v,g,p)&&cu(v,v.getNode(),this,d,c),vv(_,g,p)&&cu(_,_.getNode(),this,d,c),u!==0||this.canBeEmpty()||Mt(this)||this.remove()}}return i}getDOMSlot(e){return new JC(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(_t(t)){const n=this.getIndent();n>0&&(t.style.paddingInlineStart=40*n+"px",t.setAttribute("data-lexical-indent",String(n)));const r=this.getDirection();r&&(t.dir=r)}return{element:t}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return t===0&&n===""||Mt(this)||this.getChildren().some(Q)||(t!==0&&(e.textFormat=t),n!==""&&(e.textStyle=n)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){const n=Pn(this,e,t);let r=n.getFirstChild();for(let i=this.getFirstChild();i;i=i.getNextSibling()){const o=t.getElementByKey(i.getKey());o!==null&&(r==null?(n.insertChild(o),r=o):r!==o&&n.replaceChild(o,r),r=r.nextSibling)}}};function F(e){return e instanceof Rs}s(F,"Pi");function vv(e,t,n){let r=e.getNode();for(;r;){const i=r.__key;if(t.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}s(vv,"Fi");var Kp=class extends Ln{static{s(this,"Ii")}__slotHost;__slots;constructor(e){super(e),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&B(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}};function We(e){return e instanceof Kp}s(We,"Li");var xd=class m2 extends Rs{static{s(this,"Ki")}__cachedText;static getType(){return"root"}static clone(){return new m2}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){B(51)}getTextContent(){const t=this.__cachedText;return t===null||!ko()&&Ue()._dirtyType!==0?super.getTextContent():t}remove(){B(52)}replace(t){B(53)}insertBefore(t){B(54)}insertAfter(t){B(55)}updateDOM(t,n){return!1}splice(t,n,r){for(const i of r)F(i)||We(i)||B(282);return super.splice(t,n,r)}static importJSON(t){return $n().updateFromJSON(t)}collapseAtStart(){return!0}};function At(e){return e instanceof xd}s(At,"zi");function v2(e){return new Wp(ZC(e._nodeMap),null,e._slotsUsed)}s(v2,"Bi");function Up(){return new Wp(new Map([["root",new xd]]),null,!1)}s(Up,"Ri");function Rh(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&B(130,n.name),F(e)){const i=t.children;Array.isArray(i)||B(59,n.name);const o=e.getChildren();for(let l=0;l<o.length;l++){const a=Rh(o[l]);i.push(a)}}const r=Zn(e);if(r.length>0){const i={};for(const o of r){const l=Wi(e,o);l===null&&B(366,n.name,o),i[o]=Rh(l)}t.$slots=i}return t}s(Rh,"Wi");function ZA(e){return e instanceof Wp}s(ZA,"Ui");var Wp=class _2{static{s(this,"$i")}_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,n=null,r=!1){this._nodeMap=t,this._selection=n||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=r}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,n){return gv(n&&n.editor||null,this,t)}clone(t){const n=new _2(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return n._readOnly=!0,n}toJSON(){return gv(null,this,()=>({root:Rh($n())}))}},y2=class extends Rs{static{s(this,"Hi")}static getType(){return"artificial"}createDOM(e){return xn().createElement("div")}},Cd=class x2 extends Ln{static{s(this,"Ji")}static getType(){return"linebreak"}static clone(t){return new x2(t.__key)}constructor(t){super(t)}getTextContent(){return`
12
+ `}createDOM(){return xn().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:s(t=>C2(t)||b2(t)?null:{conversion:YA,priority:0},"br")}}static importJSON(t){return Aa().updateFromJSON(t)}};function YA(e){return{node:Aa()}}s(YA,"ji");function Aa(){return Oa(new Cd)}s(Aa,"Vi");function Lr(e){return e instanceof Cd}s(Lr,"qi");function C2(e){const t=e.parentElement;if(t!==null&&im(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&hu(n)){const r=t.lastChild;if(r===e||r.previousSibling===e&&hu(r))return!0}}return!1}s(C2,"Yi");function b2(e){const t=e.parentElement;if(t!==null&&im(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&hu(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&hu(r))return!0}return!1}s(b2,"Gi");function hu(e){return Tr(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}s(hu,"Xi");var bd=class E2 extends Rs{static{s(this,"Qi")}static getType(){return"paragraph"}static clone(t){return new E2(t.__key)}createDOM(t){const n=xn().createElement("p"),r=gs(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:s(t=>({conversion:XA,priority:0}),"p")}}exportDOM(t){const{element:n}=super.exportDOM(t);if(_t(n)){this.isEmpty()&&n.append(xn().createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}static importJSON(t){return _n().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const n=this.getChildren().find(Q);n?(t.textFormat=n.getFormat(),t.textStyle=n.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,n){const r=_n();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||Q(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function XA(e){const t=_n();if(eb(t,e),X2(e,t),t.getFormatType()===""){const n=e.getAttribute("align");n&&n&&n in Qc&&t.setFormat(n)}return Q2(t,e),{node:t}}s(XA,"Zi");function _n(){return Oa(new bd)}s(_n,"ts");function T2(e){return e instanceof bd}s(T2,"es");function QA(e){}s(QA,"ns");function S2(e,t,n,r,i){const o=e._keyToDOMMap;o.clear(),e._editorState=Up(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),e._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const l=e._observer;l!==null&&(l.disconnect(),e._observer=null),t!==null&&(t.textContent="",(function(a,c){const d=`__lexicalKey_${c._key}`;delete a[d]})(t,e)),n!==null&&(n.textContent="",o.set("root",n),I2(n,e,"root"))}s(S2,"hs");function w2(e){const t=new Set,n=new Set;for(const{klass:r,ownNodeConfig:i}of Ra(e)){const o=r.transform;if(!n.has(o)){n.add(o);const l=r.transform();l&&t.add(l)}if(i){const l=i.$transform;l&&t.add(l)}}return t}s(w2,"gs");var Gl={$createDOM:s((e,t)=>e.createDOM(t._config,t),"$createDOM"),$decorateDOM:s((e,t,n,r)=>{},"$decorateDOM"),$exportDOM:s((e,t)=>{const n=Ed(t,e.getType());return n&&n.exportDOM!==void 0?n.exportDOM(t,e):e.exportDOM(t)},"$exportDOM"),$extractWithChild:s((e,t,n,r,i)=>F(e)&&e.extractWithChild(t,n,r),"$extractWithChild"),$getDOMSlot:s((e,t,n)=>e.getDOMSlot(t),"$getDOMSlot"),$getSlotTargetElement:s((e,t,n,r)=>null,"$getSlotTargetElement"),$shouldExclude:s((e,t,n)=>F(e)&&e.excludeFromCopy("html"),"$shouldExclude"),$shouldInclude:s((e,t,n)=>!t||e.isSelected(t),"$shouldInclude"),$updateDOM:s((e,t,n,r)=>e.updateDOM(t,n,r._config),"$updateDOM")};function e7(e){const t=e||{},n=h2(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,o=t.disableEvents||!1,l=Up(),a=t.namespace||(i!==null?i._config.namespace:D2()),c=t.editorState,d=[xd,ka,Cd,md,bd,y2,...t.nodes||[]],{onError:u,onWarn:f,html:h}=t,g=t.editable===void 0||t.editable;let p;if(e===void 0&&n!==null)p=n._nodes;else{p=new Map;for(let _=0;_<d.length;_++){let y=d[_],x=null,C=null;if(y&&typeof y=="object"){const M=y;y=M.replace,x=M.with,C=M.withKlass||null}if(typeof y!="function"||!y.prototype||!(y===Ln||y.prototype instanceof Ln)){let M="<unknown>";try{M=JSON.parse(qC)}catch{}B(365,String(_-d.length+(t.nodes?t.nodes.length:0)),typeof y=="function"?`${y.name}${typeof y.getType=="function"?` (type ${String(y.getType())})`:""}`:String(y),String(M))}Da(y);const b=y.getType(),T=w2(y);p.set(b,{exportDOM:h&&h.export?h.export.get(y):void 0,klass:y,replace:x,replaceWithKlass:C,sharedNodeState:n5(d[_]),transforms:T})}}const v=new _s(l,i,p,{disableEvents:o,dom:{...Gl,...e&&e.dom},namespace:a,theme:r},u||console.error,f||QA,(function(_,y){const x=new Map,C=new Set,b=s(T=>{Object.keys(T).forEach(M=>{let S=x.get(M);S===void 0&&(S=[],x.set(M,S)),S.push(T[M])})},"r");return _.forEach(T=>{const M=T.klass.importDOM;if(M==null||C.has(M))return;C.add(M);const S=M.call(T.klass);S!==null&&b(S)}),y&&b(y),x})(p,h?h.import:void 0),g,e);return c!==void 0&&(v._pendingEditorState=c,v._dirtyType=2),(function(_){_.registerCommand(wp,_A,0),_.registerCommand(kp,yA,0),_.registerCommand(Mp,xA,0),_.registerCommand(Ap,CA,0),_.registerCommand(Dp,bA,0)})(v),v}s(e7,"ps");function t7(e,t){const n=e.get(t);e.delete(t),n&&n()}s(t7,"ys");function Qs(e,t,n){return e.set(t,n),t7.bind(null,e,t)}s(Qs,"ms");var _s=class{static{s(this,"xs")}static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(e,t,n,r,i,o,l,a,c){this._createEditorArgs=c,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new hh,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=D2(),this._onError=i,this._onWarn=o,this._htmlConversions=l,this._editable=a,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return Qs(this._listeners.update,e)}registerEditableListener(e){return Qs(this._listeners.editable,e)}registerDecoratorListener(e){return Qs(this._listeners.decorator,e)}registerTextContentListener(e){return Qs(this._listeners.textcontent,e)}registerRootListener(e){const t=this._listeners.root;return pm(Qs(t,e,e(this._rootElement,null)||void 0),()=>(function(n,r,i){const o=n.get(r);o&&o(),n.set(r,r(...i)||void 0)})(t,e,[null,this._rootElement]))}registerCommand(e,t,n){n===void 0&&B(35);const r=this._commands;r.has(e)||r.set(e,[new Ys,new Ys,new Ys,new Ys,new Ys]);const i=r.get(e);i===void 0&&B(36,String(e));const o=(function(a){return 7&a})(n),l=i[o];return o!==n?l.addFront(t):l.addBack(t),()=>{l.delete(t),i.every(a=>a.size===0)&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation;let o=i.get(t);o===void 0&&(o=new Set,i.set(t,o)),o.add(r);const l=n&&n.skipInitialization;return l!==void 0&&l||this.initializeMutationListener(t,r),()=>{o.delete(r),o.size===0&&i.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&B(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=$h(n).get(t.getType());if(!r)return;const i=new Map;for(const o of r.keys())i.set(o,"created");i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){const o=this.registerNodeTransformToKlass(i,t);r.push(o)}return(function(o,l){const a=$h(o.getEditorState()),c=[];for(const d of l){const u=a.get(d);u&&c.push(u)}c.length!==0&&o.update(()=>{for(const d of c)for(const u of d.keys()){const f=rt(u);f&&f.markDirty()}},o._pendingEditorState===null?{tag:Nc}:void 0)})(this,r.map(o=>o.klass.getType())),()=>{r.forEach(o=>o.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return de(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=gs(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,S2(this,t,e,r,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||EA(t),n!=null&&t.classList.remove(...n)),e!==null){const i=Qp(e),o=e.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=i,this._dirtyType=2,e5(this),this._updateTags.add(Nc),Ni(this),this._config.disableEvents||(function(l,a){const c=l.ownerDocument;wh.set(l,c);let d=iu.get(c);d===void 0&&(d={editors:new Set,hasShadowEditor:void 0},iu.set(c,d)),d.editors.add(a),d.hasShadowEditor=void 0,l.__lexicalEditor=a;const u=F5(l);u.push(vA.register(c));for(let f=0;f<Sh.length;f++){const[h,g]=Sh[f],p=typeof g=="function"?v=>{Z0(v)||(kh(v),(a.isEditable()||h==="click")&&g(v,a))}:v=>{if(Z0(v))return;kh(v);const _=a.isEditable();switch(h){case"cut":return _&&de(a,Lp,v);case"copy":return de(a,Rp,v);case"paste":return _&&de(a,Ip,v);case"dragstart":return _&&de(a,w5,v);case"dragover":return _&&de(a,k5,v);case"dragend":return _&&de(a,M5,v);case"focus":return _&&de(a,I5,v);case"blur":return _&&de(a,N5,v);case"drop":return _&&de(a,S5,v)}};u.push($p(l,h,p))}})(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(Nc),Ni(this);bl("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&B(38);let n=e;n._readOnly&&(n=v2(e),n._selection=e._selection?e._selection.clone():null),QC(this);const r=this._pendingEditorState,i=t!==void 0?t.tag:null;r===null||r.isEmpty()||(i!=null&&this._updateTags.add(i),Ni(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,qn(this,()=>{if(i&&this._updateTags.add(i),e._parsed)for(const[o,l]of n._nodeMap.entries())F(l)?this._dirtyElements.set(o,!0):this._dirtyLeaves.add(o)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return(function(n,r,i){const o=Up(),l=Wt,a=yn,c=wt,d=r._dirtyElements,u=r._dirtyLeaves,f=r._cloneNotNeeded,h=r._dirtyType;r._dirtyElements=new Map,r._dirtyLeaves=new Set,r._cloneNotNeeded=new Set,r._dirtyType=0,Wt=o,yn=!1,wt=r,zp(null);try{const g=r._nodes;fu(n.root,g),i&&i(),o._readOnly=!0,o._parsed=!0}catch(g){g instanceof Error&&r._onError(g)}finally{r._dirtyElements=d,r._dirtyLeaves=u,r._cloneNotNeeded=f,r._dirtyType=h,Wt=l,yn=a,wt=c}return o})(typeof e=="string"?JSON.parse(e):e,this,t)}read(...e){const[t,n]=e.length===1?["force-commit",e[0]]:e;return t==="force-commit"&&Ni(this),(t==="pending"?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(e,t){(function(n,r,i){n._updating?n._updates.push([r,i]):yd(n,r,i)})(this,e,t)}focus(e,t={}){const n=this._rootElement;n!==null&&(n.setAttribute("autocapitalize","off"),qn(this,()=>{const r=Ve(),i=$n();r!==null?r.dirty||hn(r.clone()):i.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?i.selectStart():i.selectEnd()),Mo("focus"),F2(()=>{n.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=or(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,bl("editable",this,!0,e),this._slotsUsed&&this.update(()=>d2()))}toJSON(){return{editorState:this._editorState.toJSON()}}};_s.version=qC;var Lh=null;function zp(e){Lh=e}s(zp,"Ss");var k2=1;function n7(){k2=1}s(n7,"Ts");function jp(e,t){const n=Ed(e,t);return n===void 0&&B(30,t),n}s(jp,"ks");function Ed(e,t){return e._nodes.get(t)}s(Ed,"bs");var r7=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function Td(e,t){const n=t!==void 0?t:(()=>{const o=e.getRootNode();return Ls(o)||ci(o)?xs(o):null})();if(!_t(n)||n.hasAttribute("data-lexical-slot"))return!1;const r=Gp(n),i=n.nodeName;return Pp(r)&&(i==="INPUT"||i==="TEXTAREA"||n.contentEditable==="true"&&Na(n)==null)}s(Td,"ws");var i7=Td;function Ia(e,t,n){const r=e.getRootElement();if(!r)return!1;try{if(!t||!r.contains(t)||!r.contains(n))return!1}catch{return!1}return vo(t)===e&&e.read("latest",()=>!Td(t))}s(Ia,"Os");function Sd(e){return e instanceof _s}s(Sd,"Ms");function vo(e){let t=e;for(;t!=null;){const n=Na(t);if(Sd(n))return n;t=Po(t)}return null}s(vo,"As");function Na(e){return e?e.__lexicalEditor:null}s(Na,"Ds");function o7(e){return B8.test(e)?"rtl":H8.test(e)?"ltr":null}s(o7,"Ps");function Fi(e){return vd(e)||e.isToken()}s(Fi,"Fs");function On(e){return Fi(e)||e.isSegmented()}s(On,"Is");function Tr(e){return Fs(e)&&e.nodeType===3}s(Tr,"Ls");function Ls(e){return Fs(e)&&e.nodeType===9}s(Ls,"Ks");function M2(e){let t=e;for(;t!=null;){if(Tr(t))return t;t=t.firstChild}return null}s(M2,"zs");function Ki(e,t,n){const r=qt[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t==="subscript"?i&=~qt.superscript:t==="superscript"?i&=~qt.subscript:t==="lowercase"?(i&=~qt.uppercase,i&=~qt.capitalize):t==="uppercase"?(i&=~qt.lowercase,i&=~qt.capitalize):t==="capitalize"&&(i&=~qt.lowercase,i&=~qt.uppercase),i}s(Ki,"Bs");function s7(e){return Q(e)||Lr(e)||We(e)}s(s7,"Rs");function A2(e,t){const n=(function(){const l=Lh;return Lh=null,l})();if((t=t||n&&n.__key)!=null)return void(e.__key=t);Ut(),u2();const r=Ue(),i=Kr(),o=""+k2++;i._nodeMap.set(o,e),F(e)?r._dirtyElements.set(o,!0):r._dirtyLeaves.add(o),r._cloneNotNeeded.add(o),r._dirtyType===0&&(r._dirtyType=1),e.__key=o}s(A2,"Ws");function gr(e){Yt(e)!==null&&B(380,e.__key,String(Yt(e)));const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling(),l=o!==null?o.__key:null,a=i!==null?i.__key:null,c=i!==null?i.getWritable():null,d=o!==null?o.getWritable():null;i===null&&(r.__first=l),o===null&&(r.__last=a),c!==null&&(c.__next=l),d!==null&&(d.__prev=a),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}s(gr,"Us");var l7=gr;function gu(e){u2(),su(e)&&B(323,e.__key,e.__type);const t=e.getLatest(),n=t.__parent!==null?t.__parent:Ui(t)?t.__slotHost:null,r=Kr(),i=Ue(),o=r._nodeMap,l=i._dirtyElements;n!==null&&(function(c,d,u){let f=c;for(;f!==null;){if(u.has(f))return;const h=d.get(f);if(h===void 0)break;u.set(f,!1),f=h.__parent!==null?h.__parent:Ui(h)?h.__slotHost:null}})(n,o,l);const a=t.__key;i._dirtyType===0&&(i._dirtyType=1),F(e)?l.set(a,!0):i._dirtyLeaves.add(a)}s(gu,"Hs");function Rt(e){Ut();const t=Ue(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=rt(n);r!==null&&r.getWritable()}if(e!==null){const r=rt(e);r!==null&&r.getWritable()}}}s(Rt,"Js");function ei(){return ko()?null:Ue()._compositionKey}s(ei,"js");function rt(e,t){const n=(t||Kr())._nodeMap.get(e);return n===void 0?null:n}s(rt,"Vs");function Jp(e,t){const n=$s(e,Ue());return n!==void 0?rt(n,t):null}s(Jp,"qs");function I2(e,t,n){e[`__lexicalKey_${t._key}`]=n}s(I2,"Ys");function $s(e,t){return e[`__lexicalKey_${t._key}`]}s($s,"Gs");function Gp(e,t){let n=e;for(;n!=null;){const r=Jp(n,t);if(r!==null)return r;n=Po(n)}return null}s(Gp,"Xs");function N2(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}s(N2,"Qs");function _v(e){return e.read(()=>$n().getTextContent())}s(_v,"Zs");function $n(){return Kr()._nodeMap.get("root")}s($n,"tl");function hn(e){Ut();const t=Kr();e!==null&&(e.dirty=!0,e.setCachedNodes(null),_e(e)&&Ue()._slotsUsed&&r2(e)),t._selection=e}s(hn,"el");function yv(){Ut(),QC(Ue())}s(yv,"nl");function rs(e){const t=(function(n,r){let i=n;for(;i!=null;){const o=$s(i,r);if(o!==void 0)return o;i=Po(i)}return null})(e,Ue());return t===null?null:rt(t)}s(rs,"ol");function O2(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}s(O2,"rl");function qp(e){const t=[];for(let n=e;n!==null;n=n._parentEditor)t.push(n);return t}s(qp,"il");function D2(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}s(D2,"sl");function R2(e){return Tr(e)?e.nodeValue:null}s(R2,"ll");function Zp(e,t,n){const r=or(wn(t));if(r===null)return;const i=tr(r,t._rootElement),o=i.anchorNode;let{anchorOffset:l,focusOffset:a}=i;if(o!==null){let c=R2(o);const d=Gp(o);if(c!==null&&Q(d)){if((c===Vl||c===bp)&&n){const u=n.length;c=n,l=u,a=u}c!==null&&Yp(d,c,l,a,e)}}}s(Zp,"cl");function Yp(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const l=o.isComposing();if(o.isToken()&&l)return;let a=t;if((l||i)&&(t.endsWith(Vl)&&(a=t.slice(0,-Vl.length)),i)){const d=bp;let u;for(;(u=a.indexOf(d))!==-1;)a=a.slice(0,u)+a.slice(u+d.length),n!==null&&n>u&&(n=Math.max(u,n-d.length)),r!==null&&r>u&&(r=Math.max(u,r-d.length))}const c=o.getTextContent();if(i||a!==c){const d=Ve();if(a===""){if(Rt(null),Sa||To||wa)o.remove();else{const v=Ue();Cf(o,"",d),setTimeout(()=>{v.update(()=>{o.isAttached()&&o.getTextContent()===""&&o.remove()})},20)}return}const u=o.getParent(),f=$o(),h=o.getTextContentSize(),g=ei(),p=o.getKey();if(o.isToken()&&!l||g!==null&&p===g&&!l||_e(f)&&(u!==null&&!u.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===e.__key&&f.anchor.offset===0&&!o.canInsertTextBefore()&&!l||f.focus.key===e.__key&&f.focus.offset===h&&!o.canInsertTextAfter()&&!l))return void o.markDirty();if(!_e(d)||n===null||r===null)return void Cf(o,a,d);if(d.setTextNodeRange(o,n,o,r),o.isSegmented()){const v=Bt(o.getTextContent());o.replace(v),o=v}Cf(o,a,d)}}}s(Yp,"al");function Cf(e,t,n){if(e.setTextContent(t),_e(n)){const r=e.getKey();let i=!1;for(const o of["anchor","focus"]){const l=n[o];l.type==="text"&&l.key===r&&(l.offset=vr(e,l.offset,"clamp"),i=!0)}i&&(n._cachedNodes=null,n._cachedIsBackward=null)}}s(Cf,"ul");function nc(e,t,n){const r=t[n]||!1;return r==="any"||r===e[n]}s(nc,"fl");function L2(e,t){return nc(e,t,"altKey")&&nc(e,t,"ctrlKey")&&nc(e,t,"shiftKey")&&nc(e,t,"metaKey")}s(L2,"dl");function qe(e,t,n){if(!L2(e,n))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;if(e.code.startsWith("Digit")&&/^\d$/.test(t))return e.code===`Digit${t}`;const r="Key"+t.toUpperCase();return e.code===r}s(qe,"hl");var qr={ctrlKey:!Kn,metaKey:Kn},xv={altKey:Kn,ctrlKey:!Kn};function Cv(e){return e.key==="Backspace"}s(Cv,"pl");function a7(e){const t=$n();if(_e(e)){const n=e.anchor,r=e.focus,i=n.getNode();if(At(i))return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),ns(e),e;const o=i.getTopLevelElementOrThrow(),l=o.getParent();if(l===null)return F(o)&&(n.set(o.getKey(),0,"element"),r.set(o.getKey(),o.getChildrenSize(),"element"),ns(e)),e;const a=l;return n.set(a.getKey(),0,"element"),r.set(a.getKey(),a.getChildrenSize(),"element"),ns(e),e}{const n=t.select(0,t.getChildrenSize());return hn(ns(n)),n}}s(a7,"yl");function gs(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const i=e[t];if(typeof i=="string"){const o=La(i);return n[t]=o,o}return i}s(gs,"ml");function Xp(e,t,n,r,i){if(n.size===0)return;const o=r.__type,l=r.__key,a=t.get(o);a===void 0&&B(33,o);const c=a.klass;let d=e.get(c);d===void 0&&(d=new Map,e.set(c,d));const u=d.get(l),f=u==="destroyed"&&i==="created";(u===void 0||f)&&d.set(l,f?"updated":i)}s(Xp,"xl");function c7(e){const t=e.getType(),n=Kr();if(n._readOnly){const o=$h(n).get(t);return o?Array.from(o.values()):[]}const r=n._nodeMap,i=[];for(const[,o]of r)o instanceof e&&o.__type===t&&o.isAttached()&&i.push(o);return i}s(c7,"Cl");function bv(e,t,n){const r=e.getParent();let i=n,o=e;return r!==null&&(t&&n===0?(i=o.getIndexWithinParent(),o=r):t||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(t?i-1:i)}s(bv,"Sl");function $2(e,t){const n=e.offset;if(e.type==="element")return bv(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?bv(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}s($2,"vl");function P2(e){const t=wn(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}s(P2,"Tl");function de(e,t,n){return p2(e,t,n,e)}s(de,"kl");function ys(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&B(75,t),n}s(ys,"bl");function Po(e){const t=e.assignedSlot||e.parentElement;if(t!==null)return t;const n=e.parentNode;return ci(n)?n.host:null}s(Po,"Nl");function wd(e){return Ls(e)?e:_t(e)?e.ownerDocument:null}s(wd,"wl");function u7(e){return Ue()._updateTags.has(e)}s(u7,"El");function Mo(e){Ut(),Ue()._updateTags.add(e)}s(Mo,"Ol");function F2(e){Ut(),Ue()._deferred.push(e)}s(F2,"Ml");function ql(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}s(ql,"Al");function Qp(e){const t=wd(e);return t?t.defaultView:null}s(Qp,"Dl");function wn(e){const t=e._window;return t===null&&B(78),t}s(wn,"Pl");function V2(e){return F(e)&&e.isInline()||We(e)&&e.isInline()}s(V2,"Fl");function em(e){let t=e.getLatest();for(;t!==null;){if(Yt(t)!==null&&F(t))return t;const n=t.getParentOrThrow();if(Mt(n))return n;t=n}return t}s(em,"Il");function tm(e){return F(e)&&e.isShadowRoot()}s(tm,"Ll");function Mt(e){return At(e)||tm(e)}s(Mt,"Kl");function nm(e,t=!1){const n=e.constructor.clone(e);return A2(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}s(nm,"zl");function Oa(e){const t=Ue(),n=e.getType(),r=Ed(t,n);r===void 0&&B(200,e.constructor.name,n);const{replace:i,replaceWithKlass:o}=r;if(i!==null){const l=i(e),a=l.constructor;return o!==null?l instanceof o||B(201,o.name,o.getType(),a.name,a.getType(),e.constructor.name,n):l instanceof e.constructor&&a!==e.constructor||B(202,a.name,a.getType(),e.constructor.name,n),l.__key===e.__key&&B(203,e.constructor.name,n,a.name,a.getType()),l}return e}s(Oa,"Bl");function bf(e,t){!At(e.getParent())||F(t)||We(t)||B(99)}s(bf,"Rl");function B2(e){const t=rt(e);return t===null&&B(63,e),t}s(B2,"Wl");function Rc(e){if(!e||e.isInline())return!1;if(We(e))return!0;if(F(e)){if(e.isShadowRoot()){const t=e.getParent();return!(F(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}s(Rc,"Ul");function pu(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}s(pu,"$l");function or(e){return ir?(e||window).getSelection():null}s(or,"Hl");function H2(e){const t=Qp(e);return t?t.getSelection():null}s(H2,"Jl");function ci(e){return q2(e)&&"host"in e}s(ci,"jl");var d7=[];function K2(e){const t=e.getRootNode();if(t===e||!ci(t))return d7;const n=[t];let r=t.host;for(;;){const i=r.getRootNode();if(i===r||!ci(i))break;n.push(i),r=i.host}return n}s(K2,"ql");function*U2(e){const t=[e];let n;for(;n=t.pop();){yield*n.querySelectorAll('[data-lexical-editor="true"]');const r=(Ls(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);let i;for(;i=r.nextNode();)i.shadowRoot&&t.push(i.shadowRoot)}}s(U2,"Yl");function W2(e){return e!==null?e.ownerDocument:document}s(W2,"Gl");function xn(){const e=h2();return W2(e!==null?e._rootElement:null)}s(xn,"Xl");function Ps(e,t){if(t===null||typeof e.getComposedRanges!="function")return null;const n=K2(t);if(n.length===0)return null;const r=e.getComposedRanges;try{const i=r.call(e,{shadowRoots:n})[0];if(i!==void 0)return i}catch{}try{const i=r.apply(e,n)[0];if(i!==void 0)return i}catch{}return null}s(Ps,"Ql");function z2(e,t){const n=Ps(e,t);if(n!==null){const r=j2(n);if(r!==null)return r}return e.rangeCount>0?e.getRangeAt(0):null}s(z2,"Zl");function tr(e,t){const n=Ps(e,t);return n===null?e:J2(n,G2(e))}s(tr,"tc");function f7(e,t){const n=Ps(e,t);if(n===null)return{points:e,range:e.rangeCount>0?e.getRangeAt(0):null};const r=j2(n)??(e.rangeCount>0?e.getRangeAt(0):null);return{points:J2(n,G2(e)),range:r}}s(f7,"ec");function j2(e){const t=e.startContainer.ownerDocument;if(t===null)return null;const n=t.createRange();try{return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}catch{return null}}s(j2,"nc");function J2(e,t){const{startContainer:n,startOffset:r,endContainer:i,endOffset:o}=e;return t==="backward"?{anchorNode:i,anchorOffset:o,direction:t,focusNode:n,focusOffset:r}:{anchorNode:n,anchorOffset:r,direction:t,focusNode:i,focusOffset:o}}s(J2,"oc");function G2(e){return e.direction}s(G2,"rc");function mu(e){const t=e.getRootNode();return Ls(t)||ci(t)?t.activeElement:null}s(mu,"ic");function xs(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){const n=t.shadowRoot.activeElement;if(n===null)break;t=n}return t}s(xs,"sc");function rm(e){const t=e.target;if(t!==null&&_t(t)&&t.shadowRoot!==null&&typeof e.composedPath=="function"){const n=e.composedPath();if(n.length>0)return n[0]}return t}s(rm,"lc");function h7(e,t){let n=e.getChildAtIndex(t);n??=e,Mt(e)&&B(102);const r=s(l=>{const a=l.getParentOrThrow(),c=Mt(a),d=l!==n||c?nm(l):l;if(c)return F(l)&&F(d)||B(133),l.insertAfter(d),[l,d,d];{const[u,f,h]=r(a),g=l.getNextSiblings();return h.append(d,...g),[u,f,d]}},"r"),[i,o]=r(n);return[i,o]}s(h7,"cc");function g7(e){return _t(e)&&e.tagName==="A"}s(g7,"ac");function p7(e){return _t(e)&&e.tagName==="TR"}s(p7,"uc");function m7(e){return _t(e)&&(e.tagName==="TD"||e.tagName==="TH")}s(m7,"fc");function _t(e){return Fs(e)&&e.nodeType===1}s(_t,"dc");function Fs(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}s(Fs,"hc");function q2(e){return Fs(e)&&e.nodeType===11}s(q2,"gc");var v7=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function Z2(e){return!(!_t(e)||!e.style.display.startsWith("inline"))||v7.test(e.nodeName)}s(Z2,"pc");var _7=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function im(e){return(!_t(e)||!e.style.display.startsWith("inline"))&&_7.test(e.nodeName)}s(im,"mc");function pn(e){if(We(e)&&!e.isInline())return!0;if(!F(e)||Mt(e))return!1;const t=e.getFirstChild(),n=t===null||Lr(t)||Q(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}s(pn,"xc");function Sr(){return Ue()}s(Sr,"Cc");function om(e=Sr()){return e._config.dom||Gl}s(om,"Sc");function Pn(e,t,n=Sr()){const r=om(n).$getDOMSlot(e,t,n);return F(e)&&(Y2(r)||B(344,e.getKey(),e.getType())),r}s(Pn,"vc");function y7(e,t,n,r){const i=e.read("latest",()=>{const o=rt(t);return o!==null?(function(l,a,c=Sr()){const d=Wi(l,a);if(d===null)return null;const u=c.getElementByKey(d.getKey());return u!==null?u.parentElement:null})(o,n,e):null});return i!==null&&(i.parentElement!==r&&r.appendChild(i),i.style.display=""),i}s(y7,"Tc");function x7(e,t,n){n.style.display="none";const r=e.getElementByKey(t);r!==null&&n.parentElement!==r&&r.insertBefore(n,r.firstChild)}s(x7,"kc");function Y2(e){return e instanceof JC}s(Y2,"bc");function ii(e,t,n=Sr()){return M2(Pn(e,t,n).element)}s(ii,"Nc");var Ev=new WeakMap,C7=new Map;function $h(e){if(!e._readOnly&&e.isEmpty())return C7;e._readOnly||B(192);let t=Ev.get(e);return t||(t=(function(n){const r=new Map;for(const[i,o]of n._nodeMap){const l=o.__type;let a=r.get(l);a||(a=new Map,r.set(l,a)),a.set(i,o)}return r})(e),Ev.set(e,t)),t}s($h,"Oc");function sm(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}s(sm,"Mc");function b7(e){return(t=sm(e))[V5]=!0,t;var t}s(b7,"Ac");function X2(e,t){const n=e.getAttribute("data-lexical-indent");if(n!==null){const o=parseInt(n,10);if(Number.isFinite(o)&&o>=0)return void t.setIndent(o)}const r=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(r/40);t.setIndent(i)}s(X2,"Dc");function Q2(e,t){const n=t.getAttribute("dir");return n==="ltr"||n==="rtl"?e.setDirection(n):e}s(Q2,"Pc");function eb(e,t){const n=t.style.textAlign;return n&&n in Qc?e.setFormat(n):e}s(eb,"Fc");function tb(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}s(tb,"Ic");function lm(e){return e.__lexicalUnmanaged===!0}s(lm,"Lc");function nb(e,t=Sr()){const n=t.isEditable();e.contentEditable=n?"true":"false",n?e.__lexicalEditor=t:delete e.__lexicalEditor}s(nb,"Kc");function Zl(e,t){let n=e;for(;n!=null;){if(n.__lexicalCapturedSelection===!0)return!0;if(_t(n)&&n.hasAttribute("data-lexical-slot")||$s(n,t)!==void 0)return!1;n=Po(n)}return!1}s(Zl,"zc");function el(e,t){return(function(n,r){return Object.prototype.hasOwnProperty.call(n,r)})(e,t)&&e[t]!==Ln[t]}s(el,"Bc");var Tv=new WeakMap;function Da(e){const t=Tv.get(e);if(t)return t;const n=e.prototype!=null&&k0 in e.prototype?e.prototype[k0]():void 0,r=(function(c){if(!(c===Ln||c.prototype instanceof Ln)){let d="<unknown>",u="<unknown>";try{d=c.getType()}catch{}try{_s.version&&(u=JSON.parse(_s.version))}catch{}B(290,c.name,d,u)}return c===Kp||c===Rs||c===Ln})(e),i=!r&&el(e,"getType")?e.getType():void 0;let o,l=i;if(n)if(i)o=n[i];else{for(const[c,d]of Object.entries(n))l=c,o=d;if(!o)for(const c of Object.getOwnPropertySymbols(n)){const d=n[c];if(d){o=d;break}}}if(!r&&l&&(el(e,"getType")||(e.getType=()=>l),el(e,"clone")||(e.clone=c=>(zp(c),new e)),el(e,"importJSON")||(e.importJSON=o&&o.$importJSON||(c=>new e().updateFromJSON(c))),!el(e,"importDOM")&&o)){const{importDOM:c}=o;c&&(e.importDOM=()=>c)}const a={klass:e,ownNodeConfig:o,ownNodeType:l};return Tv.set(e,a),a}s(Da,"Wc");function*Ra(e){for(let t=e;t&&(t===Ln||Pp(t.prototype));){const n=Da(t);yield n,t=n.ownNodeConfig&&n.ownNodeConfig.extends||rb(t)}}s(Ra,"Uc");function E7(e){const t=new Map,n=new Map;for(const r of e){const{ownNodeType:i}=Da(r);i&&(n.set(i,r),t.set(i,new Set))}for(const[r,i]of n)for(const{ownNodeType:o}of Ra(i)){const l=o&&t.get(o);l&&l.add(r)}return t}s(E7,"$c");function T7(e){const t=Sr();return Ut(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}s(T7,"Hc");var ki=s((e,t)=>{let n=e;for(;n!=null&&!At(n);){if(t(n))return n;n=n.getParent()}return null},"Jc");function Yl(e,t){const n=[];let r=e.__first;for(;r!==null;){const i=t===null?rt(r):t.get(r);i??B(174),n.push(r),r=i.__next}return n}s(Yl,"jc");function rb(e){const t=Object.getPrototypeOf(e);if(typeof t=="function"&&t!==Function.prototype)return t;const n=e.prototype&&Object.getPrototypeOf(e.prototype);return n?n.constructor:null}s(rb,"Vc");var ib=new Map;function Dr(e){return F(e)||We(e)}s(Dr,"Yc");function Ui(e){return F(e)||We(e)}s(Ui,"Gc");function Yt(e){const t=e.getLatest();return Ui(t)?t.__slotHost:null}s(Yt,"Xc");function zn(e){const t=Yt(e);if(t===null)return null;const n=rt(t);return F(n)||We(n)||B(370),n}s(zn,"Qc");function ob(e){const t=zn(e);if(t===null)return null;const n=e.getLatest().__key;for(const[r,i]of kd(t))if(i===n)return r;return null}s(ob,"Zc");function sb(e){let t=e.getLatest();for(;t!==null;){if(Yt(t)!==null)return t;t=t.getParent()}return null}s(sb,"ta");function kd(e){const t=e.getLatest();return Dr(t)&&t.__slots!==null?t.__slots:ib}s(kd,"ea");function Zn(e){return Array.from(kd(e).keys())}s(Zn,"na");function Wi(e,t){const n=kd(e).get(t);return n===void 0?null:rt(n)}s(Wi,"oa");var S7=["__proto__","constructor","prototype"],Sv=Symbol("slotMapOwner");function Ph(e){let t=e.__slots;return t!==null&&t[Sv]===e||(t=new Map(t),t[Sv]=e,e.__slots=t),t}s(Ph,"sa");var wv=new WeakMap,w7=[];function lb(e){for(const{ownNodeConfig:t}of Ra(e)){const n=t&&t.slots;if(n)return n}return w7}s(lb,"aa");function ab(e){let t="";for(const n of Zn(e)){const r=Wi(e,n);r!==null&&(t+=r.getTextContent())}return t}s(ab,"ua");function kv(e,t,n){const r=n.get(e),i=n.get(t);return r!==void 0?i!==void 0?r-i:-1:i!==void 0?1:e<t?-1:e>t?1:0}s(kv,"fa");function k7(e){const t=e.__slots;if(t===null||t.size<2)return;const n=(function(l){let a=wv.get(l);if(a===void 0){const c=lb(l),d=new Map;for(const u of c)S7.includes(u)&&B(371,l.name,u),d.has(u)&&B(372,l.name,u),d.set(u,d.size);a=d,wv.set(l,a)}return a})(e.constructor);let r=null,i=!0;for(const l of t.keys()){if(r!==null&&kv(r,l,n)>0){i=!1;break}r=l}if(i)return;const o=Array.from(t).sort(([l],[a])=>kv(l,a,n));t.clear();for(const[l,a]of o)t.set(l,a)}s(k7,"da");function am(e,t,n){t!=="__proto__"&&t!=="constructor"&&t!=="prototype"||B(373,t);const r=e.getLatest();if(r.__slots!==null&&r.__slots.get(t)===n.getLatest().__key)return r;(!F(n)&&!We(n)||n.isInline())&&B(374,n.__key);const i=e.getWritable(),o=Ph(i),l=o.get(t);l!==void 0&&ub(l);const a=n.getWritable(),c=zn(a);if(c!==null){const d=ob(a);d!==null&&Ph(c.getWritable()).delete(d),a.__slotHost=null}return gr(a),a.__slotHost=i.__key,o.set(t,a.__key),k7(i),(function(){const d=Sr();d._slotsUsed=!0,d._pendingEditorState&&(d._pendingEditorState._slotsUsed=!0)})(),i}s(am,"ha");function cb(e,t){const n=e.getWritable();if(n.__slots===null)return n;const r=n.__slots.get(t);return r!==void 0&&(ub(r),Ph(n).delete(t)),n}s(cb,"ga");function ub(e){const t=rt(e);if(t===null)return;const n=t.getWritable();Ui(n)||B(377,e),n.__slotHost=null,n.remove()}s(ub,"pa");var M7={next:"previous",previous:"next"},Md=class{static{s(this,"ma")}origin;constructor(e){this.origin=e}[Symbol.iterator](){return dm({hasNext:zi,initial:this.getAdjacentCaret(),map:s(e=>e,"map"),step:s(e=>e.getAdjacentCaret(),"step")})}getAdjacentCaret(){return vt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return vt(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){const n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(n===null?this.insert(e):n.replace(e,t)),this}splice(e,t,n="next"){const r=n===this.direction?t:Array.from(t).reverse();let i=this;const o=this.getParentAtCaret(),l=new Map;for(let a=i.getAdjacentCaret();a!==null&&l.size<e;a=a.getAdjacentCaret()){const c=a.origin.getWritable();l.set(c.getKey(),c)}for(const a of r){if(l.size>0){const c=i.getNodeAtCaret();if(c){if(l.delete(c.getKey()),l.delete(a.getKey()),!(c.is(a)||i.origin.is(a))){const d=a.getParent();d&&d.is(o)&&a.remove(),c.replace(a)}}else c===null&&B(263,Array.from(l).join(" "))}else i.insert(a);i=vt(a,this.direction)}for(const a of l.values())a.remove();return this}},Fh=class db extends Md{static{s(this,"xa")}type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:ui(t,this.direction)}getParentCaret(t="root"){return vt(cm(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Qi(this.direction);return vt(this.getNodeAtCaret(),t)||ui(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof db&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}},A7={root:At,shadowRoot:Mt};function Qi(e){return M7[e]}s(Qi,"Sa");function cm(e,t="root"){return e===null||A7[t](e)?null:Yt(e)===null?e:null}s(cm,"va");var vu=class Vh extends Md{static{s(this,"Ta")}type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:vt(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return F(this.origin)?ui(this.origin,this.direction):null}getParentCaret(t="root"){return vt(cm(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Qi(this.direction);return vt(this.getNodeAtCaret(),t)||ui(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof Vh&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof Vh||t instanceof _u)&&this.direction===t.direction&&this.origin.is(t.origin)}},_u=class Bh extends Md{static{s(this,"ka")}type="text";offset;constructor(t,n){super(t),this.offset=n}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:ji(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return vt(cm(this.getParentAtCaret(),t),this.direction)}getFlipped(){return ji(this.origin,Qi(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Bh&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof vu||t instanceof Bh)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return vt(this.origin,this.direction)}};function mr(e){return e instanceof _u}s(mr,"ba");function I7(e){return e instanceof Md}s(I7,"Na");function zi(e){return e instanceof vu}s(zi,"wa");function Yn(e){return e instanceof Fh}s(Yn,"Ea");var N7={next:class extends _u{static{s(this,"next")}direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends _u{static{s(this,"previous")}direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},O7={next:class extends vu{static{s(this,"next")}direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends vu{static{s(this,"previous")}direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},D7={next:class extends Fh{static{s(this,"next")}direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends Fh{static{s(this,"previous")}direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function vt(e,t){return e?new O7[t](e):null}s(vt,"Da");function ji(e,t,n){return e?new N7[t](e,vr(e,n)):null}s(ji,"Pa");function vr(e,t,n="error"){const r=e.getTextContentSize();let i=t==="next"?r:t==="previous"?0:t;return(i<0||i>r)&&(n!=="clamp"&&UC(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}s(vr,"Fa");function Hh(e,t){return new gb(e,t)}s(Hh,"Ia");function ui(e,t){return F(e)?new D7[t](e):null}s(ui,"La");function fb(e){return e&&e.getChildCaret()||e}s(fb,"Ka");function Cs(e){return e&&fb(e.getAdjacentCaret())}s(Cs,"za");var R7=class hb{static{s(this,"Ba")}type="node-caret-range";direction;anchor;focus;constructor(t,n,r){this.anchor=t,this.focus=n,this.direction=r}getLatest(){const t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new hb(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=s(i=>{const o=this[i].getLatest();return mr(o)?(function(l,a){const{direction:c,origin:d}=l;return Hh(l,vr(d,a==="focus"?Qi(c):c)-l.offset)})(o,i):null},"t"),n=t("anchor"),r=t("focus");if(n&&r){const{caret:i}=n,{caret:o}=r;if(i.isSameNodeCaret(o))return[Hh(i,o.offset-i.offset),null]}return[n,r]}iterNodeCarets(t="root"){const n=mr(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=mr(r),o=s(l=>l.isSameNodeCaret(r)?null:Cs(l)||l.getParentCaret(t),"r");return dm({hasNext:s(l=>l!==null&&!(i&&r.isSameNodeCaret(l)),"hasNext"),initial:n.isSameNodeCaret(r)?null:o(n),map:s(l=>l,"map"),step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}},gb=class{static{s(this,"Ra")}type="slice";caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){const{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){const[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return ji(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}};function L7(e){return e instanceof gb}s(L7,"Wa");function um(e){return Ji(e,vt($n(),e.direction))}s(um,"Ua");function pb(e){return Ji(e,e)}s(pb,"$a");function Ji(e,t){return e.direction!==t.direction&&B(265),new R7(e,t,e.direction)}s(Ji,"Ha");function dm(e){const{initial:t,hasNext:n,step:r,map:i}=e;let o=t;return{[Symbol.iterator](){return this},next(){if(!n(o))return{done:!0,value:void 0};const l={done:!1,value:i(o)};return o=r(o),l}}}s(dm,"Ja");function fm(e,t){const n=yu(e.origin,t.origin);switch(n===null&&B(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{const r=e.type==="text",i=t.type==="text";return r&&i?(function(o,l){return Math.sign(o-l)})(e.offset,t.offset):e.type===t.type?0:r?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return hm(n)}}s(fm,"ja");function hm(e){const{a:t,b:n}=e,r=t.__key,i=n.__key;let o=t,l=n;for(;o&&l;o=o.getNextSibling(),l=l.getNextSibling()){if(o.__key===i)return-1;if(l.__key===r)return 1}return o===null?1:-1}s(hm,"Va");function rc(e,t){return t.is(e)}s(rc,"qa");function Mv(e){return F(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}s(Mv,"Ya");function yu(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[r,i]=Mv(e);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=Mv(t);r;i=r,r=r.getParent()){const o=n.get(r);if(o!==void 0)return o===null?(rc(e,r)||B(276),{commonAncestor:r,type:"ancestor"}):i===null?(rc(t,r)||B(277),{commonAncestor:r,type:"descendant"}):((F(o)||rc(e,o))&&(F(i)||rc(t,i))&&r.is(o.getParent())&&r.is(i.getParent())||B(278),{a:o,b:i,commonAncestor:r,type:"branch"})}return null}s(yu,"Ga");function oi(e,t){const{type:n,key:r,offset:i}=e,o=B2(e.key);return n==="text"?(Q(o)||B(266,o.getType(),r),ji(o,t,i)):(F(o)||B(267,o.getType(),r),yb(o,e.offset,t))}s(oi,"Xa");function bs(e,t){const{origin:n,direction:r}=t,i=r==="next";mr(t)?e.set(n.getKey(),t.offset,"text"):zi(t)?Q(n)?e.set(n.getKey(),vr(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(Yn(t)&&F(n)||B(268),e.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}s(bs,"Qa");function mb(e){const t=Ve(),n=_e(t)?t:l2();return El(n,e),hn(n),n}s(mb,"Za");function El(e,t){bs(e.anchor,t.anchor),bs(e.focus,t.focus)}s(El,"tu");function Kh(e){const{anchor:t,focus:n}=e,r=oi(t,"next"),i=oi(n,"next"),o=fm(r,i)<=0?"next":"previous";return Ji($r(r,o),$r(i,o))}s(Kh,"eu");function Fo(e){const{direction:t,origin:n}=e,r=vt(n,Qi(t)).getNodeAtCaret();return r?vt(r,t):ui(n.getParentOrThrow(),t)}s(Fo,"nu");function Av(e,t="root"){const n=[e];for(let r=Yn(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(Fo(r));return n}s(Av,"ou");function Ef(e){return!!e&&e.origin.isAttached()}s(Ef,"ru");function vb(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let i=t;const o=gm(e,r),l=Av(o.anchor,n),a=Av(o.focus.getFlipped(),n),c=new Set,d=[];for(const p of o.iterNodeCarets(n))if(Yn(p))c.add(p.origin.getKey());else if(zi(p)){const{origin:v}=p;F(v)&&!c.has(v.getKey())||d.push(v)}for(const p of d)p.remove();for(const p of o.getTextSlices()){if(!p)continue;const{origin:v}=p.caret,_=v.getTextContentSize(),y=Fo(vt(v,r)),x=v.getMode();if(Math.abs(p.distance)===_&&i==="removeEmptySlices"||x==="token"&&p.distance!==0)y.remove();else if(p.distance!==0){i="removeEmptySlices";let C=p.removeTextSlice();const b=p.caret.origin;if(x==="segmented"){const T=C.origin,M=Bt(T.getTextContent()).setStyle(T.getStyle()).setFormat(T.getFormat());y.replaceOrInsert(M),C=ji(M,r,C.offset)}b.is(l[0].origin)&&(l[0]=C),b.is(a[0].origin)&&(a[0]=C.getFlipped())}}let u,f;for(const p of l)if(Ef(p)){u=pr(p);break}for(const p of a)if(Ef(p)){f=pr(p);break}const h=(function(p,v,_){if(!p||!v)return null;const y=p.getParentAtCaret(),x=v.getParentAtCaret();if(!y||!x)return null;const C=y.getParents().reverse();C.push(y);const b=x.getParents().reverse();b.push(x);const T=Math.min(C.length,b.length);let M;for(M=0;M<T&&C[M]===b[M];M++);const S=s((D,L)=>{let G;for(let $=M;$<D.length;$++){const W=D[$];if(Mt(W))return;!G&&L(W)&&(G=W)}return G},"a"),E=S(C,pn),A=E&&S(b,D=>_.has(D.getKey())&&pn(D));return A&&Zn(A).length>0?null:E&&A?[E,A]:null})(u,f,c);if(h){const[p,v]=h;ui(p,"previous").splice(0,v.getChildren());let _=v.getParent();for(v.remove(!0);_&&_.isEmpty();){const y=_;_=_.getParent(),y.remove(!0)}}else if(f){const p=(function(y){if(Yn(y)){const x=y.origin;if(pn(x))return x}else{const x=y.getParentAtCaret();if(x&&pn(x))return x}return null})(f),v=p&&p.getParent(),_=p&&p.getParents().findLast(tm);if(p&&v&&!At(v)&&p.isEmpty()&&c.has(p.getKey())&&Zn(p).length===0&&(!_||c.has(_.getKey()))){p.remove(!0);let y=v;for(;y&&!At(y)&&y.isEmpty();){const x=y.getParent();if(x&&At(x)&&x.getChildrenSize()<=1)break;const C=y;y=x,C.remove(!0)}}}const g=[u,f,...l,...a].find(Ef);if(g)return pb($r(pr(g),e.direction));B(269,JSON.stringify(l.map(p=>p.origin.__key)))}s(vb,"iu");function pr(e){const t=(function(i){let o=i;for(;Yn(o);){const l=Cs(o);if(!Yn(l))break;o=l}return o})(e.getLatest()),{direction:n}=t;if(Q(t.origin))return mr(t)?t:ji(t.origin,n,n);const r=t.getAdjacentCaret();return zi(r)&&Q(r.origin)?ji(r.origin,n,Qi(n)):t}s(pr,"su");function _b(e){return mr(e)&&e.offset!==vr(e.origin,e.direction)}s(_b,"lu");function $r(e,t){return e.direction===t?e:e.getFlipped()}s($r,"cu");function gm(e,t){return e.direction===t?e:Ji($r(e.focus,t),$r(e.anchor,t))}s(gm,"au");function yb(e,t,n){let r=ui(e,"next");for(let i=0;i<t;i++){const o=r.getAdjacentCaret();if(o===null)break;r=o}return $r(r,n)}s(yb,"uu");function $7(e,t="root"){let n=0,r=e,i=Cs(r);for(;i===null;){if(n--,i=r.getParentCaret(t),!i)return null;r=i,i=Cs(r)}return i&&[i,n]}s($7,"fu");function P7(e){const{origin:t,offset:n,direction:r}=e;if(n===vr(t,r))return e.getSiblingCaret();if(n===vr(t,Qi(r)))return Fo(e.getSiblingCaret());const[i]=t.splitText(n);return Q(i)||B(281),$r(vt(i,"next"),r)}s(P7,"du");function F7(e,t){return!0}s(F7,"hu");function xb(e,{$copyElementNode:t=nm,$splitTextPointCaretNext:n=P7,rootMode:r="shadowRoot",$shouldSplit:i=F7,removeEmptyDestination:o=!1}={}){if(mr(e))return n(e);const l=e.getParentCaret(r);if(l){const{origin:a}=l;if(Yn(e)){const d=Fo(l);if(o&&a.isEmpty())return a.remove(),d;if(!a.canBeEmpty()||!i(a,"first"))return d}const c=(function(d){const u=[];for(let f=d.getAdjacentCaret();f;f=f.getAdjacentCaret())u.push(f.origin);return u})(e);(c.length>0||!o&&a.canBeEmpty()&&i(a,"last"))&&l.insert(t(a).splice(0,0,c))}return l}s(xb,"gu");function Cb(e,t,n){let r=$r(t,"next");mr(r)&&(r.offset===0?r=vt(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=vt(r.origin,"next"))),r.origin.is(e)&&(zi(r)||B(342,e.getKey(),e.getType()),r=Fo(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let i=r;i;i=xb(i,n))r=i;return mr(r)&&B(283),r.insert(e.isInline()?_n().append(e):e),$r(vt(e.getLatest(),"next"),t.direction)}s(Cb,"_u");function V7(e){return e}s(V7,"pu");function B7(...e){return e}s(B7,"yu");function H7(e,t){return[e,t]}s(H7,"mu");function K7(e){return e}s(K7,"xu");function U7(e,t){if(!t||e===t)return e;for(const n in t)if(e[n]!==t[n])return{...e,...t};return e}s(U7,"Cu");function La(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}s(La,"Su");function W7(e,...t){const n=La(...t);n.length>0&&e.classList.add(...n)}s(W7,"vu");function z7(e,...t){const n=La(...t);n.length>0&&e.classList.remove(...n)}s(z7,"Tu");function pm(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}s(pm,"ku");function j7(e,t,n){return pm(...Object.entries(t).map(([r,i])=>$p(e,r,i,n)))}s(j7,"bu");var w=M8,Uh=w.$addUpdateTag,gi=w.$applyNodeReplacement,J7=w.$assumeActiveEditor,Gi=w.$caretFromPoint,bb=w.$caretRangeFromSelection,$W=w.$cloneWithProperties,G7=w.$cloneWithPropertiesEphemeral,Wh=w.$comparePointCaretNext,nn=w.$copyNode,Eb=w.$create,PW=w.$createChildrenArray,Pr=w.$createLineBreakNode,xu=w.$createNodeSelection,Qe=w.$createParagraphNode,FW=w.$createPoint,Ad=w.$createRangeSelection,VW=w.$createRangeSelectionFromDom,mm=w.$createTabNode,yr=w.$createTextNode,Tb=w.$extendCaretToRange,ft=w.$findMatchingParent,q7=w.$formatText,BW=w.$fullReconcile,zh=w.$generateNodesFromRawText,Z7=w.$getAdjacentChildCaret,HW=w.$getAdjacentNode,KW=w.$getAdjacentSiblingOrParentSiblingCaret,UW=w.$getCaretInDirection,Tl=w.$getCaretRange,Sb=w.$getCaretRangeInDirection,Y7=w.$getCharacterOffsets,qi=w.$getChildCaret,Iv=w.$getChildCaretAtIndex,WW=w.$getChildCaretOrSelf,Id=w.$getCollapsedCaretRange,zW=w.$getCommonAncestor,jW=w.$getCommonAncestorResultBranchOrder,JW=w.$getDOMSlot,GW=w.$getDOMTextNode,Tn=w.$getDocument,jt=w.$getEditor,wb=w.$getEditorDOMRenderConfig,di=w.$getNearestNodeFromDOMNode,qW=w.$getNearestRootOrShadowRoot,Cn=w.$getNodeByKey,ZW=w.$getNodeByKeyOrThrow,YW=w.$getNodeFromDOMNode,kb=w.$getPreviousSelection,$t=w.$getRoot,ie=w.$getSelection,Xn=w.$getSiblingCaret,X7=w.$getSlot,vm=w.$getSlotFrame,XW=w.$getSlotHost,QW=w.$getSlotNameWithinHost,Q7=w.$getSlotNames,_m=w.$getState,ez=w.$getStateChange,tz=w.$getTextContent,nz=w.$getTextNodeOffset,eI=w.$getTextPointCaret,rz=w.$getTextPointCaretSlice,iz=w.$getWritableNodeState,Mb=w.$hasAncestor,oz=w.$hasUpdateTag,ym=w.$insertNodeToNearestRootAtCaret,Vs=w.$insertNodes,Es=w.$isBlockElementNode,xm=w.$isChildCaret,jn=w.$isDecoratorNode,tI=w.$isEditorState,sz=w.$isElementDOMSlot,xe=w.$isElementNode,Ab=w.$isExtendableTextPointCaret,lz=w.$isInlineElementOrDecoratorNode,az=w.$isInlineFormattable,Ib=w.$isLeafNode,cz=w.$isLexicalNode,Fr=w.$isLineBreakNode,uz=w.$isNodeCaret,He=w.$isNodeSelection,$a=w.$isParagraphNode,oe=w.$isRangeSelection,Pa=w.$isRootNode,bn=w.$isRootOrShadowRoot,nI=w.$isSelectionCapturedInDecoratorInput,Lc=w.$isShadowRootNode,Cu=w.$isSiblingCaret,dz=w.$isSlotChild,fz=w.$isSlotHost,bu=w.$isTabNode,Ne=w.$isTextNode,Cm=w.$isTextPointCaret,hz=w.$isTextPointCaretSlice,rI=w.$isTokenOrSegmented,gz=w.$isTokenOrTab,pz=w.$markSlotEditable,iI=w.$needsBlockCursorBeside,mz=w.$nodesOfType,Zi=w.$normalizeCaret,Xl=w.$normalizeSelection__EXPERIMENTAL,vz=w.$onUpdate,oI=w.$parseSerializedNode,_z=w.$removeFromParent,yz=w.$removeSlot,xz=w.$removeTextFromCaretRange,Sl=w.$rewindSiblingCaret,sI=w.$selectAll,Cz=w.$setCompositionKey,wr=w.$setDirectionFromDOM,pi=w.$setFormatFromDOM,jh=w.$setPointFromCaret,nr=w.$setSelection,Ts=w.$setSelectionFromCaretRange,bz=w.$setSlot,ps=w.$setState,lI=w.$setTextFormat,aI=w.$splitAtPointCaretNext,Ez=w.$splitNode,cI=w.$updateDOMSelection,Tz=w.$updateRangeSelectionFromCaretRange,Nb=w.ArtificialNode__DO_NOT_USE,Sz=w.BEFORE_INPUT_COMMAND,Ob=w.BLUR_COMMAND,is=w.CAN_REDO_COMMAND,os=w.CAN_UNDO_COMMAND,Nv=w.CAN_USE_BEFORE_INPUT,Nd=w.CAN_USE_DOM,uI=w.CLEAR_EDITOR_COMMAND,dI=w.CLEAR_HISTORY_COMMAND,bm=w.CLICK_COMMAND,fI=w.COLLABORATION_TAG,hI=w.COMMAND_PRIORITY_BEFORE_CRITICAL,gI=w.COMMAND_PRIORITY_BEFORE_EDITOR,wz=w.COMMAND_PRIORITY_BEFORE_HIGH,kz=w.COMMAND_PRIORITY_BEFORE_LOW,Mz=w.COMMAND_PRIORITY_BEFORE_NORMAL,Vr=w.COMMAND_PRIORITY_CRITICAL,Ie=w.COMMAND_PRIORITY_EDITOR,Ql=w.COMMAND_PRIORITY_HIGH,st=w.COMMAND_PRIORITY_LOW,Az=w.COMMAND_PRIORITY_NORMAL,Iz=w.COMPOSITION_END_COMMAND,Db=w.COMPOSITION_END_TAG,Nz=w.COMPOSITION_START_COMMAND,pI=w.COMPOSITION_START_TAG,mI=w.CONTROLLED_TEXT_INSERTION_COMMAND,Rb=w.COPY_COMMAND,vI=w.CUT_COMMAND,Lb=w.CUT_TAG,Oz=w.DEFAULT_EDITOR_DOM_CONFIG,Tf=w.DELETE_CHARACTER_COMMAND,_I=w.DELETE_LINE_COMMAND,yI=w.DELETE_WORD_COMMAND,Dz=w.DRAGEND_COMMAND,$b=w.DRAGOVER_COMMAND,Em=w.DRAGSTART_COMMAND,Pb=w.DROP_COMMAND,Fa=w.DecoratorNode,Br=w.ElementNode,Tm=w.FOCUS_COMMAND,xI=w.FORMAT_ELEMENT_COMMAND,Fb=w.FORMAT_TEXT_COMMAND,_o=w.HISTORIC_TAG,Vb=w.HISTORY_MERGE_TAG,Bb=w.HISTORY_PUSH_TAG,Eu=w.INDENT_CONTENT_COMMAND,Rz=w.INPUT_COMMAND,Ov=w.INSERT_LINE_BREAK_COMMAND,Jh=w.INSERT_PARAGRAPH_COMMAND,Hb=w.INSERT_TAB_COMMAND,ic=w.INTERNAL_$isBlock,Lz=w.IS_ALL_FORMATTING,$z=w.IS_ANDROID,Pz=w.IS_ANDROID_CHROME,Fz=w.IS_APPLE,CI=w.IS_APPLE_WEBKIT,Dv=w.IS_BOLD,Vz=w.IS_CHROME,bI=w.IS_CODE,EI=w.IS_FIREFOX,TI=w.IS_HIGHLIGHT,Rv=w.IS_IOS,Lv=w.IS_ITALIC,SI=w.IS_SAFARI,$v=w.IS_STRIKETHROUGH,Sf=w.IS_SUBSCRIPT,wf=w.IS_SUPERSCRIPT,Pv=w.IS_UNDERLINE,Kb=w.KEY_ARROW_DOWN_COMMAND,Ub=w.KEY_ARROW_LEFT_COMMAND,wI=w.KEY_ARROW_RIGHT_COMMAND,Wb=w.KEY_ARROW_UP_COMMAND,Od=w.KEY_BACKSPACE_COMMAND,Sm=w.KEY_DELETE_COMMAND,zb=w.KEY_DOWN_COMMAND,Dd=w.KEY_ENTER_COMMAND,Rd=w.KEY_ESCAPE_COMMAND,Bz=w.KEY_MODIFIER_COMMAND,jb=w.KEY_SPACE_COMMAND,wm=w.KEY_TAB_COMMAND,Jb=w.LineBreakNode,kI=w.MOVE_TO_END,MI=w.MOVE_TO_START,Hz=w.NODE_STATE_DIRECT,Kz=w.NODE_STATE_KEY,Uz=w.NODE_STATE_LATEST,Gh=w.OUTDENT_CONTENT_COMMAND,ea=w.PASTE_COMMAND,Gb=w.PASTE_TAG,km=w.ParagraphNode,AI=w.REDO_COMMAND,II=w.REMOVE_TEXT_COMMAND,qb=w.RootNode,Mm=w.SELECTION_CHANGE_COMMAND,NI=w.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,OI=w.SELECT_ALL_COMMAND,DI=w.SET_TEXT_FORMAT_COMMAND,Wz=w.SKIP_COLLAB_TAG,RI=w.SKIP_DOM_SELECTION_TAG,LI=w.SKIP_SCROLL_INTO_VIEW_TAG,Zb=w.SKIP_SELECTION_FOCUS_TAG,$I=w.TEXT_TYPE_TO_FORMAT,Yb=w.TabNode,Bs=w.TextNode,PI=w.UNDO_COMMAND,xr=w.addClassNamesToElement,Xb=w.buildImportMap,ss=w.configExtension,kr=w.createCommand,Qb=w.createEditor,zz=w.createRefCountedRegistry,jz=w.createSharedNodeState,Va=w.createState,FI=w.declarePeerDependency,Ur=w.defineExtension,VI=w.findAllLexicalElementsDeep,BI=w.flipDirection,eE=w.getActiveElement,HI=w.getActiveElementDeep,KI=w.getComposedEventTarget,Jz=w.getComposedStaticRange,Gz=w.getDOMOwnerDocument,Ba=w.getDOMSelection,qz=w.getDOMSelectionFromTarget,UI=w.getDOMSelectionPoints,Zz=w.getDOMSelectionRange,Yz=w.getDOMSelectionRangeAndPoints,WI=w.getDOMShadowRoots,Xz=w.getDOMTextNode,Qz=w.getDeclaredSlots,tE=w.getEditorPropertyFromDOMNode,zI=w.getNearestEditorFromDOMNode,nE=w.getParentElement,ej=w.getRegisteredNode,tj=w.getRegisteredNodeOrThrow,nj=w.getRegisteredSubtypeMap,jI=w.getRootOwnerDocument,rj=w.getStaticNodeConfig,Fv=w.getStyleObjectFromCSS,ij=w.getTextDirection,oj=w.getTransformSetFromKlass,Tu=w.isBlockDomNode,sj=w.isCurrentlyReadOnlyMode,lj=w.isDOMCapturingSelection,rE=w.isDOMDocumentNode,JI=w.isDOMNode,GI=w.isDOMShadowRoot,Ld=w.isDOMTextNode,aj=w.isDOMUnmanaged,Vv=w.isDocumentFragment,cj=w.isExactShortcutMatch,iE=w.isHTMLAnchorElement,Ke=w.isHTMLElement,uj=w.isHTMLTableCellElement,dj=w.isHTMLTableRowElement,qh=w.isInlineDomNode,qI=w.isLastChildInBlockNode,oE=w.isLexicalEditor,fj=w.isModifierMatch,ZI=w.isOnlyChildInBlockNode,hj=w.isSelectionCapturedInDecoratorInput,YI=w.isSelectionWithinEditor,gj=w.iterStaticNodeConfigChain,pj=w.makeStepwiseIterator,It=w.mergeRegister,mj=w.mountSlotContainer,wl=w.normalizeClassNames,XI=w.registerEventListener,Zh=w.registerEventListeners,$d=w.removeClassNamesFromElement,vj=w.removeFromParent,_j=w.resetRandomKey,Vo=w.safeCast,$c=w.setDOMStyleFromCSS,yj=w.setDOMStyleObject,xj=w.setDOMUnmanaged,Hs=w.setNodeIndentFromDOM,Pd=w.shallowMergeConfig,Cj=w.stopLexicalPropagation,bj=w.toggleTextFormatType,QI=w.tokenizeRawText,Ej=w.unmountSlotContainer;function e6(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}s(e6,"B$1");function sE(e){const t=jt().getElementByKey(e.getKey());if(t===null)return null;const n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}s(sE,"R");function lE(e){return sE(Pa(e)?e:e.getParentOrThrow())}s(lE,"O$1");function oc(e){const t=lE(e);return t!==null&&t.direction==="rtl"}s(oc,"_");function aE(e,t,n="self"){const r=e.getStartEndPoints();if(t.isSelected(e)&&!rI(t)&&r!==null){const[i,o]=r,l=e.isBackward(),a=i.getNode(),c=o.getNode(),d=t.is(a),u=t.is(c);if(d||u){const[f,h]=Y7(e),g=a.is(c),p=t.is(l?c:a),v=t.is(l?a:c);let _,y=0;g?(y=f>h?h:f,_=f>h?f:h):p?(y=l?h:f,_=void 0):v&&(y=0,_=l?f:h);const x=t.__text.slice(y,_);x!==t.__text&&(n==="clone"&&(t=G7(t)),t.__text=x)}}return t}s(aE,"L$1");function Bv(e){if(e.type==="text")return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return xe(t)||e6(177),e.offset===t.getChildrenSize()}s(Bv,"M$1");function t6(e,t){const n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}s(t6,"W");function n6(e,t,n){let r=Gi(e,n);if(Ab(r))return!1;for(;r;r=r.getParentCaret()){const i=r.getParentAtCaret();if(!i||r.getNodeAtCaret())return!1;if(t.is(i))return!0}return!1}s(n6,"X$2");function r6(e,t,n=t6){if(!e)return;const r=e.getStartEndPoints();let i=!1,o=null;const l=new Map;if(r){const[a,c]=r,d=ft(a.getNode(),ic);o=ft(c.getNode(),ic);const u=e.isBackward()?"previous":"next";i=xe(o)&&!o.is(d)&&(function(f,h,g){const p=f.getNode();return(!xe(p)||!p.isEmpty())&&n6(f,h,g)})(c,o,BI(u)),xe(d)&&l.set(d.getKey(),d),xe(o)&&!i&&l.set(o.getKey(),o)}for(const a of e.getNodes())if(xe(a)&&ic(a)){if(i&&a.is(o))continue;l.set(a.getKey(),a)}else if(!r){const c=ft(a,ic);xe(c)&&l.set(c.getKey(),c)}for(const a of l.values()){const c=t();n(a,c),a.replace(c,!0)}}s(r6,"q$1");function cE(e){const t=uE(e);return t!==null&&t.writingMode==="vertical-rl"}s(cE,"Z$2");function uE(e){const t=e.anchor.getNode();return xe(t)?sE(t):lE(t)}s(uE,"ee$2");function Hv(e,t){let n=cE(e)?!t:t;dE(e)&&(n=!n);const r=Gi(e.focus,n?"previous":"next");if(Ab(r))return!1;if(Cm(r)&&!bu(r.origin)&&r.origin.isUnmergeable()){const i=r.getNodeAtCaret();if(Ne(i)&&!bu(i))return!0}for(const i of Tb(r)){if(xm(i))return!i.origin.isInline();if(!xe(i.origin)){if(jn(i.origin))return!0;break}}return!1}s(Hv,"te$2");function i6(e,t,n,r){e.modify(t?"extend":"move",n,r)}s(i6,"ne$1");function dE(e){const t=uE(e);return t!==null&&t.direction==="rtl"}s(dE,"oe$1");function Kv(e,t,n){const r=dE(e);let i;i=cE(e)||r?!n:n,i6(e,t,i,"character")}s(Kv,"le$2");function o6(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}s(o6,"Z$1");function fE(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}s(fE,"_t$4");function hE(e){const t=ft(e,n=>xe(n)&&!n.isInline());return xe(t)||o6(4,e.__key),t}s(hE,"It$3");function gE(e){const t=ie()||kb();let n;if(oe(t))n=Gi(t.focus,"next");else{if(t!=null){const l=t.getNodes(),a=l[l.length-1];a&&(n=Xn(a,"next"))}n=n||qi($t(),"previous").getFlipped().insert(Qe())}const r=ym(e,n),i=Z7(r),o=xm(i)?Zi(i):r;return Ts(Id(o)),e.getLatest()}s(gE,"Bt$3");function Am(e,t){const n=t();return e.replace(n),n.append(e),n}s(Am,"Tt$6");function ti(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}s(ti,"Mt$4");function sc(e){let t=null;if(ti(e,DragEvent)?t=e.dataTransfer:ti(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),i]}s(sc,"Ft$4");function Yh(e){const t=ie();if(!oe(t))return!1;const n=new Set,r=t.getNodes();for(let i=0;i<r.length;i++){const o=r[i],l=o.getKey();if(n.has(l))continue;const a=ft(o,d=>xe(d)&&!d.isInline());if(a===null)continue;const c=a.getKey();a.canIndent()&&!n.has(c)&&(n.add(c),e(a))}return n.size>0}s(Yh,"$t$6");var kf=!(EI||!Nd)&&void 0;function s6(e,t=!1){let n=1;if((function(){if(kf===void 0){const r=document.createElement("div");r.style.position="absolute",r.style.opacity="0",r.style.width="100px",r.style.left="-1000px",document.body.appendChild(r);const i=r.getBoundingClientRect();r.style.setProperty("zoom","2"),kf=r.getBoundingClientRect().width===i.width,document.body.removeChild(r)}return kf})()||t){const r=e&&e.ownerDocument.defaultView||window;for(;e;)n*=Number(r.getComputedStyle(e).getPropertyValue("zoom")),e=nE(e)}return n}s(s6,"Ut$4");var l6=Symbol.for("preact-signals");function Fd(){if(si>1)return void si--;let e,t=!1;for((function(){let n=Su;for(Su=void 0;n!==void 0;)n.S.v===n.v&&(n.S.i=n.i),n=n.o})();kl!==void 0;){let n=kl;for(kl=void 0,wu++;n!==void 0;){const r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&mE(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(wu=0,si--,t)throw e}s(Fd,"$t$5");function pE(e){if(si>0)return e();Xh=++a6,si++;try{return e()}finally{Fd()}}s(pE,"Tt$5");var Ze,kl;function Uv(e){const t=Ze;Ze=void 0;try{return e()}finally{Ze=t}}s(Uv,"Ut$3");var Su,si=0,wu=0,a6=0,Xh=0,Pc=0;function Wv(e){if(Ze===void 0)return;let t=e.n;return t===void 0||t.t!==Ze?(t={i:0,S:e,p:Ze.s,n:void 0,t:Ze,e:void 0,x:void 0,r:t},Ze.s!==void 0&&(Ze.s.n=t),Ze.s=t,e.n=t,32&Ze.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Ze.s,t.n=void 0,Ze.s.n=t,Ze.s=t),t):void 0}s(Wv,"Ht$2");function an(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}s(an,"Xt$1");function ta(e,t){return new an(e,t)}s(ta,"Yt$1");function mE(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}s(mE,"qt$2");function zv(e){for(let t=e.s;t!==void 0;t=t.n){const n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}s(zv,"Qt");function vE(e){let t,n=e.s;for(;n!==void 0;){const r=n.p;n.i===-1?(n.S.U(n),r!==void 0&&(r.n=n.n),n.n!==void 0&&(n.n.p=r)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=r}e.s=t}s(vE,"te$1");function Wo(e,t){an.call(this,void 0),this.x=e,this.s=void 0,this.g=Pc-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}s(Wo,"ee$1");function _E(e){const t=e.m;if(e.m=void 0,typeof t=="function"){si++;const n=Ze;Ze=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Im(e),r}finally{Ze=n,Fd()}}}s(_E,"ie$2");function Im(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,_E(e)}s(Im,"oe");function c6(e){if(Ze!==this)throw new Error("Out-of-order effect");vE(this),Ze=e,this.f&=-2,8&this.f&&Im(this),Fd()}s(c6,"se$2");function Xo(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}s(Xo,"re$2");function Bo(e,t){const n=new Xo(e,t);try{n.c()}catch(i){throw n.d(),i}const r=n.d.bind(n);return r[Symbol.dispose]=r,r}s(Bo,"ce$1");function Ha(e,t={}){const n={};for(const r in e){const i=t[r];n[r]=ta(i===void 0?e[r]:i)}return n}s(Ha,"ae$1");an.prototype.brand=l6,an.prototype.h=function(){return!0},an.prototype.S=function(e){const t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t!==void 0?t.e=e:Uv(()=>{var n;(n=this.W)==null||n.call(this)}))},an.prototype.U=function(e){if(this.t!==void 0){const t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&Uv(()=>{var r;(r=this.Z)==null||r.call(this)}))}},an.prototype.subscribe=function(e){return Bo(()=>{const t=this.value,n=Ze;Ze=void 0;try{e(t)}finally{Ze=n}},{name:"sub"})},an.prototype.valueOf=function(){return this.value},an.prototype.toString=function(){return this.value+""},an.prototype.toJSON=function(){return this.value},an.prototype.peek=function(){const e=Ze;Ze=void 0;try{return this.value}finally{Ze=e}},Object.defineProperty(an.prototype,"value",{get(){const e=Wv(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(wu>100)throw new Error("Cycle detected");(function(t){si!==0&&wu===0&&t.l!==Xh&&(t.l=Xh,Su={S:t,v:t.v,i:t.i,o:Su})})(this),this.v=e,this.i++,Pc++,si++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Fd()}}}}),Wo.prototype=new an,Wo.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Pc))return!0;if(this.g=Pc,this.f|=1,this.i>0&&!mE(this))return this.f&=-2,!0;const e=Ze;try{zv(this),Ze=this;const t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return Ze=e,vE(this),this.f&=-2,!0},Wo.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let t=this.s;t!==void 0;t=t.n)t.S.S(t)}an.prototype.S.call(this,e)},Wo.prototype.U=function(e){if(this.t!==void 0&&(an.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Wo.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Wo.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=Wv(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Xo.prototype.c=function(){const e=this.S();try{if(8&this.f||this.x===void 0)return;const t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}},Xo.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,_E(this),zv(this),si++;const e=Ze;return Ze=this,c6.bind(this,e)},Xo.prototype.N=function(){2&this.f||(this.f|=2,this.u=kl,kl=this)},Xo.prototype.d=function(){this.f|=8,1&this.f||Im(this)},Xo.prototype.dispose=function(){this.d()};function u6(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}s(u6,"ve$1");function d6(e,t){let n;return ta(e(),{unwatched(){n&&(n(),n=void 0)},watched(){this.value=e(),n=t(this)}})}s(d6,"Ce$1");function tt(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}s(tt,"Ie$2");var yE;try{yE="0.48.0+prod.esm"}catch{}var f6=yE??'"<unknown>+source"',h6=new Set(["__proto__","constructor","prototype"]);function xE(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const n=e,r=t;for(const i in r)!h6.has(i)&&Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=xE(n[i],r[i]));return e}return t}s(xE,"ke$2");var Nm=0,Qh=1,CE=2,Mf=3,lc=4,zo=5,Af=6,tl=7;function If(e){return e.id===Nm}s(If,"Ue$2");function bE(e){return e.id===CE}s(bE,"We$2");function g6(e){return(function(t){return t.id===Qh})(e)||tt(305,String(e.id),String(Qh)),Object.assign(e,{id:CE})}s(g6,"Be$2");var p6=new Set,m6=class{static{s(this,"Ge$1")}builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:Nm}}mergeConfigs(){let e=this.extension.config||{};const t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Pd;for(const n of this.configs)e=t(e,n);return e}init(e){const t=this.state;bE(t)||tt(306,String(t.id));const n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=(function(l,a,c){return Object.assign(l,{config:a,id:Mf,registerState:c})})(t,this.mergeConfigs(),n);let o;this.state=i,this.extension.init&&(o=this.extension.init(e,i.config,n)),this.state=(function(l,a,c){return Object.assign(l,{id:lc,initResult:a,registerState:c})})(i,o,r)}build(e){const t=this.state;let n;t.id!==lc&&tt(307,String(t.id),String(zo)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));const r={...t.registerState,getOutput:s(()=>n,"getOutput"),getSignal:this.getSignal.bind(this)};this.state=(function(i,o,l){return Object.assign(i,{id:zo,output:o,registerState:l})})(t,n,r)}register(e,t){this._signal=t;const n=this.state;n.id!==zo&&tt(308,String(n.id),String(zo));const r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=(function(i){return Object.assign(i,{id:Af})})(n),()=>{const i=this.state;i.id!==tl&&tt(309,String(n.id),String(tl)),this.state=(function(o){return Object.assign(o,{id:zo})})(i),r&&r()}}afterRegistration(e){const t=this.state;let n;return t.id!==Af&&tt(310,String(t.id),String(Af)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=(function(r){return Object.assign(r,{id:tl})})(t),n}getSignal(){return this._signal===void 0&&tt(311),this._signal}getInitResult(){this.extension.init===void 0&&tt(312,this.extension.name);const e=this.state;return(function(t){return t.id>=lc})(e)||tt(313,String(e.id),String(lc)),e.initResult}getInitPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){const e=this.state;return(function(t){return t.id>=Mf})(e)||tt(314,String(e.id),String(Mf)),{config:e.config}}getPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){const t=this.builder.getExtensionRep(e);return t===void 0&&tt(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){const t=this.builder.getExtensionRep(e);return t===void 0&&tt(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){const e=this.state;return(function(t){return t.id>=tl})(e)||tt(316,String(e.id),String(tl)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||p6}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([t])=>t)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){const e=this.state;(function(t){return t.id>=zo})(e)||tt(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},jv={tag:Vb};function v6(){const e=$t();e.isEmpty()&&e.append(Qe())}s(v6,"Je$2");var EE=Ur({config:Vo({setOptions:jv,updateOptions:jv}),init:s(({$initialEditorState:e=v6})=>({$initialEditorState:e,initialized:!1}),"init"),afterRegistration(e,{updateOptions:t,setOptions:n},r){const i=r.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:o}=i;if(tI(o))e.setEditorState(o,n);else if(typeof o=="function")e.update(()=>{o(e)},t);else if(o&&(typeof o=="string"||typeof o=="object")){const l=e.parseEditorState(o);e.setEditorState(l,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[qb,Bs,Jb,Yb,km]}),Jv=Symbol.for("@lexical/extension/LexicalBuilder");function _6(...e){return Ka.fromExtensions(e).buildEditor()}s(_6,"Ye$1");function Gv(){}s(Gv,"qe$2");function y6(e){throw e}s(y6,"Qe$1");function ac(e){return Array.isArray(e)?e:[e]}s(ac,"tn$1");var Nf=f6,Ka=class Fc{static{s(this,"nn$1")}roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(t){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=Nf,this.roots=t;for(const n of t)this.addExtension(n)}static fromExtensions(t){const n=[ac(EE)];for(const r of t)n.push(ac(r));return new Fc(n)}static maybeFromEditor(t){const n=t[Jv];return n&&(n.PACKAGE_VERSION!==Nf&&tt(292,n.PACKAGE_VERSION,Nf),n instanceof Fc||tt(293)),n}static fromEditor(t){const n=Fc.maybeFromEditor(t);return n===void 0&&tt(294),n}constructEditor(){const{$initialEditorState:t,onError:n,onWarn:r,...i}=this.buildCreateEditorArgs(),o=Object.assign(Qb({...i,...n?{onError:s(l=>{n(l,o)},"onError")}:{},...r?{onWarn:s(l=>{r(l,o)},"onWarn")}:{}}),{[Jv]:this});for(const l of this.sortedExtensionReps())l.build(o);return o}buildEditor(){let t=Gv;function n(){try{t()}finally{t=Gv}}s(n,"e");const r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return t=It(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(t){return this.extensionNameMap.has(t)}getExtensionRep(t){const n=this.extensionNameMap.get(t.name);if(n)return n.extension!==t&&tt(295,t.name),n}addEdge(t,n,r){const i=this.outgoingConfigEdges.get(t);i?i.set(n,r):this.outgoingConfigEdges.set(t,new Map([[n,r]]));const o=this.incomingEdges.get(n);o?o.add(t):this.incomingEdges.set(n,new Set([t]))}addExtension(t){this._sortedExtensionReps!==void 0&&tt(296);const[n]=ac(t);typeof n.name!="string"&&tt(297,typeof n.name);let r=this.extensionNameMap.get(n.name);if(r!==void 0&&r.extension!==n&&tt(298,n.name),!r){r=new m6(this,n),this.extensionNameMap.set(n.name,r);const i=this.conflicts.get(n.name);typeof i=="string"&&tt(299,n.name,i);for(const o of n.conflictsWith||[])this.extensionNameMap.has(o)&&tt(299,n.name,o),this.conflicts.set(o,n.name);for(const o of n.dependencies||[]){const l=ac(o);this.addEdge(n.name,l[0].name,l.slice(1)),this.addExtension(l)}for(const[o,l]of n.peerDependencies||[])this.addEdge(n.name,o,l?[l]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],n=s((r,i)=>{let o=r.state;if(bE(o))return;const l=r.extension.name;var a;If(o)||tt(300,l,i||"[unknown]"),If(a=o)||tt(304,String(a.id),String(Nm)),o=Object.assign(a,{id:Qh}),r.state=o;const c=this.outgoingConfigEdges.get(l);if(c)for(const d of c.keys()){const u=this.extensionNameMap.get(d);u&&n(u,l)}o=g6(o),r.state=o,t.push(r)},"e");for(const r of this.extensionNameMap.values())If(r.state)&&n(r);for(const r of t)for(const[i,o]of this.outgoingConfigEdges.get(r.extension.name)||[])if(o.length>0){const l=this.extensionNameMap.get(i);if(l)for(const a of o)l.configs.add(a)}for(const[r,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(r.name);o===void 0&&tt(301,r.name);for(const l of i)o.configs.add(l)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const n=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],o=r.signal;for(const l of n){const a=l.register(t,o);a&&i.push(a)}for(const l of n){const a=l.afterRegistration(t);a&&i.push(a)}return It(...i)}buildCreateEditorArgs(){const t={},n=new Set,r=new Map,i=new Map,o={},l={},a=this.sortedExtensionReps();for(const u of a){const{extension:f}=u;if(f.onError!==void 0&&(t.onError=f.onError),f.onWarn!==void 0&&(t.onWarn=f.onWarn),f.disableEvents!==void 0&&(t.disableEvents=f.disableEvents),f.parentEditor!==void 0&&(t.parentEditor=f.parentEditor),f.editable!==void 0&&(t.editable=f.editable),f.namespace!==void 0&&(t.namespace=f.namespace),f.$initialEditorState!==void 0&&(t.$initialEditorState=f.$initialEditorState),f.nodes)for(const h of u6(f)){if(typeof h!="function"){const g=r.get(h.replace);g&&tt(302,f.name,h.replace.name,g.extension.name),r.set(h.replace,u)}n.add(h)}if(f.html){if(f.html.export)for(const[h,g]of f.html.export.entries())i.set(h,g);f.html.import&&Object.assign(o,f.html.import)}f.theme&&xE(l,f.theme)}Object.keys(l).length>0&&(t.theme=l),n.size&&(t.nodes=[...n]);const c=Object.keys(o).length>0,d=i.size>0;(c||d)&&(t.html={},c&&(t.html.import=o),d&&(t.html.export=i));for(const u of a)u.init(t);return t.onError||(t.onError=y6),t}};function x6(e,t){const n=Ka.fromEditor(e).getExtensionRep(t);return n===void 0&&tt(303,t.name),n.getExtensionDependency()}s(x6,"on$1");function eo(e,t){const n=Ka.maybeFromEditor(e);if(!n)return;const r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}s(eo,"sn");function C6(e){return eo(jt(),e)}s(C6,"dn");var TE=kr("INSERT_HORIZONTAL_RULE_COMMAND"),Ua=class SE extends Fa{static{s(this,"hn")}static getType(){return"horizontalrule"}static clone(t){return new SE(t.__key)}static importJSON(t){return Vd().updateFromJSON(t)}static importDOM(){return{hr:s(()=>({conversion:b6,priority:0}),"hr")}}exportDOM(){return{element:Tn().createElement("hr")}}createDOM(t){const n=Tn().createElement("hr");return xr(n,t.theme.hr),n}getTextContent(){return`
13
+ `}isInline(){return!1}updateDOM(){return!1}};function b6(){return{node:Vd()}}s(b6,"gn");function Vd(){return Eb(Ua)}s(Vd,"pn");function wE(e){return e instanceof Ua}s(wE,"mn$1");var E6=Ur({build:s((e,t)=>Ha({inheritEditableFromParent:t.inheritEditableFromParent}),"build"),config:Vo({$getParentEditor:s(function(){const e=jt();return Ka.fromEditor(e),e},"$getParentEditor"),inheritEditableFromParent:!1}),init:s((e,t,n)=>{const r=t.$getParentEditor();e.parentEditor=r,e.theme=e.theme||r._config.theme},"init"),name:"@lexical/extension/NestedEditor",register:s((e,t,n)=>Bo(()=>{const r=e._parentEditor;if(r&&n.getOutput().inheritEditableFromParent.value)return e.setEditable(r.isEditable()),r.registerEditableListener(e.setEditable.bind(e))}),"register")}),T6=new Set([Zb,LI]),Tj=Ur({build:s((e,t,n)=>Ha(t),"build"),config:Vo({$fixFocusOverselection:s(function(){const e=ie();if(oe(e)&&!e.isCollapsed()){const t=Sb(bb(e),"next");let n=t.focus;for(Cm(n)&&t.anchor.origin!==n.origin&&n.offset===0&&(n=Sl(n.getSiblingCaret())),Cu(n)&&t.anchor.origin!==n.origin&&Fr(n.origin)&&(n=Sl(n));xm(n)&&t.anchor.origin!==n.origin;)n=Sl(Xn(n.origin,"next"));if(Cu(n)&&xe(n.origin)&&(n=Zi(qi(n.origin,"previous")).getFlipped()),n=Zi(n),!n.isSamePointCaret(t.focus)){const r=Ts(Tl(t.anchor,n)),i=jt().getRootElement(),o=i&&Ba(i.ownerDocument.defaultView);o&&cI(kb(),r,jt(),o,T6,i)}}},"$fixFocusOverselection"),dateNow:Date.now,disabled:!1,thresholdMsec:100}),name:"@lexical/NormalizeTripleClickSelection",register:s((e,t,n)=>Bo(()=>{const r=n.getOutput();if(!r.disabled.value)return e.registerRootListener(i=>{if(!i)return;let o=0;const l=s(a=>{if(a?a.detail===3:o>0){const c=r.dateNow.peek()();o=a&&a.type==="mousedown"||c-o<=r.thresholdMsec.peek()?c:0}return o},"o");return It(e.registerCommand(Mm,()=>(l(null)&&(o=0,r.$fixFocusOverselection.peek()()),!1),hI),Zh(i,{mousedown:l,mouseup:l},!0))})}),"register")});function S6(e){return e.canIndent()}s(S6,"Fn");function w6(e,t,n=S6){return It(e.registerCommand(wm,r=>{const i=ie();if(!oe(i))return!1;r.preventDefault();const o=(function(l){if(l.getNodes().filter(h=>Es(h)&&h.canIndent()).length>0)return!0;const a=l.anchor,c=l.focus,d=c.isBefore(a)?c:a,u=d.getNode(),f=hE(u);if(f.canIndent()){const h=f.getKey();let g=Ad();if(g.anchor.set(h,0,"element"),g.focus.set(h,0,"element"),g=Xl(g),g.anchor.is(d))return!0}return!1})(i)?r.shiftKey?Gh:Eu:Hb;return e.dispatchCommand(o,void 0)},Ie),e.registerCommand(Eu,()=>{const r=typeof t=="number"?t:t?t.peek():null,i=ie();if(!oe(i))return!1;const o=typeof n=="function"?n:n.peek();return Yh(l=>{if(o(l)){const a=l.getIndent()+1;(!r||a<r)&&l.setIndent(a)}})},Vr))}s(w6,"Mn$1");function k6(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;const o=t._selection,l=e._selection;if(i)return 1;if(!(oe(o)&&oe(l)&&l.isCollapsed()&&o.isCollapsed()))return 0;const a=(function(y,x,C){const b=y._nodeMap,T=[];for(const M of x){const S=b.get(M);S!==void 0&&T.push(S)}for(const[M,S]of C){if(!S)continue;const E=b.get(M);E===void 0||Pa(E)||T.push(E)}return T})(t,n,r);if(a.length===0)return 0;if(a.length>1){const y=t._nodeMap,x=y.get(o.anchor.key),C=y.get(l.anchor.key);return x&&C&&!e._nodeMap.has(x.__key)&&Ne(x)&&x.__text.length===1&&o.anchor.offset===1?2:0}const c=a[0],d=e._nodeMap.get(c.__key);if(!Ne(d)||!Ne(c)||d.__mode!==c.__mode)return 0;const u=d.__text,f=c.__text;if(u===f)return 0;const h=o.anchor,g=l.anchor;if(h.key!==g.key||h.type!=="text")return 0;const p=h.offset,v=g.offset,_=f.length-u.length;return _===1&&v===p-1?2:_===-1&&v===p+1?3:_===-1&&v===p?4:0}s(k6,"E$1");function M6(e,t,n){let r=n(),i=0,o=r,l=0,a=null;return(c,d,u,f,h,g)=>{const p=n();if(g.has(pI)&&(o=r,l=i,a=c),g.has(_o))return i=0,r=p,2;g.has(Db)&&a&&(r=o,i=l,c=a);const v=g.has(Gb)||g.has(Lb)?0:k6(c,d,f,h,e.isComposing()),_=(()=>{const y=u===null||u.editor===e,x=g.has(Bb);if(!x&&y&&g.has(Vb))return 0;if(v===1)return 2;if(c===null)return 1;const C=d._selection;if(!(f.size>0||h.size>0))return C!==null?0:2;const b=typeof t=="number"?t:t.peek();return x===!1&&v!==0&&v===i&&p<r+b&&y||f.size===1&&(function(T,M,S){const E=M._nodeMap.get(T),A=S._nodeMap.get(T),D=M._selection,L=S._selection;return!(oe(D)&&oe(L)&&D.anchor.type==="element"&&D.focus.type==="element"&&L.anchor.type==="text"&&L.focus.type==="text"||!Ne(E)||!Ne(A)||E.__parent!==A.__parent)&&JSON.stringify(M.read(()=>E.exportJSON()))===JSON.stringify(S.read(()=>A.exportJSON()))})(Array.from(f)[0],c,d)?0:1})();return r=p,i=v,_}}s(M6,"D");function qv(e,t){e.undoStack=[],e.redoStack=[],e.current=null,t&&t(e)}s(qv,"M");function A6(e,t,n,r=Date.now,i,o=null){const l=M6(e,n,r),a=s(()=>{i&&i(t)},"m");return a(),It(e.registerCommand(PI,()=>((function(c,d,u){const f=d.redoStack,h=d.undoStack;if(h.length!==0){const g=d.current,p=h.pop();g!==null&&(f.push(g),c.dispatchCommand(is,!0)),h.length===0&&c.dispatchCommand(os,!1),d.current=p||null,u&&u(d),p&&p.editor.setEditorState(p.editorState,{tag:_o})}})(e,t,i),!0),Ie),e.registerCommand(AI,()=>((function(c,d,u){const f=d.redoStack,h=d.undoStack;if(f.length!==0){const g=d.current;g!==null&&(h.push(g),c.dispatchCommand(os,!0));const p=f.pop();f.length===0&&c.dispatchCommand(is,!1),d.current=p||null,u&&u(d),p&&p.editor.setEditorState(p.editorState,{tag:_o})}})(e,t,i),!0),Ie),e.registerCommand(uI,()=>(qv(t,i),!1),Ie),e.registerCommand(dI,()=>(qv(t,i),e.dispatchCommand(is,!1),e.dispatchCommand(os,!1),!0),Ie),e.registerUpdateListener(({editorState:c,prevEditorState:d,dirtyLeaves:u,dirtyElements:f,tags:h})=>{const g=t.current,p=t.redoStack,v=t.undoStack,_=g===null?null:g.editorState;if(g!==null&&c===_)return;const y=l(d,c,g,u,f,h);if(y===1){if(p.length!==0&&(t.redoStack=[],e.dispatchCommand(is,!1)),g!==null){v.push({...g});const x=typeof o=="number"||o===null?o:o.peek();x!==null&&v.length>x&&v.splice(0,v.length-x),e.dispatchCommand(os,!0)}}else if(y===2)return;t.current={editor:e,editorState:c},a()}))}s(A6,"O");function Om(){return{current:null,redoStack:[],undoStack:[]}}s(Om,"z");var ms=Ur({build:s((e,{delay:t,createInitialHistoryState:n,disabled:r,maxDepth:i,now:o},l)=>({...Ha({delay:t,disabled:r,historyState:n(e),maxDepth:i,now:o}),...l.getInitResult()}),"build"),config:Vo({createInitialHistoryState:Om,delay:300,disabled:typeof window>"u",maxDepth:null,now:Date.now}),init:s(()=>({canRedo:ta(!1),canUndo:ta(!1)}),"init"),name:"@lexical/history/History",register:s((e,t,n)=>{const{canUndo:r,canRedo:i}=n.getInitResult(),o=n.getOutput(),l=s(a=>pE(()=>{r.value=a!=null&&a.undoStack.length>0,i.value=a!=null&&a.redoStack.length>0}),"s");return Bo(()=>{if(!o.disabled.value)return A6(e,o.historyState.value,o.delay,()=>o.now.peek()(),l,o.maxDepth);l(null)})},"register")}),I6=Ur({build:s((e,{disabled:t,parentEditor:n})=>Ha({disabled:t,parentEditor:n||e._parentEditor}),"build"),config:Vo({disabled:!1,parentEditor:null}),dependencies:[ss(ms,{disabled:!0})],name:"@lexical/history/SharedHistory",register:s((e,t,n)=>Bo(()=>{const{disabled:r,parentEditor:i}=n.getOutput();if(!r.value){const{output:o}=n.getDependency(ms),l=(function(c){return c?eo(c,ms.name):null})(i.value);if(!l)return;const a=l.output;pE(()=>{o.delay.value=a.delay.value,o.historyState.value=a.historyState.value,o.now.value=a.now.value,o.disabled.value=a.disabled.value})}}),"register")});function Ks(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}s(Ks,"nt$3");var vs;function kE(e,t){const{key:n}=t;return e&&n in e?e[n]:t.defaultValue}s(kE,"rt$3");function ME(e){return vs&&vs.editor===e?vs:void 0}s(ME,"st$3");function N6(e,t){if("cfg"in t){const{cfg:n,updater:r}=t;return[n,r(kE(e,n))]}return t}s(N6,"ct$2");function O6(e,t){let n=t;for(const r of e){const[i,o]=N6(n,r),l=i.key;if(n===t&&kE(n,i)===o)continue;const a=n===t||n===void 0?D6(t):n;a[l]=o,n=a}return n}s(O6,"lt$3");function D6(e){return Object.create(e||null)}s(D6,"ut$2");function AE(e,t){return[e,t]}s(AE,"ft$2");function R6(e,t,n,r=jt()){const i=vs,o=ME(r);try{return vs={...o,editor:r,[e]:t},n()}finally{vs=i}}s(R6,"dt$4");function IE(e,t=()=>{}){return(n,r=jt())=>i=>{const o=ME(r),l=o&&o[e],a=O6(n,l||t(r));return a&&a!==l?R6(e,a,i,r):i()}}s(IE,"pt$3");function NE(e,t,n,r){return Object.assign(Va(Symbol(t),{isEqual:r,parse:n}),{[e]:!0})}s(NE,"ht$3");function L6(e){if(!rE(e))return;const t=e;if(t.querySelector("style")===null)return;const n=new Map;function r(i){let o=n.get(i);if(o===void 0){o=new Set;for(let l=0;l<i.style.length;l++)o.add(i.style[l]);n.set(i,o)}return o}s(r,"s");try{for(const i of Array.from(t.styleSheets)){let o;try{o=i.cssRules}catch{continue}for(const l of Array.from(o)){if(!ti(l,CSSStyleRule))continue;let a;try{a=t.querySelectorAll(l.selectorText)}catch{continue}for(const c of Array.from(a)){if(!Ke(c))continue;const d=r(c);for(let u=0;u<l.style.length;u++){const f=l.style[u];d.has(f)||c.style.setProperty(f,l.style.getPropertyValue(f),l.style.getPropertyPriority(f))}}}}}catch{}}s(L6,"mt$4");var OE="@lexical/html/DOM",DE=Symbol.for("@lexical/html/DOMExportContext"),$6="@lexical/html/DOMImport",RE=Symbol.for("@lexical/html/DOMImportContext");function P6(e,t,n){return NE(DE,e,t,n)}s(P6,"Ct$4");var F6=P6("isExport",Boolean);function V6(e){const t=eo(e,OE);return t?t.output.defaults:void 0}s(V6,"Dt$4");function B6(e){const t=eo(e,OE);return t?t.output.runtime:void 0}s(B6,"Ot$5");function H6(e=jt()){const t=B6(e);return t?t.getSessionConfig():wb(e)}s(H6,"Nt$5");var K6=IE(DE,V6),Bd=Symbol.for("@lexical/html/SelectorImpl");function na(e,t){const n={kind:"element",predicate:(r=t,r.length===0?Ke:r.length===1?r[0]:(o,l)=>{for(const a of r)if(!a(o,l))return!1;return!0}),tags:e};var r;const i=s(o=>na(e,[...t,o]),"s");return{[Bd]:n,attr:s((o,l,a)=>i(eg(o,l,a)),"attr"),classAll:s((...o)=>i($E(o)),"classAll"),classAny:s((...o)=>i((function(l){const a=LE(l);return a.length===0?()=>!1:c=>{if(!Ke(c))return!1;const d=c.classList;for(const u of a)if(d.contains(u))return!0;return!1}})(o)),"classAny"),styleAny:s((o,l,a)=>i((function(c,d,u){if(typeof d=="string")return f=>Ke(f)&&f.style.getPropertyValue(c)===d;if(d instanceof RegExp){const f=u&&u.capture,h=d;return(g,p)=>{if(!Ke(g))return!1;const v=g.style.getPropertyValue(c);if(!v)return!1;const _=v.match(h);return _!==null&&(f!==void 0&&(p[f]=_),!0)}}Ks(362,JSON.stringify(c))})(o,l,a)),"styleAny")}}s(na,"se$1");function LE(e){const t=[];for(const n of e)n&&t.push(n);return t}s(LE,"ie$1");function $E(e){const t=LE(e);return t.length===0?()=>!0:n=>{if(!Ke(n))return!1;const r=n.classList;for(const i of t)if(!r.contains(i))return!1;return!0}}s($E,"ce");function eg(e,t,n){if(t===!0)return r=>Ke(r)&&r.hasAttribute(e);if(typeof t=="string")return r=>Ke(r)&&r.getAttribute(e)===t;if(t instanceof RegExp){const r=n&&n.capture,i=t;return(o,l)=>{if(!Ke(o))return!1;const a=o.getAttribute(e);if(a==null)return!1;const c=a.match(i);return c!==null&&(r!==void 0&&(l[r]=c),!0)}}Ks(361,JSON.stringify(e))}s(eg,"le$1");var U6={kind:"text",predicate:Ld,tags:new Set},W6={[Bd]:U6},z6={kind:"comment",predicate:s(e=>e.nodeType===8,"predicate"),tags:new Set},j6={[Bd]:z6},ls={any:s(()=>na(new Set,[]),"any"),comment:s(()=>j6,"comment"),tag(...e){e.length>0||Ks(363);const t=new Set;for(const n of e)t.add(n.toUpperCase());return na(t,[])},text:s(()=>W6,"text")};function PE(e,t){return Ke(e)&&e.nodeName===t.toUpperCase()}s(PE,"he$1");var FE=/[A-Za-z0-9_-]/,J6=class{static{s(this,"me$1")}constructor(e,t){this.source=e,this.pos=t}peek(e=0){return this.source[this.pos+e]||""}consume(){return this.source[this.pos++]||""}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){const e=this.pos;for(;!this.eof()&&FE.test(this.peek());)this.pos++;return this.source.slice(e,this.pos)}readQuoted(){const e=this.consume();this.assert(e==='"'||e==="'","expected quote");const t=this.pos;for(;!this.eof()&&this.peek()!==e;)this.peek()==="\\"?this.pos+=2:this.pos++;this.assert(!this.eof(),"unterminated string");const n=this.source.slice(t,this.pos);return this.pos++,n.replace(/\\(.)/g,"$1")}assert(e,t){e||Ks(364,String(this.pos+1),t,this.source)}};function G6(e){const t=new Set,n=[],r=[];if(e.skipWhitespace(),e.peek()==="*")e.consume();else if(FE.test(e.peek())){const i=e.readIdent();i&&t.add(i.toUpperCase())}for(;!e.eof();){const i=e.peek();if(i==="."){e.consume();const o=e.readIdent();e.assert(o!=="",'expected class name after "."'),r.push(o)}else if(i==="#"){e.consume();const o=e.readIdent();e.assert(o!=="",'expected id after "#"'),n.push(eg("id",o))}else{if(i!=="[")break;{e.consume(),e.skipWhitespace();const o=e.readIdent();e.assert(o!=="",'expected attribute name after "["'),e.skipWhitespace();let l=!0;if(e.peek()==="="){e.consume(),e.skipWhitespace();const a=e.peek();a==='"'||a==="'"?l=e.readQuoted():(l=e.readIdent(),e.assert(l!=="","expected attribute value")),e.skipWhitespace()}e.assert(e.peek()==="]",'expected "]"'),e.consume(),n.push(eg(o,l))}}}return r.length>0&&n.push($E(r)),{predicates:n,tags:t}}s(G6,"ye$1");function q6(e){const t=new J6(e,0),n=[];for(;;){const i=G6(t);if(n.push(i),t.skipWhitespace(),t.eof())break;t.assert(t.peek()===",",'expected "," (selector lists are the only supported combinator)'),t.consume(),t.skipWhitespace()}if(n.length===1)return na(n[0].tags,n[0].predicates);const r=new Set;for(const i of n)for(const o of i.tags)r.add(o);return na(r,[(i,o)=>{for(const l of n){const a=i.nodeName;if(l.tags.size>0&&!l.tags.has(a))continue;let c=!0;for(const d of l.predicates)if(!d(i,o)){c=!1;break}if(c)return!0}return!1}])}s(q6,"xe$2");function Dm(e,t,n){return NE(RE,e,t,n)}s(Dm,"$e$1");var tg=Dm("textFormat",()=>0),Z6=Dm("textStyle",()=>({}));function Y6(e){if(!Ke(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}s(Y6,"De$1");function X6(e){if(Ld(e))return!0;if(!Ke(e))return!1;const t=e.style.display;return t?t.startsWith("inline"):!Tu(e)&&qh(e)}s(X6,"we$1");var Q6=Dm("whitespaceConfig",()=>({isInline:X6,preservesWhitespace:Y6}));function eN(e){const t=eo(e,$6);return t?t.output.defaults:void 0}s(eN,"Ne$1");var Sj=IE(RE,eN);function Rm(e){return Es(e)||jn(e)&&!e.isInline()}s(Rm,"We$1");function VE(e,t){const n=[];let r=[];const i=s(()=>{r.length!==0&&(n.push(t().splice(0,0,r)),r=[])},"r");for(const o of e)if(Rm(o)){if(i(),xe(o)){const l=VE(o.getChildren(),t);o.splice(0,o.getChildrenSize(),l)}n.push(o)}else r.push(o);return i(),n}s(VE,"Re");function BE(e,t){if(!Ke(t))return e;const n=t.style.textAlign;if(!Lm(n))return e;for(const r of e)Es(r)&&r.getFormatType()===""&&r.setFormat(n);return e}s(BE,"Fe$1");function tN(e,t,n){e.length===1&&Fr(e[0])&&(e=[]);const r=Qe();if(Ke(n)){const i=n.style.textAlign;Lm(i)&&r.setFormat(i)}return[r.splice(0,0,e)]}s(tN,"Te$1");var HE={$accepts:Rm,$packageRun:tN,name:"BlockSchema"},Ho=ls,nN=new Set(["center","end","justify","left","right","start"]);function Lm(e){return nN.has(e)}s(Lm,"Be$1");var rN={B:{fontWeight:"bold"},EM:{fontStyle:"italic"},I:{fontStyle:"italic"},S:{textDecoration:"line-through"},STRONG:{fontWeight:"bold"},SUB:{verticalAlign:"sub"},SUP:{verticalAlign:"super"},U:{textDecoration:"underline"}},iN={CODE:bI,MARK:TI},oN=new Set(["font-weight","font-style","text-decoration","vertical-align"]),sN={$import:s((e,t)=>{const n=e.get(tg),r=rN[t.nodeName],i=(function(h){return{fontStyle:h.style.fontStyle,fontWeight:h.style.fontWeight,textDecoration:h.style.textDecoration,verticalAlign:h.style.verticalAlign}})(t),o=r?(l=r,{fontStyle:(a=i).fontStyle||l.fontStyle,fontWeight:a.fontWeight||l.fontWeight,textDecoration:a.textDecoration||l.textDecoration,verticalAlign:a.verticalAlign||l.verticalAlign}):i;var l,a;let c=(d=n,u=(function(h){let g=0,p=0;const{fontWeight:v,fontStyle:_,textDecoration:y,verticalAlign:x}=h;if(v==="700"||v==="bold"?g|=Dv:v!=="normal"&&v!=="400"||(p|=Dv),_==="italic"?g|=Lv:_==="normal"&&(p|=Lv),y){const C=y.split(" ");C.includes("underline")&&(g|=Pv),C.includes("line-through")&&(g|=$v),C.includes("none")&&(p|=Pv|$v)}return x==="sub"?(g|=Sf,p|=wf):x==="super"?(g|=wf,p|=Sf):x==="baseline"&&(p|=Sf|wf),{clear:p,set:g}})(o),d&~u.clear|u.set);var d,u;const f=iN[t.nodeName];return f&&(c|=f),c===n?e.$importChildren(t):e.$importChildren(t,{context:[AE(tg,c)]})},"$import"),match:Ho.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function Zv(e,t,n){let r=e;for(;;){let i=null;for(;(i=t?r.nextSibling:r.previousSibling)===null;){const l=r.parentNode;if(l===null)return null;r=l}if(r=i,!n.isInline(r))return null;let o=r;for(;(o=t?r.firstChild:r.lastChild)!==null;)r=o;if(Ld(r))return r;if(r.nodeName==="BR")return null}}s(Zv,"Je$1");function Yv(e,t){return t!==0&&Ne(e)?e.setFormat(t):e}s(Yv,"Qe");function Xv(e,t){if(Ne(e)){const n=(function(r){let i="";for(const o in r)oN.has(o)||(i+=`${o}: ${r[o]}; `);return i.trimEnd()})(t);n!==""&&e.setStyle(n)}return e}s(Xv,"Ke$1");var lN={$import:s((e,t)=>{const n=e.get(tg),r=e.get(Z6),i=e.get(Q6);if((function(a,c){let d=a.parentNode;for(;d!==null;){if(c.preservesWhitespace(d))return!0;d=d.parentNode}return!1})(t,i)){const a=zh(t.textContent||"");for(const c of a)Yv(c,n),Xv(c,r);return a}const o=(function(a,c){let d=(a.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(d.length===0)return"";if(d[0]===" "){let u=a,f=!0;for(;u!==null&&(u=Zv(u,!1,c))!==null;){const h=u.textContent||"";if(h.length>0){/[ \t\n]$/.test(h)&&(d=d.slice(1)),f=!1;break}}f&&(d=d.slice(1))}if(d.length>0&&d[d.length-1]===" "){let u=a,f=!0;for(;u!==null&&(u=Zv(u,!0,c))!==null;)if((u.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){f=!1;break}f&&(d=d.slice(0,-1))}return d})(t,i);if(o==="")return[];const l=yr(o);return Yv(l,n),Xv(l,r),[l]},"$import"),match:Ho.text(),name:"@lexical/html/#text"},aN={$import:s(()=>[],"$import"),match:Ho.tag("script","style"),name:"@lexical/html/script-style-ignore"},cN={$import:s((e,t)=>ZI(t)||qI(t)?[]:[Pr()],"$import"),match:Ho.tag("br"),name:"@lexical/html/br"},uN={$import:s((e,t)=>{const n=Qe();if(pi(n,t),Hs(t,n),n.getFormatType()===""){const r=t.getAttribute("align");r&&Lm(r)&&n.setFormat(r)}return wr(n,t),[n.splice(0,0,e.$importChildren(t))]},"$import"),match:Ho.tag("p"),name:"@lexical/html/p"},dN={$import:s((e,t,n)=>jt().hasNode(Ua)?[Vd()]:n(),"$import"),match:Ho.tag("hr"),name:"@lexical/html/hr"},wj=[aN,uN,dN,{$import:s((e,t,n)=>Tu(t)?BE(e.$importChildren(t,{schema:HE}),t):n(),"$import"),match:Ho.any(),name:"@lexical/html/transparent-block"},lN,cN,sN];function fN(e,t){const n=[];let r=0,i=0;for(;r<e.length&&i<t.length;)e[r]<=t[i]?n.push(e[r++]):n.push(t[i++]);for(;r<e.length;)n.push(e[r++]);for(;i<t.length;)n.push(t[i++]);return n}s(fN,"on");function hN(e){const t=[],n=new Map,r=[],i=[],o=[],l=new Set;e.forEach((c,d)=>{const u=(function(h){const g=h[Bd];return g===void 0&&Ks(360),g})(c.match),f=c.name||(function(h,g){return h.kind==="text"?`#text@${g}`:h.kind==="comment"?`#comment@${g}`:h.tags.size===0?`*@${g}`:`${Array.from(h.tags).join(",").toLowerCase()}@${g}`})(u,d);if(c.name&&l.add(c.name),t.push({$import:c.$import,name:f,predicate:u.predicate}),u.kind==="text")i.push(d);else if(u.kind==="comment")o.push(d);else if(u.tags.size===0)r.push(d);else for(const h of u.tags){let g=n.get(h);g||(g=[],n.set(h,g)),g.push(d)}});const a=new Map;if(r.length===0)for(const[c,d]of n)a.set(c,d);else for(const[c,d]of n)a.set(c,fN(d,r));return{byTag:a,commentIndices:o,rules:t,textIndices:i,wildcardIndices:r}}s(hN,"rn");var kj=Object.freeze([]);function gN(e){const t=[];for(const n of e)if(pN(n))for(const r of n.rules)t.push(r);else t.push(n);return t}s(gN,"ln");function pN(e){return typeof e=="object"&&e!==null&&"__type"in e&&e.__type==="CompiledOverlayRules"}s(pN,"un");function KE(e){const t=gN(e);return{__type:"CompiledOverlayRules",dispatch:hN(t),rules:t}}s(KE,"fn");var Mj=Object.freeze({}),Aj={$import:s((e,t)=>e.$importChildren(t),"$import"),match:ls.any(),name:"@lexical/html/default-hoist"},Jt={any:ls.any,comment:ls.comment,css:q6,tag:ls.tag,text:ls.text},UE=new Set(["STYLE","SCRIPT"]);function mN(e,t){L6(t);const n=rE(t)?t.body.childNodes:t.childNodes,r=[],i=[];for(const o of n)if(!UE.has(o.nodeName)){const l=zE(o,e,i,!1);if(l!==null)for(const a of l)r.push(a)}return(function(o){for(const l of o)l.getParent()&&l.getNextSibling()instanceof Nb&&l.insertAfter(Pr());for(const l of o){const a=l.getParent();a&&a.splice(l.getIndexWithinParent(),1,l.getChildren())}})(i),r}s(mN,"kn");function vN(e,t=null,n=jt()){return K6([AE(F6,!0)],n)(()=>{const r=$t(),i=H6(n),o=oe(t)?vm(t.anchor.getNode()):null,l=e.append.bind(e);for(const a of(xe(o)?o:r).getChildren())WE(n,a,l,t,i);return e})}s(vN,"Dn");function _N(e,t=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&Ks(338),J7(e),vN(Tn().createElement("div"),t,e).innerHTML}s(_N,"On");function WE(e,t,n,r=null,i=wb(e)){let o=i.$shouldInclude(t,r,e);const l=i.$shouldExclude(t,r,e);let a=t;r!==null&&Ne(t)&&(a=aE(r,t,"clone"));const{element:c,after:d,append:u,$getChildNodes:f}=i.$exportDOM(a,e);if(!c)return!1;const h=Tn().createDocumentFragment(),g=f?f():xe(a)?a.getChildren():[],p=o&&He(r)&&xe(t)?null:r,v=h.append.bind(h);for(const _ of g){const y=WE(e,_,v,p,i);!o&&y&&i.$extractWithChild(t,_,r,"html",e)&&(o=!0)}if(o&&!l){if((Ke(c)||Vv(c))&&(u?u(h):c.append(h)),n(c),d){const _=d.call(a,c);_&&(Vv(c)?c.replaceChildren(_):c.replaceWith(_))}}else n(h);return o}s(WE,"Mn");function zE(e,t,n,r,i=new Map,o){const l=[];if(UE.has(e.nodeName))return l;let a=null;const c=(function(p,v){const{nodeName:_}=p,y=v._htmlConversions.get(_.toLowerCase());let x=null;if(y!==void 0)for(const C of y){const b=C(p);b!==null&&(x===null||(x.priority||0)<=(b.priority||0))&&(x=b)}return x!==null?x.conversion:null})(e,t),d=c?c(e):null;let u=null;if(d!==null){u=d.after;const p=d.node;if(a=Array.isArray(p)?p[p.length-1]:p,a!==null){for(const[,v]of i)if(a=v(a,o),!a)break;a&&l.push(...Array.isArray(p)?p:[a])}d.forChild!=null&&i.set(e.nodeName,d.forChild)}const f=e.childNodes;let h=[];const g=(a==null||!bn(a))&&(a!=null&&Es(a)||r);for(let p=0;p<f.length;p++)h.push(...zE(f[p],t,n,g,new Map(i),a));if(u!=null&&(h=u(h)),Tu(e)&&(h=yN(e,h,g?()=>{const p=new Nb;return n.push(p),p}:Qe)),a==null)if(h.length>0)for(const p of h)l.push(p);else Tu(e)&&(function(p){return p.nextSibling==null||p.previousSibling==null?!1:qh(p.nextSibling)&&qh(p.previousSibling)})(e)&&l.push(Pr());else xe(a)&&a.append(...h);return l}s(zE,"Nn");function yN(e,t,n){const r=e.style.textAlign,i=[];let o=[];for(let l=0;l<t.length;l++){const a=t[l];if(Es(a))r&&!a.getFormat()&&a.setFormat(r),i.push(a);else if(o.push(a),l===t.length-1||l<t.length-1&&Es(t[l+1])){const c=n();c.setFormat(r),c.append(...o),i.push(c),o=[]}}return i}s(yN,"En");function ku(e,t,n=null){const r=jI(n),i=n?WI(n):[],o=n!==null&&i.length>0;if(o&&typeof r.caretPositionFromPoint=="function"){const l=r.caretPositionFromPoint(e,t,{shadowRoots:i});if(l!==null&&(function(a,c){for(let d=a;d!==null;){if(d===c)return!0;d=nE(d)}return!1})(l.offsetNode,n))return{node:l.offsetNode,offset:l.offset}}if(o){const l=n.getRootNode();if(GI(l)){const a=l.elementFromPoint(e,t);if(a!==null&&n.contains(a)){const c=(function(d,u,f,h){const g=h.createRange(),p=s(S=>u<S.top?S.top-u:u>S.bottom?u-S.bottom:0,"i"),v=s(S=>d<S.left?S.left-d:d>S.right?d-S.right:0,"l"),_=h.createTreeWalker(f,NodeFilter.SHOW_TEXT);let y=null,x=1/0,C=1/0;for(let S=_.nextNode();S;S=_.nextNode()){g.selectNodeContents(S);for(const E of g.getClientRects()){const A=p(E),D=v(E);(A<x||A===x&&D<C)&&(x=A,C=D,y=S)}}if(y===null)return null;let b=0,T=1/0,M=1/0;for(let S=0;S<=y.length;S++){g.setStart(y,S),g.collapse(!0);const E=g.getBoundingClientRect(),A=p(E),D=Math.abs(d-E.left);(A<T||A===T&&D<M)&&(T=A,M=D,b=S)}return{node:y,offset:b}})(e,t,a,r);if(c!==null)return c}}}if(typeof r.caretRangeFromPoint=="function"){const l=r.caretRangeFromPoint(e,t);return l===null?null:{node:l.startContainer,offset:l.startOffset}}if(typeof r.caretPositionFromPoint=="function"){const l=r.caretPositionFromPoint(e,t);return l===null?null:{node:l.offsetNode,offset:l.offset}}return null}s(ku,"et$1");function as(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}s(as,"nt$2");var ng={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function xN(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:s(t=>t,"createHTML")}).createHTML(e):e}s(xN,"rt$2");var Qv=s((e,t)=>{if(!oe(t))return t.insertRawText(e),!0;const n=s(r=>{const i=ie();oe(i)&&r(i)},"n");return QI(e,{linebreak:s(()=>n(r=>r.insertParagraph()),"linebreak"),tab:s(()=>n(r=>r.insertNodes([mm()])),"tab"),text:s(r=>n(i=>i.insertText(r)),"text")}),!0},"it$2"),rg={"application/x-lexical-editor":[(e,t,n)=>{try{const r=jt(),i=JSON.parse(e);if(i&&i.namespace===r._config.namespace&&Array.isArray(i.nodes))return e_(r,YE(i.nodes),t),!0}catch{}return n()}],"text/html":[(e,t,n)=>{try{const r=jt(),i=new DOMParser().parseFromString(xN(e),"text/html");return e_(r,mN(r,i),t),!0}catch{return n()}}],"text/plain":[Qv],"text/uri-list":[Qv]};function CN(e,t,n,r){if(!e)return!1;const i=s(o=>!!e[o]&&e[o](t,n,i.bind(null,o-1),r),"r");return i(e.length-1)}s(CN,"ct$1");function jE(e,t,n){const r=t.getData("text/plain");for(const i of(function(o){return Object.keys(o.$importMimeType).filter(l=>o.$importMimeType[l]!==void 0).sort((l,a)=>{const c=o.priority[l],d=o.priority[a];return c===void 0&&d===void 0?l<a?-1:l>a?1:0:c===void 0?1:d===void 0?-1:c-d})})(e)){const o=t.getData(i);if(o&&(i!=="text/html"||o!==r)&&CN(e.$importMimeType[i],o,n,t))return!0}return!1}s(jE,"st$2");var bN={$importMimeType:rg,$insertDataTransfer:s((e,t)=>jE({$importMimeType:rg,priority:ng},e,t),"$insertDataTransfer"),priority:ng},EN=Ur({build:s((e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:s((n,r)=>jE(t,n,r),"$insertDataTransfer"),priority:t.priority}),"build"),config:Vo({$importMimeType:rg,priority:ng}),mergeConfig(e,t){const n=Pd(e,t);if(t.$importMimeType){const r={...e.$importMimeType};for(const[i,o]of Object.entries(t.$importMimeType))if(o){const l=r[i];r[i]=l?[...l,...o]:o}n.$importMimeType=r}return t.priority&&(n.priority={...e.priority,...t.priority}),n},name:"@lexical/clipboard/Import"});function JE(e,t=ie()){return t??as(166),oe(t)&&t.isCollapsed()||t.getNodes().length===0?"":_N(e,t)}s(JE,"pt$2");function GE(e,t=ie()){return t??as(166),oe(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(ZE(e,t))}s(GE,"dt$3");function ig(e,t,n){(function(){const r=C6(EN.name);return r?r.output:bN})().$insertDataTransfer(e,t)}s(ig,"gt");var qE="application/x-lexical-drag";function TN(e,t){const n={editorKey:t.getKey()};e.setData(qE,JSON.stringify(n))}s(TN,"xt$3");function SN(e,t,n){const r=e.dataTransfer;if(r===null)return!1;const i=(function(d){const u=d.getData(qE);if(!u)return null;let f;try{f=JSON.parse(u)}catch{return null}return(h=f)!==null&&typeof h=="object"&&"editorKey"in h&&typeof h.editorKey=="string"?f:null;var h})(r);if(i===null)return!1;const o=(function(d,u){const f=ku(d.clientX,d.clientY,u.getRootElement());if(f===null)return null;const h=di(f.node);if(h===null)return null;if(Ne(h))return eI(h,"next",f.offset);if(xe(h))return Iv(h,f.offset,"next");const g=h.getParent();return g===null?null:Iv(g,h.getIndexWithinParent()+1,"next")})(e,t);if(o===null)return!1;const l=aI(o);if(l===null)return!1;const a=i.editorKey===t.getKey(),c=ie();if(a){if(!oe(c)||c.isCollapsed())return!1;if((function(d,u){const{anchor:f,focus:h}=Sb(bb(u),"next");return Wh(f,d)<0&&Wh(d,h)<0})(o,c))return e.preventDefault(),!0;c.removeText()}if(!l.origin.isAttached())return e.preventDefault(),!0;if(n(r,Ts(Id(l)),t),!a){const d=t.getRootElement(),u=d?d.ownerDocument:null,f=u?(function(h,g){for(const p of VI(g)){const v=tE(p);if(oE(v)&&v.getKey()===h&&Ke(p))return p}return null})(i.editorKey,u):null;f!==null&&f.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return e.preventDefault(),!0}s(SN,"ht$2");function wN(e,t){return SN(e,t,ig)}s(wN,"Tt$4");function e_(e,t,n){e.dispatchCommand(NI,{nodes:t,selection:n})||(n.insertNodes(t),(function(r){if(oe(r)&&r.isCollapsed()){const i=r.anchor;let o=null;const l=Gi(i,"previous");if(l)if(Cm(l))o=l.origin;else{const a=Tl(l,qi($t(),"next").getFlipped());for(const c of a){if(Ne(c.origin)){o=c.origin;break}if(xe(c.origin)&&!c.origin.isInline())break}}if(o&&Ne(o)){const a=o.getFormat(),c=o.getStyle();r.format===a&&r.style===c||(r.format=a,r.style=c,r.dirty=!0)}}})(n))}s(e_,"Mt$3");function og(e,t,n,r=[]){let i=t===null||n.isSelected(t);const o=xe(n)&&n.excludeFromCopy("html");let l=n;t!==null&&Ne(l)&&(l=aE(t,l,"clone"));const a=xe(l)?l.getChildren():[],c=(function(u){const f=u.exportJSON(),h=u.constructor;if(f.type!==h.getType()&&as(58,h.name),xe(u)){const g=f.children;Array.isArray(g)||as(59,h.name)}return f})(l);Ne(l)&&l.getTextContentSize()===0&&(i=!1);const d=i&&He(t)&&xe(n)?null:t;for(let u=0;u<a.length;u++){const f=a[u],h=og(e,d,f,c.children);!i&&xe(n)&&h&&n.extractWithChild(f,t,"clone")&&(i=!0)}if(i&&!o){const u=Q7(l);if(u.length>0){const f={};for(const h of u){const g=X7(l,h);g===null&&as(366,l.constructor.name,h);const p=[];og(e,null,g,p),p.length===1&&p[0].type===g.getType()||as(385,h,l.constructor.name,String(p.length),String(p.length>0?p[0].type:"none")),f[h]=p[0]}c.$slots=f}}if(i&&!o)r.push(c);else if(Array.isArray(c.children))for(let u=0;u<c.children.length;u++){const f=c.children[u];r.push(f)}return i}s(og,"vt$4");function ZE(e,t){const n=[],r=$t(),i=oe(t)?t.anchor.getNode():He(t)?t.getNodes()[0]??null:null,o=i!==null?vm(i):null,l=(xe(o)?o:r).getChildren();for(let a=0;a<l.length;a++)og(e,t,l[a],n);return{namespace:e._config.namespace,nodes:n}}s(ZE,"wt$3");function YE(e){const t=[];for(const n of e)t.push(oI(n));return t}s(YE,"$t$3");var jo=null;async function t_(e,t,n){if(jo!==null)return!1;if(t!==null)return new Promise((d,u)=>{e.update(()=>{d(n_(e,t,n))})});const r=e.getRootElement(),i=e._window||window,o=i.document,l=Ba(i);if(r===null||l===null)return!1;const a=o.createElement("span");a.style.position="fixed",a.style.top="-1000px",a.append(o.createTextNode("#")),r.append(a);const c=o.createRange();return c.setStart(a,0),c.setEnd(a,1),l.removeAllRanges(),l.addRange(c),new Promise((d,u)=>{const f=e.registerCommand(Rb,h=>(ti(h,ClipboardEvent)&&(f(),jo!==null&&(i.clearTimeout(jo),jo=null),d(n_(e,h,n))),!0),Vr);jo=i.setTimeout(()=>{f(),jo=null,d(!1)},50),o.execCommand("copy"),a.remove()})}s(t_,"Dt$3");function n_(e,t,n){if(n===void 0){const i=Ba(e._window),o=ie();if(!o||o.isCollapsed()||!i)return!1;const l=UI(i,e.getRootElement()),a=l.anchorNode,c=l.focusNode;if(a!==null&&c!==null&&!YI(e,a,c))return!1;n=XE(o)}t.preventDefault();const r=t.clipboardData;return r!==null&&(QE(r,n),!0)}s(n_,"Nt$4");var kN=[["text/html",JE],["application/x-lexical-editor",GE]];function XE(e=ie()){return(function(t,n){const r={"text/plain":""};for(const[i,o]of Object.entries(t))if(o){const l=AN(o,n);l!==null&&(r[i]=l)}return r})(MN(),e)}s(XE,"Rt$3");function QE(e,t){for(const[n]of kN)t[n]===void 0&&e.setData(n,"");for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}s(QE,"St$4");function MN(e=jt()){const t=eo(e,IN.name);return t?t.output:eT}s(MN,"Ot$4");var eT={"application/x-lexical-editor":[(e,t)=>e?GE(jt(),e):t()],"text/html":[(e,t)=>e?JE(jt(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function AN(e,t){const n=s(r=>e[r]?e[r](t,n.bind(null,r-1)):null,"n");return n(e.length-1)}s(AN,"Et$3");var IN=Ur({build:s((e,t,n)=>t.$exportMimeType,"build"),config:Vo({$exportMimeType:eT}),mergeConfig(e,t){const n=Pd(e,t);if(t.$exportMimeType){const r={...e.$exportMimeType};for(const[i,o]of Object.entries(t.$exportMimeType))if(o){const l=r[i];r[i]=l?[...l,...o]:o}n.$exportMimeType=r}return n},name:"@lexical/clipboard/GetClipboardData"}),NN={bold:"bold",italic:"italic",strikeThrough:"strikethrough",subscript:"subscript",superscript:"superscript",underline:"underline"},Mu=Symbol.for("@lexical/dragon/WindowState");function ON(e,t,n){const r=(function(i){let o=i[Mu];return o===void 0&&(o={dispose:s(()=>{},"dispose"),editors:new Map,installs:new Set},i[Mu]=o),o})(e);if(r.installs.size===0){const i=LN.bind(e);e.addEventListener("message",i,!0),r.dispose=()=>{e.removeEventListener("message",i,!0)}}if(r.installs.add(t),n){const i=r.editors.get(n)||new Set;i.add(t),r.editors.set(n,i)}return DN.bind(null,e,r,t,n)}s(ON,"p$4");function DN(e,t,n,r){if(r){const i=t.editors.get(r);i&&i.delete(n)&&i.size===0&&t.editors.delete(r)}t.installs.delete(n)&&t.installs.size===0&&(t.dispose(),delete e[Mu])}s(DN,"m$3");function r_(e){return e&&e.ownerDocument.defaultView}s(r_,"y$2");function RN(e){const t=d6(()=>r_(e.getRootElement()),n=>e.registerRootListener(r=>{n.value=r_(r)}));return Bo(()=>{const n=t.value;if(n)return ON(n,Symbol("@lexical/dragon/editorInstall"),e)})}s(RN,"b$2");function LN(e){if(e.origin!==this.location.origin)return;const t=(function(r){const i=r[Mu];if(i===void 0)return null;const o=tE(HI(r.document));return oE(o)&&i.editors.has(o)?o:null})(this);if(t===null)return;const n=e.data;if(typeof n=="string"){let r;try{r=JSON.parse(n)}catch{return}if(r&&r.protocol==="nuanria_messaging"&&r.type==="request"){const i=r.payload;if(i&&i.functionId==="makeChanges"){const o=i.args;if(Array.isArray(o)){const[l,a,c,d,u,f]=o;if(![l,a,d,u].every(Number.isFinite)||typeof c!="string"&&c!==-1)return;t.update(()=>{const h=ie();if(oe(h)){const g=h.anchor;let p=g.getNode(),v=0,_=0;if(Ne(p)&&l>=0&&a>=0&&(v=l,_=l+a,h.setTextNodeRange(p,v,p,_)),typeof c!="string"||v===_&&c===""||(h.insertRawText(c),p=g.getNode()),Ne(p)){const y=p.getTextContentSize();v=Math.min(Math.max(d,0),y),_=d<0||u<0?v:Math.min(d+u,y),h.setTextNodeRange(p,v,p,_)}if(typeof f=="string"&&u>0&&!h.isCollapsed()){const y=NN[f];y!==void 0&&h.formatText(y)}e.stopImmediatePropagation()}})}}}}}s(LN,"x$4");var $N={$import:s((e,t)=>{const n=Rr(t.nodeName.toLowerCase());return Hs(t,n),pi(n,t),wr(n,t),[n.splice(0,0,e.$importChildren(t))]},"$import"),match:Jt.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},PN={$import:s((e,t)=>{const n=Us();return pi(n,t),Hs(t,n),wr(n,t),[n.splice(0,0,e.$importChildren(t))]},"$import"),match:Jt.tag("blockquote"),name:"@lexical/rich-text/blockquote"},Ij={$import:s((e,t)=>{const n=Us({shadowRoot:!0});return pi(n,t),Hs(t,n),wr(n,t),[n.splice(0,0,e.$importChildren(t,{schema:HE}))]},"$import"),match:Jt.tag("blockquote"),name:"@lexical/rich-text/blockquote-shadow-root"},Nj=[$N,PN,{$import:s((e,t,n)=>{const r=t.firstChild;return r&&Ke(i=r)&&i.nodeName==="SPAN"&&i.style.fontSize==="26pt"?e.$importChildren(t):n();var i},"$import"),match:Jt.tag("p"),name:"@lexical/rich-text/google-docs-title-p"},{$import:s((e,t,n)=>t.style.fontSize!=="26pt"?n():[Rr("h1").splice(0,0,e.$importChildren(t))],"$import"),match:Jt.tag("span"),name:"@lexical/rich-text/google-docs-title-span"}],i_=kr("DRAG_DROP_PASTE_FILE"),Of=Va("shadowRoot",{parse:Boolean}),Hd=class tT extends Br{static{s(this,"Nt$3")}static getType(){return"quote"}static clone(t){return new tT(t.__key)}$config(){return this.config("quote",{extends:Br,stateConfigs:[{flat:!0,stateConfig:Of}]})}isShadowRoot(){return _m(this,Of)}setIsShadowRoot(t){return ps(this,Of,t)}createDOM(t){const n=Tn().createElement("blockquote");return xr(n,t.theme.quote),n}updateDOM(t,n){return!1}static importDOM(){return{blockquote:s(t=>({conversion:FN,priority:0}),"blockquote")}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Ke(n)){this.isEmpty()&&n.append(Tn().createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return Us().updateFromJSON(t)}exportJSON(){return super.exportJSON()}insertNewAfter(t,n){const r=Qe(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){if(this.isShadowRoot()){for(const n of this.getChildren())this.insertBefore(n);return this.remove(),!0}const t=Qe();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}canMergeWhenEmpty(){return!0}};function Us(e){const t=gi(new Hd);return e&&e.shadowRoot?t.setIsShadowRoot(!0):t}s(Us,"St$3");function sg(e){return e instanceof Hd}s(sg,"bt$3");var Wa=class nT extends Br{static{s(this,"_t$3")}__tag;static getType(){return"heading"}static clone(t){return new nT(t.__tag,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__tag=t.__tag}constructor(t="h1",n){super(n),this.__tag=t}getTag(){return this.getLatest().__tag}setTag(t){const n=this.getWritable();return n.__tag=t,n}createDOM(t){const n=this.__tag,r=Tn().createElement(n),i=t.theme.heading;if(i!==void 0){const o=i[n];xr(r,o)}return r}updateDOM(t,n,r){return t.__tag!==this.__tag}static importDOM(){return{h1:s(t=>({conversion:Jo,priority:0}),"h1"),h2:s(t=>({conversion:Jo,priority:0}),"h2"),h3:s(t=>({conversion:Jo,priority:0}),"h3"),h4:s(t=>({conversion:Jo,priority:0}),"h4"),h5:s(t=>({conversion:Jo,priority:0}),"h5"),h6:s(t=>({conversion:Jo,priority:0}),"h6"),p:s(t=>{const n=t.firstChild;return n!==null&&o_(n)?{conversion:s(()=>({node:null}),"conversion"),priority:3}:null},"p"),span:s(t=>o_(t)?{conversion:s(n=>({node:Rr("h1")}),"conversion"),priority:3}:null,"span")}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Ke(n)){this.isEmpty()&&n.append(Tn().createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return Rr(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,n=!0){const r=t?t.anchor.offset:0,i=this.getLastDescendant(),o=!i||t&&t.anchor.key===i.getKey()&&r===i.getTextContentSize()||!t?Qe():Rr(this.getTag()),l=this.getDirection();if(o.setDirection(l),this.insertAfter(o,n),r===0&&!this.isEmpty()&&t){const a=Qe();a.select(),this.replace(a,!0)}return o}collapseAtStart(){if(this.isEmpty()){const t=Qe();this.getChildren().forEach(n=>t.append(n)),this.replace(t)}return!0}extractWithChild(){return!0}};function o_(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}s(o_,"Tt$3");function Jo(e){const t=e.nodeName.toLowerCase();let n=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(n=Rr(t),Hs(e,n),pi(n,e),wr(n,e)),{node:n}}s(Jo,"wt$2");function FN(e){const t=Us();return pi(t,e),Hs(e,t),wr(t,e),{node:t}}s(FN,"Ot$3");function Rr(e="h1"){return gi(new Wa(e))}s(Rr,"kt$3");function Kd(e){return e instanceof Wa}s(Kd,"Kt$2");function s_(e){const t=di(e);return jn(t)}s(s_,"Et$2");function Go(e,t,n,r){let i=!1,o=null;if(e.isCollapsed()&&e.anchor.type==="text"){const a=e.anchor.getNode();if(Ne(a)){o=a;const c=e.anchor.offset,d=c===a.getTextContentSize()&&a.getNextSibling()===null,u=c===0&&a.getPreviousSibling()===null;i=n==="end"&&d||n==="start"&&u||n==="both"&&(d||u)}}let l=!1;for(const[a,c]of Object.entries(r)){if(c==null||!c[t])continue;const d=a;if(c.onlyAtBoundary){if(!(i&&o&&Ne(o)&&o.hasFormat(d)))continue;l=!0}e.hasFormat(d)&&e.toggleFormat(d)}l&&e.setStyle("")}s(Go,"Ft$2");var VN={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function cc(e,t){return(function(n,r){if(!n.isCollapsed())return!1;const i=Gi(n.focus,r),o=ft(i.origin,Lc);if(!o)return!1;const l=n.focus.getNode();if(!o.is(l)&&!Mb(l,o))return!1;const a=Tl(i,Xn(o,r));if(a.getTextSlices().some(f=>f&&f.getTextContentSize()>0))return!1;const c=Tl(a.anchor.getSiblingCaret(),a.focus);let d=c.anchor.origin;for(const f of c){if(!Cu(f)||!f.origin.is(d.getParent()))return!1;d=f.origin}let u=o;for(const f of Tb(Xn(o,r))){if(!f.origin.is(u.getParent())){if(iI(f.origin)){const h=Xn(u,r);return Ts(Tl(h,h)),!0}break}if(!Lc(f.origin))break;u=f.origin}return!1})(e,t)||(function(n,r){if(!n.isCollapsed()||n.anchor.type!=="element")return!1;const i=Gi(n.anchor,r).getNodeAtCaret();return!(!Lc(i)||i.isInline()||(Ts(Id(Zi(qi(i,r)))),0))})(e,t)}s(cc,"Rt$2");function l_(e){return jn(e)&&!e.isInline()&&!e.isIsolated()&&e.isKeyboardSelectable()}s(l_,"At$3");function uc(e){const t=xu();t.add(e),nr(t)}s(uc,"Pt$3");function a_(e,t){if(!e.isCollapsed())return!1;const n=e.focus,r=n.getNode(),i=t?"previous":"next",o=Gi(n,i);if(n.type==="element"&&xe(r)&&(Pa(r)||Lc(r))){const y=o.getNodeAtCaret();return!(y===null||!l_(y))&&(uc(y.__key),!0)}const l=ft(xe(r)?r:r.getParentOrThrow(),y=>xe(y)&&!y.isInline()&&bn(y.getParent()));if(l===null)return!1;const a=Xn(l,i).getNodeAtCaret();if(a===null||!l_(a))return!1;if(l.getTextContentSize()===0)return uc(a.__key),!0;const c=jt().getRootElement();if(c===null)return!1;const d=Ba(c.ownerDocument.defaultView);if(d===null||d.rangeCount===0)return!1;const u=d.anchorNode,f=d.anchorOffset,h=d.focusNode,g=d.focusOffset;d.modify("move",t?"backward":"forward","line");const p=d.anchorNode,v=d.anchorOffset;if(p===null)return c_(d,u,f,h,g),!1;const _=di(p);return c_(d,u,f,h,g),_===null?!1:(p===u&&v===f||!_.is(l)&&!Mb(_,l))&&(uc(a.__key),!0)}s(a_,"zt$2");function c_(e,t,n,r,i){t!==null&&r!==null&&e.setBaseAndExtent(t,n,r,i)}s(c_,"Mt$2");function u_(e,t){if(!e.isCollapsed())return!1;const n=e.focus.getNode(),r=ft(xe(n)?n:n.getParentOrThrow(),_=>xe(_)&&!_.isInline());if(r===null)return!1;const i=jt(),o=i.getRootElement();if(o===null)return!1;const l=o.ownerDocument.defaultView;if(l===null)return!1;let a=!1;for(const _ of r.getChildren())if(xe(_)&&_.isInline()){const y=i.getElementByKey(_.getKey());if(y!==null){const x=l.getComputedStyle(y).display;if(x==="inline-grid"||x==="inline-flex"){a=!0;break}}}if(!a)return!1;const c=Xn(r,t?"previous":"next").getNodeAtCaret();if(c===null||!xe(c)){if(t){const _=r.getFirstDescendant();Ne(_)?_.select(0,0):r.select(0,0)}else{const _=r.getLastDescendant();if(Ne(_)){const y=_.getTextContentSize();_.select(y,y)}else{const y=r.getChildrenSize();r.select(y,y)}}return!0}const d=i.getElementByKey(c.getKey());if(d===null)return!1;const u=Ba(l);if(u===null||u.rangeCount===0)return!1;const f=u.getRangeAt(0).cloneRange();f.collapse(!0);const h=f.getBoundingClientRect(),g=d.getBoundingClientRect(),p=g.top+g.height/2;if(h.height>0){const _=ku(h.left,p,o);if(_!==null&&d.contains(_.node)){const y=o.ownerDocument.createRange();return y.setStart(_.node,_.offset),y.collapse(!0),e.applyDOMRange(y),e.dirty=!0,!0}}const v=t?c.getLastDescendant():c.getFirstDescendant();if(Ne(v)){const _=t?v.getTextContentSize():0;v.select(_,_)}else{const _=c.getChildrenSize();c.select(t?_:0,t?_:0)}return!0}s(u_,"$t$2");function dc(e,t){const n=Xn(e,t),r=n.getAdjacentCaret();r!==null&&xe(r.origin)&&!r.origin.isInline()&&r.origin.isShadowRoot()?Ts(Id(n)):t==="next"?e.selectNext(0,0):e.selectPrevious()}s(dc,"Jt$1");function d_(e,t,n){n.preventDefault(),n.stopPropagation();const r=e.getNodes();if(r.length===0)return!0;const i=r.map(c=>Xn(c,"next")).sort(Wh),o=(t?i[0]:i[i.length-1]).origin,l=ft(o,c=>c!==o&&xe(c)&&!c.isInline())??$t(),a=t?0:l.getChildrenSize();return l.select(a,a),!0}s(d_,"Lt$3");function BN(e,t=ta(VN)){return It(e.registerCommand(bm,()=>{const n=ie();return He(n)?(n.clear(),!0):(oe(n)&&Go(n,"click","both",t.peek()),!1)},Ie),e.registerCommand(Tf,n=>{const r=ie();return oe(r)?(r.deleteCharacter(n),!0):!!He(r)&&(r.deleteNodes(),!0)},Ie),e.registerCommand(yI,n=>{const r=ie();return!!oe(r)&&(r.deleteWord(n),!0)},Ie),e.registerCommand(_I,n=>{const r=ie();return!!oe(r)&&(r.deleteLine(n),!0)},Ie),e.registerCommand(mI,n=>{const r=ie();if(typeof n=="string")r!==null&&r.insertText(n);else{if(r===null)return!1;const i=n.dataTransfer;if(i!=null)ig(i,r,e);else if(oe(r)){const o=n.data;return o&&r.insertText(o),!0}}return!0},Ie),e.registerCommand(II,()=>{const n=ie();return!!oe(n)&&(n.removeText(),!0)},Ie),e.registerCommand(Fb,n=>{const r=ie();return!(!oe(r)&&!He(r))&&(q7(r,n),!0)},Ie),e.registerCommand(DI,n=>{const r=ie();return!(!oe(r)&&!He(r))&&(lI(r,n),!0)},Ie),e.registerCommand(xI,n=>{const r=ie();if(!oe(r)&&!He(r))return!1;const i=r.getNodes();for(const o of i){const l=ft(o,a=>xe(a)&&!a.isInline());l!==null&&l.setFormat(n)}return!0},Ie),e.registerCommand(Ov,n=>{const r=ie();return!!oe(r)&&(r.insertLineBreak(n),!0)},Ie),e.registerCommand(Jh,()=>{const n=ie();return!!oe(n)&&(n.insertParagraph(),!0)},Ie),e.registerCommand(Hb,()=>{const n=mm(),r=ie();return oe(r)&&(n.setFormat(r.format),n.setStyle(r.style)),Vs([n]),!0},Ie),e.registerCommand(Eu,()=>Yh(n=>{const r=n.getIndent();n.setIndent(r+1)}),Ie),e.registerCommand(Gh,()=>Yh(n=>{const r=n.getIndent();r>0&&n.setIndent(Math.max(0,r-1))}),Ie),e.registerCommand(Wb,n=>{const r=ie();if(He(r)){const i=r.getNodes();if(i.length>0)return n.preventDefault(),dc(i[0],"previous"),!0}else if(oe(r)&&(!n.shiftKey&&cc(r,"previous")||!n.shiftKey&&a_(r,!0)||!n.shiftKey&&u_(r,!0)))return n.preventDefault(),!0;return!1},Ie),e.registerCommand(Kb,n=>{const r=ie();if(He(r)){const i=r.getNodes();if(i.length>0)return n.preventDefault(),dc(i[0],"next"),!0}else if(oe(r)&&((function(i){const o=i.focus;return o.key==="root"&&o.offset===$t().getChildrenSize()})(r)||!n.shiftKey&&cc(r,"next")||!n.shiftKey&&a_(r,!1)||!n.shiftKey&&u_(r,!1)))return n.preventDefault(),!0;return!1},Ie),e.registerCommand(Ub,n=>{const r=ie();if(He(r)){const i=r.getNodes();if(i.length>0)return n.preventDefault(),dc(i[0],oc(i[0])?"next":"previous"),!0}if(!oe(r))return!1;if(!n.shiftKey&&cc(r,oc(r.anchor.getNode())?"next":"previous"))return n.preventDefault(),!0;if(n.shiftKey||Go(r,"arrow","start",t.peek()),Hv(r,!0)){const i=n.shiftKey;return n.preventDefault(),Kv(r,i,!0),!0}return!1},Ie),e.registerCommand(wI,n=>{const r=ie();if(He(r)){const i=r.getNodes();if(i.length>0)return n.preventDefault(),dc(i[0],oc(i[0])?"previous":"next"),!0}if(!oe(r))return!1;if(!n.shiftKey&&cc(r,oc(r.anchor.getNode())?"previous":"next"))return n.preventDefault(),!0;if(n.shiftKey||Go(r,"arrow","end",t.peek()),Hv(r,!1)){const i=n.shiftKey;return n.preventDefault(),Kv(r,i,!1),!0}return!1},Ie),e.registerCommand(Od,n=>{const r=ie();if(!He(r)&&s_(n.target))return!1;if(oe(r)){if((function(i){if(!i.isCollapsed())return!1;const{anchor:o}=i;if(o.offset!==0)return!1;const l=o.getNode();if(Pa(l))return!1;const a=hE(l);return a.getIndent()>0&&(a.is(l)||l.is(a.getFirstDescendant()))})(r))return n.preventDefault(),e.dispatchCommand(Gh,void 0);if(Rv&&Nv)return!1}else if(!He(r))return!1;return n.preventDefault(),e.dispatchCommand(Tf,!0)},Ie),e.registerCommand(Sm,n=>{const r=ie();return!(!He(r)&&s_(n.target))&&!(!oe(r)&&!He(r))&&(n.preventDefault(),e.dispatchCommand(Tf,!1))},Ie),e.registerCommand(Dd,n=>{let r=ie();if(He(r)){const i=r.getNodes();i.length===1&&jn(i[0])&&!i[0].isInline()&&(r=i[0].selectNext())}if(!oe(r))return!1;if(Go(r,"enter","both",t.peek()),n!==null){if((Rv||SI||CI)&&Nv)return!1;if(n.preventDefault(),n.shiftKey)return e.dispatchCommand(Ov,!1)}return e.dispatchCommand(Jh,void 0)},Ie),e.registerCommand(Rd,()=>{const n=ie();return!!oe(n)&&(e.blur(),!0)},Ie),e.registerCommand(Pb,n=>{const[,r]=sc(n);if(r.length>0){const i=n.clientX,o=n.clientY,l=ku(i,o,e.getRootElement());if(l!==null){const{offset:a,node:c}=l,d=di(c);if(d!==null){const u=Ad();if(Ne(d))u.anchor.set(d.getKey(),a,"text"),u.focus.set(d.getKey(),a,"text");else{const h=d.getParentOrThrow().getKey(),g=d.getIndexWithinParent()+1;u.anchor.set(h,g,"element"),u.focus.set(h,g,"element")}const f=Xl(u);nr(f)}e.dispatchCommand(i_,r)}return n.preventDefault(),!0}return wN(n,e)},Ie),e.registerCommand(Em,n=>{const[r]=sc(n),i=ie();return!(r&&!oe(i))&&(oe(i)&&!i.isCollapsed()&&n.dataTransfer!==null&&(QE(n.dataTransfer,XE(i)),TN(n.dataTransfer,e)),!0)},Ie),e.registerCommand($b,n=>{const[r]=sc(n),i=ie();if(r&&!oe(i))return!1;const o=n.clientX,l=n.clientY,a=ku(o,l,e.getRootElement());if(a!==null){const c=di(a.node);jn(c)&&n.preventDefault()}return!0},Ie),e.registerCommand(OI,()=>{const n=ie();return sI(oe(n)&&vm(n.anchor.getNode())!==null?n:null),!0},Ie),e.registerCommand(Rb,n=>(t_(e,ti(n,ClipboardEvent)?n:null),!0),Ie),e.registerCommand(vI,n=>((async function(r,i){await t_(i,ti(r,ClipboardEvent)?r:null),i.update(()=>{const o=ie();oe(o)?o.removeText():He(o)&&o.getNodes().forEach(l=>l.remove())},{tag:Lb})})(n,e),!0),Ie),e.registerCommand(ea,n=>{const[,r,i]=sc(n);return r.length>0&&!i?(e.dispatchCommand(i_,r),!0):JI(n.target)&&nI(n.target)?!1:ie()!==null&&((function(o,l){o.preventDefault(),l.update(()=>{const a=ie(),c=ti(o,InputEvent)||ti(o,KeyboardEvent)?null:o.clipboardData;c!=null&&a!==null&&ig(c,a,l)},{tag:Gb})})(n,e),!0)},Ie),e.registerCommand(jb,()=>{const n=ie();return oe(n)&&Go(n,"space","both",t.peek()),!1},Ie),e.registerCommand(wm,()=>{const n=ie();return oe(n)&&Go(n,"tab","both",t.peek()),!1},Ie),e.registerCommand(kI,n=>{const r=ie();if(He(r))return d_(r,!1,n);if(!oe(r))return!1;const{anchor:i}=r;if(i.type!=="element"||i.offset!==0)return!1;const o=i.getNode();if(!xe(o))return!1;const l=o.getFirstChild();if(!jn(l)||!l.isInline())return!1;const a=o.getKey(),c=o.selectEnd();return n.shiftKey&&c.anchor.set(a,0,"element"),n.preventDefault(),n.stopPropagation(),!0},Ie),e.registerCommand(MI,n=>{const r=ie();if(He(r))return d_(r,!0,n);if(!oe(r))return!1;const{anchor:i,focus:o}=r,l=ft(o.getNode(),d=>xe(d)&&!d.isInline());if(l===null)return!1;const a=l.getFirstChild();if(!jn(a)||!a.isInline()||ft(i.getNode(),d=>xe(d)&&!d.isInline())!==l)return!1;const c=l.getKey();return(o.type!=="element"||o.key!==c||o.offset!==0)&&(r.focus.set(c,0,"element"),n.shiftKey||r.anchor.set(c,0,"element"),n.preventDefault(),n.stopPropagation(),!0)},Ie))}s(BN,"qt$1");rT.peek=jN;var HN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],KN={canContainEols:["highlight"],enter:{highlight:UN},exit:{highlight:WN}};function UN(e){this.enter({type:"highlight",children:[]},e)}s(UN,"enterHighlight");function WN(e){this.exit(e)}s(WN,"exitHighlight");var zN={unsafe:[{character:"=",inConstruct:"phrasing",notInConstruct:HN}],handlers:{highlight:rT}};function rT(e,t,n,r){const o=n.createTracker(r),l=n.enter("highlight");let a=o.move("==");return a+=o.move(n.containerPhrasing(e,{before:a,after:"=",...o.current()})),a+=o.move("=="),l(),a}s(rT,"handleMark");function jN(){return"="}s(jN,"peekMark");var JN=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],f_={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function iT(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}s(iT,"isDecimal");function GN(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}s(GN,"isHexadecimal");function qN(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}s(qN,"isAlphabetical");function h_(e){return qN(e)||iT(e)}s(h_,"isAlphanumerical");var ZN=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function YN(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let o=0,l=-1,a="",c,d;n.position&&("start"in n.position||"indent"in n.position?(d=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,f=(c?c.column:0)||1,h=p(),g;for(o--;++o<=e.length;)if(g===10&&(f=(d?d[l]:0)||1),g=e.charCodeAt(o),g===38){const y=e.charCodeAt(o+1);if(y===9||y===10||y===12||y===32||y===38||y===60||Number.isNaN(y)||r&&y===r){a+=String.fromCharCode(g),f++;continue}const x=o+1;let C=x,b=x,T;if(y===35){b=++C;const $=e.charCodeAt(b);$===88||$===120?(T="hexadecimal",b=++C):T="decimal"}else T="named";let M="",S="",E="";const A=T==="named"?h_:T==="decimal"?iT:GN;for(b--;++b<=e.length;){const $=e.charCodeAt(b);if(!A($))break;E+=String.fromCharCode($),T==="named"&&JN.includes(E)&&(M=E,S=v0(E))}let D=e.charCodeAt(b)===59;if(D){b++;const $=T==="named"?v0(E):!1;$&&(M=E,S=$)}let L=1+b-x,G="";if(!(!D&&n.nonTerminated===!1))if(!E)T!=="named"&&v(4,L);else if(T==="named"){if(D&&!S)v(5,1);else if(M!==E&&(b=C+M.length,L=1+b-C,D=!1),!D){const $=M?1:3;if(n.attribute){const W=e.charCodeAt(b);W===61?(v($,L),S=""):h_(W)?S="":v($,L)}else v($,L)}G=S}else{D||v(2,L);let $=Number.parseInt(E,T==="hexadecimal"?16:10);if(XN($))v(7,L),G="�";else if($ in f_)v(6,L),G=f_[$];else{let W="";QN($)&&v(6,L),$>65535&&($-=65536,W+=String.fromCharCode($>>>10|55296),$=56320|$&1023),G=W+String.fromCharCode($)}}if(G){_(),h=p(),o=b-1,f+=b-x+1,i.push(G);const $=p();$.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,G,{start:h,end:$},e.slice(x-1,b)),h=$}else E=e.slice(x-1,b),a+=E,f+=E.length,o=b-1}else g===10&&(u++,l++,f=0),Number.isNaN(g)?_():(a+=String.fromCharCode(g),f++);return i.join("");function p(){return{line:u,column:f,offset:o+((c?c.offset:0)||0)}}function v(y,x){let C;n.warning&&(C=p(),C.column+=x,C.offset+=x,n.warning.call(n.warningContext||void 0,ZN[y],C,y))}function _(){a&&(i.push(a),n.text&&n.text.call(n.textContext||void 0,a,{start:h,end:p()}),a="")}}s(YN,"parseEntities");function XN(e){return e>=55296&&e<=57343||e>1114111}s(XN,"prohibited");function QN(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}s(QN,"disallowed");var e4=/["&'<>`]/g,t4=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,n4=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r4=/[|\\{}()[\]^$+*?.]/g,g_=new WeakMap;function i4(e,t){if(e=e.replace(t.subset?o4(t.subset):e4,r),t.subset||t.escapeOnly)return e;return e.replace(t4,n).replace(n4,r);function n(i,o,l){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),t)}function r(i,o,l){return t.format(i.charCodeAt(0),l.charCodeAt(o+1),t)}}s(i4,"core");function o4(e){let t=g_.get(e);return t||(t=s4(e),g_.set(e,t)),t}s(o4,"charactersToExpressionCached");function s4(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(r4,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}s(s4,"charactersToExpression");function l4(e){return"&#x"+e.toString(16).toUpperCase()+";"}s(l4,"formatBasic");function a4(e,t){return i4(e,Object.assign({format:l4},t))}s(a4,"stringifyEntitiesLight");var oT=" ";function c4(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:f,mdxJsxFlowTagExpressionAttribute:h,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:l,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:f,mdxJsxTextTagExpressionAttribute:h,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:l},exit:{mdxJsxFlowTagClosingMarker:a,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:d,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:g,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:p,mdxJsxFlowTagAttributeNameLocal:v,mdxJsxFlowTagAttributeValueLiteral:_,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:y,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:x,mdxJsxFlowTag:C,mdxJsxTextTagClosingMarker:a,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:d,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:g,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:p,mdxJsxTextTagAttributeNameLocal:v,mdxJsxTextTagAttributeValueLiteral:_,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:y,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:x,mdxJsxTextTag:C}};function e(){this.buffer()}function t(S){return{line:S.line,column:S.column,offset:S.offset}}function n(S){this.config.enter.data.call(this,S),this.config.exit.data.call(this,S)}function r(S){const E={name:void 0,attributes:[],close:!1,selfClosing:!1,start:S.start,end:S.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=E,this.buffer()}function i(S){const E=this.data.mdxJsxTagStack;if(E.length===0)throw new un("Unexpected closing slash `/` in tag, expected an open tag first",{start:S.start,end:S.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function o(S){const E=this.data.mdxJsxTag;if(E.close)throw new un("Unexpected attribute in closing tag, expected the end of the tag",{start:S.start,end:S.end},"mdast-util-mdx-jsx:unexpected-attribute")}function l(S){const E=this.data.mdxJsxTag;if(E.close)throw new un("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:S.start,end:S.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function a(){const S=this.data.mdxJsxTag;S.close=!0}function c(S){const E=this.data.mdxJsxTag;E.name=this.sliceSerialize(S)}function d(S){const E=this.data.mdxJsxTag;E.name+="."+this.sliceSerialize(S)}function u(S){const E=this.data.mdxJsxTag;E.name+=":"+this.sliceSerialize(S)}function f(S){const E=this.data.mdxJsxTag;o.call(this,S),E.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:t(S.start),end:void 0}})}function h(S){const E=this.data.mdxJsxTag;o.call(this,S),E.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:t(S.start),end:void 0}}),this.buffer()}function g(S){const E=this.data.mdxJsxTag,A=E.attributes[E.attributes.length-1];A.type;const D=S.estree;A.value=this.resume(),A.position,A.position.end=t(S.end),D&&(A.data={estree:D})}function p(S){const E=this.data.mdxJsxTag,A=E.attributes[E.attributes.length-1];A.type,A.name=this.sliceSerialize(S),A.position,A.position.end=t(S.end)}function v(S){const E=this.data.mdxJsxTag,A=E.attributes[E.attributes.length-1];A.type,A.name+=":"+this.sliceSerialize(S),A.position,A.position.end=t(S.end)}function _(S){const E=this.data.mdxJsxTag,A=E.attributes[E.attributes.length-1];A.value=YN(this.resume(),{nonTerminated:!1}),A.position,A.position.end=t(S.end)}function y(S){const E=this.data.mdxJsxTag,A=E.attributes[E.attributes.length-1];A.type;const D={type:"mdxJsxAttributeValueExpression",value:this.resume()},L=S.estree;L&&(D.data={estree:L}),A.value=D,A.position,A.position.end=t(S.end)}function x(){const S=this.data.mdxJsxTag;S.selfClosing=!0}function C(S){const E=this.data.mdxJsxTag,A=this.data.mdxJsxTagStack,D=A[A.length-1];if(E.close&&D.name!==E.name)throw new un("Unexpected closing tag `"+M(E)+"`, expected corresponding closing tag for `"+M(D)+"` ("+Xa(D)+")",{start:S.start,end:S.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),E.close?A.pop():this.enter({type:S.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:E.name||null,attributes:E.attributes,children:[]},S,b),E.selfClosing||E.close?this.exit(S,T):A.push(E)}function b(S,E){const A=this.data.mdxJsxTagStack,D=A[A.length-1],L=S?" before the end of `"+S.type+"`":"",G=S?{start:S.start,end:S.end}:void 0;throw new un("Expected a closing tag for `"+M(D)+"` ("+Xa({start:E.start,end:E.end})+")"+L,G,"mdast-util-mdx-jsx:end-tag-mismatch")}function T(S,E){const A=this.data.mdxJsxTag;throw new un("Expected the closing tag `"+M(A)+"` either after the end of `"+E.type+"` ("+Xa(E.end)+") or another opening tag after the start of `"+E.type+"` ("+Xa(E.start)+")",{start:S.start,end:S.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function M(S){return"<"+(S.close?"/":"")+(S.name||"")+">"}}s(c4,"mdxJsxFromMarkdown");function u4(e){const t=e||{},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,o=t.printWidth||Number.POSITIVE_INFINITY,l=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return a.peek=f4,{handlers:{mdxJsxFlowElement:a,mdxJsxTextElement:a},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function a(c,d,u,f){const h=c.type==="mdxJsxFlowElement",g=c.name?!c.children||c.children.length===0:!1,p=lT(sT(u)),v=u.createTracker(f),_=u.createTracker(f),y=[],x=(h?p:"")+"<"+(c.name||""),C=u.enter(c.type);if(v.move(x),_.move(x),c.attributes&&c.attributes.length>0){if(!c.name)throw new Error("Cannot serialize fragment w/ attributes");let E=-1;for(;++E<c.attributes.length;){const A=c.attributes[E];let D;if(A.type==="mdxJsxExpressionAttribute")D="{"+(A.value||"")+"}";else{if(!A.name)throw new Error("Cannot serialize attribute w/o name");const L=A.value,G=A.name;let $="";if(L!=null)if(typeof L=="object")$="{"+(L.value||"")+"}";else{const W=r&&m0(L,n)>m0(L,l)?l:n;$=W+a4(L,{subset:[W]})+W}D=G+($?"=":"")+$}y.push(D)}}let b=!1;const T=y.join(" ");h&&(/\r?\n|\r/.test(T)||v.current().now.column+T.length+(g?i?2:3:1)>o)&&(b=!0);let M=v,S=x;if(b){M=_;let E=-1;for(;++E<y.length;)y[E]=p+oT+y[E];S+=M.move(`
14
+ `+y.join(`
15
+ `)+`
16
+ `+p)}else T&&(S+=M.move(" "+T));return g&&(S+=M.move((i||b?"":" ")+"/")),S+=M.move(">"),c.children&&c.children.length>0&&(c.type==="mdxJsxTextElement"?S+=M.move(u.containerPhrasing(c,{...M.current(),before:">",after:"<"})):(M.shift(2),S+=M.move(`
17
+ `),S+=M.move(d4(c,u,M.current())),S+=M.move(`
18
+ `))),g||(S+=M.move((h?p:"")+"</"+(c.name||"")+">")),C(),S}s(a,"mdxElement")}s(u4,"mdxJsxToMarkdown");function d4(e,t,n){const r=t.indexStack,i=e.children,o=t.createTracker(n),l=lT(sT(t)),a=[];let c=-1;for(r.push(-1);++c<i.length;){const d=i[c];r[r.length-1]=c;const u={before:`
19
+ `,after:`
20
+ `,...o.current()},f=t.handle(d,e,t,u),h=d.type==="mdxJsxFlowElement"?f:t.indentLines(f,function(g,p,v){return(v?"":l)+g});a.push(o.move(h)),d.type!=="list"&&(t.bulletLastUsed=void 0),c<i.length-1&&a.push(o.move(`
21
+
22
+ `))}return r.pop(),a.join("")}s(d4,"containerFlow$1");function sT(e){let t=0,n=e.stack.length;for(;--n>-1;){const r=e.stack[n];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&t++}return t}s(sT,"inferDepth");function lT(e){return oT.repeat(e)}s(lT,"createIndent");function f4(){return"<"}s(f4,"peekElement");var p_=Object.prototype.hasOwnProperty;function m_(e,t,n){for(n of e.keys())if(Ml(n,t))return n}s(m_,"find");function Ml(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Ml(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=m_(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=m_(t,i),!i)||!Ml(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(p_.call(e,n)&&++r&&!p_.call(t,n)||!(n in t)||!Ml(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}s(Ml,"dequal");var lg,aT,cT,uT,dT=!0;typeof process<"u"&&({FORCE_COLOR:lg,NODE_DISABLE_COLORS:aT,NO_COLOR:cT,TERM:uT}={},dT=process.stdout&&process.stdout.isTTY);var Re={enabled:!aT&&cT==null&&uT!=="dumb"&&(lg!=null&&lg!=="0"||dT),reset:ct(0,0),bold:ct(1,22),dim:ct(2,22),italic:ct(3,23),underline:ct(4,24),inverse:ct(7,27),hidden:ct(8,28),strikethrough:ct(9,29),black:ct(30,39),red:ct(31,39),green:ct(32,39),yellow:ct(33,39),blue:ct(34,39),magenta:ct(35,39),cyan:ct(36,39),white:ct(37,39),gray:ct(90,39),grey:ct(90,39),bgBlack:ct(40,49),bgRed:ct(41,49),bgGreen:ct(42,49),bgYellow:ct(43,49),bgBlue:ct(44,49),bgMagenta:ct(45,49),bgCyan:ct(46,49),bgWhite:ct(47,49)};function v_(e,t){let n=0,r,i="",o="";for(;n<e.length;n++)r=e[n],i+=r.open,o+=r.close,~t.indexOf(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return i+t+o}s(v_,"run");function h4(e,t){let n={has:e,keys:t};return n.reset=Re.reset.bind(n),n.bold=Re.bold.bind(n),n.dim=Re.dim.bind(n),n.italic=Re.italic.bind(n),n.underline=Re.underline.bind(n),n.inverse=Re.inverse.bind(n),n.hidden=Re.hidden.bind(n),n.strikethrough=Re.strikethrough.bind(n),n.black=Re.black.bind(n),n.red=Re.red.bind(n),n.green=Re.green.bind(n),n.yellow=Re.yellow.bind(n),n.blue=Re.blue.bind(n),n.magenta=Re.magenta.bind(n),n.cyan=Re.cyan.bind(n),n.white=Re.white.bind(n),n.gray=Re.gray.bind(n),n.grey=Re.grey.bind(n),n.bgBlack=Re.bgBlack.bind(n),n.bgRed=Re.bgRed.bind(n),n.bgGreen=Re.bgGreen.bind(n),n.bgYellow=Re.bgYellow.bind(n),n.bgBlue=Re.bgBlue.bind(n),n.bgMagenta=Re.bgMagenta.bind(n),n.bgCyan=Re.bgCyan.bind(n),n.bgWhite=Re.bgWhite.bind(n),n}s(h4,"chain");function ct(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),r===void 0?this:Re.enabled?v_(this.keys,r+""):r+""):r===void 0?h4([e],[n]):Re.enabled?v_([n],r+""):r+""}}s(ct,"init");function mi(){}s(mi,"Diff");mi.prototype={diff:s(function(t,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.callback;typeof i=="function"&&(o=i,i={}),this.options=i;var l=this;function a(b){return o?(setTimeout(function(){o(void 0,b)},0),!0):b}s(a,"done"),t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var c=n.length,d=t.length,u=1,f=c+d;i.maxEditLength&&(f=Math.min(f,i.maxEditLength));var h=(r=i.timeout)!==null&&r!==void 0?r:1/0,g=Date.now()+h,p=[{oldPos:-1,lastComponent:void 0}],v=this.extractCommon(p[0],n,t,0);if(p[0].oldPos+1>=d&&v+1>=c)return a([{value:this.join(n),count:n.length}]);var _=-1/0,y=1/0;function x(){for(var b=Math.max(_,-u);b<=Math.min(y,u);b+=2){var T=void 0,M=p[b-1],S=p[b+1];M&&(p[b-1]=void 0);var E=!1;if(S){var A=S.oldPos-b;E=S&&0<=A&&A<c}var D=M&&M.oldPos+1<d;if(!E&&!D){p[b]=void 0;continue}if(!D||E&&M.oldPos+1<S.oldPos?T=l.addToPath(S,!0,void 0,0):T=l.addToPath(M,void 0,!0,1),v=l.extractCommon(T,n,t,b),T.oldPos+1>=d&&v+1>=c)return a(g4(l,T.lastComponent,n,t,l.useLongestToken));p[b]=T,T.oldPos+1>=d&&(y=Math.min(y,b-1)),v+1>=c&&(_=Math.max(_,b+1))}u++}if(s(x,"execEditLength"),o)s((function b(){setTimeout(function(){if(u>f||Date.now()>g)return o();x()||b()},0)}),"exec")();else for(;u<=f&&Date.now()<=g;){var C=x();if(C)return C}},"diff"),addToPath:s(function(t,n,r,i){var o=t.lastComponent;return o&&o.added===n&&o.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:o.count+1,added:n,removed:r,previousComponent:o.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:o}}},"addToPath"),extractCommon:s(function(t,n,r,i){for(var o=n.length,l=r.length,a=t.oldPos,c=a-i,d=0;c+1<o&&a+1<l&&this.equals(n[c+1],r[a+1]);)c++,a++,d++;return d&&(t.lastComponent={count:d,previousComponent:t.lastComponent}),t.oldPos=a,c},"extractCommon"),equals:s(function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},"equals"),removeEmpty:s(function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},"removeEmpty"),castInput:s(function(t){return t},"castInput"),tokenize:s(function(t){return t.split("")},"tokenize"),join:s(function(t){return t.join("")},"join")};function g4(e,t,n,r,i){for(var o=[],l;t;)o.push(t),l=t.previousComponent,delete t.previousComponent,t=l;o.reverse();for(var a=0,c=o.length,d=0,u=0;a<c;a++){var f=o[a];if(f.removed){if(f.value=e.join(r.slice(u,u+f.count)),u+=f.count,a&&o[a-1].added){var g=o[a-1];o[a-1]=o[a],o[a]=g}}else{if(!f.added&&i){var h=n.slice(d,d+f.count);h=h.map(function(v,_){var y=r[u+_];return y.length>v.length?y:v}),f.value=e.join(h)}else f.value=e.join(n.slice(d,d+f.count));d+=f.count,f.added||(u+=f.count)}}var p=o[c-1];return c>1&&typeof p.value=="string"&&(p.added||p.removed)&&e.equals("",p.value)&&(o[c-2].value+=p.value,o.pop()),o}s(g4,"buildValues");var p4=new mi;function m4(e,t,n){return p4.diff(e,t,n)}s(m4,"diffChars");var __=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,y_=/\S/,fT=new mi;fT.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!y_.test(e)&&!y_.test(t)};fT.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&__.test(t[n])&&__.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var $m=new mi;$m.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
23
+ `));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};function v4(e,t,n){return $m.diff(e,t,n)}s(v4,"diffLines");var _4=new mi;_4.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var y4=new mi;y4.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Vc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vc=s(function(t){return typeof t},"_typeof"):Vc=s(function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},"_typeof"),Vc(e)}s(Vc,"_typeof");var x4=Object.prototype.toString,ra=new mi;ra.useLongestToken=!0;ra.tokenize=$m.tokenize;ra.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(o,l){return typeof l>"u"?n:l}:r;return typeof e=="string"?e:JSON.stringify(ag(e,null,null,i),i," ")};ra.equals=function(e,t){return mi.prototype.equals.call(ra,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function ag(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i,e));var o;for(o=0;o<t.length;o+=1)if(t[o]===e)return n[o];var l;if(x4.call(e)==="[object Array]"){for(t.push(e),l=new Array(e.length),n.push(l),o=0;o<e.length;o+=1)l[o]=ag(e[o],t,n,r,i);return t.pop(),n.pop(),l}if(e&&e.toJSON&&(e=e.toJSON()),Vc(e)==="object"&&e!==null){t.push(e),l={},n.push(l);var a=[],c;for(c in e)e.hasOwnProperty(c)&&a.push(c);for(a.sort(),o=0;o<a.length;o+=1)c=a[o],l[c]=ag(e[c],t,n,r,c);t.pop(),n.pop()}else l=e;return l}s(ag,"canonicalize");var Au=new mi;Au.tokenize=function(e){return e.slice()};Au.join=Au.removeEmpty=function(e){return e};function C4(e,t,n){return Au.diff(e,t,n)}s(C4,"diffArrays");var Ao={"--":Re.red,"··":Re.grey,"++":Re.green},Ss=Re.dim().italic,b4=Re.dim("→"),E4=Re.dim("·"),T4=Re.dim("↵"),Bc=s((e,t)=>Ao[e](e+cg(t))+`
24
+ `,"LOG"),S4=s((e,t)=>Re.dim("L"+String(e).padStart(t,"0")+" "),"LINE"),cg=s(e=>e.replace(/[ ]/g,E4).replace(/\t/g,b4).replace(/(\r?\n)/g,T4),"PRETTY");function w4(e,t,n){let r=e.removed?"--":e.added?"++":"··",i=e.value.replace(/\r?\n$/,"").split(`
25
+ `),o=0,l,a="";for(e.added?a+=Ao[r]().underline(Ss("Expected:"))+`
26
+ `:e.removed&&(a+=Ao[r]().underline(Ss("Actual:"))+`
27
+ `);o<i.length;o++)l=i[o],l!=null&&(t&&(a+=S4(t+o,n)),a+=Bc(r,l||`
28
+ `));return a}s(w4,"line");function k4(e,t){let n=C4(e,t),r=0,i=0,o=0,l,a,c,d,u,f=Bc("··","[");for(;r<n.length;r++)for(c=(l=n[r]).removed?"--":l.added?"++":"··",l.added?f+=Ao[c]().underline(Ss("Expected:"))+`
29
+ `:l.removed&&(f+=Ao[c]().underline(Ss("Actual:"))+`
30
+ `),i=0;i<l.value.length;i++)for(d=l.value[i]&&typeof l.value[i]=="object",a=cl(l.value[i]).split(/\r?\n/g),o=0;o<a.length;)u=" "+a[o++]+(d?"":","),d&&o===a.length&&i+1<l.value.length&&(u+=","),f+=Bc(c,u);return f+Bc("··","]")}s(k4,"arrays");function x_(e,t,n=0){let r=0,i,o="",l=v4(e,t),a=String(t.split(/\r?\n/g).length-n).length;for(;r<l.length;r++)o+=w4(i=l[r],n,a),n&&!i.removed&&(n+=i.count);return o}s(x_,"lines");function C_(e,t){let n=m4(e,t),r=0,i="",o,l=e.length,a=t.length,c=cg(e),d=cg(t);if(o=n[r],l!==a){if(o.removed&&n[r+1]){let u=o.count-n[r+1].count;u==0||(u>0?(t=" ".repeat(u)+t,d=" ".repeat(u)+d,a+=u):u<0&&(e=" ".repeat(-u)+e,c=" ".repeat(-u)+c,l+=-u))}}if(i+=hT(c,d,l,a),l===a)for(o=" ";r<l;r++)o+=e[r]===t[r]?" ":"^";else for(o=" ";r<n.length;r++)o+=(n[r].added||n[r].removed?"^":" ").repeat(Math.max(n[r].count,0)),r+1<n.length&&(n[r].added&&n[r+1].removed||n[r].removed&&n[r+1].added)&&(n[r+1].count-=n[r].count);return i+Re.red(o)}s(C_,"chars");function hT(e,t,n=String(e).length,r=String(t).length){let i=4,o=Math.max(n,r),l=typeof e,a=typeof t;if(l!==a){i=2;let c=i+o-n,d=i+o-r;e+=" ".repeat(c)+Re.dim(`[${l}]`),t+=" ".repeat(d)+Re.dim(`[${a}]`),n+=c+l.length+2,r+=d+a.length+2,o=Math.max(n,r)}return Ao["++"]("++"+t+" ".repeat(i+o-r)+Ss("(Expected)"))+`
31
+ `+Ao["--"]("--"+e+" ".repeat(i+o-n)+Ss("(Actual)"))+`
32
+ `}s(hT,"direct");function Iu(e,t){var n,r=0,i,o=Array.isArray(e),l=[],a=o?Array(e.length):{};if(o)for(r=0;r<a.length;r++)i=e[r],!i||typeof i!="object"?a[r]=i:a[r]=Iu(i,t[r]);else{for(n in t)l.push(n);for(;r<l.length;r++)Object.prototype.hasOwnProperty.call(e,n=l[r])&&(!(i=e[n])||typeof i!="object"?a[n]=i:a[n]=Iu(i,t[n]));for(n in e)a.hasOwnProperty(n)||(a[n]=e[n])}return a}s(Iu,"sort");function M4(){var e=new Set;return s(function(n,r){return r===void 0?"[__VOID__]":typeof r=="number"&&r!==r?"[__NAN__]":typeof r=="bigint"?r.toString():!r||typeof r!="object"?r:e.has(r)?"[Circular]":(e.add(r),r)},"print")}s(M4,"circular");function cl(e){return JSON.stringify(e,M4(),2).replace(/"\[__NAN__\]"/g,"NaN").replace(/"\[__VOID__\]"/g,"undefined")}s(cl,"stringify");function A4(e,t){if(Array.isArray(t)&&Array.isArray(e))return k4(e,t);if(t instanceof RegExp)return C_(""+e,""+t);let n=e&&typeof e=="object",r=t&&typeof t=="object";return n&&r&&(e=Iu(e,t)),r&&(t=cl(t)),n&&(e=cl(e)),t&&typeof t=="object"&&(e=cl(Iu(e,t)),t=cl(t)),n=typeof e=="string",r=typeof t=="string",n&&/\r?\n/.test(e)?x_(e,""+t):r&&/\r?\n/.test(t)?x_(""+e,t):n&&r?C_(e,t):hT(e,t)}s(A4,"compare");function Nu(e){e=e.replace(/\r?\n/g,`
33
+ `);let t=e.match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,i=(t||[]).length;for(;n<i;n++)r=Math.min(r,t[n].length);return i&&r?e.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):e}s(Nu,"dedent");var I4=class extends Error{static{s(this,"Assertion")}constructor(e={}){super(e.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=e.details||!1,this.generated=!!e.generated,this.operator=e.operator,this.expects=e.expects,this.actual=e.actual}};function En(e,t,n,r,i,o,l){if(e)return;let a=l||o;if(l instanceof Error)throw l;let c=i&&i(t,n);throw new I4({actual:t,expects:n,operator:r,message:a,details:c,generated:!l})}s(En,"assert");function N4(e,t){En(!!e,!1,!0,"ok",!1,"Expected value to be truthy",t)}s(N4,"ok");function O4(e,t,n){En(e===t,e,t,"is",A4,"Expected values to be strictly equal:",n)}s(O4,"is");function fi(e,t){En(!e,!0,!1,"not",!1,"Expected value to be falsey",t)}s(fi,"not");fi.ok=fi;O4.not=function(e,t,n){En(e!==t,e,t,"is.not",!1,"Expected values not to be strictly equal",n)};fi.equal=function(e,t,n){En(!Ml(e,t),e,t,"not.equal",!1,"Expected values not to be deeply equal",n)};fi.type=function(e,t,n){let r=typeof e;En(r!==t,r,t,"not.type",!1,`Expected "${r}" not to be "${t}"`,n)};fi.instance=function(e,t,n){let r="`"+(t.name||t.constructor.name)+"`";En(!(e instanceof t),e,t,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)};fi.snapshot=function(e,t,n){e=Nu(e),t=Nu(t),En(e!==t,e,t,"not.snapshot",!1,"Expected value not to match snapshot",n)};fi.fixture=function(e,t,n){e=Nu(e),t=Nu(t),En(e!==t,e,t,"not.fixture",!1,"Expected value not to match fixture",n)};fi.match=function(e,t,n){typeof t=="string"?En(!e.includes(t),e,t,"not.match",!1,`Expected value not to include "${t}" substring`,n):En(!t.test(e),e,t,"not.match",!1,`Expected value not to match \`${String(t)}\` pattern`,n)};fi.throws=function(e,t,n){!n&&typeof t=="string"&&(n=t,t=null);try{e()}catch(r){typeof t=="function"?En(!t(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):t instanceof RegExp?En(!t.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(t)}\` pattern`,n):t||En(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};var nl={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},b_={attentionSideAfter:2,attentionSideBefore:1,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:"content",contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},E_={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkDocument:"chunkDocument",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"},rl="highlightSequenceTemporary",T_="highlightSequence",D4="highlight",R4="highlightText";function L4(){const e={name:"highlight",tokenize:n,resolveAll:t};return{text:{[nl.equalsTo]:e},insideSpan:{null:[e]},attentionMarkers:{null:[nl.equalsTo]}};function t(r,i){let o=-1;for(;++o<r.length;)if(r[o][0]==="enter"&&r[o][1].type===rl&&r[o][1]._close){let l=o;for(;l--;)if(r[l][0]==="exit"&&r[l][1].type===rl&&r[l][1]._open&&r[o][1].end.offset-r[o][1].start.offset===r[l][1].end.offset-r[l][1].start.offset){r[o][1].type=T_,r[l][1].type=T_;const a={type:D4,start:Object.assign({},r[l][1].start),end:Object.assign({},r[o][1].end)},c={type:R4,start:Object.assign({},r[l][1].end),end:Object.assign({},r[o][1].start)},d=[["enter",a,i],["enter",r[l][1],i],["exit",r[l][1],i],["enter",c,i]],u=i.parser.constructs.insideSpan.null;u&&lf(d,d.length,0,Gk(u,r.slice(l+1,o),i)),lf(d,d.length,0,[["exit",c,i],["enter",r[o][1],i],["exit",r[o][1],i],["exit",a,i]]),lf(r,l-1,o-l+3,d),o=l+d.length-2;break}}for(o=-1;++o<r.length;)r[o][1].type===rl&&(r[o][1].type=E_.data);return r}function n(r,i,o){const l=this.previous,a=this.events;let c=0;return d;function d(f){return N4(f===nl.equalsTo,"expected `=`"),l===nl.equalsTo&&a[a.length-1][1].type!==E_.characterEscape?o(f):(r.enter(rl),u(f))}function u(f){const h=y0(l);if(f===nl.equalsTo)return c>1?o(f):(r.consume(f),c++,u);if(c<2)return o(f);const g=r.exit(rl),p=y0(f);return g._open=!p||p===b_.attentionSideAfter&&!!h,g._close=!h||h===b_.attentionSideAfter&&!!p,i(f)}}}s(L4,"highlightMark");var $4={}.hasOwnProperty,P4=Symbol("continue"),Df=Symbol("exit"),F4=Symbol("skip");function V4(e,t){let n,r;typeof t=="function"?n=t:t&&typeof t=="object"&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(o,l,a,c){return Rf(o)&&(d.displayName="node ("+o.type+")"),d;function d(){const u=n?S_(n(o,l,a,c)):[];if(u[0]===Df)return u;if(u[0]!==F4){let f;for(f in o)if($4.call(o,f)&&o[f]&&typeof o[f]=="object"&&f!=="data"&&f!=="position"){const h=c.concat(o),g=o[f];if(Array.isArray(g)){const p=g;let v=0;for(;v>-1&&v<p.length;){const _=p[v];if(Rf(_)){const y=i(_,f,v,h)();if(y[0]===Df)return y;v=typeof y[1]=="number"?y[1]:v+1}else v++}}else if(Rf(g)){const p=i(g,f,void 0,h)();if(p[0]===Df)return p}}}return r?S_(r(o,l,a,c)):u}s(d,"visit")}s(i,"build")}s(V4,"visit");function S_(e){return Array.isArray(e)?e:typeof e=="number"?[P4,e]:[e]}s(S_,"toResult");function Rf(e){return!!(e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.length>0)}s(Rf,"nodelike");function B4(e,t){const n=t.prefix||"",r=t.suffix||"",i=Object.assign({},t.acornOptions),o=[],l=[],a=i.onComment,c=i.onToken;let d=!1,u,f;const h=Object.assign({},i,{onComment:o,preserveParens:!0});c&&(h.onToken=l);const g=H4(e,t.tokenTypes),p=g.value,v=n+p+r,_=t.expression&&w_(p);if(_&&!t.allowEmpty)throw new un("Unexpected empty expression",{place:x(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{u=t.expression&&!_?t.acorn.parseExpressionAt(v,0,h):t.acorn.parse(v,h)}catch(C){const b=C,T=x(b.pos);b.message=String(b.message).replace(/ \(\d+:\d+\)$/,""),b.pos=T.offset,b.loc={line:T.line,column:T.column-1},f=b,d=b.raisedAt>=n.length+p.length||b.message==="Unterminated comment"}if(u&&t.expression&&!_)if(w_(v.slice(u.end,v.length-r.length)))u={type:"Program",start:0,end:n.length+p.length,body:[{type:"ExpressionStatement",expression:u,start:0,end:n.length+p.length}],sourceType:"module",comments:[]};else{const C=x(u.end),b=new Error("Unexpected content after expression");b.pos=C.offset,b.loc={line:C.line,column:C.column-1},f=b,u=void 0}if(u){if(u.comments=o,V4(u,function(C,b,T,M){let S=M[M.length-1],E=b;C.type==="ParenthesizedExpression"&&S&&E&&(typeof T=="number"&&(S=S[E],E=T),S[E]=C.expression),y(C)}),Array.isArray(a))a.push(...o);else if(typeof a=="function")for(const C of o)a(C.type==="Block",C.value,C.start,C.end,C.loc.start,C.loc.end);for(const C of l)C.end<=n.length||C.start-n.length>=p.length||(y(C),Array.isArray(c)?c.push(C):c(C))}return{estree:u,error:f,swallow:d};function y(C){const b=x(C.start),T=x(C.end);C.start=b.offset,C.end=T.offset,C.loc={start:{line:b.line,column:b.column-1,offset:b.offset},end:{line:T.line,column:T.column-1,offset:T.offset}},C.range=[C.start,C.end]}function x(C){let b=C-n.length;b<0?b=0:b>p.length&&(b=p.length);let T=K4(g.stops,b);return T||(T={line:t.start.line,column:t.start.column,offset:t.start.offset}),T}}s(B4,"eventsToAcorn");function w_(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}s(w_,"empty$1");function H4(e,t){const n={value:"",stops:[]};let r=-1;for(;++r<e.length;){const i=e[r];if(i[0]==="enter"){const o=i[1].type;if(o==="lineEnding"||t.includes(o)){const l=i[2].sliceStream(i[1]);for(;l.length>0&&l[0]===-1;)l.shift();const a=U4(l);n.stops.push([n.value.length,i[1].start]),n.value+=a,n.stops.push([n.value.length,i[1].end])}}}return n}s(H4,"collect");function K4(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;const[r,i]=e[n-1],o=t-r;return{line:i.line,column:i.column+o,offset:i.offset+o}}s(K4,"relativeToPoint");function U4(e){let t=-1;const n=[];let r;for(;++t<e.length;){const i=e[t];let o;if(typeof i=="string")o=i;else switch(i){case-5:o="\r";break;case-4:o=`
34
+ `;break;case-3:o=`\r
35
+ `;break;case-2:o=" ";break;case-1:if(r)continue;o=" ";break;default:o=String.fromCharCode(i)}r=i===-2,n.push(o)}return n.join("")}s(U4,"serializeChunks");function Lf(e){const t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=k_(n.start,r[0]||t.start),o=k_(n.end,r[1]||t.end);if(i&&o)return{start:i,end:o}}s(Lf,"positionFromEstree");function k_(e,t){if(e&&typeof e=="object"){const n="line"in e?$f(e.line):void 0,r="column"in e?$f(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:$f(t)}}}s(k_,"pointOrUndefined");function $f(e){return typeof e=="number"&&e>-1?e:void 0}s($f,"numberOrUndefined");var cs="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",W4="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",z4="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",M_="#unexpected-type-in-code-expected-an-object-spread-spread",j4="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",J4="#could-not-parse-expression-with-acorn";function A_(e,t,n,r,i,o,l,a,c,d,u){const f=this,h=this.events.length+3;let g=0,p,v;return _;function _(b){return e.enter(n),e.enter(r),e.consume(b),e.exit(r),p=f.now(),y}function y(b){if(b===null){if(v)throw v;const T=new un("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:f.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw T.url=cs+W4,T}if(Ir(b))return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),C;if(b===125&&g===0){const T=o?G4.call(f,o,l,i,h,p,d||!1,c||!1):{type:"ok",estree:void 0};if(T.type==="ok"){e.enter(r),e.consume(b),e.exit(r);const M=e.exit(n);return a&&T.estree&&Object.assign(M,{estree:T.estree}),t}return v=T.message,e.enter(i),e.consume(b),x}return e.enter(i),x(b)}function x(b){return b===125&&g===0||b===null||Ir(b)?(e.exit(i),y(b)):(b===123&&!o?g+=1:b===125&&(g-=1),e.consume(b),x)}function C(b){const T=f.now();if(T.line!==p.line&&!u&&f.parser.lazy[T.line]){const M=new un("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:f.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw M.url=cs+z4,M}return Gc(b)?sp(e,y,"linePrefix",3)(b):y(b)}}s(A_,"factoryMdxExpression");function G4(e,t,n,r,i,o,l){const a=B4(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:o,prefix:l?"({":"",suffix:l?"})":""}),c=a.estree;if(l&&c){const d=c.body[0];if(d.type!=="ExpressionStatement"||d.expression.type!=="ObjectExpression"){const u=Lf(d),f=new un("Unexpected `"+d.type+"` in code: expected an object spread (`{...spread}`)",{place:u.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw f.url=cs+M_,f}if(d.expression.properties[1]){const u=Lf(d.expression.properties[1]),f=new un("Unexpected extra content in spread: only a single spread is supported",{place:u.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw f.url=cs+j4,f}if(d.expression.properties[0]&&d.expression.properties[0].type!=="SpreadElement"){const u=Lf(d.expression.properties[0]),f=new un("Unexpected `"+d.expression.properties[0].type+"` in code: only spread elements are supported",{place:u.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw f.url=cs+M_,f}}if(a.error){const d=new un("Could not parse expression with acorn",{cause:a.error,place:{line:a.error.loc.line,column:a.error.loc.column+1,offset:a.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return d.url=cs+J4,{type:"nok",message:d}}return{type:"ok",estree:c}}s(G4,"mdxExpressionParse");var I_="https://github.com/micromark/micromark-extension-mdx-jsx";function gT(e,t,n,r,i,o,l,a,c,d,u,f,h,g,p,v,_,y,x,C,b,T,M,S,E,A,D,L,G,$,W,z){const me=this;let q,le;return ye;function ye(I){return e.enter(a),e.enter(c),e.consume(I),e.exit(c),X}function X(I){return ro(I)?n(I):(q=ne,Le(I))}function ne(I){if(I===47)return e.enter(d),e.consume(I),e.exit(d),q=he,Le;if(I===62)return kn(I);if(I!==null&&I>=0&&lr(I))return e.enter(f),e.enter(h),e.consume(I),ge;je(I,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(I===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function he(I){if(I===62)return kn(I);if(I!==null&&I>=0&&lr(I))return e.enter(f),e.enter(h),e.consume(I),ge;je(I,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(I===42||I===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function ge(I){if(I!==null&&I>=0&&Zs(I,{jsx:!0}))return e.consume(I),ge;if(I===46||I===47||I===58||I===62||I===123||ro(I)||Ti(I))return e.exit(h),q=se,Le(I);je(I,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(I===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function se(I){if(I===46)return e.enter(g),e.consume(I),e.exit(g),q=Z,Le;if(I===58)return e.enter(v),e.consume(I),e.exit(v),q=De,Le;if(I===47||I===62||I===123||I!==null&&I>=0&&lr(I))return e.exit(f),Pe(I);je(I,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Z(I){if(I!==null&&I>=0&&lr(I))return e.enter(p),e.consume(I),ee;je(I,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ee(I){if(I!==null&&I>=0&&Zs(I,{jsx:!0}))return e.consume(I),ee;if(I===46||I===47||I===62||I===123||ro(I)||Ti(I))return e.exit(p),q=pe,Le(I);je(I,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(I===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function pe(I){if(I===46)return e.enter(g),e.consume(I),e.exit(g),q=Z,Le;if(I===47||I===62||I===123||I!==null&&I>=0&&lr(I))return e.exit(f),Pe(I);je(I,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function De(I){if(I!==null&&I>=0&&lr(I))return e.enter(_),e.consume(I),Ae;je(I,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(I===43||I!==null&&I>46&&I<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function Ae(I){if(I!==null&&I>=0&&Zs(I,{jsx:!0}))return e.consume(I),Ae;if(I===47||I===62||I===123||ro(I)||Ti(I))return e.exit(_),q=Ge,Le(I);je(I,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Ge(I){if(I===47||I===62||I===123||I!==null&&I>=0&&lr(I))return e.exit(f),Pe(I);je(I,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Pe(I){if(I===47)return e.enter(u),e.consume(I),e.exit(u),q=Xt,Le;if(I===62)return kn(I);if(I===123)return A_.call(me,e,lt,y,x,C,r,i,o,!0,!1,l)(I);if(I!==null&&I>=0&&lr(I))return e.enter(b),e.enter(T),e.enter(M),e.consume(I),Ye;je(I,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function lt(I){return q=Pe,Le(I)}function Ye(I){if(I!==null&&I>=0&&Zs(I,{jsx:!0}))return e.consume(I),Ye;if(I===47||I===58||I===61||I===62||I===123||ro(I)||Ti(I))return e.exit(M),q=at,Le(I);je(I,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function at(I){if(I===58)return e.enter(S),e.consume(I),e.exit(S),q=Et,Le;if(I===61)return e.exit(T),e.enter(A),e.consume(I),e.exit(A),q=ze,Le;if(I===47||I===62||I===123||ro(I)||Ti(I)||I!==null&&I>=0&&lr(I))return e.exit(T),e.exit(b),q=Pe,Le(I);je(I,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Et(I){if(I!==null&&I>=0&&lr(I))return e.enter(E),e.consume(I),yt;je(I,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function yt(I){if(I!==null&&I>=0&&Zs(I,{jsx:!0}))return e.consume(I),yt;if(I===47||I===61||I===62||I===123||ro(I)||Ti(I))return e.exit(E),e.exit(T),q=Pt,Le(I);je(I,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Pt(I){if(I===61)return e.enter(A),e.consume(I),e.exit(A),q=ze,Le;if(I===47||I===62||I===123||I!==null&&I>=0&&lr(I))return e.exit(b),Pe(I);je(I,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function ze(I){if(I===34||I===39)return e.enter(D),e.enter(L),e.consume(I),e.exit(L),le=I,Ft;if(I===123)return A_.call(me,e,Nt,$,W,z,r,i,o,!1,!1,l)(I);je(I,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(I===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function Nt(I){return e.exit(b),q=Pe,Le(I)}function Ft(I){return I===null&&je(I,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(le)+"`"),I===le?(e.enter(L),e.consume(I),e.exit(L),e.exit(D),e.exit(b),le=void 0,q=Pe,Le):Ir(I)?(q=Ft,Le(I)):(e.enter(G),it(I))}function it(I){return I===null||I===le||Ir(I)?(e.exit(G),Ft(I)):(e.consume(I),it)}function Xt(I){if(I===62)return kn(I);je(I,"after self-closing slash","`>` to end the tag"+(I===42||I===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function kn(I){return e.enter(c),e.consume(I),e.exit(c),e.exit(a),t}function Le(I){return Ir(I)?(e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),Vn):Gc(I)||Ti(I)?(e.enter("esWhitespace"),ln(I)):q(I)}function ln(I){return Ir(I)?(e.exit("esWhitespace"),Le(I)):Gc(I)||Ti(I)?(e.consume(I),ln):(e.exit("esWhitespace"),q(I))}function Vn(I){if(!l&&me.parser.lazy[me.now().line]){const R=new un("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",me.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw R.url=I_+"#unexpected-lazy-line-in-container-expected-line-to-be",R}return Le(I)}function je(I,R,Y){const Te=new un("Unexpected "+(I===null?"end of file":"character `"+(I===96?"` ` `":String.fromCodePoint(I))+"` ("+q4(I)+")")+" "+R+", expected "+Y,me.now(),"micromark-extension-mdx-jsx:unexpected-"+(I===null?"eof":"character"));throw Te.url=I_+(I===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),Te}}s(gT,"factoryTag");function q4(e){return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}s(q4,"serializeCharCode");function Z4(e,t){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,o){return gT.call(this,r,i,o,e,t.acornOptions,t.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}s(Z4,"jsxText");function Y4(e,t){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:n};function n(r,i,o){const l=this;return a;function a(f){return c(f)}function c(f){return gT.call(l,r,d,o,e,t.acornOptions,t.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(f)}function d(f){return Gc(f)?sp(r,u,"whitespace")(f):u(f)}function u(f){const h=l.parser.constructs.flow[123],g=Array.isArray(h)?h:h?[h]:[];let p;for(const v of g)if(v.name==="mdxFlowExpression"){p=v;break}return f===60?a(f):f===123&&p?r.attempt(p,u,o)(f):f===null||Ir(f)?i(f):o(f)}}}s(Y4,"jsxFlow");function X4(e){const t=e||{},n=t.acorn;let r;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:Y4(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:Z4(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}s(X4,"mdxJsx");function Q4(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}s(Q4,"mdxMd");var N_={}.hasOwnProperty;function eO(e,t){const n=t||{};function r(i,...o){let l=r.invalid;const a=r.handlers;if(i&&N_.call(i,e)){const c=String(i[e]);l=N_.call(a,c)?a[c]:r.unknown}if(l)return l.call(this,i,...o)}return s(r,"one"),r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}s(eO,"zwitch");var tO={}.hasOwnProperty;function pT(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)pT(e,t.extensions[n]);for(r in t)if(tO.call(t,r))switch(r){case"extensions":break;case"unsafe":O_(e[r],t[r]);break;case"join":O_(e[r],t[r]);break;case"handlers":nO(e[r],t[r]);break;default:e.options[r]=t[r]}return e}s(pT,"configure");function O_(e,t){t&&e.push(...t)}s(O_,"list");function nO(e,t){t&&Object.assign(e,t)}s(nO,"map");var rO=[iO];function iO(e,t,n,r){if(t.type==="code"&&_0(t,r)&&(e.type==="list"||e.type===t.type&&_0(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&Qk(t,r))?void 0:n.spread?1:0}s(iO,"joinDefaults");var so=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],oO=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
36
+ `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:so},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
37
+ ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:so},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
38
+ *])`},{character:"*",inConstruct:"phrasing",notInConstruct:so},{atBreak:!0,character:"+",after:`(?:[ \r
39
+ ])`},{atBreak:!0,character:"-",after:`(?:[ \r
40
+ -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
41
+ ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:so},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:so},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:so},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:so},{atBreak:!0,character:"~"}];function sO(e){return e.label||!e.identifier?e.label||"":h9(e.identifier)}s(sO,"association");function lO(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}s(lO,"compilePattern");function aO(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let l=-1,a=n.before,c;r.push(-1);let d=t.createTracker(n);for(;++l<i.length;){const u=i[l];let f;if(r[r.length-1]=l,l+1<i.length){let p=t.handle.handlers[i[l+1].type];p&&p.peek&&(p=p.peek),f=p?p(i[l+1],e,t,{before:"",after:"",...d.current()}).charAt(0):""}else f=n.after;o.length>0&&(a==="\r"||a===`
42
+ `)&&u.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",d=t.createTracker(n),d.move(o.join("")));let h=t.handle(u,e,t,{...d.current(),after:f,before:a});c&&c===h.slice(0,1)&&(h=sh(c.charCodeAt(0))+h.slice(1));const g=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,c=void 0,g&&(o.length>0&&g.before&&a===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+sh(a.charCodeAt(0))),g.after&&(c=f)),d.move(h),o.push(h),a=h.slice(-1)}return r.pop(),o.join("")}s(aO,"containerPhrasing");function cO(e,t,n){const r=t.indexStack,i=e.children||[],o=t.createTracker(n),l=[];let a=-1;for(r.push(-1);++a<i.length;){const c=i[a];r[r.length-1]=a,l.push(o.move(t.handle(c,e,t,{before:`
43
+ `,after:`
44
+ `,...o.current()}))),c.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&l.push(o.move(uO(c,i[a+1],e,t)))}return r.pop(),l.join("")}s(cO,"containerFlow");function uO(e,t,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](e,t,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
45
+ `.repeat(1+o);if(o===!1)return`
46
+
47
+ <!---->
48
+
49
+ `}return`
50
+
51
+ `}s(uO,"between");var dO=/\r?\n|\r/g;function fO(e,t){const n=[];let r=0,i=0,o;for(;o=dO.exec(e);)l(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return l(e.slice(r)),n.join("");function l(a){n.push(t(a,i,!a))}s(l,"one")}s(fO,"indentLines");function hO(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],l={};let a=-1;for(;++a<e.unsafe.length;){const u=e.unsafe[a];if(!qk(e.stack,u))continue;const f=e.compilePattern(u);let h;for(;h=f.exec(r);){const g="before"in u||!!u.atBreak,p="after"in u,v=h.index+(g?h[1].length:0);i.includes(v)?(l[v].before&&!g&&(l[v].before=!1),l[v].after&&!p&&(l[v].after=!1)):(i.push(v),l[v]={before:g,after:p})}}i.sort(gO);let c=n.before?n.before.length:0;const d=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){const u=i[a];u<c||u>=d||u+1<d&&i[a+1]===u+1&&l[u].after&&!l[u+1].before&&!l[u+1].after||i[a-1]===u-1&&l[u].before&&!l[u-1].before&&!l[u-1].after||(c!==u&&o.push(D_(r.slice(c,u),"\\")),c=u,/[!-/:-@[-`{-~]/.test(r.charAt(u))&&(!n.encode||!n.encode.includes(r.charAt(u)))?o.push("\\"):(o.push(sh(r.charCodeAt(u))),c++))}return o.push(D_(r.slice(c,d),n.after)),o.join("")}s(hO,"safe");function gO(e,t){return e-t}s(gO,"numerical");function D_(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t;let l=-1,a=0,c;for(;c=n.exec(o);)r.push(c.index);for(;++l<r.length;)a!==r[l]&&i.push(e.slice(a,r[l])),i.push("\\"),a=r[l];return i.push(e.slice(a)),i.join("")}s(D_,"escapeBackslashes");function pO(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:c,current:l,shift:a};function l(){return{now:{line:i,column:o},lineShift:r}}function a(d){r+=d}function c(d){const u=d||"",f=u.split(/\r?\n|\r/g),h=f[f.length-1];return i+=f.length-1,o=f.length===1?o+h.length:1+h.length+r,u}}s(pO,"track");function mT(e,t){const n=t||{},r={associationId:sO,containerPhrasing:yO,containerFlow:xO,createTracker:pO,compilePattern:lO,enter:o,handlers:{...g9},handle:void 0,indentLines:fO,indexStack:[],join:[...rO],options:{},safe:CO,stack:[],unsafe:[...oO]};pT(r,n),r.options.tightDefinitions&&r.join.push(_O),r.handle=eO("type",{invalid:mO,unknown:vO,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
52
+ `,after:`
53
+ `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
54
+ `),i;function o(l){return r.stack.push(l),a;function a(){r.stack.pop()}s(a,"exit")}s(o,"enter")}s(mT,"toMarkdown");function mO(e){throw new Error("Cannot handle value `"+e+"`, expected node")}s(mO,"invalid$1");function vO(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}s(vO,"unknown");function _O(e,t){if(e.type==="definition"&&e.type===t.type)return 0}s(_O,"joinDefinition");function yO(e,t){return aO(e,this,t)}s(yO,"containerPhrasingBound");function xO(e,t){return cO(e,this,t)}s(xO,"containerFlowBound");function CO(e,t){return hO(this,e,t)}s(CO,"safeBound");var bO=["mdxJsxTextElement","mdxJsxFlowElement"];function vT(e){return bO.includes(e.type)&&EO.includes(e.name)}s(vT,"isMdastHTMLNode");var EO=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","input","ins","kbd","label","legend","li","link","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function TO(e,t){const n=R_(e),r=R_(t);return SO({...n,...r})}s(TO,"mergeStyleAttributes");function R_(e){const t={};return e.split(";").filter(n=>n.trim()!=="").forEach(n=>{const[r,i]=n.split(":").map(o=>o.trim());t[r]=i}),t}s(R_,"styleToObject");function SO(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}s(SO,"objectToStyle");function wO(e){return e.children instanceof Array}s(wO,"isParent$1");function _T({root:e,visitors:t,jsxComponentDescriptors:n,jsxIsAvailable:r,addImportStatements:i=!0}){let o=null;const l=new Set,a=new Map;t=[...t].sort((y,x)=>(x.priority??0)-(y.priority??0)),f(e,null);function c(y,x){l.add(y),x&&a.set(y,{...x})}s(c,"registerReferredComponent");function d(y,x){if(o===null)return o=x,o;if(!wO(y))throw new Error("Attempting to append children to a non-parent");const C=y.children,b=C.at(-1);if(b){const T=t.find(M=>{var S;return(S=M.shouldJoin)==null?void 0:S.call(M,b,x)});if(T){const M=T.join(b,x);return C.splice(C.length-1,1,M),M}}return C.push(x),x}s(d,"appendToParent");function u(y,x){y.getChildren().forEach(C=>{f(C,x)})}s(u,"visitChildren");function f(y,x,C=null){var b;const T=t.find((M,S)=>{var E;return C?.has(S)?!1:(E=M.testLexicalNode)==null?void 0:E.call(M,y)});if(!T)throw new Error(`no lexical visitor found for ${y.getType()}`,{cause:y});(b=T.visitLexicalNode)==null||b.call(T,{lexicalNode:y,mdastParent:x,actions:{addAndStepInto(M,S={},E=!0){const A={type:M,...S,...E?{children:[]}:{}};d(x,A),xe(y)&&E&&u(y,A)},appendToParent:d,visitChildren:u,visit:f,registerReferredComponent:c,nextVisitor(){f(y,x,(C??new Set).add(t.indexOf(T)))}}})}if(s(f,"visit"),o===null)throw new Error("traversal ended with no root element");const h=new Map,g=new Map;for(const y of l){const x=n.find(C=>C.name===y)??a.get(y)??n.find(C=>C.name==="*");if(!x)throw new Error(`Component ${y} is used but not imported`);if(x.source)if(x.defaultExport)g.set(y,x.source);else{const{source:C}=x,b=h.get(C);b?b.push(y):h.set(C,[y])}}if(!i){for(const[y,x]of h.entries()){const C=x.filter(b=>a.has(b));C.length>0?h.set(y,C):h.delete(y)}for(const y of g.keys())a.has(y)||g.delete(y)}const p=Array.from(h).map(([y,x])=>({type:"mdxjsEsm",value:`import { ${x.join(", ")} } from '${y}'`}));p.push(...Array.from(g).map(([y,x])=>({type:"mdxjsEsm",value:`import ${y} from '${x}'`})));const v=o,_=v.children.find(y=>y.type==="yaml");return _?v.children.splice(v.children.indexOf(_)+1,0,...p):v.children.unshift(...p),Hc(v,[]),yT(v),r||xT(v),v}s(_T,"exportLexicalTreeToMdast");function yT(e){if("children"in e&&e.children.length>0){if(vT(e)&&e.children.length===1){const t=e.children[0];t.type==="mdxJsxTextElement"&&t.name==="span"&&(t.attributes.forEach(n=>{if(n.type==="mdxJsxAttribute"){const r=e.attributes.find(i=>i.type==="mdxJsxAttribute"&&i.name===n.name);if(r)if(n.name==="className"){const i=new Set([...r.value.split(" "),...n.value.split(" ")]);r.value=Array.from(i).join(" ")}else n.name==="style"&&(r.value=TO(r.value,n.value));else e.attributes.push(n)}}),e.children=t.children)}e.children.forEach(t=>{yT(t)})}}s(yT,"collapseNestedHtmlTags");function xT(e){if(Object.hasOwn(e,"children")){const t=e,n=[];t.children.forEach(r=>{r.type==="mdxJsxTextElement"&&r.name==="u"?n.push({type:"html",value:"<u>"},...r.children,{type:"html",value:"</u>"}):(n.push(r),xT(r))}),t.children=n}}s(xT,"convertUnderlineJsxToHtml");var L_=/\s+$/,$_=/^\s+/;function Hc(e,t){if(e.type==="strong"||e.type==="emphasis"){const n=e.children.at(-1);if(n?.type==="text"){const i=L_.exec(n.value);if(i){n.value=n.value.replace(L_,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e)+1,0,{type:"text",value:i[0]}),Hc(o,t.slice(0,-1)))}}const r=e.children.at(0);if(r?.type==="text"){const i=$_.exec(r.value);if(i){r.value=r.value.replace($_,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e),0,{type:"text",value:i[0]}),Hc(o,t.slice(0,-1)))}}}if("children"in e&&e.children.length>0){const n=e;n.children.forEach(r=>{Hc(r,[...t,n])})}}s(Hc,"fixWrappingWhitespace");function CT({root:e,toMarkdownOptions:t,toMarkdownExtensions:n,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}){return mT(_T({root:e,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}),{extensions:n,...t})+`
55
+ `}s(CT,"exportMarkdownFromLexical");var fo=class extends Error{static{s(this,"JsxKindMismatchError")}constructor(e,t,n,r){const i=e.name??"Fragment",o=e.type==="mdxJsxFlowElement"?"flow":"text",l=r?` ${r}`:"";super(`JSX component "${i}" was parsed as ${o} but is declared as ${t.kind} (kindMismatchPolicy: "${n}").${l}`),this.name="JsxKindMismatchError"}},kO=new Set(["paragraph","heading","emphasis","strong","delete","link","linkReference","tableCell","footnote","mdxJsxTextElement","textDirective","leafDirective"]),MO=new Set(["root","blockquote","listItem","footnoteDefinition","mdxJsxFlowElement","containerDirective"]);function Kc(e){return e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement"}s(Kc,"isJsxNode");function bT(e,t){return t.find(n=>n.name===e.name)??t.find(n=>n.name==="*")}s(bT,"findDescriptor");function Uc(e,t){return(e.type==="mdxJsxFlowElement"?"flow":"text")!==t.kind}s(Uc,"isMismatch");function ET(e,t,n){if(Kc(e)){const r=bT(e,t);if(r&&n(e)&&Uc(e,r))throw new fo(e,r,"error")}"children"in e&&e.children.forEach(r=>{ET(r,t,n)})}s(ET,"assertNoMismatches");function AO(e,t,n){const r=s(f=>n(f)?bT(f,t):void 0,"findOwnedDescriptor");function i(f){const h=kO.has(f.type)?"phrasing":MO.has(f.type)?"flow":"structural";return h==="phrasing"?f.children=f.children.flatMap(g=>a(g,f.type)):h==="flow"?f.children=f.children.flatMap(g=>d(g)):f.children=f.children.map(g=>l(g,f.type)),f}s(i,"normalizeParent");function o(f){return"children"in f&&i(f),f}s(o,"normalizeDescendants");function l(f,h){if(Kc(f)){const g=r(f);if(g&&Uc(f,g))throw new fo(f,g,"normalize",`The ${h} parent does not declare whether its children are flow or phrasing content.`)}return o(f)}s(l,"normalizeStructuralChild");function a(f,h){if(!Kc(f))return[o(f)];const g=r(f);if(!g||!Uc(f,g))return[o(f)];if(f.type==="mdxJsxTextElement")throw new fo(f,g,"normalize",`It cannot be lifted from ${h} without changing surrounding phrasing content.`);return[o(u(f,g))]}s(a,"normalizePhrasingChild");function c(f){const h=f.children.find(p=>{if(p.type!=="mdxJsxTextElement")return!1;const v=r(p);return v?.kind==="flow"});if(!h)return[i(f)];const g=r(h);if(f.children.length!==1)throw new fo(h,g,"normalize","It has surrounding phrasing content, and normalization would need to split the paragraph.");return[o({...h,type:"mdxJsxFlowElement",children:h.children.length===0?[]:[{type:"paragraph",children:h.children}]})]}s(c,"normalizeParagraph");function d(f){if(f.type==="paragraph")return c(f);if(!Kc(f))return[o(f)];const h=r(f);if(!h||!Uc(f,h))return[o(f)];if(f.type==="mdxJsxTextElement")throw new fo(f,h,"normalize","A text JSX node can be normalized to flow only when it is the sole child of a paragraph.");return[{type:"paragraph",children:[o(u(f,h))]}]}s(d,"normalizeFlowChild");function u(f,h){if(f.children.length===0)return{...f,type:"mdxJsxTextElement",children:[]};if(f.children.length!==1||f.children[0].type!=="paragraph")throw new fo(f,h,"normalize","Its block children cannot be represented as one phrasing-content sequence without data loss.");return{...f,type:"mdxJsxTextElement",children:f.children[0].children}}return s(u,"convertFlowToText"),i(e)}s(AO,"normalizeTree");function IO(e,t,n,r=()=>!0){return n==="source"?e:n==="error"?(ET(e,t,r),e):AO(structuredClone(e),t,r)}s(IO,"reconcileJsxKindMismatches");function il(e){return e.children instanceof Array}s(il,"isParent");var ug=class extends Error{static{s(this,"MarkdownParseError")}constructor(e,t){super(e),this.name="MarkdownParseError",this.cause=t}},dg=class extends Error{static{s(this,"UnrecognizedMarkdownConstructError")}constructor(e){super(e),this.name="UnrecognizedMarkdownConstructError"}};function NO(e){const t=new Map;return e.type!=="root"?{importDeclarations:{}}:(e.children.filter(n=>n.type==="mdxjsEsm").filter(n=>n.value.startsWith("import ")).forEach(n=>{var r,i;(((i=(r=n.data)==null?void 0:r.estree)==null?void 0:i.body)??[]).forEach(o=>{o.type==="ImportDeclaration"&&o.specifiers.forEach(l=>{t.set(l.local.name,{source:`${o.source.value}`,defaultExport:l.type==="ImportDefaultSpecifier"})})})}),{importDeclarations:Object.fromEntries(t.entries())})}s(NO,"gatherMetadata");function OO({root:e,markdown:t,visitors:n,syntaxExtensions:r,mdastExtensions:i,...o}){var l;let a;try{a=o9(t,{extensions:r,mdastExtensions:i})}catch(c){throw c instanceof Error?new ug(`Error parsing markdown: ${c.message}`,c):new ug(`Error parsing markdown: ${c}`,c)}a.children.length===0&&a.children.push({type:"paragraph",children:[]}),((l=a.children.at(-1))==null?void 0:l.type)!=="paragraph"&&a.children.push({type:"paragraph",children:[]}),TT({root:e,mdastRoot:a,visitors:n,...o})}s(OO,"importMarkdownToLexical");function TT({root:e,mdastRoot:t,visitors:n,...r}){n=n.sort((u,f)=>(f.priority??0)-(u.priority??0));function i(u,f=null){return n.find((h,g)=>f?.has(g)?!1:typeof h.testNode=="string"?h.testNode===u.type:h.testNode(u,r))}s(i,"findVisitor"),t=IO(t,r.jsxComponentDescriptors,r.jsxKindMismatchPolicy??"source",u=>{var f;return((f=i(u))==null?void 0:f.jsxKindReconciliationOwner)===!0});const o=new WeakMap,l=new WeakMap,a=NO(t);function c(u,f){if(!il(u))throw new Error("Attempting to visit children of a non-parent");u.children.forEach(h=>{d(h,f,u)})}s(c,"visitChildren");function d(u,f,h,g=null){const p=i(u,g);if(!p)try{throw new dg(`Unsupported markdown syntax: ${mT(u)}`)}catch{throw new dg(`Parsing of the following markdown structure failed: ${JSON.stringify({type:u.type,name:"name"in u?u.name:"N/A"})}`)}p.visitNode({mdastNode:u,lexicalParent:f,mdastParent:h,descriptors:r,metaData:a,actions:{visitChildren:c,nextVisitor(){d(u,f,h,(g??new Set).add(n.indexOf(p)))},addAndStepInto(v){f.append(v),il(u)&&c(u,v)},addFormatting(v,_){_||il(u)&&(_=u),_&&o.set(_,v|(o.get(h)??0))},removeFormatting(v,_){_||il(u)&&(_=u),_&&o.set(_,v^(o.get(h)??0))},getParentFormatting(){return o.get(h)??0},addStyle(v,_){_||il(u)&&(_=u),_&&l.set(_,v)},getParentStyle(){return l.get(h)??""}}})}s(d,"visit"),d(t,e,null)}s(TT,"importMdastTreeToLexical");function yo(){}s(yo,"noop$1");var DO=Object.defineProperty,RO=s((e,t,n)=>t in e?DO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,"__defNormalProp$3"),Pf=s((e,t,n)=>RO(e,typeof t!="symbol"?t+"":t,n),"__publicField$3"),P_="generic-html",Pm=class ST extends Br{static{s(this,"GenericHTMLNode")}constructor(t,n,r,i){super(i),Pf(this,"__tag"),Pf(this,"__nodeType"),Pf(this,"__attributes"),this.__tag=t,this.__nodeType=n,this.__attributes=r}static getType(){return P_}static clone(t){return new ST(t.__tag,t.__nodeType,t.__attributes,t.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(t){const n=this.getWritable();n.__attributes=t}getStyle(){var t;return(t=this.__attributes.find(n=>n.name==="style"))==null?void 0:t.value}createDOM(){const t=this.__tag,n=document.createElement(t);return this.__attributes.forEach(r=>{n.setAttribute(r.name,r.value)}),n}updateDOM(){return!1}static importDOM(){return{}}exportDOM(t){const{element:n}=super.exportDOM(t);return{element:n}}static importJSON(t){const n=wT(t.tag,t.mdxType,t.attributes);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:P_,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}};function wT(e,t,n){return gi(new Pm(e,t,n))}s(wT,"$createGenericHTMLNode");function LO(e){return e instanceof Pm}s(LO,"$isGenericHTMLNode");var $O={testLexicalNode:LO,visitLexicalNode({actions:e,lexicalNode:t}){e.addAndStepInto("mdxJsxTextElement",{name:t.getTag(),type:t.getNodeType(),attributes:t.getAttributes()})},priority:-100},PO={testLexicalNode:Fr,visitLexicalNode:s(({mdastParent:e,actions:t})=>{t.appendToParent(e,{type:"text",value:`
56
+ `})},"visitLexicalNode")},FO={testLexicalNode:$a,visitLexicalNode:s(({actions:e})=>{e.addAndStepInto("paragraph")},"visitLexicalNode")},VO={testLexicalNode:Pa,visitLexicalNode:s(({actions:e})=>{e.addAndStepInto("root")},"visitLexicalNode")};function F_(e){return e.type==="text"}s(F_,"isMdastText");var BO=["u","span","sub","sup"],HO={shouldJoin:s((e,t)=>{if(["text","emphasis","strong","highlight"].includes(e.type))return e.type===t.type;if(e.type==="mdxJsxTextElement"&&t.type==="mdxJsxTextElement"&&BO.includes(t.name)){const n=t;return e.name===n.name&&JSON.stringify(e.attributes)===JSON.stringify(n.attributes)}return!1},"shouldJoin"),join(e,t){return F_(e)&&F_(t)?{type:"text",value:e.value+t.value}:{...e,children:[...e.children,...t.children]}},testLexicalNode:Ne,visitLexicalNode:s(({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getPreviousSibling(),i=Ne(r)?r.getFormat():0,o=e.getTextContent(),l=e.getFormat(),a=e.getStyle();let c=t;if(a&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:a}]})),i&l&8&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),i&l&64&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),i&l&32&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),i&l&2&&(c=n.appendToParent(c,{type:"emphasis",children:[]})),i&l&1&&(c=n.appendToParent(c,{type:"strong",children:[]})),i&l&4&&(c=n.appendToParent(c,{type:"delete",children:[]})),i&l&128&&(c=n.appendToParent(c,{type:"highlight",children:[]})),l&8&&!(i&8)&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),l&64&&!(i&64)&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),l&32&&!(i&32)&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),l&2&&!(i&2)&&(c=n.appendToParent(c,{type:"emphasis",children:[]})),l&1&&!(i&1)&&(c=n.appendToParent(c,{type:"strong",children:[]})),l&4&&!(i&4)&&(c=n.appendToParent(c,{type:"delete",children:[]})),l&128&&!(i&128)&&(c=n.appendToParent(c,{type:"highlight",children:[]})),l&16){n.appendToParent(c,{type:"inlineCode",value:o});return}n.appendToParent(c,{type:"text",value:o})},"visitLexicalNode")},KO={testNode:"break",visitNode:s(function({lexicalParent:e}){e.append(Pr())},"visitNode")};function fc(e,t){return[{testNode:s(n=>n.type==="mdxJsxTextElement"&&n.name===e,"testNode"),visitNode({actions:n,mdastNode:r,lexicalParent:i}){n.addFormatting(t),n.visitChildren(r,i)}},{testNode:s(n=>n.type==="html"&&n.value===`<${e}>`,"testNode"),visitNode({actions:n,mdastParent:r}){n.addFormatting(t,r)}},{testNode:s(n=>n.type==="html"&&n.value===`</${e}>`,"testNode"),visitNode({actions:n,mdastParent:r}){n.removeFormatting(t,r)}}]}s(fc,"buildFormattingVisitors");var UO={testNode:"delete",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(4),t.visitChildren(e,n)}},WO={testNode:"highlight",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(128),t.visitChildren(e,n)}},zO={testNode:"inlineCode",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(yr(e.value).setFormat(t.getParentFormatting()|16))}},jO=[{testNode:"emphasis",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(2),t.visitChildren(e,n)}},{testNode:"strong",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(1),t.visitChildren(e,n)}},...fc("u",8),...fc("code",16),zO,UO,WO,...fc("sup",64),...fc("sub",32)],JO={testNode:vT,visitNode:s(function({mdastNode:e,actions:t,lexicalParent:n}){e.name==="span"&&e.attributes.length===1&&e.attributes[0].type==="mdxJsxAttribute"&&e.attributes[0].name==="style"?(t.addStyle(e.attributes[0].value,e),t.visitChildren(e,n)):t.addAndStepInto(wT(e.name,e.type,e.attributes))},"visitNode"),priority:-100},GO=["listitem","admonition"],qO={testNode:"paragraph",visitNode:s(function({mdastNode:e,mdastParent:t,lexicalParent:n,actions:r}){const i=n.getType();if(GO.includes(i)){const o=t?.children.indexOf(e)??-1,l=o>0?t?.children.at(o-1):void 0;i==="listitem"&&l?.type==="paragraph"&&n.append(Pr(),Pr()),r.visitChildren(e,n)}else r.addAndStepInto(Qe())},"visitNode")},ZO={testNode:"root",visitNode({actions:e,mdastNode:t,lexicalParent:n}){e.visitChildren(t,n)}},YO={testNode:"text",visitNode({mdastNode:e,actions:t}){const n=yr(e.value);n.setFormat(t.getParentFormatting());const r=t.getParentStyle();r!==""&&n.setStyle(r),t.addAndStepInto(n)}},ar={dash:45,eof:null,exclamationMark:33,greaterThan:62},lo={data:"data",lineEnding:"lineEnding",linePrefix:"linePrefix"};function XO(e){return{canContainEols:["comment"],enter:{comment(t){this.buffer()}},exit:{comment(t){this.resume()}}}}s(XO,"commentFromMarkdown");var V_=s((e,t,n)=>{return r;function r(p){return e.enter("comment"),e.consume(p),i}function i(p){return p===ar.exclamationMark?(e.consume(p),o):n(p)}function o(p){return p===ar.dash?(e.consume(p),l):n(p)}function l(p){return p===ar.dash?(e.consume(p),a):n(p)}function a(p){return p===ar.greaterThan?n(p):Ir(p)?u(p):(e.enter(lo.data),p===ar.dash?(e.consume(p),c):d(p))}function c(p){return p===ar.greaterThan?n(p):d(p)}function d(p){return p===ar.eof?n(p):p===ar.dash?(e.consume(p),h):Ir(p)?(e.exit(lo.data),u(p)):(e.consume(p),d)}function u(p){return e.enter(lo.lineEnding),e.consume(p),e.exit(lo.lineEnding),sp(e,f,lo.linePrefix)}function f(p){return Ir(p)?u(p):(e.enter(lo.data),d(p))}function h(p){return p===ar.dash?(e.consume(p),g):d(p)}function g(p){return p===ar.greaterThan?(e.exit(lo.data),e.enter("commentEnd"),e.consume(p),e.exit("commentEnd"),e.exit("comment"),t(p)):p===ar.dash?(e.consume(p),g):d(p)}},"tokenize"),QO={flow:{60:{tokenize:V_,concrete:!0}},text:{60:{tokenize:V_}}},eD="_bold_6j9u9_10",tD="_italic_6j9u9_14",nD="_underline_6j9u9_18",rD="_strikethrough_6j9u9_34",iD="_underlineStrikethrough_6j9u9_38",oD="_subscript_6j9u9_42",sD="_superscript_6j9u9_47",lD="_code_6j9u9_52",aD="_quote_6j9u9_59",cD="_nestedListItem_6j9u9_66",uD="_listitem_6j9u9_76",dD="_listItemChecked_6j9u9_80",fD="_listItemUnchecked_6j9u9_81",hD="_admonitionDanger_6j9u9_158",gD="_admonitionInfo_6j9u9_159",pD="_admonitionNote_6j9u9_160",mD="_admonitionTip_6j9u9_161",vD="_admonitionCaution_6j9u9_162",_D="_mdxExpression_6j9u9_195",Vt={bold:eD,italic:tD,underline:nD,strikethrough:rD,underlineStrikethrough:iD,subscript:oD,superscript:sD,code:lD,quote:aD,nestedListItem:cD,listitem:uD,listItemChecked:dD,listItemUnchecked:fD,admonitionDanger:hD,admonitionInfo:gD,admonitionNote:pD,admonitionTip:mD,admonitionCaution:vD,mdxExpression:_D},kT={quote:Vt.quote,text:{bold:Vt.bold,italic:Vt.italic,underline:Vt.underline,code:Vt.code,strikethrough:Vt.strikethrough,subscript:Vt.subscript,superscript:Vt.superscript,underlineStrikethrough:Vt.underlineStrikethrough},list:{listitem:Vt.listitem,listitemChecked:Vt.listItemChecked,listitemUnchecked:Vt.listItemUnchecked,nested:{listitem:Vt.nestedListItem}},admonition:{danger:Vt.admonitionDanger,info:Vt.admonitionInfo,note:Vt.admonitionNote,tip:Vt.admonitionTip,caution:Vt.admonitionCaution}},MT=(0,m.createContext)(null);function gn(){const e=(0,m.useContext)(MT);return e??(function(t,...n){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const o of n)i.append("v",o);throw r.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),e}s(gn,"o$6");function yD(){return $t().getTextContent()}s(yD,"s$6");function xD(e,t=!0){if(e)return!1;let n=yD();return t&&(n=n.trim()),n===""}s(xD,"f$3");function CD(e){if(!xD(e,!1))return!1;const t=$t().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;r<n;r++){const i=t[r];if(jn(i))return!1;if(xe(i)){if(!$a(i)||i.__indent!==0)return!1;const o=i.getChildren(),l=o.length;for(let a=0;a<l;a++){const c=o[r];if(!Ne(c))return!1}}}return!0}s(CD,"c$4");function AT(e){return()=>CD(e)}s(AT,"g");var IT=Nd?m.useLayoutEffect:m.useEffect;function bD({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:o,ariaExpanded:l,ariaInvalid:a,ariaLabel:c,ariaLabelledBy:d,ariaMultiline:u,ariaOwns:f,ariaRequired:h,autoCapitalize:g,className:p,id:v,role:_="textbox",spellCheck:y=!0,style:x,tabIndex:C,"data-testid":b,...T},M){const[S,E]=(0,m.useState)(e.isEditable()),A=(0,m.useCallback)(L=>{L&&L.ownerDocument&&L.ownerDocument.defaultView?e.setRootElement(L):e.setRootElement(null)},[e]),D=(0,m.useMemo)(()=>(function(...L){return G=>{for(const $ of L)typeof $=="function"?$(G):$!=null&&($.current=G)}})(M,A),[A,M]);return IT(()=>(E(e.isEditable()),e.registerEditableListener(L=>{E(L)})),[e]),(0,H.jsx)("div",{"aria-activedescendant":S?t:void 0,"aria-autocomplete":S?n:"none","aria-controls":S?r:void 0,"aria-describedby":i,...o!=null?{"aria-errormessage":o}:{},"aria-expanded":S&&_==="combobox"?!!l:void 0,...a!=null?{"aria-invalid":a}:{},"aria-label":c,"aria-labelledby":d,"aria-multiline":u,"aria-owns":S?f:void 0,"aria-readonly":!S||void 0,"aria-required":h,autoCapitalize:g,className:p,contentEditable:S,"data-testid":b,id:v,ref:D,role:_,spellCheck:y,style:x,tabIndex:C??(S?void 0:-1),...T})}s(bD,"b$1");var ED=(0,m.forwardRef)(bD);function B_(e){return e.read("latest",AT(e.isComposing()))}s(B_,"x$3");var Fm=(0,m.forwardRef)(TD);function TD(e,t){const{placeholder:n,...r}=e,[i]=gn();return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ED,{editor:i,...r,ref:t}),n!=null&&(0,H.jsx)(SD,{editor:i,content:n})]})}s(TD,"E");function SD({content:e,editor:t}){const n=(function(l){const[a,c]=(0,m.useState)(()=>B_(l));return IT(()=>{function d(){const u=B_(l);c(u)}return s(d,"t"),d(),It(l.registerUpdateListener(()=>{d()}),l.registerEditableListener(()=>{d()}))},[l]),a})(t),[r,i]=(0,m.useState)(t.isEditable());if((0,m.useLayoutEffect)(()=>(i(t.isEditable()),t.registerEditableListener(l=>{i(l)})),[t]),!n)return null;let o=null;return typeof e=="function"?o=e(r):e!==null&&(o=e),o===null?null:(0,H.jsx)("div",{"aria-hidden":!0,children:o})}s(SD,"y$1");var wD=class extends m.Component{static{s(this,"t$3")}state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){this.props.onError(e instanceof Error?e:new Error(String(e),{cause:e}),t)}render(){return this.state.hasError?this.props.fallback:this.props.children}};function Vm({children:e,fallback:t,onError:n}){return(0,H.jsx)(wD,{fallback:t===void 0?(0,H.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}):t,onError:n,children:e})}s(Vm,"e$2");var Ou=Ur({name:"@lexical/react/ReactProvider"});function kD(e,t){const[n]=t,r=e.decorators.map(i=>typeof i=="function"?(0,H.jsx)(i,{context:t}):i);return function(i){const{EditorChildrenComponent:o=e.EditorChildrenComponent,ErrorBoundary:l=e.ErrorBoundary,contentEditable:a=e.contentEditable,children:c}=i,d=(function(f,h){const[g,p]=(0,m.useMemo)(()=>[_=>f.registerDecoratorListener(_),()=>f.getDecorators()],[f]),v=(0,m.useSyncExternalStore)(g,p,p);return(0,m.useMemo)(()=>{const _=[];for(const y in v){const x=f.getElementByKey(y);if(x!==null){const C=(0,H.jsx)(h,{onError:s(b=>{f._onError(b)},"onError"),children:(0,H.jsx)(m.Suspense,{fallback:null,children:v[y]})});_.push((0,Yc.createPortal)(C,x,y))}}return _},[h,v,f])})(n,l),u=(0,m.useMemo)(()=>r.map((f,h)=>(0,H.jsx)(l,{onError:s(g=>{n._onError(g)},"onError"),children:(0,H.jsx)(m.Suspense,{fallback:null,children:f})},h)),[l]);return(0,H.jsx)(MT.Provider,{value:t,children:(0,H.jsxs)(o,{context:t,contentEditable:a,children:[c,u,d]})})}}s(kD,"p$2");function MD({contentEditable:e,children:t}){return(0,H.jsxs)(H.Fragment,{children:[e,t]})}s(MD,"h");var NT=Ur({build(e,t,n){n.getPeer(Ou.name)||(function(i,...o){const l=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",i);for(const c of o)a.append("v",c);throw l.search=a.toString(),Error(`Minified Lexical error #${i}; visit ${l.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(321,[...n.getDirectDependentNames()].join(" "));const r=[e,{getTheme:s(()=>e._config.theme,"getTheme")}];return{Component:kD(t,r),context:r}},config:{EditorChildrenComponent:MD,ErrorBoundary:Vm,contentEditable:(0,H.jsx)(Fm,{}),decorators:[]},mergeConfig(e,t){const n=Pd(e,t);return t.decorators&&(n.decorators=t.decorators.length>0?[...e.decorators,...t.decorators]:e.decorators),n},name:"@lexical/react/React",peerDependencies:[FI(Ou.name)]}),AD=new WeakSet,ID=new WeakMap,ND=new Set([qb,Bs,Jb,Yb,km]),ao=new WeakMap;function OD(e){return ss(ms,{createInitialHistoryState:s(()=>e,"createInitialHistoryState"),disabled:!1})}s(OD,"externalHistoryExtension");function OT({name:e,namespace:t,nodes:n,theme:r,editable:i=!0,parentEditor:o,historyMode:l,historyState:a,initialEditorState:c,onError:d=s(u=>{throw u},"onError")}){const u=[Ou,ss(NT,{contentEditable:null}),ss(EE,{setOptions:{tag:_o},updateOptions:{tag:_o}})];if(o&&u.push(ss(E6,{$getParentEditor:s(()=>o,"$getParentEditor"),inheritEditableFromParent:!0})),l==="nested-shared")u.push(I6);else if(l==="root-shared"||l==="nested-external"){if(!a)throw new Error(`${l} requires a historyState`);u.push(OD(a))}else l==="table-local"&&u.push(ss(ms,{disabled:!1}));const f=Ur({name:e,namespace:t,nodes:n?.filter(b=>!ND.has(b)),theme:r,editable:i,$initialEditorState:c,onError:d,dependencies:u}),h=_6(f),g=eo(h,ms.name),p=g?.output.historyState.value;p&&ID.set(h,p),p&&(ao.has(p)||ao.set(p,p.current));const v=p?h.registerUpdateListener(({dirtyElements:b,dirtyLeaves:T,tags:M})=>{const S=p.current;if(M.has(_o)){ao.set(p,S);return}if(b.size>0||T.size>0){ao.set(p,S);return}const E=ao.get(p);S?.editor===h&&E&&E.editor!==h&&(p.undoStack.push({...E}),p.redoStack=[],h.dispatchCommand(os,!0),h.dispatchCommand(is,!1)),ao.set(p,S)}):()=>{},_=new Set,y=p?h.registerCommand(Tm,()=>{const b=setTimeout(()=>{_.delete(b),h.dispatchCommand(os,p.undoStack.length>0),h.dispatchCommand(is,p.redoStack.length>0)});return _.add(b),!1},st):()=>{},x=h.dispose.bind(h);let C=!1;return h.dispose=()=>{C||(C=!0,_.forEach(clearTimeout),_.clear(),y(),v(),x())},l==="root-shared"&&AD.add(h),h}s(OT,"createExtensionEditor");var ia=kr("NESTED_EDITOR_UPDATED_COMMAND"),vi=fe(null),pt=fe(null),fg=fe(""),hg=fe(!0),Cr=fe(!1,e=>{e.sub(e.pipe(Cr,mt(vi)),([t,n])=>{n?.setEditable(!t)})}),gg=fe(""),H_=fe(!1),oa=fe(!1),DD=fe(0),Du=fe(null),pg=kt(e=>{e.link(e.pipe(Du,gd(t=>t!==null)),pg)}),RD=kt(e=>{e.sub(e.pipe(RD,mt(pt)),([t,n])=>{n?.dispatchCommand(Fb,t)})}),ws=fe(null,e=>{e.sub(e.pipe(ws,mt(pt)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:ft(r,l=>{const a=l.getParent();return a!==null&&bn(a)});i??(i=r.getTopLevelElementOrThrow());const o=i.getKey();if(n.getElementByKey(o)!==null){const l=Kd(i)?i.getTag():i.getType();e.pub(VD,l)}})}),DT=fe(""),Io=fe(""),Ru=fe(!1),Ud=kt(e=>{e.link(Io,Ud),e.sub(DT,t=>{e.pubIn({[Ru]:!0,[Io]:t})})}),mg=kt(e=>{e.link(e.pipe(Ud,mt(vg),gd(([,t])=>!t),Hi(([t])=>t)),mg)},!0),Bm=fe([]),Hm=fe([]),RT=fe([]),LT=fe([]),Wd=fe([]),Km=fe([]),Lu=fe({}),Um=fe(!1),zd=fe([]),LD=fe("source"),$T=fe([]),za=fe([]),ks=fe(""),Ko=fe(null),$D=fe(null),PT=fe(null),_i=on(Hm),Hr=on(Bm),$u=on(RT),Pu=on(LT),yi=on(Wd),Wm=on(Km),vg=fe(!1),zm=kt(e=>{e.sub(e.pipe(zm,mt(Io,vi,oa),gd(([t,n])=>t.trim()!==n.trim())),([t,,n,r])=>{e.pub(vg,!0),n?.update(()=>{$t().clear(),jm(e,$t(),t),r?n.focus():nr(null)},{onUpdate:s(()=>{e.pub(vg,!1)},"onUpdate")})})}),FT=kt(e=>{e.sub(e.pipe(FT,mt(pt,oa)),([t,n,r])=>{n?.update(()=>{const i=ie();if(i!==null){const o={children:[],append(l){this.children.push(l)},getType(){return i.getNodes()[0].getType()}};jm(e,o,t),Vs(o.children)}r?n.focus():nr(null)})})});function VT(){return KC((e,[t,n])=>(e.forEach(r=>{if(!r)throw new Error("You have a subscription that does not return a teardown");r()}),n?t.map(r=>r(n)):[]),[])}s(VT,"rebind");var BT=fe(null),HT=fe([],e=>{e.pipe(e.combine(HT,pt),VT())}),KT=fe([],e=>{e.pipe(e.combine(KT,vi),VT())}),UT=fe(null,yo,(e,t)=>!!(e&&t&&e.editorRef===t.editorRef)),_g=kt(),xi=fe(e=>{throw new Error(`No icon component for ${e}`)});function on(e,t){return kt((n,r)=>{n.changeWith(e,r,(i,o)=>{Array.isArray(o)||(o=[o]);let l=i;for(const a of o)i.includes(a)||(l=[...l,a]);return l}),t?.(n,r)})}s(on,"Appender");function WT(e){const t=ie();oe(t)&&e.pubIn({[ws]:t,[DD]:t.format})}s(WT,"handleSelectionChange");var jd=on(KT,(e,t)=>{e.pub(t,[n=>n.registerCommand(Mm,(r,i)=>(e.pubIn({[pt]:i,[oa]:!0}),i._parentEditor===null&&i.getEditorState().read(()=>{e.pub(UT,{rootNode:$t(),editorType:"lexical",editorRef:i})}),WT(e),!1),Vr),n=>n.registerUpdateListener(({dirtyElements:r,dirtyLeaves:i,editorState:o})=>{if(e.getValue(Du)!==null||r.size===0&&i.size===0)return;let l;o.read(()=>{$t().getLastChild()instanceof Fa&&n.update(()=>{$t().append(Qe())},{discrete:!0}),l=CT({root:$t(),visitors:e.getValue(Wd),jsxComponentDescriptors:e.getValue(zd),toMarkdownExtensions:e.getValue(Km),toMarkdownOptions:e.getValue(Lu),jsxIsAvailable:e.getValue(Um)})}),e.pub(Io,l.trim()),e.pub(Ru,!1)}),n=>n.registerCommand(Tm,()=>(e.pub(oa,!0),!1),Vr)])}),sa=on(HT,(e,t)=>{e.pub(t,[n=>n.registerUpdateListener(({editorState:r})=>{r.read(()=>{WT(e)})}),n=>n.registerCommand(Ob,r=>{var i;const o=e.getValue(vi);return o&&((i=o.getRootElement())!=null&&i.contains(r.relatedTarget)||e.pubIn({[oa]:!1,[_g]:r})),!1},Vr)])});function jm(e,t,n){try{OO({root:t,visitors:e.getValue(Bm),mdastExtensions:e.getValue(LT),markdown:n,syntaxExtensions:e.getValue(RT),jsxComponentDescriptors:e.getValue(zd),jsxKindMismatchPolicy:e.getValue(LD),directiveDescriptors:e.getValue($T),codeBlockEditorDescriptors:e.getValue(za),defaultCodeBlockLanguage:e.getValue(ks)}),e.pub(Du,null)}catch(r){if(r instanceof ug||r instanceof dg||r instanceof fo)e.pubIn({[Io]:n,[Du]:{error:r.message,source:n}});else throw r}}s(jm,"tryImportingMarkdown");var zT=fe([]),Ws=on(zT),jT=fe([]),Oj=on(jT),JT=fe([]),Dj=on(JT),GT=fe([]),Rj=on(GT),PD=fe([]),Jm=on(PD),qT=fe([]),ZT=on(qT),FD=fe(!1,e=>{e.link(e.pipe(pt,Hi(t=>{var n,r;return["td","th"].includes(((r=(n=t?.getRootElement())==null?void 0:n.parentNode)==null?void 0:r.nodeName.toLowerCase())??"")})),FD)}),K_=fe(Om()),VD=fe(""),Lj=kt(),yg=kt(e=>{e.sub(e.pipe(yg,mt(pt)),([t,n])=>{n?.update(()=>{const r=ie();oe(r)&&(r6(r,t),setTimeout(()=>{n.focus()}))})})}),Gm=kt(e=>{e.sub(e.pipe(Gm,mt(pt)),([t,n])=>{n?.focus(()=>{n.getEditorState().read(()=>{const r=ie();oe(r)&&(n.update(()=>{const i=t();i.isInline()?(Vs([i]),bn(i.getParentOrThrow())&&Am(i,Qe).selectEnd()):gE(i),setTimeout(()=>{"select"in i&&typeof i.select=="function"&&i.select()})}),setTimeout(()=>{n.dispatchCommand(ia,void 0)}))})},{defaultSelection:"rootEnd"})})}),la=fe("rich-text",e=>{function t(){return KC((n,r)=>({current:n.next,next:r}),{current:"rich-text",next:"rich-text"})}s(t,"currentNextViewMode"),e.sub(e.pipe(la,t(),mt(aa)),([{current:n},r])=>{(n==="source"||n==="diff")&&e.pub(zm,r)}),e.sub(e.pipe(la,t(),gd(n=>n.current==="rich-text"),mt(pt)),([,n])=>{n?.dispatchCommand(ia,void 0)})}),aa=fe("",e=>{e.link(Io,aa),e.link(aa,Ud)},!0),YT=fe([]),zs=on(YT),XT=fe(()=>{throw new Error("No translation function provided")}),U_=fe(kT),BD=Sn({init(e,t){const n=t?.initialMarkdown??"";e.register(jd),e.register(sa),e.register(Ud),e.register(aa),e.pubIn({[DT]:t?.trim?n.trim():n,[xi]:t?.iconComponentFor,[Hr]:[ZO,qO,YO,KO,...jO],[_i]:[km,Bs,Pm],[yi]:[VO,FO,HO,PO,$O],[fg]:t?.contentEditableClassName,[hg]:t?.spellCheck,[Lu]:t?.toMarkdownOptions,[H_]:t?.autoFocus,[gg]:t?.placeholder,[Cr]:t?.readOnly,[XT]:t?.translation,[K_]:Om(),[Pu]:[Zk(),KN],[$u]:[p9(),L4()],[Wm]:[u4(),Xk(),zN],[U_]:t?.lexicalTheme??kT}),e.singletonSub(pg,t?.onError),e.singletonSub(mg,r=>{t?.onChange(r,e.getValue(Ru))}),e.singletonSub(_g,t?.onBlur),t?.suppressHtmlProcessing||e.pubIn({[Pu]:[c4(),XO()],[$u]:[X4(),Q4(),QO],[Hr]:JO})},postInit(e,t){const n=OT({name:"@mdxeditor/root",editable:t?.readOnly!==!0,namespace:t?.lexicalEditorNamespace??"MDXEditor",nodes:[...e.getValue(Hm),...t?.additionalLexicalNodes??[]],theme:e.getValue(U_),historyMode:t?.suppressSharedHistory?"none":"root-shared",historyState:e.getValue(K_),initialEditorState:t?.editorState===null?null:()=>{const i=t?.initialMarkdown.trim()??"";jm(e,$t(),i)}});S0(e,()=>{n.dispose()});const r=t?.autoFocus;if(t?.editorState!==null&&r){const i=setTimeout(()=>{n.focus(yo,{defaultSelection:r===!0?"rootStart":r.defaultSelection??"rootStart"})});S0(e,()=>{clearTimeout(i)})}e.pub(vi,n),e.pub(pt,n)},update(e,t){e.pubIn({[fg]:t?.contentEditableClassName,[hg]:t?.spellCheck,[Lu]:t?.toMarkdownOptions,[H_]:t?.autoFocus,[gg]:t?.placeholder,[Cr]:t?.readOnly}),e.singletonSub(mg,n=>{t?.onChange(n,e.getValue(Ru))}),e.singletonSub(_g,t?.onBlur),e.singletonSub(pg,t?.onError)}});function Ci(){return li(XT)}s(Ci,"useTranslation");function QT({initialEditor:e,children:t}){const{Component:n}=x6(e,NT).output;return(0,H.jsx)(n,{children:t})}s(QT,"r");var HD=Nd?m.useLayoutEffect:m.useEffect;function KD(e){return{initialValueFn:s(()=>e.isEditable(),"initialValueFn"),subscribe:s(t=>e.registerEditableListener(t),"subscribe")}}s(KD,"a$2");function UD(){return(function(e){const[t]=gn(),n=(0,m.useMemo)(()=>e(t),[t,e]),[r,i]=(0,m.useState)(()=>n.initialValueFn()),o=(0,m.useRef)(r);return HD(()=>{const{initialValueFn:l,subscribe:a}=n,c=l();return o.current!==c&&(o.current=c,i(c)),a(d=>{o.current=d,i(d)})},[n,e]),r})(KD)}s(UD,"l$6");function WD(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}s(WD,"y");var qm=Nd?m.useLayoutEffect:m.useEffect;function zD({editor:e,ErrorBoundary:t}){return(function(n,r){const[i,o]=(0,m.useState)(()=>n.getDecorators());return qm(()=>n.registerDecoratorListener(l=>{(0,Yc.flushSync)(()=>{o(l)})}),[n]),(0,m.useEffect)(()=>{o(n.getDecorators())},[n]),(0,m.useMemo)(()=>{const l=[],a=Object.keys(i);for(let c=0;c<a.length;c++){const d=a[c],u=(0,H.jsx)(r,{onError:s(h=>n._onError(h),"onError"),children:(0,H.jsx)(m.Suspense,{fallback:null,children:i[d]})}),f=n.getElementByKey(d);f!==null&&l.push((0,Yc.createPortal)(u,f,d))}return l},[r,i,n])})(e,t)}s(zD,"L");function jD({editor:e,ErrorBoundary:t}){return(function(n){const r=Ka.maybeFromEditor(n);if(r&&r.hasExtensionByName(Ou.name)){for(const i of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(i)&&WD(320,i);return!0}return!1})(e)?null:(0,H.jsx)(zD,{editor:e,ErrorBoundary:t})}s(jD,"b");function W_(e){return e.read("latest",AT(e.isComposing()))}s(W_,"v");function eS({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=gn();return(function(i){qm(()=>It(BN(i),RN(i)),[i])})(r),(0,H.jsxs)(H.Fragment,{children:[e,(0,H.jsx)(JD,{content:t}),(0,H.jsx)(jD,{editor:r,ErrorBoundary:n})]})}s(eS,"w");function JD({content:e}){const[t]=gn(),n=(function(i){const[o,l]=(0,m.useState)(()=>W_(i));return qm(()=>{function a(){const c=W_(i);l(c)}return s(a,"e"),a(),It(i.registerUpdateListener(()=>{a()}),i.registerEditableListener(()=>{a()}))},[i]),o})(t),r=UD();return n?typeof e=="function"?e(r):e:null}s(JD,"C");var GD=Is(((e,t)=>{(function(){"use strict";var n={}.hasOwnProperty;function r(){for(var l="",a=0;a<arguments.length;a++){var c=arguments[a];c&&(l=o(l,i(c)))}return l}s(r,"classNames");function i(l){if(typeof l=="string"||typeof l=="number")return l;if(typeof l!="object")return"";if(Array.isArray(l))return r.apply(null,l);if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]"))return l.toString();var a="";for(var c in l)n.call(l,c)&&l[c]&&(a=o(a,c));return a}s(i,"parseValue");function o(l,a){return a?l?l+" "+a:l+a:l}s(o,"appendClass"),typeof t<"u"&&t.exports?(r.default=r,t.exports=r):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return r}):window.classNames=r})()})),nt=va(GD(),1),tS={undo:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M7.202 18.5V17H14.3788C15.4224 17 16.3205 16.6554 17.073 15.9663C17.8257 15.2773 18.202 14.4263 18.202 13.4135C18.202 12.4007 17.8257 11.5512 17.073 10.8652C16.3205 10.1794 15.4224 9.8365 14.3788 9.8365H7.35775L10.1402 12.6193L9.0865 13.673L4.5 9.0865L9.0865 4.5L10.1402 5.55375L7.35775 8.3365H14.3788C15.8416 8.3365 17.0945 8.82467 18.1375 9.801C19.1805 10.7773 19.702 11.9815 19.702 13.4135C19.702 14.8455 19.1805 16.0513 18.1375 17.0308C17.0945 18.0103 15.8416 18.5 14.3788 18.5H7.202Z",fill:"currentColor"})),redo:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M9.6211 18.5C8.15827 18.5 6.90535 18.0103 5.86235 17.0308C4.81935 16.0513 4.29785 14.8455 4.29785 13.4135C4.29785 11.9815 4.81935 10.7773 5.86235 9.801C6.90535 8.82467 8.15827 8.3365 9.6211 8.3365H16.6421L13.8596 5.55375L14.9134 4.5L19.4999 9.0865L14.9134 13.673L13.8596 12.6193L16.6421 9.8365H9.6211C8.57744 9.8365 7.67935 10.1794 6.92685 10.8652C6.17418 11.5512 5.79785 12.4007 5.79785 13.4135C5.79785 14.4263 6.17418 15.2773 6.92685 15.9663C7.67935 16.6554 8.57744 17 9.6211 17H16.7979V18.5H9.6211Z",fill:"currentColor"})),format_bold:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M7.33838 18.625V5.375H12.1999C13.219 5.375 14.1405 5.69233 14.9644 6.327C15.788 6.9615 16.1999 7.816 16.1999 8.8905C16.1999 9.63783 16.0194 10.2471 15.6584 10.7182C15.2975 11.1894 14.9088 11.5314 14.4921 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3158 16.6614 14.0193 16.6614 14.9038C16.6614 16.1819 16.1902 17.1217 15.2479 17.723C14.3055 18.3243 13.3562 18.625 12.3999 18.625H7.33838ZM9.48838 16.6328H12.3191C13.1063 16.6328 13.6627 16.4142 13.9884 15.977C14.314 15.5398 14.4769 15.1206 14.4769 14.7192C14.4769 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8058 12.2729 12.8058H9.48838V16.6328ZM9.48838 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5279 10.3538C13.8835 10.0064 14.0614 9.59042 14.0614 9.10575C14.0614 8.59042 13.8733 8.16925 13.4971 7.84225C13.1208 7.51542 12.6595 7.352 12.1134 7.352H9.48838V10.875Z",fill:"currentColor"})),format_italic:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5.39404 18.625V16.8173H9.21129L12.4518 7.18275H8.63454V5.375H17.7883V7.18275H14.2785L11.0383 16.8173H14.5478V18.625H5.39404Z",fill:"currentColor"})),format_underlined:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5.34619 22.125V20.625H18.6537V22.125H5.34619ZM11.9999 18.5287C10.4448 18.5287 9.23102 18.0566 8.35869 17.1125C7.48619 16.1683 7.04994 14.9032 7.04994 13.3172V5.41345H8.90369V13.4095C8.90369 14.4198 9.17228 15.2295 9.70944 15.8385C10.2466 16.4475 11.0101 16.752 11.9999 16.752C12.9898 16.752 13.7533 16.4475 14.2904 15.8385C14.8276 15.2295 15.0962 14.4198 15.0962 13.4095V5.41345H16.9499V13.3172C16.9499 14.9032 16.5137 16.1683 15.6412 17.1125C14.7689 18.0566 13.5551 18.5287 11.9999 18.5287Z",fill:"currentColor"})),format_highlight:m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"},m.createElement("path",{d:"m9 11-6 6v3h9l3-3"}),m.createElement("path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"})),code:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M7.99994 17.6537L2.34619 11.9999L7.99994 6.34619L9.06919 7.41544L4.46919 12.0154L9.05369 16.5999L7.99994 17.6537ZM15.9999 17.6537L14.9307 16.5844L19.5307 11.9844L14.9462 7.39994L15.9999 6.34619L21.6537 11.9999L15.9999 17.6537Z",fill:"currentColor"})),strikeThrough:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M12.15 19.6923C10.9732 19.6923 9.9315 19.359 9.025 18.6923C8.11867 18.0256 7.45525 17.1128 7.03475 15.9538L8.6385 15.2635C8.91667 16.0444 9.3545 16.6867 9.952 17.1905C10.5493 17.6944 11.2923 17.9463 12.1808 17.9463C12.9578 17.9463 13.6744 17.7508 14.3307 17.3598C14.9872 16.9686 15.3155 16.3487 15.3155 15.5C15.3155 15.123 15.2555 14.7968 15.1355 14.5213C15.0157 14.2456 14.8462 13.9885 14.627 13.75H16.677C16.7987 13.9705 16.8932 14.2256 16.9605 14.5153C17.0278 14.8051 17.0615 15.1334 17.0615 15.5C17.0615 16.8372 16.5747 17.8702 15.601 18.599C14.6272 19.3279 13.4768 19.6923 12.15 19.6923ZM2.25 11.75V10.25H21.75V11.75H2.25ZM12.05 4.19629C13.0475 4.19629 13.9123 4.42704 14.6443 4.88854C15.3763 5.35004 15.9673 6.05896 16.4173 7.01529L14.823 7.73079C14.6218 7.26029 14.2978 6.84462 13.851 6.48379C13.4042 6.12279 12.8141 5.94229 12.0808 5.94229C11.2244 5.94229 10.5392 6.16221 10.025 6.60204C9.51083 7.04171 9.264 7.59104 9.2845 8.25004H7.5385C7.50133 7.16421 7.89783 6.21712 8.728 5.40879C9.558 4.60046 10.6653 4.19629 12.05 4.19629Z",fill:"currentColor"})),superscript:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M16.6924 8V6.2115C16.6924 5.95383 16.7786 5.73875 16.9511 5.56625C17.1235 5.39392 17.3385 5.30775 17.5961 5.30775H19.5001V4.38475H16.6924V3.5H19.4809C19.7385 3.5 19.9536 3.58625 20.1261 3.75875C20.2985 3.93108 20.3846 4.14617 20.3846 4.404V5.2885C20.3846 5.54617 20.2985 5.76125 20.1261 5.93375C19.9536 6.10608 19.7385 6.19225 19.4809 6.19225H17.5771V7.1155H20.3846V8H16.6924ZM4.44238 18.5L8.84638 11.6287L4.77713 5.30775H6.74438L9.95963 10.404H10.0214L13.2501 5.30775H15.2329L11.1194 11.6287L15.5579 18.5H13.5751L10.0214 12.9308H9.95963L6.42513 18.5H4.44238Z",fill:"currentColor"})),subscript:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M16.6924 20.5V18.7115C16.6924 18.4538 16.7786 18.2387 16.9511 18.0662C17.1235 17.8939 17.3385 17.8077 17.5961 17.8077H19.5001V16.8845H16.6924V16H19.4809C19.7385 16 19.9536 16.0863 20.1261 16.2587C20.2985 16.4311 20.3846 16.6461 20.3846 16.9038V17.7885C20.3846 18.0462 20.2985 18.2612 20.1261 18.4337C19.9536 18.6061 19.7385 18.6923 19.4809 18.6923H17.5771V19.6152H20.3846V20.5H16.6924ZM4.44238 18.6923L8.84638 11.8212L4.77713 5.5H6.74438L9.95963 10.5962H10.0214L13.2501 5.5H15.2329L11.1194 11.8212L15.5579 18.6923H13.5751L10.0214 13.123H9.95963L6.42513 18.6923H4.44238Z",fill:"currentColor"})),format_list_bulleted:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75005V5.25005H20.5V6.75005H9.30775ZM5.1635 19.6635C4.706 19.6635 4.31442 19.5006 3.98875 19.1748C3.66292 18.8491 3.5 18.4575 3.5 18C3.5 17.5425 3.66292 17.151 3.98875 16.8253C4.31442 16.4995 4.706 16.3365 5.1635 16.3365C5.621 16.3365 6.01258 16.4995 6.33825 16.8253C6.66408 17.151 6.827 17.5425 6.827 18C6.827 18.4575 6.66408 18.8491 6.33825 19.1748C6.01258 19.5006 5.621 19.6635 5.1635 19.6635ZM5.1635 13.6635C4.706 13.6635 4.31442 13.5006 3.98875 13.1748C3.66292 12.8491 3.5 12.4575 3.5 12C3.5 11.5425 3.66292 11.151 3.98875 10.8253C4.31442 10.4995 4.706 10.3365 5.1635 10.3365C5.621 10.3365 6.01258 10.4995 6.33825 10.8253C6.66408 11.151 6.827 11.5425 6.827 12C6.827 12.4575 6.66408 12.8491 6.33825 13.1748C6.01258 13.5006 5.621 13.6635 5.1635 13.6635ZM5.1635 7.66355C4.706 7.66355 4.31442 7.50063 3.98875 7.1748C3.66292 6.84913 3.5 6.45755 3.5 6.00005C3.5 5.54255 3.66292 5.15096 3.98875 4.8253C4.31442 4.49946 4.706 4.33655 5.1635 4.33655C5.621 4.33655 6.01258 4.49946 6.33825 4.8253C6.66408 5.15096 6.827 5.54255 6.827 6.00005C6.827 6.45755 6.66408 6.84913 6.33825 7.1748C6.01258 7.50063 5.621 7.66355 5.1635 7.66355Z",fill:"currentColor"})),format_list_numbered:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M3.5 21.5V20.3078H6V19.25H4.5V18.0577H6V17H3.5V15.8077H6.34625C6.58592 15.8077 6.78683 15.8888 6.949 16.051C7.11117 16.2132 7.19225 16.4141 7.19225 16.6538V17.8462C7.19225 18.0859 7.11117 18.2868 6.949 18.449C6.78683 18.6112 6.58592 18.6923 6.34625 18.6923C6.58592 18.6923 6.78683 18.7733 6.949 18.9355C7.11117 19.0977 7.19225 19.2987 7.19225 19.5385V20.6538C7.19225 20.8936 7.11117 21.0946 6.949 21.2568C6.78683 21.4189 6.58592 21.5 6.34625 21.5H3.5ZM3.5 14.8463V12.25C3.5 12.0103 3.58108 11.8093 3.74325 11.647C3.90542 11.4848 4.10642 11.4038 4.34625 11.4038H6V10.3462H3.5V9.15375H6.34625C6.58592 9.15375 6.78683 9.23483 6.949 9.397C7.11117 9.55933 7.19225 9.76033 7.19225 10V11.75C7.19225 11.9897 7.11117 12.1907 6.949 12.353C6.78683 12.5152 6.58592 12.5963 6.34625 12.5963H4.69225V13.6538H7.19225V14.8463H3.5ZM5 8.19225V3.69225H3.5V2.5H6.19225V8.19225H5ZM9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75V5.25H20.5V6.75H9.30775Z",fill:"currentColor"})),format_list_checked:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5.69425 18.452L2.5 15.2578L3.54425 14.2135L5.66925 16.3385L9.91925 12.0885L10.9635 13.1578L5.69425 18.452ZM5.69425 10.8365L2.5 7.64227L3.54425 6.59802L5.66925 8.72302L9.91925 4.47302L10.9635 5.54227L5.69425 10.8365ZM13.0095 16.5578V15.0578H21.5095V16.5578H13.0095ZM13.0095 8.94227V7.44227H21.5095V8.94227H13.0095Z",fill:"currentColor"})),link:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M10.8077 16.5385H7.0385C5.78283 16.5385 4.7125 16.096 3.8275 15.211C2.9425 14.3262 2.5 13.256 2.5 12.0005C2.5 10.745 2.9425 9.67471 3.8275 8.78955C4.7125 7.90421 5.78283 7.46155 7.0385 7.46155H10.8077V8.96155H7.0385C6.19867 8.96155 5.48233 9.25805 4.8895 9.85105C4.2965 10.444 4 11.1604 4 12C4 12.8397 4.2965 13.556 4.8895 14.149C5.48233 14.742 6.19867 15.0385 7.0385 15.0385H10.8077V16.5385ZM8.25 12.75V11.25H15.75V12.75H8.25ZM13.1923 16.5385V15.0385H16.9615C17.8013 15.0385 18.5177 14.742 19.1105 14.149C19.7035 13.556 20 12.8397 20 12C20 11.1604 19.7035 10.444 19.1105 9.85105C18.5177 9.25805 17.8013 8.96155 16.9615 8.96155H13.1923V7.46155H16.9615C18.2172 7.46155 19.2875 7.90405 20.1725 8.78905C21.0575 9.67388 21.5 10.744 21.5 11.9995C21.5 13.255 21.0575 14.3254 20.1725 15.2105C19.2875 16.0959 18.2172 16.5385 16.9615 16.5385H13.1923Z",fill:"currentColor"})),add_photo:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5.11537 20.5C4.6182 20.5 4.19262 20.323 3.83862 19.969C3.48462 19.615 3.30762 19.1894 3.30762 18.6922V5.30773C3.30762 4.81056 3.48462 4.38498 3.83862 4.03098C4.19262 3.67698 4.6182 3.49998 5.11537 3.49998H13.8076V4.99998H5.11537C5.02553 4.99998 4.95178 5.02881 4.89412 5.08648C4.83645 5.14415 4.80762 5.2179 4.80762 5.30773V18.6922C4.80762 18.7821 4.83645 18.8558 4.89412 18.9135C4.95178 18.9711 5.02553 19 5.11537 19H18.4999C18.5895 19 18.6633 18.9711 18.7211 18.9135C18.7788 18.8558 18.8076 18.7821 18.8076 18.6922V9.99998H20.3076V18.6922C20.3076 19.1894 20.1306 19.615 19.7766 19.969C19.4226 20.323 18.997 20.5 18.4999 20.5H5.11537ZM17.1921 8.61523V6.61523H15.1921V5.11548H17.1921V3.11548H18.6921V5.11548H20.6921V6.61523H18.6921V8.61523H17.1921ZM6.55762 16.75H17.1344L13.8459 12.3655L11.0384 16.0192L9.03837 13.4615L6.55762 16.75Z",fill:"currentColor"})),table:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M3.5 18.6923V5.30775C3.5 4.81058 3.677 4.385 4.031 4.031C4.385 3.677 4.81058 3.5 5.30775 3.5H18.6923C19.1894 3.5 19.615 3.677 19.969 4.031C20.323 4.385 20.5 4.81058 20.5 5.30775V18.6923C20.5 19.1894 20.323 19.615 19.969 19.969C19.615 20.323 19.1894 20.5 18.6923 20.5H5.30775C4.81058 20.5 4.385 20.323 4.031 19.969C3.677 19.615 3.5 19.1894 3.5 18.6923ZM5 9.077H19V5.30775C19 5.21792 18.9712 5.14417 18.9135 5.0865C18.8558 5.02883 18.7821 5 18.6923 5H5.30775C5.21792 5 5.14417 5.02883 5.0865 5.0865C5.02883 5.14417 5 5.21792 5 5.30775V9.077ZM10.1615 14.0385H13.8385V10.577H10.1615V14.0385ZM10.1615 19H13.8385V15.5385H10.1615V19ZM5 14.0385H8.6615V10.577H5V14.0385ZM15.3385 14.0385H19V10.577H15.3385V14.0385ZM5.30775 19H8.6615V15.5385H5V18.6923C5 18.7821 5.02883 18.8558 5.0865 18.9135C5.14417 18.9712 5.21792 19 5.30775 19ZM15.3385 19H18.6923C18.7821 19 18.8558 18.9712 18.9135 18.9135C18.9712 18.8558 19 18.7821 19 18.6923V15.5385H15.3385V19Z",fill:"currentColor"})),horizontal_rule:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M4.5 12.75V11.25H19.5V12.75H4.5Z",fill:"currentColor"})),frontmatter:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M4.5 8.75V7.25H8.5V8.75H4.5Z",fill:"currentColor"}),m.createElement("path",{d:"M4.5 14.75V13.25H8.5V14.75H4.5Z",fill:"currentColor"}),m.createElement("path",{d:"M9.5 8.75V7.25H13.5V8.75H9.5Z",fill:"currentColor"}),m.createElement("path",{d:"M9.5 14.75V13.25H13.5V14.75H9.5Z",fill:"currentColor"}),m.createElement("path",{d:"M14.5 8.75V7.25H18.5V8.75H14.5Z",fill:"currentColor"}),m.createElement("path",{d:"M14.5 14.75V13.25H18.5V14.75H14.5Z",fill:"currentColor"})),frame_source:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M8.6 15.2443L5.35575 12L8.6 8.75575L9.64425 9.825L7.46925 12L9.64425 14.175L8.6 15.2443ZM15.4 15.2443L14.3558 14.175L16.5307 12L14.3558 9.825L15.4 8.75575L18.6443 12L15.4 15.2443ZM5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V15H5V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H9V20.5H5.30775ZM15 20.5V19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V15H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H15ZM3.5 9V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H9V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V9H3.5ZM19 9V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H15V3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V9H19Z",fill:"currentColor"})),arrow_drop_down:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M11.9999 14.6537L7.59619 10.25H16.4037L11.9999 14.6537Z",fill:"currentColor"})),admonition:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M12.0001 21.4C11.7654 21.4 11.5385 21.3548 11.3193 21.2645C11.1002 21.174 10.9002 21.0435 10.7193 20.873L3.1271 13.2807C2.9566 13.0999 2.8261 12.8999 2.7356 12.6807C2.64526 12.4616 2.6001 12.2346 2.6001 12C2.6001 11.7653 2.64526 11.5358 2.7356 11.3115C2.8261 11.0871 2.9566 10.8897 3.1271 10.7192L10.7193 3.12698C10.9002 2.94614 11.1002 2.81314 11.3193 2.72798C11.5385 2.64264 11.7654 2.59998 12.0001 2.59998C12.2348 2.59998 12.4643 2.64264 12.6886 2.72798C12.9129 2.81314 13.1103 2.94614 13.2808 3.12698L20.8731 10.7192C21.0539 10.8897 21.1869 11.0871 21.2721 11.3115C21.3574 11.5358 21.4001 11.7653 21.4001 12C21.4001 12.2346 21.3574 12.4616 21.2721 12.6807C21.1869 12.8999 21.0539 13.0999 20.8731 13.2807L13.2808 20.873C13.1103 21.0435 12.9129 21.174 12.6886 21.2645C12.4643 21.3548 12.2348 21.4 12.0001 21.4ZM12.2213 19.8037L19.8039 12.2212C19.8552 12.1699 19.8808 12.0961 19.8808 12C19.8808 11.9038 19.8552 11.8301 19.8039 11.7787L12.2213 4.19623C12.17 4.14489 12.0963 4.11923 12.0001 4.11923C11.9039 4.11923 11.8302 4.14489 11.7788 4.19623L4.19635 11.7787C4.14501 11.8301 4.11935 11.9038 4.11935 12C4.11935 12.0961 4.14501 12.1699 4.19635 12.2212L11.7788 19.8037C11.8302 19.8551 11.9039 19.8807 12.0001 19.8807C12.0963 19.8807 12.17 19.8551 12.2213 19.8037ZM11.2501 13.0865H12.7501V7.47123H11.2501V13.0865ZM12.0001 15.702C12.2258 15.702 12.4168 15.6237 12.5731 15.4672C12.7296 15.3109 12.8078 15.1199 12.8078 14.8942C12.8078 14.6686 12.7296 14.4776 12.5731 14.3212C12.4168 14.1647 12.2258 14.0865 12.0001 14.0865C11.7744 14.0865 11.5834 14.1647 11.4271 14.3212C11.2706 14.4776 11.1923 14.6686 11.1923 14.8942C11.1923 15.1199 11.2706 15.3109 11.4271 15.4672C11.5834 15.6237 11.7744 15.702 12.0001 15.702Z",fill:"currentColor"})),rich_text:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19ZM6.75 17H17.3268L14 12.3655L11.2308 16.0192L9 13.4615L6.75 17Z",fill:"currentColor"}),m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12V6.5H9.1925C9.5925 6.5 9.9425 6.65 10.2425 6.95C10.5425 7.25 10.6925 7.6 10.6925 8V8.6925C10.6925 9.03733 10.605 9.32675 10.43 9.56075C10.255 9.79458 10.0168 9.97817 9.7155 10.1115L10.6155 12H9.404L8.504 10.1925H7.1925V12H6ZM9.1925 9H7.1925V7.6925H9.1925C9.26933 7.6925 9.33983 7.7245 9.404 7.7885C9.468 7.85267 9.5 7.92317 9.5 8V8.6925C9.5 8.76933 9.468 8.83983 9.404 8.904C9.33983 8.968 9.26933 9 9.1925 9Z",fill:"currentColor"}),m.createElement("path",{d:"M12.5 7H17.5V8.25H12.5V7Z",fill:"currentColor"}),m.createElement("path",{d:"M12.5 9.25H17.5V10.5H12.5V9.25Z",fill:"currentColor"})),difference:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),m.createElement("rect",{x:"9",y:"10",width:"5.5",height:"1.5",fill:"currentColor"}),m.createElement("rect",{x:"9",y:"15",width:"5.5",height:"1.5",fill:"currentColor"}),m.createElement("rect",{x:"11",y:"8",width:"1.5",height:"5.5",fill:"currentColor"})),markdown:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),m.createElement("path",{d:"M13 15H11.5V11L9.5 14L7.5 11V15H6V8H7.5L9.5 11L11.5 8H13V15Z",fill:"currentColor"}),m.createElement("path",{d:"M15.9921 15.5833L13.2886 12.8797L14.0546 12.1137L15.4504 13.5016V7.99597L16.5336 7.99993V13.5016L17.9296 12.1137L18.6954 12.8797L15.9921 15.5833Z",fill:"currentColor"})),open_in_new:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H11.6152V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V12.3848H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM9.71925 15.3345L8.6655 14.2808L17.9462 5H14V3.5H20.5V10H19V6.05375L9.71925 15.3345Z",fill:"currentColor"})),link_off:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M18.8843 16.1038L17.7498 14.9385C18.4228 14.7552 18.9661 14.3946 19.3796 13.8568C19.7931 13.319 19.9998 12.7 19.9998 12C19.9998 11.1604 19.705 10.444 19.1153 9.85105C18.5255 9.25805 17.8139 8.96155 16.9806 8.96155H13.1728V7.46155H16.9806C18.2293 7.46155 19.2947 7.90422 20.1768 8.78955C21.0588 9.67472 21.4998 10.7449 21.4998 12C21.4998 12.8859 21.262 13.6951 20.7863 14.4278C20.3107 15.1606 19.6767 15.7193 18.8843 16.1038ZM15.5806 12.75L14.0806 11.25H15.7306V12.75H15.5806ZM20.1461 22.2538L1.74609 3.8538L2.79984 2.80005L21.1998 21.2L20.1461 22.2538ZM10.8268 16.5386H7.03834C5.78318 16.5386 4.71301 16.0959 3.82784 15.2105C2.94251 14.3254 2.49984 13.2552 2.49984 12C2.49984 10.8885 2.85784 9.91322 3.57384 9.07405C4.28984 8.23505 5.18826 7.72838 6.26909 7.55405H6.49984L7.90759 8.96155H7.03834C6.19851 8.96155 5.48218 9.25805 4.88934 9.85105C4.29634 10.444 3.99984 11.1604 3.99984 12C3.99984 12.8397 4.29634 13.556 4.88934 14.149C5.48218 14.742 6.19851 15.0385 7.03834 15.0385H10.8268V16.5386ZM8.26909 12.75V11.25H10.2113L11.6863 12.75H8.26909Z",fill:"currentColor"})),edit:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M5 19H6.2615L16.498 8.7635L15.2365 7.502L5 17.7385V19ZM3.5 20.5V17.1155L16.6905 3.93075C16.8417 3.79342 17.0086 3.68733 17.1913 3.6125C17.3741 3.5375 17.5658 3.5 17.7663 3.5C17.9668 3.5 18.1609 3.53558 18.3488 3.60675C18.5367 3.67792 18.7032 3.79108 18.848 3.94625L20.0693 5.18275C20.2244 5.32758 20.335 5.49425 20.401 5.68275C20.467 5.87125 20.5 6.05975 20.5 6.24825C20.5 6.44942 20.4657 6.64133 20.397 6.824C20.3283 7.00683 20.2191 7.17383 20.0693 7.325L6.8845 20.5H3.5ZM15.8562 8.14375L15.2365 7.502L16.498 8.7635L15.8562 8.14375Z",fill:"currentColor"})),content_copy:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M9.05775 17.5C8.55258 17.5 8.125 17.325 7.775 16.975C7.425 16.625 7.25 16.1974 7.25 15.6923V4.30775C7.25 3.80258 7.425 3.375 7.775 3.025C8.125 2.675 8.55258 2.5 9.05775 2.5H17.4423C17.9474 2.5 18.375 2.675 18.725 3.025C19.075 3.375 19.25 3.80258 19.25 4.30775V15.6923C19.25 16.1974 19.075 16.625 18.725 16.975C18.375 17.325 17.9474 17.5 17.4423 17.5H9.05775ZM9.05775 16H17.4423C17.5192 16 17.5898 15.9679 17.6538 15.9038C17.7179 15.8398 17.75 15.7692 17.75 15.6923V4.30775C17.75 4.23075 17.7179 4.16025 17.6538 4.09625C17.5898 4.03208 17.5192 4 17.4423 4H9.05775C8.98075 4 8.91025 4.03208 8.84625 4.09625C8.78208 4.16025 8.75 4.23075 8.75 4.30775V15.6923C8.75 15.7692 8.78208 15.8398 8.84625 15.9038C8.91025 15.9679 8.98075 16 9.05775 16ZM5.55775 21C5.05258 21 4.625 20.825 4.275 20.475C3.925 20.125 3.75 19.6974 3.75 19.1923V6.30775H5.25V19.1923C5.25 19.2693 5.28208 19.3398 5.34625 19.4038C5.41025 19.4679 5.48075 19.5 5.55775 19.5H15.4423V21H5.55775Z",fill:"currentColor"})),more_horiz:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M6.23096 13.5C5.81846 13.5 5.46537 13.3531 5.17171 13.0592C4.87787 12.7656 4.73096 12.4125 4.73096 12C4.73096 11.5875 4.87787 11.2344 5.17171 10.9408C5.46537 10.6469 5.81846 10.5 6.23096 10.5C6.64346 10.5 6.99662 10.6469 7.29046 10.9408C7.58412 11.2344 7.73096 11.5875 7.73096 12C7.73096 12.4125 7.58412 12.7656 7.29046 13.0592C6.99662 13.3531 6.64346 13.5 6.23096 13.5ZM12.0002 13.5C11.5877 13.5 11.2346 13.3531 10.941 13.0592C10.6471 12.7656 10.5002 12.4125 10.5002 12C10.5002 11.5875 10.6471 11.2344 10.941 10.9408C11.2346 10.6469 11.5877 10.5 12.0002 10.5C12.4127 10.5 12.7658 10.6469 13.0595 10.9408C13.3533 11.2344 13.5002 11.5875 13.5002 12C13.5002 12.4125 13.3533 12.7656 13.0595 13.0592C12.7658 13.3531 12.4127 13.5 12.0002 13.5ZM17.7695 13.5C17.357 13.5 17.0038 13.3531 16.71 13.0592C16.4163 12.7656 16.2695 12.4125 16.2695 12C16.2695 11.5875 16.4163 11.2344 16.71 10.9408C17.0038 10.6469 17.357 10.5 17.7695 10.5C18.182 10.5 18.535 10.6469 18.8287 10.9408C19.1225 11.2344 19.2695 11.5875 19.2695 12C19.2695 12.4125 19.1225 12.7656 18.8287 13.0592C18.535 13.3531 18.182 13.5 17.7695 13.5Z",fill:"currentColor"})),more_vert:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M12 19.2692C11.5875 19.2692 11.2344 19.1223 10.9408 18.8285C10.6469 18.5348 10.5 18.1817 10.5 17.7692C10.5 17.3567 10.6469 17.0035 10.9408 16.7097C11.2344 16.416 11.5875 16.2692 12 16.2692C12.4125 16.2692 12.7656 16.416 13.0592 16.7097C13.3531 17.0035 13.5 17.3567 13.5 17.7692C13.5 18.1817 13.3531 18.5348 13.0592 18.8285C12.7656 19.1223 12.4125 19.2692 12 19.2692ZM12 13.5C11.5875 13.5 11.2344 13.353 10.9408 13.0592C10.6469 12.7655 10.5 12.4125 10.5 12C10.5 11.5875 10.6469 11.2344 10.9408 10.9407C11.2344 10.6469 11.5875 10.5 12 10.5C12.4125 10.5 12.7656 10.6469 13.0592 10.9407C13.3531 11.2344 13.5 11.5875 13.5 12C13.5 12.4125 13.3531 12.7655 13.0592 13.0592C12.7656 13.353 12.4125 13.5 12 13.5ZM12 7.73071C11.5875 7.73071 11.2344 7.58388 10.9408 7.29021C10.6469 6.99638 10.5 6.64321 10.5 6.23071C10.5 5.81821 10.6469 5.46513 10.9408 5.17146C11.2344 4.87763 11.5875 4.73071 12 4.73071C12.4125 4.73071 12.7656 4.87763 13.0592 5.17146C13.3531 5.46513 13.5 5.81821 13.5 6.23071C13.5 6.64321 13.3531 6.99638 13.0592 7.29021C12.7656 7.58388 12.4125 7.73071 12 7.73071Z",fill:"currentColor"})),close:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M6.39994 18.6538L5.34619 17.6L10.9462 12L5.34619 6.4L6.39994 5.34625L11.9999 10.9463L17.5999 5.34625L18.6537 6.4L13.0537 12L18.6537 17.6L17.5999 18.6538L11.9999 13.0538L6.39994 18.6538Z",fill:"currentColor"})),settings:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M9.69225 21.5L9.3115 18.4538C9.04367 18.3641 8.769 18.2385 8.4875 18.077C8.20617 17.9153 7.95459 17.7422 7.73275 17.5577L4.9115 18.75L2.604 14.75L5.04425 12.9058C5.02125 12.7571 5.00492 12.6077 4.99525 12.4578C4.98559 12.3078 4.98075 12.1583 4.98075 12.0095C4.98075 11.8673 4.98559 11.7228 4.99525 11.576C5.00492 11.4292 5.02125 11.2686 5.04425 11.0943L2.604 9.25L4.9115 5.26925L7.723 6.452C7.96417 6.261 8.22159 6.08633 8.49525 5.928C8.76892 5.76967 9.03784 5.64242 9.302 5.54625L9.69225 2.5H14.3078L14.6885 5.55575C14.9885 5.66475 15.2599 5.792 15.5028 5.9375C15.7458 6.083 15.991 6.2545 16.2385 6.452L19.0885 5.26925L21.396 9.25L18.9173 11.123C18.9531 11.2845 18.9727 11.4355 18.976 11.576C18.9792 11.7163 18.9808 11.8577 18.9808 12C18.9808 12.1358 18.9775 12.274 18.971 12.4145C18.9647 12.5548 18.9417 12.7154 18.902 12.8963L21.3615 14.75L19.0538 18.75L16.2385 17.548C15.991 17.7455 15.7384 17.9202 15.4808 18.072C15.2231 18.224 14.959 18.3481 14.6885 18.4443L14.3078 21.5H9.69225ZM11 20H12.9655L13.325 17.3212C13.8353 17.1879 14.3017 16.9985 14.724 16.753C15.1465 16.5073 15.5539 16.1916 15.9463 15.8057L18.4308 16.85L19.4155 15.15L17.2463 13.5155C17.3296 13.2565 17.3863 13.0026 17.4163 12.7537C17.4464 12.5051 17.4615 12.2538 17.4615 12C17.4615 11.7397 17.4464 11.4884 17.4163 11.2463C17.3863 11.0039 17.3296 10.7564 17.2463 10.5038L19.4345 8.85L18.45 7.15L15.9365 8.2095C15.6018 7.85183 15.2009 7.53583 14.7338 7.2615C14.2664 6.98717 13.7937 6.79292 13.3155 6.67875L13 4H11.0155L10.6845 6.66925C10.1743 6.78975 9.70325 6.97433 9.27125 7.223C8.83909 7.47183 8.42684 7.79233 8.0345 8.1845L5.55 7.15L4.5655 8.85L6.725 10.4595C6.64167 10.6968 6.58334 10.9437 6.55 11.2C6.51667 11.4563 6.5 11.7262 6.5 12.0095C6.5 12.2698 6.51667 12.525 6.55 12.775C6.58334 13.025 6.6385 13.2718 6.7155 13.5155L4.5655 15.15L5.55 16.85L8.025 15.8C8.4045 16.1897 8.81025 16.5089 9.24225 16.7578C9.67442 17.0064 10.152 17.1974 10.675 17.3307L11 20ZM12.0115 15C12.8435 15 13.5515 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.168 14.7195 10.46 14.1355 9.876C13.5515 9.292 12.8435 9 12.0115 9C11.1692 9 10.4586 9.292 9.87975 9.876C9.30092 10.46 9.0115 11.168 9.0115 12C9.0115 12.832 9.30092 13.54 9.87975 14.124C10.4586 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})),delete_big:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),delete_small:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),format_align_center:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM7.5 16.625V15.125H16.5V16.625H7.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM7.5 8.875V7.375H16.5V8.875H7.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_left:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM3.5 16.625V15.125H14.5V16.625H3.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM3.5 8.875V7.375H14.5V8.875H3.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_right:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M3.5 5V3.5H20.5V5H3.5ZM9.5 8.875V7.375H20.5V8.875H9.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM9.5 16.625V15.125H20.5V16.625H9.5ZM3.5 20.5V19H20.5V20.5H3.5Z",fill:"currentColor"})),add_row:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.025 10.2077C4.375 9.85775 4.80258 9.68275 5.30775 9.68275H6.5V11.1827H5.30775C5.21792 11.1827 5.14417 11.2116 5.0865 11.2693C5.02883 11.3269 5 11.4007 5 11.4905V16.1923C5 16.2821 5.02883 16.3558 5.0865 16.4135C5.14417 16.4712 5.21792 16.5 5.30775 16.5H18.6923C18.7821 16.5 18.8558 16.4712 18.9135 16.4135C18.9712 16.3558 19 16.2821 19 16.1923V11.4905C19 11.4007 18.9712 11.3269 18.9135 11.2693C18.8558 11.2116 18.7821 11.1827 18.6923 11.1827H17.6923V9.68275H18.6923C19.1974 9.68275 19.625 9.85775 19.975 10.2077C20.325 10.5577 20.5 10.9853 20.5 11.4905V16.1923C20.5 16.6974 20.325 17.125 19.975 17.475C19.625 17.825 19.1974 18 18.6923 18H5.30775C4.80258 18 4.375 17.825 4.025 17.475C3.675 17.125 3.5 16.6974 3.5 16.1923V11.4905C3.5 10.9853 3.675 10.5577 4.025 10.2077Z",fill:"currentColor"}),m.createElement("path",{d:"M11.3848 9.68275V7.5H12.8848V9.68275H15V11.1827H12.8848V13.2307H11.3848V11.1827H9.26925V9.68275H11.3848Z",fill:"currentColor"})),add_column:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70775 4.025C9.35775 4.375 9.18275 4.80258 9.18275 5.30775V6.5H10.6827V5.30775C10.6827 5.21792 10.7116 5.14417 10.7693 5.0865C10.8269 5.02883 10.9007 5 10.9905 5H15.6923C15.7821 5 15.8558 5.02883 15.9135 5.0865C15.9712 5.14417 16 5.21792 16 5.30775V18.6923C16 18.7821 15.9712 18.8558 15.9135 18.9135C15.8558 18.9712 15.7821 19 15.6923 19H10.9905C10.9007 19 10.8269 18.9712 10.7693 18.9135C10.7116 18.8558 10.6827 18.7821 10.6827 18.6923V17.6923H9.18275V18.6923C9.18275 19.1974 9.35775 19.625 9.70775 19.975C10.0577 20.325 10.4853 20.5 10.9905 20.5H15.6923C16.1974 20.5 16.625 20.325 16.975 19.975C17.325 19.625 17.5 19.1974 17.5 18.6923V5.30775C17.5 4.80258 17.325 4.375 16.975 4.025C16.625 3.675 16.1974 3.5 15.6923 3.5H10.9905C10.4853 3.5 10.0577 3.675 9.70775 4.025Z",fill:"currentColor"}),m.createElement("path",{d:"M9.18275 11.3848H7V12.8848H9.18275V15H10.6827V12.8848H12.7307V11.3848H10.6827V9.26925H9.18275V11.3848Z",fill:"currentColor"})),insert_col_left:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M13.0001 20.1152H8.67713H8.75388H8.69238H13.0001ZM7.19238 19.8075C7.19238 20.3127 7.36738 20.7402 7.71738 21.0902C8.06738 21.4402 8.49497 21.6152 9.00013 21.6152H12.6924C13.1975 21.6152 13.6251 21.4402 13.9751 21.0902C14.3251 20.7402 14.5001 20.3127 14.5001 19.8075V10.423H13.0001V19.8075C13.0001 19.8973 12.9713 19.9711 12.9136 20.0287C12.856 20.0864 12.7822 20.1152 12.6924 20.1152H9.00013C8.9103 20.1152 8.83655 20.0864 8.77888 20.0287C8.72122 19.9711 8.69238 19.8973 8.69238 19.8075V4.69223C8.26422 4.74357 7.90722 4.93299 7.62138 5.26048C7.33538 5.58798 7.19238 5.97548 7.19238 6.42298V19.8075ZM13.0001 2.49998V4.61523H10.8846V6.11523H13.0001V8.23073H14.5001V6.11523H16.6154V4.61523H14.5001V2.49998H13.0001Z",fill:"currentColor"})),insert_row_above:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M20.1152 9.99987V14.3229V14.2461V14.3076V9.99987ZM19.8075 15.8076C20.3127 15.8076 20.7402 15.6326 21.0902 15.2826C21.4402 14.9326 21.6152 14.505 21.6152 13.9999V10.3076C21.6152 9.80245 21.4402 9.37487 21.0902 9.02487C20.7402 8.67487 20.3127 8.49987 19.8075 8.49987H10.423V9.99987H19.8075C19.8973 9.99987 19.9711 10.0287 20.0287 10.0864C20.0864 10.144 20.1152 10.2178 20.1152 10.3076V13.9999C20.1152 14.0897 20.0864 14.1635 20.0287 14.2211C19.9711 14.2788 19.8973 14.3076 19.8075 14.3076H4.69223C4.74357 14.7358 4.93299 15.0928 5.26048 15.3786C5.58798 15.6646 5.97548 15.8076 6.42298 15.8076H19.8075ZM2.49998 9.99987H4.61523V12.1154H6.11523V9.99987H8.23073V8.49987H6.11523V6.38462H4.61523V8.49987H2.49998V9.99987Z",fill:"currentColor"})),insert_row_below:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M20.1152 14.1924V9.86939V9.94614V9.88464V14.1924ZM19.8075 8.38464C20.3127 8.38464 20.7402 8.55964 21.0902 8.90964C21.4402 9.25964 21.6152 9.68723 21.6152 10.1924V13.8846C21.6152 14.3898 21.4402 14.8174 21.0902 15.1674C20.7402 15.5174 20.3127 15.6924 19.8075 15.6924H10.423V14.1924H19.8075C19.8973 14.1924 19.9711 14.1636 20.0287 14.1059C20.0864 14.0482 20.1152 13.9745 20.1152 13.8846V10.1924C20.1152 10.1026 20.0864 10.0288 20.0287 9.97114C19.9711 9.91348 19.8973 9.88464 19.8075 9.88464H4.69223C4.74357 9.45648 4.93299 9.09948 5.26048 8.81364C5.58798 8.52764 5.97548 8.38464 6.42298 8.38464H19.8075ZM2.49998 14.1924H4.61523V12.0769H6.11523V14.1924H8.23073V15.6924H6.11523V17.8076H4.61523V15.6924H2.49998V14.1924Z",fill:"currentColor"})),insert_col_right:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M10.8075 20.1152H15.1305H15.0537H15.1152H10.8075ZM16.6152 19.8075C16.6152 20.3127 16.4402 20.7402 16.0902 21.0902C15.7402 21.4402 15.3127 21.6152 14.8075 21.6152H11.1152C10.6101 21.6152 10.1825 21.4402 9.83248 21.0902C9.48248 20.7402 9.30748 20.3127 9.30748 19.8075V10.423H10.8075V19.8075C10.8075 19.8973 10.8363 19.9711 10.894 20.0287C10.9517 20.0864 11.0254 20.1152 11.1152 20.1152H14.8075C14.8973 20.1152 14.9711 20.0864 15.0287 20.0287C15.0864 19.9711 15.1152 19.8973 15.1152 19.8075V4.69223C15.5434 4.74357 15.9004 4.93299 16.1862 5.26048C16.4722 5.58798 16.6152 5.97548 16.6152 6.42298V19.8075ZM10.8075 2.49998V4.61523H12.923V6.11523H10.8075V8.23073H9.30748V6.11523H7.19223V4.61523H9.30748V2.49998H10.8075Z",fill:"currentColor"})),check:m.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m.createElement("path",{d:"M9.54983 17.6537L4.21533 12.3192L5.28433 11.25L9.54983 15.5155L18.7153 6.34998L19.7843 7.41923L9.54983 17.6537Z",fill:"currentColor"}))},qD="_editorRoot_er3ed_53",ZD="_editorWrapper_er3ed_155",YD="_toolbarRoot_er3ed_162",XD="_readOnlyToolbarRoot_er3ed_189",QD="_toolbarToggleItem_er3ed_208",eR="_toolbarGroupOfGroups_er3ed_219",tR="_toolbarToggleSingleGroup_er3ed_224",nR="_toolbarButton_er3ed_239",rR="_activeToolbarButton_er3ed_275",iR="_toolbarButtonDropdownContainer_er3ed_286",oR="_selectContainer_er3ed_288",sR="_selectItem_er3ed_301",lR="_toolbarButtonSelectTrigger_er3ed_307",aR="_selectTrigger_er3ed_308",cR="_selectDropdownArrow_er3ed_373",uR="_contentEditable_er3ed_379",dR="_codeMirrorWrapper_er3ed_391",fR="_codeMirrorToolbar_er3ed_408",hR="_propertyPanelTitle_er3ed_430",gR="_propertyEditorTable_er3ed_438",pR="_iconButton_er3ed_456",mR="_readOnlyColumnCell_er3ed_461",vR="_buttonsFooter_er3ed_474",_R="_propertyEditorInput_er3ed_480",yR="_primaryButton_er3ed_506",xR="_secondaryButton_er3ed_507",CR="_smallButton_er3ed_522",bR="_dialogForm_er3ed_534",ER="_linkDialogEditForm_er3ed_540",TR="_linkDialogInputContainer_er3ed_548",SR="_linkDialogInputWrapper_er3ed_554",wR="_linkDialogInput_er3ed_548",kR="_linkDialogAnchor_er3ed_586",MR="_linkDialogPopoverContent_er3ed_600",AR="_tableColumnEditorPopoverContent_er3ed_601",IR="_dialogContent_er3ed_602",NR="_largeDialogContent_er3ed_614",OR="_dialogTitle_er3ed_624",DR="_dialogCloseButton_er3ed_630",RR="_popoverContent_er3ed_637",LR="_popoverArrow_er3ed_649",$R="_linkDialogPreviewAnchor_er3ed_653",PR="_tooltipTrigger_er3ed_676",FR="_tooltipContent_er3ed_680",VR="_actionButton_er3ed_694",BR="_primaryActionButton_er3ed_701",HR="_tableEditor_er3ed_713",KR="_toolCell_er3ed_724",UR="_tableColumnEditorTrigger_er3ed_743",WR="_addRowButton_er3ed_745",zR="_addColumnButton_er3ed_746",jR="_tableColumnEditorToolbar_er3ed_788",JR="_toggleGroupRoot_er3ed_801",GR="_tableToolsColumn_er3ed_819",qR="_leftAlignedCell_er3ed_828",ZR="_rightAlignedCell_er3ed_832",YR="_centeredCell_er3ed_836",XR="_dialogOverlay_er3ed_869",QR="_focusedImage_er3ed_915",eL="_imageWrapper_er3ed_919",tL="_editImageToolbar_er3ed_932",nL="_editImageButton_er3ed_936",rL="_inlineEditor_er3ed_942",iL="_blockEditor_er3ed_951",oL="_nestedEditor_er3ed_960",sL="_genericComponentName_er3ed_979",lL="_diffSourceToggleWrapper_er3ed_985",aL="_ggDiffSourceToggle_er3ed_993",cL="_diffSourceToggle_er3ed_985",uL="_selectWithLabel_er3ed_1011",dL="_toolbarTitleMode_er3ed_1026",fL="_imageControlWrapperResizing_er3ed_1031",hL="_imageResizer_er3ed_1035",gL="_imageResizerN_er3ed_1044",pL="_imageResizerNe_er3ed_1050",mL="_imageResizerE_er3ed_1056",vL="_imageResizerSe_er3ed_1062",_L="_imageResizerS_er3ed_1062",yL="_imageResizerSw_er3ed_1074",xL="_imageResizerW_er3ed_1080",CL="_imageResizerNw_er3ed_1086",bL="_imagePlaceholder_er3ed_1092",EL="_imageDimensionsContainer_er3ed_1100",TL="_placeholder_er3ed_1105",SL="_rootContentEditableWrapper_er3ed_1118",wL="_downshiftInputWrapper_er3ed_1128",kL="_downshiftInput_er3ed_1128",ML="_downshiftAutocompleteContainer_er3ed_1159",AL="_textInput_er3ed_1205",IL="_multiFieldForm_er3ed_1213",NL="_formField_er3ed_1219",OL="_markdownParseError_er3ed_1230",DL="_popupContainer_er3ed_1239",RL="_inputSizer_er3ed_1244",j={editorRoot:qD,editorWrapper:ZD,toolbarRoot:YD,readOnlyToolbarRoot:XD,toolbarToggleItem:QD,toolbarGroupOfGroups:eR,toolbarToggleSingleGroup:tR,toolbarButton:nR,activeToolbarButton:rR,toolbarButtonDropdownContainer:iR,selectContainer:oR,selectItem:sR,toolbarButtonSelectTrigger:lR,selectTrigger:aR,selectDropdownArrow:cR,contentEditable:uR,codeMirrorWrapper:dR,codeMirrorToolbar:fR,propertyPanelTitle:hR,propertyEditorTable:gR,iconButton:pR,readOnlyColumnCell:mR,buttonsFooter:vR,propertyEditorInput:_R,primaryButton:yR,secondaryButton:xR,smallButton:CR,dialogForm:bR,linkDialogEditForm:ER,linkDialogInputContainer:TR,linkDialogInputWrapper:SR,linkDialogInput:wR,linkDialogAnchor:kR,linkDialogPopoverContent:MR,tableColumnEditorPopoverContent:AR,dialogContent:IR,largeDialogContent:NR,dialogTitle:OR,dialogCloseButton:DR,popoverContent:RR,popoverArrow:LR,linkDialogPreviewAnchor:$R,tooltipTrigger:PR,tooltipContent:FR,actionButton:VR,primaryActionButton:BR,tableEditor:HR,toolCell:KR,tableColumnEditorTrigger:UR,addRowButton:WR,addColumnButton:zR,tableColumnEditorToolbar:jR,toggleGroupRoot:JR,tableToolsColumn:GR,leftAlignedCell:qR,rightAlignedCell:ZR,centeredCell:YR,dialogOverlay:XR,focusedImage:QR,imageWrapper:eL,editImageToolbar:tL,editImageButton:nL,inlineEditor:rL,blockEditor:iL,nestedEditor:oL,genericComponentName:sL,diffSourceToggleWrapper:lL,ggDiffSourceToggle:aL,diffSourceToggle:cL,selectWithLabel:uL,toolbarTitleMode:dL,imageControlWrapperResizing:fL,imageResizer:hL,imageResizerN:gL,imageResizerNe:pL,imageResizerE:mL,imageResizerSe:vL,imageResizerS:_L,imageResizerSw:yL,imageResizerW:xL,imageResizerNw:CL,imagePlaceholder:bL,imageDimensionsContainer:EL,placeholder:TL,rootContentEditableWrapper:SL,downshiftInputWrapper:wL,downshiftInput:kL,downshiftAutocompleteContainer:ML,textInput:AL,multiFieldForm:IL,formField:NL,markdownParseError:OL,popupContainer:DL,inputSizer:RL};function LL(e){try{const t=e.anchor,n=e.focus,r=e.anchor.getNode(),i=e.focus.getNode();return r===i?r:e.isBackward()?Bv(n)?r:i:Bv(t)?r:i}catch{return null}}s(LL,"getSelectedNode");var $L=["transform","perspective","filter","backdrop-filter","contain","container-type"],PL=["layout","paint","strict","content"];function FL(e){let t=e?.parentElement;for(;t;){const n=window.getComputedStyle(t),r=n.willChange.split(",").map(i=>i.trim()).some(i=>$L.includes(i));if(n.transform!=="none"||n.perspective!=="none"||n.filter!=="none"||n.backdropFilter!=="none"||PL.includes(n.contain)||n.containerType!=="normal"||n.contentVisibility==="auto"||r)return t;t=t.parentElement}return null}s(FL,"getFixedContainingBlock");function nS(e,t){const n=FL(t);if(n){const r=n.getBoundingClientRect();return{top:Math.round(e.top-r.top),left:Math.round(e.left-r.left),width:Math.round(e.width),height:Math.round(e.height)}}return{top:Math.round(e.top),left:Math.round(e.left),width:Math.round(e.width),height:Math.round(e.height)}}s(nS,"adjustedRectangle");function rS(e,t){const n=e.getRootElement(),r=e.getElementByKey(t);return n===null||r===null?null:nS(r.getBoundingClientRect(),n)}s(rS,"getNodeRectangle");function iS(e){const t=ie(),n=window.getSelection(),r=document.activeElement,i=e.getRootElement();if(t!==null&&n!==null&&i!==null&&i.contains(n.anchorNode)&&e.isEditable()){const o=n.getRangeAt(0);let l;if(n.isCollapsed){let a=n.anchorNode;a?.nodeType==3&&(a=a.parentNode),l=a.getBoundingClientRect(),l.width=0}else if(n.anchorNode===i){let a=i;for(;a.firstElementChild!=null;)a=a.firstElementChild;l=a.getBoundingClientRect()}else l=o.getBoundingClientRect();return nS(l,i)}else if(r?.className!=="link-input")return null;return null}s(iS,"getSelectionRectangle");function VL(e,t){let n=null,r=[],i="";e.getEditorState().read(()=>{const a=ie();!a||oe(a)&&a.isCollapsed()||a.getNodes().length===0||(r=ZE(e,a).nodes,r.length>0&&(n=Qb()))},{editor:e});const o=n;if(!o||r.length===0)return"";const l={error:void 0,failed:!1};if(o.update(()=>{try{const a=$t(),c=YE(r);let d=Qe();const u=s(()=>{d.isEmpty()||(a.append(d),d=Qe())},"appendInlineContainer");for(const f of c)f.isInline()?d.append(f):(u(),a.append(f));u(),i=CT({root:a,...t})}catch(a){l.failed=!0,l.error=a}},{discrete:!0,skipTransforms:!0}),l.failed)throw l.error;return i.replace(/\n+$/u,"")}s(VL,"getSelectionAsMarkdown");var BL=s(({children:e})=>{const t=li(vi);return m.createElement(QT,{initialEditor:t},e)},"LexicalProvider"),HL=s(()=>{const e=Ci(),t=Nn(PT),n=Nn(BT),r=s(f=>{n(f),t(f?{current:f}:null)},"onRef"),[i,o,l,a,c,d,u]=Er(fg,hg,zT,jT,GT,gg,JT);return m.createElement(m.Fragment,null,a.map((f,h)=>m.createElement(f,{key:h})),m.createElement(oS,{wrappers:c},m.createElement("div",{className:(0,nt.default)(j.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},m.createElement(eS,{contentEditable:m.createElement("div",{ref:r,className:"mdxeditor-contenteditable-wrapper"},m.createElement(Fm,{className:(0,nt.default)(j.contentEditable,i),ariaLabel:e("contentArea.editableMarkdown","editable markdown"),spellCheck:o})),placeholder:m.createElement("div",{className:(0,nt.default)(j.contentEditable,j.placeholder,i)},m.createElement("p",null,d)),ErrorBoundary:Vm}))),l.map((f,h)=>m.createElement(f,{key:h})),u.map((f,h)=>m.createElement(f,{key:h})))},"RichTextEditor"),KL={listItemIndent:"one"},UL=s(e=>tS[e],"defaultIconComponentFor");function WL(e,t,n={}){let r=t;for(const[i,o]of Object.entries(n))r=r.replaceAll(`{{${i}}}`,String(o));return r}s(WL,"defaultTranslation");var oS=s(({wrappers:e,children:t})=>{if(e.length===0)return m.createElement(m.Fragment,null,t);const n=e[0];return m.createElement(n,null,m.createElement(oS,{wrappers:e.slice(1)},t))},"RenderRecursiveWrappers"),zL=s(({children:e,className:t,overlayContainer:n})=>{const r=m.useRef(null),i=m.useRef(null),o=Nn(Ko),l=Nn($D);return m.useEffect(()=>{const a=document.createElement("div");return a.classList.add("mdxeditor-popup-container",j.editorRoot,j.popupContainer,...(t??"").trim().split(" ").filter(Boolean)),(n??document.body).appendChild(a),r.current=a,o(r),l(i),()=>{a.remove()}},[t,r,n,o,l]),m.createElement("div",{className:(0,nt.default)("mdxeditor",j.editorRoot,j.editorWrapper,t),ref:i},e)},"EditorRootElement");function jL(e){return{getMarkdown:s(()=>{const t=e.getValue(la);return t==="source"||t==="diff"?e.getValue(aa):e.getValue(Io)},"getMarkdown"),setMarkdown:s(t=>{e.pub(zm,t)},"setMarkdown"),insertMarkdown:s(t=>{e.pub(FT,t)},"insertMarkdown"),focus:s((t,n)=>{var r;(r=e.getValue(vi))==null||r.focus(t,n)},"focus"),getContentEditableHTML:s(()=>{var t;return((t=e.getValue(PT))==null?void 0:t.current.innerHTML)??""},"getContentEditableHTML"),getSelectionMarkdown:s(()=>{const t=e.getValue(la);if(t==="source"||t==="diff")return"";const n=e.getValue(pt);if(!n)return"";const r=e.getValue(Wd),i=e.getValue(Km),o=e.getValue(Lu),l=e.getValue(zd),a=e.getValue(Um);return VL(n,{visitors:r,toMarkdownExtensions:i,toMarkdownOptions:o,jsxComponentDescriptors:l,jsxIsAvailable:a})},"getSelectionMarkdown")}}s(jL,"createMethods");var JL=s(({onReady:e,onDispose:t})=>{const n=hd(),r=m.useMemo(()=>jL(n),[n]);return m.useLayoutEffect(()=>(e(r),()=>{t(r)}),[r,t,e]),null},"Methods"),GL=m.forwardRef((e,t)=>{const n=m.useRef(null),r=m.useRef(null),i=m.useRef([]),o=m.useRef(e.trim===!1?e.markdown:e.markdown.trim()),l=m.useCallback(u=>{const f=n.current;f&&r.current===null?u(f):i.current.push(u)},[]),a=m.useMemo(()=>({getMarkdown:s(()=>{var u;return((u=n.current)==null?void 0:u.getMarkdown())??o.current},"getMarkdown"),setMarkdown:s(u=>{o.current=u,l(f=>{f.setMarkdown(u)})},"setMarkdown"),insertMarkdown:s(u=>{l(f=>{f.insertMarkdown(u)})},"insertMarkdown"),focus:s((u,f)=>{l(h=>{h.focus(u,f)})},"focus"),getContentEditableHTML:s(()=>{var u;return((u=n.current)==null?void 0:u.getContentEditableHTML())??""},"getContentEditableHTML"),getSelectionMarkdown:s(()=>{var u;return((u=n.current)==null?void 0:u.getSelectionMarkdown())??""},"getSelectionMarkdown")}),[l]),c=m.useCallback(u=>{if(n.current=u,r.current===u)return;if(i.current.length===0){o.current=u.getMarkdown();return}r.current=u;const f=s(()=>{if(n.current!==u){r.current===u&&(r.current=null);return}const h=i.current.shift();if(!h){r.current=null,o.current=u.getMarkdown();return}h(u),queueMicrotask(f)},"replayNext");f()},[]),d=m.useCallback(u=>{n.current===u&&(o.current=u.getMarkdown(),n.current=null)},[]);return m.useImperativeHandle(t,()=>a,[a]),m.createElement(k8,{plugins:[BD({contentEditableClassName:e.contentEditableClassName??"",spellCheck:e.spellCheck??!0,initialMarkdown:e.markdown,onChange:e.onChange??yo,onBlur:e.onBlur??yo,toMarkdownOptions:e.toMarkdownOptions??KL,autoFocus:e.autoFocus??!1,placeholder:e.placeholder??"",readOnly:!!e.readOnly,iconComponentFor:e.iconComponentFor??UL,suppressHtmlProcessing:e.suppressHtmlProcessing??!1,onError:e.onError??yo,translation:e.translation??WL,trim:e.trim??!0,lexicalTheme:e.lexicalTheme,..."editorState"in e?{editorState:e.editorState}:{},suppressSharedHistory:e.suppressSharedHistory??!1,additionalLexicalNodes:e.additionalLexicalNodes??[],lexicalEditorNamespace:e.lexicalEditorNamespace??"MDXEditor"}),...e.plugins??[]]},m.createElement(zL,{className:e.className,overlayContainer:e.overlayContainer},m.createElement(BL,null,m.createElement(HL,null))),m.createElement(JL,{onReady:c,onDispose:d}))}),sS=typeof window<"u"&&typeof window.document.createElement<"u",lS=sS&&(()=>{var e;const t=(e=navigator.userAgentData)==null?void 0:e.platform;return t?/mac/i.test(t):/Mac|iPod|iPhone|iPad/.test(navigator.userAgent)})();function qL(e,t){return lS?e:t}s(qL,"controlOrMeta");var ZL={testLexicalNode:Kd,visitLexicalNode:s(({lexicalNode:e,actions:t})=>{const n=parseInt(e.getTag()[1],10);t.addAndStepInto("heading",{depth:n})},"visitLexicalNode")},YL={testNode:"heading",visitNode:s(function({mdastNode:e,actions:t}){t.addAndStepInto(Rr(`h${e.depth}`))},"visitNode")},XL=["Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6"],xg=[1,2,3,4,5,6],QL={Digit1:1,Digit2:2,Digit3:3,Digit4:4,Digit5:5,Digit6:6},Fu=fe(xg,e=>{e.pub(jd,t=>t.registerCommand(zb,n=>{const{code:r,ctrlKey:i,metaKey:o,altKey:l}=n;return XL.includes(r)&&qL(o,i)&&l?(n.preventDefault(),t.update(()=>{if(r==="Digit0")e.pub(yg,()=>Qe());else{const a=e.getValue(Fu),c=QL[r];a.includes(c)&&e.pub(yg,()=>Rr(`h${c}`))}}),!0):!1},st))}),e$=Sn({init(e,t){e.pubIn({[zs]:"headings",[Hr]:YL,[_i]:Wa,[yi]:ZL}),e.pub(Fu,t?.allowedHeadingLevels??xg)},update(e,t){e.pub(Fu,t?.allowedHeadingLevels??xg)}});function z_(e,t){return e.read("latest",()=>{const n=Cn(t);return n!==null&&n.isSelected()})}s(z_,"s$2");function aS(e){const[t]=gn(),[n,r]=(0,m.useState)(()=>z_(t,e));return(0,m.useEffect)(()=>{let i=!0;const o=t.registerUpdateListener(()=>{i&&r(z_(t,e))});return()=>{i=!1,o()}},[t,e]),[n,(0,m.useCallback)(i=>{t.update(()=>{let o=ie();He(o)||(o=xu(),nr(o)),He(o)&&(i?o.add(e):o.delete(e))})},[t,e]),(0,m.useCallback)(()=>{t.update(()=>{const i=ie();He(i)&&i.clear()})},[t])]}s(aS,"u$1");function t$({nodeKey:e}){const[t]=gn(),[n,r,i]=aS(e);return(0,m.useEffect)(()=>It(t.registerCommand(bm,o=>{const l=t.getElementByKey(e);return KI(o)===l&&(o.shiftKey||i(),r(!n),!0)},st)),[i,t,n,e,r]),(0,m.useEffect)(()=>{const o=t.getElementByKey(e),l=t._config.theme.hrSelected??"selected";o!==null&&(n?xr(o,l):$d(o,l))},[t,n,e]),null}s(t$,"p");var Jd=class cS extends Ua{static{s(this,"x")}static getType(){return"horizontalrule"}static clone(t){return new cS(t.__key)}static importJSON(t){return ja().updateFromJSON(t)}static importDOM(){return{hr:s(()=>({conversion:n$,priority:0}),"hr")}}decorate(){return(0,H.jsx)(t$,{nodeKey:this.__key})}};function n$(){return{node:ja()}}s(n$,"d");function ja(){return gi(new Jd)}s(ja,"f");function r$(){const[e]=gn();return(0,m.useEffect)(()=>e.registerCommand(TE,t=>{const n=ie();if(!oe(n))return!1;if(n.focus.getNode()!==null){const r=ja();gE(r)}return!0},Ie),[e]),null}s(r$,"n$2");var i$={testLexicalNode:s(e=>e instanceof Jd,"testLexicalNode"),visitLexicalNode({actions:e}){e.addAndStepInto("thematicBreak")}},o$={testNode:"thematicBreak",visitNode({actions:e}){e.addAndStepInto(ja())}},s$=Xi(e=>{e.sub(e.pipe(s$,mt(pt)),([,t])=>{t?.dispatchCommand(TE,void 0)})}),l$=Sn({init(e){e.pubIn({[zs]:"thematicBreak",[Hr]:o$,[_i]:Jd,[yi]:i$,[Ws]:r$})}});function Ai(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}s(Ai,"ht");function ca(e){let t=1,n=e.getParent();for(;n!=null;){if(Me(n)){const r=n.getParent();if(Ee(r)){t++,n=r.getParent();continue}Ai(40)}return t}return t}s(ca,"ft$1");function Cg(e){const t=e.getParent();Ee(t)||Ai(40);let n=t,r=t;for(;r!==null;)r=r.getParent(),Ee(r)&&(n=r);return n}s(Cg,"dt$1");function uS(e){let t=[];const n=e.getChildren().filter(Me);for(let r=0;r<n.length;r++){const i=n[r],o=i.getFirstChild();Ee(o)?t=t.concat(uS(o)):t.push(i)}return t}s(uS,"pt");function Wn(e){return Me(e)&&Ee(e.getFirstChild())}s(Wn,"mt$2");function dS(e,t){return Me(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}s(dS,"_t$2");function bg(e){const t=ie();if(t!==null){let n=t.getNodes();if(oe(t)){const[i]=t.getStartEndPoints(),o=i.getNode(),l=o.getParent();if(bn(o)){const a=o.getFirstChild();if(a)n=a.selectStart().getNodes();else{const c=Qe();o.append(c),n=c.select().getNodes()}}else if(dS(o,n)){const a=Qn(e);if(bn(l)){o.replace(a);const c=rr();xe(o)&&(c.setFormat(o.getFormatType()),c.setIndent(o.getIndent())),a.append(c)}else if(Me(o)){const c=o.getParentOrThrow();No(a,c.getChildren()),c.replace(a)}return}}const r=new Set;for(let i=0;i<n.length;i++){const o=n[i];if(xe(o)&&o.isEmpty()&&!Me(o)&&!r.has(o.getKey())){j_(o,e);continue}let l=Ib(o)?o.getParent():Me(o)&&o.isEmpty()?o:null;for(;l!=null;){const a=l.getKey();if(Ee(l)){if(!r.has(a)){const c=Qn(e);No(c,l.getChildren()),l.replace(c),r.add(a)}break}{const c=l.getParent();if(bn(c)&&!r.has(a)){r.add(a),j_(l,e);break}l=c}}}}}s(bg,"yt$1");function No(e,t){e.splice(e.getChildrenSize(),0,t)}s(No,"Ct$2");function j_(e,t){if(Ee(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),i=rr();let o;if(No(i,e.getChildren()),Ee(n)&&t===n.getListType())n.append(i),Ee(r)&&t===r.getListType()&&(No(n,r.getChildren()),r.remove()),o=n;else if(Ee(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),o=r;else{const a=Qn(t);a.append(i),e.replace(a),o=a}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());const l=ie();return oe(l)&&(o.getKey()===l.anchor.key&&l.anchor.set(i.getKey(),l.anchor.offset,"element"),o.getKey()===l.focus.key&&l.focus.set(i.getKey(),l.focus.offset,"element")),e.remove(),o}s(j_,"kt$2");function Zm(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&Wn(n)&&Wn(r)&&(Zm(n.getFirstChild(),r.getFirstChild()),r.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}s(Zm,"bt$2");function a$(){const e=ie();if(oe(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(dS(r,n))t.add(Cg(r));else for(let i=0;i<n.length;i++){const o=n[i];if(Ib(o)){const l=fE(o,bi);l!=null&&t.add(Cg(l))}}for(const i of t){let o=i;const l=uS(i);for(const a of l){const c=Qe().setTextStyle(e.style).setTextFormat(e.format);No(c,a.getChildren()),o.insertAfter(c),o=c,a.__key===e.anchor.key&&jh(e.anchor,Zi(qi(c,"next"))),a.__key===e.focus.key&&jh(e.focus,Zi(qi(c,"next"))),a.remove()}i.remove()}}}s(a$,"St$2");function fS(e){const t=e.getListType()!=="check";let n=e.getStart();for(const r of e.getChildren())Me(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),Ee(r.getFirstChild())||n++)}s(fS,"vt$2");function c$(e){const t=new Set;if(Wn(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(Wn(r)&&Wn(i)){const o=i.getFirstChild();if(Ee(o)){o.append(e);const l=r.getFirstChild();Ee(l)&&(No(o,l.getChildren()),r.remove(),t.add(r.getKey()))}}else if(Wn(r)){const o=r.getFirstChild();if(Ee(o)){const l=o.getFirstChild();l!==null&&l.insertBefore(e)}}else if(Wn(i)){const o=i.getFirstChild();Ee(o)&&o.append(e)}else if(Ee(n)){const o=nn(e),l=nn(n);o.append(l),l.append(e),i?i.insertAfter(o):r?r.insertBefore(o):n.append(o)}}s(c$,"Tt$2");function J_(e){if(Wn(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(Ee(n?n.getParent():void 0)&&Me(n)&&Ee(t)){const r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{const o=nn(e),l=nn(t);o.append(l),e.getPreviousSiblings().forEach(d=>l.append(d));const a=nn(e),c=nn(t);a.append(c),No(c,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(a),n.replace(e)}}}s(J_,"xt$2");function u$(e=!1){const t=ie();if(!oe(t)||!t.isCollapsed())return!1;const n=t.anchor.getNode();let r=null;if(Me(n)&&n.getChildrenSize()===0)r=n;else if(Ne(n)){const d=n.getParent();Me(d)&&d.getChildren().every(u=>Ne(u)&&u.getTextContent().trim()==="")&&(r=d)}if(r===null)return!1;const i=Cg(r),o=r.getParent();Ee(o)||Ai(40);const l=o.getParent();let a;if(bn(l))a=Qe(),i.insertAfter(a);else{if(!Me(l))return!1;a=nn(l),l.insertAfter(a)}a.setTextStyle(t.style).setTextFormat(t.format).select();const c=r.getNextSiblings();if(c.length>0){const d=e?(function(f,h){return f.getStart()+h.getIndexWithinParent()})(o,r):1,u=nn(o).setStart(d);if(Me(a)){const f=nn(a);f.append(u),a.insertAfter(f)}else a.insertAfter(u);u.append(...c)}return(function(d){let u=d;for(;u.getNextSibling()==null&&u.getPreviousSibling()==null;){const f=u.getParent();if(f==null||!Me(f)&&!Ee(f))break;u=f}u.remove()})(r),!0}s(u$,"Nt$2");var bi=class extends Br{static{s(this,"Pt$2")}__value;__checked;$config(){return this.config("listitem",{$transform:s(e=>{const t=e.getParent();if(Ee(t))t.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0);else if(t){const n=e.createParentElementNode();Ee(n)||Ai(340);const r=[e];for(const i of["previous","next"]){r.reverse();for(const{origin:o}of Xn(e,i)){if(!Me(o))break;r.push(o)}}e.insertBefore(n),n.splice(0,0,r),bn(t)||(ym(n,Sl(Xn(n,"next")),{$shouldSplit:s(()=>!1,"$shouldSplit"),removeEmptyDestination:!0}),t.isEmpty()&&t.isAttached()&&t.remove())}},"$transform"),extends:Br,importDOM:Xb({li:s(()=>({conversion:d$,priority:0}),"li")})})}constructor(e=1,t=void 0,n){super(n),this.__value=e===void 0?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){const t=Tn().createElement("li");return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,n){(function(o,l){const a=l.getParent();!Ee(a)||a.getListType()!=="check"||Ee(l.getFirstChild())?(o.removeAttribute("role"),o.removeAttribute("tabIndex"),o.removeAttribute("aria-checked")):(o.setAttribute("role","checkbox"),o.setAttribute("tabIndex","-1"),o.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(t,this),t.value=this.__value,(function(o,l,a){const c=l.list;if(!c)return;const d=c.listitem,u=c.nested&&c.nested.listitem,f=a.getParent(),h=Ee(f)&&f.getListType()==="check",g=a.getChecked(),p=a.getChildren().some(y=>Ee(y)),v=[];c.listitemChecked!==void 0&&v.push(c.listitemChecked),c.listitemUnchecked!==void 0&&v.push(c.listitemUnchecked),u!==void 0&&v.push(...wl(u)),v.length>0&&$d(o,...v);const _=[];if(d!==void 0&&_.push(...wl(d)),h){const y=g?c.listitemChecked:c.listitemUnchecked;y!==void 0&&_.push(y)}u!==void 0&&p&&_.push(...wl(u)),_.length>0&&xr(o,..._)})(t,n.theme,this);const r=e?e.__style:"",i=this.__style;r!==i&&$c(t.style,i,r),(function(o,l,a){const c=l.__textStyle,d=a?a.__textStyle:"";if(a!==null&&d===c)return;const u=Fv(c);for(const f in u)o.style.setProperty(`--listitem-marker-${f}`,u[f]);if(d!=="")for(const f in Fv(d))f in u||o.style.removeProperty(`--listitem-marker-${f}`)})(t,this,e)}updateDOM(e,t,n){const r=t;return this.updateListItemDOM(e,r,n),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const t=this.createDOM(e._config),n=this.getFormatType();n&&(t.style.textAlign=n);const r=this.getDirection();return r&&(t.dir=r),Wn(this)?{after(i){if(Ke(i)){const o=i.previousElementSibling;if(Ke(o)&&o.nodeName==="LI"){for(;i.firstChild;)o.append(i.firstChild);i.remove()}}return i},element:t}:{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){const n=e[t];if(xe(n)&&this.canMergeWith(n)){const r=n.getChildren();this.append(...r),n.remove()}else super.append(n)}return this}replace(e,t){if(Me(e))return super.replace(e);this.setIndent(0);const n=this.getParentOrThrow();if(!Ee(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{const o=nn(n);let l=this.getNextSibling();for(;l;){const a=l;l=l.getNextSibling(),o.append(a)}n.insertAfter(e),e.insertAfter(o)}const r=this.__key;let i=0;if(t&&(xe(e)||Ai(139),i=e.getChildrenSize(),e.splice(i,0,this.getChildren())),t&&xe(e)){const o=ie();if(oe(o))for(const l of o.getStartEndPoints())l.key===r&&l.type==="element"&&l.set(e.getKey(),i+l.offset,"element")}return this.remove(),n.getChildrenSize()===0&&n.remove(),e}insertAfter(e,t=!0){const n=this.getParentOrThrow();if(Ee(n)||Ai(39),Me(e))return super.insertAfter(e,t);const r=this.getNextSiblings();if(n.insertAfter(e,t),r.length!==0){const i=nn(n);r.forEach(o=>i.append(o)),e.insertAfter(i,t)}return e}remove(e){const t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&Wn(t)&&Wn(n)&&(Zm(t.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(e){super.resetOnCopyNodeFrom(e),e.getChecked()&&this.setChecked(!1)}insertNewAfter(e,t=!0){const n=nn(this);return this.insertAfter(n,t),n}collapseAtStart(e){if(Wn(this))return!1;const t=this.getParentOrThrow();if(Me(t.getParentOrThrow()))return J_(this),!0;const n=Qe().append(...this.getChildren()),r=this.getNextSiblings();if(r.length>0){const i=nn(t);i.append(...r),t.insertAfter(i)}return t.insertAfter(n),this.remove(),t.getChildrenSize()===0&&t.remove(),n.selectStart(),!0}getValue(){return this.getLatest().__value}setValue(e){const t=this.getWritable();return t.__value=e,t}getChecked(){const e=this.getLatest();let t;const n=this.getParent();return Ee(n)&&(t=n.getListType()),t==="check"?!!e.__checked:void 0}setChecked(e){const t=this.getWritable();return t.__checked=e,t}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;Me(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){typeof e!="number"&&Ai(117),(e=Math.floor(e))>=0||Ai(199);let t=this.getIndent();for(;t!==e;)t<e?(c$(this),t++):(J_(this),t--);return this}canInsertAfter(e){return Me(e)}canReplaceWith(e){return Me(e)}canMergeWith(e){return Me(e)||$a(e)}extractWithChild(e,t){if(!oe(t))return!1;const n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Qn("bullet")}canMergeWhenEmpty(){return!0}};function d$(e){if(e.classList.contains("task-list-item")){for(const r of e.children)if(r.tagName==="INPUT")return G_(r)}if(e.classList.contains("joplin-checkbox")){for(const r of e.children)if(r.classList.contains("checkbox-wrapper")&&r.children.length>0&&r.children[0].tagName==="INPUT")return G_(r.children[0])}const t=e.getAttribute("aria-checked"),n=rr(t==="true"||t!=="false"&&void 0);return pi(n,e),{after:hS.bind(null,n),node:wr(n,e)}}s(d$,"Ft$1");function G_(e){if(e.getAttribute("type")!=="checkbox")return{node:null};const t=rr(e.hasAttribute("checked"));return{after:hS.bind(null,t),node:t}}s(G_,"Lt$2");function hS(e,t){const n=t[0];return t.length===1&&$a(n)&&!e.getFormatType()&&n.getFormatType()?(e.setFormat(n.getFormatType()),n.getChildren()):t}s(hS,"At$2");function rr(e){return gi(new bi(void 0,e))}s(rr,"Ot$2");function Me(e){return e instanceof bi}s(Me,"It$1");var Ei=class extends Br{static{s(this,"Et$1")}__tag;__start;__listType;$config(){return this.config("list",{$transform:s(e=>{(function(t){const n=t.getNextSibling();Ee(n)&&t.getListType()===n.getListType()&&Zm(t,n)})(e),fS(e)},"$transform"),extends:Br,importDOM:Xb({ol:s(()=>({conversion:Z_,priority:0}),"ol"),ul:s(()=>({conversion:Z_,priority:0}),"ul")})})}constructor(e="number",t=1,n){super(n);const r=f$[e]||e;this.__listType=r,this.__tag=r==="number"?"ol":"ul",this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){const t=this.getWritable();return t.__listType=e,t.__tag=e==="number"?"ol":"ul",t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){const t=this.getWritable();return t.__start=e,t}createDOM(e,t){const n=this.__tag,r=Tn().createElement(n);return this.__start!==1&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,q_(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||e.__listType!==this.__listType||(q_(t,n.theme,this),e.__start!==this.__start&&t.setAttribute("start",String(this.__start)),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const t=this.createDOM(e._config,e);return Ke(t)&&(this.__start!==1&&t.setAttribute("start",String(this.__start)),this.__listType==="check"&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,n){let r=n;for(let i=0;i<n.length;i++){const o=n[i];Me(o)||(r===n&&(r=[...n]),r[i]=this.createListItemNode().append(!xe(o)||Ee(o)||o.isInline()?o:yr(o.getTextContent())))}return super.splice(e,t,r)}extractWithChild(e){return Me(e)}createListItemNode(){return rr()}};function q_(e,t,n){const r=[],i=[],o=t.list;if(o!==void 0){const l=o[`${n.__tag}Depth`]||[],a=ca(n)-1,c=a%l.length,d=l[c],u=o[n.__tag];let f;const h=o.nested,g=o.checklist;if(h!==void 0&&h.list&&(f=h.list),u!==void 0&&r.push(u),g!==void 0&&n.__listType==="check"&&r.push(g),d!==void 0){r.push(...wl(d));for(let p=0;p<l.length;p++)p!==c&&i.push(n.__tag+p)}if(f!==void 0){const p=wl(f);a>1?r.push(...p):i.push(...p)}}i.length>0&&$d(e,...i),r.length>0&&xr(e,...r)}s(q_,"Dt$1");function Z_(e){let t;if((function(n){return Ke(n)&&n.nodeName.toLowerCase()==="ol"})(e)){const n=e.start;t=Qn("number",n)}else t=(function(n){if(n.getAttribute("__lexicallisttype")==="check"||n.classList.contains("contains-task-list")||n.getAttribute("data-is-checklist")==="1")return!0;for(const r of n.childNodes)if(Ke(r)&&r.hasAttribute("aria-checked"))return!0;return!1})(e)?Qn("check"):Qn("bullet");return wr(t,e),{after:s(n=>(function(r,i){const o=i.createListItemNode.bind(i),l=[];for(let a=0;a<r.length;a++){const c=r[a];if(Me(c)){l.push(c);const d=c.getChildren();d.length>1&&d.forEach(u=>{Ee(u)&&l.push(o().append(u))})}else l.push(o().append(c))}return l})(n,t),"after"),node:t}}s(Z_,"wt$1");var f$={ol:"number",ul:"bullet"};function Qn(e="number",t=1){return gi(new Ei(e,t))}s(Qn,"$t$1");function Ee(e){return e instanceof Ei}s(Ee,"Rt$1");var gS=kr("INSERT_CHECK_LIST_COMMAND");function h$(e,t){const n=t&&t.disableTakeFocusOnClick||!1,r=typeof n=="boolean"?()=>n:n.peek.bind(n),i=s(d=>{const u=d.target;if(!Ke(u))return!1;const f=u.__lexicalCheckListLastHandled;return f!==void 0&&d.timeStamp-f<500},"o"),o=s(d=>{const u=d.target;Ke(u)&&(u.__lexicalCheckListLastHandled=d.timeStamp)},"l"),l=s(d=>{i(d)||(o(d),Y_(d,r()))},"a"),a=s(d=>{d.pointerType==="touch"&&(i(d)||(o(d),Y_(d,r())))},"u"),c=s(d=>{(function(u,f){pS(u,()=>{u.preventDefault(),f&&u.stopPropagation()})})(d,r())},"g");return It(e.registerCommand(gS,()=>(bg("check"),!0),st),e.registerCommand(Kb,d=>X_(d,e,!1),st),e.registerCommand(Wb,d=>X_(d,e,!0),st),e.registerCommand(Rd,()=>Eg(e)!=null?(e.getRootElement()?.focus(),!0):!1,st),e.registerCommand(jb,d=>{const u=Eg(e);return!(u==null||!e.isEditable())&&(e.update(()=>{const f=di(u);Me(f)&&(d.preventDefault(),f.toggleChecked())}),!0)},st),e.registerCommand(Ub,d=>e.read("latest",()=>{const u=ie();if(oe(u)&&u.isCollapsed()){const{anchor:f}=u,h=f.type==="element";if(h||f.offset===0){const g=f.getNode(),p=ft(g,v=>xe(v)&&!v.isInline());if(Me(p)){const v=p.getParent();if(Ee(v)&&v.getListType()==="check"&&(h||p.getFirstDescendant()===g)){const _=e.getElementByKey(p.__key);if(_!=null&&eE(_)!==_)return _.focus(),d.preventDefault(),!0}}}}return!1}),st),e.registerRootListener(d=>{if(d!==null)return It(Zh(d,{click:l,pointerup:a}),Zh(d,{mousedown:c,pointerdown:c},{capture:!0}),XI(d,"touchstart",c,{capture:!0,passive:!1}))}))}s(h$,"Bt$1");function pS(e,t){const n=e.target;if(!Ke(n))return;const r=n.firstChild;if(Ke(r)&&(r.tagName==="UL"||r.tagName==="OL"))return;const i=n.parentNode;if(!i||i.__lexicalListType!=="check")return;let o=null,l=null;if("clientX"in e)o=e.clientX;else if("touches"in e){const g=e.touches;g.length>0&&(o=g[0].clientX,l="touch")}if(o==null)return;const a=n.getBoundingClientRect(),c=o/s6(n),d=n.ownerDocument.defaultView,u=d?d.getComputedStyle(n,"::before"):{width:"0px"},f=parseFloat(u.width),h=l==="touch"||"pointerType"in e&&e.pointerType==="touch"?32:0;(n.dir==="rtl"?c<a.right+h&&c>a.right-f-h:c>a.left-h&&c<a.left+f+h)&&t()}s(pS,"Wt$1");function Y_(e,t){pS(e,()=>{if(Ke(e.target)){const n=e.target,r=zI(n);r!=null&&r.isEditable()&&r.update(()=>{const i=di(n);Me(i)&&(t?(Uh(Zb),Uh(RI)):n.focus(),i.toggleChecked())})}})}s(Y_,"Ut$2");function Eg(e){const t=e.getRootElement(),n=t?eE(t):null;return Ke(n)&&n.tagName==="LI"&&n.parentNode!=null&&n.parentNode.__lexicalListType==="check"?n:null}s(Eg,"Jt");function X_(e,t,n){const r=Eg(t);return r!=null&&t.update(()=>{const i=di(r);if(!Me(i))return;const o=(function(l,a){let c=a?l.getPreviousSibling():l.getNextSibling(),d=l;for(;c==null&&Me(d);)d=d.getParentOrThrow().getParent(),d!=null&&(c=a?d.getPreviousSibling():d.getNextSibling());for(;Me(c);){const u=a?c.getLastChild():c.getFirstChild();if(!Ee(u))return c;c=a?u.getLastChild():u.getFirstChild()}return null})(i,n);if(o!=null){o.selectStart();const l=t.getElementByKey(o.__key);l!=null&&(e.preventDefault(),setTimeout(()=>{l.focus()},0))}}),!1}s(X_,"Vt");function g$(e){const t=[];for(const n of e)if(Me(n)){t.push(n);const r=n.getChildren();if(r.length>1)for(const i of r)Ee(i)&&t.push(rr().append(i))}else t.push(rr().append(n));return t}s(g$,"qt");var p$={$import:s((e,t)=>{let n;var r;return PE(t,"ol")?n=Qn("number",t.start):n=(r=t).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||r.querySelector(":scope > [aria-checked]")!==null?Qn("check"):Qn("bullet"),wr(n,t),[n.splice(0,0,BE(g$(e.$importChildren(t)),t))]},"$import"),match:Jt.tag("ol","ul"),name:"@lexical/list/list"};function mS(e,t){if(t.length!==1)return t;const n=t[0];return $a(n)&&!e.getFormatType()&&n.getFormatType()?(e.setFormat(n.getFormatType()),n.getChildren()):t}s(mS,"jt$1");function vS(e){const t=s(l=>Rm(l)&&!Ee(l),"e");if(!e.some(t))return e;const n=[];let r=[];const i=s(()=>{r.length>0&&(n.push(r),r=[])},"i");for(const l of e)t(l)?(i(),n.push(xe(l)?l.getChildren():[l])):r.push(l);i();const o=[];for(const l of n)o.length>0&&o.push(Pr()),o.push(...l);return o}s(vS,"Ht$1");var m$={$import:s((e,t)=>{const n=t.getAttribute("aria-checked"),r=rr(n==="true"||n!=="false"&&void 0);return pi(r,t),wr(r,t),[r.splice(0,0,vS(mS(r,e.$importChildren(t))))]},"$import"),match:Jt.tag("li"),name:"@lexical/list/li"};function Q_(e,t,n){const r=PE(n,"input")?n:n.querySelector('input[type="checkbox"]');if(!r||r.getAttribute("type")!=="checkbox")return[];const i=rr(r.hasAttribute("checked"));return pi(i,t),wr(i,t),[i.splice(0,0,vS(mS(i,e.$importChildren(t))))]}s(Q_,"Gt");var $j=[{$import:s((e,t,n)=>{const r=t.querySelector(':scope > input[type="checkbox"]');return r?Q_(e,t,r):n()},"$import"),match:Jt.tag("li").classAll("task-list-item"),name:"@lexical/list/li-task-list-item"},{$import:s((e,t,n)=>{const r=t.querySelector(":scope > .checkbox-wrapper");if(!r)return n();const i=r.querySelector(':scope > input[type="checkbox"]');return i?Q_(e,t,i):n()},"$import"),match:Jt.tag("li").classAll("joplin-checkbox"),name:"@lexical/list/li-joplin-checkbox"},p$,m$],v$=kr("UPDATE_LIST_START_COMMAND"),_S=kr("INSERT_UNORDERED_LIST_COMMAND"),yS=kr("INSERT_ORDERED_LIST_COMMAND"),xS=kr("REMOVE_LIST_COMMAND");function ey(e,t){return It(e.registerCommand(yS,()=>(bg("number"),!0),st),e.registerCommand(v$,n=>{const{listNodeKey:r,newStart:i}=n,o=Cn(r);return!!Ee(o)&&(o.getListType()==="number"&&(o.setStart(i),fS(o)),!0)},st),e.registerCommand(_S,()=>(bg("bullet"),!0),st),e.registerCommand(xS,()=>(a$(),!0),st),e.registerCommand(Jh,()=>u$(!!(t&&t.restoreNumbering)),st),e.registerCommand(Od,n=>{if((function(){const l=ie();if(!oe(l)||!l.isCollapsed()||l.anchor.offset!==0)return!1;const a=l.anchor.getNode(),c=ft(a,Me);if(!Me(c))return!1;const d=c.getFirstDescendant();if(d===null||!c.is(a)&&!d.is(a))return!1;const u=c.getParent();if(!Ee(u)||!c.is(u.getFirstChild()))return!1;const f=u.getPreviousSibling();if(!jn(f)||f.isIsolated()||!f.isKeyboardSelectable()&&f.isInline())return!1;const h=Qe().append(...c.getChildren());return u.insertBefore(h),c.remove(),u.isEmpty()&&u.remove(),h.selectStart(),!0})())return n.preventDefault(),!0;const r=ie();if(!oe(r)||!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;let o=i.getNode();for(;!Me(o);){if(o.getPreviousSibling()!==null)return!1;const l=o.getParent();if(l===null)return!1;o=l}return!(!Me(o)||!o.collapseAtStart(r))&&(n.preventDefault(),!0)},gI),e.registerNodeTransform(bi,n=>{const r=n.getFirstChild();if(r){if(Ne(r)){const i=r.getStyle(),o=r.getFormat();n.getTextStyle()!==i&&n.setTextStyle(i),n.getTextFormat()!==o&&n.setTextFormat(o)}}else{const i=ie();oe(i)&&(i.style!==n.getTextStyle()||i.format!==n.getTextFormat())&&i.isCollapsed()&&n.is(i.anchor.getNode())&&n.setTextStyle(i.style).setTextFormat(i.format)}}),e.registerNodeTransform(Bs,n=>{const r=n.getParent();if(Me(r)&&n.is(r.getFirstChild())){const i=n.getStyle(),o=n.getFormat();i===r.getTextStyle()&&o===r.getTextFormat()||r.setTextStyle(i).setTextFormat(o)}}))}s(ey,"re");function _$(e){const t=s(n=>{const r=n.getParent();if(Ee(n.getFirstChild())||!Ee(r))return;const i=ft(n,o=>Me(o)&&Ee(o.getParent())&&Me(o.getPreviousSibling()));if(i===null&&n.getIndent()>0)n.setIndent(0);else if(Me(i)){const o=i.getPreviousSibling();if(Me(o)){const l=(function(a){let c=a,d=c.getFirstChild();for(;Ee(d);){const u=d.getLastChild();if(!Me(u))break;c=u,d=c.getFirstChild()}return c})(o).getParent();if(Ee(l)){const a=ca(l);a+1<ca(r)&&n.setIndent(a)}}}},"e");return e.registerNodeTransform(Ei,n=>{const r=[n];for(;r.length>0;){const i=r.shift();if(Ee(i)){for(const o of i.getChildren())if(Me(o)){t(o);const l=o.getFirstChild();Ee(l)&&r.push(l)}}}})}s(_$,"ie");var y$={testNode:"list",visitNode:s(function({mdastNode:e,lexicalParent:t,actions:n}){const r=e.children.some(o=>typeof o.checked=="boolean")?"check":e.ordered?"number":"bullet",i=Qn(r);if(Me(t)){const o=rr();o.append(i),t.insertAfter(o)}else t.append(i);n.visitChildren(e,i)},"visitNode")},x$={testNode:"listItem",visitNode({mdastNode:e,actions:t,lexicalParent:n}){const r=n.getListType()==="check"?e.checked??!1:void 0;t.addAndStepInto(rr(r))}},C$={testLexicalNode:Ee,visitLexicalNode:s(({lexicalNode:e,actions:t})=>{t.addAndStepInto("list",{ordered:e.getListType()==="number",spread:!1})},"visitLexicalNode")},b$={testLexicalNode:Me,visitLexicalNode:s(({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getChildren(),i=r[0];if(r.length===1&&Ee(i)){const o=t.children.at(-1);o?n.visitChildren(e,o):n.visitChildren(i,t)}else{const o=e.getParent(),l=n.appendToParent(t,{type:"listItem",checked:o.getListType()==="check"?!!e.getChecked():void 0,spread:!1,children:[]});let a=null;for(const c of e.getChildren())Ne(c)||Fr(c)||c.isInline()&&(xe(c)||jn(c))?(a??(a=n.appendToParent(l,{type:"paragraph",children:[]})),n.visit(c,a)):(a=null,n.visit(c,l))}},"visitLexicalNode")};function ty({maxIndent:e,$canIndent:t}){const[n]=gn();return(0,m.useEffect)(()=>w6(n,e,t),[n,e,t]),null}s(ty,"o$2");function ny({disableTakeFocusOnClick:e=!1}){const[t]=gn();return(0,m.useEffect)(()=>h$(t,{disableTakeFocusOnClick:e}),[t,e]),null}s(ny,"l$3");function ry({hasStrictIndent:e=!1,shouldPreserveNumbering:t=!1}){const[n]=gn();return(0,m.useEffect)(()=>{if(!n.hasNodes([Ei,bi]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[n]),(0,m.useEffect)(()=>It(ey(n,{restoreNumbering:t}),e?_$(n):()=>{}),[n,e,t]),(function(r){(0,m.useEffect)(()=>ey(r),[r])})(n),null}s(ry,"l$2");var E$=new Map([["number",yS],["bullet",_S],["check",gS],["",xS]]),iy=fe("",e=>{e.sub(e.pipe(ws,mt(pt)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:ft(r,l=>{const a=l.getParent();return a!==null&&bn(a)});i??(i=r.getTopLevelElementOrThrow());const o=i.getKey();if(n.getElementByKey(o)!==null)if(Ee(i)){const l=fE(r,Ei),a=l?l.getListType():i.getListType();e.pub(iy,a)}else e.pub(iy,"")})}),T$=kt(e=>{e.sub(e.pipe(T$,mt(pt)),([t,n])=>{n?.dispatchCommand(E$.get(t),void 0)})}),S$=Sn({init(e){var t;(t=e.getValue(vi))==null||t.registerCommand(Eu,()=>!k$(7),Vr),e.pubIn({[zs]:"lists",[Pu]:t9(),[$u]:c9(),[Hr]:[y$,x$],[_i]:[bi,Ei],[yi]:[C$,b$],[Wm]:n9(),[Ws]:[ty,ry,ny],[Jm]:[ty,ry,ny]})}});function w$(e){const t=e.getNodes();return t.length===0?new Set([e.anchor.getNode().getParentOrThrow(),e.focus.getNode().getParentOrThrow()]):new Set(t.map(n=>xe(n)?n:n.getParentOrThrow()))}s(w$,"getElementNodesInSelection");function k$(e){const t=ie();if(!oe(t))return!1;const n=w$(t);let r=0;for(const i of n)if(Ee(i))r=Math.max(ca(i)+1,r);else if(Me(i)){const o=i.getParent();if(o?.getChildren().length===1){const l=o.getParent();if(Me(l)&&l.getChildren().length===1)return!1}if(!Ee(o))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(ca(o)+1,r)}return r<=e}s(k$,"isIndentPermitted");function CS(e,t){return e===null||e===t?!1:e.dataset.editorDialog!==void 0||e.dataset.toolbarItem!==void 0||e.dataset.editorDropdown?!0:CS(e.parentElement,t)}s(CS,"isPartOftheEditorUI");function M$(){const e=[...Array(256).keys()].map(n=>n.toString(16).padStart(2,"0")),t=crypto.getRandomValues(new Uint8Array(16));return t[6]=t[6]&15|64,t[8]=t[8]&63|128,[...t.entries()].map(([n,r])=>[4,6,8,10].includes(n)?`-${e[r]}`:e[r]).join("")}s(M$,"uuidv4");var bS=s(e=>e===0?"th":"td","getCellType"),ES={center:j.centeredCell,left:j.leftAlignedCell,right:j.rightAlignedCell};function dr(e){const t=Cn(e);return SS(t)?t:null}s(dr,"$getTableNodeByKey");var A$=s(({mdastNode:e,parentEditor:t,lexicalTable:n})=>{const r=n.getKey(),[i,o]=m.useState(null),[l,a]=Er(xi,Cr),c=m.useMemo(()=>_=>(_.__cacheKey??(_.__cacheKey=M$()),_.__cacheKey),[]),d=m.useCallback(_=>{const y=n.getColCount();if(_===null){o(null);return}let[x,C]=_;if(x>y-1&&(x=0,C++),x<0&&(x=y-1,C-=1),C>n.getRowCount()-1){o(null),t.update(()=>{const b=dr(r);if(b)if(b.getNextSibling())b.selectNext();else{const T=Qe();b.insertAfter(T),T.select()}});return}if(C<0){o(null),t.update(()=>{var b;(b=dr(r))==null||b.selectPrevious()});return}o([x,C])},[n,t,r]);m.useEffect(()=>{n.focusEmitter.subscribe(d)},[n,d]);const u=m.useCallback(_=>{_.preventDefault(),t.update(()=>{const y=dr(r);y&&(y.addRowToBottom(),o([0,y.getRowCount()]))})},[t,r]),f=m.useCallback(_=>{_.preventDefault(),t.update(()=>{const y=dr(r);y&&(y.addColumnToRight(),o([y.getColCount(),0]))})},[t,r]),[h,g]=m.useState([-1,-1]),p=m.useCallback(_=>{let y=_.target;for(;y&&!["TH","TD"].includes(y.tagName);){if(y===_.currentTarget)return;y=y.parentElement}if(y===null)return;const x=y.parentElement,C=x.parentElement.tagName==="TFOOT"?-1:Array.from(x.children).indexOf(y),b=y.tagName==="TH"?-1:Array.from(x.parentElement.children).indexOf(x);g([C,b])},[]),v=Ci();return m.createElement("table",{className:j.tableEditor,onMouseOver:p,onMouseLeave:s(()=>{g([-1,-1])},"onMouseLeave")},m.createElement("colgroup",null,a?null:m.createElement("col",null),Array.from({length:e.children[0].children.length},(_,y)=>{const x=(e.align??[])[y]??"left",C=ES[x];return m.createElement("col",{key:y,className:C})}),a?null:m.createElement("col",null)),a||m.createElement("thead",null,m.createElement("tr",null,m.createElement("th",{className:j.tableToolsColumn}),Array.from({length:e.children[0].children.length},(_,y)=>m.createElement("th",{key:y,"data-tool-cell":!0},m.createElement(O$,{setActiveCellWithBoundaries:d,parentEditor:t,colIndex:y,highlightedCoordinates:h,lexicalTable:n,align:(e.align??[])[y]}))),m.createElement("th",{className:j.tableToolsColumn,"data-tool-cell":!0},m.createElement("button",{className:j.iconButton,type:"button",title:v("table.deleteTable","Delete table"),onClick:s(_=>{_.preventDefault(),t.update(()=>{const y=dr(r);y&&(y.selectNext(),y.remove())})},"onClick")},l("delete_small"))))),m.createElement("tbody",null,e.children.map((_,y)=>{const x=bS(y);return m.createElement("tr",{key:y},a||m.createElement(x,{className:j.toolCell,"data-tool-cell":!0},m.createElement(D$,{setActiveCellWithBoundaries:d,parentEditor:t,rowIndex:y,highlightedCoordinates:h,lexicalTable:n})),_.children.map((C,b)=>{var T;return m.createElement(I$,{align:(T=e.align)==null?void 0:T[b],key:c(C),contents:C.children,setActiveCell:d,rowIndex:y,colIndex:b,lexicalTable:n,parentEditor:t,activeCell:a?[-1,-1]:i})}),a||y===0&&m.createElement("th",{rowSpan:n.getRowCount(),"data-tool-cell":!0},m.createElement("button",{type:"button",className:j.addColumnButton,onClick:f},l("add_column"))))})),a||m.createElement("tfoot",null,m.createElement("tr",null,m.createElement("th",null),m.createElement("th",{colSpan:n.getColCount(),"data-tool-cell":!0},m.createElement("button",{type:"button",className:j.addRowButton,onClick:u},l("add_row"))),m.createElement("th",null))))},"TableEditor"),I$=s(({align:e,...t})=>{const{activeCell:n,setActiveCell:r}=t,i=n?.[0]===t.colIndex&&n[1]===t.rowIndex,o=ES[e??"left"],l=bS(t.rowIndex);return m.createElement(l,{className:o,"data-active":i,onClick:s(()=>{r([t.colIndex,t.rowIndex])},"onClick")},m.createElement(N$,{...t,focus:i}))},"Cell"),N$=s(({focus:e,setActiveCell:t,parentEditor:n,lexicalTable:r,contents:i,colIndex:o,rowIndex:l})=>{const a=r.getKey(),[c,d,u,f,h,g,p,v,_,y]=Er(Bm,Wd,Hm,zd,$T,za,ks,Um,vi,qT),[x,C]=m.useState(null);m.useEffect(()=>{const T=OT({name:"@mdxeditor/table-cell",nodes:u,namespace:"TableCellEditor",parentEditor:n,historyMode:"table-local",initialEditorState:s(()=>{TT({root:$t(),mdastRoot:{type:"root",children:[{type:"paragraph",children:i}]},visitors:c,jsxComponentDescriptors:f,directiveDescriptors:h,codeBlockEditorDescriptors:g,defaultCodeBlockLanguage:p})},"initialEditorState")});return C(T),()=>{T.dispose()}},[]);const b=m.useCallback(T=>{x&&(x.getEditorState().read(()=>{const M=_T({root:$t(),jsxComponentDescriptors:f,visitors:d,jsxIsAvailable:v});n.update(()=>{const S=dr(a);S&&S.updateCellContents(o,l,M.children[0].children)},{discrete:!0}),n.dispatchCommand(ia,void 0)}),t(T))},[o,x,d,f,v,n,l,t,a]);return m.useEffect(()=>{if(x)return It(x.registerCommand(wm,T=>{T.preventDefault();const M=T.shiftKey?[o-1,l]:[o+1,l];return b(M),!0},Vr),x.registerCommand(Tm,()=>(t([o,l]),!1),st),x.registerCommand(Dd,T=>{T?.preventDefault();const M=T?.shiftKey?[o,l-1]:[o,l+1];return b(M),!0},Vr),x.registerCommand(Ob,T=>{const M=T.relatedTarget;return CS(M,_.getRootElement())?!1:(b(null),!0)},Ie),x.registerCommand(ia,()=>(b(null),!0),Ie))},[o,x,_,l,b,t]),m.useEffect(()=>{e&&x&&x.focus()},[e,x]),x?m.createElement(QT,{initialEditor:x},m.createElement(eS,{contentEditable:m.createElement(Fm,null),placeholder:m.createElement("div",null),ErrorBoundary:Vm}),y.map((T,M)=>m.createElement(T,{key:M}))):null},"CellEditor"),O$=s(({parentEditor:e,highlightedCoordinates:t,align:n,lexicalTable:r,colIndex:i,setActiveCellWithBoundaries:o})=>{const l=r.getKey(),[a,c]=Er(Ko,xi),d=m.useCallback(g=>{e.update(()=>{const p=dr(l);p&&(p.insertColumnAt(g),o([g,0]))})},[e,o,l]),u=m.useCallback(g=>{e.update(()=>{var p;(p=dr(l))==null||p.deleteColumnAt(g)})},[e,l]),f=m.useCallback((g,p)=>{e.update(()=>{var v;(v=dr(l))==null||v.setColumnAlign(g,p)})},[e,l]),h=Ci();return m.createElement(up,null,m.createElement(Gx,{className:j.tableColumnEditorTrigger,"data-active":t[0]===i+1,title:h("table.columnMenu","Column menu")},c("more_horiz")),m.createElement(ap,{container:a?.current},m.createElement(zx,{className:(0,nt.default)(j.tableColumnEditorPopoverContent),onOpenAutoFocus:s(g=>{g.preventDefault()},"onOpenAutoFocus"),sideOffset:5,side:"top"},m.createElement(TC,{className:j.tableColumnEditorToolbar},m.createElement(YM,{className:j.toggleGroupRoot,onValueChange:s(g=>{f(i,g)},"onValueChange"),value:n??"left",type:"single","aria-label":h("table.textAlignment","Text alignment")},m.createElement(cf,{value:"left",title:h("table.alignLeft","Align left")},c("format_align_left")),m.createElement(cf,{value:"center",title:h("table.alignCenter","Align center")},c("format_align_center")),m.createElement(cf,{value:"right",title:h("table.alignRight","Align right")},c("format_align_right"))),m.createElement(ZM,null),m.createElement(us,{onClick:d.bind(null,i),title:h("table.insertColumnLeft","Insert a column to the left of this one")},c("insert_col_left")),m.createElement(us,{onClick:d.bind(null,i+1),title:h("table.insertColumnRight","Insert a column to the right of this one")},c("insert_col_right")),m.createElement(us,{onClick:u.bind(null,i),title:h("table.deleteColumn","Delete this column")},c("delete_small"))),m.createElement(cp,{className:j.popoverArrow}))))},"ColumnEditor"),D$=s(({parentEditor:e,highlightedCoordinates:t,lexicalTable:n,rowIndex:r,setActiveCellWithBoundaries:i})=>{const o=n.getKey(),[l,a]=Er(Ko,xi),c=m.useCallback(f=>{e.update(()=>{const h=dr(o);h&&(h.insertRowAt(f),i([0,f]))})},[e,i,o]),d=m.useCallback(f=>{e.update(()=>{var h;(h=dr(o))==null||h.deleteRowAt(f)})},[e,o]),u=Ci();return m.createElement(up,null,m.createElement(Gx,{className:j.tableColumnEditorTrigger,"data-active":t[1]===r,title:u("table.rowMenu","Row menu")},a("more_horiz")),m.createElement(ap,{container:l?.current},m.createElement(zx,{className:(0,nt.default)(j.tableColumnEditorPopoverContent),onOpenAutoFocus:s(f=>{f.preventDefault()},"onOpenAutoFocus"),sideOffset:5,side:"bottom"},m.createElement(TC,{className:j.tableColumnEditorToolbar},m.createElement(us,{onClick:c.bind(null,r),title:u("table.insertRowAbove","Insert a row above this one")},a("insert_row_above")),m.createElement(us,{onClick:c.bind(null,r+1),title:u("table.insertRowBelow","Insert a row below this one")},a("insert_row_below")),m.createElement(us,{onClick:d.bind(null,r),title:u("table.deleteRow","Delete this row")},a("delete_small"))),m.createElement(cp,{className:j.popoverArrow}))))},"RowEditor"),R$=Object.defineProperty,L$=s((e,t,n)=>t in e?R$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,"__defNormalProp$2"),oy=s((e,t,n)=>L$(e,typeof t!="symbol"?t+"":t,n),"__publicField$2"),sy={type:"tableCell",children:[]};function $$(){let e=yo;return{publish:s(t=>{e(t)},"publish"),subscribe:s(t=>{e=t},"subscribe")}}s($$,"coordinatesEmitter");var Gd=class TS extends Fa{static{s(this,"TableNode")}constructor(t,n){super(n),oy(this,"__mdastNode"),oy(this,"focusEmitter",$$()),this.__mdastNode=t??{type:"table",children:[]}}static getType(){return"table"}static clone(t){return new TS(structuredClone(t.__mdastNode),t.__key)}static importJSON(t){return Ym(t.mdastNode)}static importDOM(){return{table:s(()=>({conversion:P$,priority:3}),"table")}}exportJSON(){return{mdastNode:structuredClone(this.__mdastNode),type:"table",version:1}}getMdastNode(){return this.__mdastNode}getRowCount(){return this.__mdastNode.children.length}getColCount(){var t;return((t=this.__mdastNode.children[0])==null?void 0:t.children.length)||0}createDOM(){return document.createElement("div")}updateDOM(){return!1}updateCellContents(t,n,r){const i=this.getWritable().__mdastNode,o=i.children[n],l=o.children,a=l[t],c=Array.from(l),d={...a,children:r},u={...o,children:c};c[t]=d,i.children[n]=u}insertColumnAt(t){const n=this.getWritable().__mdastNode;for(let r=0;r<n.children.length;r++){const i=n.children[r],o=i.children,l=Array.from(o),a={...i,children:l};l.splice(t,0,structuredClone(sy)),n.children[r]=a}n.align&&n.align.length>0&&n.align.splice(t,0,"left")}deleteColumnAt(t){const n=this.getWritable().__mdastNode;for(let r=0;r<n.children.length;r++){const i=n.children[r],o=i.children,l=Array.from(o),a={...i,children:l};l.splice(t,1),n.children[r]=a}}insertRowAt(t){const n=this.getWritable().__mdastNode,r={type:"tableRow",children:Array.from({length:this.getColCount()},()=>structuredClone(sy))};n.children.splice(t,0,r)}deleteRowAt(t){this.getRowCount()===1?(this.selectNext(),this.remove()):this.getWritable().__mdastNode.children.splice(t,1)}addRowToBottom(){this.insertRowAt(this.getRowCount())}addColumnToRight(){this.insertColumnAt(this.getColCount())}setColumnAlign(t,n){const r=this.getWritable().__mdastNode;r.align??(r.align=[]),r.align[t]=n}decorate(t){return m.createElement(A$,{lexicalTable:this,mdastNode:this.__mdastNode,parentEditor:t})}select(t){this.focusEmitter.publish(t??[0,0])}isInline(){return!1}};function SS(e){return e instanceof Gd}s(SS,"$isTableNode");function Ym(e){return new Gd(e)}s(Ym,"$createTableNode");function P$(e){const t=e.querySelectorAll("tr"),n=Array.from(t).map(r=>({type:"tableRow",children:Array.from(r.querySelectorAll("td, th")).map(i=>({type:"tableCell",children:[{type:"text",value:i.textContent}]}))}));return{node:new Gd({type:"table",children:n})}}s(P$,"$convertTableElement");var F$={testLexicalNode:SS,visitLexicalNode({actions:e,mdastParent:t,lexicalNode:n}){e.appendToParent(t,n.getMdastNode())}},V$={testNode:"table",visitNode({mdastNode:e,lexicalParent:t}){t.append(Ym(e))}};function B$(e=1,t=1){const n={type:"table",children:[]};for(let r=0;r<e;r++){const i={type:"tableRow",children:[]};for(let o=0;o<t;o++)i.children.push({type:"tableCell",children:[]});n.children.push(i)}return n}s(B$,"seedTable");var H$=kt(e=>{e.link(e.pipe(H$,Hi(({rows:t,columns:n})=>()=>Ym(B$(t,n)))),Gm)}),K$=Sn({init(e,t){e.pubIn({[Pu]:i9(),[$u]:e9(),[Hr]:V$,[_i]:Gd,[yi]:F$,[Wm]:f9({tableCellPadding:t?.tableCellPadding??!0,tablePipeAlign:t?.tablePipeAlign??!0})})}}),ly=new Set(["http:","https:","mailto:","sms:","tel:"]),Wr=class wS extends Br{static{s(this,"Z")}__url;__target;__rel;__title;static getType(){return"link"}static clone(t){return new wS(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t="",n={},r){super(r);const{target:i=null,rel:o=null,title:l=null}=n;this.__url=t,this.__target=i,this.__rel=o,this.__title=l}afterCloneFrom(t){super.afterCloneFrom(t),this.__url=t.__url,this.__rel=t.__rel,this.__target=t.__target,this.__title=t.__title}createDOM(t){const n=Tn().createElement("a");return this.updateLinkDOM(null,n,t),xr(n,t.theme.link),n}updateLinkDOM(t,n,r){if(iE(n)){t&&t.__url===this.__url||(n.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,l=this[o];t&&t[o]===l||(l?n[i]=l:n.removeAttribute(i))}}}updateDOM(t,n,r){return this.updateLinkDOM(t,n,r),!1}static importDOM(){return{a:s(t=>({conversion:W$,priority:1}),"a")}}static importJSON(t){return hi().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setURL(t.url).setRel(t.rel||null).setTarget(t.target||null).setTitle(t.title||null)}sanitizeUrl(t){const n=t;t=dy(t);try{const r=new URL(dy(t));if(!ly.has(r.protocol))return"about:blank"}catch{const i=n.replace(/[\u0000-\u001F\u007F\s]/g,"").match(/^([a-z][a-z0-9+.-]*):/i);if(i!=null&&!ly.has(`${i[1].toLowerCase()}:`))return"about:blank"}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(t){const n=this.getWritable();return n.__url=t,n}getTarget(){return this.getLatest().__target}setTarget(t){const n=this.getWritable();return n.__target=t,n}getRel(){return this.getLatest().__rel}setRel(t){const n=this.getWritable();return n.__rel=t,n}getTitle(){return this.getLatest().__title}setTitle(t){const n=this.getWritable();return n.__title=t,n}insertNewAfter(t,n=!0){const r=nn(this);return this.insertAfter(r,n),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,n,r){if(!oe(n))return!1;const i=n.anchor.getNode(),o=n.focus.getNode();return(this.is(i)||this.isParentOf(i))&&(this.is(o)||this.isParentOf(o))&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}shouldMergeAdjacentLink(t){return this.getType()===t.getType()&&this.__url===t.__url&&this.__target===t.__target&&this.__rel===t.__rel&&this.__title===t.__title}};function ay(e){const t=Gi(e,"next");return[t,t.getFlipped()]}s(ay,"H");function cy(e,t){for(const n of t)if(n.origin.isAttached()){const r=Zi(n);jh(e,r);return}}s(cy,"G");function U$(e){const t=ie();let n=null,r=null;function i(){oe(t)&&(cy(t.anchor,n),cy(t.focus,r),Xl(t))}s(i,"i"),oe(t)&&(n=ay(t.anchor),r=ay(t.focus));let o=!1;for(const a of qi(e,"next")){const c=a.origin;if(xe(c)&&!c.isInline()){const d=c.getChildren();if(d.length>0){const u=nn(e);u.append(...d),c.append(u),o=!0}ym(c,Sl(a),{$shouldSplit:s(()=>!1,"$shouldSplit")})}}function l(a,c,d){const[u,f]=a,h=s(p=>Cu(p)&&p.origin.is(c),"l");if(!h(u)&&!h(f))return a;const g=Zi(qi(d,"next"));return[g,g.getFlipped()]}if(s(l,"u"),e.isAttached()){const a=e.getPreviousSibling();if(St(a)&&a.shouldMergeAdjacentLink(e))return n&&(n=l(n,a,e)),r&&(r=l(r,a,e)),a.append(...e.getChildren()),e.remove(),void i();const c=e.getNextSibling();St(c)&&e.shouldMergeAdjacentLink(c)&&(n&&(n=l(n,e,c)),r&&(r=l(r,e,c)),e.append(...c.getChildren()),c.remove(),o=!0)}if(o){if(!e.canBeEmpty()&&e.isEmpty()){const a=e.getParent();e.remove(),a&&a.isEmpty()&&a.remove()}i()}}s(U$,"q");function W$(e){let t=null;if(iE(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=hi(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}s(W$,"Q$1");function hi(e="",t){return gi(new Wr(e,t))}s(hi,"V$1");function St(e){return e instanceof Wr}s(St,"X$1");var qd=class kS extends Wr{static{s(this,"Y")}__isUnlinked;constructor(t="",n={},r){super(t,n,r),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null&&n.isUnlinked}afterCloneFrom(t){super.afterCloneFrom(t),this.__isUnlinked=t.__isUnlinked}static getType(){return"autolink"}static clone(t){return new kS(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}shouldMergeAdjacentLink(t){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(t){const n=this.getWritable();return n.__isUnlinked=t,n}createDOM(t){return this.__isUnlinked?Tn().createElement("span"):super.createDOM(t)}updateDOM(t,n,r){return super.updateDOM(t,n,r)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return Tg().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(t,n=!0){const r=Tg(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,n),r}};function Tg(e="",t){return gi(new qd(e,t))}s(Tg,"tt");function cn(e){return e instanceof qd}s(cn,"et");var Oi=kr("TOGGLE_LINK_COMMAND");function uy(e,t){if(e.type==="element"){const n=e.getNode();return xe(n)||(function(r,...i){const o=new URL("https://lexical.dev/docs/error"),l=new URLSearchParams;l.append("code",r);for(const a of i)l.append("v",a);throw o.search=l.toString(),Error(`Minified Lexical error #${r}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[e.offset+t]||null}return null}s(uy,"rt$1");function Ff(e,t={}){let n;if(e&&typeof e=="object"){const{url:u,...f}=e;n=u,t={...f,...t}}else n=e;const{target:r,title:i}=t,o=t.rel===void 0?"noreferrer":t.rel,l=ie();if(l===null||!oe(l)&&!He(l))return;if(He(l)){const u=l.getNodes();if(u.length===0)return;u.forEach(f=>{if(n===null){const h=ft(f,g=>!cn(g)&&St(g));h&&(h.insertBefore(f),h.getChildren().length===0&&h.remove())}else{const h=ft(f,g=>!cn(g)&&St(g));if(h)h.setURL(n),r!==void 0&&h.setTarget(r),o!==void 0&&h.setRel(o);else{const g=hi(n,{rel:o,target:r});f.insertBefore(g),g.append(f)}}});return}if(l.isCollapsed()&&n===null)for(const u of l.getNodes()){const f=ft(u,h=>!cn(h)&&St(h));f!==null&&(f.getParentOrThrow().splice(f.getIndexWithinParent(),0,f.getChildren()),f.remove());return}const a=l.extract();if(n===null){const u=new Set;a.forEach(f=>{const h=ft(f,g=>!cn(g)&&St(g));if(h!==null){const g=h.getKey();if(u.has(g))return;(function(p,v){const _=new Set(v.filter(E=>p.isParentOf(E)).map(E=>E.getKey())),y=p.getChildren(),x=s(E=>_.has(E.getKey())||xe(E)&&v.some(A=>p.isParentOf(A)&&E.isParentOf(A)),"i"),C=y.filter(x);if(C.length===y.length)return y.forEach(E=>p.insertBefore(E)),void p.remove();const b=y.findIndex(x),T=y.findLastIndex(x),M=b===0,S=T===y.length-1;if(M)C.forEach(E=>p.insertBefore(E));else if(S)for(let E=C.length-1;E>=0;E--)p.insertAfter(C[E]);else{for(let A=C.length-1;A>=0;A--)p.insertAfter(C[A]);const E=y.slice(T+1);if(E.length>0){const A=nn(p);C[C.length-1].insertAfter(A),E.forEach(D=>A.append(D))}}})(h,a),u.add(g)}});return}const c=new Set,d=s(u=>{c.has(u.getKey())||(c.add(u.getKey()),u.setURL(n),r!==void 0&&u.setTarget(r),o!==void 0&&u.setRel(o),i!==void 0&&u.setTitle(i))},"m");if(a.length===1){const u=a[0],f=ft(u,St);if(f!==null)return d(f)}(function(u){const f=ie();if(!oe(f))return u();const h=Xl(f),g=h.isBackward(),p=uy(h.anchor,g?-1:0),v=uy(h.focus,g?0:-1);if(u(),p||v){const _=ie();if(oe(_)){const y=_.clone();if(p){const x=p.getParent();x&&y.anchor.set(x.getKey(),p.getIndexWithinParent()+(g?1:0),"element")}if(v){const x=v.getParent();x&&y.focus.set(x.getKey(),v.getIndexWithinParent()+(g?0:1),"element")}nr(Xl(y))}}})(()=>{let u=null;for(const f of a){if(!f.isAttached())continue;const h=ft(f,St);if(h){d(h);continue}if(xe(f)){if(!f.isInline())continue;if(St(f)){if(!(cn(f)||u!==null&&u.getParentOrThrow().isParentOf(f))){d(f),u=f;continue}for(const p of f.getChildren())f.insertBefore(p);f.remove();continue}}const g=f.getPreviousSibling();St(g)&&g.is(u)?g.append(f):(u=hi(n,{rel:o,target:r,title:i}),f.insertAfter(u),u.append(f))}})}s(Ff,"it$1");var z$=/^\+?[0-9\s()-]{5,}$/;function dy(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:z$.test(e)?`tel:${e}`:`https://${e}`}s(dy,"st$1");var Pj=[{$import:s((e,t)=>{if(!t.textContent&&t.children.length===0)return[];const n=t.getAttribute("href")||"",r={rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")};return VE(e.$importChildren(t),()=>hi(n,r))},"$import"),match:Jt.tag("a"),name:"@lexical/link/a"}];function j$(e,t){return It(e.registerNodeTransform(Wr,U$),e.registerCommand(Oi,n=>{const r=t.validateUrl.peek(),i=t.attributes.peek();if(n===null)return Ff(null),!0;if(typeof n=="string")return!(r!==void 0&&!r(n))&&(Ff(n,i),!0);{const{url:o,target:l,rel:a,title:c}=n;return Ff(o,{...i,rel:a,target:l,title:c}),!0}},Ie),Bo(()=>{const n=t.validateUrl.value;if(!n)return;const r=t.attributes.value;return e.registerCommand(ea,i=>{const o=ie();if(!oe(o)||o.isCollapsed()||!ti(i,ClipboardEvent)||i.clipboardData===null)return!1;const l=i.clipboardData.getData("text");return n(l)?!o.getNodes().some(a=>xe(a)||Ne(a)&&!a.isSimpleText())&&(e.dispatchCommand(Oi,{...r,url:l}),i.preventDefault(),!0):!1},st)}))}s(j$,"ut");function Sg(e,t=n=>n){return n=>{const r=e.exec(n);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}s(Sg,"dt");var Fj=Sg(/(([^<>()[\]\\.,;:\s@"]{1,64}(\.[^<>()[\]\\.,;:\s@"]{1,64}){0,63})|(".{1,255}"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]{1,63}\.){1,127}[a-zA-Z]{2,63}))/,e=>`mailto:${e}`);function wg(e,t){for(let n=0;n<t.length;n++){const r=t[n](e);if(r)return r}return null}s(wg,"mt$1");var MS=/[.,;\s]/;function Vu(e,t){return t.test(e)}s(Vu,"bt$1");function AS(e,t){return Vu(e[e.length-1],t)}s(AS,"kt$1");function kg(e,t){return Vu(e[0],t)}s(kg,"Ut$1");function IS(e,t){let n=e.getPreviousSibling();return xe(n)&&(n=n.getLastDescendant()),n===null||Fr(n)||Ne(n)&&AS(n.getTextContent(),t)}s(IS,"vt$1");function NS(e,t){let n=e.getNextSibling();return xe(n)&&(n=n.getFirstDescendant()),n===null||Fr(n)||Ne(n)&&kg(n.getTextContent(),t)}s(NS,"Tt$1");function J$(e,t,n,r,i){return(e>0?Vu(r[e-1],n):IS(i[0],n))?t<r.length?Vu(r[t],n):NS(i[i.length-1],n):!1}s(J$,"Ct$1");function G$(e,t,n){const r=[],i=[],o=[];let l=0,a=0;const c=[...e];for(;c.length>0;){const d=c[0],u=d.getTextContent().length,f=a;a+u<=t?(r.push(d),l+=u):f>=n?o.push(d):i.push(d),a+=u,c.shift()}return[l,r,i,o]}s(G$,"Lt$1");function q$(e,t,n,r){const i=Tg(r.url,r.attributes);if(e.length===1){let o,l=e[0];t===0?[o,l]=l.splitText(n):[,o,l]=l.splitText(t,n);const a=yr(r.text);return a.setFormat(o.getFormat()),a.setDetail(o.getDetail()),a.setStyle(o.getStyle()),i.append(a),o.replace(i),l}if(e.length>1){const o=e[0];let l,a=o.getTextContent().length;t===0?l=o:[,l]=o.splitText(t);const c=[];let d;for(let g=1;g<e.length;g++){const p=e[g],v=p.getTextContent().length,_=a;if(_<n)if(a+v<=n)c.push(p);else{const[y,x]=p.splitText(n-_);c.push(y),d=x}a+=v}const u=ie(),f=u?u.getNodes().find(Ne):void 0,h=yr(l.getTextContent());return h.setFormat(l.getFormat()),h.setDetail(l.getDetail()),h.setStyle(l.getStyle()),i.append(h,...c),f&&f===l&&(oe(u)?h.select(u.anchor.offset,u.focus.offset):He(u)&&h.select(0,h.getTextContent().length)),l.replace(i),d}}s(q$,"St$1");function fy(e,t,n,r){const i=e.getChildren(),o=i.length;for(let d=0;d<o;d++){const u=i[d];if(!Ne(u)||!u.isSimpleText())return Al(e),void n(null,e.getURL())}const l=e.getTextContent(),a=wg(l,t);if(a===null||a.text!==l||!IS(e,r)||!NS(e,r))return Al(e),void n(null,e.getURL());const c=e.getURL();if(c!==a.url&&(e.setURL(a.url),n(a.url,c)),a.attributes){const d=e.getRel();d!==a.attributes.rel&&(e.setRel(a.attributes.rel||null),n(a.attributes.rel||null,d));const u=e.getTarget();u!==a.attributes.target&&(e.setTarget(a.attributes.target||null),n(a.attributes.target||null,u))}}s(fy,"Nt$1");function Al(e){const t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(n=>n.getLatest())}s(Al,"Ot$1");var Z$={changeHandlers:[],excludeParents:[],matchers:[],separatorRegex:MS};function Y$(e,t=Z$){const{matchers:n,changeHandlers:r,excludeParents:i,separatorRegex:o=MS}=t,l=s((a,c)=>{for(const d of r)d(a,c)},"s");return It(e.registerNodeTransform(Bs,a=>{const c=a.getParentOrThrow(),d=a.getPreviousSibling();cn(c)?fy(c,n,l,o):!St(c)&&!i.some(u=>u(c))&&(a.isSimpleText()&&(kg(a.getTextContent(),o)||!cn(d))&&(function(u,f,h,g){for(const C of u){const b=C.getParent();if(cn(b)&&!b.getIsUnlinked())return}let p=[...u];const v=p.map(C=>C.getTextContent()).join("");let _,y=v,x=0;for(;(_=wg(y,f))&&_!==null;){const C=_.index,b=C+_.length;if(J$(x+C,x+b,g,v,p)){const[T,,M,S]=G$(p,x+C,x+b);let E=!1;for(const D of M){const L=D.getParent();if(cn(L)&&!L.getIsUnlinked()){E=!0;break}}if(E){x+=b,y=y.substring(b);continue}const A=q$(M,x+C-T,x+b-T,_);p=A?[A,...S]:S,h(_.url,null),x=0}else x+=b;y=y.substring(b)}})((function(u){const f=[u];let h=u.getNextSibling();for(;h!==null&&Ne(h)&&h.isSimpleText()&&(f.push(h),!/[\s]/.test(h.getTextContent()));)h=h.getNextSibling();return f})(a),n,l,o),(function(u,f,h,g){const p=u.getParent(),v=u.getPreviousSibling(),_=u.getNextSibling(),y=u.getTextContent();if(!cn(p)||p.getIsUnlinked()){if(cn(v)&&!v.getIsUnlinked()&&v.is(u.getPreviousSibling())&&u.getParent()===v.getParent()){if(!kg(y,g))return Al(v),void h(null,v.getURL());if(x=y,v.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(x):/^\.[a-zA-Z0-9]{1,}/.test(x)){const C=v.getTextContent()+y,b=wg(C,f);b!==null&&b.text===C&&(v.append(u),fy(v,f,h,g),h(null,v.getURL()))}}var x;!cn(_)||_.getIsUnlinked()||AS(y,g)||_.is(u.getNextSibling())&&u.getParent()===_.getParent()&&(Al(_),h(null,_.getURL()))}})(a,n,l,o))}),e.registerCommand(Oi,a=>{const c=ie();return a!==null||!oe(c)||c.extract().forEach(d=>{const u=d.getParent();cn(u)&&(u.setIsUnlinked(!u.getIsUnlinked()),u.markDirty())}),!1},st))}s(Y$,"Pt$1");var X$={testNode:"link",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(hi(e.url,{title:e.title}))}},Q$={testLexicalNode:St,visitLexicalNode:s(({lexicalNode:e,actions:t})=>{t.addAndStepInto("link",{url:e.getURL(),title:e.getTitle()})},"visitLexicalNode")};function eP({validateUrl:e,attributes:t}){const[n]=gn();return(0,m.useEffect)(()=>{if(!n.hasNodes([Wr]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),(0,m.useEffect)(()=>j$(n,Ha({attributes:t,validateUrl:e})),[n,e,t]),null}s(eP,"l$1");function tP(e,t,n,r){(0,m.useEffect)(()=>{e.hasNodes([qd])||(function(i,...o){const l=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",i);for(const c of o)a.append("v",c);throw l.search=a.toString(),Error(`Minified Lexical error #${i}; visit ${l.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(77)}),(0,m.useEffect)(()=>Y$(e,{changeHandlers:n?[n]:[],excludeParents:r??[],matchers:t}),[e,t,n,r])}s(tP,"t$1");function nP({matchers:e,onChange:t,excludeParents:n}){const[r]=gn();return tP(r,e,t,n),null}s(nP,"i$2");var rP=[Sg(/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,e=>e.startsWith("http")?e:`https://${e}`),Sg(/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,e=>`mailto:${e}`)],iP=s(()=>m.createElement(nP,{matchers:rP}),"LexicalAutoLinkPlugin"),oP=fe(!1),sP=Sn({init(e,t){const n=!!t?.disableAutoLink,r=t?.validateUrl?{validateUrl:t.validateUrl}:{},i=s(()=>m.createElement(m.Fragment,null,m.createElement(eP,{...r}),n?null:m.createElement(iP,null)),"EditorChild");e.pubIn({[zs]:"link",[Hr]:X$,[_i]:[Wr,qd],[yi]:Q$,[oP]:n,[Jm]:i,[ZT]:i,[Ws]:i})}});function lP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}s(lP,"_objectWithoutPropertiesLoose$1");var aP=["color"],cP=(0,m.forwardRef)(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=lP(e,aP);return(0,m.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),(0,m.createElement)("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),hy=s(()=>m.createElement("div",{className:j.imagePlaceholder},m.createElement(cP,null)),"ImagePlaceholder");function Mg(e){const{nodeKey:t,imageSource:n,initialImagePath:r,title:i,alt:o,width:l,height:a}=e,[c,d,u]=Er(Iw,xi,Cr),[f]=gn(),h=Nn(Mw),g=Ci();return m.createElement("div",{className:j.editImageToolbar},m.createElement("button",{className:j.iconButton,type:"button",title:g("imageEditor.deleteImage","Delete image"),disabled:u,onClick:s(p=>{p.preventDefault(),f.update(()=>{var v;(v=Cn(t))==null||v.remove()})},"onClick")},d("delete_small")),!c&&m.createElement("button",{type:"button",className:(0,nt.default)(j.iconButton,j.editImageButton),title:g("imageEditor.editImage","Edit image"),disabled:u,onClick:s(()=>{h({nodeKey:t,initialValues:{src:r??n,title:i,altText:o,width:Ms(l),height:Ms(a)}})},"onClick")},d("settings")))}s(Mg,"EditImageToolbar");var Ja=s(e=>e.type==="checkbox","isCheckBoxInput"),Zd=s(e=>e.type==="file","isFileInput"),Di=s(e=>e instanceof Date,"isDateObject"),Ht=s(e=>e==null,"isNullOrUndefined"),Xm=s(e=>typeof e=="object","isObjectType"),bt=s(e=>!Ht(e)&&!Array.isArray(e)&&Xm(e)&&!Di(e),"isObject"),Ag=s(e=>bt(e)&&e.target?Ja(e.target)?e.target.checked:Zd(e.target)?e.target.files:e.target.value:e,"getEventValue"),uP=/[.[\]'"]/,Oo=s(e=>e.split(uP).filter(Boolean),"stringToPath");function dP(e,t){const n=Oo(t);let r=e._formValues,i=e._defaultValues;for(let o=0;o<n.length-1;o++){const l=n[o];if(r=r==null?r:r[l],i=i==null?i:i[l],r===null||i===null)return null}}s(dP,"getNullAncestorValue");var OS=s((e,t)=>t.split(".").some((n,r,i)=>!isNaN(Number(n))&&e.has(i.slice(0,r).join("."))),"isNameInFieldArray"),Yd=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ut(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Yd&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&e.constructor!==Object)return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=ut(e[i]));return r}s(ut,"cloneObject");var Mi={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},fr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ur={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},DS="root",Qm=["__proto__","constructor","prototype"],fP=/^\w*$/,Do=s(e=>fP.test(e),"isKey"),Je=s(e=>e===void 0,"isUndefined"),re=s((e,t,n)=>{if(!t||!bt(e))return n;const r=Do(t)?[t]:Oo(t);if(r.some(o=>Qm.includes(o)))return n;const i=r.reduce((o,l)=>Ht(o)?void 0:o[l],e);return Je(i)||i===e?Je(e[t])?n:e[t]:i},"get"),An=s(e=>typeof e=="boolean","isBoolean"),tn=s(e=>typeof e=="function","isFunction"),et=s((e,t,n)=>{let r=-1;const i=Do(t)?[t]:Oo(t),o=i.length,l=o-1;for(;++r<o;){const a=i[r];let c=n;if(r!==l){const d=e[a];c=bt(d)||Array.isArray(d)?d:isNaN(+i[r+1])?{}:[]}if(Qm.includes(a))return;e[a]=c,e=e[a]}},"set"),RS=m.createContext(null);RS.displayName="HookFormControlContext";var e1=s(()=>m.useContext(RS),"useFormControlContext"),LS=s((e,t,n,r=!0)=>{const i={};for(const o in e)Object.defineProperty(i,o,{get:s(()=>{const l=o;return t._proxyFormState[l]!==fr.all&&(t._proxyFormState[l]=!r||fr.all),n&&(n[l]=!0),e[l]},"get")});return i},"getProxyFormState"),t1=Yd?m.useLayoutEffect:m.useEffect,hP=s(e=>{const t=e.constructor&&e.constructor.prototype;return bt(t)&&t.hasOwnProperty("isPrototypeOf")},"isPlainObject"),Ig=s(e=>Ht(e)||!Xm(e),"isPrimitive"),gy=s((e,t)=>t.length===0&&!Array.isArray(e)&&!hP(e),"isEmptyObjectWithCustomPrototype");function mn(e,t,n=new WeakMap){if(e===t)return!0;if(Ig(e)||Ig(t))return Object.is(e,t);if(Di(e)&&Di(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(gy(e,r)||gy(t,i))return Object.is(e,t);if(!r.length&&Array.isArray(e)!==Array.isArray(t))return!1;const o=n.get(e);if(o&&o.has(t))return!0;if(o)o.add(t);else{const l=new WeakSet;l.add(t),n.set(e,l)}for(const l of r){const a=e[l];if(!(l in t))return!1;if(l!=="ref"){const c=t[l];if(Di(a)&&Di(c)||(bt(a)||Array.isArray(a))&&(bt(c)||Array.isArray(c))?!mn(a,c,n):!Object.is(a,c))return!1}}return!0}s(mn,"deepEqual");function n1(e){const t=m.useRef(!1),n=m.useRef(!1),r=m.useRef(void 0),i=m.useRef(0);return i.current++,!n.current&&e&&(n.current=!0,r.current=ut(e())),{resyncIfNeeded:m.useCallback((o,l,a)=>{if(o&&(t.current||n.current&&i.current>1)){const c=l();mn(r.current,c)||a(c)}t.current=!0},[]),snapshot:m.useCallback((o,l)=>{o&&(r.current=ut(l()))},[])}}s(n1,"useResyncOnReconnect");function gP(e){const t=e1(),{control:n=t,disabled:r,name:i,exact:o}=e||{},l=s(()=>({...n._formState,defaultValues:n._defaultValues}),"getCurrentFormState"),[a,c]=m.useState(l),d=m.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:u,snapshot:f}=n1(l);return t1(()=>{u(!r,l,c);const h=n._subscribe({name:i,formState:d.current,exact:o,callback:s(g=>{!r&&c({...n._formState,...g,defaultValues:n._defaultValues})},"callback")});return()=>{h(),f(!r,l)}},[i,r,o,u,f]),m.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),m.useMemo(()=>LS(a,n,d.current,!1),[a,n])}s(gP,"useFormState");var Kt=s(e=>typeof e=="string","isString"),Ng=s((e,t,n,r,i)=>Kt(e)?(r&&t.watch.add(e),re(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),re(n,o,re(i,o)))):(r&&(t.watchAll=!0),n),"generateWatchOutput");function pP(e){const t=e1(),{control:n=t,name:r,defaultValue:i,disabled:o,exact:l,compute:a}=e||{},c=m.useRef(i),d=m.useRef(a),u=m.useRef(void 0),f=m.useRef(n),h=m.useRef(r);d.current=a;const g=s(()=>{const E=n._getWatch(r,c.current);return d.current?d.current(E):E},"getInitialOutput"),[p,v]=m.useState(g),_=m.useCallback(E=>{const A=Ng(r,n._names,E||n._formValues,!1,c.current);return d.current?d.current(A):A},[n._formValues,n._names,r]),y=m.useCallback(E=>{if(!o){const A=Ng(r,n._names,E||n._formValues,!1,c.current);if(d.current){const D=d.current(A);mn(D,u.current)||(v(D),u.current=D)}else v(A)}},[n._formValues,n._names,o,r]),{resyncIfNeeded:x,snapshot:C}=n1(g),b=m.useRef(y);b.current=y;const T=m.useRef(_);T.current=_,t1(()=>{f.current!==n||!mn(h.current,r)?(f.current=n,h.current=r,b.current()):x(!o,()=>T.current(),A=>{v(A),u.current=A});const E=n._subscribe({name:r,formState:{values:!0},exact:l,callback:s(A=>{b.current(A.values)},"callback")});return()=>{E(),C(!o,()=>T.current())}},[n,l,r,o,x,C]),m.useEffect(()=>n._removeUnmounted());const M=f.current!==n,S=h.current;return m.useMemo(()=>{if(o)return!1;const E=!M&&!mn(S,r);return M||E},[o,M,r,S])?_():p}s(pP,"useWatch");function mP(e){const t=e1(),{name:n,disabled:r,control:i=t,shouldUnregister:o,defaultValue:l,exact:a=!0}=e,c=OS(i._names.array,n),d=pP({control:i,name:n,defaultValue:m.useMemo(()=>{const C=re(i._formValues,n,re(i._defaultValues,n,l));return Je(C)?dP(i,n):C},[i,n,l]),exact:a}),u=gP({control:i,name:n,exact:a}),f=m.useRef(e),h=m.useRef(null),g=m.useRef(i.register(n,{...e.rules,value:d,...An(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const p=m.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:s(()=>!!re(u.errors,n),"get")},isDirty:{enumerable:!0,get:s(()=>!!re(u.dirtyFields,n),"get")},isTouched:{enumerable:!0,get:s(()=>!!re(u.touchedFields,n),"get")},isValidating:{enumerable:!0,get:s(()=>!!re(u.validatingFields,n),"get")},error:{enumerable:!0,get:s(()=>re(u.errors,n),"get")}}),[u,n]),v=m.useCallback(C=>{const b=Ag(C);return re(i._fields,n)||(g.current=i.register(n,{...f.current.rules,value:b})),g.current.onChange({target:{value:Ag(C),name:n},type:Mi.CHANGE})},[n,i]),_=m.useCallback(()=>g.current.onBlur({target:{value:re(i._formValues,n),name:n},type:Mi.BLUR}),[n,i._formValues]),y=m.useCallback(C=>{C&&(h.current={focus:s(()=>tn(C.focus)&&C.focus(),"focus"),select:s(()=>tn(C.select)&&C.select(),"select"),setCustomValidity:s(T=>tn(C.setCustomValidity)&&C.setCustomValidity(T),"setCustomValidity"),reportValidity:s(()=>tn(C.reportValidity)&&C.reportValidity(),"reportValidity")});const b=re(i._fields,n);b&&b._f&&C&&(b._f.ref=h.current)},[i._fields,n]),x=m.useMemo(()=>({name:n,value:d,...An(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:v,onBlur:_,ref:y}),[n,r,u.disabled,v,_,y,d]);return m.useEffect(()=>{const C=i._options.shouldUnregister||o;g.current=i.register(n,{...f.current.rules,...An(f.current.disabled)?{disabled:f.current.disabled}:{}});const b=s((T,M)=>{const S=re(i._fields,T);S&&S._f&&(S._f.mount=M)},"updateMounted");if(b(n,!0),C){const T=ut(re(o?i._defaultValues:i._options.values||i._defaultValues,n,re(i._options.defaultValues,n,f.current.defaultValue)));et(i._defaultValues,n,T),Je(re(i._formValues,n))&&et(i._formValues,n,T)}if(!c&&i.register(n),h.current){const T=re(i._fields,n);T&&T._f&&(T._f.ref=h.current)}return()=>{(c?C&&!i._state.action:C)?i.unregister(n):b(n,!1)}},[n,i,c,o]),m.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),m.useMemo(()=>({field:x,formState:u,fieldState:p}),[x,u,p])}s(mP,"useController");var vP=s(e=>e.render(mP(e)),"Controller"),hc=s(e=>({isOnSubmit:!e||e===fr.onSubmit,isOnBlur:e===fr.onBlur,isOnChange:e===fr.onChange,isOnAll:e===fr.all,isOnTouch:e===fr.onTouched}),"getValidationModes"),Vf=s((e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(const r of t.watch)if(e.startsWith(r)&&e.charAt(r.length)===".")return!0;return!1},"isWatched"),Il=s((e,t,n,r)=>{for(const i of n||Object.keys(e)){if(i==="_f")continue;const o=n?re(e,i):e[i];if(o){const{_f:l}=o;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],i)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(Il(o,t))break}else if((bt(o)||Array.isArray(o))&&Il(o,t))break}}},"iterateFieldsByAction"),py=s((e,t,n)=>{const r=re(e,n),i=Array.isArray(r)?r:[];return et(i,DS,t[n]),et(e,n,i),e},"updateFieldArrayRootError"),Gt=s(e=>bt(e)&&!Object.keys(e).length,"isEmptyObject"),Bu=s(e=>{if(!Yd)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},"isHTMLElement"),r1=s(e=>e.type==="radio","isRadioInput"),Hu=s(e=>e instanceof RegExp,"isRegex"),_P=s((e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},"appendErrors"),my={value:!1,isValid:!1},vy={value:!0,isValid:!0},$S=s(e=>{if(!Array.isArray(e))return my;if(e.length>1){const n=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:n,isValid:!!n.length}}const t=e[0];return!t||!t.checked||t.disabled?my:!t.attributes||!("value"in t.attributes)||Je(t.value)||t.value===""?vy:{value:t.value,isValid:!0}},"getCheckboxValue"),_y={isValid:!1,value:null},PS=s(e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,_y):_y,"getRadioValue");function yy(e,t,n="validate"){if(Kt(e)||Array.isArray(e)&&e.every(Kt)||An(e)&&!e)return{type:n,message:Kt(e)?e:"",ref:t}}s(yy,"getValidateError");var qo=s(e=>bt(e)&&!Hu(e)?e:{value:e,message:""},"getValueAndMessage"),xy=s(async(e,t,n,r,i,o)=>{const{ref:l,refs:a,required:c,maxLength:d,minLength:u,min:f,max:h,pattern:g,validate:p,name:v,valueAsNumber:_,mount:y}=e._f,x=re(n,v);if(!y||t.has(v))return{};const C=a?a[0]:l,b=s($=>{if(i&&C.reportValidity){const W=An($)?"":$||"";a?a.forEach(z=>z.setCustomValidity(W)):C.setCustomValidity(W),C.reportValidity()}},"setCustomValidity"),T={},M=r1(l),S=Ja(l),E=M||S,A=(_||Zd(l))&&Je(l.value)&&Je(x)||Bu(l)&&l.value===""||x===""||Array.isArray(x)&&!x.length,D=_P.bind(null,v,r,T),L=s(($,W,z,me=ur.maxLength,q=ur.minLength)=>{const le=$?W:z;T[v]={type:$?me:q,message:le,ref:l,...D($?me:q,le)}},"getMinMaxMessage");if(o?!Array.isArray(x)||!x.length:c&&(!E&&(A||Ht(x))||An(x)&&!x||S&&!$S(a).isValid||M&&!PS(a).isValid)){const{value:$,message:W}=Kt(c)?{value:!!c,message:c}:qo(c);if($&&(T[v]={type:ur.required,message:W,ref:C,...D(ur.required,W)},!r))return b(W),T}if(!A&&(!Ht(f)||!Ht(h))){let $,W;const z=qo(h),me=qo(f);if(!Ht(x)&&!Di(x)&&!isNaN(x)){const q=l.valueAsNumber||x&&+x;Ht(z.value)||($=q>z.value),Ht(me.value)||(W=q<me.value)}else{const q=l.valueAsDate||new Date(x),le=s(ne=>new Date(new Date().toDateString()+" "+ne),"convertTimeToDate"),ye=l.type=="time",X=l.type=="week";Kt(z.value)&&x&&($=ye?le(x)>le(z.value):X?x>z.value:q>new Date(z.value)),Kt(me.value)&&x&&(W=ye?le(x)<le(me.value):X?x<me.value:q<new Date(me.value))}if(($||W)&&(L(!!$,z.message,me.message,ur.max,ur.min),!r))return b(T[v].message),T}if((d||u)&&!A&&(Kt(x)||o&&Array.isArray(x))){const $=qo(d),W=qo(u),z=!Ht($.value)&&x.length>+$.value,me=!Ht(W.value)&&x.length<+W.value;if((z||me)&&(L(z,$.message,W.message),!r))return b(T[v].message),T}if(g&&!A&&Kt(x)){const{value:$,message:W}=qo(g);if(Hu($)&&!x.match($)&&(T[v]={type:ur.pattern,message:W,ref:l,...D(ur.pattern,W)},!r))return b(W),T}if(p){if(tn(p)){const $=yy(await p(x,n),C);if($&&(T[v]={...$,...D(ur.validate,$.message)},!r))return b($.message),T}else if(bt(p)){let $={};for(const W in p){if(!Gt($)&&!r)break;const z=yy(await p[W](x,n),C,W);z&&($={...z,...D(W,z.message)},b(z.message),r&&(T[v]=$))}if(!Gt($)&&(T[v]={ref:C,...$},!r))return T}}const G=T[v];return b(G?G.message:!0),T},"validateField"),Wc=s(e=>Array.isArray(e)?e:[e],"convertToArrayPayload"),FS=s(e=>Array.isArray(e)?e.filter(Boolean):[],"compact");function yP(e,t){const n=t.length-1;let r=0;for(;r<n;){if(Ht(e)){e=void 0;break}e=e[t[r]],r++}return e}s(yP,"baseGet");function xP(e){for(const t in e)if(e.hasOwnProperty(t)&&!Je(e[t]))return!1;return!0}s(xP,"isEmptyArray");function Tt(e,t){if(Kt(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:Do(t)?[t]:Oo(t);if(n.some(l=>Qm.includes(String(l))))return e;const r=n.length===1?e:yP(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(bt(r)&&Gt(r)||Array.isArray(r)&&xP(r))&&Tt(e,n.slice(0,-1)),e}s(Tt,"unset");var CP=m.createContext(null);CP.displayName="HookFormContext";var Cy=s(()=>{let e=[];return{get observers(){return e},next:s(i=>{for(const o of e)o.next&&o.next(i)},"next"),subscribe:s(i=>(e.push(i),{unsubscribe:s(()=>{e=e.filter(o=>o!==i)},"unsubscribe")}),"subscribe"),unsubscribe:s(()=>{e=[]},"unsubscribe")}},"createSubject");function VS(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r],o=t[r];if(i&&bt(i)&&o){const l=VS(i,o);bt(l)&&(n[r]=l)}else e[r]&&(n[r]=o)}return n}s(VS,"extractFormValues");var by=s((e,t)=>e!==null&&Xm(e)&&Object.prototype.hasOwnProperty.call(e,t),"hasOwn"),bP=s((e,t)=>{if(!t)return!1;let n=e;for(const r of Do(t)?[t]:Oo(t)){if(!by(n,r))return by(e,t);n=n[r]}return!0},"has"),BS=s(e=>e.type==="select-multiple","isMultipleSelect"),EP=s(e=>r1(e)||Ja(e),"isRadioOrCheckbox"),Bf=s(e=>Bu(e)&&e.isConnected,"live");function Ey(e){return Array.isArray(e)||bt(e)}s(Ey,"isDirtyContainer");function HS(e,t,n="",r=[]){for(const i in e){const o=n?`${n}.${i}`:i,l=e[i];Ey(l)&&Ey(re(t,o))?HS(l,t,o,r):r.push(o)}return r}s(HS,"collectDirtyFieldNames");var TP=s(e=>{for(const t in e)if(tn(e[t]))return!0;return!1},"objectHasFunction");function KS(e){return Array.isArray(e)||bt(e)&&!TP(e)}s(KS,"isTraversable");function US(e){return!!(e&&"_f"in e)}s(US,"isRegisteredLeaf");function WS(e){return Array.isArray(e)?!e.some(t=>!Je(t)):!Object.keys(e).length}s(WS,"isEmptyDirtyContainer");function Og(e,t){Array.isArray(e)?e[t]=void 0:delete e[t]}s(Og,"clearDirtyField");function Dg(e,t={},n){for(const r in e){const i=e[r],o=n&&n[r];KS(i)&&(!Array.isArray(i)||!US(o))?(t[r]=Array.isArray(i)?[]:{},Dg(i,t[r],o),WS(t[r])&&Og(t,r)):Je(i)||(t[r]=!0)}return t}s(Dg,"markFieldsDirty");function co(e,t,n,r){n||(n=Dg(t,{},r));for(const i in e){const o=e[i],l=r&&r[i];KS(o)&&(!Array.isArray(o)||!US(l))?(Je(t)||Ig(n[i])?n[i]=Dg(o,Array.isArray(o)?[]:{},l):co(o,Ht(t)?{}:t[i],n[i],l),WS(n[i])&&Og(n,i)):mn(o,t[i])?Og(n,i):n[i]=!0}return n}s(co,"getDirtyFields");var SP=s((e,t)=>{const n=t.split("."),r=[];let i=n[0];for(let o=1;o<n.length;i+="."+n[o++])!isNaN(+n[o])&&e.has(i)&&r.push(`${i}.${n[o]}`);return r},"getFieldArrayItemNames"),zS=s((e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Je(e)?e:t?e===""?NaN:e&&+e:n&&Kt(e)?new Date(e):r?r(e):e,"getFieldValueAs");function Ty(e){const t=e.ref;return Zd(t)?t.files:r1(t)?PS(e.refs).value:BS(t)?[...t.selectedOptions].map(({value:n})=>n):Ja(t)?$S(e.refs).value:zS(t.value,e)}s(Ty,"getFieldValue");var wP=s((e,t,n,r)=>{const i={};for(const o of e){const l=re(t,o);l&&et(i,o,l._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},"getResolverOptions"),ol=s(e=>Je(e)?e:Hu(e)?e.source:bt(e)?Hu(e.value)?e.value.source:e.value:e,"getRuleValue"),Sy="AsyncFunction",kP=s(e=>{if(!e||!e.validate)return!1;if(tn(e.validate))return e.validate.constructor.name===Sy;if(bt(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===Sy)return!0}return!1},"hasPromiseValidation"),MP=s(e=>e.mount&&(e.required||!Je(e.required)&&e.required!==!1||!Je(e.min)||!Je(e.max)||!Je(e.maxLength)||!Je(e.minLength)||e.pattern||e.validate),"hasValidation");function wy(e,t,n){const r=re(e,n);if(r||Do(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),l=re(t,o),a=re(e,o);if(l&&!Array.isArray(l)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};if(a&&a.root&&a.root.type)return{name:`${o}.root`,error:a.root};i.pop()}return{name:n}}s(wy,"schemaErrorLookup");var AP=s((e,t,n,r)=>{n(e);const i=Object.keys(e).filter(o=>o!=="name");return!i.length||r&&i.length>=Object.keys(t).length||i.find(o=>t[o]===(!r||fr.all))},"shouldRenderFormState"),IP=s((e,t,n)=>!e||!t||e===t||Wc(e).some(r=>r&&(n?r===t||r.startsWith(t+"."):r.startsWith(t)||t.startsWith(r))),"shouldSubscribeByName"),NP=s((e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,"skipValidation"),OP=s((e,t)=>{const n=re(e,t);!FS(n).length&&!(n!=null&&n.root)&&Tt(e,t)},"unsetEmptyArray"),DP={mode:fr.onSubmit,reValidateMode:fr.onChange,shouldFocusError:!0},Hf="form",RP=s((e,t)=>{for(const n in e)n in t||delete e[n];Object.assign(e,t)},"updateDirtyFields"),jS={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function LP(e={}){let t={...DP,...e},n={...ut(jS),isLoading:tn(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},i=bt(t.defaultValues)||bt(t.values)?ut(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:ut(i),l={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const c={},d={};let u=0,f=hc(t.mode),h=hc(t.reValidateMode);const g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...g};let v={...p};const _={array:Cy(),state:Cy()};let y=0;const x=t.criteriaMode===fr.all,C=s((k,O)=>N=>{clearTimeout(d[k]),d[k]=setTimeout(O,N)},"debounce"),b=s(async k=>{if(!l.keepIsValid&&!t.disabled&&(p.isValid||v.isValid||k)){const O=++y;let N;t.resolver?(N=Gt((await z()).errors),O===y&&T()):N=await le({fields:r,onlyCheckValid:!0,eventType:Mi.VALID}),O===y&&N!==n.isValid&&_.state.next({isValid:N})}},"_setValid"),T=s((k,O)=>{!t.disabled&&(p.isValidating||p.validatingFields||v.isValidating||v.validatingFields)&&((k||a.mount).forEach(N=>{N&&(O?et(n.validatingFields,N,O):Tt(n.validatingFields,N))}),_.state.next({validatingFields:n.validatingFields,isValidating:!Gt(n.validatingFields)}))},"_updateIsValidating"),M=s(()=>{n.dirtyFields=co(i,o,void 0,r)},"_updateDirtyFields"),S=s((k,O=[],N,K,J=!0,ue=!0)=>{if(K&&N&&!t.disabled){l.action=!0;const ae=re(r,k);if(l.actionArrayLengths.has(k)||l.actionArrayLengths.set(k,Array.isArray(ae)?ae.length:0),ue&&Array.isArray(ae)){const we=N(ae,K.argA,K.argB);J&&et(r,k,we)}const ce=re(n.errors,k);if(ue&&Array.isArray(ce)){const we=ce.root,ht=N(ce,K.argA,K.argB)||ce;we&&(ht.root=we),J&&et(n.errors,k,ht),OP(n.errors,k)}const be=re(n.touchedFields,k);if((p.touchedFields||v.touchedFields)&&ue&&Array.isArray(be)){const we=N(be,K.argA,K.argB);J&&et(n.touchedFields,k,we)}(p.dirtyFields||v.dirtyFields)&&M(),_.state.next({name:k,isDirty:X(k,O),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else et(o,k,O)},"_setFieldArray"),E=s((k,O)=>{et(n.errors,k,O),n.errors={...n.errors},_.state.next({errors:n.errors})},"updateErrors"),A=s(k=>{n.errors=k,_.state.next({errors:n.errors,isValid:!1})},"_setErrors"),D=s(k=>{const O=Do(k)?[k]:Oo(k);let N=o,K=i;for(let J=0;J<O.length-1;J++){const ue=O[J];if(N=Ht(N)?N:N[ue],K=Ht(K)?K:K[ue],N===null&&K!==null)return!0}return!1},"hasExplicitNullIntermediate"),L=s(k=>{if(!l.actionArrayLengths.size)return!1;const O=Do(k)?[k]:Oo(k);let N=o,K="",J=-1,ue=0;for(let ae=0;ae<O.length;ae++){if(Ht(N))return!1;const ce=O[ae];if(K=K?`${K}.${ce}`:ce,Array.isArray(N)&&+ce>=N.length)return J===-1?!1:ae===J?+ce<ue:!0;l.actionArrayLengths.has(K)&&(J=ae+1,ue=l.actionArrayLengths.get(K)),N=N[ce]}return!1},"isStaleArrayIndex"),G=s((k,O,N,K)=>{const J=re(r,k);if(J){if(D(k)||L(k))return;const ue=Je(re(o,k)),ae=re(o,k,Je(N)?re(i,k):N);Je(ae)||K&&K.defaultChecked||O?et(o,k,O?ae:Ty(J._f)):ge(k,ae),l.mount&&!l.action&&(b(),ue&&n.isDirty&&(p.isDirty||v.isDirty)&&(X()||(n.isDirty=!1,_.state.next({...n}))),e.shouldUnregister&&ue&&!Je(re(o,k))&&Vf(k,a)&&(l.watch=!0))}},"updateValidAndValue"),$=s((k,O,N,K,J)=>{let ue=!1,ae=!1;const ce={name:k};if(!t.disabled||K===!0){if(!N||K){const be=mn(re(i,k),O);(p.isDirty||v.isDirty)&&(ae=n.isDirty,n.isDirty=ce.isDirty=!be||X(),ue=ae!==ce.isDirty),ae=!!re(n.dirtyFields,k),be!==n.isDirty?RP(n.dirtyFields,co(i,o,void 0,r)):be?Tt(n.dirtyFields,k):et(n.dirtyFields,k,!0),ce.dirtyFields=n.dirtyFields,ue=ue||(p.dirtyFields||v.dirtyFields)&&ae!==!be}if(N){const be=re(n.touchedFields,k);be||(et(n.touchedFields,k,N),ce.touchedFields=n.touchedFields,ue=ue||(p.touchedFields||v.touchedFields)&&be!==N)}ue&&J&&_.state.next(ce)}return ue?ce:{}},"updateTouchAndDirty"),W=s((k,O,N,K)=>{const J=re(n.errors,k),ue=(p.isValid||v.isValid)&&An(O)&&n.isValid!==O;if(t.delayError&&N?(c[k]=C(k,()=>E(k,N)),c[k](t.delayError)):(clearTimeout(d[k]),delete c[k],N?et(n.errors,k,N):Tt(n.errors,k),n.errors={...n.errors}),(N?!mn(J,N):J)||!Gt(K)||ue){const ae={...K,...ue&&An(O)?{isValid:O}:{},errors:n.errors,name:k};_.state.next(ae)}},"shouldRenderByError"),z=s(async k=>(T(k,!0),await t.resolver(o,t.context,wP(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),"_runSchema"),me=s(async k=>{const{errors:O}=await z(k);if(T(k),k){for(const N of k){const K=re(O,N);K?a.array.has(N)&&bt(K)&&!Object.keys(K).some(J=>!Number.isNaN(Number(J)))?py(n.errors,{[N]:K},N):et(n.errors,N,K):Tt(n.errors,N)}n.errors={...n.errors}}else n.errors=O;return O},"executeSchemaAndUpdateState"),q=s(async({name:k,eventType:O})=>{if(e.validate){const N=await e.validate({formValues:o,formState:n,name:k,eventType:O});if(bt(N))for(const K in N){const J=N[K];J&&Et(`${Hf}.${K}`,{message:Kt(J.message)?J.message:"",type:J.type||ur.validate})}else Kt(N)||!N?Et(Hf,{message:N||"",type:ur.validate}):at(Hf);return N}return!0},"validateForm"),le=s(async({fields:k,onlyCheckValid:O,name:N,eventType:K,context:J={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(J.runRootValidation=!0,!await q({name:N,eventType:K})&&(J.valid=!1,O)))return J.valid;for(const ue in k){const ae=k[ue];if(ae){const{_f:ce,...be}=ae;if(ce){const we=a.array.has(ce.name),ht=ae._f&&kP(ae._f),zr=p.validatingFields||p.isValidating||v.validatingFields||v.isValidating;ht&&zr&&T([ce.name],!0);const jr=await xy(ae,a.disabled,o,x,t.shouldUseNativeValidation&&!O,we);if(ht&&zr&&T([ce.name]),jr[ce.name]&&(J.valid=!1,O)||(!O&&(re(jr,ce.name)?we?py(n.errors,jr,ce.name):et(n.errors,ce.name,jr[ce.name]):Tt(n.errors,ce.name)),e.shouldUseNativeValidation&&jr[ce.name]))break}!Gt(be)&&await le({context:J,onlyCheckValid:O,fields:be,name:ue,eventType:K})}}return J.valid},"executeBuiltInValidation"),ye=s(()=>{for(const k of a.unMount){const O=re(r,k);O&&(O._f.refs?O._f.refs.every(N=>!Bf(N)):!Bf(O._f.ref))&&Nt(k)}a.unMount=new Set},"_removeUnmounted"),X=s((k,O)=>(k&&O&&et(o,k,O),!mn(l.mount?o:i,i)),"_getDirty"),ne=s((k,O,N)=>Ng(k,a,{...l.mount?o:Je(O)||Kt(k)?i:O},N,O),"_getWatch"),he=s(k=>FS(re(l.mount?o:i,k,t.shouldUnregister?re(i,k,[]):[])),"_getFieldArray"),ge=s((k,O,N={},K=!1,J=!1,ue=!1)=>{const ae=re(r,k);let ce=O;if(ae){const be=ae._f;be&&(!be.disabled&&et(o,k,zS(O,be)),ce=Bu(be.ref)&&Ht(O)?"":O,BS(be.ref)?[...be.ref.options].forEach(we=>we.selected=ce.includes(we.value)):be.refs?Ja(be.ref)?be.refs.forEach(we=>{(!we.defaultChecked||!we.disabled)&&(Array.isArray(ce)?we.checked=!!ce.find(ht=>ht===we.value):we.checked=ce===we.value||!!ce)}):be.refs.forEach(we=>we.checked=we.value===ce):Zd(be.ref)?be.ref.value="":(be.ref.value=ce,!be.ref.type&&!J&&!ue&&_.state.next({name:k,values:K?o:ut(o)})))}(N.shouldDirty||N.shouldTouch)&&$(k,ce,N.shouldTouch,N.shouldDirty,!J),N.shouldValidate&&Ge(k,{delayError:N.delayError})},"setFieldValue"),se=s((k,O,N,K=!1,J=!1,ue=!1)=>{a.array.has(k)&&_.array.next({name:k,values:K?o:ut(o)});for(const ae in O){if(!O.hasOwnProperty(ae))continue;const ce=O[ae],be=k+"."+ae,we=re(r,be);(a.array.has(k)||bt(ce)||we&&!we._f)&&!Di(ce)?se(be,ce,N,K,J,ue):ge(be,ce,N,K,J,ue)}},"setFieldValues"),Z=s((k,O,N,K,J=!1)=>{const ue=re(r,k),ae=a.array.has(k),ce=K?O:ut(O),be=mn(re(o,k),ce);if(be||et(o,k,ce),ae)_.array.next({name:k,values:K?o:ut(o)}),(p.isDirty||p.dirtyFields||v.isDirty||v.dirtyFields)&&N.shouldDirty&&(M(),J||_.state.next({name:k,dirtyFields:n.dirtyFields,isDirty:X(k,ce)}));else{const we=Array.isArray(ce)&&!ce.length||Gt(ce),ht=!be&&!J;!ue||ue._f||Ht(ce)||we?ge(k,ce,N,K,J,ht):se(k,ce,N,K,J,ht)}if(!be&&!J){const we=Vf(k,a),ht=K?o:ut(o);if(_.state.next({...we&&n,name:l.mount||we?k:void 0,values:ht}),!ae)for(const zr of SP(a.array,k))_.state.next({name:zr,values:ht})}},"_setValue"),ee=s((k,O,N={})=>Z(k,O,N,!1),"setValue"),pe=s((k,O={})=>{const N=tn(k)?k(o):k;if(!mn(o,N)){o={...o,...N};for(const K of a.mount)bP(N,K)&&Z(K,re(N,K),O,!0,!0);_.state.next({...n,name:void 0,type:void 0,...u?{values:o}:{}}),O.shouldValidate&&b()}},"setValues"),De=s(async k=>{l.mount=!0;const O=k.target;let N=O.name,K=!0;const J=re(r,N),ue=s(ae=>{K=Number.isNaN(ae)||Di(ae)&&isNaN(ae.getTime())||mn(ae,re(o,N,ae))},"_updateIsFieldValueUpdated");if(J){let ae,ce;const be=O.type?Ty(J._f):Ag(k),we=k.type===Mi.BLUR||k.type===Mi.FOCUS_OUT,ht=!MP(J._f)&&!e.validate&&!t.resolver&&!re(n.errors,N)&&!J._f.deps,zr=ht||NP(we,re(n.touchedFields,N),n.isSubmitted,h,f),jr=Vf(N,a,we);if(et(o,N,ut(be)),we){if(!O||!O.readOnly){J._f.onBlur&&J._f.onBlur(k);const qs=c[N];qs&&qs(0)}}else J._f.onChange&&J._f.onChange(k);const Gs=$(N,be,we),Vk=!Gt(Gs)||jr;if(!we&&_.state.next({name:N,type:k.type,...u?{values:ut(o)}:{}}),zr)return(!ht||!n.isValid)&&(p.isValid||v.isValid)&&(t.mode==="onBlur"?we&&b():we||b()),Vk&&_.state.next({name:N,...jr?{}:Gs});if(!t.resolver&&e.validate&&await q({name:N,eventType:k.type}),!we&&jr&&_.state.next({...n}),t.resolver){const{errors:qs}=await z([N]);if(T([N]),ue(be),!K){!Gt(Gs)&&_.state.next(Gs);return}const Bk=wy(n.errors,r,N),h0=wy(qs,r,Bk.name||N);ae=h0.error,N=h0.name,ce=Gt(qs)}else T([N],!0),ae=(await xy(J,a.disabled,o,x,t.shouldUseNativeValidation))[N],T([N]),ue(be),K&&(ae?ce=!1:(p.isValid||v.isValid)&&(ce=await le({fields:r,onlyCheckValid:!0,name:N,eventType:k.type})));K&&(J._f.deps&&(!Array.isArray(J._f.deps)||J._f.deps.length>0)&&Ge(J._f.deps),W(N,ce,ae,Gs))}},"onChange"),Ae=s((k,O)=>{if(re(n.errors,O)&&k.focus)return k.focus(),1},"_focusInput"),Ge=s(async(k,O={})=>{let N,K;const J=Wc(k);if(t.resolver){const ue=await me(Je(k)?k:J);N=Gt(ue),K=k?!J.some(ae=>re(ue,ae)):N}else k?(K=(await Promise.all(J.map(async ue=>{const ae=re(r,ue);return await le({fields:ae&&ae._f?{[ue]:ae}:ae,eventType:Mi.TRIGGER})}))).every(Boolean),!(!K&&!n.isValid)&&b()):K=N=await le({fields:r,name:k,eventType:Mi.TRIGGER});if(O.delayError&&t.delayError&&Kt(k)){const ue=re(n.errors,k);ue?(Tt(n.errors,k),c[k]=C(k,()=>E(k,ue)),c[k](t.delayError)):(clearTimeout(d[k]),delete c[k])}if(O.shouldTouch)for(const ue of k?J:a.mount)!a.array.has(ue)&&et(n.touchedFields,ue,!0);return _.state.next({...!Kt(k)||(p.isValid||v.isValid)&&N!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:N}:{},...O.shouldTouch&&(p.touchedFields||v.touchedFields)?{touchedFields:n.touchedFields}:{},errors:n.errors}),O.shouldFocus&&!K&&Il(r,Ae,k?J:a.mount),K},"trigger"),Pe=s((k,O)=>{let N={...l.mount?o:i};return O&&(N=VS(O.dirtyFields?n.dirtyFields:n.touchedFields,N)),Je(k)?N:Kt(k)?re(N,k):k.map(K=>re(N,K))},"getValues"),lt=s(k=>Je(k)?{...n.errors}:Kt(k)?re(n.errors,k):k.map(O=>re(n.errors,O)),"getErrors"),Ye=s((k,O)=>{const N=O||n,K=re(N.errors,k);return{invalid:!!K,isDirty:!!re(N.dirtyFields,k),error:K,isValidating:!!re(n.validatingFields,k),isTouched:!!re(N.touchedFields,k)}},"getFieldState"),at=s(k=>{const O=k?Wc(k):void 0;O?.forEach(N=>Tt(n.errors,N)),O?O.forEach(N=>{_.state.next({name:N,errors:n.errors})}):(n.errors={},_.state.next({errors:n.errors}))},"clearErrors"),Et=s((k,O,N)=>{const K=(re(r,k,{_f:{}})._f||{}).ref,{ref:J,message:ue,type:ae,...ce}=re(n.errors,k)||{};et(n.errors,k,{...ce,...O,ref:K}),_.state.next({name:k,errors:n.errors,isValid:!1}),N&&N.shouldFocus&&K&&K.focus&&K.focus()},"setError"),yt=s((k,O)=>{if(tn(k)){u++;const{unsubscribe:N}=_.state.subscribe({next:s(J=>"values"in J&&k(J.values||ne(void 0,O),J),"next")});let K=!1;return{unsubscribe:s(()=>{K||(K=!0,u--,N())},"unsubscribe")}}return ne(k,O,!0)},"watch"),Pt=s(k=>{var O;const N=!!(!((O=k.formState)===null||O===void 0)&&O.values);N&&u++;const{unsubscribe:K}=_.state.subscribe({next:s(ue=>{if(IP(k.name,ue.name,k.exact)&&AP(ue,k.formState||p,R,k.reRenderRoot)){const ae={...o};k.callback({values:ae,...n,...ue,defaultValues:i})}},"next")});if(!N)return K;let J=!1;return()=>{J||(J=!0,u--,K())}},"_subscribe"),ze=s(k=>(l.mount=!0,v={...v,...k.formState},Pt({...k,formState:{...g,...k.formState}})),"subscribe"),Nt=s((k,O={})=>{for(const N of k?Wc(k):a.mount)a.mount.delete(N),a.array.delete(N),O.keepValue||(Tt(r,N),Tt(o,N)),!O.keepError&&Tt(n.errors,N),!O.keepDirty&&Tt(n.dirtyFields,N),!O.keepTouched&&Tt(n.touchedFields,N),!O.keepIsValidating&&Tt(n.validatingFields,N),!t.shouldUnregister&&!O.keepDefaultValue&&Tt(i,N);u&&_.state.next({values:ut(o)}),_.state.next({...n,...O.keepDirty?{}:{isDirty:X()}}),!O.keepIsValid&&b()},"unregister"),Ft=s(({disabled:k,name:O})=>{if(An(k)&&l.mount||k||a.disabled.has(O)){const N=a.disabled.has(O)!==!!k;k?a.disabled.add(O):a.disabled.delete(O),N&&l.mount&&!l.action&&b()}},"_setDisabledField"),it=s((k,O={})=>{let N=re(r,k);const K=An(O.disabled)||An(t.disabled),J=!a.registerName.has(k)&&N&&N._f&&!N._f.mount;return et(r,k,{...N||{},_f:{...N&&N._f?N._f:{ref:{name:k}},name:k,mount:!0,...O}}),a.mount.add(k),N&&!J?Ft({disabled:An(O.disabled)?O.disabled:t.disabled,name:k}):G(k,!0,O.value),{...K?{disabled:O.disabled||t.disabled}:{},...t.progressive?{required:!!O.required,min:ol(O.min),max:ol(O.max),minLength:ol(O.minLength),maxLength:ol(O.maxLength),pattern:ol(O.pattern)}:{},name:k,onChange:De,onBlur:De,ref:s(ue=>{if(ue){a.registerName.add(k),it(k,O),a.registerName.delete(k),N=re(r,k);const ae=Je(ue.value)&&ue.querySelectorAll&&ue.querySelectorAll("input,select,textarea")[0]||ue,ce=EP(ae),be=N._f.refs||[];if(ce?be.find(ht=>ht===ae):ae===N._f.ref)return;const we={...N._f};ce?(we.refs=[...be.filter(Bf),ae,...Array.isArray(re(i,k))?[{}]:[]],we.ref={type:ae.type,name:k}):(we.ref=ae,delete we.refs),et(r,k,{_f:we}),G(k,!1,void 0,ae)}else N=re(r,k,{}),N._f&&(N._f.mount=!1),(t.shouldUnregister||O.shouldUnregister)&&!(OS(a.array,k)&&l.action)&&a.unMount.add(k)},"ref")}},"register"),Xt=s(()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&Il(r,Ae,a.mount),"_focusError"),kn=s(k=>{An(k)&&(_.state.next({disabled:k}),Il(r,(O,N)=>{const K=re(r,N);K&&(O.disabled=K._f.disabled||k,Array.isArray(K._f.refs)&&K._f.refs.forEach(J=>{J.disabled=K._f.disabled||k}))},0,!1))},"_disableForm"),Le=s((k,O)=>async N=>{let K,J;N&&(N.preventDefault&&N.preventDefault(),N.persist&&N.persist());let ue=ut(o);if(_.state.next({isSubmitting:!0}),t.resolver){const{errors:ae,values:ce}=await z();T(),n.errors=ae,ue=ut(ce)}else await le({fields:r,eventType:Mi.SUBMIT});if(a.disabled.size)for(const ae of a.disabled)Tt(ue,ae);if(Tt(n.errors,DS),Gt(n.errors)){_.state.next({errors:{}});try{K=await k(ue,N)}catch(ae){J=ae}}else O&&await O({...n.errors},N),Xt(),setTimeout(Xt);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Gt(n.errors)&&!J,submitCount:n.submitCount+1,errors:n.errors}),J)throw J;return K},"handleSubmit"),ln=s((k,O={})=>{re(r,k)&&(Je(O.defaultValue)?ee(k,ut(re(i,k))):(ee(k,O.defaultValue),et(i,k,ut(O.defaultValue))),O.keepTouched||Tt(n.touchedFields,k),O.keepDirty||(Tt(n.dirtyFields,k),n.isDirty=O.defaultValue?X(k,ut(re(i,k))):X()),O.keepError||(Tt(n.errors,k),b()),_.state.next({...n}))},"resetField"),Vn=s((k,O={})=>{const N=k?ut(k):i,K=ut(N),J=Gt(k),ue=K,ae=r;if(O.keepDefaultValues||(i=N),!O.keepValues){if(O.keepDirtyValues){const ce=new Set([...a.mount,...HS(co(i,o,void 0,ae),n.dirtyFields)]);for(const be of ce){const we=re(n.dirtyFields,be),ht=re(o,be),zr=re(ue,be);we&&!Je(ht)?et(ue,be,ht):!we&&!Je(zr)&&ee(be,zr)}}else{if(Yd&&Je(k))for(const ce of a.mount){const be=re(r,ce);if(be&&be._f){const we=Array.isArray(be._f.refs)?be._f.refs[0]:be._f.ref;if(Bu(we)){const ht=we.closest("form");if(ht){ht.reset();break}}}}if(O.keepFieldsRef)for(const ce of a.mount)ee(ce,re(ue,ce));else r={}}if(t.shouldUnregister){if(o=O.keepDefaultValues?ut(i):{},O.keepFieldsRef)for(const ce of a.mount)et(o,ce,re(ue,ce))}else o=ut(ue);_.array.next({values:{...ue}}),_.state.next({name:void 0,type:void 0,values:{...ue}})}a={mount:O.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!p.isValid||!!O.keepIsValid||!!O.keepDirtyValues||!t.shouldUnregister&&!Gt(ue),l.watch=!!t.shouldUnregister,l.keepIsValid=!!O.keepIsValid,l.action=!1,l.actionArrayLengths.clear(),O.keepErrors||(n.errors={}),_.state.next({submitCount:O.keepSubmitCount?n.submitCount:0,isDirty:J?!1:O.keepDirty?n.isDirty:O.keepValues?X():!!(O.keepDefaultValues&&!mn(k,i)),isSubmitted:O.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:J?{}:O.keepDirtyValues?O.keepDefaultValues&&o?co(i,o,void 0,ae):n.dirtyFields:O.keepDefaultValues&&k?co(i,k,void 0,ae):O.keepDirty?n.dirtyFields:{},touchedFields:O.keepTouched?n.touchedFields:{},errors:O.keepErrors?n.errors:{},isSubmitSuccessful:O.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},"_reset"),je=s((k,O)=>Vn(tn(k)?k(o):k,{...t.resetOptions,...O}),"reset"),I=s((k,O={})=>{const N=re(r,k),K=N&&N._f;if(K){const J=K.refs?K.refs[0]:K.ref;J.focus&&setTimeout(()=>{J.focus(),O.shouldSelect&&tn(J.select)&&J.select()})}},"setFocus"),R=s(k=>{const{name:O,type:N,values:K,...J}=k;n={...n,...J}},"_setFormState");_.state.subscribe({next:R});const Fe={control:{register:it,unregister:Nt,getFieldState:Ye,handleSubmit:Le,setError:Et,_subscribe:Pt,_runSchema:z,_updateIsValidating:T,_focusError:Xt,_getWatch:ne,_getDirty:X,_setValid:b,_setFieldArray:S,_setDisabledField:Ft,_setErrors:A,_getFieldArray:he,_reset:Vn,_resetDefaultValues:s(()=>tn(t.defaultValues)&&t.defaultValues().then(k=>{je(k,t.resetOptions),_.state.next({isLoading:!1})}),"_resetDefaultValues"),_removeUnmounted:ye,_disableForm:kn,_subjects:_,_proxyFormState:p,get _fields(){return r},get _formValues(){return o},get _state(){return l},set _state(k){l=k},get _defaultValues(){return i},get _names(){return a},set _names(k){a=k},get _formState(){return n},get _options(){return t},set _options(k){t={...t,...k},f=hc(t.mode),h=hc(t.reValidateMode)}},subscribe:ze,trigger:Ge,register:it,handleSubmit:Le,watch:yt,setValue:ee,setValues:pe,getValues:Pe,getErrors:lt,reset:je,resetField:ln,resetDefaultValues:s((k,O={})=>{if(i=ut(k),!O.keepDirty){const N=co(i,o,void 0,r);n.dirtyFields=N,n.isDirty=!Gt(N)}O.keepIsValid||b(),_.state.next({...n,defaultValues:i})},"resetDefaultValues"),clearErrors:at,unregister:Nt,setError:Et,setFocus:I,getFieldState:Ye};return{...Fe,formControl:Fe}}s(LP,"createFormControl");function JS(e={}){const t=m.useRef(void 0),n=m.useRef(void 0),r=m.useRef(e.formControl),[i,o]=m.useState(()=>({...ut(jS),isLoading:tn(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:tn(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl)if(r.current=e.formControl,e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!tn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:d,...u}=LP(e);t.current={...u,formState:i}}const l=t.current.control;l._options=e;const{resyncIfNeeded:a,snapshot:c}=n1();return t1(()=>{const d=s(()=>({...l._formState,defaultValues:l._defaultValues}),"getCurrentFormState");a(!0,d,o);const u=l._subscribe({formState:l._proxyFormState,callback:s(()=>o({...l._formState,defaultValues:l._defaultValues}),"callback"),reRenderRoot:!0});return o(f=>({...f,isReady:!0})),l._formState.isReady=!0,()=>{u(),c(!0,d)}},[l,a,c]),m.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),m.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),m.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),m.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),m.useEffect(()=>{if(l._proxyFormState.isDirty){const d=l._getDirty();d!==i.isDirty&&l._subjects.state.next({isDirty:d})}},[l,i.isDirty]),m.useEffect(()=>{var d;e.values&&!mn(e.values,n.current)?(l._reset(e.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((d=l._options.resetOptions)===null||d===void 0)&&d.keepIsValid||l._setValid(),n.current=e.values,o(u=>({...u}))):l._resetDefaultValues()},[l,e.values]),m.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),t.current.formState=m.useMemo(()=>LS(i,l),[l,i]),t.current}s(JS,"useForm");function Or(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}s(Or,"_objectWithoutPropertiesLoose");function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$e.apply(null,arguments)}s($e,"_extends");var $P=Is(((e,t)=>{var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n})),PP=Is(((e,t)=>{var n=$P();function r(){}s(r,"emptyFunction");function i(){}s(i,"emptyFunctionWithReset"),i.resetWarningCache=r,t.exports=function(){function o(c,d,u,f,h,g){if(g!==n){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}s(o,"shim"),o.isRequired=o;function l(){return o}s(l,"getShim");var a={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:l,element:o,elementType:o,instanceOf:l,node:o,objectOf:l,oneOf:l,oneOfType:l,shape:l,exact:l,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),FP=Is(((e,t)=>{t.exports=PP()()})),VP=Is((e=>{var t=60103,n=60106,r=60107,i=60108,o=60114,l=60109,a=60110,c=60112,d=60113,u=60120,f=60115,h=60116,g=60121,p=60122,v=60117,_=60129,y=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;t=x("react.element"),n=x("react.portal"),r=x("react.fragment"),i=x("react.strict_mode"),o=x("react.profiler"),l=x("react.provider"),a=x("react.context"),c=x("react.forward_ref"),d=x("react.suspense"),u=x("react.suspense_list"),f=x("react.memo"),h=x("react.lazy"),g=x("react.block"),p=x("react.server.block"),v=x("react.fundamental"),_=x("react.debug_trace_mode"),y=x("react.legacy_hidden")}})),BP=Is(((e,t)=>{t.exports=VP()})),ky=s(e=>typeof e=="object"&&e!=null&&e.nodeType===1,"e"),My=s((e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip","t"),Kf=s((e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return My(n.overflowY,t)||My(n.overflowX,t)||(r=>{let i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},"n"),gc=s((e,t,n,r,i,o,l,a)=>o<e&&l>t||o>e&&l<t?0:o<=e&&a<=n||l>=t&&a>=n?o-e-r:l>t&&a<n||o<e&&a>n?l-t+i:0,"l"),HP=s(e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)},"i$1"),KP=s((e,t)=>{var n,r,i,o,l,a;if(typeof document>"u")return[];let{scrollMode:c,block:d,inline:u,boundary:f,skipOverflowHiddenElements:h}=t,g=typeof f=="function"?f:W=>W!==f;if(!ky(e))throw new TypeError("Invalid target");let p=document.scrollingElement||document.documentElement,v=[],_=e;for(;ky(_)&&g(_);){if(_=HP(_),_===p){v.push(_);break}_!=null&&_===document.body&&Kf(_)&&!Kf(document.documentElement)||_!=null&&Kf(_,h)&&v.push(_)}let y=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,x=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,C=(l=window.scrollX)!=null?l:pageXOffset,b=(a=window.scrollY)!=null?a:pageYOffset,{height:T,width:M,top:S,right:E,bottom:A,left:D}=e.getBoundingClientRect(),L=d==="start"||d==="nearest"?S:d==="end"?A:S+T/2,G=u==="center"?D+M/2:u==="end"?E:D,$=[];for(let W=0;W<v.length;W++){let z=v[W],{height:me,width:q,top:le,right:ye,bottom:X,left:ne}=z.getBoundingClientRect();if(c==="if-needed"&&S>=0&&D>=0&&A<=x&&E<=y&&S>=le&&A<=X&&D>=ne&&E<=ye)return $;let he=getComputedStyle(z),ge=parseInt(he.borderLeftWidth,10),se=parseInt(he.borderTopWidth,10),Z=parseInt(he.borderRightWidth,10),ee=parseInt(he.borderBottomWidth,10),pe=0,De=0,Ae="offsetWidth"in z?z.offsetWidth-z.clientWidth-ge-Z:0,Ge="offsetHeight"in z?z.offsetHeight-z.clientHeight-se-ee:0,Pe="offsetWidth"in z?z.offsetWidth===0?0:q/z.offsetWidth:0,lt="offsetHeight"in z?z.offsetHeight===0?0:me/z.offsetHeight:0;if(p===z)pe=d==="start"?L:d==="end"?L-x:d==="nearest"?gc(b,b+x,x,se,ee,b+L,b+L+T,T):L-x/2,De=u==="start"?G:u==="center"?G-y/2:u==="end"?G-y:gc(C,C+y,y,ge,Z,C+G,C+G+M,M),pe=Math.max(0,pe+b),De=Math.max(0,De+C);else{pe=d==="start"?L-le-se:d==="end"?L-X+ee+Ge:d==="nearest"?gc(le,X,me,se,ee+Ge,L,L+T,T):L-(le+me/2)+Ge/2,De=u==="start"?G-ne-ge:u==="center"?G-(ne+q/2)+Ae/2:u==="end"?G-ye+Z+Ae:gc(ne,ye,q,ge,Z+Ae,G,G+M,M);let{scrollLeft:Ye,scrollTop:at}=z;pe=Math.max(0,Math.min(at+pe/lt,z.scrollHeight-me/lt+Ge)),De=Math.max(0,Math.min(Ye+De/Pe,z.scrollWidth-q/Pe+Ae)),L+=at-pe,G+=Ye-De}$.push({el:z,top:pe,left:De})}return $},"o"),te=va(FP()),Vj=BP(),UP=0;function Ga(){}s(Ga,"noop");function WP(e,t){e&&KP(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach(function(n){var r=n.el,i=n.top,o=n.left;r.scrollTop=i,r.scrollLeft=o})}s(WP,"scrollIntoView$1");function Ay(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}s(Ay,"isOrContainsNode");function i1(e,t){var n;function r(){n&&clearTimeout(n)}s(r,"cancel");function i(){for(var o=arguments.length,l=new Array(o),a=0;a<o;a++)l[a]=arguments[a];r(),n=setTimeout(function(){n=null,e.apply(void 0,l)},t)}return s(i,"wrapper"),i.cancel=r,i}s(i1,"debounce");function Ot(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),l=1;l<i;l++)o[l-1]=arguments[l];return t.some(function(a){return a&&a.apply(void 0,[r].concat(o)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}s(Ot,"callAllEventHandlers");function ni(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}s(ni,"handleRefs");function zP(){return String(UP++)}s(zP,"generateId");function jP(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}s(jP,"getA11yStatusMessage$1");function Ku(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=GS(t,r)?t[r]:e[r],n},{})}s(Ku,"getState");function GS(e,t){return e[t]!==void 0}s(GS,"isControlledProp");function Uu(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}s(Uu,"normalizeArrowKey");function Ri(e,t,n,r,i){if(i===void 0&&(i=!0),n===0)return-1;var o=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:o+1);var l=t+e;l<0?l=i?o:0:l>o&&(l=i?0:o);var a=Ro(e,l,n,r,i);return a===-1?t>=n?-1:t:a}s(Ri,"getNextWrappingIndex");function Ro(e,t,n,r,i){var o=r(t);if(!o||!o.hasAttribute("disabled"))return t;if(e>0){for(var l=t+1;l<n;l++)if(!r(l).hasAttribute("disabled"))return l}else for(var a=t-1;a>=0;a--)if(!r(a).hasAttribute("disabled"))return a;return i?e>0?Ro(1,0,n,r,!1):Ro(-1,n-1,n,r,!1):-1}s(Ro,"getNextNonDisabledIndex");function Iy(e,t,n,r){return r===void 0&&(r=!0),t.some(function(i){return i&&(Ay(i,e,n)||r&&Ay(i,n.document.activeElement,n))})}s(Iy,"targetWithinDownshift");var JP=i1(function(e){ZS(e).textContent=""},500);function qS(e,t){var n=ZS(t);e&&(n.textContent=e,JP(t))}s(qS,"setStatus");function ZS(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}s(ZS,"getStatusDiv");var GP=["isInitialMount","highlightedIndex","items","environment"],YS={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function qP(e,t,n){var r=e.props,i=e.type,o={};Object.keys(t).forEach(function(l){ZP(l,e,t,n),n[l]!==t[l]&&(o[l]=n[l])}),r.onStateChange&&Object.keys(o).length&&r.onStateChange($e({type:i},o))}s(qP,"callOnChangeProps");function ZP(e,t,n,r){var i=t.props,o=t.type,l="on"+s1(e)+"Change";i[l]&&r[e]!==void 0&&r[e]!==n[e]&&i[l]($e({type:o},r))}s(ZP,"invokeOnChangeHandler");function YP(e,t){return t.changes}s(YP,"stateReducer");function XP(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}s(XP,"getA11ySelectionMessage");var QP=i1(function(e,t){qS(e(),t)},200),eF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?m.useLayoutEffect:m.useEffect;function XS(e){var t=e.id,n=t===void 0?"downshift-"+zP():t,r=e.labelId,i=e.menuId,o=e.getItemId,l=e.toggleButtonId,a=e.inputId;return(0,m.useRef)({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:o||function(c){return n+"-item-"+c},toggleButtonId:l||n+"-toggle-button",inputId:a||n+"-input"}).current}s(XS,"useElementIds");function o1(e,t,n,r){var i,o;if(e===void 0){if(t===void 0)throw new Error(r);i=n[t],o=t}else o=t===void 0?n.indexOf(e):t,i=e;return[i,o]}s(o1,"getItemAndIndex");function tF(e){return e?String(e):""}s(tF,"itemToString");function nF(e){return/^\S{1}$/.test(e)}s(nF,"isAcceptedCharacterKey");function s1(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}s(s1,"capitalizeString");function Xd(e){var t=(0,m.useRef)(e);return t.current=e,t}s(Xd,"useLatestRef");function QS(e,t,n){var r=(0,m.useRef)(),i=(0,m.useRef)(),o=(0,m.useCallback)(function(h,g){i.current=g,h=Ku(h,g.props);var p=e(h,g);return g.props.stateReducer(h,$e({},g,{changes:p}))},[e]),l=(0,m.useReducer)(o,t),a=l[0],c=l[1],d=Xd(n),u=(0,m.useCallback)(function(h){return c($e({props:d.current},h))},[d]),f=i.current;return(0,m.useEffect)(function(){f&&r.current&&r.current!==a&&qP(f,Ku(r.current,f.props),a),r.current=a},[a,n,f]),[a,u]}s(QS,"useEnhancedReducer");function ew(e,t,n){var r=QS(e,t,n),i=r[0],o=r[1];return[Ku(i,n),o]}s(ew,"useControlledReducer$1");var Nl={itemToString:tF,stateReducer:YP,getA11ySelectionMessage:XP,scrollIntoView:WP,environment:typeof window>"u"?{}:window};function Dn(e,t,n){n===void 0&&(n=YS);var r=e["default"+s1(t)];return r!==void 0?r:n[t]}s(Dn,"getDefaultValue$1");function ul(e,t,n){n===void 0&&(n=YS);var r=e[t];if(r!==void 0)return r;var i=e["initial"+s1(t)];return i!==void 0?i:Dn(e,t,n)}s(ul,"getInitialValue$1");function tw(e){var t=ul(e,"selectedItem"),n=ul(e,"isOpen"),r=ul(e,"highlightedIndex"),i=ul(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}s(tw,"getInitialState$2");function xo(e,t,n){var r=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,l=t.selectedItem,a=t.highlightedIndex;return r.length===0?-1:i!==void 0&&a===i?i:o!==void 0?o:l?r.indexOf(l):n===0?-1:n<0?r.length-1:0}s(xo,"getHighlightedIndexOnOpen");function nw(e,t,n,r){var i=(0,m.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,m.useEffect)(function(){if(n?.addEventListener!=null){var o=s(function(){i.current.isMouseDown=!0},"onMouseDown"),l=s(function(f){i.current.isMouseDown=!1,e&&!Iy(f.target,t.map(function(h){return h.current}),n)&&r()},"onMouseUp"),a=s(function(){i.current.isTouchMove=!1},"onTouchStart"),c=s(function(){i.current.isTouchMove=!0},"onTouchMove"),d=s(function(f){e&&!i.current.isTouchMove&&!Iy(f.target,t.map(function(h){return h.current}),n,!1)&&r()},"onTouchEnd");return n.addEventListener("mousedown",o),n.addEventListener("mouseup",l),n.addEventListener("touchstart",a),n.addEventListener("touchmove",c),n.addEventListener("touchend",d),s(function(){n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",l),n.removeEventListener("touchstart",a),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",d)},"cleanup")}},[e,n]),i}s(nw,"useMouseAndTouchTracker");var l1=s(function(){return Ga},"useGetterPropsCalledChecker");function Wu(e,t,n){var r=n.isInitialMount,i=n.highlightedIndex,o=n.items,l=n.environment,a=Or(n,GP);(0,m.useEffect)(function(){r||QP(function(){return e($e({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length},a))},l.document)},t)}s(Wu,"useA11yMessageSetter");function rw(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,l=e.scrollIntoView,a=(0,m.useRef)(!0);return eF(function(){t<0||!n||!Object.keys(r.current).length||(a.current===!1?a.current=!0:l(i(t),o))},[t]),a}s(rw,"useScrollIntoView");var a1=Ga;function zu(e,t,n){var r;n===void 0&&(n=!0);var i=((r=e.items)==null?void 0:r.length)&&t>=0;return $e({isOpen:!1,highlightedIndex:-1},i&&$e({selectedItem:e.items[t],isOpen:Dn(e,"isOpen"),highlightedIndex:Dn(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}s(zu,"getChangesOnSelection");function iw(e,t,n){var r=t.type,i=t.props,o;switch(r){case n.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:o={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:xo(i,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:xo(i,e,0)};break;case n.FunctionCloseMenu:o={isOpen:!1};break;case n.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:o={inputValue:t.inputValue};break;case n.FunctionReset:o={highlightedIndex:Dn(i,"highlightedIndex"),isOpen:Dn(i,"isOpen"),selectedItem:Dn(i,"selectedItem"),inputValue:Dn(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return $e({},e,o)}s(iw,"downshiftCommonReducer");function rF(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,i=e.itemToString,o=e.getItemNodeFromIndex,l=t.toLowerCase(),a=0;a<r.length;a++){var c=(a+n+(t.length<2?1:0))%r.length,d=r[c];if(d!==void 0&&i(d).toLowerCase().startsWith(l)){var u=o(c);if(!u?.hasAttribute("disabled"))return c}}return n}s(rF,"getItemIndexByCharacterKey");te.default.array.isRequired,te.default.func,te.default.func,te.default.func,te.default.number,te.default.number,te.default.number,te.default.bool,te.default.bool,te.default.bool,te.default.any,te.default.any,te.default.any,te.default.string,te.default.string,te.default.string,te.default.func,te.default.string,te.default.func,te.default.func,te.default.func,te.default.func,te.default.func,te.default.shape({addEventListener:te.default.func,removeEventListener:te.default.func,document:te.default.shape({getElementById:te.default.func,activeElement:te.default.any,body:te.default.any})});function iF(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}s(iF,"getA11yStatusMessage");var oF=x0(x0({},Nl),{getA11yStatusMessage:iF}),sF=Ga,zc=0,c1=1,u1=2,ju=3,d1=4,f1=5,h1=6,g1=7,p1=8,m1=9,v1=10,Ju=11,ow=12,sw=13,_1=14,lw=15,aw=16,cw=17,uw=18,y1=19,Rg=20,dw=21,fw=Object.freeze({__proto__:null,ToggleButtonClick:zc,ToggleButtonKeyDownArrowDown:c1,ToggleButtonKeyDownArrowUp:u1,ToggleButtonKeyDownCharacter:ju,ToggleButtonKeyDownEscape:d1,ToggleButtonKeyDownHome:f1,ToggleButtonKeyDownEnd:h1,ToggleButtonKeyDownEnter:g1,ToggleButtonKeyDownSpaceButton:p1,ToggleButtonKeyDownPageUp:m1,ToggleButtonKeyDownPageDown:v1,ToggleButtonBlur:Ju,MenuMouseLeave:ow,ItemMouseMove:sw,ItemClick:_1,FunctionToggleMenu:lw,FunctionOpenMenu:aw,FunctionCloseMenu:cw,FunctionSetHighlightedIndex:uw,FunctionSelectItem:y1,FunctionSetInputValue:Rg,FunctionReset:dw});function lF(e,t){var n,r=t.type,i=t.props,o=t.altKey,l;switch(r){case _1:l={isOpen:Dn(i,"isOpen"),highlightedIndex:Dn(i,"highlightedIndex"),selectedItem:i.items[t.index]};break;case ju:var a=t.key,c=""+e.inputValue+a;l={inputValue:c,highlightedIndex:rF({keysSoFar:c,highlightedIndex:!e.isOpen&&e.selectedItem?i.items.indexOf(e.selectedItem):e.highlightedIndex,items:i.items,itemToString:i.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex}),isOpen:!0};break;case c1:l={highlightedIndex:e.isOpen?Ri(1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1):o&&e.selectedItem==null?-1:xo(i,e,1),isOpen:!0};break;case u1:e.isOpen&&o?l=zu(i,e.highlightedIndex,!1):l={highlightedIndex:e.isOpen?Ri(-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1):xo(i,e,-1),isOpen:!0};break;case g1:case p1:l=zu(i,e.highlightedIndex,!1);break;case f1:l={highlightedIndex:Ro(1,0,i.items.length,t.getItemNodeFromIndex,!1),isOpen:!0};break;case h1:l={highlightedIndex:Ro(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1),isOpen:!0};break;case m1:l={highlightedIndex:Ri(-10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case v1:l={highlightedIndex:Ri(10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case d1:l={isOpen:!1,highlightedIndex:-1};break;case Ju:l=$e({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&{selectedItem:i.items[e.highlightedIndex]});break;case y1:l={selectedItem:t.selectedItem};break;default:return iw(e,t,fw)}return $e({},e,l)}s(lF,"downshiftSelectReducer");var aF=["onMouseLeave","refKey","onKeyDown","onBlur","ref"],cF=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],uF=["item","index","onMouseMove","onClick","onPress","refKey","ref","disabled"];hw.stateChangeTypes=fw;function hw(e){e===void 0&&(e={}),sF(e,hw);var t=$e({},oF,e),n=t.items,r=t.scrollIntoView,i=t.environment,o=t.itemToString,l=t.getA11ySelectionMessage,a=t.getA11yStatusMessage,c=ew(lF,tw(t),t),d=c[0],u=c[1],f=d.isOpen,h=d.highlightedIndex,g=d.selectedItem,p=d.inputValue,v=(0,m.useRef)(null),_=(0,m.useRef)(null),y=(0,m.useRef)({}),x=(0,m.useRef)(null),C=XS(t),b=(0,m.useRef)(),T=(0,m.useRef)(!0),M=Xd({state:d,props:t}),S=(0,m.useCallback)(function(ne){return y.current[C.getItemId(ne)]},[C]);Wu(a,[f,h,p,n],$e({isInitialMount:T.current,previousResultCount:b.current,items:n,environment:i,itemToString:o},d)),Wu(l,[g],$e({isInitialMount:T.current,previousResultCount:b.current,items:n,environment:i,itemToString:o},d));var E=rw({menuElement:_.current,highlightedIndex:h,isOpen:f,itemRefs:y,scrollIntoView:r,getItemNodeFromIndex:S});(0,m.useEffect)(function(){return x.current=i1(function(ne){ne({type:Rg,inputValue:""})},500),function(){x.current.cancel()}},[]),(0,m.useEffect)(function(){p&&x.current(u)},[u,p]),a1({isInitialMount:T.current,props:t,state:d}),(0,m.useEffect)(function(){T.current||(b.current=n.length)});var A=nw(f,[_,v],i,function(){u({type:Ju})}),D=l1("getMenuProps","getToggleButtonProps");(0,m.useEffect)(function(){return T.current=!1,function(){T.current=!0}},[]),(0,m.useEffect)(function(){f||(y.current={})},[f]);var L=(0,m.useMemo)(function(){return{ArrowDown:s(function(he){he.preventDefault(),u({type:c1,getItemNodeFromIndex:S,altKey:he.altKey})},"ArrowDown"),ArrowUp:s(function(he){he.preventDefault(),u({type:u1,getItemNodeFromIndex:S,altKey:he.altKey})},"ArrowUp"),Home:s(function(he){he.preventDefault(),u({type:f1,getItemNodeFromIndex:S})},"Home"),End:s(function(he){he.preventDefault(),u({type:h1,getItemNodeFromIndex:S})},"End"),Escape:s(function(){M.current.state.isOpen&&u({type:d1})},"Escape"),Enter:s(function(he){he.preventDefault(),u({type:M.current.state.isOpen?g1:zc})},"Enter"),PageUp:s(function(he){M.current.state.isOpen&&(he.preventDefault(),u({type:m1,getItemNodeFromIndex:S}))},"PageUp"),PageDown:s(function(he){M.current.state.isOpen&&(he.preventDefault(),u({type:v1,getItemNodeFromIndex:S}))},"PageDown")," ":s(function(he){he.preventDefault();var ge=M.current.state;if(!ge.isOpen){u({type:zc});return}ge.inputValue?u({type:ju,key:" ",getItemNodeFromIndex:S}):u({type:p1})},"_")}},[u,S,M]),G=(0,m.useCallback)(function(){u({type:lw})},[u]),$=(0,m.useCallback)(function(){u({type:cw})},[u]),W=(0,m.useCallback)(function(){u({type:aw})},[u]),z=(0,m.useCallback)(function(ne){u({type:uw,highlightedIndex:ne})},[u]),me=(0,m.useCallback)(function(ne){u({type:y1,selectedItem:ne})},[u]),q=(0,m.useCallback)(function(){u({type:dw})},[u]),le=(0,m.useCallback)(function(ne){u({type:Rg,inputValue:ne})},[u]),ye=(0,m.useCallback)(function(ne){return $e({id:C.labelId,htmlFor:C.toggleButtonId},ne)},[C]),X=(0,m.useCallback)(function(ne,he){var ge,se=ne===void 0?{}:ne,Z=se.onMouseLeave,ee=se.refKey,pe=ee===void 0?"ref":ee;se.onKeyDown,se.onBlur;var De=se.ref,Ae=Or(se,aF),Ge=(he===void 0?{}:he).suppressRefError,Pe=Ge===void 0?!1:Ge,lt=s(function(){u({type:ow})},"menuHandleMouseLeave");return D("getMenuProps",Pe,pe,_),$e((ge={},ge[pe]=ni(De,function(Ye){_.current=Ye}),ge.id=C.menuId,ge.role="listbox",ge["aria-labelledby"]=Ae&&Ae["aria-label"]?void 0:""+C.labelId,ge.onMouseLeave=Ot(Z,lt),ge),Ae)},[u,D,C]);return{getToggleButtonProps:(0,m.useCallback)(function(ne,he){var ge,se=ne===void 0?{}:ne,Z=se.onBlur,ee=se.onClick;se.onPress;var pe=se.onKeyDown,De=se.refKey,Ae=De===void 0?"ref":De,Ge=se.ref,Pe=Or(se,cF),lt=(he===void 0?{}:he).suppressRefError,Ye=lt===void 0?!1:lt,at=M.current.state,Et=s(function(){u({type:zc})},"toggleButtonHandleClick"),yt=s(function(){at.isOpen&&!A.current.isMouseDown&&u({type:Ju})},"toggleButtonHandleBlur"),Pt=s(function(Ft){var it=Uu(Ft);it&&L[it]?L[it](Ft):nF(it)&&u({type:ju,key:it,getItemNodeFromIndex:S})},"toggleButtonHandleKeyDown"),ze=$e((ge={},ge[Ae]=ni(Ge,function(Nt){v.current=Nt}),ge["aria-activedescendant"]=at.isOpen&&at.highlightedIndex>-1?C.getItemId(at.highlightedIndex):"",ge["aria-controls"]=C.menuId,ge["aria-expanded"]=M.current.state.isOpen,ge["aria-haspopup"]="listbox",ge["aria-labelledby"]=Pe&&Pe["aria-label"]?void 0:""+C.labelId,ge.id=C.toggleButtonId,ge.role="combobox",ge.tabIndex=0,ge.onBlur=Ot(Z,yt),ge),Pe);return Pe.disabled||(ze.onClick=Ot(ee,Et),ze.onKeyDown=Ot(pe,Pt)),D("getToggleButtonProps",Ye,Ae,v),ze},[M,C,D,u,A,L,S]),getLabelProps:ye,getMenuProps:X,getItemProps:(0,m.useCallback)(function(ne){var he,ge=ne===void 0?{}:ne,se=ge.item,Z=ge.index,ee=ge.onMouseMove,pe=ge.onClick;ge.onPress;var De=ge.refKey,Ae=De===void 0?"ref":De,Ge=ge.ref,Pe=ge.disabled,lt=Or(ge,uF),Ye=M.current,at=Ye.state,Et=Ye.props,yt=o1(se,Z,Et.items,"Pass either item or index to getItemProps!"),Pt=yt[0],ze=yt[1],Nt=s(function(){ze!==at.highlightedIndex&&(E.current=!1,u({type:sw,index:ze,disabled:Pe}))},"itemHandleMouseMove"),Ft=s(function(){u({type:_1,index:ze})},"itemHandleClick"),it=$e((he={disabled:Pe,role:"option","aria-selected":""+(Pt===g),id:C.getItemId(ze)},he[Ae]=ni(Ge,function(Xt){Xt&&(y.current[C.getItemId(ze)]=Xt)}),he),lt);return Pe||(it.onClick=Ot(pe,Ft)),it.onMouseMove=Ot(ee,Nt),it},[M,g,C,E,u]),toggleMenu:G,openMenu:W,closeMenu:$,setHighlightedIndex:z,selectItem:me,reset:q,setInputValue:le,highlightedIndex:h,isOpen:f,selectedItem:g,inputValue:p}}s(hw,"useSelect");var x1=0,C1=1,b1=2,E1=3,T1=4,S1=5,w1=6,k1=7,M1=8,Gu=9,A1=10,gw=11,pw=12,I1=13,mw=14,vw=15,_w=16,yw=17,xw=18,N1=19,Cw=20,bw=21,O1=22,Ew=Object.freeze({__proto__:null,InputKeyDownArrowDown:x1,InputKeyDownArrowUp:C1,InputKeyDownEscape:b1,InputKeyDownHome:E1,InputKeyDownEnd:T1,InputKeyDownPageUp:S1,InputKeyDownPageDown:w1,InputKeyDownEnter:k1,InputChange:M1,InputBlur:Gu,InputFocus:A1,MenuMouseLeave:gw,ItemMouseMove:pw,ItemClick:I1,ToggleButtonClick:mw,FunctionToggleMenu:vw,FunctionOpenMenu:_w,FunctionCloseMenu:yw,FunctionSetHighlightedIndex:xw,FunctionSelectItem:N1,FunctionSetInputValue:Cw,FunctionReset:bw,ControlledPropUpdatedSelectedItem:O1});function dF(e){var t=tw(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),$e({},t,{inputValue:r})}s(dF,"getInitialState$1");te.default.array.isRequired,te.default.func,te.default.func,te.default.func,te.default.func,te.default.number,te.default.number,te.default.number,te.default.bool,te.default.bool,te.default.bool,te.default.any,te.default.any,te.default.any,te.default.string,te.default.string,te.default.string,te.default.string,te.default.string,te.default.string,te.default.func,te.default.string,te.default.string,te.default.func,te.default.func,te.default.func,te.default.func,te.default.func,te.default.func,te.default.shape({addEventListener:te.default.func,removeEventListener:te.default.func,document:te.default.shape({getElementById:te.default.func,activeElement:te.default.any,body:te.default.any})});function fF(e,t,n){var r=(0,m.useRef)(),i=QS(e,t,n),o=i[0],l=i[1];return(0,m.useEffect)(function(){GS(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&l({type:O1,inputValue:n.itemToString(n.selectedItem)}),r.current=o.selectedItem===r.current?n.selectedItem:o.selectedItem)},[o.selectedItem,n.selectedItem]),[Ku(o,n),l]}s(fF,"useControlledReducer");var hF=Ga,gF=$e({},Nl,{selectedItemChanged:s(function(t,n){return t!==n},"selectedItemChanged"),getA11yStatusMessage:jP});function pF(e,t){var n,r=t.type,i=t.props,o=t.altKey,l;switch(r){case I1:l={isOpen:Dn(i,"isOpen"),highlightedIndex:Dn(i,"highlightedIndex"),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case x1:e.isOpen?l={highlightedIndex:Ri(1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:l={highlightedIndex:o&&e.selectedItem==null?-1:xo(i,e,1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case C1:e.isOpen?o?l=zu(i,e.highlightedIndex):l={highlightedIndex:Ri(-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:l={highlightedIndex:xo(i,e,-1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case k1:l=zu(i,e.highlightedIndex);break;case b1:l=$e({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case S1:l={highlightedIndex:Ri(-10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case w1:l={highlightedIndex:Ri(10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case E1:l={highlightedIndex:Ro(1,0,i.items.length,t.getItemNodeFromIndex,!1)};break;case T1:l={highlightedIndex:Ro(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1)};break;case Gu:l=$e({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case M1:l={isOpen:!0,highlightedIndex:Dn(i,"highlightedIndex"),inputValue:t.inputValue};break;case A1:l={isOpen:!0,highlightedIndex:xo(i,e,0)};break;case N1:l={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case O1:l={inputValue:t.inputValue};break;default:return iw(e,t,Ew)}return $e({},e,l)}s(pF,"downshiftUseComboboxReducer");var mF=["onMouseLeave","refKey","ref"],vF=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],_F=["onClick","onPress","refKey","ref"],yF=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];D1.stateChangeTypes=Ew;function D1(e){e===void 0&&(e={}),hF(e,D1);var t=$e({},gF,e),n=t.initialIsOpen,r=t.defaultIsOpen,i=t.items,o=t.scrollIntoView,l=t.environment,a=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,d=t.itemToString,u=fF(pF,dF(t),t),f=u[0],h=u[1],g=f.isOpen,p=f.highlightedIndex,v=f.selectedItem,_=f.inputValue,y=(0,m.useRef)(null),x=(0,m.useRef)({}),C=(0,m.useRef)(null),b=(0,m.useRef)(null),T=(0,m.useRef)(!0),M=XS(t),S=(0,m.useRef)(),E=Xd({state:f,props:t}),A=(0,m.useCallback)(function(se){return x.current[M.getItemId(se)]},[M]);Wu(a,[g,p,_,i],$e({isInitialMount:T.current,previousResultCount:S.current,items:i,environment:l,itemToString:d},f)),Wu(c,[v],$e({isInitialMount:T.current,previousResultCount:S.current,items:i,environment:l,itemToString:d},f));var D=rw({menuElement:y.current,highlightedIndex:p,isOpen:g,itemRefs:x,scrollIntoView:o,getItemNodeFromIndex:A});a1({isInitialMount:T.current,props:t,state:f}),(0,m.useEffect)(function(){(n||r||g)&&C.current&&C.current.focus()},[]),(0,m.useEffect)(function(){T.current||(S.current=i.length)});var L=nw(g,[C,y,b],l,function(){h({type:Gu,selectItem:!1})}),G=l1("getInputProps","getMenuProps");(0,m.useEffect)(function(){return T.current=!1,function(){T.current=!0}},[]),(0,m.useEffect)(function(){var se;if(!g)x.current={};else if(((se=l.document)==null?void 0:se.activeElement)!==C.current){var Z;C==null||(Z=C.current)==null||Z.focus()}},[g,l]);var $=(0,m.useMemo)(function(){return{ArrowDown:s(function(Z){Z.preventDefault(),h({type:x1,altKey:Z.altKey,getItemNodeFromIndex:A})},"ArrowDown"),ArrowUp:s(function(Z){Z.preventDefault(),h({type:C1,altKey:Z.altKey,getItemNodeFromIndex:A})},"ArrowUp"),Home:s(function(Z){E.current.state.isOpen&&(Z.preventDefault(),h({type:E1,getItemNodeFromIndex:A}))},"Home"),End:s(function(Z){E.current.state.isOpen&&(Z.preventDefault(),h({type:T1,getItemNodeFromIndex:A}))},"End"),Escape:s(function(Z){var ee=E.current.state;(ee.isOpen||ee.inputValue||ee.selectedItem||ee.highlightedIndex>-1)&&(Z.preventDefault(),h({type:b1}))},"Escape"),Enter:s(function(Z){!E.current.state.isOpen||Z.which===229||(Z.preventDefault(),h({type:k1,getItemNodeFromIndex:A}))},"Enter"),PageUp:s(function(Z){E.current.state.isOpen&&(Z.preventDefault(),h({type:S1,getItemNodeFromIndex:A}))},"PageUp"),PageDown:s(function(Z){E.current.state.isOpen&&(Z.preventDefault(),h({type:w1,getItemNodeFromIndex:A}))},"PageDown")}},[h,E,A]),W=(0,m.useCallback)(function(se){return $e({id:M.labelId,htmlFor:M.inputId},se)},[M]),z=(0,m.useCallback)(function(se,Z){var ee,pe=se===void 0?{}:se,De=pe.onMouseLeave,Ae=pe.refKey,Ge=Ae===void 0?"ref":Ae,Pe=pe.ref,lt=Or(pe,mF),Ye=(Z===void 0?{}:Z).suppressRefError;return G("getMenuProps",Ye===void 0?!1:Ye,Ge,y),$e((ee={},ee[Ge]=ni(Pe,function(at){y.current=at}),ee.id=M.menuId,ee.role="listbox",ee["aria-labelledby"]=lt&&lt["aria-label"]?void 0:""+M.labelId,ee.onMouseLeave=Ot(De,function(){h({type:gw})}),ee),lt)},[h,G,M]),me=(0,m.useCallback)(function(se){var Z,ee,pe=se===void 0?{}:se,De=pe.item,Ae=pe.index,Ge=pe.refKey,Pe=Ge===void 0?"ref":Ge,lt=pe.ref,Ye=pe.onMouseMove,at=pe.onMouseDown,Et=pe.onClick;pe.onPress;var yt=pe.disabled,Pt=Or(pe,vF),ze=E.current,Nt=ze.props,Ft=ze.state,it=o1(De,Ae,Nt.items,"Pass either item or index to getItemProps!")[1],Xt="onClick",kn=Et;return $e((Z={},Z[Pe]=ni(lt,function(Le){Le&&(x.current[M.getItemId(it)]=Le)}),Z.disabled=yt,Z.role="option",Z["aria-selected"]=""+(it===Ft.highlightedIndex),Z.id=M.getItemId(it),Z),!yt&&(ee={},ee[Xt]=Ot(kn,s(function(){h({type:I1,index:it})},"itemHandleClick")),ee),{onMouseMove:Ot(Ye,s(function(){it!==Ft.highlightedIndex&&(D.current=!1,h({type:pw,index:it,disabled:yt}))},"itemHandleMouseMove")),onMouseDown:Ot(at,s(function(ln){return ln.preventDefault()},"itemHandleMouseDown"))},Pt)},[h,E,D,M]),q=(0,m.useCallback)(function(se){var Z,ee=se===void 0?{}:se,pe=ee.onClick;ee.onPress;var De=ee.refKey,Ae=De===void 0?"ref":De,Ge=ee.ref,Pe=Or(ee,_F),lt=E.current.state;return $e((Z={},Z[Ae]=ni(Ge,function(Ye){b.current=Ye}),Z["aria-controls"]=M.menuId,Z["aria-expanded"]=lt.isOpen,Z.id=M.toggleButtonId,Z.tabIndex=-1,Z),!Pe.disabled&&$e({},{onClick:Ot(pe,s(function(){h({type:mw})},"toggleButtonHandleClick"))}),Pe)},[h,E,M]),le=(0,m.useCallback)(function(se,Z){var ee,pe=se===void 0?{}:se,De=pe.onKeyDown,Ae=pe.onChange,Ge=pe.onInput,Pe=pe.onFocus,lt=pe.onBlur;pe.onChangeText;var Ye=pe.refKey,at=Ye===void 0?"ref":Ye,Et=pe.ref,yt=Or(pe,yF),Pt=(Z===void 0?{}:Z).suppressRefError;G("getInputProps",Pt===void 0?!1:Pt,at,C);var ze=E.current.state,Nt=s(function(je){var I=Uu(je);I&&$[I]&&$[I](je)},"inputHandleKeyDown"),Ft=s(function(je){h({type:M1,inputValue:je.target.value})},"inputHandleChange"),it=s(function(je){ze.isOpen&&!L.current.isMouseDown&&h({type:Gu,selectItem:!(je.relatedTarget===null&&l.document.activeElement!==l.document.body)})},"inputHandleBlur"),Xt=s(function(){ze.isOpen||h({type:A1})},"inputHandleFocus"),kn="onChange",Le={};if(!yt.disabled){var ln;Le=(ln={},ln[kn]=Ot(Ae,Ge,Ft),ln.onKeyDown=Ot(De,Nt),ln.onBlur=Ot(lt,it),ln.onFocus=Ot(Pe,Xt),ln)}return $e((ee={},ee[at]=ni(Et,function(Vn){C.current=Vn}),ee["aria-activedescendant"]=ze.isOpen&&ze.highlightedIndex>-1?M.getItemId(ze.highlightedIndex):"",ee["aria-autocomplete"]="list",ee["aria-controls"]=M.menuId,ee["aria-expanded"]=ze.isOpen,ee["aria-labelledby"]=yt&&yt["aria-label"]?void 0:""+M.labelId,ee.autoComplete="off",ee.id=M.inputId,ee.role="combobox",ee.value=ze.inputValue,ee),Le,yt)},[G,E,M,$,h,L,l]),ye=(0,m.useCallback)(function(){h({type:vw})},[h]),X=(0,m.useCallback)(function(){h({type:yw})},[h]),ne=(0,m.useCallback)(function(){h({type:_w})},[h]),he=(0,m.useCallback)(function(se){h({type:xw,highlightedIndex:se})},[h]),ge=(0,m.useCallback)(function(se){h({type:N1,selectedItem:se})},[h]);return{getItemProps:me,getLabelProps:W,getMenuProps:z,getInputProps:le,getToggleButtonProps:q,toggleMenu:ye,openMenu:ne,closeMenu:X,setHighlightedIndex:he,setInputValue:(0,m.useCallback)(function(se){h({type:Cw,inputValue:se})},[h]),selectItem:ge,reset:(0,m.useCallback)(function(){h({type:bw})},[h]),highlightedIndex:p,isOpen:g,selectedItem:v,inputValue:_}}s(D1,"useCombobox");var Tw={activeIndex:-1,selectedItems:[]};function Ny(e,t){return ul(e,t,Tw)}s(Ny,"getInitialValue");function Oy(e,t){return Dn(e,t,Tw)}s(Oy,"getDefaultValue");function xF(e){return{activeIndex:Ny(e,"activeIndex"),selectedItems:Ny(e,"selectedItems")}}s(xF,"getInitialState");function Dy(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}s(Dy,"isKeyDownOperationPermitted");function CF(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}s(CF,"getA11yRemovalMessage");te.default.array,te.default.array,te.default.array,te.default.func,te.default.func,te.default.func,te.default.number,te.default.number,te.default.number,te.default.func,te.default.func,te.default.string,te.default.string,te.default.shape({addEventListener:te.default.func,removeEventListener:te.default.func,document:te.default.shape({getElementById:te.default.func,activeElement:te.default.any,body:te.default.any})});var bF={itemToString:Nl.itemToString,stateReducer:Nl.stateReducer,environment:Nl.environment,getA11yRemovalMessage:CF,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},EF=Ga,R1=0,L1=1,$1=2,P1=3,F1=4,V1=5,B1=6,H1=7,K1=8,U1=9,W1=10,z1=11,j1=12,TF=Object.freeze({__proto__:null,SelectedItemClick:R1,SelectedItemKeyDownDelete:L1,SelectedItemKeyDownBackspace:$1,SelectedItemKeyDownNavigationNext:P1,SelectedItemKeyDownNavigationPrevious:F1,DropdownKeyDownNavigationPrevious:V1,DropdownKeyDownBackspace:B1,DropdownClick:H1,FunctionAddSelectedItem:K1,FunctionRemoveSelectedItem:U1,FunctionSetSelectedItems:W1,FunctionSetActiveIndex:z1,FunctionReset:j1});function SF(e,t){var n=t.type,r=t.index,i=t.props,o=t.selectedItem,l=e.activeIndex,a=e.selectedItems,c;switch(n){case R1:c={activeIndex:r};break;case F1:c={activeIndex:l-1<0?0:l-1};break;case P1:c={activeIndex:l+1>=a.length?-1:l+1};break;case $1:case L1:if(l<0)break;var d=l;a.length===1?d=-1:l===a.length-1&&(d=a.length-2),c=$e({selectedItems:[].concat(a.slice(0,l),a.slice(l+1))},{activeIndex:d});break;case V1:c={activeIndex:a.length-1};break;case B1:c={selectedItems:a.slice(0,a.length-1)};break;case K1:c={selectedItems:[].concat(a,[o])};break;case H1:c={activeIndex:-1};break;case U1:var u=l,f=a.indexOf(o);if(f<0)break;a.length===1?u=-1:f===a.length-1&&(u=a.length-2),c={selectedItems:[].concat(a.slice(0,f),a.slice(f+1)),activeIndex:u};break;case W1:c={selectedItems:t.selectedItems};break;case z1:c={activeIndex:t.activeIndex};break;case j1:c={activeIndex:Oy(i,"activeIndex"),selectedItems:Oy(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return $e({},e,c)}s(SF,"downshiftMultipleSelectionReducer");var wF=["refKey","ref","onClick","onKeyDown","selectedItem","index"],kF=["refKey","ref","onKeyDown","onClick","preventKeyAction"];Sw.stateChangeTypes=TF;function Sw(e){e===void 0&&(e={}),EF(e,Sw);var t=$e({},bF,e),n=t.getA11yRemovalMessage,r=t.itemToString,i=t.environment,o=t.keyNavigationNext,l=t.keyNavigationPrevious,a=ew(SF,xF(t),t),c=a[0],d=a[1],u=c.activeIndex,f=c.selectedItems,h=(0,m.useRef)(!0),g=(0,m.useRef)(null),p=(0,m.useRef)(f),v=(0,m.useRef)();v.current=[];var _=Xd({state:c,props:t});(0,m.useEffect)(function(){if(!h.current){if(f.length<p.current.length){var b=p.current.find(function(T){return f.indexOf(T)<0});qS(n({itemToString:r,resultCount:f.length,removedSelectedItem:b,activeIndex:u,activeSelectedItem:f[u]}),i.document)}p.current=f}},[f.length]),(0,m.useEffect)(function(){h.current||(u===-1&&g.current?g.current.focus():v.current[u]&&v.current[u].focus())},[u]),a1({isInitialMount:h.current,props:t,state:c});var y=l1("getDropdownProps");(0,m.useEffect)(function(){return h.current=!1,function(){h.current=!0}},[]);var x=(0,m.useMemo)(function(){var b;return b={},b[l]=function(){d({type:F1})},b[o]=function(){d({type:P1})},b.Delete=s(function(){d({type:L1})},"Delete"),b.Backspace=s(function(){d({type:$1})},"Backspace"),b},[d,o,l]),C=(0,m.useMemo)(function(){var b;return b={},b[l]=function(T){Dy(T)&&d({type:V1})},b.Backspace=s(function(M){Dy(M)&&d({type:B1})},"Backspace"),b},[d,l]);return{getSelectedItemProps:(0,m.useCallback)(function(b){var T,M=b===void 0?{}:b,S=M.refKey,E=S===void 0?"ref":S,A=M.ref,D=M.onClick,L=M.onKeyDown,G=M.selectedItem,$=M.index,W=Or(M,wF),z=_.current.state,me=o1(G,$,z.selectedItems,"Pass either item or index to getSelectedItemProps!")[1],q=me>-1&&me===z.activeIndex;return $e((T={},T[E]=ni(A,function(le){le&&v.current.push(le)}),T.tabIndex=q?0:-1,T.onClick=Ot(D,s(function(){d({type:R1,index:me})},"selectedItemHandleClick")),T.onKeyDown=Ot(L,s(function(ye){var X=Uu(ye);X&&x[X]&&x[X](ye)},"selectedItemHandleKeyDown")),T),W)},[d,_,x]),getDropdownProps:(0,m.useCallback)(function(b,T){var M,S=b===void 0?{}:b,E=S.refKey,A=E===void 0?"ref":E,D=S.ref,L=S.onKeyDown,G=S.onClick,$=S.preventKeyAction,W=$===void 0?!1:$,z=Or(S,kF),me=(T===void 0?{}:T).suppressRefError;return y("getDropdownProps",me===void 0?!1:me,A,g),$e((M={},M[A]=ni(D,function(q){q&&(g.current=q)}),M),!W&&{onKeyDown:Ot(L,s(function(le){var ye=Uu(le);ye&&C[ye]&&C[ye](le)},"dropdownHandleKeyDown")),onClick:Ot(G,s(function(){d({type:H1})},"dropdownHandleClick"))},z)},[d,C,y]),addSelectedItem:(0,m.useCallback)(function(b){d({type:K1,selectedItem:b})},[d]),removeSelectedItem:(0,m.useCallback)(function(b){d({type:U1,selectedItem:b})},[d]),setSelectedItems:(0,m.useCallback)(function(b){d({type:W1,selectedItems:b})},[d]),setActiveIndex:(0,m.useCallback)(function(b){d({type:z1,activeIndex:b})},[d]),reset:(0,m.useCallback)(function(){d({type:j1})},[d]),selectedItems:f,activeIndex:u}}s(Sw,"useMultipleSelection");var Ry=20,ww=s(e=>e.suggestions.length>0?m.createElement(MF,{...e}):m.createElement("input",{className:j.textInput,size:40,autoFocus:!0,...e.register(e.inputName)}),"DownshiftAutoComplete"),MF=s(({autofocus:e,suggestions:t,control:n,inputName:r,placeholder:i,initialInputValue:o,setValue:l})=>{const[a,c]=m.useState(t.slice(0,Ry)),d=li(xi),u=t.length>0,{isOpen:f,getToggleButtonProps:h,getMenuProps:g,getInputProps:p,highlightedIndex:v,getItemProps:_,selectedItem:y}=D1({initialInputValue:o,onInputValueChange({inputValue:C=""}){l(r,C),C=C.toLowerCase()||"";const b=[];for(const T of t)if(T.toLowerCase().includes(C)&&(b.push(T),b.length>=Ry))break;c(b)},items:a,itemToString(C){return C??""}}),x=f&&a.length>0;return m.createElement("div",{className:j.downshiftAutocompleteContainer},m.createElement("div",{"data-visible-dropdown":x,className:j.downshiftInputWrapper},m.createElement(vP,{name:r,control:n,render:s(({field:C})=>{const b=p();return m.createElement("input",{...b,name:C.name,placeholder:i,className:j.downshiftInput,size:30,"data-editor-dialog":!0,autoFocus:e})},"render")}),u&&m.createElement("button",{"aria-label":"toggle menu",type:"button",...h()},d("arrow_drop_down"))),m.createElement("div",{className:j.downshiftAutocompleteContainer},m.createElement("ul",{...g(),"data-visible":x},a.map((C,b)=>m.createElement("li",{"data-selected":y===C,"data-highlighted":v===b,key:`${C}${b}`,..._({item:C,index:b})},C)))))},"DownshiftAutoCompleteWithSuggestions"),AF=s(()=>{const[e,t,n,r,i]=Er(Lg,Co,Ko,Li,ua),o=Nn(Nw),l=Nn(Aw),a=Ci(),{register:c,handleSubmit:d,control:u,setValue:f,reset:h}=JS({values:t.type==="editing"?t.initialValues:{}}),g=s(()=>{h({src:"",title:"",altText:"",width:void 0,height:void 0})},"resetFormState");return t.type==="inactive"?null:m.createElement(dM,{open:!0,onOpenChange:s(p=>{p||(l(),g())},"onOpenChange")},m.createElement(gM,{container:n?.current},m.createElement(pM,{className:j.dialogOverlay}),m.createElement(_M,{className:j.dialogContent,onOpenAutoFocus:s(p=>{p.preventDefault()},"onOpenAutoFocus")},m.createElement(bM,null,a("uploadImage.dialogTitle","Upload an image")),m.createElement("form",{onSubmit:s(async p=>{p.preventDefault(),p.stopPropagation(),await d(o)(p),g()},"onSubmit"),className:j.multiFieldForm},r===null?m.createElement("input",{type:"hidden",accept:"image/*",...c("file")}):m.createElement("div",{className:j.formField},m.createElement("label",{htmlFor:"file"},a("uploadImage.uploadInstructions","Upload an image from your device:")),m.createElement("input",{type:"file",accept:"image/*",...c("file")})),m.createElement("div",{className:j.formField},m.createElement("label",{htmlFor:"src"},r!==null?a("uploadImage.addViaUrlInstructions","Or add an image from an URL:"):a("uploadImage.addViaUrlInstructionsNoUpload","Add an image from an URL:")),m.createElement(ww,{register:c,initialInputValue:t.type==="editing"?t.initialValues.src??"":"",inputName:"src",suggestions:e,setValue:f,control:u,placeholder:a("uploadImage.autoCompletePlaceholder","Select or paste an image src")})),m.createElement("div",{className:j.formField},m.createElement("label",{htmlFor:"alt"},a("uploadImage.alt","Alt:")),m.createElement("input",{type:"text",...c("altText"),className:j.textInput})),m.createElement("div",{className:j.formField},m.createElement("label",{htmlFor:"title"},a("uploadImage.title","Title:")),m.createElement("input",{type:"text",...c("title"),className:j.textInput})),i&&m.createElement("div",{className:j.imageDimensionsContainer},m.createElement("div",{className:j.formField},m.createElement("label",{htmlFor:"width"},a("uploadImage.width","Width:")),m.createElement("input",{type:"number",min:0,...c("width"),className:j.textInput})),m.createElement("div",{className:j.formField},m.createElement("label",{htmlFor:"height"},a("uploadImage.height","Height:")),m.createElement("input",{type:"number",min:0,...c("height"),className:j.textInput}))),m.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},m.createElement("button",{type:"submit",title:a("dialogControls.save","Save"),"aria-label":a("dialogControls.save","Save"),className:(0,nt.default)(j.primaryButton)},a("dialogControls.save","Save")),m.createElement(SM,{asChild:!0},m.createElement("button",{type:"reset",title:a("dialogControls.cancel","Cancel"),"aria-label":a("dialogControls.cancel","Cancel"),className:(0,nt.default)(j.secondaryButton)},a("dialogControls.cancel","Cancel"))))))))},"ImageDialog");function Uf(e,t,n){return Math.min(Math.max(e,t),n)}s(Uf,"clamp");var ot={east:1,north:8,south:2,west:4};function IF({onResizeStart:e,onResizeEnd:t,imageRef:n,maxWidth:r,editor:i}){const o=(0,m.useRef)(null),l=(0,m.useRef)({priority:"",value:"default"}),a=(0,m.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),c=i.getRootElement(),d=r??(c!==null?c.getBoundingClientRect().width-20:100),u=c!==null?c.getBoundingClientRect().height-20:100,f=100,h=100,g=s(x=>{const C=x===ot.east||x===ot.west,b=x===ot.north||x===ot.south,T=x&ot.north&&x&ot.west||x&ot.south&&x&ot.east,M=C?"ew":b?"ns":T?"nwse":"nesw";c!==null&&c.style.setProperty("cursor",`${M}-resize`,"important"),document.body!==null&&(document.body.style.setProperty("cursor",`${M}-resize`,"important"),l.current.value=document.body.style.getPropertyValue("-webkit-user-select"),l.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))},"setStartCursor"),p=s(()=>{c!==null&&c.style.setProperty("cursor","text"),document.body!==null&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",l.current.value,l.current.priority))},"setEndCursor"),v=s((x,C)=>{if(!i.isEditable())return;const b=n.current,T=o.current;if(b!==null&&T!==null){x.preventDefault();const{width:M,height:S}=b.getBoundingClientRect(),E=a.current;E.startWidth=M,E.startHeight=S,E.ratio=M/S,E.currentWidth=M,E.currentHeight=S,E.startX=x.clientX,E.startY=x.clientY,E.isResizing=!0,E.direction=C,g(C),e(),T.classList.add(j.imageControlWrapperResizing),b.style.height=`${S}px`,b.style.width=`${M}px`,document.addEventListener("pointermove",_),document.addEventListener("pointerup",y)}},"handlePointerDown"),_=s(x=>{const C=n.current,b=a.current,T=b.direction&(ot.east|ot.west),M=b.direction&(ot.south|ot.north);if(C!==null&&b.isResizing)if(T&&M){let S=Math.floor(b.startX-x.clientX);S=b.direction&ot.east?-S:S;const E=Uf(b.startWidth+S,f,d),A=E/b.ratio;C.style.width=`${E}px`,C.style.height=`${A}px`,b.currentHeight=A,b.currentWidth=E}else if(M){let S=Math.floor(b.startY-x.clientY);S=b.direction&ot.south?-S:S;const E=Uf(b.startHeight+S,h,u);C.style.height=`${E}px`,b.currentHeight=E}else{let S=Math.floor(b.startX-x.clientX);S=b.direction&ot.east?-S:S;const E=Uf(b.startWidth+S,f,d);C.style.width=`${E}px`,b.currentWidth=E}},"handlePointerMove"),y=s(()=>{const x=n.current,C=a.current,b=o.current;if(x!==null&&b!==null&&C.isResizing){const T=C.currentWidth,M=C.currentHeight;C.startWidth=0,C.startHeight=0,C.ratio=0,C.startX=0,C.startY=0,C.currentWidth=0,C.currentHeight=0,C.isResizing=!1,b.classList.remove(j.imageControlWrapperResizing),p(),t(T,M),document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",y)}},"handlePointerUp");return m.createElement("div",{ref:o},m.createElement("div",{className:(0,nt.default)(j.imageResizer,j.imageResizerN),onPointerDown:s(x=>{v(x,ot.north)},"onPointerDown")}),m.createElement("div",{className:(0,nt.default)(j.imageResizer,j.imageResizerNe),onPointerDown:s(x=>{v(x,ot.north|ot.east)},"onPointerDown")}),m.createElement("div",{className:(0,nt.default)(j.imageResizer,j.imageResizerE),onPointerDown:s(x=>{v(x,ot.east)},"onPointerDown")}),m.createElement("div",{className:(0,nt.default)(j.imageResizer,j.imageResizerSe),onPointerDown:s(x=>{v(x,ot.south|ot.east)},"onPointerDown")}),m.createElement("div",{className:(0,nt.default)(j.imageResizer,j.imageResizerS),onPointerDown:s(x=>{v(x,ot.south)},"onPointerDown")}),m.createElement("div",{className:(0,nt.default)(j.imageResizer,j.imageResizerSw),onPointerDown:s(x=>{v(x,ot.south|ot.west)},"onPointerDown")}),m.createElement("div",{className:(0,nt.default)(j.imageResizer,j.imageResizerW),onPointerDown:s(x=>{v(x,ot.west)},"onPointerDown")}),m.createElement("div",{className:(0,nt.default)(j.imageResizer,j.imageResizerNw),onPointerDown:s(x=>{v(x,ot.north|ot.west)},"onPointerDown")}))}s(IF,"ImageResizer");var NF="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(`
57
+ <svg id="imgLoadError" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
58
+ <rect x="0" y="0" width="100" height="100" fill="none" stroke="red" stroke-width="4" stroke-dasharray="4" />
59
+ <text x="50" y="55" text-anchor="middle" font-size="20" fill="red">⚠️</text>
60
+ </svg>
61
+ `),OF={__cache:{},read(e){if(this.__cache[e]||(this.__cache[e]=new Promise(t=>{const n=new Image;n.onerror=()=>{this.__cache[e]=NF,t()},n.onload=()=>{this.__cache[e]=e,t()},n.src=e})),this.__cache[e]instanceof Promise)throw this.__cache[e];return this.__cache[e]}};function DF({title:e,alt:t,className:n,imageRef:r,src:i,width:o,height:l}){return m.createElement("img",{className:n??void 0,alt:t,src:OF.read(i),title:e,ref:r,draggable:"false",width:o,height:l})}s(DF,"LazyImage");function RF({src:e,title:t,alt:n,nodeKey:r,width:i,height:o,rest:l}){const[a,c,d,u,f,h]=Er(Fg,$g,ua,Pg,Cr,Vg),g=m.useRef(null),p=m.useRef(null),[v,_,y]=aS(r),[x]=gn(),[C,b]=m.useState(null),T=m.useRef(null),[M,S]=m.useState(!1),[E,A]=m.useState(null),[D,L]=m.useState(null),G=m.useCallback(X=>{if(v&&He(ie())){X.preventDefault();const ne=Cn(r);qu(ne)&&ne.remove()}return!1},[v,r]),$=m.useCallback(X=>{const ne=ie(),he=p.current;return v&&He(ne)&&ne.getNodes().length===1&&he!==null&&he!==document.activeElement?(X.preventDefault(),he.focus(),!0):!1},[v]),W=m.useCallback(X=>p.current===X.target?(nr(null),x.update(()=>{_(!0);const ne=x.getRootElement();ne!==null&&ne.focus()}),!0):!1,[x,_]);m.useEffect(()=>{u?s(async()=>{D||L(e);const ne=await u(e);A(ne)},"callPreviewHandler")().catch(ne=>{}):A(e)},[e,u,D]),m.useEffect(()=>{if(d&&g.current){const{current:X}=g;Ly(X,"width",i),Ly(X,"height",o)}},[d,i,o]),m.useEffect(()=>{let X=!0;const ne=It(x.registerUpdateListener(({editorState:he})=>{X&&b(he.read(()=>ie()))}),x.registerCommand(Mm,(he,ge)=>(T.current=ge,!1),st),x.registerCommand(bm,he=>{const ge=he;return M?!0:ge.target===g.current?(ge.shiftKey?_(!v):(y(),_(!0)),!0):!1},st),x.registerCommand(Em,he=>he.target===g.current?(he.preventDefault(),!0):!1,st),x.registerCommand(Sm,G,st),x.registerCommand(Od,G,st),x.registerCommand(Dd,$,st),x.registerCommand(Rd,W,st));return()=>{X=!1,ne()}},[y,x,M,v,r,G,$,W,_]);const z=s((X,ne)=>{setTimeout(()=>{S(!1)},200),x.update(()=>{const he=Cn(r);qu(he)&&he.setWidthAndHeight(X,ne)})},"onResizeEnd"),me=s(()=>{S(!0)},"onResizeStart"),q=He(C),le=v,ye=m.useMemo(()=>{if(l.length===0)return null;const X=l.find(ne=>ne.type==="mdxJsxAttribute"&&(ne.name==="class"||ne.name==="className"));return X?X.value:null},[l]);return E!==null?m.createElement(m.Suspense,{fallback:a?m.createElement(a,null):null},m.createElement("div",{className:j.imageWrapper,"data-editor-block-type":"image"},m.createElement("div",{draggable:q},m.createElement(DF,{width:i,height:o,className:(0,nt.default)({[j.focusedImage]:le},ye),src:E,title:t??"",alt:n??"",imageRef:g})),q&&le&&!c&&m.createElement(IF,{editor:x,imageRef:g,onResizeStart:me,onResizeEnd:z}),f||m.createElement(h,{nodeKey:r,imageSource:E,initialImagePath:D,title:t??"",alt:n??"",width:i,height:o}))):null}s(RF,"ImageEditor");var Ly=s((e,t,n)=>{typeof n=="number"?e.style[t]=`${n}px`:e.style.removeProperty(t)},"syncDimensionWithImageResizer"),LF=Object.defineProperty,$F=s((e,t,n)=>t in e?LF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,"__defNormalProp$1"),Zo=s((e,t,n)=>$F(e,typeof t!="symbol"?t+"":t,n),"__publicField$1");function PF(e){if(e instanceof HTMLImageElement){const{alt:t,src:n,title:r,width:i,height:o}=e;return{node:Uo({altText:t,src:n,title:r,width:i||void 0,height:o||void 0})}}return null}s(PF,"convertImageElement");var J1=class kw extends Fa{static{s(this,"ImageNode")}constructor(t,n,r,i,o,l,a){super(a),Zo(this,"__src"),Zo(this,"__altText"),Zo(this,"__title"),Zo(this,"__width"),Zo(this,"__height"),Zo(this,"__rest"),this.__src=t,this.__title=r,this.__altText=n,this.__width=i??"inherit",this.__height=o??"inherit",this.__rest=l??[]}static getType(){return"image"}static clone(t){return new kw(t.__src,t.__altText,t.__title,t.__width,t.__height,t.__rest,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__src=t.__src,this.__altText=t.__altText,this.__title=t.__title,this.__width=t.__width,this.__height=t.__height,this.__rest=t.__rest}static importJSON(t){const{altText:n,title:r,src:i,width:o,rest:l,height:a}=t;return Uo({altText:n,title:r,src:i,height:a,width:o,rest:l})}exportDOM(){const t=document.createElement("img");return t.setAttribute("src",this.__src),t.setAttribute("alt",this.__altText),this.__title&&t.setAttribute("title",this.__title),this.__width!=="inherit"&&this.__width&&t.setAttribute("width",this.__width.toString()),this.__height!=="inherit"&&this.__height&&t.setAttribute("height",this.__height.toString()),{element:t}}static importDOM(){return{img:s(()=>({conversion:PF,priority:0}),"img")}}exportJSON(){return{altText:this.getAltText(),title:this.getTitle(),height:this.__height==="inherit"?void 0:this.__height,width:this.__width==="inherit"?void 0:this.__width,src:this.getSrc(),rest:this.__rest,type:"image",version:1}}setWidthAndHeight(t,n){const r=this.getWritable();r.__width=t,r.__height=n}createDOM(t,n){const r=document.createElement("span"),i=t.theme.image;return i!==void 0&&(r.className=i),r}updateDOM(){return!1}getSrc(){return this.__src}getAltText(){return this.__altText}getTitle(){return this.__title}getHeight(){return this.__height}getWidth(){return this.__width}getRest(){return this.__rest}setTitle(t){this.getWritable().__title=t}setSrc(t){this.getWritable().__src=t}setAltText(t){this.getWritable().__altText=t??""}shouldBeSerializedAsElement(){return this.__width!=="inherit"||this.__height!=="inherit"||this.__rest.length>0}decorate(t){return m.createElement(RF,{src:this.getSrc(),title:this.getTitle(),nodeKey:this.getKey(),width:this.__width,height:this.__height,alt:this.__altText,rest:this.__rest})}};function Uo(e){const{altText:t,title:n,src:r,key:i,width:o,height:l,rest:a}=e;return new J1(r,t,n,o,l,a,i)}s(Uo,"$createImageNode");function qu(e){return e instanceof J1}s(qu,"$isImageNode");var FF={testLexicalNode:qu,visitLexicalNode({mdastParent:e,lexicalNode:t,actions:n}){if(t.shouldBeSerializedAsElement()){const r=new Image;t.getHeight()!=="inherit"&&(r.height=t.getHeight()),t.getWidth()!=="inherit"&&(r.width=t.getWidth()),t.getAltText()&&(r.alt=t.getAltText()),t.getTitle()&&(r.title=t.getTitle());for(const i of t.getRest())i.type==="mdxJsxAttribute"&&typeof i.value=="string"&&r.setAttribute(i.name,i.value);n.appendToParent(e,{type:"html",value:r.outerHTML.replace(/>$/,` src="${t.getSrc()}" />`)})}else n.appendToParent(e,{type:"image",url:t.getSrc(),alt:t.getAltText(),title:t.getTitle()})}},VF={testNode:"image",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Uo({src:e.url,altText:e.alt??"",title:e.title??""}))}},BF={testNode:s(e=>e.type==="html"&&e.value.trim().startsWith("<img"),"testNode"),visitNode({mdastNode:e,lexicalParent:t}){const n=document.createElement("div");n.innerHTML=e.value;const r=n.querySelector("img");if(!r)throw new Error("Invalid HTML image");const i=r.src,o=r.alt,l=r.title,a=r.width,c=r.height,d=Uo({src:i||"",altText:o,title:l,width:a||void 0,height:c||void 0});if(t.getType()==="root"){const u=Qe();u.append(d),t.append(u)}else t.append(d)}};function sl(e,t){const n=e.attributes.find(r=>r.type==="mdxJsxAttribute"&&r.name===t);if(n)return n.value}s(sl,"getAttributeValue");var HF={testNode:s(e=>(e.type==="mdxJsxTextElement"||e.type==="mdxJsxFlowElement")&&e.name==="img","testNode"),visitNode({mdastNode:e,lexicalParent:t}){const n=sl(e,"src");if(!n)return;const r=sl(e,"alt")??"",i=sl(e,"title"),o=sl(e,"height"),l=sl(e,"width"),a=e.attributes.filter(d=>d.type==="mdxJsxAttribute"&&!["src","alt","title","height","width"].includes(d.name)),c=Uo({src:n,altText:r,title:i,width:l?parseInt(l,10):void 0,height:o?parseInt(o,10):void 0,rest:a});if(t.getType()==="root"){const d=Qe();d.append(c),t.append(d)}else t.append(c)}},G1=kt(e=>{e.sub(e.pipe(G1,mt(pt)),([t,n])=>{n?.update(()=>{const r=Uo({altText:t.altText??"",src:t.src,title:t.title??"",width:Ms(t.width),height:Ms(t.height)});Vs([r]),bn(r.getParentOrThrow())&&Am(r,Qe).selectEnd()})})}),KF=kt(e=>{e.sub(e.pipe(KF,mt(Li)),([t,n])=>{const r=s(i=>{e.pub(G1,{...t,src:i})},"handler");"file"in t?n?.(t.file).then(r).catch(i=>{throw i}):r(t.src)})}),Lg=fe([]),$g=fe(!1),Li=fe(null),Pg=fe(null),Fg=fe(null),Co=fe({type:"inactive"},e=>{e.sub(e.pipe(Nw,mt(pt,Li,Co,ua)),([t,n,r,i,o])=>{const l=i.type==="editing"?a=>{n?.update(()=>{const{nodeKey:c}=i,d=Cn(c);if(d.setTitle(t.title),d.setAltText(t.altText),d.setSrc(a),o){const u=Ms(t.width),f=Ms(t.height);d.setWidthAndHeight(u??"inherit",f??"inherit")}}),e.pub(Co,{type:"inactive"})}:a=>{e.pub(G1,{...t,src:a}),e.pub(Co,{type:"inactive"})};t.file&&t.file.length>0?r?.(t.file.item(0)).then(l).catch(a=>{throw a}):t.src&&l(t.src)}),e.pub(sa,t=>{const n=e.getValue(Li);return It(t.registerCommand(Zu,r=>{const i=Uo(r);return Vs([i]),bn(i.getParentOrThrow())&&Am(i,Qe).selectEnd(),!0},Ie),t.registerCommand(Em,r=>JF(r),Ql),t.registerCommand($b,r=>GF(r,!!n),st),t.registerCommand(Pb,r=>qF(r,t,e.getValue(Li)),Ql),t.registerCommand(ea,r=>{var i,o;if(!n){let c=Array.from(((i=r.clipboardData)==null?void 0:i.items)??[]);return c=c.filter(d=>d.type.includes("text")),!c.length||c.length===0}const l=Array.from(((o=r.clipboardData)==null?void 0:o.items)??[]);if(l.some(c=>!c.type.includes("image"))||!l.length||l.length===0)return!1;const a=e.getValue(Li);return Promise.all(l.map(c=>a(c.getAsFile()))).then(c=>{c.forEach(d=>{t.dispatchCommand(Zu,{src:d,altText:""})})}).catch(c=>{throw c}),!0},Vr))})}),UF=Xi(e=>{e.link(e.pipe(UF,HC({type:"new"})),Co)}),Mw=kt(e=>{e.link(e.pipe(Mw,Hi(t=>({type:"editing",...t}))),Co)}),Aw=Xi(e=>{e.link(e.pipe(Aw,HC({type:"inactive"})),Co)}),Iw=fe(!1),ua=fe(!1),Nw=kt(),Vg=fe(Mg),Ms=s(e=>{if(typeof e>"u")return;const t=parseInt(String(e),10);return Number.isNaN(t)?void 0:t},"parseImageDimension"),WF=Sn({init(e,t){e.pubIn({[Hr]:[VF,BF,HF],[_i]:J1,[yi]:FF,[Ws]:t?.ImageDialog??AF,[Li]:t?.imageUploadHandler??null,[Lg]:t?.imageAutocompleteSuggestions??[],[$g]:!!t?.disableImageResize,[Iw]:!!t?.disableImageSettingsButton,[ua]:!!t?.allowSetImageDimensions,[Pg]:t?.imagePreviewHandler??null,[Vg]:t?.EditImageToolbar??Mg,[Fg]:t?.imagePlaceholder??hy})},update(e,t){e.pubIn({[Li]:t?.imageUploadHandler??null,[Lg]:t?.imageAutocompleteSuggestions??[],[$g]:!!t?.disableImageResize,[Pg]:t?.imagePreviewHandler??null,[ua]:!!t?.allowSetImageDimensions,[Vg]:t?.EditImageToolbar??Mg,[Fg]:t?.imagePlaceholder??hy})}}),zF=s(e=>sS?(e??window).getSelection():null,"getDOMSelection"),Zu=kr("INSERT_IMAGE_COMMAND"),jF="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function JF(e){const t=q1();if(!t)return!1;const n=e.dataTransfer;if(!n)return!1;n.setData("text/plain","_");const r=document.createElement("img");return r.src=jF,n.setDragImage(r,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{altText:t.__altText,title:t.__title,key:t.getKey(),src:t.__src},type:"image"})),!0}s(JF,"onDragStart");function GF(e,t){var n;if(t){let r=Array.from(((n=e.dataTransfer)==null?void 0:n.items)??[]);if(r=r.filter(i=>i.type.includes("image")),r.length>0)return e.preventDefault(),!0}return q1()?(Ow(e)||e.preventDefault(),!0):!1}s(GF,"onDragover");function qF(e,t,n){var r;let i=Array.from(((r=e.dataTransfer)==null?void 0:r.items)??[]);if(i=i.filter(a=>a.type.includes("image")),i.length>0&&n!==null)return e.preventDefault(),Promise.all(i.map(a=>a.kind==="string"?new Promise(c=>{a.getAsString(c)}):n(a.getAsFile()))).then(a=>{a.forEach(c=>{t.dispatchCommand(Zu,{src:c,altText:""})})}).catch(a=>{throw a}),!0;const o=q1();if(!o)return!1;const l=ZF(e);if(!l)return!1;if(e.preventDefault(),Ow(e)){const a=YF(e);o.remove();const c=Ad();a!=null&&c.applyDOMRange(a),nr(c),t.dispatchCommand(Zu,l)}return!0}s(qF,"onDrop");function q1(){const e=ie();if(!He(e))return null;const t=e.getNodes()[0];return qu(t)?t:null}s(q1,"getImageNodeInSelection");function ZF(e){var t;const n=(t=e.dataTransfer)==null?void 0:t.getData("application/x-lexical-drag");if(!n)return null;const{type:r,data:i}=JSON.parse(n);return r!=="image"?null:i}s(ZF,"getDragImageData");function Ow(e){const t=e.target;return!!(t&&t instanceof HTMLElement&&t.parentElement)}s(Ow,"canDropImage");function YF(e){let t;const n=e.target,r=n==null?null:n.nodeType===9?n.defaultView:n.ownerDocument.defaultView,i=zF(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&i!==null)i.collapse(e.rangeParent,e.rangeOffset??0),t=i.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}s(YF,"getDragSelection");var XF={testNode:"blockquote",visitNode({actions:e}){e.addAndStepInto(Us())}},QF={testLexicalNode:sg,visitLexicalNode:s(({actions:e})=>{e.addAndStepInto("blockquote")},"visitLexicalNode")},eV=Sn({init(e){e.pubIn({[zs]:"quote",[Hr]:XF,[_i]:Hd,[yi]:QF})}});function $y(){let e=yo;return{publish:s(()=>{e()},"publish"),subscribe:s(t=>{e=t},"subscribe")}}s($y,"voidEmitter");function Dw(e,t,n,r){const i=[...e].sort((l,a)=>a.priority-l.priority),o=n??"";return i.find(l=>l.match(t??"",o))??i.find(l=>l.match(r??"",o))}s(Dw,"findCodeBlockDescriptor");var tV=Object.defineProperty,nV=s((e,t,n)=>t in e?tV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,"__defNormalProp"),Si=s((e,t,n)=>nV(e,typeof t!="symbol"?t+"":t,n),"__publicField"),Qd=class Rw extends Fa{static{s(this,"CodeBlockNode")}constructor(t,n,r,i){super(i),Si(this,"__code"),Si(this,"__meta"),Si(this,"__language"),Si(this,"__focusEmitter",$y()),Si(this,"setCode",o=>{o!==this.__code&&(this.getWritable().__code=o)}),Si(this,"setMeta",o=>{o!==this.__meta&&(this.getWritable().__meta=o)}),Si(this,"setLanguage",o=>{o!==this.__language&&(this.getWritable().__language=o)}),Si(this,"select",()=>{this.__focusEmitter.publish()}),this.__code=t,this.__meta=r,this.__language=n}static getType(){return"codeblock"}static clone(t){return new Rw(t.__code,t.__language,t.__meta,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__code=t.__code,this.__meta=t.__meta,this.__language=t.__language,this.__focusEmitter=$y()}static importJSON(t){return qa({code:typeof t.code=="string"?t.code:"",language:typeof t.language=="string"?t.language:"",meta:typeof t.meta=="string"?t.meta:""})}static importDOM(){return{pre:s(()=>({conversion:sV,priority:3}),"pre")}}exportJSON(){return{code:this.getCode(),language:this.getLanguage(),meta:this.getMeta(),type:"codeblock",version:1}}createDOM(t,n){return document.createElement("div")}updateDOM(){return!1}getCode(){return this.__code}getMeta(){return this.__meta}getLanguage(){return this.__language}decorate(t){return m.createElement(iV,{parentEditor:t,code:this.getCode(),meta:this.getMeta(),language:this.getLanguage(),codeBlockNode:this,nodeKey:this.getKey(),focusEmitter:this.__focusEmitter})}isInline(){return!1}},Lw=m.createContext(null),rV=s(({parentEditor:e,lexicalNode:t,children:n})=>{const r=m.useMemo(()=>({lexicalNode:t,parentEditor:e,setCode:s(i=>{e.update(()=>{t.setCode(i),setTimeout(()=>{e.dispatchCommand(ia,void 0)},0)})},"setCode"),setLanguage:s(i=>{e.update(()=>{t.setLanguage(i)})},"setLanguage"),setMeta:s(i=>{e.update(()=>{t.setMeta(i)})},"setMeta")}),[t,e]);return m.createElement(Lw.Provider,{value:r},n)},"CodeBlockEditorContextProvider");function Bg(){const e=m.useContext(Lw);if(!e)throw new Error("useCodeBlockEditor must be used within a CodeBlockEditor");return e}s(Bg,"useCodeBlockEditorContext");var iV=s(e=>{const t=li(za),n=li(ks),r=Dw(t,e.language,e.meta,n);if(!r)throw new Error(`No CodeBlockEditor registered for language=${e.language} meta=${e.meta}`);const i=r.Editor,{codeBlockNode:o,parentEditor:l,...a}=e;return m.createElement(rV,{parentEditor:e.parentEditor,lexicalNode:e.codeBlockNode},m.createElement(i,{...a}))},"CodeBlockEditorContainer");function qa(e){const{code:t="",language:n="",meta:r=""}=e;return new Qd(t,n,r)}s(qa,"$createCodeBlockNode");function oV(e){return e instanceof Qd}s(oV,"$isCodeBlockNode");function sV(e){const t=e,n=t.textContent,r=e.getAttribute("class")??"",i=e.getAttribute("data-language")??"",o=/language-(\w+)/.exec(r);return{node:qa({code:n,language:o?o[1]:i,meta:t.getAttribute("data-meta")??""})}}s(sV,"$convertPreElement");var lV={testLexicalNode:oV,visitLexicalNode:s(({lexicalNode:e,actions:t})=>{t.addAndStepInto("code",{value:e.getCode(),lang:e.getLanguage(),meta:e.getMeta()})},"visitLexicalNode")},aV={testNode:s((e,{codeBlockEditorDescriptors:t,defaultCodeBlockLanguage:n})=>e.type==="code"?Dw(t,e.lang,e.meta,n)!==void 0:!1,"testNode"),visitNode({mdastNode:e,actions:t}){t.addAndStepInto(qa({code:e.value,language:e.lang??"",meta:e.meta??""}))}},$w=kt(e=>{e.link(e.pipe($w,mt(ks),Hi(([t,n])=>()=>qa({language:n,...t}))),Gm)}),cV=on(za),uV=Sn({update(e,t){e.pub(ks,t?.defaultCodeBlockLanguage??"")},init(e,t){e.pubIn({[zs]:"codeblock",[ks]:t?.defaultCodeBlockLanguage??"",[za]:t?.codeBlockEditorDescriptors??[],[Hr]:aV,[_i]:Qd,[yi]:lV})}});function U(e){return new nM(G9.define(e))}s(U,"legacy");function wi(e){return V(()=>import("./dist-C2jegCUe.js").then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1,2,3]))}s(wi,"sql");var dV=[P.of({name:"C",extensions:["c","h","ino"],load(){return V(()=>import("./dist-DsLYqWnM.js").then(e=>e.cpp()),__vite__mapDeps([4,1,3]))}}),P.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return V(()=>import("./dist-DsLYqWnM.js").then(e=>e.cpp()),__vite__mapDeps([4,1,3]))}}),P.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return wi("Cassandra")}}),P.of({name:"CSS",extensions:["css"],load(){return V(()=>import("./dist-CWrRKmYk.js").then(e=>e.i).then(e=>e.css()),__vite__mapDeps([5,6,1,3]))}}),P.of({name:"Go",extensions:["go"],load(){return V(()=>import("./dist-BX-OCtve.js").then(e=>e.go()),__vite__mapDeps([7,1,2,3]))}}),P.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return V(()=>import("./dist-BeN6V24C.js").then(e=>e.html()),__vite__mapDeps([8,1,3,5,6,9,2]))}}),P.of({name:"Java",extensions:["java"],load(){return V(()=>import("./dist-xQwUswee.js").then(e=>e.java()),__vite__mapDeps([10,1,3]))}}),P.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return V(()=>import("./dist-sLIQSVjm.js").then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([9,6,1,2,3]))}}),P.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return V(()=>import("./dist-DKJ0FdKS.js").then(e=>e.jinja()),__vite__mapDeps([11,1,3,8,5,6,9,2]))}}),P.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return V(()=>import("./dist-YH7EZ8d1.js").then(e=>e.json()),__vite__mapDeps([12,1,3]))}}),P.of({name:"JSX",extensions:["jsx"],load(){return V(()=>import("./dist-sLIQSVjm.js").then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([9,6,1,2,3]))}}),P.of({name:"LESS",extensions:["less"],load(){return V(()=>import("./dist-oQmcCiSD.js").then(e=>e.less()),__vite__mapDeps([13,1,3,5,6]))}}),P.of({name:"Liquid",extensions:["liquid"],load(){return V(()=>import("./dist-CSbL7rtN.js").then(e=>e.liquid()),__vite__mapDeps([14,1,3,8,5,6,9,2]))}}),P.of({name:"MariaDB SQL",load(){return wi("MariaSQL")}}),P.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return V(()=>import("./dist-C8CoeHVO.js").then(e=>e.markdown()),__vite__mapDeps([15,1,2,8,3,5,6,9]))}}),P.of({name:"MS SQL",load(){return wi("MSSQL")}}),P.of({name:"MySQL",load(){return wi("MySQL")}}),P.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return V(()=>import("./dist-CBo4NvFW.js").then(e=>e.php()),__vite__mapDeps([16,1,3,8,5,6,9,2]))}}),P.of({name:"PLSQL",extensions:["pls"],load(){return wi("PLSQL")}}),P.of({name:"PostgreSQL",load(){return wi("PostgreSQL")}}),P.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return V(()=>import("./dist-DyyIM2uF.js").then(e=>e.python()),__vite__mapDeps([17,1,2,3]))}}),P.of({name:"Rust",extensions:["rs"],load(){return V(()=>import("./dist-DpmnjHX9.js").then(e=>e.rust()),__vite__mapDeps([18,1,3]))}}),P.of({name:"Sass",extensions:["sass"],load(){return V(()=>import("./dist-B0TRtKS8.js").then(e=>e.sass({indented:!0})),__vite__mapDeps([19,1,3,5,6]))}}),P.of({name:"SCSS",extensions:["scss"],load(){return V(()=>import("./dist-B0TRtKS8.js").then(e=>e.sass()),__vite__mapDeps([19,1,3,5,6]))}}),P.of({name:"SQL",extensions:["sql"],load(){return wi("StandardSQL")}}),P.of({name:"SQLite",load(){return wi("SQLite")}}),P.of({name:"TSX",extensions:["tsx"],load(){return V(()=>import("./dist-sLIQSVjm.js").then(e=>e.t).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([9,6,1,2,3]))}}),P.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return V(()=>import("./dist-sLIQSVjm.js").then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([9,6,1,2,3]))}}),P.of({name:"WebAssembly",extensions:["wat","wast"],load(){return V(()=>import("./dist-DoBOMP6Y.js").then(e=>e.wast()),__vite__mapDeps([20,1,3]))}}),P.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return V(()=>import("./dist-CXeuJs-w.js").then(e=>e.xml()),__vite__mapDeps([21,1,3]))}}),P.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return V(()=>import("./dist-DZgNtG8a.js").then(e=>e.yaml()),__vite__mapDeps([22,1,3]))}}),P.of({name:"APL",extensions:["dyalog","apl"],load(){return V(()=>import("./apl-MHzTCvfx.js").then(e=>U(e.apl)),[])}}),P.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return V(()=>import("./asciiarmor-DFLNSgns.js").then(e=>U(e.asciiArmor)),[])}}),P.of({name:"ASN.1",extensions:["asn","asn1"],load(){return V(()=>import("./asn1-CfPVWRYE.js").then(e=>U(e.asn1({}))),[])}}),P.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return V(()=>import("./asterisk-CJ4OeA7Y.js").then(e=>U(e.asterisk)),[])}}),P.of({name:"Brainfuck",extensions:["b","bf"],load(){return V(()=>import("./brainfuck-NEHkmXMc.js").then(e=>U(e.brainfuck)),[])}}),P.of({name:"Cobol",extensions:["cob","cpy"],load(){return V(()=>import("./cobol-Bo8Zw9gB.js").then(e=>U(e.cobol)),[])}}),P.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>U(e.csharp)),[])}}),P.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return V(()=>import("./clojure-DFaIEz5O.js").then(e=>U(e.clojure)),[])}}),P.of({name:"ClojureScript",extensions:["cljs"],load(){return V(()=>import("./clojure-DFaIEz5O.js").then(e=>U(e.clojure)),[])}}),P.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return V(()=>import("./css-DEZwfVpY.js").then(e=>U(e.gss)),[])}}),P.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return V(()=>import("./cmake-koz-qBlo.js").then(e=>U(e.cmake)),[])}}),P.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return V(()=>import("./coffeescript-CXYzYf-Y.js").then(e=>U(e.coffeeScript)),[])}}),P.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return V(()=>import("./commonlisp-C4OOCwkD.js").then(e=>U(e.commonLisp)),[])}}),P.of({name:"Cypher",extensions:["cyp","cypher"],load(){return V(()=>import("./cypher-z2oFsVv2.js").then(e=>U(e.cypher)),[])}}),P.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return V(()=>import("./python-C2DOnsac.js").then(e=>U(e.cython)),[])}}),P.of({name:"Crystal",extensions:["cr"],load(){return V(()=>import("./crystal-BlJXQDvy.js").then(e=>U(e.crystal)),[])}}),P.of({name:"D",extensions:["d"],load(){return V(()=>import("./d-Dkt6y7AQ.js").then(e=>U(e.d)),[])}}),P.of({name:"Dart",extensions:["dart"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>U(e.dart)),[])}}),P.of({name:"diff",extensions:["diff","patch"],load(){return V(()=>import("./diff-C60bAYOU.js").then(e=>U(e.diff)),[])}}),P.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return V(()=>import("./dockerfile-BttNdtK0.js").then(e=>U(e.dockerFile)),__vite__mapDeps([23,24]))}}),P.of({name:"DTD",extensions:["dtd"],load(){return V(()=>import("./dtd-CCVZU5Da.js").then(e=>U(e.dtd)),[])}}),P.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return V(()=>import("./dylan-3pmV5wzs.js").then(e=>U(e.dylan)),[])}}),P.of({name:"EBNF",load(){return V(()=>import("./ebnf-bm-I2WIh.js").then(e=>U(e.ebnf)),[])}}),P.of({name:"ECL",extensions:["ecl"],load(){return V(()=>import("./ecl-BIv3PrZb.js").then(e=>U(e.ecl)),[])}}),P.of({name:"edn",extensions:["edn"],load(){return V(()=>import("./clojure-DFaIEz5O.js").then(e=>U(e.clojure)),[])}}),P.of({name:"Eiffel",extensions:["e"],load(){return V(()=>import("./eiffel-DuLnr4-r.js").then(e=>U(e.eiffel)),[])}}),P.of({name:"Elm",extensions:["elm"],load(){return V(()=>import("./elm-njbaCU-L.js").then(e=>U(e.elm)),[])}}),P.of({name:"Erlang",extensions:["erl"],load(){return V(()=>import("./erlang-CuhOC2I8.js").then(e=>U(e.erlang)),[])}}),P.of({name:"Esper",load(){return V(()=>import("./sql-C3kWxFGw.js").then(e=>U(e.esper)),[])}}),P.of({name:"Factor",extensions:["factor"],load(){return V(()=>import("./factor-CM3-9V3b.js").then(e=>U(e.factor)),__vite__mapDeps([25,24]))}}),P.of({name:"FCL",load(){return V(()=>import("./fcl-nWsMJ92o.js").then(e=>U(e.fcl)),[])}}),P.of({name:"Forth",extensions:["forth","fth","4th"],load(){return V(()=>import("./forth-BQ9HrCVY.js").then(e=>U(e.forth)),[])}}),P.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return V(()=>import("./fortran-DHJe28ev.js").then(e=>U(e.fortran)),[])}}),P.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return V(()=>import("./mllike-DuNQsEw8.js").then(e=>U(e.fSharp)),[])}}),P.of({name:"Gas",extensions:["s"],load(){return V(()=>import("./gas-ByO0qYMr.js").then(e=>U(e.gas)),[])}}),P.of({name:"Gherkin",extensions:["feature"],load(){return V(()=>import("./gherkin-CwOmHL5K.js").then(e=>U(e.gherkin)),[])}}),P.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return V(()=>import("./groovy-ByXGF8cx.js").then(e=>U(e.groovy)),[])}}),P.of({name:"Haskell",extensions:["hs"],load(){return V(()=>import("./haskell-CHSpCNOy.js").then(e=>U(e.haskell)),[])}}),P.of({name:"Haxe",extensions:["hx"],load(){return V(()=>import("./haxe-P2jh68ck.js").then(e=>U(e.haxe)),[])}}),P.of({name:"HXML",extensions:["hxml"],load(){return V(()=>import("./haxe-P2jh68ck.js").then(e=>U(e.hxml)),[])}}),P.of({name:"HTTP",load(){return V(()=>import("./http-0jwMmfWP.js").then(e=>U(e.http)),[])}}),P.of({name:"IDL",extensions:["pro"],load(){return V(()=>import("./idl-DTVVj6r5.js").then(e=>U(e.idl)),[])}}),P.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return V(()=>import("./javascript-Cblpdx44.js").then(e=>U(e.jsonld)),[])}}),P.of({name:"Julia",extensions:["jl"],load(){return V(()=>import("./julia-KVJvUu_F.js").then(e=>U(e.julia)),[])}}),P.of({name:"Kotlin",extensions:["kt","kts"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>U(e.kotlin)),[])}}),P.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return V(()=>import("./livescript-DSHsJPcD.js").then(e=>U(e.liveScript)),[])}}),P.of({name:"Lua",extensions:["lua"],load(){return V(()=>import("./lua-Vher-70I.js").then(e=>U(e.lua)),[])}}),P.of({name:"mIRC",extensions:["mrc"],load(){return V(()=>import("./mirc-BGWbO906.js").then(e=>U(e.mirc)),[])}}),P.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return V(()=>import("./mathematica-CE9SaVsW.js").then(e=>U(e.mathematica)),[])}}),P.of({name:"Modelica",extensions:["mo"],load(){return V(()=>import("./modelica-5XCgKQt8.js").then(e=>U(e.modelica)),[])}}),P.of({name:"MUMPS",extensions:["mps"],load(){return V(()=>import("./mumps-C7oS353s.js").then(e=>U(e.mumps)),[])}}),P.of({name:"Mbox",extensions:["mbox"],load(){return V(()=>import("./mbox-JGl1Fgvq.js").then(e=>U(e.mbox)),[])}}),P.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return V(()=>import("./nginx-DXVlpyCz.js").then(e=>U(e.nginx)),[])}}),P.of({name:"NSIS",extensions:["nsh","nsi"],load(){return V(()=>import("./nsis-KFC6hioG.js").then(e=>U(e.nsis)),__vite__mapDeps([26,24]))}}),P.of({name:"NTriples",extensions:["nt","nq"],load(){return V(()=>import("./ntriples-5ckCopnn.js").then(e=>U(e.ntriples)),[])}}),P.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>U(e.objectiveC)),[])}}),P.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>U(e.objectiveCpp)),[])}}),P.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return V(()=>import("./mllike-DuNQsEw8.js").then(e=>U(e.oCaml)),[])}}),P.of({name:"Octave",extensions:["m"],load(){return V(()=>import("./octave-D1J2QQNt.js").then(e=>U(e.octave)),[])}}),P.of({name:"Oz",extensions:["oz"],load(){return V(()=>import("./oz-CPsllMDD.js").then(e=>U(e.oz)),[])}}),P.of({name:"Pascal",extensions:["p","pas"],load(){return V(()=>import("./pascal-B-I6JP0Y.js").then(e=>U(e.pascal)),[])}}),P.of({name:"Perl",extensions:["pl","pm"],load(){return V(()=>import("./perl-CI8WIWBi.js").then(e=>U(e.perl)),[])}}),P.of({name:"Pig",extensions:["pig"],load(){return V(()=>import("./pig-FQI0W3S3.js").then(e=>U(e.pig)),[])}}),P.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return V(()=>import("./powershell-BAu6x78A.js").then(e=>U(e.powerShell)),[])}}),P.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return V(()=>import("./properties-BKTTDgau.js").then(e=>U(e.properties)),[])}}),P.of({name:"ProtoBuf",extensions:["proto"],load(){return V(()=>import("./protobuf-UWh8gh_j.js").then(e=>U(e.protobuf)),[])}}),P.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return V(()=>import("./pug-C20tNwmy.js").then(e=>U(e.pug)),__vite__mapDeps([27,28]))}}),P.of({name:"Puppet",extensions:["pp"],load(){return V(()=>import("./puppet-BAHVzCkO.js").then(e=>U(e.puppet)),[])}}),P.of({name:"Q",extensions:["q"],load(){return V(()=>import("./q-Cooe-Nh8.js").then(e=>U(e.q)),[])}}),P.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return V(()=>import("./r-CktBKya9.js").then(e=>U(e.r)),[])}}),P.of({name:"RPM Changes",load(){return V(()=>import("./rpm-Csj9nLHl.js").then(e=>U(e.rpmChanges)),[])}}),P.of({name:"RPM Spec",extensions:["spec"],load(){return V(()=>import("./rpm-Csj9nLHl.js").then(e=>U(e.rpmSpec)),[])}}),P.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return V(()=>import("./ruby-bGx9eo-K.js").then(e=>U(e.ruby)),[])}}),P.of({name:"SAS",extensions:["sas"],load(){return V(()=>import("./sas-Drou_EQ9.js").then(e=>U(e.sas)),[])}}),P.of({name:"Scala",extensions:["scala"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>U(e.scala)),[])}}),P.of({name:"Scheme",extensions:["scm","ss"],load(){return V(()=>import("./scheme-DcjG9bAf.js").then(e=>U(e.scheme)),[])}}),P.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return V(()=>import("./shell-BSKClwid.js").then(e=>U(e.shell)),[])}}),P.of({name:"Sieve",extensions:["siv","sieve"],load(){return V(()=>import("./sieve-CcvsXPZo.js").then(e=>U(e.sieve)),[])}}),P.of({name:"Smalltalk",extensions:["st"],load(){return V(()=>import("./smalltalk-Cmg-4mjQ.js").then(e=>U(e.smalltalk)),[])}}),P.of({name:"Solr",load(){return V(()=>import("./solr-Dj8ahEwG.js").then(e=>U(e.solr)),[])}}),P.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return V(()=>import("./mllike-DuNQsEw8.js").then(e=>U(e.sml)),[])}}),P.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return V(()=>import("./sparql-LAJYmgfk.js").then(e=>U(e.sparql)),[])}}),P.of({name:"Spreadsheet",alias:["excel","formula"],load(){return V(()=>import("./spreadsheet-B8doD_pL.js").then(e=>U(e.spreadsheet)),[])}}),P.of({name:"Squirrel",extensions:["nut"],load(){return V(()=>import("./clike-CIx9nZSv.js").then(e=>U(e.squirrel)),[])}}),P.of({name:"Stylus",extensions:["styl"],load(){return V(()=>import("./stylus-BS-Ienrc.js").then(e=>U(e.stylus)),[])}}),P.of({name:"Swift",extensions:["swift"],load(){return V(()=>import("./swift-BD82LMDK.js").then(e=>U(e.swift)),[])}}),P.of({name:"sTeX",load(){return V(()=>import("./stex-CW6K5Nmu.js").then(e=>U(e.stex)),[])}}),P.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return V(()=>import("./stex-CW6K5Nmu.js").then(e=>U(e.stex)),[])}}),P.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return V(()=>import("./verilog-BVYlmXGg.js").then(e=>U(e.verilog)),[])}}),P.of({name:"Tcl",extensions:["tcl"],load(){return V(()=>import("./tcl-RZa1cqc-.js").then(e=>U(e.tcl)),[])}}),P.of({name:"Textile",extensions:["textile"],load(){return V(()=>import("./textile-C-BY_OGF.js").then(e=>U(e.textile)),[])}}),P.of({name:"TiddlyWiki",load(){return V(()=>import("./tiddlywiki-C9bm_Oju.js").then(e=>U(e.tiddlyWiki)),[])}}),P.of({name:"Tiki wiki",load(){return V(()=>import("./tiki-DJOT-rFT.js").then(e=>U(e.tiki)),[])}}),P.of({name:"TOML",extensions:["toml"],load(){return V(()=>import("./toml-Civ2fTsu.js").then(e=>U(e.toml)),[])}}),P.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return V(()=>import("./troff-Lns35Xcq.js").then(e=>U(e.troff)),[])}}),P.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return V(()=>import("./ttcn-7vlxVTUK.js").then(e=>U(e.ttcn)),[])}}),P.of({name:"TTCN_CFG",extensions:["cfg"],load(){return V(()=>import("./ttcn-cfg-B8qhhp6o.js").then(e=>U(e.ttcnCfg)),[])}}),P.of({name:"Turtle",extensions:["ttl"],load(){return V(()=>import("./turtle-DTIS1YQ7.js").then(e=>U(e.turtle)),[])}}),P.of({name:"Web IDL",extensions:["webidl"],load(){return V(()=>import("./webidl-ChvzbZ5-.js").then(e=>U(e.webIDL)),[])}}),P.of({name:"VB.NET",extensions:["vb"],load(){return V(()=>import("./vb-BO8UacKu.js").then(e=>U(e.vb)),[])}}),P.of({name:"VBScript",extensions:["vbs"],load(){return V(()=>import("./vbscript-DWLru3lT.js").then(e=>U(e.vbScript)),[])}}),P.of({name:"Velocity",extensions:["vtl"],load(){return V(()=>import("./velocity-BIIn-Nl2.js").then(e=>U(e.velocity)),[])}}),P.of({name:"Verilog",extensions:["v"],load(){return V(()=>import("./verilog-BVYlmXGg.js").then(e=>U(e.verilog)),[])}}),P.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return V(()=>import("./vhdl-Cn8cC8Yb.js").then(e=>U(e.vhdl)),[])}}),P.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return V(()=>import("./xquery-BKN7qEbU.js").then(e=>U(e.xQuery)),[])}}),P.of({name:"Yacas",extensions:["ys"],load(){return V(()=>import("./yacas-BG9ha7tU.js").then(e=>U(e.yacas)),[])}}),P.of({name:"Z80",extensions:["z80"],load(){return V(()=>import("./z80-CB2cGLew.js").then(e=>U(e.z80)),[])}}),P.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return V(()=>import("./mscgen-mVFg19ri.js").then(e=>U(e.mscgen)),[])}}),P.of({name:"Xù",extensions:["xu"],load(){return V(()=>import("./mscgen-mVFg19ri.js").then(e=>U(e.xu)),[])}}),P.of({name:"MsGenny",extensions:["msgenny"],load(){return V(()=>import("./mscgen-mVFg19ri.js").then(e=>U(e.msgenny)),[])}}),P.of({name:"Vue",extensions:["vue"],load(){return V(()=>import("./dist-BuzarGBs.js").then(e=>e.vue()),__vite__mapDeps([29,1,3,9,6,2,8,5]))}}),P.of({name:"Angular Template",load(){return V(()=>import("./dist-BRrJTSwu.js").then(e=>e.angular()),__vite__mapDeps([30,1,3,9,6,2,8,5]))}})],Py=cd.define(),fV=Lo.define(),da=class dl{static{s(this,"HistEvent$1")}constructor(t,n,r,i,o){this.changes=t,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(t){return new dl(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,n,r;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(t){return new dl(t.changes&&iC.fromJSON(t.changes),[],t.mapped&&tC.fromJSON(t.mapped),t.startSelection&&Se.fromJSON(t.startSelection),t.selectionsAfter.map(Se.fromJSON))}static fromTransaction(t,n){let r=Jn;for(let i of t.startState.facet(fV)){let o=i(t);o.length&&(r=r.concat(o))}return!r.length&&t.changes.empty?null:new dl(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,Jn)}static selection(t){return new dl(void 0,Jn,void 0,void 0,t)}};function Hg(e,t,n,r){let i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}s(Hg,"updateBranch$1");function hV(e,t){let n=[],r=!1;return e.iterChangedRanges((i,o)=>n.push(i,o)),t.iterChangedRanges((i,o,l,a)=>{for(let c=0;c<n.length;){let d=n[c++],u=n[c++];a>=d&&l<=u&&(r=!0)}}),r}s(hV,"isAdjacent$1");function gV(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((n,r)=>n.empty!=t.ranges[r].empty).length===0}s(gV,"eqSelectionShape$1");function Pw(e,t){return e.length?t.length?e.concat(t):e:t}s(Pw,"conc$1");var Jn=[],pV=200;function mV(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-pV));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Hg(e,e.length-1,1e9,n.setSelAfter(r)))}else return[da.selection([t])]}s(mV,"addSelection$1");function vV(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}s(vV,"popSelection$1");function Wf(e,t){if(!e.length)return e;let n=e.length,r=Jn;for(;n;){let i=_V(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=e.slice(0,n);return o[n-1]=i,o}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[da.selection(r)]:Jn}s(Wf,"addMappingToBranch$1");function _V(e,t,n){let r=Pw(e.selectionsAfter.length?e.selectionsAfter.map(a=>a.map(t)):Jn,n);if(!e.changes)return da.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),l=e.mapped?e.mapped.composeDesc(o):o;return new da(i,rn.mapEffects(e.effects,t),l,e.startSelection.map(o),r)}s(_V,"mapEvent$1");var yV=/^(input\.type|delete)($|\.)/,Fy=class fl{static{s(this,"HistoryState$1")}constructor(t,n,r=0,i=void 0){this.done=t,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new fl(this.done,this.undone):this}addChanges(t,n,r,i,o){let l=this.done,a=l[l.length-1];return a&&a.changes&&!a.changes.empty&&t.changes&&(!r||yV.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,hV(a.changes,t.changes))||r=="input.type.compose")?l=Hg(l,l.length-1,i.minDepth,new da(t.changes.compose(a.changes),Pw(rn.mapEffects(t.effects,a.changes),a.effects),a.mapped,a.startSelection,Jn)):l=Hg(l,l.length,i.minDepth,t),new fl(l,Jn,n,r)}addSelection(t,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Jn;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&gV(o[o.length-1],t)?this:new fl(mV(this.done,t),this.undone,n,r)}addMapping(t){return new fl(Wf(this.done,t),Wf(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,n,r){let i=t==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],l=o.selectionsAfter[0]||(o.startSelection?o.startSelection.map(o.changes.invertedDesc,1):n.selection);if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:Py.of({side:t,rest:vV(i),selection:l}),userEvent:t==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let a=i.length==1?Jn:i.slice(0,i.length-1);return o.mapped&&(a=Wf(a,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:Py.of({side:t,rest:a,selection:l}),filter:!1,userEvent:t==0?"undo":"redo",scrollIntoView:!0})}else return null}};Fy.empty=new Fy(Jn,Jn);var Bj=typeof Intl<"u"&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function Fw(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let l=r.from;l<=r.to;){let a=e.doc.lineAt(l);a.number>n&&(r.empty||r.to>a.from)&&(t(a,i,r),n=a.number),l=a.to+1}let o=e.changes(i);return{changes:i,range:Se.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}s(Fw,"changeBySelectedLine$1");var xV=s(({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(Fw(e,(n,r)=>{r.push({from:n.from,insert:e.facet(Zx)})}),{userEvent:"input.indent"})),!0),"indentMore$1"),CV=s(({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(Fw(e,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=ad(i,e.tabSize),l=0,a=Rl(e,Math.max(0,o-Zc(e)));for(;l<i.length&&l<a.length&&i.charCodeAt(l)==a.charCodeAt(l);)l++;r.push({from:n.from+l,to:n.from+i.length,insert:a.slice(l)})}),{userEvent:"delete.dedent"})),!0),"indentLess$1"),bV={key:"Tab",run:xV,shift:CV},Vy="#2e3440",Z1="#3b4252",By="#434c5e",pc="#4c566a",Hy="#e5e9f0",Kg="#eceff4",zf="#8fbcbb",Ky="#88c0d0",EV="#81a1c1",cr="#5e81ac",TV="#bf616a",Yo="#d08770",jf="#ebcb8b",Uy="#a3be8c",SV="#b48ead",Wy="#d30102",Y1=Kg,Jf=Y1,wV="#ffffff",Gf=Z1,kV=Y1,zy=Z1,MV=dt.theme({"&":{color:Vy,backgroundColor:wV},".cm-content":{caretColor:zy},".cm-cursor, .cm-dropCursor":{borderLeftColor:zy},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:kV},".cm-panels":{backgroundColor:Y1,color:pc},".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 ${pc}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:Hy},".cm-activeLine":{backgroundColor:Jf},".cm-selectionMatch":{backgroundColor:Hy},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{outline:`1px solid ${pc}`},"&.cm-focused .cm-matchingBracket":{backgroundColor:Kg},".cm-gutters":{backgroundColor:Kg,color:Vy,border:"none"},".cm-activeLineGutter":{backgroundColor:Jf},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Gf},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Gf,borderBottomColor:Gf},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Jf,color:pc}}},{dark:!1}),AV=oM.define([{tag:ve.keyword,color:cr},{tag:[ve.name,ve.deleted,ve.character,ve.propertyName,ve.macroName],color:Yo},{tag:[ve.variableName],color:Yo},{tag:[ve.function(ve.variableName)],color:cr},{tag:[ve.labelName],color:EV},{tag:[ve.color,ve.constant(ve.name),ve.standard(ve.name)],color:cr},{tag:[ve.definition(ve.name),ve.separator],color:Uy},{tag:[ve.brace],color:zf},{tag:[ve.annotation],color:Wy},{tag:[ve.number,ve.changed,ve.annotation,ve.modifier,ve.self,ve.namespace],color:Ky},{tag:[ve.typeName,ve.className],color:jf},{tag:[ve.operator,ve.operatorKeyword],color:Uy},{tag:[ve.tagName],color:SV},{tag:[ve.squareBracket],color:TV},{tag:[ve.angleBracket],color:Yo},{tag:[ve.attributeName],color:jf},{tag:[ve.regexp],color:cr},{tag:[ve.quote],color:Z1},{tag:[ve.string],color:Yo},{tag:ve.link,color:zf,textDecoration:"underline",textUnderlinePosition:"under"},{tag:[ve.url,ve.escape,ve.special(ve.string)],color:Yo},{tag:[ve.meta],color:Ky},{tag:[ve.comment],color:By,fontStyle:"italic"},{tag:ve.strong,fontWeight:"bold",color:cr},{tag:ve.emphasis,fontStyle:"italic",color:cr},{tag:ve.strikethrough,textDecoration:"line-through"},{tag:ve.heading,fontWeight:"bold",color:cr},{tag:ve.special(ve.heading1),fontWeight:"bold",color:cr},{tag:ve.heading1,fontWeight:"bold",color:cr},{tag:[ve.heading2,ve.heading3,ve.heading4],fontWeight:"bold",color:cr},{tag:[ve.heading5,ve.heading6],color:cr},{tag:[ve.atom,ve.bool,ve.special(ve.variableName)],color:Yo},{tag:[ve.processingInstruction,ve.inserted],color:zf},{tag:[ve.contentSeparator],color:jf},{tag:ve.invalid,color:By,borderBottom:`1px dotted ${Wy}`}]),IV=[MV,qx(AV)],NV=s(e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=Q1(e.state,n.from);return r.line?OV(e):r.block?RV(e):!1},"toggleComment");function X1(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}s(X1,"command");var OV=X1(PV,0),DV=X1(Vw,0),RV=X1((e,t)=>Vw(e,t,$V(t)),0);function Q1(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}s(Q1,"getConfig");var mc=50;function LV(e,{open:t,close:n},r,i){let o=e.sliceDoc(r-mc,r),l=e.sliceDoc(i,i+mc),a=/\s*$/.exec(o)[0].length,c=/^\s*/.exec(l)[0].length,d=o.length-a;if(o.slice(d-t.length,d)==t&&l.slice(c,c+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+c,margin:c&&1}};let u,f;i-r<=100?u=f=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+mc),f=e.sliceDoc(i-mc,i));let h=/^\s*/.exec(u)[0].length,g=/\s*$/.exec(f)[0].length,p=f.length-g-n.length;return u.slice(h,h+t.length)==t&&f.slice(p,p+n.length)==n?{open:{pos:r+h+t.length,margin:/\s/.test(u.charAt(h+t.length))?1:0},close:{pos:i-g-n.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}s(LV,"findBlockComment");function $V(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let o=t.length-1;o>=0&&t[o].to>r.from?t[o].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}s($V,"selectedLineRanges");function Vw(e,t,n=t.selection.ranges){let r=n.map(o=>Q1(t,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,l)=>LV(t,r[l],o.from,o.to));if(e!=2&&!i.every(o=>o))return{changes:t.changes(n.map((o,l)=>i[l]?[]:[{from:o.from,insert:r[l].open+" "},{from:o.to,insert:" "+r[l].close}]))};if(e!=1&&i.some(o=>o)){let o=[];for(let l=0,a;l<i.length;l++)if(a=i[l]){let c=r[l],{open:d,close:u}=a;o.push({from:d.pos-c.open.length,to:d.pos+d.margin},{from:u.pos-u.margin,to:u.pos+c.close.length})}return{changes:o}}return null}s(Vw,"changeBlockComment");function PV(e,t,n=t.selection.ranges){let r=[],i=-1;e:for(let{from:o,to:l}of n){let a=r.length,c=1e9,d;for(let u=o;u<=l;){let f=t.doc.lineAt(u);if(d==null&&(d=Q1(t,f.from).line,!d))continue e;if(f.from>i&&(o==l||l>f.from)){i=f.from;let h=/^\s*/.exec(f.text)[0].length,g=h==f.length,p=f.text.slice(h,h+d.length)==d?h:-1;h<f.text.length&&h<c&&(c=h),r.push({line:f,comment:p,token:d,indent:h,empty:g,single:!1})}u=f.to+1}if(c<1e9)for(let u=a;u<r.length;u++)r[u].indent<r[u].line.text.length&&(r[u].indent=c);r.length==a+1&&(r[a].single=!0)}if(e!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:c,indent:d,empty:u,single:f}of r)(f||!u)&&o.push({from:a.from+d,insert:c+" "});let l=t.changes(o);return{changes:l,selection:t.selection.map(l,1)}}else if(e!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:l,comment:a,token:c}of r)if(a>=0){let d=l.from+a,u=d+c.length;l.text[u-l.from]==" "&&u++,o.push({from:d,to:u})}return{changes:o}}return null}s(PV,"changeLineComment");var Ug=cd.define(),FV=cd.define(),VV=Lo.define(),Bw=Lo.define({combine(e){return Ca(e,{minDepth:100,newGroupDelay:500,joinToEvent:s((t,n)=>n,"joinToEvent")},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:s((t,n)=>(r,i)=>t(r,i)||n(r,i),"joinToEvent")})}}),Hw=ba.define({create(){return Ol.empty},update(e,t){let n=t.state.facet(Bw),r=t.annotation(Ug);if(r){let c=ri.fromTransaction(t,r.selection),d=r.side,u=d==0?e.undone:e.done;return c?u=Yu(u,u.length,n.minDepth,c):u=Ww(u,t.startState.selection),new Ol(d==0?r.rest:u,d==0?u:r.rest)}let i=t.annotation(FV);if((i=="full"||i=="before")&&(e=e.isolate()),t.annotation(af.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let o=ri.fromTransaction(t),l=t.annotation(af.time),a=t.annotation(af.userEvent);return o?e=e.addChanges(o,l,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,l,a,n.newGroupDelay)),(i=="full"||i=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(t=>t.toJSON()),undone:e.undone.map(t=>t.toJSON())}},fromJSON(e){return new Ol(e.done.map(ri.fromJSON),e.undone.map(ri.fromJSON))}});function BV(e={}){return[Hw,Bw.of(e),dt.domEventHandlers({beforeinput(t,n){let r=t.inputType=="historyUndo"?Kw:t.inputType=="historyRedo"?Wg:null;return r?(t.preventDefault(),r(n)):!1}})]}s(BV,"history");function ef(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(Hw,!1);if(!i)return!1;let o=i.pop(e,n,t);return o?(r(o),!0):!1}}s(ef,"cmd");var Kw=ef(0,!1),Wg=ef(1,!1),HV=ef(0,!0),KV=ef(1,!0),ri=class hl{static{s(this,"HistEvent")}constructor(t,n,r,i,o){this.changes=t,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(t){return new hl(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,n,r;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(t){return new hl(t.changes&&iC.fromJSON(t.changes),[],t.mapped&&tC.fromJSON(t.mapped),t.startSelection&&Se.fromJSON(t.startSelection),t.selectionsAfter.map(Se.fromJSON))}static fromTransaction(t,n){let r=Gn;for(let i of t.startState.facet(VV)){let o=i(t);o.length&&(r=r.concat(o))}return!r.length&&t.changes.empty?null:new hl(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,Gn)}static selection(t){return new hl(void 0,Gn,void 0,void 0,t)}};function Yu(e,t,n,r){let i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}s(Yu,"updateBranch");function UV(e,t){let n=[],r=!1;return e.iterChangedRanges((i,o)=>n.push(i,o)),t.iterChangedRanges((i,o,l,a)=>{for(let c=0;c<n.length;){let d=n[c++],u=n[c++];a>=d&&l<=u&&(r=!0)}}),r}s(UV,"isAdjacent");function WV(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((n,r)=>n.empty!=t.ranges[r].empty).length===0}s(WV,"eqSelectionShape");function Uw(e,t){return e.length?t.length?e.concat(t):e:t}s(Uw,"conc");var Gn=[],zV=200;function Ww(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-zV));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Yu(e,e.length-1,1e9,n.setSelAfter(r)))}else return[ri.selection([t])]}s(Ww,"addSelection");function jV(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}s(jV,"popSelection");function qf(e,t){if(!e.length)return e;let n=e.length,r=Gn;for(;n;){let i=JV(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=e.slice(0,n);return o[n-1]=i,o}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[ri.selection(r)]:Gn}s(qf,"addMappingToBranch");function JV(e,t,n){let r=Uw(e.selectionsAfter.length?e.selectionsAfter.map(a=>a.map(t)):Gn,n);if(!e.changes)return ri.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),l=e.mapped?e.mapped.composeDesc(o):o;return new ri(i,rn.mapEffects(e.effects,t),l,e.startSelection.map(o),r)}s(JV,"mapEvent");var GV=/^(input\.type|delete)($|\.)/,Ol=class gl{static{s(this,"HistoryState")}constructor(t,n,r=0,i=void 0){this.done=t,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new gl(this.done,this.undone):this}addChanges(t,n,r,i,o){let l=this.done,a=l[l.length-1];return a&&a.changes&&!a.changes.empty&&t.changes&&(!r||GV.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,UV(a.changes,t.changes))||r=="input.type.compose")?l=Yu(l,l.length-1,i.minDepth,new ri(t.changes.compose(a.changes),Uw(rn.mapEffects(t.effects,a.changes),a.effects),a.mapped,a.startSelection,Gn)):l=Yu(l,l.length,i.minDepth,t),new gl(l,Gn,n,r)}addSelection(t,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Gn;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&WV(o[o.length-1],t)?this:new gl(Ww(this.done,t),this.undone,n,r)}addMapping(t){return new gl(qf(this.done,t),qf(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,n,r){let i=t==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],l=o.selectionsAfter[0]||(o.startSelection?o.startSelection.map(o.changes.invertedDesc,1):n.selection);if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:Ug.of({side:t,rest:jV(i),selection:l}),userEvent:t==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let a=i.length==1?Gn:i.slice(0,i.length-1);return o.mapped&&(a=qf(a,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:Ug.of({side:t,rest:a,selection:l}),filter:!1,userEvent:t==0?"undo":"redo",scrollIntoView:!0})}else return null}};Ol.empty=new Ol(Gn,Gn);var qV=[{key:"Mod-z",run:Kw,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Wg,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Wg,preventDefault:!0},{key:"Mod-u",run:HV,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:KV,preventDefault:!0}];function js(e,t){return Se.create(e.ranges.map(t),e.mainIndex)}s(js,"updateSel");function Mr(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}s(Mr,"setSel");function Ar({state:e,dispatch:t},n){let r=js(e.selection,n);return r.eq(e.selection,!0)?!1:(t(Mr(e,r)),!0)}s(Ar,"moveSel");function tf(e,t){return Se.cursor(t?e.to:e.from)}s(tf,"rangeEnd");function zw(e,t){return Ar(e,n=>n.empty?e.moveByChar(n,t):tf(n,t))}s(zw,"cursorByChar");function sn(e){return e.textDirectionAt(e.state.selection.main.head)==Yx.LTR}s(sn,"ltrAtCursor");var jw=s(e=>zw(e,!sn(e)),"cursorCharLeft"),Jw=s(e=>zw(e,sn(e)),"cursorCharRight");function Gw(e,t){return Ar(e,n=>n.empty?e.moveByGroup(n,t):tf(n,t))}s(Gw,"cursorByGroup");var ZV=s(e=>Gw(e,!sn(e)),"cursorGroupLeft"),YV=s(e=>Gw(e,sn(e)),"cursorGroupRight"),Hj=typeof Intl<"u"&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function XV(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}s(XV,"interestingNode");function nf(e,t,n){let r=Ns(e).resolveInner(t.head),i=n?lh.closedBy:lh.openedBy;for(let c=t.head;;){let d=n?r.childAfter(c):r.childBefore(c);if(!d)break;XV(e,d,i)?r=d:c=n?d.to:d.from}let o=r.type.prop(i),l,a;return o&&(l=n?ts(e,r.from,1):ts(e,r.to,-1))&&l.matched?a=n?l.end.to:l.end.from:a=n?r.to:r.from,Se.cursor(a,n?-1:1)}s(nf,"moveBySyntax");var QV=s(e=>Ar(e,t=>nf(e.state,t,!sn(e))),"cursorSyntaxLeft"),eB=s(e=>Ar(e,t=>nf(e.state,t,sn(e))),"cursorSyntaxRight");function qw(e,t){return Ar(e,n=>{if(!n.empty)return tf(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}s(qw,"cursorByLine");var Zw=s(e=>qw(e,!1),"cursorLineUp"),Yw=s(e=>qw(e,!0),"cursorLineDown");function Xw(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let o of e.state.facet(dt.scrollMargins)){let l=o(e);l?.top&&(n=Math.max(l?.top,n)),l?.bottom&&(r=Math.max(l?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}s(Xw,"pageInfo");function Qw(e,t){let n=Xw(e),{state:r}=e,i=js(r.selection,l=>l.empty?e.moveVertically(l,t,n.height):tf(l,t));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let l=e.coordsAtPos(r.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),c=a.top+n.marginTop,d=a.bottom-n.marginBottom;l&&l.top>c&&l.bottom<d&&(o=dt.scrollIntoView(i.main.head,{y:"start",yMargin:l.top-c}))}return e.dispatch(Mr(r,i),{effects:o}),!0}s(Qw,"cursorByPage");var jy=s(e=>Qw(e,!1),"cursorPageUp"),zg=s(e=>Qw(e,!0),"cursorPageDown");function to(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&t.head!=r.from+o&&(i=Se.cursor(r.from+o))}return i}s(to,"moveByLineBoundary");var tB=s(e=>Ar(e,t=>to(e,t,!0)),"cursorLineBoundaryForward"),nB=s(e=>Ar(e,t=>to(e,t,!1)),"cursorLineBoundaryBackward"),rB=s(e=>Ar(e,t=>to(e,t,!sn(e))),"cursorLineBoundaryLeft"),iB=s(e=>Ar(e,t=>to(e,t,sn(e))),"cursorLineBoundaryRight"),oB=s(e=>Ar(e,t=>Se.cursor(e.lineBlockAt(t.head).from,1)),"cursorLineStart"),sB=s(e=>Ar(e,t=>Se.cursor(e.lineBlockAt(t.head).to,-1)),"cursorLineEnd");function lB(e,t,n){let r=!1,i=js(e.selection,o=>{let l=ts(e,o.head,-1)||ts(e,o.head,1)||o.head>0&&ts(e,o.head-1,1)||o.head<e.doc.length&&ts(e,o.head+1,-1);if(!l||!l.end)return o;r=!0;let a=l.start.from==o.head?l.end.to:l.end.from;return n?Se.range(o.anchor,a):Se.cursor(a)});return r?(t(Mr(e,i)),!0):!1}s(lB,"toMatchingBracket");var aB=s(({state:e,dispatch:t})=>lB(e,t,!1),"cursorMatchingBracket");function sr(e,t){let n=js(e.state.selection,r=>{let i=t(r);return Se.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(e.state.selection)?!1:(e.dispatch(Mr(e.state,n)),!0)}s(sr,"extendSel");function e3(e,t){return sr(e,n=>e.moveByChar(n,t))}s(e3,"selectByChar");var t3=s(e=>e3(e,!sn(e)),"selectCharLeft"),n3=s(e=>e3(e,sn(e)),"selectCharRight");function r3(e,t){return sr(e,n=>e.moveByGroup(n,t))}s(r3,"selectByGroup");var cB=s(e=>r3(e,!sn(e)),"selectGroupLeft"),uB=s(e=>r3(e,sn(e)),"selectGroupRight"),dB=s(e=>sr(e,t=>nf(e.state,t,!sn(e))),"selectSyntaxLeft"),fB=s(e=>sr(e,t=>nf(e.state,t,sn(e))),"selectSyntaxRight");function i3(e,t){return sr(e,n=>e.moveVertically(n,t))}s(i3,"selectByLine");var o3=s(e=>i3(e,!1),"selectLineUp"),s3=s(e=>i3(e,!0),"selectLineDown");function l3(e,t){return sr(e,n=>e.moveVertically(n,t,Xw(e).height))}s(l3,"selectByPage");var Jy=s(e=>l3(e,!1),"selectPageUp"),Gy=s(e=>l3(e,!0),"selectPageDown"),hB=s(e=>sr(e,t=>to(e,t,!0)),"selectLineBoundaryForward"),gB=s(e=>sr(e,t=>to(e,t,!1)),"selectLineBoundaryBackward"),pB=s(e=>sr(e,t=>to(e,t,!sn(e))),"selectLineBoundaryLeft"),mB=s(e=>sr(e,t=>to(e,t,sn(e))),"selectLineBoundaryRight"),vB=s(e=>sr(e,t=>Se.cursor(e.lineBlockAt(t.head).from)),"selectLineStart"),_B=s(e=>sr(e,t=>Se.cursor(e.lineBlockAt(t.head).to)),"selectLineEnd"),qy=s(({state:e,dispatch:t})=>(t(Mr(e,{anchor:0})),!0),"cursorDocStart"),Zy=s(({state:e,dispatch:t})=>(t(Mr(e,{anchor:e.doc.length})),!0),"cursorDocEnd"),Yy=s(({state:e,dispatch:t})=>(t(Mr(e,{anchor:e.selection.main.anchor,head:0})),!0),"selectDocStart"),Xy=s(({state:e,dispatch:t})=>(t(Mr(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),"selectDocEnd"),yB=s(({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),"selectAll"),xB=s(({state:e,dispatch:t})=>{let n=rf(e).map(({from:r,to:i})=>Se.range(r,Math.min(i+1,e.doc.length)));return t(e.update({selection:Se.create(n),userEvent:"select"})),!0},"selectLine"),CB=s(({state:e,dispatch:t})=>{let n=js(e.selection,r=>{let i=Ns(e),o=i.resolveStack(r.from,1);if(r.empty){let l=i.resolveStack(r.from,-1);l.node.from>=o.node.from&&l.node.to<=o.node.to&&(o=l)}for(let l=o;l;l=l.next){let{node:a}=l;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&l.next)return Se.range(a.to,a.from)}return r});return n.eq(e.selection)?!1:(t(Mr(e,n)),!0)},"selectParentSyntax");function a3(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let o of n.selection.ranges){let l=n.doc.lineAt(o.head);if(t?l.to<e.state.doc.length:l.from>0)for(let a=o;;){let c=e.moveVertically(a,t);if(c.head<l.from||c.head>l.to){i.some(d=>d.head==c.head)||i.push(c);break}else{if(c.head==a.head)break;a=c}}}return i.length==r.ranges.length?!1:(e.dispatch(Mr(n,Se.create(i,i.length-1))),!0)}s(a3,"addCursorVertically");var bB=s(e=>a3(e,!1),"addCursorAbove"),EB=s(e=>a3(e,!0),"addCursorBelow"),TB=s(({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=Se.create([n.main]):n.main.empty||(r=Se.create([Se.cursor(n.main.head)])),r?(t(Mr(e,r)),!0):!1},"simplifySelection");function Za(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange(o=>{let{from:l,to:a}=o;if(l==a){let c=t(o);c<l?(n="delete.backward",c=vc(e,c,!1)):c>l&&(n="delete.forward",c=vc(e,c,!0)),l=Math.min(l,c),a=Math.max(a,c)}else l=vc(e,l,!1),a=vc(e,a,!0);return l==a?{range:o}:{changes:{from:l,to:a},range:Se.cursor(l,l<o.head?-1:1)}});return i.changes.empty?!1:(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?dt.announce.of(r.phrase("Selection deleted")):void 0})),!0)}s(Za,"deleteBy");function vc(e,t,n){if(e instanceof dt)for(let r of e.state.facet(dt.atomicRanges).map(i=>i(e)))r.between(t,t,(i,o)=>{i<t&&o>t&&(t=n?o:i)});return t}s(vc,"skipAtomic");var c3=s((e,t,n)=>Za(e,r=>{let i=r.from,{state:o}=e,l=o.doc.lineAt(i),a,c;if(n&&!t&&i>l.from&&i<l.from+200&&!/[^ \t]/.test(a=l.text.slice(0,i-l.from))){if(a[a.length-1]==" ")return i-1;let d=ad(a,o.tabSize)%Zc(o)||Zc(o);for(let u=0;u<d&&a[a.length-1-u]==" ";u++)i--;c=i}else c=Eo(l.text,i-l.from,t,t)+l.from,c==i&&l.number!=(t?o.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(l.text.slice(c-l.from,i-l.from))&&(c=Eo(l.text,c-l.from,!1,!1)+l.from);return c}),"deleteByChar"),jg=s(e=>c3(e,!1,!0),"deleteCharBackward"),u3=s(e=>c3(e,!0,!1),"deleteCharForward"),d3=s((e,t)=>Za(e,n=>{let r=n.head,{state:i}=e,o=i.doc.lineAt(r),l=i.charCategorizer(r);for(let a=null;;){if(r==(t?o.to:o.from)){r==n.head&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let c=Eo(o.text,r-o.from,t)+o.from,d=o.text.slice(Math.min(r,c)-o.from,Math.max(r,c)-o.from),u=l(d);if(a!=null&&u!=a)break;(d!=" "||r!=n.head)&&(a=u),r=c}return r}),"deleteByGroup"),f3=s(e=>d3(e,!1),"deleteGroupBackward"),SB=s(e=>d3(e,!0),"deleteGroupForward"),wB=s(e=>Za(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),"deleteToLineEnd"),kB=s(e=>Za(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),"deleteLineBoundaryBackward"),MB=s(e=>Za(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),"deleteLineBoundaryForward"),AB=s(({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:sC.of(["",""])},range:Se.cursor(r.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},"splitLine"),IB=s(({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(r=>{if(!r.empty||r.from==0||r.from==e.doc.length)return{range:r};let i=r.from,o=e.doc.lineAt(i),l=i==o.from?i-1:Eo(o.text,i-o.from,!1)+o.from,a=i==o.to?i+1:Eo(o.text,i-o.from,!0)+o.from;return{changes:{from:l,to:a,insert:e.doc.slice(i,a).append(e.doc.slice(l,i))},range:Se.cursor(a)}});return n.changes.empty?!1:(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)},"transposeChars");function rf(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),o=e.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=e.doc.lineAt(r.to-1)),n>=i.number){let l=t[t.length-1];l.to=o.to,l.ranges.push(r)}else t.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return t}s(rf,"selectedLineBlocks");function h3(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let o of rf(e)){if(n?o.to==e.doc.length:o.from==0)continue;let l=e.doc.lineAt(n?o.to+1:o.from-1),a=l.length+1;if(n){r.push({from:o.to,to:l.to},{from:o.from,insert:l.text+e.lineBreak});for(let c of o.ranges)i.push(Se.range(Math.min(e.doc.length,c.anchor+a),Math.min(e.doc.length,c.head+a)))}else{r.push({from:l.from,to:o.from},{from:o.to,insert:e.lineBreak+l.text});for(let c of o.ranges)i.push(Se.range(c.anchor-a,c.head-a))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:Se.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0):!1}s(h3,"moveLine");var NB=s(({state:e,dispatch:t})=>h3(e,t,!1),"moveLineUp"),OB=s(({state:e,dispatch:t})=>h3(e,t,!0),"moveLineDown");function g3(e,t,n){if(e.readOnly)return!1;let r=[];for(let o of rf(e))n?r.push({from:o.from,insert:e.doc.slice(o.from,o.to)+e.lineBreak}):r.push({from:o.to,insert:e.lineBreak+e.doc.slice(o.from,o.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}s(g3,"copyLine");var DB=s(({state:e,dispatch:t})=>g3(e,t,!1),"copyLineUp"),RB=s(({state:e,dispatch:t})=>g3(e,t,!0),"copyLineDown"),LB=s(e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(rf(t).map(({from:i,to:o})=>(i>0?i--:o<t.doc.length&&o++,{from:i,to:o}))),r=js(t.selection,i=>{let o;if(e.lineWrapping){let l=e.lineBlockAt(i.head),a=e.coordsAtPos(i.head,i.assoc||1);a&&(o=l.bottom+e.documentTop-a.bottom+e.defaultLineHeight/2)}return e.moveVertically(i,!0,o)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0},"deleteLine");function $B(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=Ns(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),o;return r&&i&&r.to<=t&&i.from>=t&&(o=r.type.prop(lh.closedBy))&&o.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}s($B,"isBetweenBrackets");var Qy=p3(!1),PB=p3(!0);function p3(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(i=>{let{from:o,to:l}=i,a=t.doc.lineAt(o),c=!e&&o==l&&$B(t,o);e&&(o=l=(l<=a.to?a:t.doc.lineAt(l)).to);let d=new rC(t,{simulateBreak:o,simulateDoubleBreak:!!c}),u=Xx(d,o);for(u==null&&(u=ad(/^\s*/.exec(t.doc.lineAt(o).text)[0],t.tabSize));l<a.to&&/\s/.test(a.text[l-a.from]);)l++;c?{from:o,to:l}=c:o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let f=["",Rl(t,u)];return c&&f.push(Rl(t,d.lineIndent(a.from,-1))),{changes:{from:o,to:l,insert:sC.of(f)},range:Se.cursor(o+1+f[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}s(p3,"newlineAndIndent");function e0(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let l=r.from;l<=r.to;){let a=e.doc.lineAt(l);a.number>n&&(r.empty||r.to>a.from)&&(t(a,i,r),n=a.number),l=a.to+1}let o=e.changes(i);return{changes:i,range:Se.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}s(e0,"changeBySelectedLine");var FB=s(({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new rC(e,{overrideIndentation:s(o=>{let l=n[o];return l??-1},"overrideIndentation")}),i=e0(e,(o,l,a)=>{let c=Xx(r,o.from);if(c==null)return;/\S/.test(o.text)||(c=0);let d=/^\s*/.exec(o.text)[0],u=Rl(e,c);(d!=u||a.from<o.from+d.length)&&(n[o.from]=c,l.push({from:o.from,to:o.from+d.length,insert:u}))});return i.changes.empty||t(e.update(i,{userEvent:"indent"})),!0},"indentSelection"),VB=s(({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(e0(e,(n,r)=>{r.push({from:n.from,insert:e.facet(Zx)})}),{userEvent:"input.indent"})),!0),"indentMore"),BB=s(({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(e0(e,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=ad(i,e.tabSize),l=0,a=Rl(e,Math.max(0,o-Zc(e)));for(;l<i.length&&l<a.length&&i.charCodeAt(l)==a.charCodeAt(l);)l++;r.push({from:n.from+l,to:n.from+i.length,insert:a.slice(l)})}),{userEvent:"delete.dedent"})),!0),"indentLess"),HB=s(e=>(e.setTabFocusMode(),!0),"toggleTabFocusMode"),KB=[{key:"Ctrl-b",run:jw,shift:t3,preventDefault:!0},{key:"Ctrl-f",run:Jw,shift:n3},{key:"Ctrl-p",run:Zw,shift:o3},{key:"Ctrl-n",run:Yw,shift:s3},{key:"Ctrl-a",run:oB,shift:vB},{key:"Ctrl-e",run:sB,shift:_B},{key:"Ctrl-d",run:u3},{key:"Ctrl-h",run:jg},{key:"Ctrl-k",run:wB},{key:"Ctrl-Alt-h",run:f3},{key:"Ctrl-o",run:AB},{key:"Ctrl-t",run:IB},{key:"Ctrl-v",run:zg}],UB=[{key:"ArrowLeft",run:jw,shift:t3,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:ZV,shift:cB,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:rB,shift:pB,preventDefault:!0},{key:"ArrowRight",run:Jw,shift:n3,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:YV,shift:uB,preventDefault:!0},{mac:"Cmd-ArrowRight",run:iB,shift:mB,preventDefault:!0},{key:"ArrowUp",run:Zw,shift:o3,preventDefault:!0},{mac:"Cmd-ArrowUp",run:qy,shift:Yy},{mac:"Ctrl-ArrowUp",run:jy,shift:Jy},{key:"ArrowDown",run:Yw,shift:s3,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Zy,shift:Xy},{mac:"Ctrl-ArrowDown",run:zg,shift:Gy},{key:"PageUp",run:jy,shift:Jy},{key:"PageDown",run:zg,shift:Gy},{key:"Home",run:nB,shift:gB,preventDefault:!0},{key:"Mod-Home",run:qy,shift:Yy},{key:"End",run:tB,shift:hB,preventDefault:!0},{key:"Mod-End",run:Zy,shift:Xy},{key:"Enter",run:Qy,shift:Qy},{key:"Mod-a",run:yB},{key:"Backspace",run:jg,shift:jg,preventDefault:!0},{key:"Delete",run:u3,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:f3,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:SB,preventDefault:!0},{mac:"Mod-Backspace",run:kB,preventDefault:!0},{mac:"Mod-Delete",run:MB,preventDefault:!0}].concat(KB.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),WB=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:QV,shift:dB},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:eB,shift:fB},{key:"Alt-ArrowUp",run:NB},{key:"Shift-Alt-ArrowUp",run:DB},{key:"Alt-ArrowDown",run:OB},{key:"Shift-Alt-ArrowDown",run:RB},{key:"Mod-Alt-ArrowUp",run:bB},{key:"Mod-Alt-ArrowDown",run:EB},{key:"Escape",run:TB},{key:"Mod-Enter",run:PB},{key:"Alt-l",mac:"Ctrl-l",run:xB},{key:"Mod-i",run:CB,preventDefault:!0},{key:"Mod-[",run:BB},{key:"Mod-]",run:VB},{key:"Mod-Alt-\\",run:FB},{key:"Shift-Mod-k",run:LB},{key:"Shift-Mod-\\",run:aB},{key:"Mod-/",run:NV},{key:"Alt-A",run:DV},{key:"Ctrl-m",mac:"Shift-Alt-m",run:HB}].concat(UB),ex=typeof String.prototype.normalize=="function"?e=>e.normalize("NFKD"):e=>e,As=class{static{s(this,"SearchCursor")}constructor(e,t,n=0,r=e.length,i,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?l=>i(ex(l)):ex,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Hn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=fp(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=Xr(e);let r=this.normalize(t);if(r.length)for(let i=0,o=n;;i++){let l=r.charCodeAt(i),a=this.match(l,o,this.bufferPos+this.bufferStart);if(i==r.length-1){if(a)return this.value=a,this;break}o==n&&i<t.length&&t.charCodeAt(i)==l&&o++}}}match(e,t,n){let r=null;for(let i=0;i<this.matches.length;i+=2){let o=this.matches[i],l=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?r={from:this.matches[i+1],to:n}:(this.matches[i]++,l=!0)),l||(this.matches.splice(i,2),i-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}};typeof Symbol<"u"&&(As.prototype[Symbol.iterator]=function(){return this});var m3={from:-1,to:-1,match:/.*/.exec("")},t0="gm"+(/x/.unicode==null?"":"u"),v3=class{static{s(this,"RegExpCursor")}constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine="",this.done=!1,this.value=m3,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new _3(e,t,n,r,i);this.re=new RegExp(t,t0+(n?.ignoreCase?"i":"")),this.test=n?.test,this.iter=e.iter();let o=e.lineAt(r);this.curLineStart=o.from,this.matchPos=Xu(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=Xu(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},Zf=new WeakMap,tx=class jc{static{s(this,"FlattenedDoc")}constructor(t,n){this.from=t,this.text=n}get to(){return this.from+this.text.length}static get(t,n,r){let i=Zf.get(t);if(!i||i.from>=r||i.to<=n){let a=new jc(n,t.sliceString(n,r));return Zf.set(t,a),a}if(i.from==n&&i.to==r)return i;let{text:o,from:l}=i;return l>n&&(o=t.sliceString(n,l)+o,l=n),i.to<r&&(o+=t.sliceString(i.to,r)),Zf.set(t,new jc(l,o)),new jc(n,o.slice(n-l,r-l))}},_3=class{static{s(this,"MultilineRegExpCursor")}constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=m3,this.matchPos=Xu(e,r),this.re=new RegExp(t,t0+(n?.ignoreCase?"i":"")),this.test=n?.test,this.flat=tx.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,r=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this.matchPos=Xu(this.text,r+(n==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=tx.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<"u"&&(v3.prototype[Symbol.iterator]=_3.prototype[Symbol.iterator]=function(){return this});function zB(e){try{return new RegExp(e,t0),!0}catch{return!1}}s(zB,"validRegExp");function Xu(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}s(Xu,"toCharEnd");var jB=s(e=>{let{state:t}=e,n=String(t.doc.lineAt(e.state.selection.main.head).number),{close:r,result:i}=Z9(e,{label:t.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:t.phrase("go")});return i.then(o=>{let l=o&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(o.elements.line.value);if(!l){e.dispatch({effects:r});return}let a=t.doc.lineAt(t.selection.main.head),[,c,d,u,f]=l,h=u?+u.slice(1):0,g=d?+d:a.number;if(d&&f){let _=g/100;c&&(_=_*(c=="-"?-1:1)+a.number/t.doc.lines),g=Math.round(t.doc.lines*_)}else d&&c&&(g=g*(c=="-"?-1:1)+a.number);let p=t.doc.line(Math.max(1,Math.min(t.doc.lines,g))),v=Se.cursor(p.from+Math.max(0,Math.min(h,p.length)));e.dispatch({effects:[r,dt.scrollIntoView(v.from,{y:"center"})],selection:v})}),!0},"gotoLine"),JB={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},y3=Lo.define({combine(e){return Ca(e,JB,{highlightWordAroundCursor:s((t,n)=>t||n,"highlightWordAroundCursor"),minSelectionLength:Math.min,maxMatches:Math.min})}});function GB(e){let t=[QB,XB];return e&&t.push(y3.of(e)),t}s(GB,"highlightSelectionMatches");var qB=Dt.mark({class:"cm-selectionMatch"}),ZB=Dt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function nx(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=dn.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=dn.Word)}s(nx,"insideWordBoundaries");function YB(e,t,n,r){return e(t.sliceDoc(n,n+1))==dn.Word&&e(t.sliceDoc(r-1,r))==dn.Word}s(YB,"insideWord");var XB=dp.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(y3),{state:n}=e,r=n.selection;if(r.ranges.length>1)return Dt.none;let i=r.main,o,l=null;if(i.empty){if(!t.highlightWordAroundCursor)return Dt.none;let c=n.wordAt(i.head);if(!c)return Dt.none;l=n.charCategorizer(i.head),o=n.sliceDoc(c.from,c.to)}else{let c=i.to-i.from;if(c<t.minSelectionLength||c>200)return Dt.none;if(t.wholeWords){if(o=n.sliceDoc(i.from,i.to),l=n.charCategorizer(i.head),!(nx(l,n,i.from,i.to)&&YB(l,n,i.from,i.to)))return Dt.none}else if(o=n.sliceDoc(i.from,i.to),!o)return Dt.none}let a=[];for(let c of e.visibleRanges){let d=new As(n.doc,o,c.from,c.to);for(;!d.next().done;){let{from:u,to:f}=d.value;if((!l||nx(l,n,u,f))&&(i.empty&&u<=i.from&&f>=i.to?a.push(ZB.range(u,f)):(u>=i.to||f<=i.from)&&a.push(qB.range(u,f)),a.length>t.maxMatches))return Dt.none}}return Dt.set(a)}},{decorations:s(e=>e.decorations,"decorations")}),QB=dt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),eH=s(({state:e,dispatch:t})=>{let{selection:n}=e,r=Se.create(n.ranges.map(i=>e.wordAt(i.head)||Se.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)},"selectWord");function tH(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let l=!1,a=new As(e.doc,t,r[r.length-1].to);;)if(a.next(),a.done){if(l)return null;a=new As(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),l=!0}else{if(l&&r.some(c=>c.from==a.value.from))continue;if(o){let c=e.wordAt(a.value.from);if(!c||c.from!=a.value.from||c.to!=a.value.to)continue}return a.value}}s(tH,"findNextOccurrence");var nH=s(({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(o=>o.from===o.to))return eH({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(o=>e.sliceDoc(o.from,o.to)!=r))return!1;let i=tH(e,r);return i?(t(e.update({selection:e.selection.addRange(Se.range(i.from,i.to),!1),effects:dt.scrollIntoView(i.to)})),!0):!1},"selectNextOccurrence"),Js=Lo.define({combine(e){return Ca(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:s(t=>new mH(t),"createPanel"),scrollToMatch:s(t=>dt.scrollIntoView(t),"scrollToMatch")})}}),x3=class{static{s(this,"SearchQuery")}constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||zB(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?`
62
+ `:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new aH(this):new oH(this)}getCursor(e,t=0,n){let r=e.doc?e:qc.create({doc:e});return n==null&&(n=r.doc.length),this.regexp?es(this,r,t,n):Qo(this,r,t,n)}},C3=class{static{s(this,"QueryType")}constructor(e){this.spec=e}};function rH(e,t,n){return(r,i,o,l)=>n&&!n(r,i,o,l)?!1:e(r>=l&&i<=l+o.length?o.slice(r-l,i-l):t.doc.sliceString(r,i),t,r,i)}s(rH,"wrapStringTest");function Qo(e,t,n,r){let i;return e.wholeWord&&(i=iH(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=rH(e.test,t,i)),new As(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:o=>o.toLowerCase(),i)}s(Qo,"stringCursor");function iH(e,t){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=e.sliceString(o,Math.min(e.length,r+2))),(t(Qu(i,n-o))!=dn.Word||t(ed(i,n-o))!=dn.Word)&&(t(ed(i,r-o))!=dn.Word||t(Qu(i,r-o))!=dn.Word))}s(iH,"stringWordTest");var oH=class extends C3{static{s(this,"StringQuery")}constructor(e){super(e)}nextMatch(e,t,n){let r=Qo(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let i=Math.min(e.doc.length,t+this.spec.unquoted.length);r=Qo(this.spec,e,0,i).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let i=Math.max(t,r-1e4-this.spec.unquoted.length),o=Qo(this.spec,e,i,r),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(i==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Qo(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Qo(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function sH(e,t,n){return(r,i,o)=>(!n||n(r,i,o))&&e(o[0],t,r,i)}s(sH,"wrapRegexpTest");function es(e,t,n,r){let i;return e.wholeWord&&(i=lH(t.charCategorizer(t.selection.main.head))),e.test&&(i=sH(e.test,t,i)),new v3(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}s(es,"regexpCursor");function Qu(e,t){return e.slice(Eo(e,t,!1),t)}s(Qu,"charBefore");function ed(e,t){return e.slice(t,Eo(e,t))}s(ed,"charAfter");function lH(e){return(t,n,r)=>!r[0].length||(e(Qu(r.input,r.index))!=dn.Word||e(ed(r.input,r.index))!=dn.Word)&&(e(ed(r.input,r.index+r[0].length))!=dn.Word||e(Qu(r.input,r.index+r[0].length))!=dn.Word)}s(lH,"regexpWordTest");var aH=class extends C3{static{s(this,"RegExpQuery")}nextMatch(e,t,n){let r=es(this.spec,e,n,e.doc.length).next();return r.done&&(r=es(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),o=es(this.spec,e,i,n),l=null;for(;!o.next().done;)l=o.value;if(l&&(i==t||l.from>i+10))return l;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n=="&")return e.match[0];if(n=="$")return"$";for(let r=n.length;r>0;r--){let i=+n.slice(0,r);if(i>0&&i<e.match.length)return e.match[i]+n.slice(r)}return t})}matchAll(e,t){let n=es(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=es(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},fa=rn.define(),n0=rn.define(),Vi=ba.define({create(e){return new Yf(Jg(e).create(),null)},update(e,t){for(let n of t.effects)n.is(fa)?e=new Yf(n.value.create(),e.panel):n.is(n0)&&(e=new Yf(e.query,n.value?r0:null));return e},provide:s(e=>oC.from(e,t=>t.panel),"provide")}),Yf=class{static{s(this,"SearchState")}constructor(e,t){this.query=e,this.panel=t}},cH=Dt.mark({class:"cm-searchMatch"}),uH=Dt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),dH=dp.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(Vi))}update(e){let t=e.state.field(Vi);(t!=e.startState.field(Vi)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return Dt.none;let{view:n}=this,r=new nC;for(let i=0,o=n.visibleRanges,l=o.length;i<l;i++){let{from:a,to:c}=o[i];for(;i<l-1&&c>o[i+1].from-500;)c=o[++i].to;e.highlight(n.state,a,c,(d,u)=>{let f=n.state.selection.ranges.some(h=>h.from==d&&h.to==u);r.add(d,u,f?uH:cH)})}return r.finish()}},{decorations:s(e=>e.decorations,"decorations")});function Ya(e){return t=>{let n=t.state.field(Vi,!1);return n&&n.query.spec.valid?e(t,n):T3(t)}}s(Ya,"searchCommand");var td=Ya((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=Se.single(r.from,r.to),o=e.state.facet(Js);return e.dispatch({selection:i,effects:[i0(e,r),o.scrollToMatch(i.main,e)],userEvent:"select.search"}),E3(e),!0}),nd=Ya((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let o=Se.single(i.from,i.to),l=e.state.facet(Js);return e.dispatch({selection:o,effects:[i0(e,i),l.scrollToMatch(o.main,e)],userEvent:"select.search"}),E3(e),!0}),fH=Ya((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:Se.create(n.map(r=>Se.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),hH=s(({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],l=0;for(let a=new As(e.doc,e.sliceDoc(r,i));!a.next().done;){if(o.length>1e3)return!1;a.value.from==r&&(l=o.length),o.push(Se.range(a.value.from,a.value.to))}return t(e.update({selection:Se.create(o,l),userEvent:"select.search.matches"})),!0},"selectSelectionMatches"),rx=Ya((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=t.nextMatch(n,r,r);if(!o)return!1;let l=o,a=[],c,d,u=[];l.from==r&&l.to==i&&(d=n.toText(t.getReplacement(l)),a.push({from:l.from,to:l.to,insert:d}),l=t.nextMatch(n,l.from,l.to),u.push(dt.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let f=e.state.changes(a);return l&&(c=Se.single(l.from,l.to).map(f),u.push(i0(e,l)),u.push(n.facet(Js).scrollToMatch(c.main,e))),e.dispatch({changes:f,selection:c,effects:u,userEvent:"input.replace"}),!0}),gH=Ya((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(i=>{let{from:o,to:l}=i;return{from:o,to:l,insert:t.getReplacement(i)}});if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:dt.announce.of(r),userEvent:"input.replace.all"}),!0});function r0(e){return e.state.facet(Js).createPanel(e)}s(r0,"createSearchPanel");function Jg(e,t){var n,r,i,o,l;let a=e.selection.main,c=a.empty||a.to>a.from+100?"":e.sliceDoc(a.from,a.to);if(t&&!c)return t;let d=e.facet(Js);return new x3({search:((n=t?.literal)!==null&&n!==void 0?n:d.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(r=t?.caseSensitive)!==null&&r!==void 0?r:d.caseSensitive,literal:(i=t?.literal)!==null&&i!==void 0?i:d.literal,regexp:(o=t?.regexp)!==null&&o!==void 0?o:d.regexp,wholeWord:(l=t?.wholeWord)!==null&&l!==void 0?l:d.wholeWord})}s(Jg,"defaultQuery");function b3(e){let t=hp(e,r0);return t&&t.dom.querySelector("[main-field]")}s(b3,"getSearchInput");function E3(e){let t=b3(e);t&&t==e.root.activeElement&&t.select()}s(E3,"selectSearchInput");var T3=s(e=>{let t=e.state.field(Vi,!1);if(t&&t.panel){let n=b3(e);if(n&&n!=e.root.activeElement){let r=Jg(e.state,t.query.spec);r.valid&&e.dispatch({effects:fa.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[n0.of(!0),t?fa.of(Jg(e.state,t.query.spec)):rn.appendConfig.of(_H)]});return!0},"openSearchPanel"),S3=s(e=>{let t=e.state.field(Vi,!1);if(!t||!t.panel)return!1;let n=hp(e,r0);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:n0.of(!1)}),!0},"closeSearchPanel"),pH=[{key:"Mod-f",run:T3,scope:"editor search-panel"},{key:"F3",run:td,shift:nd,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:td,shift:nd,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:S3,scope:"editor search-panel"},{key:"Mod-Shift-l",run:hH},{key:"Mod-Alt-g",run:jB},{key:"Mod-d",run:nH,preventDefault:!0}],mH=class{static{s(this,"SearchPanel")}constructor(e){this.view=e;let t=this.query=e.state.field(Vi).query.spec;this.commit=this.commit.bind(this),this.searchField=Ct("input",{value:t.search,placeholder:Mn(e,"Find"),"aria-label":Mn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ct("input",{value:t.replace,placeholder:Mn(e,"Replace"),"aria-label":Mn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Ct("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Ct("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Ct("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(r,i,o){return Ct("button",{class:"cm-button",name:r,onclick:i,type:"button"},o)}s(n,"button"),this.dom=Ct("div",{onkeydown:s(r=>this.keydown(r),"onkeydown"),class:"cm-search"},[this.searchField,n("next",()=>td(e),[Mn(e,"next")]),n("prev",()=>nd(e),[Mn(e,"previous")]),n("select",()=>fH(e),[Mn(e,"all")]),Ct("label",null,[this.caseField,Mn(e,"match case")]),Ct("label",null,[this.reField,Mn(e,"regexp")]),Ct("label",null,[this.wordField,Mn(e,"by word")]),...e.state.readOnly?[]:[Ct("br"),this.replaceField,n("replace",()=>rx(e),[Mn(e,"replace")]),n("replaceAll",()=>gH(e),[Mn(e,"replace all")])],Ct("button",{name:"close",onclick:s(()=>S3(e),"onclick"),"aria-label":Mn(e,"close"),type:"button"},["×"])])}commit(){let e=new x3({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:fa.of(e)}))}keydown(e){B9(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?nd:td)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),rx(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(fa)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Js).top}};function Mn(e,t){return e.state.phrase(t)}s(Mn,"phrase");var _c=30,yc=/[\s\.,:;?!]/;function i0(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,o=Math.max(r.from,t-_c),l=Math.min(i,n+_c),a=e.state.sliceDoc(o,l);if(o!=r.from){for(let c=0;c<_c;c++)if(!yc.test(a[c+1])&&yc.test(a[c])){a=a.slice(c);break}}if(l!=i){for(let c=a.length-1;c>a.length-_c;c--)if(!yc.test(a[c-1])&&yc.test(a[c])){a=a.slice(0,c);break}}return dt.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${r.number}.`)}s(i0,"announceMatch");var vH=dt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),_H=[Vi,pp.low(dH),vH],w3=class{static{s(this,"CompletionContext")}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=Ns(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(k3(e,!1));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 ix(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,"\\$&")}]`}s(ix,"toSet");function yH(e){let t=Object.create(null),n=Object.create(null);for(let{label:i}of e){t[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=ix(t)+ix(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}s(yH,"prefixMatch");function xH(e){let t=e.map(i=>typeof i=="string"?{label:i}:i),[n,r]=t.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:yH(t);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:t,validFor:n}:null}}s(xH,"completeFromList");var ox=class{static{s(this,"Option")}constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function bo(e){return e.selection.main.from}s(bo,"cur");function k3(e,t){var n;let{source:r}=e,i=t&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?e:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=e.flags)!==null&&n!==void 0?n:e.ignoreCase?"i":"")}s(k3,"ensureAnchor");var M3=cd.define();function CH(e,t,n,r){let{main:i}=e.selection,o=n-i.from,l=r-i.from;return{...e.changeByRange(a=>{if(a!=i&&n!=r&&e.sliceDoc(a.from+o,a.from+l)!=e.sliceDoc(n,r))return{range:a};let c=e.toText(t);return{changes:{from:a.from+o,to:r==i.from?a.to:a.from+l,insert:c},range:Se.cursor(a.from+o+c.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}s(CH,"insertCompletionText");var sx=new WeakMap;function bH(e){if(!Array.isArray(e))return e;let t=sx.get(e);return t||sx.set(e,t=xH(e)),t}s(bH,"asSource");var rd=rn.define(),ha=rn.define(),EH=class{static{s(this,"FuzzyMatcher")}constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=Hn(e,t),r=Xr(n);this.chars.push(n);let i=e.slice(t,t+r),o=i.toUpperCase();this.folded.push(Hn(o==i?i.toLowerCase():o,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:o}=this;if(t.length==1){let y=Hn(e,0),x=Xr(y),C=x==e.length?0:-100;if(y!=t[0])if(y==n[0])C+=-200;else return null;return this.ret(C,[0,x])}let l=e.indexOf(this.pattern);if(l==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,c=0;if(l<0){for(let y=0,x=Math.min(e.length,200);y<x&&c<a;){let C=Hn(e,y);(C==t[c]||C==n[c])&&(r[c++]=y),y+=Xr(C)}if(c<a)return null}let d=0,u=0,f=!1,h=0,g=-1,p=-1,v=/[a-z]/.test(e),_=!0;for(let y=0,x=Math.min(e.length,200),C=0;y<x&&u<a;){let b=Hn(e,y);l<0&&(d<a&&b==t[d]&&(i[d++]=y),h<a&&(b==t[h]||b==n[h]?(h==0&&(g=y),p=y+1,h++):h=0));let T,M=b<255?b>=48&&b<=57||b>=97&&b<=122?2:b>=65&&b<=90?1:0:(T=fp(b))!=T.toLowerCase()?1:T!=T.toUpperCase()?2:0;(!y||M==1&&v||C==0&&M!=0)&&(t[u]==b||n[u]==b&&(f=!0)?o[u++]=y:o.length&&(_=!1)),C=M,y+=Xr(b)}return u==a&&o[0]==0&&_?this.result(-100+(f?-200:0),o,e):h==a&&g==0?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):h==a?this.ret(-900-e.length,[g,p]):u==a?this.result(-100+(f?-200:0)+-700+(_?0:-1100),o,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let o of t){let l=o+(this.astral?Xr(Hn(n,o)):1);i&&r[i-1]==o?r[i-1]=l:(r[i++]=o,r[i++]=l)}return this.ret(e-n.length,r)}},TH=class{static{s(this,"StrictMatcher")}constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},zt=Lo.define({combine(e){return Ca(e,{activateOnTyping:!0,activateOnCompletion:s(()=>!1,"activateOnCompletion"),activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:s(()=>"","tooltipClass"),optionClass:s(()=>"","optionClass"),aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:SH,filterStrict:!1,compareCompletions:s((t,n)=>(t.sortText||t.label).localeCompare(n.sortText||n.label),"compareCompletions"),interactionDelay:75,updateSyncTime:100},{defaultKeymap:s((t,n)=>t&&n,"defaultKeymap"),closeOnBlur:s((t,n)=>t&&n,"closeOnBlur"),icons:s((t,n)=>t&&n,"icons"),tooltipClass:s((t,n)=>r=>lx(t(r),n(r)),"tooltipClass"),optionClass:s((t,n)=>r=>lx(t(r),n(r)),"optionClass"),addToOptions:s((t,n)=>t.concat(n),"addToOptions"),filterStrict:s((t,n)=>t||n,"filterStrict")})}});function lx(e,t){return e?t?e+" "+t:e:t}s(lx,"joinClass");function SH(e,t,n,r,i,o){let l=e.textDirection==Yx.RTL,a=l,c=!1,d="top",u,f,h=t.left-i.left,g=i.right-t.right,p=r.right-r.left,v=r.bottom-r.top;if(a&&h<Math.min(p,g)?a=!1:!a&&g<Math.min(p,h)&&(a=!0),p<=(a?h:g))u=Math.max(i.top,Math.min(n.top,i.bottom-v))-t.top,f=Math.min(400,a?h:g);else{c=!0,f=Math.min(400,(l?t.right:i.right-t.left)-30);let x=i.bottom-t.bottom;x>=v||x>t.top?u=n.bottom-t.top:(d="bottom",u=t.bottom-n.top)}let _=(t.bottom-t.top)/o.offsetHeight,y=(t.right-t.left)/o.offsetWidth;return{style:`${d}: ${u/_}px; max-width: ${f/y}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":a?"left":"right")}}s(SH,"defaultPositionInfo");function wH(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),t.push({render(n,r,i,o){let l=document.createElement("span");l.className="cm-completionLabel";let a=n.displayLabel||n.label,c=0;for(let d=0;d<o.length;){let u=o[d++],f=o[d++];u>c&&l.appendChild(document.createTextNode(a.slice(c,u)));let h=l.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(a.slice(u,f))),h.className="cm-completionMatchedText",c=f}return c<a.length&&l.appendChild(document.createTextNode(a.slice(c))),l},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),t.sort((n,r)=>n.position-r.position).map(n=>n.render)}s(wH,"optionContent");function Xf(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let i=Math.floor(t/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}s(Xf,"rangeAroundSelected");var kH=class{static{s(this,"CompletionTooltip")}constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:s(()=>this.measureInfo(),"read"),write:s(a=>this.placeInfo(a),"write"),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:i,selected:o}=r.open,l=e.state.facet(zt);this.optionContent=wH(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=Xf(i.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{let{options:c}=e.state.field(t).open;for(let d=a.target,u;d&&d!=this.dom;d=d.parentNode)if(d.nodeName=="LI"&&(u=/-(\d+)$/.exec(d.id))&&+u[1]<c.length){this.applyCompletion(e,c[+u[1]]),a.preventDefault();return}}),this.dom.addEventListener("focusout",a=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(zt).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:ha.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:i,selected:o,disabled:l}=n.open;(!r.open||r.open.options!=i)&&(this.range=Xf(i.length,o,e.state.facet(zt).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),l!=((t=r.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Xf(t.options.length,t.selected,this.view.state.facet(zt).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(l=>{l&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(l,r)}).catch(l=>ah(this.view.state,l,"completion info")):(this.addInfoPane(o,r),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:i}=e;n.appendChild(r),this.infoDestroy=i||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!="LI"||!n.id?r--:r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby"));return t&&AH(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let o=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(zt).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",o=>{o.target==r&&o.preventDefault()});let i=null;for(let o=n.from;o<n.to;o++){let{completion:l,match:a}=e[o],{section:c}=l;if(c){let f=typeof c=="string"?c:c.name;if(f!=i&&(o>n.from||n.from==0))if(i=f,typeof c!="string"&&c.header)r.appendChild(c.header(c));else{let h=r.appendChild(document.createElement("completion-section"));h.textContent=f}}const d=r.appendChild(document.createElement("li"));d.id=t+"-"+o,d.setAttribute("role","option");let u=this.optionClass(l);u&&(d.className=u);for(let f of this.optionContent){let h=f(l,this.view.state,this.view,a);h&&d.appendChild(h)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}};function MH(e,t){return n=>new kH(n,e,t)}s(MH,"completionTooltip");function AH(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}s(AH,"scrollIntoView");function ax(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}s(ax,"score");function IH(e,t){let n=[],r=null,i=null,o=s(u=>{n.push(u);let{section:f}=u.completion;if(f){r||(r=[]);let h=typeof f=="string"?f:f.name;r.some(g=>g.name==h)||r.push(typeof f=="string"?{name:h}:f)}},"addOption"),l=t.facet(zt);for(let u of e)if(u.hasResult()){let f=u.result.getMatch;if(u.result.filter===!1)for(let h of u.result.options)o(new ox(h,u.source,f?f(h):[],1e9-n.length));else{let h=t.sliceDoc(u.from,u.to),g,p=l.filterStrict?new TH(h):new EH(h);for(let v of u.result.options)if(g=p.match(v.label)){let _=v.displayLabel?f?f(v,g.matched):[]:g.matched,y=g.score+(v.boost||0);if(o(new ox(v,u.source,_,y)),typeof v.section=="object"&&v.section.rank==="dynamic"){let{name:x}=v.section;i||(i=Object.create(null)),i[x]=Math.max(y,i[x]||-1e9)}}}}if(r){let u=Object.create(null),f=0,h=s((g,p)=>(g.rank==="dynamic"&&p.rank==="dynamic"?i[p.name]-i[g.name]:0)||(typeof g.rank=="number"?g.rank:1e9)-(typeof p.rank=="number"?p.rank:1e9)||(g.name<p.name?-1:1),"cmp");for(let g of r.sort(h))f-=1e5,u[g.name]=f;for(let g of n){let{section:p}=g.completion;p&&(g.score+=u[typeof p=="string"?p:p.name])}}let a=[],c=null,d=l.compareCompletions;for(let u of n.sort((f,h)=>h.score-f.score||d(f.completion,h.completion))){let f=u.completion;!c||c.label!=f.label||c.detail!=f.detail||c.type!=null&&f.type!=null&&c.type!=f.type||c.apply!=f.apply||c.boost!=f.boost?a.push(u):ax(u.completion)>ax(c)&&(a[a.length-1]=u),c=u.completion}return a}s(IH,"sortOptions");var NH=class pl{static{s(this,"CompletionDialog")}constructor(t,n,r,i,o,l){this.options=t,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=l}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new pl(this.options,cx(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,o,l){if(i&&!l&&t.some(d=>d.isPending))return i.setDisabled();let a=IH(t,n);if(!a.length)return i&&t.some(d=>d.isPending)?i.setDisabled():null;let c=n.facet(zt).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let d=i.options[i.selected].completion;for(let u=0;u<a.length;u++)if(a[u].completion==d){c=u;break}}return new pl(a,cx(r,c),{pos:t.reduce((d,u)=>u.hasResult()?Math.min(d,u.from):d,1e8),create:FH,above:o.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new pl(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new pl(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},OH=class Gg{static{s(this,"CompletionState")}constructor(t,n,r){this.active=t,this.id=n,this.open=r}static start(){return new Gg($H,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(zt),i=(r.override||n.languageDataAt("autocomplete",bo(n)).map(bH)).map(a=>(this.active.find(c=>c.source==a)||new go(a,this.active.some(c=>c.state!=0)?1:0)).update(t,r));i.length==this.active.length&&i.every((a,c)=>a==this.active[c])&&(i=this.active);let o=this.open,l=t.effects.some(a=>a.is(o0));o&&t.docChanged&&(o=o.map(t.changes)),t.selection||i.some(a=>a.hasResult()&&t.changes.touchesRange(a.from,a.to))||!DH(i,this.active)||l?o=NH.build(i,n,this.id,o,r,l):o&&o.disabled&&!i.some(a=>a.isPending)&&(o=null),!o&&i.every(a=>!a.isPending)&&i.some(a=>a.hasResult())&&(i=i.map(a=>a.hasResult()?new go(a.source,0):a));for(let a of t.effects)a.is(N3)&&(o=o&&o.setSelected(a.value,this.id));return i==this.active&&o==this.open?this:new Gg(i,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?RH:LH}};function DH(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,o=r==t.length;if(i||o)return i==o;if(e[n++].result!=t[r++].result)return!1}}s(DH,"sameResults");var RH={"aria-autocomplete":"list"},LH={};function cx(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}s(cx,"makeAttrs");var $H=[];function A3(e,t){if(e.isUserEvent("input.complete")){let r=e.annotation(M3);if(r&&t.activateOnCompletion(r))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}s(A3,"getUpdateType");var go=class ml{static{s(this,"ActiveSource")}constructor(t,n,r=!1){this.source=t,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=A3(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new ml(i.source,0)),r&4&&i.state==0&&(i=new ml(this.source,1)),i=i.updateFor(t,r);for(let o of t.effects)if(o.is(rd))i=new ml(i.source,1,o.value);else if(o.is(ha))i=new ml(i.source,0);else if(o.is(o0))for(let l of o.value)l.source==i.source&&(i=l);return i}updateFor(t,n){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(bo(t.state))}},I3=class Jc extends go{static{s(this,"ActiveResult")}constructor(t,n,r,i,o,l){super(t,3,n),this.limit=r,this.result=i,this.from=o,this.to=l}hasResult(){return!0}updateFor(t,n){var r;if(!(n&3))return this.map(t.changes);let i=this.result;i.map&&!t.changes.empty&&(i=i.map(i,t.changes));let o=t.changes.mapPos(this.from),l=t.changes.mapPos(this.to,1),a=bo(t.state);if(a>l||!i||n&2&&(bo(t.startState)==this.from||a<this.limit))return new go(this.source,n&4?1:0);let c=t.changes.mapPos(this.limit);return PH(i.validFor,t.state,o,l)?new Jc(this.source,this.explicit,c,i,o,l):i.update&&(i=i.update(i,o,l,new w3(t.state,a,!1)))?new Jc(this.source,this.explicit,c,i,i.from,(r=i.to)!==null&&r!==void 0?r:bo(t.state)):new go(this.source,1,this.explicit)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new Jc(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new go(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}};function PH(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e=="function"?e(i,n,r,t):k3(e,!0).test(i)}s(PH,"checkValid");var o0=rn.define({map(e,t){return e.map(n=>n.map(t))}}),N3=rn.define(),vn=ba.define({create(){return OH.start()},update(e,t){return e.update(t)},provide:s(e=>[tM.from(e,t=>t.tooltip),dt.contentAttributes.from(e,t=>t.attrs)],"provide")});function s0(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(vn).active.find(i=>i.source==t.source);return r instanceof I3?(typeof n=="string"?e.dispatch({...CH(e.state,n,r.from,r.to),annotations:M3.of(t.completion)}):n(e,t.completion,r.from,r.to),!0):!1}s(s0,"applyCompletion");var FH=MH(vn,s0);function xc(e,t="option"){return n=>{let r=n.state.field(vn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(zt).interactionDelay)return!1;let i=1,o;t=="page"&&(o=Qx(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:l}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:l-1;return a<0?a=t=="page"?0:l-1:a>=l&&(a=t=="page"?l-1:0),n.dispatch({effects:N3.of(a)}),!0}}s(xc,"moveCompletionSelection");var VH=s(e=>{let t=e.state.field(vn,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(zt).interactionDelay?!1:s0(e,t.open.options[t.open.selected])},"acceptCompletion"),Qf=s(e=>e.state.field(vn,!1)?(e.dispatch({effects:rd.of(!0)}),!0):!1,"startCompletion"),BH=s(e=>{let t=e.state.field(vn,!1);return!t||!t.active.some(n=>n.state!=0)?!1:(e.dispatch({effects:ha.of(null)}),!0)},"closeCompletion"),HH=class{static{s(this,"RunningQuery")}constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},KH=50,UH=1e3,WH=dp.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(vn).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(vn),n=e.state.facet(zt);if(!e.selectionSet&&!e.docChanged&&e.startState.field(vn)==t)return;let r=e.transactions.some(o=>{let l=A3(o,n);return l&8||(o.selection||o.docChanged)&&!(l&3)});for(let o=0;o<this.running.length;o++){let l=this.running[o];if(r||l.context.abortOnDocChange&&e.docChanged||l.updates.length+e.transactions.length>KH&&Date.now()-l.time>UH){for(let a of l.context.abortListeners)try{a()}catch(c){ah(this.view.state,c)}l.context.abortListeners=null,this.running.splice(o--,1)}else l.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(o=>o.effects.some(l=>l.is(rd)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(o=>o.isPending&&!this.running.some(l=>l.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of e.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(vn);for(let n of t.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(zt).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=bo(t),r=new w3(t,n,e.explicit,this.view),i=new HH(e,r);this.running.push(i),Promise.resolve(e.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:ha.of(null)}),ah(this.view.state,o)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(zt).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(zt),r=this.view.state.field(vn);for(let i=0;i<this.running.length;i++){let o=this.running[i];if(o.done===void 0)continue;if(this.running.splice(i--,1),o.done){let a=bo(o.updates.length?o.updates[0].startState:this.view.state),c=Math.min(a,o.done.from+(o.active.explicit?0:1)),d=new I3(o.active.source,o.active.explicit,c,o.done,o.done.from,(e=o.done.to)!==null&&e!==void 0?e:a);for(let u of o.updates)d=d.update(u,n);if(d.hasResult()){t.push(d);continue}}let l=r.active.find(a=>a.source==o.active.source);if(l&&l.isPending)if(o.done==null){let a=new go(o.active.source,0);for(let c of o.updates)a=a.update(c,n);a.isPending||t.push(a)}else this.startQuery(l)}(t.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:o0.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(vn,!1);if(t&&t.tooltip&&this.view.state.facet(zt).closeOnBlur){let n=t.open&&Qx(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ha.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:rd.of(!1)}),20),this.composing=0}}}),zH=typeof navigator=="object"&&/Win/.test(navigator.platform),jH=pp.highest(dt.domEventHandlers({keydown(e,t){let n=t.state.field(vn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(zH&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(l=>l.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(e.key)>-1&&s0(t,r),!1}})),JH=dt.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"}}}),ga={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},po=rn.define({map(e,t){let n=t.mapPos(e,-1,q9.TrackAfter);return n??void 0}}),l0=new class extends Q9{};l0.startSide=1;l0.endSide=-1;var O3=ba.define({create(){return rM.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:s(r=>r>=n.from&&r<=n.to,"filter")})}for(let n of t.effects)n.is(po)&&(e=e.update({add:[l0.range(n.value,n.value+1)]}));return e}});function GH(){return[ZH,O3]}s(GH,"closeBrackets");var ux="()[]{}<>«»»«[]{}";function D3(e){for(let t=0;t<16;t+=2)if(ux.charCodeAt(t)==e)return ux.charAt(t+1);return fp(e<128?e:e+1)}s(D3,"closing");function R3(e,t){return e.languageDataAt("closeBrackets",t)[0]||ga}s(R3,"config");var qH=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),ZH=dt.inputHandler.of((e,t,n,r)=>{if((qH?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&Xr(Hn(r,0))==1||t!=i.from||n!=i.to)return!1;let o=QH(e.state,r);return o?(e.dispatch(o),!0):!1}),YH=s(({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=R3(e,e.selection.main.head).brackets||ga.brackets,r=null,i=e.changeByRange(o=>{if(o.empty){let l=eK(e.doc,o.head);for(let a of n)if(a==l&&of(e.doc,o.head)==D3(Hn(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:Se.cursor(o.head-a.length)}}return{range:r=o}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},"deleteBracketPair"),XH=[{key:"Backspace",run:YH}];function QH(e,t){let n=R3(e,e.selection.main.head),r=n.brackets||ga.brackets;for(let i of r){let o=D3(Hn(i,0));if(t==i)return o==i?rK(e,i,r.indexOf(i+i+i)>-1,n):tK(e,i,o,n.before||ga.before);if(t==o&&L3(e,e.selection.main.from))return nK(e,i,o)}return null}s(QH,"insertBracket");function L3(e,t){let n=!1;return e.field(O3).between(0,e.doc.length,r=>{r==t&&(n=!0)}),n}s(L3,"closedBracketAt");function of(e,t){let n=e.sliceString(t,t+2);return n.slice(0,Xr(Hn(n,0)))}s(of,"nextChar");function eK(e,t){let n=e.sliceString(t-2,t);return Xr(Hn(n,0))==n.length?n:n.slice(1)}s(eK,"prevChar");function tK(e,t,n,r){let i=null,o=e.changeByRange(l=>{if(!l.empty)return{changes:[{insert:t,from:l.from},{insert:n,from:l.to}],effects:po.of(l.to+t.length),range:Se.range(l.anchor+t.length,l.head+t.length)};let a=of(e.doc,l.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:l.head},effects:po.of(l.head+t.length),range:Se.cursor(l.head+t.length)}:{range:i=l}});return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}s(tK,"handleOpen");function nK(e,t,n){let r=null,i=e.changeByRange(o=>o.empty&&of(e.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:Se.cursor(o.head+n.length)}:r={range:o});return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}s(nK,"handleClose");function rK(e,t,n,r){let i=r.stringPrefixes||ga.stringPrefixes,o=null,l=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:t,from:a.to}],effects:po.of(a.to+t.length),range:Se.range(a.anchor+t.length,a.head+t.length)};let c=a.head,d=of(e.doc,c),u;if(d==t){if(dx(e,c))return{changes:{insert:t+t,from:c},effects:po.of(c+t.length),range:Se.cursor(c+t.length)};if(L3(e,c)){let f=n&&e.sliceDoc(c,c+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:c,to:c+f.length,insert:f},range:Se.cursor(c+f.length)}}}else{if(n&&e.sliceDoc(c-2*t.length,c)==t+t&&(u=fx(e,c-2*t.length,i))>-1&&dx(e,u))return{changes:{insert:t+t+t+t,from:c},effects:po.of(c+t.length),range:Se.cursor(c+t.length)};if(e.charCategorizer(c)(d)!=dn.Word&&fx(e,c,i)>-1&&!iK(e,c,t,i))return{changes:{insert:t+t,from:c},effects:po.of(c+t.length),range:Se.cursor(c+t.length)}}return{range:o=a}});return o?null:e.update(l,{scrollIntoView:!0,userEvent:"input.type"})}s(rK,"handleSame");function dx(e,t){let n=Ns(e).resolveInner(t+1);return n.parent&&n.from==t}s(dx,"nodeStart");function iK(e,t,n,r){let i=Ns(e).resolveInner(t,-1),o=r.reduce((l,a)=>Math.max(l,a.length),0);for(let l=0;l<5;l++){let a=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),c=a.indexOf(n);if(!c||c>-1&&r.indexOf(a.slice(0,c))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+c;){if(e.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let d=i.to==t&&i.parent;if(!d)break;i=d}return!1}s(iK,"probablyInString");function fx(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=dn.Word)return t;for(let i of n){let o=t-i.length;if(e.sliceDoc(o,t)==i&&r(e.sliceDoc(o-1,o))!=dn.Word)return o}return-1}s(fx,"canStartStringAt");function oK(e={}){return[jH,vn,zt.of(e),WH,sK,JH]}s(oK,"autocompletion");var $3=[{key:"Ctrl-Space",run:Qf},{mac:"Alt-`",run:Qf},{mac:"Alt-i",run:Qf},{key:"Escape",run:BH},{key:"ArrowDown",run:xc(!0)},{key:"ArrowUp",run:xc(!1)},{key:"PageDown",run:xc(!0,"page")},{key:"PageUp",run:xc(!1,"page")},{key:"Enter",run:VH}],sK=pp.highest(gp.computeN([zt],e=>e.facet(zt).defaultKeymap?[$3]:[])),hx=class{static{s(this,"SelectedDiagnostic")}constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},ll=class P3{static{s(this,"LintState")}constructor(t,n,r){this.diagnostics=t,this.panel=n,this.selected=r}static init(t,n,r){let i=r.facet(pa).markerFilter;i&&(t=i(t,r));let o=t.slice().sort((g,p)=>g.from-p.from||g.to-p.to),l=new nC,a=[],c=0,d=r.doc.iter(),u=0,f=r.doc.length;for(let g=0;;){let p=g==o.length?null:o[g];if(!p&&!a.length)break;let v,_;if(a.length)v=c,_=a.reduce((C,b)=>Math.min(C,b.to),p&&p.from>v?p.from:1e8);else{if(v=p.from,v>f)break;_=p.to,a.push(p),g++}for(;g<o.length;){let C=o[g];if(C.from==v&&(C.to>C.from||C.to==v))a.push(C),g++,_=Math.min(C.to,_);else{_=Math.min(C.from,_);break}}_=Math.min(_,f);let y=!1;if(a.some(C=>C.from==v&&(C.to==_||_==f))&&(y=v==_,!y&&_-v<10)){let C=v-(u+d.value.length);C>0&&(d.next(C),u=v);for(let b=v;;){if(b>=_){y=!0;break}if(!d.lineBreak&&u+d.value.length>b)break;b=u+d.value.length,u+=d.value.length,d.next()}}let x=yK(a);if(y)l.add(v,v,Dt.widget({widget:new pK(x),diagnostics:a.slice()}));else{let C=a.reduce((b,T)=>T.markClass?b+" "+T.markClass:b,"");l.add(v,_,Dt.mark({class:"cm-lintRange cm-lintRange-"+x+C,diagnostics:a.slice(),inclusiveEnd:a.some(b=>b.to>_)}))}if(c=_,c==f)break;for(let C=0;C<a.length;C++)a[C].to<=c&&a.splice(C--,1)}let h=l.finish();return new P3(h,n,Yi(h))}};function Yi(e,t=null,n=0){let r=null;return e.between(n,1e9,(i,o,{spec:l})=>{if(!(t&&l.diagnostics.indexOf(t)<0))if(!r)r=new hx(i,o,t||l.diagnostics[0]);else{if(l.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new hx(r.from,o,r.diagnostic)}}),r}s(Yi,"findDiagnostic");function lK(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(pa).hideOn(e,n,r);if(i!=null)return i;let o=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(l=>l.is(F3))||e.changes.touchesRange(o.from,Math.max(o.to,r)))}s(lK,"hideTooltip");function aK(e,t){return e.field(Rn,!1)?t:t.concat(rn.appendConfig.of(xK))}s(aK,"maybeEnableLint");var F3=rn.define(),a0=rn.define(),V3=rn.define(),Rn=ba.define({create(){return new ll(Dt.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let o=t.changes.mapPos(e.selected.from,1);r=Yi(n,e.selected.diagnostic,o)||Yi(n,null,o)}!n.size&&i&&t.state.facet(pa).autoPanel&&(i=null),e=new ll(n,i,r)}for(let n of t.effects)if(n.is(F3)){let r=t.state.facet(pa).autoPanel?n.value.length?qg.open:null:e.panel;e=ll.init(n.value,r,t.state)}else n.is(a0)?e=new ll(e.diagnostics,n.value?qg.open:null,e.selected):n.is(V3)&&(e=new ll(e.diagnostics,e.panel,n.value));return e},provide:s(e=>[oC.from(e,t=>t.panel),dt.decorations.from(e,t=>t.diagnostics)],"provide")}),cK=Dt.mark({class:"cm-lintRange cm-lintRange-active"});function uK(e,t,n){let{diagnostics:r}=e.state.field(Rn),i,o=-1,l=-1;r.between(t-(n<0?1:0),t+(n>0?1:0),(c,d,{spec:u})=>{if(t>=c&&t<=d&&(c==d||(t>c||n>0)&&(t<d||n<0)))return i=u.diagnostics,o=c,l=d,!1});let a=e.state.facet(pa).tooltipFilter;return i&&a&&(i=a(i,e.state)),i?{pos:o,end:l,above:e.state.doc.lineAt(o).to<l,create(){return{dom:dK(e,i)}}}:null}s(uK,"lintTooltip");function dK(e,t){return Ct("ul",{class:"cm-tooltip-lint"},t.map(n=>H3(e,n,!1)))}s(dK,"diagnosticsTooltip");var fK=s(e=>{let t=e.state.field(Rn,!1);(!t||!t.panel)&&e.dispatch({effects:aK(e.state,[a0.of(!0)])});let n=hp(e,qg.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},"openLintPanel"),gx=s(e=>{let t=e.state.field(Rn,!1);return!t||!t.panel?!1:(e.dispatch({effects:a0.of(!1)}),!0)},"closeLintPanel"),hK=s(e=>{let t=e.state.field(Rn,!1);if(!t)return!1;let n=e.state.selection.main,r=Yi(t.diagnostics,null,n.to+1);return!r&&(r=Yi(t.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},"nextDiagnostic"),gK=[{key:"Mod-Shift-m",run:fK,preventDefault:!0},{key:"F8",run:hK}],pa=Lo.define({combine(e){return{sources:e.map(t=>t.source).filter(t=>t!=null),...Ca(e.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:s(()=>null,"hideOn")},{delay:Math.max,markerFilter:px,tooltipFilter:px,needsRefresh:s((t,n)=>t?n?r=>t(r)||n(r):t:n,"needsRefresh"),hideOn:s((t,n)=>t?n?(r,i,o)=>t(r,i,o)||n(r,i,o):t:n,"hideOn"),autoPanel:s((t,n)=>t||n,"autoPanel")})}}});function px(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}s(px,"combineFilter");function B3(e){let t=[];if(e)e:for(let{name:n}of e){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!t.some(o=>o.toLowerCase()==i.toLowerCase())){t.push(i);continue e}}t.push("")}return t}s(B3,"assignKeys");function H3(e,t,n){var r;let i=n?B3(t.actions):[];return Ct("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},Ct("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),(r=t.actions)===null||r===void 0?void 0:r.map((o,l)=>{let a=!1,c=s(g=>{if(g.preventDefault(),a)return;a=!0;let p=Yi(e.state.field(Rn).diagnostics,t);p&&o.apply(e,p.from,p.to)},"click"),{name:d}=o,u=i[l]?d.indexOf(i[l]):-1,f=u<0?d:[d.slice(0,u),Ct("u",d.slice(u,u+1)),d.slice(u+1)],h=o.markClass?" "+o.markClass:"";return Ct("button",{type:"button",class:"cm-diagnosticAction"+h,onclick:c,onmousedown:c,"aria-label":` Action: ${d}${u<0?"":` (access key "${i[l]})"`}.`},f)}),t.source&&Ct("div",{class:"cm-diagnosticSource"},t.source))}s(H3,"renderDiagnostic");var pK=class extends aM{static{s(this,"DiagnosticWidget")}constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Ct("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}},mx=class{static{s(this,"PanelItem")}constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=H3(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}},qg=class K3{static{s(this,"LintPanel")}constructor(t){this.view=t,this.items=[];let n=s(i=>{if(!(i.ctrlKey||i.altKey||i.metaKey)){if(i.keyCode==27)gx(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],l=B3(o.actions);for(let a=0;a<l.length;a++)if(l[a].toUpperCase().charCodeAt(0)==i.keyCode){let c=Yi(this.view.state.field(Rn).diagnostics,o);c&&o.actions[a].apply(t,c.from,c.to)}}else return;i.preventDefault()}},"onkeydown"),r=s(i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)},"onclick");this.list=Ct("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=Ct("div",{class:"cm-panel-lint"},this.list,Ct("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:s(()=>gx(this.view),"onclick")},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(Rn).selected;if(!t)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==t.diagnostic)return n;return-1}update(){let{diagnostics:t,selected:n}=this.view.state.field(Rn),r=0,i=!1,o=null,l=new Set;for(t.between(0,this.view.state.doc.length,(a,c,{spec:d})=>{for(let u of d.diagnostics){if(l.has(u))continue;l.add(u);let f=-1,h;for(let g=r;g<this.items.length;g++)if(this.items[g].diagnostic==u){f=g;break}f<0?(h=new mx(this.view,u),this.items.splice(r,0,h),i=!0):(h=this.items[f],f>r&&(this.items.splice(r,f-r),i=!0)),n&&h.diagnostic==n.diagnostic?h.dom.hasAttribute("aria-selected")||(h.dom.setAttribute("aria-selected","true"),o=h):h.dom.hasAttribute("aria-selected")&&h.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new mx(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:s(()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),"read"),write:s(({sel:a,panel:c})=>{let d=c.height/this.list.offsetHeight;a.top<c.top?this.list.scrollTop-=(c.top-a.top)/d:a.bottom>c.bottom&&(this.list.scrollTop+=(a.bottom-c.bottom)/d)},"write")})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let t=this.list.firstChild;function n(){let r=t;t=r.nextSibling,r.remove()}s(n,"rm");for(let r of this.items)if(r.dom.parentNode==this.list){for(;t!=r.dom;)n();t=r.dom.nextSibling}else this.list.insertBefore(r.dom,t);for(;t;)n()}moveSelection(t){if(this.selectedIndex<0)return;let n=Yi(this.view.state.field(Rn).diagnostics,this.items[t].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:V3.of(n)})}static open(t){return new K3(t)}};function mK(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}s(mK,"svg");function Cc(e){return mK(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}s(Cc,"underline");var vK=dt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Cc("#d11")},".cm-lintRange-warning":{backgroundImage:Cc("orange")},".cm-lintRange-info":{backgroundImage:Cc("#999")},".cm-lintRange-hint":{backgroundImage:Cc("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function _K(e){return e=="error"?4:e=="warning"?3:e=="info"?2:1}s(_K,"severityWeight");function yK(e){let t="hint",n=1;for(let r of e){let i=_K(r.severity);i>n&&(n=i,t=r.severity)}return t}s(yK,"maxSeverity");var xK=[Rn,dt.decorations.compute([Rn],e=>{let{selected:t,panel:n}=e.field(Rn);return!t||!n||t.from==t.to?Dt.none:Dt.set([cK.range(t.from,t.to)])}),W9(uK,{hideOn:lK}),vK],CK=[eC(),z9(),iM(),BV(),X9(),J9(),U9(),qc.allowMultipleSelections.of(!0),lM(),qx(Y9,{fallback:!0}),eM(),GH(),oK(),j9(),H9(),K9(),GB(),gp.of([...XH,...WB,...pH,...qV,...sM,...$3,...gK])];function bK(e,t,n){const r=li(pt),i=Nn(UT),o=m.useRef(null),{lexicalNode:l}=Bg(),a=m.useRef(!1),c=m.useRef(!1),d=m.useCallback(()=>{i({editorType:"codeblock",rootNode:l,editorRef:o.current})},[l,i]),u=m.useCallback(f=>{var h,g,p,v,_,y;if(f.key==="ArrowDown"){const x=(g=(h=o.current)==null?void 0:h.getCodemirror())==null?void 0:g.state;x&&x.doc.length===x.selection.ranges[0].to&&(a.current?(r?.update(()=>{var C,b;const T=Cn(e);T.getNextSibling()?((b=(C=o.current)==null?void 0:C.getCodemirror())==null||b.contentDOM.blur(),T.selectNext()):T.insertAfter(Qe())}),a.current=!1):a.current=!0)}else if(f.key==="ArrowUp"){const x=(v=(p=o.current)==null?void 0:p.getCodemirror())==null?void 0:v.state;x&&x.selection.ranges[0].from===0&&(c.current?(r?.update(()=>{var C,b;const T=Cn(e);T.getPreviousSibling()&&((b=(C=o.current)==null?void 0:C.getCodemirror())==null||b.contentDOM.blur(),T.selectPrevious())}),c.current=!1):c.current=!0)}else if(f.key==="Enter")f.stopPropagation();else if(f.key==="Backspace"||f.key==="Delete"){const x=(y=(_=o.current)==null?void 0:_.getCodemirror())==null?void 0:y.state;x?.doc.length===0&&r?.update(()=>{Cn(e).remove()})}},[r,e]);return m.useEffect(()=>{const f=o.current;return setTimeout(()=>{var h,g;(h=f?.getCodemirror())==null||h.contentDOM.addEventListener("focus",d),(g=f?.getCodemirror())==null||g.contentDOM.addEventListener("keydown",u)},300),()=>{var h,g;(h=f?.getCodemirror())==null||h.contentDOM.removeEventListener("focus",d),(g=f?.getCodemirror())==null||g.contentDOM.removeEventListener("keydown",u)}},[o,d,u,t]),m.useEffect(()=>{n.subscribe(()=>{var f,h;(h=(f=o.current)==null?void 0:f.getCodemirror())==null||h.focus(),d()})},[n,o,e,d]),o}s(bK,"useCodeMirrorRef");var EK=m.forwardRef(({title:e,children:t},n)=>{const r=li(Ko);return m.createElement(DC,{delayDuration:100},m.createElement(RC,null,m.createElement(LC,{ref:n,asChild:!0},m.createElement("span",{className:j.tooltipTrigger},t)),m.createElement($C,{container:r?.current},m.createElement(PC,{className:(0,nt.default)(j.tooltipContent),sideOffset:10},e))))}),TK=m.forwardRef(({children:e,className:t,...n},r)=>m.createElement(v9,{...n,ref:r,className:(0,nt.default)(t,j.selectItem)},m.createElement(S9,null,e))),SK=s(({title:e,placeholder:t,className:n})=>{const[r,i]=Er(Cr,xi);return m.createElement(EK,{title:e},m.createElement(T9,{"aria-label":t,className:(0,nt.default)(j.selectTrigger,n),"data-toolbar-item":!0,disabled:r},m.createElement(b9,{placeholder:t}),m.createElement(x9,{className:j.selectDropdownArrow},i("arrow_drop_down"))))},"SelectTrigger"),wK=s(({children:e,className:t=j.selectContainer})=>{const n=li(Ko);return m.createElement(C9,{container:n?.current},m.createElement(E9,{className:(0,nt.default)(t,"mdxeditor-select-content"),onCloseAutoFocus:s(r=>{r.preventDefault()},"onCloseAutoFocus"),position:"popper"},m.createElement(y9,{"data-editor-dropdown":!0,style:{maxHeight:"var(--radix-select-content-available-height)"}},e)))},"SelectContent"),kK=s(e=>m.createElement(w9,{value:e.value||"",onValueChange:e.onChange,disabled:e.disabled},m.createElement(SK,{title:e.triggerTitle,placeholder:e.placeholder}),m.createElement(wK,null,e.items.map((t,n)=>t==="separator"?m.createElement(_9,{key:n}):m.createElement(TK,{key:n,value:t.value},t.label)))),"Select"),U3=s(({language:e,nodeKey:t,code:n,focusEmitter:r})=>{const i=Ci(),{parentEditor:o,lexicalNode:l}=Bg(),[a,c,d,u,f]=Er(Cr,Xg,Qg,xi,Yg),h=bK(t,e,r),{setCode:g}=Bg(),p=m.useRef(null),v=m.useRef(null),{value:_,items:y}=m.useMemo(()=>MK(f,e),[f,e]),x=m.useRef(g);return x.current=g,h.current={getCodemirror:s(()=>p.current,"getCodemirror")},m.useEffect(()=>{const C=v.current;return(async()=>{const b=[...c,CK,IV,eC(),gp.of([bV]),dt.lineWrapping,dt.updateListener.of(({state:T})=>{x.current(T.doc.toString())}),dt.domEventHandlers({focus:s(()=>{o.update(()=>{nr(null)})},"focus")})];if(a&&b.push(qc.readOnly.of(!0)),e!==""){const T=f.keyMap[e]??e,M=f.supportMap[T];if(M)b.push(M.extension);else if(d){const S=dV.find(E=>E.name===e||E.alias.includes(e)||E.extensions.includes(e));if(S)try{const E=await S.load();b.push(E.extension)}catch{}}}C.innerHTML="",p.current=new dt({parent:C,state:qc.create({doc:n,extensions:b})}),C.addEventListener("keydown",vx)})(),()=>{var b;(b=p.current)==null||b.destroy(),p.current=null,C.removeEventListener("keydown",vx)}},[a,e,...c]),m.createElement("div",{className:j.codeMirrorWrapper},m.createElement("div",{className:j.codeMirrorToolbar},m.createElement(kK,{disabled:a,value:_,onChange:s(C=>{o.update(()=>{l.setLanguage(C==="__EMPTY_VALUE__"?"":C),setTimeout(()=>{o.update(()=>{l.getLatest().select()})})})},"onChange"),triggerTitle:i("codeBlock.selectLanguage","Select code block language"),placeholder:i("codeBlock.inlineLanguage","Language"),items:y}),m.createElement("button",{className:j.iconButton,type:"button",disabled:a,title:i("codeblock.delete","Delete code block"),onClick:s(C=>{C.preventDefault(),o.update(()=>{l.remove()})},"onClick")},u("delete_small"))),m.createElement("div",{ref:v}))},"CodeMirrorEditor");function vx(e){e.stopPropagation()}s(vx,"stopPropagationHandler");function Zg(e){var t;const n=[],r={},i={};if(Array.isArray(e))for(const o of e){const l=((t=o.alias)==null?void 0:t[0])??o.name.toLowerCase(),a=l||"__EMPTY_VALUE__";if(n.push({value:a,label:o.name}),r[l]=a,o.alias)for(const c of o.alias)r[c]=a;if(o.extensions)for(const c of o.extensions)r[c]=a;r[o.name.toLowerCase()]=a,o.support&&(i[a]=o.support)}else{const o={};for(const[l,a]of Object.entries(e))a in o||(o[a]=l,n.push({value:l||"__EMPTY_VALUE__",label:a})),r[l]=o[a]||"__EMPTY_VALUE__"}return{items:n,keyMap:r,supportMap:i}}s(Zg,"normalizeCodeBlockLanguages");function MK(e,t){const n=e.keyMap[t]??t;return!n||e.items.some(r=>r.value===n)?{value:n,items:e.items}:{value:n,items:[...e.items,{value:n,label:t}]}}s(MK,"getCodeBlockLanguageSelectData");var Yg=fe(Zg({js:"JavaScript",ts:"TypeScript",tsx:"TypeScript (React)",jsx:"JavaScript (React)",css:"CSS"})),AK=kt(e=>{e.link(e.pipe(AK,Hi(({language:t,code:n})=>({code:n,language:t,meta:""}))),$w)}),Xg=fe([]),Qg=fe(!0),IK=Sn({update(e,t){e.pubIn({[Yg]:Zg(t?.codeBlockLanguages??{}),[Xg]:t?.codeMirrorExtensions??[],[Qg]:t?.autoLoadLanguageSupport??!0})},init(e,t){const n=Zg(t?.codeBlockLanguages??{});e.pubIn({[Yg]:n,[Xg]:t?.codeMirrorExtensions??[],[cV]:NK(n),[Qg]:t?.autoLoadLanguageSupport??!0})}});function NK(e){return{match(t,n){return!n||Object.hasOwn(e.keyMap,t??"")},priority:1,Editor:U3}}s(NK,"buildCodeBlockDescriptor");kr();function OK({url:e,title:t,text:n,onSubmit:r,onCancel:i,linkAutocompleteSuggestions:o,showLinkTitleField:l,showAnchorTextField:a}){const{register:c,handleSubmit:d,control:u,setValue:f,reset:h}=JS({values:{url:e,title:t,text:n}}),g=Ci();return m.createElement("form",{onSubmit:s(p=>{d(r)(p),p.stopPropagation(),p.preventDefault()},"onSubmit"),onReset:s(p=>{p.stopPropagation(),i()},"onReset"),onKeyDown:s(p=>{p.key==="Escape"&&(p.stopPropagation(),i())},"onKeyDown"),className:(0,nt.default)(j.multiFieldForm,j.linkDialogEditForm)},m.createElement("div",{className:j.formField},m.createElement("label",{htmlFor:"link-url"},g("createLink.url","URL")),m.createElement(ww,{register:c,initialInputValue:e,inputName:"url",suggestions:o,setValue:f,control:u,placeholder:g("createLink.urlPlaceholder","Select or paste an URL"),autofocus:!0})),a?m.createElement("div",{className:j.formField},m.createElement("label",{htmlFor:"link-text",title:g("createLink.textTooltip","The text to be displayed for the link")},g("createLink.text","Anchor text")),m.createElement("input",{id:"link-text",className:j.textInput,size:40,...c("text")})):null,l?m.createElement("div",{className:j.formField},m.createElement("label",{htmlFor:"link-title",title:g("createLink.titleTooltip","The link's title attribute, shown on hover")},g("createLink.title","Link title")),m.createElement("input",{id:"link-title",className:j.textInput,size:40,...c("title")})):null,m.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},m.createElement("button",{type:"submit",title:g("createLink.saveTooltip","Set URL"),"aria-label":g("createLink.saveTooltip","Set URL"),className:(0,nt.default)(j.primaryButton)},g("dialogControls.save","Save")),m.createElement("button",{type:"reset",title:g("createLink.cancelTooltip","Cancel change"),"aria-label":g("createLink.cancelTooltip","Cancel change"),className:(0,nt.default)(j.secondaryButton)},g("dialogControls.cancel","Cancel"))))}s(OK,"LinkEditForm");var DK=s(()=>{const[e,t,n,r,i,o,l,a]=Er(Ko,BT,pt,xi,Qt,Y3,X3,ek),c=Nn(z3),d=Nn(j3),u=Nn(J3),f=Nn(G3),h=Nn(q3);m.useEffect(()=>{const x=t?.closest(".mdxeditor-root-contenteditable"),C=s(()=>{n?.getEditorState().read(()=>{c(!0)})},"update");return window.addEventListener("resize",C),window.addEventListener("scroll",C),x?.addEventListener("scroll",C),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",C),x?.removeEventListener("scroll",C)}},[n,t,c]);const[g,p]=m.useState(!1),v=Ci();if(i.type==="inactive")return null;const _=i.rectangle,y=i.type==="preview"&&i.url.startsWith("http");return m.createElement(up,{open:!0},m.createElement(k9,{"data-visible":i.type==="edit",className:j.linkDialogAnchor,style:{top:`${_.top}px`,left:`${_.left}px`,width:`${_.width}px`,height:`${_.height}px`}}),m.createElement(ap,{container:e?.current},m.createElement(I9,{className:(0,nt.default)(j.linkDialogPopoverContent),sideOffset:5,updatePositionStrategy:"always",onOpenAutoFocus:s(x=>{x.preventDefault()},"onOpenAutoFocus"),key:i.linkNodeKey},i.type==="edit"&&m.createElement(OK,{url:i.url,title:i.title,text:i.text,onSubmit:d,onCancel:u.bind(null),linkAutocompleteSuggestions:o,showLinkTitleField:a,showAnchorTextField:i.withAnchorText}),i.type==="preview"&&m.createElement(m.Fragment,null,m.createElement("a",{className:j.linkDialogPreviewAnchor,"data-testid":"link-dialog-preview",href:i.href??"about:blank",...y?{target:"_blank",rel:"noreferrer"}:{},onClick:s(x=>{l!==null&&(x.preventDefault(),l(i.url))},"onClick"),title:y?v("linkPreview.open","Open {{url}} in new window",{url:i.url}):i.url},m.createElement("span",null,i.url),y&&r("open_in_new")),m.createElement(eh,{onClick:s(()=>{f()},"onClick"),title:v("linkPreview.edit","Edit link URL"),"aria-label":v("linkPreview.edit","Edit link URL")},r("edit")),m.createElement(DC,null,m.createElement(RC,{open:g},m.createElement(LC,{asChild:!0},m.createElement(eh,{title:v("linkPreview.copyToClipboard","Copy to clipboard"),"aria-label":v("linkPreview.copyToClipboard","Copy to clipboard"),onClick:s(()=>{window.navigator.clipboard.writeText(i.url).then(()=>{p(!0),setTimeout(()=>{p(!1)},1e3)})},"onClick")},r(g?"check":"content_copy"))),m.createElement($C,{container:e?.current},m.createElement(PC,{className:(0,nt.default)(j.tooltipContent),sideOffset:5},v("linkPreview.copied","Copied!"),m.createElement(h8,null))))),m.createElement(eh,{title:v("linkPreview.remove","Remove link"),"aria-label":v("linkPreview.remove","Remove link"),onClick:s(()=>{h()},"onClick")},r("link_off"))),m.createElement(cp,{className:j.popoverArrow}))))},"LinkDialog"),eh=m.forwardRef(({className:e,...t},n)=>m.createElement("button",{className:(0,nt.default)(j.actionButton,e),ref:n,...t}));function id(e){if(!e)return null;const t=LL(e);if(t===null)return null;const n=t.getParent();return St(n)?n:St(t)?t:null}s(id,"getLinkNodeInSelection");function W3(e=ie()){if(!He(e))return null;const t=e.getNodes(),n=t.length===1?t[0]:null;return jn(n)&&n.isInline()?n:null}s(W3,"getSelectedInlineDecorator");function th(e,t,n){return e?e.getEditorState().read(()=>{const r=t===""?null:Cn(t),i=ie(),o=oe(i)?id(i):null,l=St(r)?r:o;return l?.sanitizeUrl(n)??"about:blank"}):"about:blank"}s(th,"getPreviewHref");var z3=kt(),Qt=fe({type:"inactive"},e=>{e.pub(sa,t=>t.registerCommand(Rd,()=>e.getValue(Qt).type==="preview"?(e.pub(Qt,{type:"inactive"}),!0):!1,st)),e.sub(e.pipe(la),t=>{t!=="rich-text"&&e.pub(Qt,{type:"inactive"})}),e.pub(sa,t=>t.registerCommand(zb,n=>{if(n.key==="k"&&(lS?n.metaKey:n.ctrlKey)&&!e.getValue(Cr)){const r=ie();return oe(r)||W3(r)!==null?(e.pub(Z3),n.stopPropagation(),n.preventDefault(),!0):!1}return!1},Ql)),e.sub(e.pipe(G3,mt(Qt,pt)),([,t,n])=>{if(t.type==="preview")setTimeout(()=>{n?.getEditorState().read(()=>{const r=Cn(t.linkNodeKey),i=St(r)?r.getTextContent().length>0&&r.getChildrenSize()<=1:!1,o=i&&r?r.getTextContent():"";e.pub(Qt,{type:"edit",initialUrl:t.url,url:t.url,title:t.title,text:o,withAnchorText:i,linkNodeKey:t.linkNodeKey,decoratorNodeKey:t.decoratorNodeKey,rectangle:t.rectangle})})});else throw new Error("Cannot switch to edit mode when not in preview mode")}),e.sub(e.pipe(j3,mt(pt,Qt,ws)),([t,n,r,i])=>{var o,l,a;const c=((o=t.text)==null?void 0:o.trim())??"",d=((l=t.url)==null?void 0:l.trim())??"",u=((a=t.title)==null?void 0:a.trim())??"";if(d!==""){if(r.decoratorNodeKey!==void 0){let f="",h=!1;if(n?.update(()=>{const g=Cn(r.decoratorNodeKey);if(g===null)return;const p=xu();if(p.add(g.getKey()),nr(p),h=n.dispatchCommand(Oi,d),!h)return;const v=g.getParent();St(v)&&(v.setTitle(u),f=v.getKey())},{discrete:!0}),f==="")return;e.pub(Qt,{type:"preview",linkNodeKey:f,decoratorNodeKey:r.decoratorNodeKey,rectangle:r.rectangle,title:u,url:d,href:th(n,f,d)});return}if(i?.isCollapsed()){const f=c||u||d;n?.update(()=>{const h=id(i);if(h)if(cn(h)){const g=hi(d,{title:u});g.append(yr(c)),h.replace(g),g.select()}else h.setURL(d),h.setTitle(u),_x(h.getFirstChild(),c);else{const g=hi(d,{title:u});g.append(yr(f)),Vs([g]),g.select()}},{discrete:!0})}else n?.update(()=>{_x(i?.anchor.getNode(),c)}),n?.dispatchCommand(Oi,{url:d,title:u});e.pub(Qt,{type:"preview",linkNodeKey:r.linkNodeKey,rectangle:r.rectangle,title:u,url:d,href:th(n,r.linkNodeKey??"",d)})}else r.type==="edit"&&r.initialUrl!==""&&(r.decoratorNodeKey!==void 0?n?.update(()=>{const f=Cn(r.decoratorNodeKey);if(f===null)return;const h=xu();h.add(f.getKey()),nr(h),n.dispatchCommand(Oi,null)}):n?.dispatchCommand(Oi,null)),e.pub(Qt,{type:"inactive"})}),e.link(e.pipe(J3,mt(Qt,pt),Hi(([,t,n])=>{if(t.type==="edit")return n?.focus(),t.initialUrl===""?{type:"inactive"}:{type:"preview",url:t.initialUrl,href:th(n,t.linkNodeKey,t.initialUrl),linkNodeKey:t.linkNodeKey,decoratorNodeKey:t.decoratorNodeKey,rectangle:t.rectangle};throw new Error("Cannot cancel edit when not in edit mode")})),Qt),e.link(e.pipe(e.combine(ws,z3),mt(pt,Qt,Cr),Hi(([[t],n,r,i])=>{if(r.decoratorNodeKey!==void 0&&n&&!i){if(n.getEditorState().read(()=>{const l=ie();if(!He(l))return null;const a=l.getNodes();return a.length===1?a[0].getKey():null})!==r.decoratorNodeKey)return{type:"inactive"};const o=rS(n,r.decoratorNodeKey);return o===null?{type:"inactive"}:{...r,rectangle:o}}if(oe(t)&&n&&!i){const o=id(t);if(!t.isCollapsed())return{type:"inactive"};if(o){const l=iS(n);return l?{type:"preview",url:o.getURL(),href:o.sanitizeUrl(o.getURL()),linkNodeKey:o.getKey(),title:o.getTitle(),rectangle:l}:{type:"inactive"}}else return{type:"inactive"}}else return{type:"inactive"}})),Qt)}),j3=kt(),J3=Xi(),Kj=Xi(),G3=Xi(),q3=Xi(e=>{e.sub(e.pipe(q3,mt(pt)),([,t])=>{t?.dispatchCommand(Oi,null)})}),Z3=Xi(e=>{e.sub(e.pipe(Z3,mt(ws,pt)),([,t,n])=>{if(!n)return;const r=n.getEditorState().read(()=>{const i=W3();if(i===null)return null;const o=i.getParent(),l=St(o)?o:null;return{nodeKey:i.getKey(),url:l?.getURL()??"",title:l?.getTitle()??"",linkNodeKey:l?.getKey()??""}});if(r!==null){const i=rS(n,r.nodeKey);if(i===null)return;e.pub(Qt,{type:"edit",initialUrl:r.url,url:r.url,title:r.title,text:"",withAnchorText:!1,linkNodeKey:r.linkNodeKey,decoratorNodeKey:r.nodeKey,rectangle:i});return}oe(t)&&n.focus(()=>{setTimeout(()=>{n.getEditorState().read(()=>{const i=id(t),o=iS(n);if(o===null)return;const l=i?.getURL()??"",a=i?.getURL()??"",c=i?.getTitle()??"",d=i?.getKey()??"",u=i?i.getTextContent().length>0&&i.getChildrenSize()<=1:t.isCollapsed(),f=u&&i?i.getTextContent():"";e.pub(Qt,{type:"edit",initialUrl:l,url:a,title:c,text:f,withAnchorText:u,linkNodeKey:d,rectangle:o})})})})})}),Y3=fe([]),X3=fe(null),Q3=fe(null,e=>{e.pub(sa,t=>{function n(r){const[i,o]=e.getValues([Cr,Q3]);!i||o===null||t.update(()=>{const l=di(r.target);if(l!==null){const a=ft(l,c=>c instanceof Wr);a!==null&&o(r,a,a.getURL())}})}return s(n,"onClick"),t.registerRootListener((r,i)=>{r&&r.addEventListener("click",n),i&&i.removeEventListener("click",n)})})});function _x(e,t){Ne(e)&&t&&(e.setTextContent(t),e.selectStart())}s(_x,"updateLinkText");var ek=fe(!0),RK=Sn({init(e,t){e.pub(Ws,t?.LinkDialog??DK),e.pub(X3,t?.onClickLinkCallback??null),e.pub(Q3,t?.onReadOnlyClickLinkCallback??null),e.pub(ek,t?.showLinkTitleField??!0)},update(e,t={}){e.pub(Y3,t.linkAutocompleteSuggestions??[])}});function LK(e,t){let n=e;for(let r=Xn(e,t);r&&(sk(r.origin)||bu(r.origin));r=r.getAdjacentCaret())n=r.origin;return n}s(LK,"le");function $K(e){return LK(e,"previous")}s($K,"ue$1");function tk(e,t){for(const n of e.childNodes)if(Ke(n)&&n.tagName===t||tk(n,t))return!0;return!1}s(tk,"xe$1");var vl="data-language",al="data-highlight-language",bc="data-theme",c0=class nk extends Br{static{s(this,"ve")}__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(t){return new nk(t.__language,t.__key)}constructor(t,n){super(n),this.__language=t||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(t){super.afterCloneFrom(t),this.__language=t.__language,this.__theme=t.__theme,this.__isSyntaxHighlightSupported=t.__isSyntaxHighlightSupported}createDOM(t){const n=Tn().createElement("code");xr(n,t.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(vl,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(al,r));const i=this.getTheme();i&&n.setAttribute(bc,i);const o=this.getStyle();return o&&$c(n.style,o),n}updateDOM(t,n,r){const i=this.__language,o=t.__language;i?i!==o&&n.setAttribute(vl,i):o&&n.removeAttribute(vl);const l=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&o?l&&i?i!==o&&n.setAttribute(al,i):n.removeAttribute(al):l&&i&&n.setAttribute(al,i);const a=this.__theme,c=t.__theme;a?a!==c&&n.setAttribute(bc,a):c&&n.removeAttribute(bc);const d=this.__style,u=t.__style;return d!==u&&$c(n.style,d,u),!1}exportDOM(t){const n=Tn().createElement("pre");xr(n,t._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(vl,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(al,r));const i=this.getTheme();i&&n.setAttribute(bc,i);const o=this.getStyle();return o&&$c(n.style,o),{element:n}}static importDOM(){return{code:s(t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||tk(t,"BR"))?{conversion:yx,priority:1}:null,"code"),div:s(()=>({conversion:PK,priority:1}),"div"),pre:s(()=>({conversion:yx,priority:0}),"pre"),table:s(t=>nh(t)?{conversion:FK,priority:3}:null,"table"),td:s(t=>{const n=t,r=n.closest("table");return n.classList.contains("js-file-line")||r&&nh(r)?{conversion:xx,priority:3}:null},"td"),tr:s(t=>{const n=t.closest("table");return n&&nh(n)?{conversion:xx,priority:3}:null},"tr")}}static importJSON(t){return fn().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language).setTheme(t.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(t,n=!0){if(!eo(jt(),"@lexical/code")){const l=VK(t);if(l)return l}const{anchor:r,focus:i}=t,o=(r.isBefore(i)?r:i).getNode();if(Ne(o)){let l=$K(o);const a=[];for(;;)if(bu(l))a.push(mm()),l=l.getNextSibling();else{if(!sk(l))break;{let p=0;const v=l.getTextContent(),_=l.getTextContentSize();for(;p<_&&v[p]===" ";)p++;if(p!==0&&a.push(ok(" ".repeat(p))),p!==_)break;l=l.getNextSibling()}}const c=o.splitText(r.offset)[0],d=r.offset===0?0:1,u=c.getIndexWithinParent()+d,f=o.getParentOrThrow(),h=[Pr(),...a];f.splice(u,0,h);const g=a[a.length-1];g?g.select():r.offset===0?c.selectPrevious():c.getNextSibling().selectNext(0,0)}if(ma(o)){const{offset:l}=t.anchor;o.splice(l,0,[Pr()]),o.select(l+1,l+1)}return null}canIndent(){return!1}collapseAtStart(){const t=Qe();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}setLanguage(t){const n=this.getWritable();return n.__language=t||void 0,n}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(t){const n=this.getWritable();return n.__isSyntaxHighlightSupported=t,n}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(t){const n=this.getWritable();return n.__theme=t||void 0,n}getTheme(){return this.getLatest().__theme}};function fn(e,t){return Eb(c0).setLanguage(e).setTheme(t)}s(fn,"Ce");function ma(e){return e instanceof c0}s(ma,"Ne");function yx(e){return{node:fn(e.getAttribute(vl))}}s(yx,"Te");function PK(e){const t=e,n=Cx(t);return n||(function(r){let i=r.parentElement;for(;i!==null;){if(Cx(i))return!0;i=i.parentElement}return!1})(t)?{node:n?fn():null}:{node:null}}s(PK,"Ae");function FK(){return{node:fn()}}s(FK,"Oe");function xx(){return{node:null}}s(xx,"Pe");function Cx(e){return e.style.fontFamily.match("monospace")!==null}s(Cx,"we");function nh(e){return e.classList.contains("js-file-line-container")}s(nh,"He");function VK(e){const{anchor:t}=e;if(e.isCollapsed()&&t.type==="element"){const n=t.getNode();if(ma(n)){const r=n.getChildrenSize();if(r>=2&&t.offset===r){const i=n.getLastChild();if(Fr(i)&&Fr(i.getPreviousSibling())){const o=Qe();return n.splice(r-2,2,[]).insertAfter(o,!1),o.select(),o}}}}return null}s(VK,"De");var rk=class ik extends Bs{static{s(this,"ke")}__highlightType;constructor(t="",n,r){super(t,r),this.__highlightType=n}static getType(){return"code-highlight"}static clone(t){return new ik(t.__text,t.__highlightType||void 0,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__highlightType=t.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const n=this.getWritable();return n.__highlightType=t||void 0,n}canHaveFormat(){return!1}createDOM(t){const n=super.createDOM(t),r=rh(t.theme,this.__highlightType);return xr(n,r),n}updateDOM(t,n,r){const i=super.updateDOM(t,n,r),o=rh(r.theme,t.__highlightType),l=rh(r.theme,this.__highlightType);return o!==l&&(o&&$d(n,o),l&&xr(n,l)),i}static importJSON(t){return ok().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return fn()}};function rh(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}s(rh,"Be");function ok(e="",t){return gi(new rk(e,t))}s(ok,"Fe");function sk(e){return e instanceof rk}s(sk,"Le");var lk="data-language";function ak(e){return e.style.fontFamily.match("monospace")!==null}s(ak,"Ee");function ep(e){let t=e.parentElement;for(;t!==null;){if(ak(t))return!0;t=t.parentElement}return!1}s(ep,"Me");var BK=KE([{$import:s((e,t)=>e.$importChildren(t),"$import"),match:Jt.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),HK={$import:s((e,t)=>[fn(t.getAttribute(lk)).splice(0,0,e.$importChildren(t))],"$import"),match:Jt.tag("pre"),name:"@lexical/code/pre"},KK={$import:s((e,t,n)=>{const r=t.textContent||"";return/\r?\n/.test(r)||t.querySelector("br")!==null?[fn(t.getAttribute(lk)).splice(0,0,e.$importChildren(t))]:n()},"$import"),match:Jt.tag("code"),name:"@lexical/code/code-multiline"};function Ec(e){if(!Ke(e))return!1;const t=e.style.fontFamily,n=e.style.whiteSpace;return typeof t=="string"&&/monospace/i.test(t)&&typeof n=="string"&&n.startsWith("pre")}s(Ec,"Ie");function UK(e){let t=!1;const n=[];let r="",i=!1;const o=s(()=>{i&&(n.push(r),r="",i=!1)},"o");for(const l of Array.from(e.childNodes))if(Ke(l))l.tagName==="DIV"?(o(),n.push(l.textContent||""),t=!0):l.tagName==="BR"?(o(),n.push(""),t=!0):(r+=l.textContent||"",i=!0);else if(Ld(l)){const a=l.textContent||"";a.length>0&&(r+=a,i=!0)}return o(),t?n:null}s(UK,"je");var Uj=KE([{$import:s((e,t,n)=>{if(!Ec(t)||ep(t))return n();const r=UK(t);return r===null||r.length===0?n():[fn().splice(0,0,zh(r.join(`
63
+ `)))]},"$import"),match:Jt.tag("div"),name:"@lexical/code/vscode-wrapper"},{$import:s((e,t,n)=>{if(!Ec(t)||ep(t))return n();const r=t.previousElementSibling;if(r&&Ec(r))return[];const i=[];let o=t;for(;o&&Ec(o);)i.push(o.tagName==="BR"?"":o.textContent||""),o=o.nextElementSibling;return i.length<2?n():[fn().splice(0,0,zh(i.join(`
64
+ `)))]},"$import"),match:Jt.tag("div","br"),name:"@lexical/code/vscode-line-run"}]),WK={$import:s((e,t,n)=>ak(t)?[fn().splice(0,0,e.$importChildren(t))]:ep(t)?e.$importChildren(t):n(),"$import"),match:Jt.tag("div"),name:"@lexical/code/div"},Wj=[{$import:s((e,t)=>[fn().splice(0,0,e.$importChildren(t,{rules:BK}))],"$import"),match:Jt.tag("table").classAll("js-file-line-container"),name:"@lexical/code/github-code-table"},{$import:s((e,t)=>e.$importChildren(t),"$import"),match:Jt.tag("td").classAll("js-file-line"),name:"@lexical/code/github-code-cell-by-class"},KK,HK,WK];function tp(e,t){const n={};for(const r of e){const i=t(r);i&&(n[i]?n[i].push(r):n[i]=[r])}return n}s(tp,"Q");function zK(e){const t=tp(e,n=>n.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}s(zK,"V");var bx=/[!-/:-@[-`{-~\s]/;function Ex(e){return e.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(t,n)=>String.fromCodePoint(Number(n)))}s(Ex,"nt");var jK=/^(\s*)(\d{1,})\.\s/,JK=/^(\s*)[-*+]\s/,GK=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,qK=/^(#{1,6})\s/,ZK=/^>\s/,YK=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,XK=/^[ \t]*`{3,}$/,_l=Va("mdListMarker",{parse:s(e=>typeof e=="string"&&/^[-*+]$/.test(e)?e:"-","parse"),resetOnCopyNode:!0}),Tx=Va("mdCodeFence",{parse:s(e=>typeof e=="string"&&/^`{3,}$/.test(e)?e:"```","parse"),resetOnCopyNode:!0}),QK=Va("mdHardLineBreak",{parse:s(e=>typeof e=="string"&&/^(\\| {2,})$/.test(e)?e:"","parse"),resetOnCopyNode:!0});function eU(e){if(e.endsWith("\\"))return[e.slice(0,-1),"\\"];const t=e.match(/^(.*?\S)( {2,})$/);return t?[t[1],t[2]]:null}s(eU,"It");function tU(e){const t=e.getChildren(),n=t.length-1,r=t[n];if(!Ne(r))return null;const i=r.getTextContent(),o=eU(i);if(o!==null){const[l,a]=o;return r.setTextContent(l),a}return/^ {2,}$/.test(i)&&(function(l,a){for(let c=a-1;c>=0;c--){if(Fr(l[c]))return!1;if(/\S/.test(l[c].getTextContent()))return!0}return!1})(t,n)?(r.setTextContent(""),i):null}s(tU,"Tt");function nU(e){const t=Pr(),n=tU(e);return n!==null&&ps(t,QK,n),t}s(nU,"$t");var ck=s(e=>(t,n,r,i)=>{const o=e(r);o.append(...n),t.replace(o),i||o.select(0,0)},"Et"),u0=s(e=>(t,n,r,i)=>{const o=t.getPreviousSibling(),l=t.getNextSibling(),a=rr(e==="check"?r[3]==="x":void 0),c=r[0].trim()[0],d=e!=="bullet"&&e!=="check"||c!==_l.parse(c)?void 0:c;if(Ee(l)&&l.getListType()===e){d&&ps(l,_l,d);const f=l.getFirstChild();f!==null?f.insertBefore(a):l.append(a),e==="number"&&l.setStart(Number(r[2])),t.remove()}else if(Ee(o)&&o.getListType()===e)d&&ps(o,_l,d),o.append(a),t.remove();else{const f=Qn(e,e==="number"?Number(r[2]):void 0);d&&ps(f,_l,d),f.append(a),t.replace(f)}a.append(...n),i||a.select(0,0);const u=(function(f){const h=f.match(/\t/g),g=f.match(/ /g);let p=0;return h&&(p+=h.length),g&&(p+=Math.floor(g.length/4)),p})(r[1]);u&&a.setIndent(u)},"vt"),sf=s((e,t,n,r)=>{const i=[],o=e.getChildren();let l=0;for(const a of o)if(Me(a)){if(a.getChildrenSize()===1){const g=a.getFirstChild();if(Ee(g)){const p=sf(g,t,n+1,r);p&&i.push(p);continue}}if(r&&!a.getChildren().some(g=>g.isSelected(r)))continue;const c=" ".repeat(4*n),d=e.getListType(),u=_m(e,_l),f=d==="number"?`${e.getStart()+l}. `:d==="check"?`${u} [${a.getChecked()?"x":" "}] `:u+" ";let h=t(a);d!=="number"&&(h=h.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),i.push(c+f+h),l++}return i.join(`
65
+ `)},"yt"),rU={dependencies:[Wa],export:s((e,t)=>{if(!Kd(e))return null;const n=Number(e.getTag().slice(1));return"#".repeat(n)+" "+t(e)},"export"),regExp:qK,replace:ck(e=>{const t="h"+e[1].length;return Rr(t)}),triggerOnEnter:!0,type:"element"},uk={dependencies:[Hd],export:s((e,t)=>{if(!sg(e))return null;const n=t(e).split(`
66
+ `),r=[];for(const i of n)r.push("> "+i);return r.join(`
67
+ `)},"export"),regExp:ZK,replace:s((e,t,n,r)=>{if(r){const o=e.getPreviousSibling();if(sg(o))return o.splice(o.getChildrenSize(),0,[nU(o),...t]),void e.remove()}const i=Us();i.append(...t),e.replace(i),r||i.select(0,0)},"replace"),triggerOnEnter:!0,type:"element"},Dl={dependencies:[c0],export:s(e=>{if(!ma(e))return null;const t=e.getTextContent();let n=_m(e,Tx);if(t.indexOf(n)>-1){const r=t.match(/`{3,}/g);if(r){const i=Math.max(...r.map(o=>o.length));n="`".repeat(i+1)}}return n+(e.getLanguage()||"")+(t?`
68
+ `+t:"")+`
69
+ `+n},"export"),handleImportAfterStartMatch:s(({lines:e,rootNode:t,startLineIndex:n,startMatch:r})=>{const i=r[1],o=i.trim().length,l=e[n],a=r.index+i.length,c=l.slice(a),d=new RegExp(`\`{${o},}$`);if(d.test(c)){const g=c.match(d),p=c.slice(0,c.lastIndexOf(g[0])),v=[...r];return v[2]="",Dl.replace(t,null,v,g,[p],!0),[!0,n]}const u=new RegExp(`^[ \\t]*\`{${o},}$`);for(let g=n+1;g<e.length;g++){const p=e[g];if(u.test(p)){const v=p.match(u),_=e.slice(n+1,g),y=l.slice(r[0].length);return y.length>0&&_.unshift(y),Dl.replace(t,null,r,v,_,!0),[!0,g]}}const f=e.slice(n+1),h=l.slice(r[0].length);return h.length>0&&f.unshift(h),Dl.replace(t,null,r,null,f,!0),[!0,e.length-1]},"handleImportAfterStartMatch"),regExpEnd:{optional:!0,regExp:XK},regExpStart:YK,replace:s((e,t,n,r,i,o)=>{let l,a;const c=n[1]?n[1].trim():"```",d=n[2]||void 0;if(!t&&i){if(i.length===1)r?(l=fn(d),a=i[0]):(l=fn(d),a=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{for(l=fn(d),i.length>0&&(i[0].trim().length===0?i.shift():i[0].startsWith(" ")&&(i[0]=i[0].slice(1)));i.length>0&&!i[i.length-1].length;)i.pop();a=i.join(`
70
+ `)}ps(l,Tx,c);const u=yr(a);l.append(u),e.append(l)}else t&&ck(u=>fn(u?u[2]:void 0))(e,t,n,o)},"replace"),type:"multiline-element"},d0={dependencies:[Ei,bi],export:s((e,t,n)=>Ee(e)?sf(e,t,0,n):null,"export"),regExp:JK,replace:u0("bullet"),triggerOnEnter:!0,type:"element"},dk={dependencies:[Ei,bi],export:s((e,t,n)=>Ee(e)?sf(e,t,0,n):null,"export"),regExp:GK,replace:u0("check"),triggerOnEnter:!0,type:"element"},f0={dependencies:[Ei,bi],export:s((e,t,n)=>Ee(e)?sf(e,t,0,n):null,"export"),regExp:jK,replace:u0("number"),triggerOnEnter:!0,type:"element"},fk={format:["code"],tag:"`",type:"text-format"},iU={format:["highlight"],tag:"==",type:"text-format"},hk={format:["bold","italic"],tag:"***",type:"text-format"},gk={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},pk={format:["bold"],tag:"**",type:"text-format"},mk={format:["bold"],intraword:!1,tag:"__",type:"text-format"},oU={format:["strikethrough"],tag:"~~",type:"text-format"},vk={format:["italic"],tag:"*",type:"text-format"},_k={format:["italic"],intraword:!1,tag:"_",type:"text-format"},yk={dependencies:[Wr],export:s((e,t,n)=>{if(!St(e)||cn(e))return null;const r=t(e);let i=e.getTitle();return i!=null&&(i=i.replace(/([\\"])/g,"\\$1")),i?`[${r}](${e.getURL()} "${i}")`:`[${r}](${e.getURL()})`},"export"),importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:s((e,t)=>{if(ft(e,St))return;const[,n,r,i]=t,o=r!=null?Ex(r):void 0,l=i!=null?Ex(i):void 0,a=hi(o,{title:l}),c=n.split("[").length-1,d=n.split("]").length-1;let u=n,f="";if(c<d)return;if(c>d){const g=n.split("[");f="["+g[0],u=g.slice(1).join("[")}const h=yr(u);return h.setFormat(e.getFormat()),a.append(h),e.replace(a),f&&a.insertBefore(yr(f)),h},"replace"),trigger:")",type:"text-match"},sU=[rU,uk,d0,f0],lU=[Dl],aU=[fk,hk,gk,pk,mk,iU,vk,_k,oU],cU=[yk],xk=[...sU,...lU,...aU,...cU];function Sx(e){return Ne(e)&&!e.hasFormat("code")}s(Sx,"se");function uU(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}s(uU,"ue");function wx(e,t,n,r,i){const o=e.getParent();if(!bn(o)||e.getFirstChild()!==t)return!1;const l=t.getTextContent();if(!i&&l[n-1]!==" ")return!1;for(const{regExp:a,replace:c}of r){const d=l.match(a),u=i||d&&d[0].endsWith(" ")?n:n-1;if(d&&d[0].length===u){const f=t.getNextSiblings(),[h,g]=t.splitText(n);if(c(e,g?[g,...f]:f,d,!1)!==!1)return h.remove(),!0}}return!1}s(wx,"de");function kx(e,t,n,r,i){const o=e.getParent();if(!bn(o)||e.getFirstChild()!==t)return!1;const l=t.getTextContent();if(!i&&l[n-1]!==" ")return!1;for(const{regExpStart:a,replace:c,regExpEnd:d}of r){if(d&&!("optional"in d)||d&&"optional"in d&&!d.optional)continue;const u=l.match(a);if(u){const f=i||u[0].endsWith(" ")?n:n-1;if(u[0].length!==f)continue;const h=t.getNextSiblings(),[g,p]=t.splitText(n);if(c(e,p?[p,...h]:h,u,null,null,!1)!==!1)return g.remove(),!0}}return!1}s(kx,"ge");function dU(e,t){let n=0;const r=e.getTextContent();for(let i=0;i<t;i++)r[i]==="`"&&n++;return n%2!=0}s(dU,"he");function Mx(e,t,n){const r=n.length;for(let i=t;i>=r;i--){const o=i-r;if(Ck(e,o,n,0,r)&&e[o+r]!==" ")return o}return-1}s(Mx,"pe");function Ck(e,t,n,r,i){for(let o=0;o<i;o++)if(e[t+o]!==n[r+o])return!1;return!0}s(Ck,"xe");function fU(e,t=xk){const n=zK(t),r=n.element.filter(c=>c.triggerOnEnter),i=tp(n.textFormat,({tag:c})=>c[c.length-1]),o=tp(n.textMatch,({trigger:c})=>c),l=new Set([" "]);for(const c of n.textFormat)l.add(c.tag.slice(-1));for(const c of n.textMatch)c.trigger!==void 0&&l.add(c.trigger);for(const c of t){const d=c.type;if(d==="element"||d==="text-match"||d==="multiline-element"){const u=c.dependencies;for(const f of u)e.hasNode(f)||uU(173,f.getType())}}const a=s((c,d,u)=>!!wx(c,d,u,n.element)||!!kx(c,d,u,n.multilineElement)||!!(function(f,h,g){let p=f.getTextContent();const v=g[p[h-1]];if(v==null)return!1;h<p.length&&(p=p.slice(0,h));for(const _ of v){if(!_.replace||!_.regExp)continue;const y=p.match(_.regExp);if(y===null)continue;const x=y.index||0,C=x+y[0].length;let b;return x===0?[b]=f.splitText(C):[,b]=f.splitText(x,C),b.selectNext(0,0),_.replace(b,y),!0}return!1})(d,u,o)||!!(function(f,h,g){const p=f.getTextContent(),v=h-1,_=p[v],y=g[_];if(!y)return!1;for(const x of y){const{tag:C}=x,b=C.length,T=v-b+1;if(b>1&&!Ck(p,T,C,0,b)||p[T-1]===" ")continue;const M=p[v+1];if(x.intraword===!1&&M&&!bx.test(M))continue;const S=f;let E=S,A=Mx(p,T,C),D=E;for(;A<0&&(D=D.getPreviousSibling())&&!Fr(D);)if(Ne(D)){if(D.hasFormat("code"))continue;const ye=D.getTextContent();E=D,A=Mx(ye,ye.length,C)}if(A<0||E===S&&A+b===T)continue;const L=E.getTextContent();if(A>0&&L[A-1]===_)continue;const G=L[A-1];if(x.intraword===!1&&G&&!bx.test(G)||!x.format.includes("code")&&dU(E,A))continue;const $=S.getTextContent(),W=$.slice(0,T)+$.slice(v+1);S.setTextContent(W);const z=E===S?W:L;E.setTextContent(z.slice(0,A)+z.slice(A+b));const me=ie(),q=Ad();nr(q);const le=v-b*(E===S?2:1)+1;q.anchor.set(E.__key,A,"text"),q.focus.set(S.__key,le,"text");for(const ye of x.format)q.formatText(ye,$I[ye]);q.anchor.set(q.focus.key,q.focus.offset,q.focus.type);for(const ye of x.format)q.hasFormat(ye)&&q.toggleFormat(ye);return oe(me)&&(q.format=me.format),!0}return!1})(d,u,i),"f");return It(e.registerUpdateListener(({tags:c,dirtyLeaves:d,editorState:u,prevEditorState:f})=>{if(c.has(fI)||c.has(_o)||e.isComposing())return;const h=c.has(Db),g=u.read(ie),p=f.read(ie);if(!oe(p)||!oe(g)||!g.isCollapsed()||g.is(p)&&!h)return;const v=g.anchor.key,_=g.anchor.offset,y=u._nodeMap.get(v);if(Ne(y)&&d.has(v)&&(h||_===1||!(_>p.anchor.offset+1))){if(h){const x=u.read(()=>y.getTextContent())[_-1];if(!l.has(x))return}e.update(()=>{if(!Sx(y))return;const x=y.getParent();x===null||ma(x)||a(x,y,g.anchor.offset)&&Uh(Bb)})}}),e.registerCommand(Dd,c=>{if(c!==null&&c.shiftKey)return!1;const d=ie();if(!oe(d)||!d.isCollapsed())return!1;const u=d.anchor.offset,f=d.anchor.getNode();if(!Ne(f)||!Sx(f))return!1;const h=f.getParent();return h===null||ma(h)?!1:u===f.getTextContent().length&&!(!kx(h,f,u,n.multilineElement,!0)&&!wx(h,f,u,r,!0))&&(c!==null&&c.preventDefault(),!0)},st))}s(fU,"me");var hU=[{dependencies:[Ua],export:s(e=>wE(e)?"***":null,"export"),regExp:/^(---|\*\*\*|___)\s?$/,replace:s((e,t,n,r)=>{const i=Vd();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},"replace"),triggerOnEnter:!0,type:"element"},...xk];function ih({transformers:e=hU}){const[t]=gn();return(0,m.useEffect)(()=>fU(t,e),[t,e]),null}s(ih,"m");var gU=Sn({init(e){const t=e.getValue(YT),n=_U(t,t.includes("headings")?e.getValue(Fu):[]),r=n.filter(i=>!vU.has(i));e.pubIn({[Ws]:()=>m.createElement(ih,{transformers:n}),[Jm]:()=>m.createElement(ih,{transformers:n}),[ZT]:()=>m.createElement(ih,{transformers:r})})}}),pU=s(e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)},"createBlockNode"),mU={dependencies:[Jd],export:s(e=>wE(e)?"***":null,"export"),regExp:/^(---|\*\*\*|___)\s?$/,replace:s((e,t,n,r)=>{const i=ja();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},"replace"),type:"element"},vU=new Set([f0,d0,dk]);function _U(e,t){const n=[hk,gk,pk,mk,fk,vk,_k];if(e.includes("headings")){const r=Math.min(...t),i=Math.max(...t),o=new RegExp(`^(#{${r},${i}})\\s`),l={dependencies:[Wa],export:s((a,c)=>{if(!Kd(a))return null;const d=Number(a.getTag().slice(1));return"#".repeat(d)+" "+c(a)},"export"),regExp:o,replace:pU(a=>{const c=`h${a[1].length}`;return Rr(c)}),type:"element"};n.push(l)}if(e.includes("thematicBreak")&&n.push(mU),e.includes("quote")&&n.push(uk),e.includes("link")&&n.push(yk),e.includes("lists")&&n.push(f0,d0,dk),e.includes("codeblock")){const r={...Dl,dependencies:[Qd],replace:s((i,o,l)=>{const a=qa({code:"",language:l[1]??"",meta:""});i.selectPrevious(),i.replace(a),setTimeout(()=>{a.select()},80)},"replace")};n.push(r)}return n}s(_U,"pickTransformersForActivePlugins");var yU=/^(agent|project|skill):\/\//,np=class rp extends Wr{static{s(this,"MentionAwareLinkNode")}static getType(){return"mention-aware-link"}static clone(t){return new rp(t.getURL(),{rel:t.getRel(),target:t.getTarget(),title:t.getTitle()},t.getKey())}static importJSON(t){return new rp(t.url??"",{rel:t.rel??null,target:t.target??null,title:t.title??null})}constructor(t,n,r){super(t,n,r)}sanitizeUrl(t){return yU.test(t)?t:super.sanitizeUrl(t)}};function xU(e){return{url:e.getURL(),attributes:{rel:e.getRel(),target:e.getTarget(),title:e.getTitle()}}}s(xU,"getMentionAwareLinkNodeInit");var CU={replace:Wr,with:s(e=>{const{url:t,attributes:n}=xU(e);return new np(t,n)},"with"),withKlass:np};function Ax(e){return!!(e&&St(e)&&lp(e.getURL()))}s(Ax,"isMentionLinkNode");function mo(e){if(!e)return null;if(Ax(e))return e;let t=e.getParent();for(;t;){if(Ax(t))return t;t=t.getParent()}return null}s(mo,"findMentionLinkNode");function bU(e,t){const n=e.getNode(),r=mo(n);if(r)return r;if(e.type==="element"&&xe(n)){const i=t==="backward"?e.offset-1:e.offset;return i<0?null:mo(n.getChildAtIndex(i))}if(e.type==="text"&&Ne(n)){if(t==="backward"&&e.offset===0)return mo(n.getPreviousSibling());if(t==="forward"&&e.offset===n.getTextContentSize())return mo(n.getNextSibling())}return null}s(bU,"findMentionLinkNodeAtPoint");function EU(e){const t=ie();if(!t)return null;if(He(t)){const[i]=t.getNodes();return i?mo(i):null}if(!oe(t))return null;const n=mo(t.anchor.getNode()),r=mo(t.focus.getNode());return n&&r&&n.is(r)?n:t.isCollapsed()?bU(t.anchor,e):null}s(EU,"findMentionLinkForDeletion");function TU(e){const t=EU(e);if(!t)return!1;const n=t.getPreviousSibling(),r=t.getNextSibling(),i=t.getParentOrThrow();return t.remove(),e==="backward"?n?(n.selectEnd(),!0):r?(r.selectStart(),!0):(i.selectStart(),!0):r?(r.selectStart(),!0):n?(n.selectEnd(),!0):(i.selectEnd(),!0)}s(TU,"deleteSelectedMentionChip");function Ix(e,t){return TU(e)?(t?.preventDefault(),t?.stopPropagation(),!0):!1}s(Ix,"handleMentionDelete");var SU=Sn({init(e){e.pub(jd,[t=>t.registerCommand(Od,n=>Ix("backward",n),Ql),t=>t.registerCommand(Sm,n=>Ix("forward",n),Ql)])}}),wU=[/^#{1,6}\s+/m,/^>\s+/m,/^[-*+]\s+/m,/^\d+\.\s+/m,/^```/m,/^~~~/m,/^\|.+\|$/m,/^---$/m,/^\*\*\*$/m,/^___$/m];function kU(e){return e.replace(/\r\n?/g,`
71
+ `)}s(kU,"normalizePastedMarkdown");function bk(e){const t=kU(e).trim();return t?wU.some(n=>n.test(t)):!1}s(bk,"looksLikeMarkdownPaste");function Ek(e){let t=e.replace(/\r\n/g,`
72
+ `).replace(/\r/g,`
73
+ `);const n=t.split(`
74
+ `);if(n.length<=1)return t;let r=1/0,i=null;for(const o of n){if(o.trim()==="")continue;const l=o.match(/^(\s+)/);if(l){const a=l[1],c=a.includes(" ")?"tabs":"spaces";if(i&&i!==c)return t;i=c,r=Math.min(r,a.length)}else{r=0;break}}return r>0&&r<1/0&&(t=n.map(o=>o.trim()===""?"":o.slice(r)).join(`
75
+ `)),t}s(Ek,"normalizeMarkdown");var MU=/[A-Za-z!/?]/,AU=/^( {0,3}(?:(?:> ?|(?:[-+*]|\d{1,9}[.)]) +))*)(`{3,}|~{3,})(.*)$/,IU=/(?:[-+*]|\d{1,9}[.)]) +/g,NU=/>/g,OU=/^( *)(`{3,}|~{3,})[ \t]*$/,DU=/^ {0,3}(?:> ?)+/,RU=/^(?: {4}|\t)/,LU=/^<[A-Za-z][A-Za-z0-9+.-]{1,31}:[^\s<>\x00-\x1f]*>/,$U=/^<[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]+@[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])?)*>/,PU=/^<[^<>\n]*>/;function Nx(e){return e!==void 0&&MU.test(e)}s(Nx,"isHtmlOpener");function FU(e,t){let n=e;for(let r=0;r<t;r+=1){const i=/^ {0,3}> ?/.exec(n);if(!i)return null;n=n.slice(i[0].length)}return n}s(FU,"stripBlockquotePrefix$1");function VU(e,t,n){let r=t;for(;r<e.length;){if(e[r]!=="`"){r+=1;continue}let i=1;for(;e[r+i]==="`";)i+=1;if(i===n)return r+i;r+=i}return-1}s(VU,"findCodeSpanEnd");function Ox(e,t){const n=LU.exec(e)??$U.exec(e);if(n)return n[0];if(t.endsWith("](")){const r=PU.exec(e);if(r)return r[0]}return null}s(Ox,"matchProtectedConstruct");function BU(e,t){let n="",r=0;for(;r<e.length;){const i=e[r];if(i==="`"){let o=1;for(;e[r+o]==="`";)o+=1;const l=VU(e,r+o,o);if(l!==-1){n+=e.slice(r,l),r=l;continue}n+=e.slice(r,r+o),r+=o;continue}if(i==="\\"){if(t==="unescape"&&e[r+1]==="<"&&Nx(e[r+2])&&Ox(e.slice(r+1),n)===null){n+="<",r+=2;continue}n+=e.slice(r,r+2),r+=2;continue}if(t==="escape"&&i==="<"&&Nx(e[r+1])){const o=Ox(e.slice(r),n);if(o){n+=o,r+=o.length;continue}n+="\\<",r+=1;continue}n+=i,r+=1}return n}s(BU,"transformInlineChunk");function Tk(e,t){const n=e.split(`
76
+ `),r=[];let i=[];const o=s(()=>{i.length!==0&&(r.push(BU(i.join(`
77
+ `),t)),i=[])},"flushChunk");let l="",a=0,c=0,d=3,u=!1;for(const f of n){if(l){o(),r.push(f);const p=FU(f,c),v=p?OU.exec(p):null;if(v){const _=v[1].length,y=v[2];_<=d&&y[0]===l&&y.length>=a&&(l="",a=0,c=0,d=3)}continue}const h=AU.exec(f);if(h){const p=h[1],v=h[2],_=v[0],y=h[3];if(!(_==="`"&&y.includes("`"))){const x=p.match(IU)??[];o(),r.push(f),l=_,a=v.length,c=(p.match(NU)??[]).length,d=(x.length>0?x.reduce((C,b)=>C+b.length,0):0)+3,u=!1;continue}}const g=f.replace(DU,"");if(g.trim().length===0){o(),r.push(f),u=!1;continue}if(!u&&RU.test(g)){o(),r.push(f);continue}u=!0,i.push(f)}return o(),r.join(`
78
+ `)}s(Tk,"transformAngleBrackets");function ip(e){return e.includes("<")?Tk(e,"escape"):e}s(ip,"escapeUnsupportedAngleBrackets");function HU(e){return e.includes("\\<")?Tk(e,"unescape"):e}s(HU,"unescapeAngleBracketEscapes");var KU=/^( {0,3}(?:(?:> ?|(?:[-+*]|\d{1,9}[.)]) +))*)(`{3,}|~{3,})(.*)$/,UU=/(?:[-+*]|\d{1,9}[.)]) +/g,WU=/>/g,zU=/^( *)(`{3,}|~{3,})[ \t]*$/,Dx=/^( {0,3})\\>/;function jU(e,t){let n=e;for(let r=0;r<t;r+=1){const i=/^ {0,3}> ?/.exec(n);if(!i)return null;n=n.slice(i[0].length)}return n}s(jU,"stripBlockquotePrefix");function Sk(e){if(!e.includes("\\>"))return e;const t=e.split(`
79
+ `);let n="",r=0,i=0,o=3;for(let l=0;l<t.length;l+=1){const a=t[l];if(n){const d=jU(a,i),u=d?zU.exec(d):null;if(u){const f=u[1].length,h=u[2];f<=o&&h[0]===n&&h.length>=r&&(n="",r=0,i=0,o=3)}continue}const c=KU.exec(a);if(c){const d=c[1],u=c[2],f=u[0],h=c[3];if(!(f==="`"&&h.includes("`"))){const g=d.match(UU)??[];n=f,r=u.length,i=(d.match(WU)??[]).length,o=(g.length>0?g.reduce((p,v)=>p+v.length,0):0)+3;continue}}Dx.test(a)&&(t[l]=a.replace(Dx,"$1>"))}return t.join(`
80
+ `)}s(Sk,"unescapeBlockquoteMarkers");var JU=Sn({init(e){e.pub(jd,[t=>{let n=!1;return t.registerCommand(ea,r=>{if(n)return n=!1,!1;const i=r instanceof ClipboardEvent?r.clipboardData:null;if(!i)return!1;const o=i.getData("text/plain");if(!o||i.getData("text/html")||bk(o))return!1;const l=Ek(o);if(l===o)return!1;r instanceof ClipboardEvent&&r.preventDefault();const a=new DataTransfer;a.setData("text/plain",l);const c=new ClipboardEvent("paste",{clipboardData:a,bubbles:!0,cancelable:!0});return n=!0,t.dispatchCommand(ea,c),!0},Vr)}])}}),GU={list:s((e,t={})=>{const n=new URLSearchParams;t.q&&n.set("q",t.q),t.sort&&n.set("sort",t.sort),t.scope&&n.set("scope",t.scope);for(const i of t.categories??[])n.append("categories[]",i);for(const i of t.include??[])n.append("include[]",i);const r=n.toString();return Ce.get(`/companies/${encodeURIComponent(e)}/skills${r?`?${r}`:""}`)},"list"),categories:s(e=>Ce.get(`/companies/${encodeURIComponent(e)}/skills/categories`),"categories"),detail:s((e,t)=>Ce.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}`),"detail"),versions:s((e,t)=>Ce.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/versions`),"versions"),version:s((e,t,n)=>Ce.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/versions/${encodeURIComponent(n)}`),"version"),createVersion:s((e,t,n={})=>Ce.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/versions`,n),"createVersion"),testInputs:s((e,t)=>Ce.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-inputs`),"testInputs"),createTestInput:s((e,t,n)=>Ce.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-inputs`,n),"createTestInput"),updateTestInput:s((e,t,n,r)=>Ce.patch(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-inputs/${encodeURIComponent(n)}`,r),"updateTestInput"),deleteTestInput:s((e,t,n)=>Ce.delete(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-inputs/${encodeURIComponent(n)}`),"deleteTestInput"),testRunTemplates:s(e=>Ce.get(`/companies/${encodeURIComponent(e)}/skill-test-run-templates`),"testRunTemplates"),createTestRunTemplate:s((e,t)=>Ce.post(`/companies/${encodeURIComponent(e)}/skill-test-run-templates`,t),"createTestRunTemplate"),updateTestRunTemplate:s((e,t,n)=>Ce.patch(`/companies/${encodeURIComponent(e)}/skill-test-run-templates/${encodeURIComponent(t)}`,n),"updateTestRunTemplate"),deleteTestRunTemplate:s((e,t)=>Ce.delete(`/companies/${encodeURIComponent(e)}/skill-test-run-templates/${encodeURIComponent(t)}`),"deleteTestRunTemplate"),testRuns:s((e,t,n={})=>{const r=new URLSearchParams;n.inputId&&r.set("inputId",n.inputId);const i=r.toString();return Ce.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-runs${i?`?${i}`:""}`)},"testRuns"),testRunDetail:s((e,t,n)=>Ce.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-runs/${encodeURIComponent(n)}`),"testRunDetail"),createTestRun:s((e,t,n)=>Ce.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-runs`,n),"createTestRun"),cancelTestRun:s((e,t,n)=>Ce.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-runs/${encodeURIComponent(n)}/cancel`,{}),"cancelTestRun"),deleteTestRun:s((e,t,n)=>Ce.delete(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/test-runs/${encodeURIComponent(n)}`),"deleteTestRun"),star:s((e,t)=>Ce.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/star`,{}),"star"),unstar:s((e,t)=>Ce.delete(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/star`),"unstar"),fork:s((e,t,n={})=>Ce.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/fork`,n),"fork"),forkPrecheck:s((e,t)=>Ce.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/fork-precheck`),"forkPrecheck"),comments:s((e,t)=>Ce.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/comments`),"comments"),createComment:s((e,t,n)=>Ce.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/comments`,n),"createComment"),updateComment:s((e,t,n,r)=>Ce.patch(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/comments/${encodeURIComponent(n)}`,r),"updateComment"),deleteComment:s((e,t,n)=>Ce.delete(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/comments/${encodeURIComponent(n)}`),"deleteComment"),updateStatus:s((e,t)=>Ce.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/update-status`),"updateStatus"),file:s((e,t,n)=>Ce.get(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/files?path=${encodeURIComponent(n)}`),"file"),updateFile:s((e,t,n,r)=>Ce.patch(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/files`,{path:n,content:r}),"updateFile"),deleteFile:s((e,t,n)=>Ce.deleteWithBody(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/files`,n),"deleteFile"),create:s((e,t)=>Ce.post(`/companies/${encodeURIComponent(e)}/skills`,t),"create"),update:s((e,t,n)=>Ce.patch(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}`,n),"update"),importFromSource:s((e,t)=>Ce.post(`/companies/${encodeURIComponent(e)}/skills/import`,{source:t}),"importFromSource"),browseProject:s((e,t)=>Ce.post(`/companies/${encodeURIComponent(e)}/skills/browse-project`,t),"browseProject"),scanProjects:s((e,t={})=>Ce.post(`/companies/${encodeURIComponent(e)}/skills/scan-projects`,t),"scanProjects"),installUpdate:s((e,t)=>Ce.post(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}/install-update`,{}),"installUpdate"),delete:s((e,t)=>Ce.delete(`/companies/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}`),"delete"),catalogList:s((e={})=>{const t=new URLSearchParams;e.kind&&t.set("kind",e.kind),e.category&&t.set("category",e.category),e.q&&t.set("q",e.q);const n=t.toString();return Ce.get(`/skills/catalog${n?`?${n}`:""}`)},"catalogList"),catalogDetail:s(e=>Ce.get(`/skills/catalog/${encodeURIComponent(e)}`),"catalogDetail"),catalogFile:s((e,t="SKILL.md")=>Ce.get(`/skills/catalog/${encodeURIComponent(e)}/files?path=${encodeURIComponent(t)}`),"catalogFile"),installCatalog:s((e,t)=>Ce.post(`/companies/${encodeURIComponent(e)}/skills/install-catalog`,t),"installCatalog")},wk=(0,m.createContext)({slashCommands:[]});function zj({children:e}){const{selectedCompanyId:t}=zk(),{data:n=[]}=p0({queryKey:t?g0.companySkills.list(t):["company-skills","__none__"],queryFn:s(()=>GU.list(t),"queryFn"),enabled:!!t}),{data:r=[]}=p0({queryKey:t?g0.routines.list(t):["routines","__none__","__all-projects__"],queryFn:s(()=>b8.list(t),"queryFn"),enabled:!!t}),i=(0,m.useMemo)(()=>({slashCommands:[...n.map(o=>({id:`skill:${o.id}`,kind:"skill",skillId:o.id,key:o.key,name:o.name,slug:o.slug,description:o.description??null,href:a9(o.id,o.slug),aliases:[o.slug,o.name,o.key]})),...r.filter(o=>o.status!=="archived").sort((o,l)=>o.title.localeCompare(l.title)).map(o=>({id:`routine:${o.id}`,kind:"routine",routineId:o.id,name:o.title,status:o.status,href:Bx(o.id),aliases:[`routine:${o.title}`,o.title,o.id]}))]}),[n,r]);return(0,H.jsx)(wk.Provider,{value:i,children:e})}s(zj,"EditorAutocompleteProvider");function qU(){return(0,m.useContext)(wk)}s(qU,"useEditorAutocomplete");var jj=Vx({MarkdownEditor:s(()=>xW,"MarkdownEditor"),computeMentionMenuPosition:s(()=>Nk,"computeMentionMenuPosition"),findClosestAutocompleteAnchor:s(()=>$k,"findClosestAutocompleteAnchor"),findMentionMatch:s(()=>Ik,"findMentionMatch"),isSameAutocompleteSession:s(()=>Lk,"isSameAutocompleteSession"),issueMentionTitle:s(()=>Ok,"issueMentionTitle"),placeCaretAfterMentionAnchor:s(()=>Pk,"placeCaretAfterMentionAnchor"),placeCaretAtEditableEnd:s(()=>Fk,"placeCaretAtEditableEnd"),shouldAcceptAutocompleteKey:s(()=>Rk,"shouldAcceptAutocompleteKey")}),ZU=class extends m.Component{static{s(this,"MarkdownEditorRichErrorBoundary")}state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){this.props.onError(e)}render(){return this.state.hasError?null:this.props.children}};function oh(e,t){const n=new RegExp(`${t}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i").exec(e);return n?.[2]??n?.[3]??n?.[4]??null}s(oh,"readHtmlAttribute");function YU(e){return e==="delete_small"?(0,H.jsx)(Yk,{"aria-hidden":!0}):tS[e]}s(YU,"editorIconFor");function XU(e){return e.replace(/<img\b([^>]*?)\/?>/gi,(t,n)=>{const r=oh(n,"src");if(!r)return t;const i=oh(n,"alt")??"image",o=oh(n,"title"),l=i.replace(/[[\]]/g,"\\$&"),a=o?.replace(/"/g,'\\"');return a?`![${l}](${r} "${a}")`:`![${l}](${r})`})}s(XU,"convertHtmlImagesToMarkdown");function Rx(e){const t=e.replace(/\r\n/g,`
81
+ `).replace(/\r/g,`
82
+ `),n=XU(Sk(t));return ip(n)}s(Rx,"prepareMarkdownForEditor");function Tc(e){return HU(Sk(e))}s(Tc,"toStoredMarkdown");function QU(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(QU,"escapeRegExp");function kk(e){if(!e)return!1;if(e.nodeType===Node.TEXT_NODE)return(e.textContent??"").trim().length>0;if(e.nodeType!==Node.ELEMENT_NODE)return!1;const t=e;return["IMG","HR","TABLE","VIDEO","IFRAME"].includes(t.tagName)?!0:Array.from(t.childNodes).some(n=>kk(n))}s(kk,"hasMeaningfulEditorContent");function eW(e){return/!\[[\s\S]*?\]\([^)]+\)/.test(e)}s(eW,"hasMarkdownImage");function tW(e,t,n){const r=t.trim();if(!r)return!1;const i=eW(r),o=(e.textContent??"").trim();if(o.length===0)return i?!1:!Array.from(e.childNodes).some(a=>kk(a));const l=n?.trim();return l&&o===l&&r!==l?!i:!1}s(tW,"isRichEditorDomEmpty");function nW(e){const t=e.trim();return t?!/^(javascript|data|vbscript):/i.test(t):!0}s(nW,"isSafeMarkdownLinkUrl");function Lx(e){return e instanceof Error?e.message:typeof e=="string"?e:"Rich editor failed to render"}s(Lx,"richEditorErrorMessage");var rW=100,iW=200,Mk=188,Ak=208,$x=8,oW=34,sW=8,Px=50,lW=10,aW={txt:"Text",md:"Markdown",js:"JavaScript",jsx:"JavaScript (JSX)",ts:"TypeScript",tsx:"TypeScript (TSX)",json:"JSON",bash:"Bash",sh:"Shell",python:"Python",go:"Go",rust:"Rust",sql:"SQL",html:"HTML",css:"CSS",yaml:"YAML",yml:"YAML"},cW={priority:0,match:s(()=>!0,"match"),Editor:U3};function Ik(e,t){let n=-1,r=null,i=null;for(let l=t-1;l>=0;l--){const a=e[l];if(a==="@"||a==="/"){(l===0||/\s/.test(e[l-1]))&&(n=l,r=a==="@"?"mention":"skill",i=a);break}if(a===`
83
+ `||a==="\r")break}if(n===-1)return null;const o=e.slice(n+1,t);return r==="skill"&&/\s/.test(o)&&!o.toLowerCase().startsWith("routine:")?null:{trigger:r??"mention",marker:i??"@",query:o,atPos:n,endPos:t}}s(Ik,"findMentionMatch");function uW(e,t,n){const r=e.textContent?.length??0,i=s((o,l,a)=>{if(o<0||l>r||l<=o)return null;const c=document.createRange();c.setStart(e,o),c.setEnd(e,l);const d=c.getBoundingClientRect();return d.width===0&&d.height===0?null:{top:d.top,bottom:d.bottom,x:a==="right"?d.right:d.left}},"rectFromRange");return i(Math.max(0,t-1),t,"right")??i(t,Math.min(r,t+1),"left")??i(n,n+1,"right")??{top:0,bottom:0,x:0}}s(uW,"measureCaretRect");function dW(e){const t=window.getSelection();if(!t||t.rangeCount===0||!t.isCollapsed)return null;const n=t.getRangeAt(0),r=n.startContainer;if(r.nodeType!==Node.TEXT_NODE||!e.contains(r))return null;const i=r.textContent??"",o=n.startOffset,l=Ik(i,o);if(!l)return null;const a=uW(r,o,l.atPos),c=e.getBoundingClientRect();return{trigger:l.trigger,marker:l.marker,query:l.query,top:a.top-c.top,left:a.x-c.left,viewportTop:a.top,viewportBottom:a.bottom,viewportLeft:a.x,textNode:r,atPos:l.atPos,endPos:l.endPos}}s(dW,"detectMention");function fW(){const e=window.visualViewport;return e?{offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,width:e.width,height:e.height}:{offsetLeft:0,offsetTop:0,width:window.innerWidth,height:window.innerHeight}}s(fW,"getMentionMenuViewport");function Nk(e,t,n={width:Mk,height:Ak}){const r=t.offsetLeft+$x,i=t.offsetLeft+t.width-n.width,o=t.offsetTop+$x,l=t.offsetTop+t.height-n.height,a=t.offsetTop+e.viewportTop;let c;if(a>l){const u=t.offsetTop+e.viewportBottom-n.height;c=Math.max(o,Math.min(u,l))}else c=Math.max(o,a);const d=t.offsetLeft+e.viewportLeft+lW;return{top:c,left:Math.max(r,Math.min(d,i))}}s(Nk,"computeMentionMenuPosition");function hW(e){return{width:Mk,height:Math.min(Ak,Math.max(1,Math.min(e,8))*oW+sW)}}s(hW,"getMentionMenuSize");function gW(e,t){return!t||!e.contains(t)?!1:!!(t.nodeType===Node.ELEMENT_NODE?t:t.parentElement)?.closest("pre, code")}s(gW,"nodeInsideCodeLike");function Fx(e){if(!e)return!1;const t=window.getSelection();if(!t)return!1;for(const n of[t.anchorNode,t.focusNode])if(gW(e,n))return!0;return!1}s(Fx,"isSelectionInsideCodeLikeElement");function Ok(e){const t=e.name.trim(),n=e.issueIdentifier?.trim();return n&&t.toLowerCase().startsWith(n.toLowerCase())?t.slice(n.length).trim():t}s(Ok,"issueMentionTitle");function pW(e){if(e.kind==="issue"&&e.issueIdentifier)return`[${e.issueIdentifier}](${l9(e.issueIdentifier)}) `;if(e.kind==="project"&&e.projectId)return`[@${e.name}](${r9(e.projectId,e.projectColor??null)}) `;if(e.kind==="user"&&e.userId)return`[@${e.name}](${d9(e.userId)}) `;const t=e.agentId??e.id.replace(/^agent:/,"");return`[@${e.name}](${u9(t,e.agentIcon??null)}) `}s(pW,"mentionMarkdown");function Dk(e){return e.kind==="routine"?`/routine:${e.name}`:e.kind==="action"?`/${e.command}`:`/${e.slug}`}s(Dk,"slashCommandLabel");function mW(e){return e.kind==="action"?`/${e.command} `:e.kind==="routine"?`[${Dk(e)}](${Bx(e.routineId)}) `:`[/${e.slug}](${e.href}) `}s(mW,"slashCommandMarkdown");function vW(e){return e.kind==="skill"||e.kind==="routine"||e.kind==="action"?mW(e):pW(e)}s(vW,"autocompleteMarkdown");function Rk(e,t,n=!1){return e==="Tab"?!0:e!=="Enter"?!1:t==="mention"||t==="skill"&&n}s(Rk,"shouldAcceptAutocompleteKey");function Lk(e,t){return!e||!t?!1:e.trigger===t.trigger&&e.marker===t.marker&&e.query===t.query&&e.textNode===t.textNode&&e.atPos===t.atPos&&e.endPos===t.endPos}s(Lk,"isSameAutocompleteSession");function _W(e,t){if(e.kind==="action")return!1;const n=lp(t);if(!n)return!1;if(e.kind==="skill")return n.kind==="skill"&&n.skillId===e.skillId;if(e.kind==="routine")return n.kind==="routine"&&n.routineId===e.routineId;if(e.kind==="issue"&&e.issueIdentifier)return n.kind==="issue"&&n.identifier===e.issueIdentifier;if(e.kind==="project"&&e.projectId)return n.kind==="project"&&n.projectId===e.projectId;if(e.kind==="user"&&e.userId)return n.kind==="user"&&n.userId===e.userId;const r=e.agentId??e.id.replace(/^agent:/,"");return n.kind==="agent"&&n.agentId===r}s(_W,"autocompleteOptionMatchesLink");function $k(e,t,n){const r=Array.from(e.querySelectorAll("a")).filter(o=>o instanceof HTMLAnchorElement).filter(o=>_W(t,o.getAttribute("href")??""));if(r.length===0)return null;if(!n)return r[0]??null;const i=e.getBoundingClientRect();return r.sort((o,l)=>{const a=o.getBoundingClientRect(),c=l.getBoundingClientRect(),d=a.left-i.left,u=a.top-i.top,f=c.left-i.left,h=c.top-i.top;return Math.hypot(d-n.left,u-n.top)-Math.hypot(f-n.left,h-n.top)})[0]??null}s($k,"findClosestAutocompleteAnchor");function Pk(e){const t=window.getSelection();if(!t)return!1;const n=document.createRange(),r=e.nextSibling;if(r?.nodeType===Node.TEXT_NODE){const i=r.textContent??"";if(i.startsWith(" "))return n.setStart(r,1),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!0;if(i.length>0)return n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!0}return n.setStartAfter(e),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!0}s(Pk,"placeCaretAfterMentionAnchor");function Fk(e){const t=window.getSelection();if(!t)return!1;const n=document.createRange();return n.selectNodeContents(e),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!0}s(Fk,"placeCaretAtEditableEnd");function yW(e,t,n){const r=`${t.marker}${t.query}`,i=vW(n),o=e.lastIndexOf(r);return o===-1?e:e.slice(0,o)+i+e.slice(o+r.length)}s(yW,"applyMention");var xW=(0,m.forwardRef)(s(function({value:t,onChange:n,placeholder:r,className:i,contentClassName:o,onBlur:l,imageUploadHandler:a,onDropFile:c,fileDropTarget:d="editor",bordered:u=!0,mentions:f,actionCommands:h=[],onSubmit:g,readOnly:p=!1},v){const _=(0,m.useMemo)(()=>Rx(t),[t]),{slashCommands:y}=qU(),x=(0,m.useMemo)(()=>[...h,...y],[h,y]),C=(0,m.useRef)(null),b=(0,m.useRef)(null),T=(0,m.useRef)(null),M=(0,m.useRef)(_);M.current=_;const S=(0,m.useRef)(_),E=(0,m.useRef)(!0),A=(0,m.useRef)(null),[D,L]=(0,m.useState)(null),[G,$]=(0,m.useState)(!1),[W,z]=(0,m.useState)(null),me=(0,m.useRef)(0),q=(0,m.useRef)(a);q.current=a;const[le,ye]=(0,m.useState)(null),X=(0,m.useRef)(null),[ne,he]=(0,m.useState)(0),ge=(0,m.useRef)([]),se=(0,m.useRef)(!1),Z=(0,m.useRef)(!1),ee=le!==null&&(le.trigger==="mention"&&!!f?.length||le.trigger==="skill"&&x.length>0),pe=(0,m.useMemo)(()=>{const R=new Map;for(const Y of f??[]){if(Y.kind==="agent"){const Te=Y.agentId??Y.id.replace(/^agent:/,"");R.set(`agent:${Te}`,Y)}Y.kind==="user"&&Y.userId&&R.set(`user:${Y.userId}`,Y),Y.kind==="project"&&Y.projectId&&R.set(`project:${Y.projectId}`,Y)}return R},[f]),De=(0,m.useCallback)(R=>{b.current=R,R&&M.current!==S.current&&(A.current=M.current,R.setMarkdown(M.current),S.current=M.current)},[]),Ae=(0,m.useMemo)(()=>{if(!le)return[];const R=le.query.trim().toLowerCase();return le.trigger==="skill"?x.filter(Y=>R?Y.aliases.some(Te=>Te.toLowerCase().includes(R)):!0).slice(0,Px):f?f.filter(Y=>Y.name.toLowerCase().includes(R)).slice(0,Px):[]},[le,f,x]),Ge=(0,m.useCallback)(R=>{if(p)return;if(!W&&b.current){const k=b.current,O=ip(R);k.focus(()=>k.insertMarkdown(O),{defaultSelection:"rootEnd"});return}const Y=T.current;if(!Y){n(`${t}${R}`);return}const Te=Y.selectionStart??t.length,Fe=Y.selectionEnd??t.length;n(`${t.slice(0,Te)}${R}${t.slice(Fe)}`),requestAnimationFrame(()=>{Y.focus();const k=Te+R.length;Y.setSelectionRange(k,k)})},[n,p,W,t]);(0,m.useImperativeHandle)(v,()=>({focus:s(()=>{if(W){T.current?.focus();return}b.current?.focus(void 0,{defaultSelection:"rootEnd"})},"focus"),insertMarkdown:Ge,clear:s(()=>{S.current="",A.current="",b.current?.setMarkdown(""),T.current&&(T.current.value="")},"clear")}),[Ge,W]);const Pe=(0,m.useCallback)(R=>{R&&(R.style.height="auto",R.style.height=`${R.scrollHeight}px`)},[]);(0,m.useEffect)(()=>{W&&Pe(T.current)},[Pe,W,t]),(0,m.useEffect)(()=>{if(W||_.trim().length===0)return;const R=C.current;if(!R)return;let Y=0,Te=0,Fe=0;const k=s(()=>{const K=R.querySelector('[contenteditable="true"]');if(!(K instanceof HTMLElement))return!1;const J=document.activeElement;return J===K||K.contains(J)?!1:tW(K,_,r)},"looksEmpty"),O=s(()=>{window.clearTimeout(Y),window.clearTimeout(Te),Y=window.setTimeout(()=>{if(!k())return;const K=Fe;Te=window.setTimeout(()=>{Fe===K&&k()&&z({code:"MDE-EMPTY",message:"Rich editor failed to load content"})},iW)},rW)},"scheduleCheck");O();const N=new MutationObserver(()=>{Fe+=1,O()});return N.observe(R,{subtree:!0,childList:!0,characterData:!0}),()=>{window.clearTimeout(Y),window.clearTimeout(Te),N.disconnect()}},[_,r,W]);const lt=!!a,Ye=(0,m.useMemo)(()=>{const R=lt?async Te=>{const Fe=q.current;if(!Fe)throw new Error("No image upload handler");try{const k=await Fe(Te);return L(null),setTimeout(()=>{const O=S.current,N=QU(k),K=O.replace(new RegExp(`(!\\[[^\\]]*\\]\\(${N}\\))(?!\\n\\n)`,"g"),`$1
84
+
85
+ `);K!==O&&(S.current=K,A.current=K,b.current?.setMarkdown(K),n(Tc(K)),requestAnimationFrame(()=>{b.current?.focus(void 0,{defaultSelection:"rootEnd"})}))},100),k}catch(k){const O=k instanceof Error?k.message:"Image upload failed";throw L(O),k}}:void 0,Y=[e$(),S$(),eV(),K$(),sP({validateUrl:nW}),RK(),SU(),JU(),l$(),uV({defaultCodeBlockLanguage:"txt",codeBlockEditorDescriptors:[cW]}),IK({codeBlockLanguages:aW}),gU()];return R&&Y.push(WF({imageUploadHandler:R,disableImageSettingsButton:!0})),Y},[lt]);(0,m.useEffect)(()=>{_!==S.current&&b.current&&(A.current=_,b.current.setMarkdown(_),S.current=_)},[_]);const at=(0,m.useCallback)(()=>{const R=C.current?.querySelector('[contenteditable="true"]');if(!R)return;const Y=R.querySelectorAll("a");for(const Te of Y){const Fe=Te,k=lp(Fe.getAttribute("href")??"");if(!k){s9(Fe);continue}if(k.kind==="project"){const N=pe.get(`project:${k.projectId}`);Qa(Fe,{...k,color:k.color??N?.projectColor??null});continue}if(k.kind==="skill"||k.kind==="routine"){Qa(Fe,k);continue}if(k.kind==="user"||k.kind==="issue"){Qa(Fe,k);continue}const O=pe.get(`agent:${k.agentId}`);Qa(Fe,{...k,icon:k.icon??O?.agentIcon??null})}},[pe]),Et=(0,m.useCallback)(()=>{if(!C.current||Fx(C.current)){X.current=null,se.current=!1,ye(null);return}const R=dW(C.current);if(R&&R.trigger==="mention"&&(!f||f.length===0)){X.current=null,se.current=!1,ye(null);return}if(R&&R.trigger==="skill"&&x.length===0){X.current=null,se.current=!1,ye(null);return}const Y=X.current,Te=Lk(Y,R);X.current=R,Te||(se.current=!1,he(0)),ye(R)},[f,x.length]);(0,m.useEffect)(()=>{if((!f||f.length===0)&&x.length===0)return;const R=C.current,Y=s(()=>requestAnimationFrame(Et),"onInput");return document.addEventListener("selectionchange",Et),R?.addEventListener("input",Y,!0),()=>{document.removeEventListener("selectionchange",Et),R?.removeEventListener("input",Y,!0)}},[Et,f,x.length]),(0,m.useEffect)(()=>{if(!ee)return;const R=s(()=>requestAnimationFrame(Et),"updatePosition"),Y=window.visualViewport;return Y?.addEventListener("resize",R),Y?.addEventListener("scroll",R),window.addEventListener("resize",R),window.addEventListener("scroll",R,!0),()=>{Y?.removeEventListener("resize",R),Y?.removeEventListener("scroll",R),window.removeEventListener("resize",R),window.removeEventListener("scroll",R,!0)}},[Et,ee]),(0,m.useEffect)(()=>{if(!ee)return;if(ge.current.length=Ae.length,ne>=Ae.length){he(Math.max(0,Ae.length-1));return}const R=ge.current[ne];!R||typeof R.scrollIntoView!="function"||R.scrollIntoView({block:"nearest"})},[Ae.length,ee,ne]),(0,m.useEffect)(()=>{ee||(Z.current=!1)},[ee]),(0,m.useEffect)(()=>{const R=C.current?.querySelector('[contenteditable="true"]');if(!R)return;let Y=null,Te=!1;const Fe=s(()=>{N.observe(R,{subtree:!0,childList:!0,characterData:!0})},"observe"),k=s(()=>{Y=null,!Te&&(N.disconnect(),at(),Te||Fe())},"flushDecorations"),O=s(()=>{Y===null&&(Y=requestAnimationFrame(k))},"scheduleDecorations"),N=new MutationObserver(()=>{O()});return k(),()=>{Te=!0,N.disconnect(),Y!==null&&cancelAnimationFrame(Y)}},[at]);const yt=(0,m.useCallback)(R=>{const Y=X.current;if(!Y||R.kind==="action"&&R.disabled)return!1;const Te=S.current,Fe=yW(Te,Y,R);Fe!==Te&&(S.current=Fe,A.current=Fe,b.current?.setMarkdown(Fe),n(Tc(Fe)));const k=s(O=>{const N=C.current?.querySelector('[contenteditable="true"]');if(!(N instanceof HTMLElement))return;if(at(),N.focus(),R.kind==="action"){Fk(N);return}const K=$k(N,R,Y);if(!K){O>0&&requestAnimationFrame(()=>k(O-1));return}Pk(K)},"restoreSelection");return requestAnimationFrame(()=>k(4)),X.current=null,se.current=!1,ye(null),!0},[at,n]),Pt=(0,m.useCallback)((R,Y)=>{R.preventDefault(),R.stopPropagation(),!Z.current&&yt(Y)&&(Z.current=!0)},[yt]),ze=(0,m.useRef)(null),Nt=8,Ft=(0,m.useCallback)(R=>{const Y=R.touches[0];Y&&(ze.current={x:Y.clientX,y:Y.clientY})},[]),it=(0,m.useCallback)(R=>{const Y=ze.current;if(!Y)return;const Te=R.touches[0];Te&&Math.hypot(Te.clientX-Y.x,Te.clientY-Y.y)>Nt&&(ze.current=null)},[]),Xt=(0,m.useCallback)((R,Y)=>{const Te=ze.current;if(ze.current=null,!Te)return;const Fe=R.changedTouches[0];Fe&&(Math.hypot(Fe.clientX-Te.x,Fe.clientY-Te.y)>Nt||Pt(R,Y))},[Pt]);function kn(R){return Array.from(R.dataTransfer?.types??[]).includes("Files")}s(kn,"hasFilePayload");const Le=d==="editor"&&!!(a||c),ln=(0,m.useCallback)(R=>{const Y=R.clipboardData;if(!Y||!b.current)return;const Te=new Set(Array.from(Y.types));if(Te.has("Files")||Te.has("text/html")||Fx(C.current))return;const Fe=Y.getData("text/plain");bk(Fe)&&(R.preventDefault(),b.current.insertMarkdown(ip(Ek(Fe))))},[]),Vn=(0,m.useCallback)(R=>{z({code:"MDE-RENDER",message:Lx(R)})},[]),je=(0,m.useCallback)(R=>{z({code:"MDE-PARSE",message:Lx(R)})},[]),I=le?Nk(le,fW(),hW(Ae.length)):null;return W?(0,H.jsxs)("div",{ref:C,className:no("relative paperclip-mdxeditor-scope",u?"rounded-md border border-border bg-transparent":"bg-transparent",i),children:[(0,H.jsxs)("div",{className:"flex items-start justify-between gap-3 px-3 pt-2 text-xs text-muted-foreground",children:[(0,H.jsxs)("p",{children:["Rich editor unavailable for this markdown. Showing raw source instead."," ",(0,H.jsx)("span",{"data-testid":"markdown-editor-fallback-code",className:"font-mono",children:W.code})]}),(0,H.jsx)("button",{type:"button",className:"shrink-0 underline underline-offset-2 hover:text-foreground",onClick:s(()=>{E.current=!0,z(null)},"onClick"),children:"Retry rich editor"})]}),(0,H.jsx)("textarea",{ref:T,value:t,placeholder:r,readOnly:p,onChange:s(R=>{p||(n(R.target.value),Pe(R.target))},"onChange"),onBlur:s(()=>l?.(),"onBlur"),onKeyDown:s(R=>{g&&R.key==="Enter"&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),g())},"onKeyDown"),className:no("min-h-(--sz-12rem) w-full resize-none bg-transparent px-3 pb-3 pt-2 font-mono text-sm leading-6 outline-none",o)})]}):(0,H.jsxs)("div",{ref:C,className:no("relative paperclip-mdxeditor-scope",u?"rounded-md border border-border bg-transparent":"bg-transparent",G&&"ring-1 ring-primary/60 bg-accent/20",i),onKeyDownCapture:s(R=>{if(!p){if(g&&R.key==="Enter"&&(R.metaKey||R.ctrlKey)){R.preventDefault(),R.stopPropagation(),g();return}if(ee){if(R.key===" "&&X.current?.trigger==="skill"){X.current=null,se.current=!1,ye(null);return}if(R.key==="Escape"){R.preventDefault(),R.stopPropagation(),X.current=null,se.current=!1,ye(null);return}if(Ae.length>0){if(R.key==="ArrowDown"){R.preventDefault(),R.stopPropagation(),se.current=X.current?.trigger==="skill",he(Y=>Math.min(Y+1,Ae.length-1));return}if(R.key==="ArrowUp"){R.preventDefault(),R.stopPropagation(),se.current=X.current?.trigger==="skill",he(Y=>Math.max(Y-1,0));return}if(Rk(R.key,X.current?.trigger??null,se.current)){R.preventDefault(),R.stopPropagation(),yt(Ae[ne]);return}}}}},"onKeyDownCapture"),onDragEnter:s(R=>{p||!Le||!kn(R)||(me.current+=1,$(!0))},"onDragEnter"),onDragOver:s(R=>{p||!Le||!kn(R)||(R.preventDefault(),R.dataTransfer.dropEffect="copy")},"onDragOver"),onDragLeave:s(()=>{p||Le&&(me.current=Math.max(0,me.current-1),me.current===0&&$(!1))},"onDragLeave"),onDrop:s(R=>{if(p||(me.current=0,$(!1),!c))return;const Y=R.dataTransfer?.files;if(!Y||Y.length===0)return;const Te=Array.from(Y),Fe=Te.filter(k=>!k.type.startsWith("image/"));if(Fe.length!==0){Fe.length===Te.length&&(R.preventDefault(),R.stopPropagation());for(const k of Fe)c(k)}},"onDrop"),onPasteCapture:ln,children:[(0,H.jsx)(ZU,{onError:Vn,children:(0,H.jsx)(GL,{ref:De,markdown:_,iconComponentFor:YU,suppressHtmlProcessing:!0,placeholder:r,readOnly:p,onChange:s(R=>{if(p)return;const Y=Tc(R),Te=A.current;if(Te!==null&&(A.current=null,Y===Te||Y===Tc(Te))){S.current=Te;return}if(E.current&&(E.current=!1,Y===""&&_!=="")){A.current=_,b.current?.setMarkdown(_);return}S.current=Rx(Y),n(Y)},"onChange"),onBlur:s(()=>l?.(),"onBlur"),onError:s(R=>{je(R.error)},"onError"),className:no("paperclip-mdxeditor",!u&&"paperclip-mdxeditor--borderless"),contentEditableClassName:no("paperclip-mdxeditor-content focus:outline-none [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:list-decimal [&_ol]:pl-5 [&_li]:list-item",o),additionalLexicalNodes:[np,CU],plugins:Ye})}),ee&&Ae.length>0&&I&&(0,Yc.createPortal)((0,H.jsx)("div",{"data-paperclip-floating-ui":"","data-testid":"mention-autocomplete-menu",className:"pointer-events-auto fixed z-(--z-9999) min-w-(--sz-180px) max-w-(--sz-calc-15) max-h-(--sz-208px) overflow-y-auto overscroll-contain rounded-md border border-border bg-popover shadow-md",style:{top:I.top,left:I.left,touchAction:"pan-y",WebkitOverflowScrolling:"touch"},onWheelCapture:s(R=>{R.stopPropagation()},"onWheelCapture"),onTouchMove:s(R=>{R.stopPropagation()},"onTouchMove"),children:Ae.map((R,Y)=>(0,H.jsxs)("button",{type:"button",tabIndex:-1,disabled:R.kind==="action"&&R.disabled===!0,"aria-disabled":R.kind==="action"&&R.disabled===!0,title:R.kind==="action"&&R.disabled?R.disabledReason??void 0:void 0,ref:s(Te=>{ge.current[Y]=Te},"ref"),className:no("flex items-center gap-2 w-full px-3 py-1.5 text-sm text-left hover:bg-accent/50 transition-colors",Y===ne&&"bg-accent",R.kind==="action"&&R.disabled&&"cursor-not-allowed opacity-60 hover:bg-transparent"),onPointerDown:s(Te=>{Te.pointerType!=="touch"&&Pt(Te,R)},"onPointerDown"),onMouseDown:s(Te=>Pt(Te,R),"onMouseDown"),onTouchStart:Ft,onTouchMove:it,onTouchEnd:s(Te=>Xt(Te,R),"onTouchEnd"),onMouseEnter:s(()=>{X.current?.trigger==="skill"&&(se.current=!0),he(Y)},"onMouseEnter"),children:[R.kind==="routine"?(0,H.jsx)(p8,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):R.kind==="action"?(0,H.jsx)(v8,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):R.kind==="skill"?(0,H.jsx)(N9,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):R.kind==="issue"?(0,H.jsx)(y8,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):R.kind==="project"&&R.projectId?(0,H.jsx)("span",{className:"inline-flex h-2 w-2 rounded-full border border-border/50",style:{backgroundColor:R.projectColor??"var(--project-none)"}}):R.kind==="user"?(0,H.jsx)(C8,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):(0,H.jsx)(V9,{agent:{id:R.agentId??R.id,name:R.name,appearance:R.agentAppearance},size:16}),R.kind==="issue"&&R.issueIdentifier?(0,H.jsxs)("span",{className:"flex min-w-0 items-baseline gap-1.5",children:[(0,H.jsx)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-muted-foreground",children:R.issueIdentifier}),(0,H.jsx)("span",{className:"truncate",children:Ok(R)})]}):(0,H.jsx)("span",{className:"truncate",children:R.kind==="skill"||R.kind==="routine"||R.kind==="action"?Dk(R):R.name}),R.kind==="issue"&&(0,H.jsx)("span",{className:"ml-auto text-(length:--text-nano) uppercase tracking-wide text-muted-foreground",children:"Task"}),R.kind==="project"&&R.projectId&&(0,H.jsx)("span",{className:"ml-auto text-(length:--text-nano) uppercase tracking-wide text-muted-foreground",children:"Project"}),R.kind==="user"&&(0,H.jsx)("span",{className:"ml-auto text-(length:--text-nano) uppercase tracking-wide text-muted-foreground",children:"User"}),R.kind==="skill"&&(0,H.jsx)("span",{className:"ml-auto text-(length:--text-nano) uppercase tracking-wide text-muted-foreground",children:"Skill"}),R.kind==="routine"&&(0,H.jsx)("span",{className:"ml-auto text-(length:--text-nano) uppercase tracking-wide text-muted-foreground",children:"Routine"}),R.kind==="action"&&(0,H.jsx)("span",{className:"ml-auto max-w-28 truncate text-(length:--text-nano) text-muted-foreground",children:R.disabled?R.disabledReason:R.description})]},R.id))}),document.body),G&&Le&&(0,H.jsxs)("div",{className:no("pointer-events-none absolute inset-1 z-40 flex items-center justify-center rounded-md border border-dashed border-primary/80 bg-primary/10 text-xs font-medium text-primary",!u&&"inset-0 rounded-sm"),children:["Drop ",c?"file":"image"," to upload"]}),D&&(0,H.jsx)("p",{className:"px-3 pb-2 text-xs text-destructive",children:D})]})},"MarkdownEditor"));export{gM as C,NW as E,pM as S,OW as T,AM as _,b8 as a,_M as b,y8 as c,h8 as d,PC as f,LC as g,RC as h,GU as i,v8 as l,DC as m,jj as n,uf as o,$C as p,zj as r,C8 as s,xW as t,p8 as u,dM as v,bM as w,DW as x,SM as y};