@crewspaceai/ui 2026.412.0-canary.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 (214) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/dist/android-chrome-192x192.png +0 -0
  4. package/dist/android-chrome-512x512.png +0 -0
  5. package/dist/apple-touch-icon.png +0 -0
  6. package/dist/assets/Office-JSp1M1WZ.js +1 -0
  7. package/dist/assets/_basePickBy-s4e5ujOx.js +1 -0
  8. package/dist/assets/_baseUniq-CZlZWBgA.js +1 -0
  9. package/dist/assets/apl-B4CMkyY2.js +1 -0
  10. package/dist/assets/arc-CKpxyOmJ.js +1 -0
  11. package/dist/assets/architectureDiagram-VXUJARFQ-DGSV8xDY.js +36 -0
  12. package/dist/assets/asciiarmor-Df11BRmG.js +1 -0
  13. package/dist/assets/asn1-EdZsLKOL.js +1 -0
  14. package/dist/assets/asterisk-B-8jnY81.js +1 -0
  15. package/dist/assets/blockDiagram-VD42YOAC-D_3nEA4B.js +122 -0
  16. package/dist/assets/brainfuck-C4LP7Hcl.js +1 -0
  17. package/dist/assets/c4Diagram-YG6GDRKO-NqPZTfn7.js +10 -0
  18. package/dist/assets/channel-D7AdA9V2.js +1 -0
  19. package/dist/assets/chunk-4BX2VUAB-tMK9zEr7.js +1 -0
  20. package/dist/assets/chunk-55IACEB6-DWaKiROy.js +1 -0
  21. package/dist/assets/chunk-B4BG7PRW-CbA_TqG9.js +165 -0
  22. package/dist/assets/chunk-DI55MBZ5-BWa54S__.js +220 -0
  23. package/dist/assets/chunk-FMBD7UC4-DXu8dZmI.js +15 -0
  24. package/dist/assets/chunk-QN33PNHL-BqB6ArE4.js +1 -0
  25. package/dist/assets/chunk-QZHKN3VN-CERctbKo.js +1 -0
  26. package/dist/assets/chunk-TZMSLE5B-Dp8FkMIs.js +1 -0
  27. package/dist/assets/classDiagram-2ON5EDUG-DzVRFXNT.js +1 -0
  28. package/dist/assets/classDiagram-v2-WZHVMYZB-DzVRFXNT.js +1 -0
  29. package/dist/assets/clike-B9uivgTg.js +1 -0
  30. package/dist/assets/clojure-BMjYHr_A.js +1 -0
  31. package/dist/assets/clone-C_VGIz_D.js +1 -0
  32. package/dist/assets/cmake-BQqOBYOt.js +1 -0
  33. package/dist/assets/cobol-CWcv1MsR.js +1 -0
  34. package/dist/assets/coffeescript-S37ZYGWr.js +1 -0
  35. package/dist/assets/commonlisp-DBKNyK5s.js +1 -0
  36. package/dist/assets/cose-bilkent-S5V4N54A-nuFb9gZh.js +1 -0
  37. package/dist/assets/crystal-SjHAIU92.js +1 -0
  38. package/dist/assets/css-BnMrqG3P.js +1 -0
  39. package/dist/assets/cypher-C_CwsFkJ.js +1 -0
  40. package/dist/assets/cytoscape.esm-BQaXIfA_.js +331 -0
  41. package/dist/assets/d-pRatUO7H.js +1 -0
  42. package/dist/assets/dagre-6UL2VRFP-COXI_RP-.js +4 -0
  43. package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  44. package/dist/assets/diagram-PSM6KHXK-Cv3_gSji.js +24 -0
  45. package/dist/assets/diagram-QEK2KX5R-EnFKfz5j.js +43 -0
  46. package/dist/assets/diagram-S2PKOQOG-DFk9MizC.js +24 -0
  47. package/dist/assets/diff-DbItnlRl.js +1 -0
  48. package/dist/assets/dockerfile-BKs6k2Af.js +1 -0
  49. package/dist/assets/dtd-DF_7sFjM.js +1 -0
  50. package/dist/assets/dylan-DwRh75JA.js +1 -0
  51. package/dist/assets/ebnf-CDyGwa7X.js +1 -0
  52. package/dist/assets/ecl-Cabwm37j.js +1 -0
  53. package/dist/assets/eiffel-CnydiIhH.js +1 -0
  54. package/dist/assets/elm-vLlmbW-K.js +1 -0
  55. package/dist/assets/erDiagram-Q2GNP2WA-BzTGjR4m.js +60 -0
  56. package/dist/assets/erlang-BNw1qcRV.js +1 -0
  57. package/dist/assets/factor-kuTfRLto.js +1 -0
  58. package/dist/assets/fcl-Kvtd6kyn.js +1 -0
  59. package/dist/assets/flowDiagram-NV44I4VS-BhxG9HVf.js +162 -0
  60. package/dist/assets/forth-Ffai-XNe.js +1 -0
  61. package/dist/assets/fortran-DYz_wnZ1.js +1 -0
  62. package/dist/assets/ganttDiagram-JELNMOA3-D7x-T2Wm.js +267 -0
  63. package/dist/assets/gas-Bneqetm1.js +1 -0
  64. package/dist/assets/gherkin-heZmZLOM.js +1 -0
  65. package/dist/assets/gitGraphDiagram-V2S2FVAM-3XW2I3EE.js +65 -0
  66. package/dist/assets/graph-BVl_UcnC.js +1 -0
  67. package/dist/assets/groovy-D9Dt4D0W.js +1 -0
  68. package/dist/assets/haskell-Cw1EW3IL.js +1 -0
  69. package/dist/assets/haxe-H-WmDvRZ.js +1 -0
  70. package/dist/assets/http-DBlCnlav.js +1 -0
  71. package/dist/assets/idl-BEugSyMb.js +1 -0
  72. package/dist/assets/index-1uTJjl8a.js +1 -0
  73. package/dist/assets/index-B7hacZaa.js +3 -0
  74. package/dist/assets/index-BHf1Hzdf.css +1 -0
  75. package/dist/assets/index-BSW5JwaH.js +1 -0
  76. package/dist/assets/index-BZnHexpx.js +1 -0
  77. package/dist/assets/index-BiQcZBBL.js +1 -0
  78. package/dist/assets/index-BpFmY7hp.js +1 -0
  79. package/dist/assets/index-C8TA_OLZ.js +1 -0
  80. package/dist/assets/index-CMWIT5Av.js +1 -0
  81. package/dist/assets/index-CVMKjtie.js +1 -0
  82. package/dist/assets/index-Ce_rFd0H.js +2 -0
  83. package/dist/assets/index-Cq0h5Zql.js +1 -0
  84. package/dist/assets/index-Cz2Ibuki.js +227 -0
  85. package/dist/assets/index-D5wnSweq.js +7 -0
  86. package/dist/assets/index-DRpI4zkj.js +1 -0
  87. package/dist/assets/index-DbELJA96.js +1 -0
  88. package/dist/assets/index-IzLA2Fcd.js +1 -0
  89. package/dist/assets/index-kLee7BdF.js +1 -0
  90. package/dist/assets/index-vmBmu2hn.js +1 -0
  91. package/dist/assets/infoDiagram-HS3SLOUP-BQIlcg9w.js +2 -0
  92. package/dist/assets/init-Gi6I4Gst.js +1 -0
  93. package/dist/assets/javascript-iXu5QeM3.js +1 -0
  94. package/dist/assets/journeyDiagram-XKPGCS4Q-ob8GRXev.js +139 -0
  95. package/dist/assets/julia-DuME0IfC.js +1 -0
  96. package/dist/assets/kanban-definition-3W4ZIXB7-DRnEFfcR.js +89 -0
  97. package/dist/assets/katex-O9d3_IXG.js +261 -0
  98. package/dist/assets/layout-EfaGCOrM.js +1 -0
  99. package/dist/assets/linear-DPC6vJZk.js +1 -0
  100. package/dist/assets/livescript-BwQOo05w.js +1 -0
  101. package/dist/assets/lua-BgMRiT3U.js +1 -0
  102. package/dist/assets/mathematica-DTrFuWx2.js +1 -0
  103. package/dist/assets/mbox-CNhZ1qSd.js +1 -0
  104. package/dist/assets/mermaid.core-Cma2jq_8.js +256 -0
  105. package/dist/assets/mindmap-definition-VGOIOE7T-D7BZyIVg.js +68 -0
  106. package/dist/assets/mirc-CjQqDB4T.js +1 -0
  107. package/dist/assets/mllike-CXdrOF99.js +1 -0
  108. package/dist/assets/modelica-Dc1JOy9r.js +1 -0
  109. package/dist/assets/mscgen-BA5vi2Kp.js +1 -0
  110. package/dist/assets/mumps-BT43cFF4.js +1 -0
  111. package/dist/assets/nginx-DdIZxoE0.js +1 -0
  112. package/dist/assets/nsis-LdVXkNf5.js +1 -0
  113. package/dist/assets/ntriples-BfvgReVJ.js +1 -0
  114. package/dist/assets/octave-Ck1zUtKM.js +1 -0
  115. package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  116. package/dist/assets/oz-BzwKVEFT.js +1 -0
  117. package/dist/assets/pascal--L3eBynH.js +1 -0
  118. package/dist/assets/perl-CdXCOZ3F.js +1 -0
  119. package/dist/assets/pieDiagram-ADFJNKIX-BvJHngd-.js +30 -0
  120. package/dist/assets/pig-CevX1Tat.js +1 -0
  121. package/dist/assets/powershell-CFHJl5sT.js +1 -0
  122. package/dist/assets/properties-C78fOPTZ.js +1 -0
  123. package/dist/assets/protobuf-ChK-085T.js +1 -0
  124. package/dist/assets/pug-DeIclll2.js +1 -0
  125. package/dist/assets/puppet-DMA9R1ak.js +1 -0
  126. package/dist/assets/python-BuPzkPfP.js +1 -0
  127. package/dist/assets/q-pXgVlZs6.js +1 -0
  128. package/dist/assets/quadrantDiagram-AYHSOK5B-D_aE_NAU.js +7 -0
  129. package/dist/assets/r-B6wPVr8A.js +1 -0
  130. package/dist/assets/requirementDiagram-UZGBJVZJ-Co7ddlL_.js +64 -0
  131. package/dist/assets/rpm-CTu-6PCP.js +1 -0
  132. package/dist/assets/ruby-B2Rjki9n.js +1 -0
  133. package/dist/assets/sankeyDiagram-TZEHDZUN-R0_C3AmA.js +10 -0
  134. package/dist/assets/sas-B4kiWyti.js +1 -0
  135. package/dist/assets/scheme-C41bIUwD.js +1 -0
  136. package/dist/assets/sequenceDiagram-WL72ISMW-BcVqSpRw.js +145 -0
  137. package/dist/assets/shell-CjFT_Tl9.js +1 -0
  138. package/dist/assets/sieve-C3Gn_uJK.js +1 -0
  139. package/dist/assets/simple-mode-GW_nhZxv.js +1 -0
  140. package/dist/assets/smalltalk-CnHTOXQT.js +1 -0
  141. package/dist/assets/solr-DehyRSwq.js +1 -0
  142. package/dist/assets/sparql-DkYu6x3z.js +1 -0
  143. package/dist/assets/spreadsheet-BCZA_wO0.js +1 -0
  144. package/dist/assets/sql-D0XecflT.js +1 -0
  145. package/dist/assets/stateDiagram-FKZM4ZOC-DYU4zTpw.js +1 -0
  146. package/dist/assets/stateDiagram-v2-4FDKWEC3-BTQNL-wM.js +1 -0
  147. package/dist/assets/stex-C3f8Ysf7.js +1 -0
  148. package/dist/assets/stylus-B533Al4x.js +1 -0
  149. package/dist/assets/swift-BzpIVaGY.js +1 -0
  150. package/dist/assets/tcl-DVfN8rqt.js +1 -0
  151. package/dist/assets/textile-CnDTJFAw.js +1 -0
  152. package/dist/assets/tiddlywiki-DO-Gjzrf.js +1 -0
  153. package/dist/assets/tiki-DGYXhP31.js +1 -0
  154. package/dist/assets/timeline-definition-IT6M3QCI-CS7a2_SC.js +61 -0
  155. package/dist/assets/toml-Bm5Em-hy.js +1 -0
  156. package/dist/assets/treemap-GDKQZRPO-DXGAnUr4.js +162 -0
  157. package/dist/assets/troff-wAsdV37c.js +1 -0
  158. package/dist/assets/ttcn-CfJYG6tj.js +1 -0
  159. package/dist/assets/ttcn-cfg-B9xdYoR4.js +1 -0
  160. package/dist/assets/turtle-B1tBg_DP.js +1 -0
  161. package/dist/assets/vb-CmGdzxic.js +1 -0
  162. package/dist/assets/vbscript-BuJXcnF6.js +1 -0
  163. package/dist/assets/velocity-D8B20fx6.js +1 -0
  164. package/dist/assets/vendor-editor-C6NiDIhH.js +176 -0
  165. package/dist/assets/vendor-query-Cn7TC_2z.js +9 -0
  166. package/dist/assets/vendor-r3f-CKsrCNAb.js +98 -0
  167. package/dist/assets/vendor-react-DGHjaq9o.js +28 -0
  168. package/dist/assets/vendor-three-DXQ-izGk.js +3827 -0
  169. package/dist/assets/vendor-ui-yncrCeEA.js +801 -0
  170. package/dist/assets/verilog-C6RDOZhf.js +1 -0
  171. package/dist/assets/vhdl-lSbBsy5d.js +1 -0
  172. package/dist/assets/webidl-ZXfAyPTL.js +1 -0
  173. package/dist/assets/xquery-DzFWVndE.js +1 -0
  174. package/dist/assets/xychartDiagram-PRI3JC2R-D7cecXuv.js +7 -0
  175. package/dist/assets/yacas-BJ4BC0dw.js +1 -0
  176. package/dist/assets/z80-Hz9HOZM7.js +1 -0
  177. package/dist/brands/opencode-logo-dark-square.svg +18 -0
  178. package/dist/brands/opencode-logo-light-square.svg +18 -0
  179. package/dist/favicon-16x16.png +0 -0
  180. package/dist/favicon-32x32.png +0 -0
  181. package/dist/favicon.ico +0 -0
  182. package/dist/favicon.svg +9 -0
  183. package/dist/index.html +55 -0
  184. package/dist/models/agent-figure.glb +0 -0
  185. package/dist/models/cars/1987_ferrari_f40.glb +0 -0
  186. package/dist/models/cars/1987_mazda_rx-7_fc.glb +0 -0
  187. package/dist/models/cars/1997_veilside_fortune_mazda_rx-7_fd_tokyo_drift.glb +0 -0
  188. package/dist/models/cars/2010_r_magic_fd_armor_mazda_rx-7_fd3s.glb +0 -0
  189. package/dist/models/cars/2023_lbsuper_silhouette_mazda_fd3s_rx-7.glb +0 -0
  190. package/dist/models/chair.glb +0 -0
  191. package/dist/models/filing-cabinet.glb +0 -0
  192. package/dist/models/logos/nike_logo.glb +0 -0
  193. package/dist/models/monitor.glb +0 -0
  194. package/dist/models/movie_sonic_sonic_rumble.glb +0 -0
  195. package/dist/models/office_chair (4).glb +0 -0
  196. package/dist/models/plant-hanging.glb +0 -0
  197. package/dist/models/plant-small.glb +0 -0
  198. package/dist/models/plant-tall.glb +0 -0
  199. package/dist/models/programmer_desktop_3d_pc.glb +0 -0
  200. package/dist/models/rhyzome_plant.glb +0 -0
  201. package/dist/models/server-rack.glb +0 -0
  202. package/dist/models/simple_bunk_bed.glb +0 -0
  203. package/dist/models/sofa.glb +0 -0
  204. package/dist/models/table-round.glb +0 -0
  205. package/dist/models/table.glb +0 -0
  206. package/dist/models/tree/mango_tree.glb +0 -0
  207. package/dist/models/whiteboard.glb +0 -0
  208. package/dist/site.webmanifest +30 -0
  209. package/dist/sw.js +42 -0
  210. package/dist/worktree-favicon-16x16.png +0 -0
  211. package/dist/worktree-favicon-32x32.png +0 -0
  212. package/dist/worktree-favicon.ico +0 -0
  213. package/dist/worktree-favicon.svg +9 -0
  214. package/package.json +22 -0
@@ -0,0 +1,176 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Ce_rFd0H.js","assets/vendor-react-DGHjaq9o.js","assets/vendor-query-Cn7TC_2z.js","assets/index-BZnHexpx.js","assets/index-D5wnSweq.js","assets/index-BiQcZBBL.js","assets/index-BSW5JwaH.js","assets/index-DbELJA96.js","assets/index-vmBmu2hn.js","assets/index-BpFmY7hp.js","assets/index-C8TA_OLZ.js","assets/index-B7hacZaa.js","assets/index-kLee7BdF.js","assets/index-1uTJjl8a.js","assets/index-CMWIT5Av.js","assets/index-Cq0h5Zql.js","assets/index-IzLA2Fcd.js","assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-DeIclll2.js","assets/javascript-iXu5QeM3.js","assets/index-CVMKjtie.js","assets/index-DRpI4zkj.js"])))=>i.map(i=>d[i]);
2
+ var E4=Object.defineProperty;var P4=(t,e,n)=>e in t?E4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var tr=(t,e,n)=>P4(t,typeof e!="symbol"?e+"":e,n);import{r as C,a as Bl,R as k,b as H2,c as A4,g as q2,d as cv}from"./vendor-react-DGHjaq9o.js";import{j as D}from"./vendor-query-Cn7TC_2z.js";const $4="modulepreload",Q4=function(t){return"/"+t},uv={},W=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let o=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=o(n.map(c=>{if(c=Q4(c),c in uv)return;uv[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":$4,u||(h.as="script"),h.crossOrigin="",h.href=c,a&&h.setAttribute("nonce",a),document.head.appendChild(h),u)return new Promise((d,p)=>{h.addEventListener("load",d),h.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return e().catch(s)})};function fv(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Y2(...t){return e=>{let n=!1;const r=t.map(i=>{const s=fv(i,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():fv(t[i],null)}}}}function gt(...t){return C.useCallback(Y2(...t),t)}function $o(t){const e=M4(t),n=C.forwardRef((r,i)=>{const{children:s,...o}=r,l=C.Children.toArray(s),a=l.find(L4);if(a){const c=a.props.children,u=l.map(f=>f===a?C.Children.count(c)>1?C.Children.only(null):C.isValidElement(c)?c.props.children:null:f);return D.jsx(e,{...o,ref:i,children:C.isValidElement(c)?C.cloneElement(c,void 0,u):null})}return D.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}var uae=$o("Slot");function M4(t){const e=C.forwardRef((n,r)=>{const{children:i,...s}=n;if(C.isValidElement(i)){const o=N4(i),l=I4(s,i.props);return i.type!==C.Fragment&&(l.ref=r?Y2(r,o):o),C.cloneElement(i,l)}return C.Children.count(i)>1?C.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var U2=Symbol("radix.slottable");function R4(t){const e=({children:n})=>D.jsx(D.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=U2,e}function L4(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===U2}function I4(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...l)=>{const a=s(...l);return i(...l),a}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function N4(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var D4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ze=D4.reduce((t,e)=>{const n=$o(`Primitive.${e}`),r=C.forwardRef((i,s)=>{const{asChild:o,...l}=i,a=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsx(a,{...l,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function V4(t,e){t&&Bl.flushSync(()=>t.dispatchEvent(e))}var G2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),F4="VisuallyHidden",K2=C.forwardRef((t,e)=>D.jsx(ze.span,{...t,ref:e,style:{...G2,...t.style}}));K2.displayName=F4;var B4=K2;function Z4(t,e){const n=C.createContext(e),r=s=>{const{children:o,...l}=s,a=C.useMemo(()=>l,Object.values(l));return D.jsx(n.Provider,{value:a,children:o})};r.displayName=t+"Provider";function i(s){const o=C.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[r,i]}function ls(t,e=[]){let n=[];function r(s,o){const l=C.createContext(o),a=n.length;n=[...n,o];const c=f=>{var x;const{scope:h,children:d,...p}=f,g=((x=h==null?void 0:h[t])==null?void 0:x[a])||l,O=C.useMemo(()=>p,Object.values(p));return D.jsx(g.Provider,{value:O,children:d})};c.displayName=s+"Provider";function u(f,h){var g;const d=((g=h==null?void 0:h[t])==null?void 0:g[a])||l,p=C.useContext(d);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(o=>C.createContext(o));return function(l){const a=(l==null?void 0:l[t])||s;return C.useMemo(()=>({[`__scope${t}`]:{...l,[t]:a}}),[l,a])}};return i.scopeName=t,[r,z4(i,...e)]}function z4(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((l,{useScope:a,scopeName:c})=>{const f=a(s)[`__scope${c}`];return{...l,...f}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function J2(t){const e=t+"CollectionProvider",[n,r]=ls(e),[i,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:O,children:x}=g,m=k.useRef(null),y=k.useRef(new Map).current;return D.jsx(i,{scope:O,itemMap:y,collectionRef:m,children:x})};o.displayName=e;const l=t+"CollectionSlot",a=$o(l),c=k.forwardRef((g,O)=>{const{scope:x,children:m}=g,y=s(l,x),b=gt(O,y.collectionRef);return D.jsx(a,{ref:b,children:m})});c.displayName=l;const u=t+"CollectionItemSlot",f="data-radix-collection-item",h=$o(u),d=k.forwardRef((g,O)=>{const{scope:x,children:m,...y}=g,b=k.useRef(null),S=gt(O,b),v=s(u,x);return k.useEffect(()=>(v.itemMap.set(b,{ref:b,...y}),()=>void v.itemMap.delete(b))),D.jsx(h,{[f]:"",ref:S,children:m})});d.displayName=u;function p(g){const O=s(t+"CollectionConsumer",g);return k.useCallback(()=>{const m=O.collectionRef.current;if(!m)return[];const y=Array.from(m.querySelectorAll(`[${f}]`));return Array.from(O.itemMap.values()).sort((v,w)=>y.indexOf(v.ref.current)-y.indexOf(w.ref.current))},[O.collectionRef,O.itemMap])}return[{Provider:o,Slot:c,ItemSlot:d},p,r]}function Ne(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}var fn=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},X4=H2[" useInsertionEffect ".trim().toString()]||fn;function Yi({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[i,s,o]=W4({defaultProp:e,onChange:n}),l=t!==void 0,a=l?t:i;{const u=C.useRef(t!==void 0);C.useEffect(()=>{const f=u.current;f!==l&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=l},[l,r])}const c=C.useCallback(u=>{var f;if(l){const h=j4(u)?u(t):u;h!==t&&((f=o.current)==null||f.call(o,h))}else s(u)},[l,t,s,o]);return[a,c]}function W4({defaultProp:t,onChange:e}){const[n,r]=C.useState(t),i=C.useRef(n),s=C.useRef(e);return X4(()=>{s.current=e},[e]),C.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function j4(t){return typeof t=="function"}function H4(t,e){return C.useReducer((n,r)=>e[n][r]??n,t)}var ro=t=>{const{present:e,children:n}=t,r=q4(e),i=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),s=gt(r.ref,Y4(i));return typeof n=="function"||r.isPresent?C.cloneElement(i,{ref:s}):null};ro.displayName="Presence";function q4(t){const[e,n]=C.useState(),r=C.useRef(null),i=C.useRef(t),s=C.useRef("none"),o=t?"mounted":"unmounted",[l,a]=H4(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=rf(r.current);s.current=l==="mounted"?c:"none"},[l]),fn(()=>{const c=r.current,u=i.current;if(u!==t){const h=s.current,d=rf(c);t?a("MOUNT"):d==="none"||(c==null?void 0:c.display)==="none"?a("UNMOUNT"):a(u&&h!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,a]),fn(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,f=d=>{const g=rf(r.current).includes(CSS.escape(d.animationName));if(d.target===e&&g&&(a("ANIMATION_END"),!i.current)){const O=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=O)})}},h=d=>{d.target===e&&(s.current=rf(r.current))};return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else a("ANIMATION_END")},[e,a]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:C.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function rf(t){return(t==null?void 0:t.animationName)||"none"}function Y4(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var U4=H2[" useId ".trim().toString()]||(()=>{}),G4=0;function Xi(t){const[e,n]=C.useState(U4());return fn(()=>{n(r=>r??String(G4++))},[t]),t||(e?`radix-${e}`:"")}var K4=C.createContext(void 0);function Yd(t){const e=C.useContext(K4);return t||e||"ltr"}function Vs(t){const e=C.useRef(t);return C.useEffect(()=>{e.current=t}),C.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function J4(t,e=globalThis==null?void 0:globalThis.document){const n=Vs(t);C.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var eL="DismissableLayer",tO="dismissableLayer.update",tL="dismissableLayer.pointerDownOutside",nL="dismissableLayer.focusOutside",hv,e5=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ku=C.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:l,...a}=t,c=C.useContext(e5),[u,f]=C.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=C.useState({}),p=gt(e,w=>f(w)),g=Array.from(c.layers),[O]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(O),m=u?g.indexOf(u):-1,y=c.layersWithOutsidePointerEventsDisabled.size>0,b=m>=x,S=sL(w=>{const _=w.target,T=[...c.branches].some(E=>E.contains(_));!b||T||(i==null||i(w),o==null||o(w),w.defaultPrevented||l==null||l())},h),v=oL(w=>{const _=w.target;[...c.branches].some(E=>E.contains(_))||(s==null||s(w),o==null||o(w),w.defaultPrevented||l==null||l())},h);return J4(w=>{m===c.layers.size-1&&(r==null||r(w),!w.defaultPrevented&&l&&(w.preventDefault(),l()))},h),C.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(hv=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),dv(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=hv)}},[u,h,n,c]),C.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),dv())},[u,c]),C.useEffect(()=>{const w=()=>d({});return document.addEventListener(tO,w),()=>document.removeEventListener(tO,w)},[]),D.jsx(ze.div,{...a,ref:p,style:{pointerEvents:y?b?"auto":"none":void 0,...t.style},onFocusCapture:Ne(t.onFocusCapture,v.onFocusCapture),onBlurCapture:Ne(t.onBlurCapture,v.onBlurCapture),onPointerDownCapture:Ne(t.onPointerDownCapture,S.onPointerDownCapture)})});ku.displayName=eL;var rL="DismissableLayerBranch",iL=C.forwardRef((t,e)=>{const n=C.useContext(e5),r=C.useRef(null),i=gt(e,r);return C.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),D.jsx(ze.div,{...t,ref:i})});iL.displayName=rL;function sL(t,e=globalThis==null?void 0:globalThis.document){const n=Vs(t),r=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let a=function(){t5(tL,n,c,{discrete:!0})};const c={originalEvent:l};l.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=a,e.addEventListener("click",i.current,{once:!0})):a()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function oL(t,e=globalThis==null?void 0:globalThis.document){const n=Vs(t),r=C.useRef(!1);return C.useEffect(()=>{const i=s=>{s.target&&!r.current&&t5(nL,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function dv(){const t=new CustomEvent(tO);document.dispatchEvent(t)}function t5(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?V4(i,s):i.dispatchEvent(s)}var ug="focusScope.autoFocusOnMount",fg="focusScope.autoFocusOnUnmount",pv={bubbles:!1,cancelable:!0},lL="FocusScope",Ud=C.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[l,a]=C.useState(null),c=Vs(i),u=Vs(s),f=C.useRef(null),h=gt(e,g=>a(g)),d=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let g=function(y){if(d.paused||!l)return;const b=y.target;l.contains(b)?f.current=b:ks(f.current,{select:!0})},O=function(y){if(d.paused||!l)return;const b=y.relatedTarget;b!==null&&(l.contains(b)||ks(f.current,{select:!0}))},x=function(y){if(document.activeElement===document.body)for(const S of y)S.removedNodes.length>0&&ks(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",O);const m=new MutationObserver(x);return l&&m.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",O),m.disconnect()}}},[r,l,d.paused]),C.useEffect(()=>{if(l){mv.add(d);const g=document.activeElement;if(!l.contains(g)){const x=new CustomEvent(ug,pv);l.addEventListener(ug,c),l.dispatchEvent(x),x.defaultPrevented||(aL(dL(n5(l)),{select:!0}),document.activeElement===g&&ks(l))}return()=>{l.removeEventListener(ug,c),setTimeout(()=>{const x=new CustomEvent(fg,pv);l.addEventListener(fg,u),l.dispatchEvent(x),x.defaultPrevented||ks(g??document.body,{select:!0}),l.removeEventListener(fg,u),mv.remove(d)},0)}}},[l,c,u,d]);const p=C.useCallback(g=>{if(!n&&!r||d.paused)return;const O=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(O&&x){const m=g.currentTarget,[y,b]=cL(m);y&&b?!g.shiftKey&&x===b?(g.preventDefault(),n&&ks(y,{select:!0})):g.shiftKey&&x===y&&(g.preventDefault(),n&&ks(b,{select:!0})):x===m&&g.preventDefault()}},[n,r,d.paused]);return D.jsx(ze.div,{tabIndex:-1,...o,ref:h,onKeyDown:p})});Ud.displayName=lL;function aL(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(ks(r,{select:e}),document.activeElement!==n)return}function cL(t){const e=n5(t),n=gv(e,t),r=gv(e.reverse(),t);return[n,r]}function n5(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function gv(t,e){for(const n of t)if(!uL(n,{upTo:e}))return n}function uL(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function fL(t){return t instanceof HTMLInputElement&&"select"in t}function ks(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&fL(t)&&e&&t.select()}}var mv=hL();function hL(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Ov(t,e),t.unshift(e)},remove(e){var n;t=Ov(t,e),(n=t[0])==null||n.resume()}}}function Ov(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function dL(t){return t.filter(e=>e.tagName!=="A")}var pL="Portal",Cu=C.forwardRef((t,e)=>{var l;const{container:n,...r}=t,[i,s]=C.useState(!1);fn(()=>s(!0),[]);const o=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?A4.createPortal(D.jsx(ze.div,{...r,ref:e}),o):null});Cu.displayName=pL;var hg=0;function L0(){C.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??xv()),document.body.insertAdjacentElement("beforeend",t[1]??xv()),hg++,()=>{hg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),hg--}},[])}function xv(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var rr=function(){return rr=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},rr.apply(this,arguments)};function r5(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function gL(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var th="right-scroll-bar-position",nh="width-before-scroll-bar",mL="with-scroll-bars-hidden",OL="--removed-body-scroll-bar-size";function dg(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function xL(t,e){var n=C.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var yL=typeof window<"u"?C.useLayoutEffect:C.useEffect,yv=new WeakMap;function bL(t,e){var n=xL(null,function(r){return t.forEach(function(i){return dg(i,r)})});return yL(function(){var r=yv.get(n);if(r){var i=new Set(r),s=new Set(t),o=n.current;i.forEach(function(l){s.has(l)||dg(l,null)}),s.forEach(function(l){i.has(l)||dg(l,o)})}yv.set(n,t)},[t]),n}function vL(t){return t}function SL(t,e){e===void 0&&(e=vL);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var o=e(s,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(s),o=n}var a=function(){var u=o;o=[],u.forEach(s)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return i}function wL(t){t===void 0&&(t={});var e=SL(null);return e.options=rr({async:!0,ssr:!1},t),e}var i5=function(t){var e=t.sideCar,n=r5(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return C.createElement(r,rr({},n))};i5.isSideCarExport=!0;function kL(t,e){return t.useMedium(e),i5}var s5=wL(),pg=function(){},Gd=C.forwardRef(function(t,e){var n=C.useRef(null),r=C.useState({onScrollCapture:pg,onWheelCapture:pg,onTouchMoveCapture:pg}),i=r[0],s=r[1],o=t.forwardProps,l=t.children,a=t.className,c=t.removeScrollBar,u=t.enabled,f=t.shards,h=t.sideCar,d=t.noRelative,p=t.noIsolation,g=t.inert,O=t.allowPinchZoom,x=t.as,m=x===void 0?"div":x,y=t.gapMode,b=r5(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,v=bL([n,e]),w=rr(rr({},b),i);return C.createElement(C.Fragment,null,u&&C.createElement(S,{sideCar:s5,removeScrollBar:c,shards:f,noRelative:d,noIsolation:p,inert:g,setCallbacks:s,allowPinchZoom:!!O,lockRef:n,gapMode:y}),o?C.cloneElement(C.Children.only(l),rr(rr({},w),{ref:v})):C.createElement(m,rr({},w,{className:a,ref:v}),l))});Gd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Gd.classNames={fullWidth:nh,zeroRight:th};var CL=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _L(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=CL();return e&&t.setAttribute("nonce",e),t}function TL(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function EL(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var PL=function(){var t=0,e=null;return{add:function(n){t==0&&(e=_L())&&(TL(e,n),EL(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},AL=function(){var t=PL();return function(e,n){C.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},o5=function(){var t=AL(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},$L={left:0,top:0,right:0,gap:0},gg=function(t){return parseInt(t||"",10)||0},QL=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[gg(n),gg(r),gg(i)]},ML=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return $L;var e=QL(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},RL=o5(),Cl="data-scroll-locked",LL=function(t,e,n,r){var i=t.left,s=t.top,o=t.right,l=t.gap;return n===void 0&&(n="margin"),`
3
+ .`.concat(mL,` {
4
+ overflow: hidden `).concat(r,`;
5
+ padding-right: `).concat(l,"px ").concat(r,`;
6
+ }
7
+ body[`).concat(Cl,`] {
8
+ overflow: hidden `).concat(r,`;
9
+ overscroll-behavior: contain;
10
+ `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
11
+ padding-left: `.concat(i,`px;
12
+ padding-top: `).concat(s,`px;
13
+ padding-right: `).concat(o,`px;
14
+ margin-left:0;
15
+ margin-top:0;
16
+ margin-right: `).concat(l,"px ").concat(r,`;
17
+ `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
18
+ }
19
+
20
+ .`).concat(th,` {
21
+ right: `).concat(l,"px ").concat(r,`;
22
+ }
23
+
24
+ .`).concat(nh,` {
25
+ margin-right: `).concat(l,"px ").concat(r,`;
26
+ }
27
+
28
+ .`).concat(th," .").concat(th,` {
29
+ right: 0 `).concat(r,`;
30
+ }
31
+
32
+ .`).concat(nh," .").concat(nh,` {
33
+ margin-right: 0 `).concat(r,`;
34
+ }
35
+
36
+ body[`).concat(Cl,`] {
37
+ `).concat(OL,": ").concat(l,`px;
38
+ }
39
+ `)},bv=function(){var t=parseInt(document.body.getAttribute(Cl)||"0",10);return isFinite(t)?t:0},IL=function(){C.useEffect(function(){return document.body.setAttribute(Cl,(bv()+1).toString()),function(){var t=bv()-1;t<=0?document.body.removeAttribute(Cl):document.body.setAttribute(Cl,t.toString())}},[])},NL=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;IL();var s=C.useMemo(function(){return ML(i)},[i]);return C.createElement(RL,{styles:LL(s,!e,i,n?"":"!important")})},nO=!1;if(typeof window<"u")try{var sf=Object.defineProperty({},"passive",{get:function(){return nO=!0,!0}});window.addEventListener("test",sf,sf),window.removeEventListener("test",sf,sf)}catch{nO=!1}var ol=nO?{passive:!1}:!1,DL=function(t){return t.tagName==="TEXTAREA"},l5=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!DL(t)&&n[e]==="visible")},VL=function(t){return l5(t,"overflowY")},FL=function(t){return l5(t,"overflowX")},vv=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=a5(t,r);if(i){var s=c5(t,r),o=s[1],l=s[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},BL=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},ZL=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},a5=function(t,e){return t==="v"?VL(e):FL(e)},c5=function(t,e){return t==="v"?BL(e):ZL(e)},zL=function(t,e){return t==="h"&&e==="rtl"?-1:1},XL=function(t,e,n,r,i){var s=zL(t,window.getComputedStyle(e).direction),o=s*r,l=n.target,a=e.contains(l),c=!1,u=o>0,f=0,h=0;do{if(!l)break;var d=c5(t,l),p=d[0],g=d[1],O=d[2],x=g-O-s*p;(p||x)&&a5(t,l)&&(f+=x,h+=p);var m=l.parentNode;l=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!a&&l!==document.body||a&&(e.contains(l)||e===l));return(u&&Math.abs(f)<1||!u&&Math.abs(h)<1)&&(c=!0),c},of=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Sv=function(t){return[t.deltaX,t.deltaY]},wv=function(t){return t&&"current"in t?t.current:t},WL=function(t,e){return t[0]===e[0]&&t[1]===e[1]},jL=function(t){return`
40
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
41
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
42
+ `)},HL=0,ll=[];function qL(t){var e=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(HL++)[0],s=C.useState(o5)[0],o=C.useRef(t);C.useEffect(function(){o.current=t},[t]),C.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var g=gL([t.lockRef.current],(t.shards||[]).map(wv),!0).filter(Boolean);return g.forEach(function(O){return O.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(O){return O.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var l=C.useCallback(function(g,O){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var x=of(g),m=n.current,y="deltaX"in g?g.deltaX:m[0]-x[0],b="deltaY"in g?g.deltaY:m[1]-x[1],S,v=g.target,w=Math.abs(y)>Math.abs(b)?"h":"v";if("touches"in g&&w==="h"&&v.type==="range")return!1;var _=window.getSelection(),T=_&&_.anchorNode,E=T?T===v||T.contains(v):!1;if(E)return!1;var L=vv(w,v);if(!L)return!0;if(L?S=w:(S=w==="v"?"h":"v",L=vv(w,v)),!L)return!1;if(!r.current&&"changedTouches"in g&&(y||b)&&(r.current=S),!S)return!0;var M=r.current||S;return XL(M,O,g,M==="h"?y:b)},[]),a=C.useCallback(function(g){var O=g;if(!(!ll.length||ll[ll.length-1]!==s)){var x="deltaY"in O?Sv(O):of(O),m=e.current.filter(function(S){return S.name===O.type&&(S.target===O.target||O.target===S.shadowParent)&&WL(S.delta,x)})[0];if(m&&m.should){O.cancelable&&O.preventDefault();return}if(!m){var y=(o.current.shards||[]).map(wv).filter(Boolean).filter(function(S){return S.contains(O.target)}),b=y.length>0?l(O,y[0]):!o.current.noIsolation;b&&O.cancelable&&O.preventDefault()}}},[]),c=C.useCallback(function(g,O,x,m){var y={name:g,delta:O,target:x,should:m,shadowParent:YL(x)};e.current.push(y),setTimeout(function(){e.current=e.current.filter(function(b){return b!==y})},1)},[]),u=C.useCallback(function(g){n.current=of(g),r.current=void 0},[]),f=C.useCallback(function(g){c(g.type,Sv(g),g.target,l(g,t.lockRef.current))},[]),h=C.useCallback(function(g){c(g.type,of(g),g.target,l(g,t.lockRef.current))},[]);C.useEffect(function(){return ll.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",a,ol),document.addEventListener("touchmove",a,ol),document.addEventListener("touchstart",u,ol),function(){ll=ll.filter(function(g){return g!==s}),document.removeEventListener("wheel",a,ol),document.removeEventListener("touchmove",a,ol),document.removeEventListener("touchstart",u,ol)}},[]);var d=t.removeScrollBar,p=t.inert;return C.createElement(C.Fragment,null,p?C.createElement(s,{styles:jL(i)}):null,d?C.createElement(NL,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function YL(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const UL=kL(s5,qL);var Kd=C.forwardRef(function(t,e){return C.createElement(Gd,rr({},t,{ref:e,sideCar:UL}))});Kd.classNames=Gd.classNames;var GL=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},al=new WeakMap,lf=new WeakMap,af={},mg=0,u5=function(t){return t&&(t.host||u5(t.parentNode))},KL=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=u5(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},JL=function(t,e,n,r){var i=KL(e,Array.isArray(t)?t:[t]);af[n]||(af[n]=new WeakMap);var s=af[n],o=[],l=new Set,a=new Set(i),c=function(f){!f||l.has(f)||(l.add(f),c(f.parentNode))};i.forEach(c);var u=function(f){!f||a.has(f)||Array.prototype.forEach.call(f.children,function(h){if(l.has(h))u(h);else try{var d=h.getAttribute(r),p=d!==null&&d!=="false",g=(al.get(h)||0)+1,O=(s.get(h)||0)+1;al.set(h,g),s.set(h,O),o.push(h),g===1&&p&&lf.set(h,!0),O===1&&h.setAttribute(n,"true"),p||h.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return u(e),l.clear(),mg++,function(){o.forEach(function(f){var h=al.get(f)-1,d=s.get(f)-1;al.set(f,h),s.set(f,d),h||(lf.has(f)||f.removeAttribute(r),lf.delete(f)),d||f.removeAttribute(n)}),mg--,mg||(al=new WeakMap,al=new WeakMap,lf=new WeakMap,af={})}},I0=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=GL(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),JL(r,i,n,"aria-hidden")):function(){return null}},Jd="Dialog",[f5]=ls(Jd),[eI,Vr]=f5(Jd),h5=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,l=C.useRef(null),a=C.useRef(null),[c,u]=Yi({prop:r,defaultProp:i??!1,onChange:s,caller:Jd});return D.jsx(eI,{scope:e,triggerRef:l,contentRef:a,contentId:Xi(),titleId:Xi(),descriptionId:Xi(),open:c,onOpenChange:u,onOpenToggle:C.useCallback(()=>u(f=>!f),[u]),modal:o,children:n})};h5.displayName=Jd;var d5="DialogTrigger",p5=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Vr(d5,n),s=gt(e,i.triggerRef);return D.jsx(ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":V0(i.open),...r,ref:s,onClick:Ne(t.onClick,i.onOpenToggle)})});p5.displayName=d5;var N0="DialogPortal",[tI,g5]=f5(N0,{forceMount:void 0}),m5=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,s=Vr(N0,e);return D.jsx(tI,{scope:e,forceMount:n,children:C.Children.map(r,o=>D.jsx(ro,{present:n||s.open,children:D.jsx(Cu,{asChild:!0,container:i,children:o})}))})};m5.displayName=N0;var Ph="DialogOverlay",O5=C.forwardRef((t,e)=>{const n=g5(Ph,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=Vr(Ph,t.__scopeDialog);return s.modal?D.jsx(ro,{present:r||s.open,children:D.jsx(rI,{...i,ref:e})}):null});O5.displayName=Ph;var nI=$o("DialogOverlay.RemoveScroll"),rI=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Vr(Ph,n);return D.jsx(Kd,{as:nI,allowPinchZoom:!0,shards:[i.contentRef],children:D.jsx(ze.div,{"data-state":V0(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Qo="DialogContent",x5=C.forwardRef((t,e)=>{const n=g5(Qo,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=Vr(Qo,t.__scopeDialog);return D.jsx(ro,{present:r||s.open,children:s.modal?D.jsx(iI,{...i,ref:e}):D.jsx(sI,{...i,ref:e})})});x5.displayName=Qo;var iI=C.forwardRef((t,e)=>{const n=Vr(Qo,t.__scopeDialog),r=C.useRef(null),i=gt(e,n.contentRef,r);return C.useEffect(()=>{const s=r.current;if(s)return I0(s)},[]),D.jsx(y5,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Ne(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&s.preventDefault()}),onFocusOutside:Ne(t.onFocusOutside,s=>s.preventDefault())})}),sI=C.forwardRef((t,e)=>{const n=Vr(Qo,t.__scopeDialog),r=C.useRef(!1),i=C.useRef(!1);return D.jsx(y5,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,l;(o=t.onCloseAutoFocus)==null||o.call(t,s),s.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var a,c;(a=t.onInteractOutside)==null||a.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),y5=C.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,l=Vr(Qo,n),a=C.useRef(null),c=gt(e,a);return L0(),D.jsxs(D.Fragment,{children:[D.jsx(Ud,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:D.jsx(ku,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":V0(l.open),...o,ref:c,onDismiss:()=>l.onOpenChange(!1)})}),D.jsxs(D.Fragment,{children:[D.jsx(oI,{titleId:l.titleId}),D.jsx(aI,{contentRef:a,descriptionId:l.descriptionId})]})]})}),D0="DialogTitle",b5=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Vr(D0,n);return D.jsx(ze.h2,{id:i.titleId,...r,ref:e})});b5.displayName=D0;var v5="DialogDescription",S5=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Vr(v5,n);return D.jsx(ze.p,{id:i.descriptionId,...r,ref:e})});S5.displayName=v5;var w5="DialogClose",k5=C.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Vr(w5,n);return D.jsx(ze.button,{type:"button",...r,ref:e,onClick:Ne(t.onClick,()=>i.onOpenChange(!1))})});k5.displayName=w5;function V0(t){return t?"open":"closed"}var C5="DialogTitleWarning",[fae,_5]=Z4(C5,{contentName:Qo,titleName:D0,docsSlug:"dialog"}),oI=({titleId:t})=>{const e=_5(C5),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
43
+
44
+ If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
45
+
46
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return C.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},lI="DialogDescriptionWarning",aI=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_5(lI).contentName}}.`;return C.useEffect(()=>{var s;const i=(s=t.current)==null?void 0:s.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},cI=h5,hae=p5,uI=m5,fI=O5,hI=x5,dI=b5,dae=S5,pI=k5;function gI(t){const e=C.useRef({value:t,previous:t});return C.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function mI(t){const[e,n]=C.useState(void 0);return fn(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,l;if("borderBoxSize"in s){const a=s.borderBoxSize,c=Array.isArray(a)?a[0]:a;o=c.inlineSize,l=c.blockSize}else o=t.offsetWidth,l=t.offsetHeight;n({width:o,height:l})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}const OI=["top","right","bottom","left"],Fs=Math.min,Xn=Math.max,Ah=Math.round,cf=Math.floor,ai=t=>({x:t,y:t}),xI={left:"right",right:"left",bottom:"top",top:"bottom"},yI={start:"end",end:"start"};function rO(t,e,n){return Xn(t,Fs(e,n))}function Ui(t,e){return typeof t=="function"?t(e):t}function Gi(t){return t.split("-")[0]}function ha(t){return t.split("-")[1]}function F0(t){return t==="x"?"y":"x"}function B0(t){return t==="y"?"height":"width"}const bI=new Set(["top","bottom"]);function ni(t){return bI.has(Gi(t))?"y":"x"}function Z0(t){return F0(ni(t))}function vI(t,e,n){n===void 0&&(n=!1);const r=ha(t),i=Z0(t),s=B0(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=$h(o)),[o,$h(o)]}function SI(t){const e=$h(t);return[iO(t),e,iO(e)]}function iO(t){return t.replace(/start|end/g,e=>yI[e])}const kv=["left","right"],Cv=["right","left"],wI=["top","bottom"],kI=["bottom","top"];function CI(t,e,n){switch(t){case"top":case"bottom":return n?e?Cv:kv:e?kv:Cv;case"left":case"right":return e?wI:kI;default:return[]}}function _I(t,e,n,r){const i=ha(t);let s=CI(Gi(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(iO)))),s}function $h(t){return t.replace(/left|right|bottom|top/g,e=>xI[e])}function TI(t){return{top:0,right:0,bottom:0,left:0,...t}}function T5(t){return typeof t!="number"?TI(t):{top:t,right:t,bottom:t,left:t}}function Qh(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function _v(t,e,n){let{reference:r,floating:i}=t;const s=ni(e),o=Z0(e),l=B0(o),a=Gi(e),c=s==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[l]/2-i[l]/2;let d;switch(a){case"top":d={x:u,y:r.y-i.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(ha(e)){case"start":d[o]-=h*(n&&c?-1:1);break;case"end":d[o]+=h*(n&&c?-1:1);break}return d}async function EI(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=Ui(e,t),p=T5(d),O=l[h?f==="floating"?"reference":"floating":f],x=Qh(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(O)))==null||n?O:O.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),m=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),b=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},S=Qh(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:y,strategy:a}):m);return{top:(x.top-S.top+p.top)/b.y,bottom:(S.bottom-x.bottom+p.bottom)/b.y,left:(x.left-S.left+p.left)/b.x,right:(S.right-x.right+p.right)/b.x}}const PI=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,l=s.filter(Boolean),a=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=_v(c,r,a),h=r,d={},p=0;for(let O=0;O<l.length;O++){var g;const{name:x,fn:m}=l[O],{x:y,y:b,data:S,reset:v}=await m({x:u,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:d,rects:c,platform:{...o,detectOverflow:(g=o.detectOverflow)!=null?g:EI},elements:{reference:t,floating:e}});u=y??u,f=b??f,d={...d,[x]:{...d[x],...S}},v&&p<=50&&(p++,typeof v=="object"&&(v.placement&&(h=v.placement),v.rects&&(c=v.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:u,y:f}=_v(c,h,a)),O=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:d}},AI=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:l,middlewareData:a}=e,{element:c,padding:u=0}=Ui(t,e)||{};if(c==null)return{};const f=T5(u),h={x:n,y:r},d=Z0(i),p=B0(d),g=await o.getDimensions(c),O=d==="y",x=O?"top":"left",m=O?"bottom":"right",y=O?"clientHeight":"clientWidth",b=s.reference[p]+s.reference[d]-h[d]-s.floating[p],S=h[d]-s.reference[d],v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let w=v?v[y]:0;(!w||!await(o.isElement==null?void 0:o.isElement(v)))&&(w=l.floating[y]||s.floating[p]);const _=b/2-S/2,T=w/2-g[p]/2-1,E=Fs(f[x],T),L=Fs(f[m],T),M=E,$=w-g[p]-L,V=w/2-g[p]/2+_,Z=rO(M,V,$),Y=!a.arrow&&ha(i)!=null&&V!==Z&&s.reference[p]/2-(V<M?E:L)-g[p]/2<0,j=Y?V<M?V-M:V-$:0;return{[d]:h[d]+j,data:{[d]:Z,centerOffset:V-Z-j,...Y&&{alignmentOffset:j}},reset:Y}}}),$I=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...O}=Ui(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Gi(i),m=ni(l),y=Gi(l)===l,b=await(a.isRTL==null?void 0:a.isRTL(c.floating)),S=h||(y||!g?[$h(l)]:SI(l)),v=p!=="none";!h&&v&&S.push(..._I(l,g,p,b));const w=[l,...S],_=await a.detectOverflow(e,O),T=[];let E=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&T.push(_[x]),f){const V=vI(i,o,b);T.push(_[V[0]],_[V[1]])}if(E=[...E,{placement:i,overflows:T}],!T.every(V=>V<=0)){var L,M;const V=(((L=s.flip)==null?void 0:L.index)||0)+1,Z=w[V];if(Z&&(!(f==="alignment"?m!==ni(Z):!1)||E.every(U=>ni(U.placement)===m?U.overflows[0]>0:!0)))return{data:{index:V,overflows:E},reset:{placement:Z}};let Y=(M=E.filter(j=>j.overflows[0]<=0).sort((j,U)=>j.overflows[1]-U.overflows[1])[0])==null?void 0:M.placement;if(!Y)switch(d){case"bestFit":{var $;const j=($=E.filter(U=>{if(v){const se=ni(U.placement);return se===m||se==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(se=>se>0).reduce((se,Q)=>se+Q,0)]).sort((U,se)=>U[1]-se[1])[0])==null?void 0:$[0];j&&(Y=j);break}case"initialPlacement":Y=l;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}};function Tv(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ev(t){return OI.some(e=>t[e]>=0)}const QI=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:i="referenceHidden",...s}=Ui(t,e);switch(i){case"referenceHidden":{const o=await r.detectOverflow(e,{...s,elementContext:"reference"}),l=Tv(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Ev(l)}}}case"escaped":{const o=await r.detectOverflow(e,{...s,altBoundary:!0}),l=Tv(o,n.floating);return{data:{escapedOffsets:l,escaped:Ev(l)}}}default:return{}}}}},E5=new Set(["left","top"]);async function MI(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Gi(n),l=ha(n),a=ni(n)==="y",c=E5.has(o)?-1:1,u=s&&a?-1:1,f=Ui(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof p=="number"&&(d=l==="end"?p*-1:p),a?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const RI=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:l}=e,a=await MI(e,t);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:o}}}}},LI=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i,platform:s}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:a={fn:x=>{let{x:m,y}=x;return{x:m,y}}},...c}=Ui(t,e),u={x:n,y:r},f=await s.detectOverflow(e,c),h=ni(Gi(i)),d=F0(h);let p=u[d],g=u[h];if(o){const x=d==="y"?"top":"left",m=d==="y"?"bottom":"right",y=p+f[x],b=p-f[m];p=rO(y,p,b)}if(l){const x=h==="y"?"top":"left",m=h==="y"?"bottom":"right",y=g+f[x],b=g-f[m];g=rO(y,g,b)}const O=a.fn({...e,[d]:p,[h]:g});return{...O,data:{x:O.x-n,y:O.y-r,enabled:{[d]:o,[h]:l}}}}}},II=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:l=0,mainAxis:a=!0,crossAxis:c=!0}=Ui(t,e),u={x:n,y:r},f=ni(i),h=F0(f);let d=u[h],p=u[f];const g=Ui(l,e),O=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){const y=h==="y"?"height":"width",b=s.reference[h]-s.floating[y]+O.mainAxis,S=s.reference[h]+s.reference[y]-O.mainAxis;d<b?d=b:d>S&&(d=S)}if(c){var x,m;const y=h==="y"?"width":"height",b=E5.has(Gi(i)),S=s.reference[f]-s.floating[y]+(b&&((x=o.offset)==null?void 0:x[f])||0)+(b?0:O.crossAxis),v=s.reference[f]+s.reference[y]+(b?0:((m=o.offset)==null?void 0:m[f])||0)-(b?O.crossAxis:0);p<S?p=S:p>v&&(p=v)}return{[h]:d,[f]:p}}}},NI=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:l}=e,{apply:a=()=>{},...c}=Ui(t,e),u=await o.detectOverflow(e,c),f=Gi(i),h=ha(i),d=ni(i)==="y",{width:p,height:g}=s.floating;let O,x;f==="top"||f==="bottom"?(O=f,x=h===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(x=f,O=h==="end"?"top":"bottom");const m=g-u.top-u.bottom,y=p-u.left-u.right,b=Fs(g-u[O],m),S=Fs(p-u[x],y),v=!e.middlewareData.shift;let w=b,_=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(_=y),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(w=m),v&&!h){const E=Xn(u.left,0),L=Xn(u.right,0),M=Xn(u.top,0),$=Xn(u.bottom,0);d?_=p-2*(E!==0||L!==0?E+L:Xn(u.left,u.right)):w=g-2*(M!==0||$!==0?M+$:Xn(u.top,u.bottom))}await a({...e,availableWidth:_,availableHeight:w});const T=await o.getDimensions(l.floating);return p!==T.width||g!==T.height?{reset:{rects:!0}}:{}}}};function ep(){return typeof window<"u"}function da(t){return P5(t)?(t.nodeName||"").toLowerCase():"#document"}function Kn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Oi(t){var e;return(e=(P5(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function P5(t){return ep()?t instanceof Node||t instanceof Kn(t).Node:!1}function Qr(t){return ep()?t instanceof Element||t instanceof Kn(t).Element:!1}function fi(t){return ep()?t instanceof HTMLElement||t instanceof Kn(t).HTMLElement:!1}function Pv(t){return!ep()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Kn(t).ShadowRoot}const DI=new Set(["inline","contents"]);function _u(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Mr(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!DI.has(i)}const VI=new Set(["table","td","th"]);function FI(t){return VI.has(da(t))}const BI=[":popover-open",":modal"];function tp(t){return BI.some(e=>{try{return t.matches(e)}catch{return!1}})}const ZI=["transform","translate","scale","rotate","perspective"],zI=["transform","translate","scale","rotate","perspective","filter"],XI=["paint","layout","strict","content"];function z0(t){const e=X0(),n=Qr(t)?Mr(t):t;return ZI.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||zI.some(r=>(n.willChange||"").includes(r))||XI.some(r=>(n.contain||"").includes(r))}function WI(t){let e=Bs(t);for(;fi(e)&&!Zl(e);){if(z0(e))return e;if(tp(e))return null;e=Bs(e)}return null}function X0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const jI=new Set(["html","body","#document"]);function Zl(t){return jI.has(da(t))}function Mr(t){return Kn(t).getComputedStyle(t)}function np(t){return Qr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Bs(t){if(da(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Pv(t)&&t.host||Oi(t);return Pv(e)?e.host:e}function A5(t){const e=Bs(t);return Zl(e)?t.ownerDocument?t.ownerDocument.body:t.body:fi(e)&&_u(e)?e:A5(e)}function Mc(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=A5(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=Kn(i);if(s){const l=sO(o);return e.concat(o,o.visualViewport||[],_u(i)?i:[],l&&n?Mc(l):[])}return e.concat(i,Mc(i,[],n))}function sO(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function $5(t){const e=Mr(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=fi(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,l=Ah(n)!==s||Ah(r)!==o;return l&&(n=s,r=o),{width:n,height:r,$:l}}function W0(t){return Qr(t)?t:t.contextElement}function _l(t){const e=W0(t);if(!fi(e))return ai(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=$5(e);let o=(s?Ah(n.width):n.width)/r,l=(s?Ah(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const HI=ai(0);function Q5(t){const e=Kn(t);return!X0()||!e.visualViewport?HI:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function qI(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Kn(t)?!1:e}function Mo(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=W0(t);let o=ai(1);e&&(r?Qr(r)&&(o=_l(r)):o=_l(t));const l=qI(s,n,r)?Q5(s):ai(0);let a=(i.left+l.x)/o.x,c=(i.top+l.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const h=Kn(s),d=r&&Qr(r)?Kn(r):r;let p=h,g=sO(p);for(;g&&r&&d!==p;){const O=_l(g),x=g.getBoundingClientRect(),m=Mr(g),y=x.left+(g.clientLeft+parseFloat(m.paddingLeft))*O.x,b=x.top+(g.clientTop+parseFloat(m.paddingTop))*O.y;a*=O.x,c*=O.y,u*=O.x,f*=O.y,a+=y,c+=b,p=Kn(g),g=sO(p)}}return Qh({width:u,height:f,x:a,y:c})}function rp(t,e){const n=np(t).scrollLeft;return e?e.left+n:Mo(Oi(t)).left+n}function M5(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-rp(t,n),i=n.top+e.scrollTop;return{x:r,y:i}}function YI(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=Oi(r),l=e?tp(e.floating):!1;if(r===o||l&&s)return n;let a={scrollLeft:0,scrollTop:0},c=ai(1);const u=ai(0),f=fi(r);if((f||!f&&!s)&&((da(r)!=="body"||_u(o))&&(a=np(r)),fi(r))){const d=Mo(r);c=_l(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}const h=o&&!f&&!s?M5(o,a):ai(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-a.scrollTop*c.y+u.y+h.y}}function UI(t){return Array.from(t.getClientRects())}function GI(t){const e=Oi(t),n=np(t),r=t.ownerDocument.body,i=Xn(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Xn(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+rp(t);const l=-n.scrollTop;return Mr(r).direction==="rtl"&&(o+=Xn(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:l}}const Av=25;function KI(t,e){const n=Kn(t),r=Oi(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,l=0,a=0;if(i){s=i.width,o=i.height;const u=X0();(!u||u&&e==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}const c=rp(r);if(c<=0){const u=r.ownerDocument,f=u.body,h=getComputedStyle(f),d=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(r.clientWidth-f.clientWidth-d);p<=Av&&(s-=p)}else c<=Av&&(s+=c);return{width:s,height:o,x:l,y:a}}const JI=new Set(["absolute","fixed"]);function e8(t,e){const n=Mo(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=fi(t)?_l(t):ai(1),o=t.clientWidth*s.x,l=t.clientHeight*s.y,a=i*s.x,c=r*s.y;return{width:o,height:l,x:a,y:c}}function $v(t,e,n){let r;if(e==="viewport")r=KI(t,n);else if(e==="document")r=GI(Oi(t));else if(Qr(e))r=e8(e,n);else{const i=Q5(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Qh(r)}function R5(t,e){const n=Bs(t);return n===e||!Qr(n)||Zl(n)?!1:Mr(n).position==="fixed"||R5(n,e)}function t8(t,e){const n=e.get(t);if(n)return n;let r=Mc(t,[],!1).filter(l=>Qr(l)&&da(l)!=="body"),i=null;const s=Mr(t).position==="fixed";let o=s?Bs(t):t;for(;Qr(o)&&!Zl(o);){const l=Mr(o),a=z0(o);!a&&l.position==="fixed"&&(i=null),(s?!a&&!i:!a&&l.position==="static"&&!!i&&JI.has(i.position)||_u(o)&&!a&&R5(t,o))?r=r.filter(u=>u!==o):i=l,o=Bs(o)}return e.set(t,r),r}function n8(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?tp(e)?[]:t8(e,this._c):[].concat(n),r],l=o[0],a=o.reduce((c,u)=>{const f=$v(e,u,i);return c.top=Xn(f.top,c.top),c.right=Fs(f.right,c.right),c.bottom=Fs(f.bottom,c.bottom),c.left=Xn(f.left,c.left),c},$v(e,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function r8(t){const{width:e,height:n}=$5(t);return{width:e,height:n}}function i8(t,e,n){const r=fi(e),i=Oi(e),s=n==="fixed",o=Mo(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const a=ai(0);function c(){a.x=rp(i)}if(r||!r&&!s)if((da(e)!=="body"||_u(i))&&(l=np(e)),r){const d=Mo(e,!0,s,e);a.x=d.x+e.clientLeft,a.y=d.y+e.clientTop}else i&&c();s&&!r&&i&&c();const u=i&&!r&&!s?M5(i,l):ai(0),f=o.left+l.scrollLeft-a.x-u.x,h=o.top+l.scrollTop-a.y-u.y;return{x:f,y:h,width:o.width,height:o.height}}function Og(t){return Mr(t).position==="static"}function Qv(t,e){if(!fi(t)||Mr(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Oi(t)===n&&(n=n.ownerDocument.body),n}function L5(t,e){const n=Kn(t);if(tp(t))return n;if(!fi(t)){let i=Bs(t);for(;i&&!Zl(i);){if(Qr(i)&&!Og(i))return i;i=Bs(i)}return n}let r=Qv(t,e);for(;r&&FI(r)&&Og(r);)r=Qv(r,e);return r&&Zl(r)&&Og(r)&&!z0(r)?n:r||WI(t)||n}const s8=async function(t){const e=this.getOffsetParent||L5,n=this.getDimensions,r=await n(t.floating);return{reference:i8(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function o8(t){return Mr(t).direction==="rtl"}const l8={convertOffsetParentRelativeRectToViewportRelativeRect:YI,getDocumentElement:Oi,getClippingRect:n8,getOffsetParent:L5,getElementRects:s8,getClientRects:UI,getDimensions:r8,getScale:_l,isElement:Qr,isRTL:o8};function I5(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function a8(t,e){let n=null,r;const i=Oi(t);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),s();const c=t.getBoundingClientRect(),{left:u,top:f,width:h,height:d}=c;if(l||e(),!h||!d)return;const p=cf(f),g=cf(i.clientWidth-(u+h)),O=cf(i.clientHeight-(f+d)),x=cf(u),y={rootMargin:-p+"px "+-g+"px "+-O+"px "+-x+"px",threshold:Xn(0,Fs(1,a))||1};let b=!0;function S(v){const w=v[0].intersectionRatio;if(w!==a){if(!b)return o();w?o(!1,w):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w===1&&!I5(c,t.getBoundingClientRect())&&o(),b=!1}try{n=new IntersectionObserver(S,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(t)}return o(!0),s}function c8(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,c=W0(t),u=i||s?[...c?Mc(c):[],...Mc(e)]:[];u.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=c&&l?a8(c,n):null;let h=-1,d=null;o&&(d=new ResizeObserver(x=>{let[m]=x;m&&m.target===c&&d&&(d.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=d)==null||y.observe(e)})),n()}),c&&!a&&d.observe(c),d.observe(e));let p,g=a?Mo(t):null;a&&O();function O(){const x=Mo(t);g&&!I5(g,x)&&n(),g=x,p=requestAnimationFrame(O)}return n(),()=>{var x;u.forEach(m=>{i&&m.removeEventListener("scroll",n),s&&m.removeEventListener("resize",n)}),f==null||f(),(x=d)==null||x.disconnect(),d=null,a&&cancelAnimationFrame(p)}}const u8=RI,f8=LI,h8=$I,d8=NI,p8=QI,Mv=AI,g8=II,m8=(t,e,n)=>{const r=new Map,i={platform:l8,...n},s={...i.platform,_c:r};return PI(t,e,{...i,platform:s})};var O8=typeof document<"u",x8=function(){},rh=O8?C.useLayoutEffect:x8;function Mh(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Mh(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!Mh(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function N5(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Rv(t,e){const n=N5(t);return Math.round(e*n)/n}function xg(t){const e=C.useRef(t);return rh(()=>{e.current=t}),e}function y8(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:l=!0,whileElementsMounted:a,open:c}=t,[u,f]=C.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,d]=C.useState(r);Mh(h,r)||d(r);const[p,g]=C.useState(null),[O,x]=C.useState(null),m=C.useCallback(U=>{U!==v.current&&(v.current=U,g(U))},[]),y=C.useCallback(U=>{U!==w.current&&(w.current=U,x(U))},[]),b=s||p,S=o||O,v=C.useRef(null),w=C.useRef(null),_=C.useRef(u),T=a!=null,E=xg(a),L=xg(i),M=xg(c),$=C.useCallback(()=>{if(!v.current||!w.current)return;const U={placement:e,strategy:n,middleware:h};L.current&&(U.platform=L.current),m8(v.current,w.current,U).then(se=>{const Q={...se,isPositioned:M.current!==!1};V.current&&!Mh(_.current,Q)&&(_.current=Q,Bl.flushSync(()=>{f(Q)}))})},[h,e,n,L,M]);rh(()=>{c===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[c]);const V=C.useRef(!1);rh(()=>(V.current=!0,()=>{V.current=!1}),[]),rh(()=>{if(b&&(v.current=b),S&&(w.current=S),b&&S){if(E.current)return E.current(b,S,$);$()}},[b,S,$,E,T]);const Z=C.useMemo(()=>({reference:v,floating:w,setReference:m,setFloating:y}),[m,y]),Y=C.useMemo(()=>({reference:b,floating:S}),[b,S]),j=C.useMemo(()=>{const U={position:n,left:0,top:0};if(!Y.floating)return U;const se=Rv(Y.floating,u.x),Q=Rv(Y.floating,u.y);return l?{...U,transform:"translate("+se+"px, "+Q+"px)",...N5(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:se,top:Q}},[n,l,Y.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:$,refs:Z,elements:Y,floatingStyles:j}),[u,$,Z,Y,j])}const b8=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Mv({element:r.current,padding:i}).fn(n):{}:r?Mv({element:r,padding:i}).fn(n):{}}}},v8=(t,e)=>({...u8(t),options:[t,e]}),S8=(t,e)=>({...f8(t),options:[t,e]}),w8=(t,e)=>({...g8(t),options:[t,e]}),k8=(t,e)=>({...h8(t),options:[t,e]}),C8=(t,e)=>({...d8(t),options:[t,e]}),_8=(t,e)=>({...p8(t),options:[t,e]}),T8=(t,e)=>({...b8(t),options:[t,e]});var E8="Arrow",D5=C.forwardRef((t,e)=>{const{children:n,width:r=10,height:i=5,...s}=t;return D.jsx(ze.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:D.jsx("polygon",{points:"0,0 30,0 15,10"})})});D5.displayName=E8;var P8=D5,j0="Popper",[V5,pa]=ls(j0),[A8,F5]=V5(j0),B5=t=>{const{__scopePopper:e,children:n}=t,[r,i]=C.useState(null);return D.jsx(A8,{scope:e,anchor:r,onAnchorChange:i,children:n})};B5.displayName=j0;var Z5="PopperAnchor",z5=C.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,s=F5(Z5,n),o=C.useRef(null),l=gt(e,o),a=C.useRef(null);return C.useEffect(()=>{const c=a.current;a.current=(r==null?void 0:r.current)||o.current,c!==a.current&&s.onAnchorChange(a.current)}),r?null:D.jsx(ze.div,{...i,ref:l})});z5.displayName=Z5;var H0="PopperContent",[$8,Q8]=V5(H0),X5=C.forwardRef((t,e)=>{var K,ne,ae,fe,ve,Me;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:a=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:d="optimized",onPlaced:p,...g}=t,O=F5(H0,n),[x,m]=C.useState(null),y=gt(e,qe=>m(qe)),[b,S]=C.useState(null),v=mI(b),w=(v==null?void 0:v.width)??0,_=(v==null?void 0:v.height)??0,T=r+(s!=="center"?"-"+s:""),E=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},L=Array.isArray(c)?c:[c],M=L.length>0,$={padding:E,boundary:L.filter(R8),altBoundary:M},{refs:V,floatingStyles:Z,placement:Y,isPositioned:j,middlewareData:U}=y8({strategy:"fixed",placement:T,whileElementsMounted:(...qe)=>c8(...qe,{animationFrame:d==="always"}),elements:{reference:O.anchor},middleware:[v8({mainAxis:i+_,alignmentAxis:o}),a&&S8({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?w8():void 0,...$}),a&&k8({...$}),C8({...$,apply:({elements:qe,rects:mt,availableWidth:wt,availableHeight:kt})=>{const{width:Tt,height:er}=mt.reference,Dt=qe.floating.style;Dt.setProperty("--radix-popper-available-width",`${wt}px`),Dt.setProperty("--radix-popper-available-height",`${kt}px`),Dt.setProperty("--radix-popper-anchor-width",`${Tt}px`),Dt.setProperty("--radix-popper-anchor-height",`${er}px`)}}),b&&T8({element:b,padding:l}),L8({arrowWidth:w,arrowHeight:_}),h&&_8({strategy:"referenceHidden",...$})]}),[se,Q]=H5(Y),me=Vs(p);fn(()=>{j&&(me==null||me())},[j,me]);const de=(K=U.arrow)==null?void 0:K.x,R=(ne=U.arrow)==null?void 0:ne.y,$e=((ae=U.arrow)==null?void 0:ae.centerOffset)!==0,[Qe,ke]=C.useState();return fn(()=>{x&&ke(window.getComputedStyle(x).zIndex)},[x]),D.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:j?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Qe,"--radix-popper-transform-origin":[(fe=U.transformOrigin)==null?void 0:fe.x,(ve=U.transformOrigin)==null?void 0:ve.y].join(" "),...((Me=U.hide)==null?void 0:Me.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:D.jsx($8,{scope:n,placedSide:se,onArrowChange:S,arrowX:de,arrowY:R,shouldHideArrow:$e,children:D.jsx(ze.div,{"data-side":se,"data-align":Q,...g,ref:y,style:{...g.style,animation:j?void 0:"none"}})})})});X5.displayName=H0;var W5="PopperArrow",M8={top:"bottom",right:"left",bottom:"top",left:"right"},j5=C.forwardRef(function(e,n){const{__scopePopper:r,...i}=e,s=Q8(W5,r),o=M8[s.placedSide];return D.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:D.jsx(P8,{...i,ref:n,style:{...i.style,display:"block"}})})});j5.displayName=W5;function R8(t){return t!==null}var L8=t=>({name:"transformOrigin",options:t,fn(e){var O,x,m;const{placement:n,rects:r,middlewareData:i}=e,o=((O=i.arrow)==null?void 0:O.centerOffset)!==0,l=o?0:t.arrowWidth,a=o?0:t.arrowHeight,[c,u]=H5(n),f={start:"0%",center:"50%",end:"100%"}[u],h=(((x=i.arrow)==null?void 0:x.x)??0)+l/2,d=(((m=i.arrow)==null?void 0:m.y)??0)+a/2;let p="",g="";return c==="bottom"?(p=o?f:`${h}px`,g=`${-a}px`):c==="top"?(p=o?f:`${h}px`,g=`${r.floating.height+a}px`):c==="right"?(p=`${-a}px`,g=o?f:`${d}px`):c==="left"&&(p=`${r.floating.width+a}px`,g=o?f:`${d}px`),{data:{x:p,y:g}}}});function H5(t){const[e,n="center"]=t.split("-");return[e,n]}var q0=B5,ip=z5,Y0=X5,U0=j5,yg="rovingFocusGroup.onEntryFocus",I8={bubbles:!1,cancelable:!0},Tu="RovingFocusGroup",[oO,q5,N8]=J2(Tu),[D8,sp]=ls(Tu,[N8]),[V8,F8]=D8(Tu),Y5=C.forwardRef((t,e)=>D.jsx(oO.Provider,{scope:t.__scopeRovingFocusGroup,children:D.jsx(oO.Slot,{scope:t.__scopeRovingFocusGroup,children:D.jsx(B8,{...t,ref:e})})}));Y5.displayName=Tu;var B8=C.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:a,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=t,h=C.useRef(null),d=gt(e,h),p=Yd(s),[g,O]=Yi({prop:o,defaultProp:l??null,onChange:a,caller:Tu}),[x,m]=C.useState(!1),y=Vs(c),b=q5(n),S=C.useRef(!1),[v,w]=C.useState(0);return C.useEffect(()=>{const _=h.current;if(_)return _.addEventListener(yg,y),()=>_.removeEventListener(yg,y)},[y]),D.jsx(V8,{scope:n,orientation:r,dir:p,loop:i,currentTabStopId:g,onItemFocus:C.useCallback(_=>O(_),[O]),onItemShiftTab:C.useCallback(()=>m(!0),[]),onFocusableItemAdd:C.useCallback(()=>w(_=>_+1),[]),onFocusableItemRemove:C.useCallback(()=>w(_=>_-1),[]),children:D.jsx(ze.div,{tabIndex:x||v===0?-1:0,"data-orientation":r,...f,ref:d,style:{outline:"none",...t.style},onMouseDown:Ne(t.onMouseDown,()=>{S.current=!0}),onFocus:Ne(t.onFocus,_=>{const T=!S.current;if(_.target===_.currentTarget&&T&&!x){const E=new CustomEvent(yg,I8);if(_.currentTarget.dispatchEvent(E),!E.defaultPrevented){const L=b().filter(Y=>Y.focusable),M=L.find(Y=>Y.active),$=L.find(Y=>Y.id===g),Z=[M,$,...L].filter(Boolean).map(Y=>Y.ref.current);K5(Z,u)}}S.current=!1}),onBlur:Ne(t.onBlur,()=>m(!1))})})}),U5="RovingFocusGroupItem",G5=C.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:o,...l}=t,a=Xi(),c=s||a,u=F8(U5,n),f=u.currentTabStopId===c,h=q5(n),{onFocusableItemAdd:d,onFocusableItemRemove:p,currentTabStopId:g}=u;return C.useEffect(()=>{if(r)return d(),()=>p()},[r,d,p]),D.jsx(oO.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:D.jsx(ze.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...l,ref:e,onMouseDown:Ne(t.onMouseDown,O=>{r?u.onItemFocus(c):O.preventDefault()}),onFocus:Ne(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ne(t.onKeyDown,O=>{if(O.key==="Tab"&&O.shiftKey){u.onItemShiftTab();return}if(O.target!==O.currentTarget)return;const x=X8(O,u.orientation,u.dir);if(x!==void 0){if(O.metaKey||O.ctrlKey||O.altKey||O.shiftKey)return;O.preventDefault();let y=h().filter(b=>b.focusable).map(b=>b.ref.current);if(x==="last")y.reverse();else if(x==="prev"||x==="next"){x==="prev"&&y.reverse();const b=y.indexOf(O.currentTarget);y=u.loop?W8(y,b+1):y.slice(b+1)}setTimeout(()=>K5(y))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:g!=null}):o})})});G5.displayName=U5;var Z8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function z8(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function X8(t,e,n){const r=z8(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Z8[r]}function K5(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function W8(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var J5=Y5,G0=G5;function Lv(t,[e,n]){return Math.min(n,Math.max(e,t))}var op="Popover",[eT]=ls(op,[pa]),Eu=pa(),[j8,io]=eT(op),tT=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!1}=t,l=Eu(e),a=C.useRef(null),[c,u]=C.useState(!1),[f,h]=Yi({prop:r,defaultProp:i??!1,onChange:s,caller:op});return D.jsx(q0,{...l,children:D.jsx(j8,{scope:e,contentId:Xi(),triggerRef:a,open:f,onOpenChange:h,onOpenToggle:C.useCallback(()=>h(d=>!d),[h]),hasCustomAnchor:c,onCustomAnchorAdd:C.useCallback(()=>u(!0),[]),onCustomAnchorRemove:C.useCallback(()=>u(!1),[]),modal:o,children:n})})};tT.displayName=op;var nT="PopoverAnchor",rT=C.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=io(nT,n),s=Eu(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:l}=i;return C.useEffect(()=>(o(),()=>l()),[o,l]),D.jsx(ip,{...s,...r,ref:e})});rT.displayName=nT;var iT="PopoverTrigger",lp=C.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=io(iT,n),s=Eu(n),o=gt(e,i.triggerRef),l=D.jsx(ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":cT(i.open),...r,ref:o,onClick:Ne(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:D.jsx(ip,{asChild:!0,...s,children:l})});lp.displayName=iT;var K0="PopoverPortal",[H8,q8]=eT(K0,{forceMount:void 0}),sT=t=>{const{__scopePopover:e,forceMount:n,children:r,container:i}=t,s=io(K0,e);return D.jsx(H8,{scope:e,forceMount:n,children:D.jsx(ro,{present:n||s.open,children:D.jsx(Cu,{asChild:!0,container:i,children:r})})})};sT.displayName=K0;var zl="PopoverContent",ap=C.forwardRef((t,e)=>{const n=q8(zl,t.__scopePopover),{forceMount:r=n.forceMount,...i}=t,s=io(zl,t.__scopePopover);return D.jsx(ro,{present:r||s.open,children:s.modal?D.jsx(U8,{...i,ref:e}):D.jsx(G8,{...i,ref:e})})});ap.displayName=zl;var Y8=$o("PopoverContent.RemoveScroll"),U8=C.forwardRef((t,e)=>{const n=io(zl,t.__scopePopover),r=C.useRef(null),i=gt(e,r),s=C.useRef(!1);return C.useEffect(()=>{const o=r.current;if(o)return I0(o)},[]),D.jsx(Kd,{as:Y8,allowPinchZoom:!0,children:D.jsx(oT,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(t.onCloseAutoFocus,o=>{var l;o.preventDefault(),s.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ne(t.onPointerDownOutside,o=>{const l=o.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0,c=l.button===2||a;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Ne(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),G8=C.forwardRef((t,e)=>{const n=io(zl,t.__scopePopover),r=C.useRef(!1),i=C.useRef(!1);return D.jsx(oT,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,l;(o=t.onCloseAutoFocus)==null||o.call(t,s),s.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var a,c;(a=t.onInteractOutside)==null||a.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),oT=C.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:u,...f}=t,h=io(zl,n),d=Eu(n);return L0(),D.jsx(Ud,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:D.jsx(ku,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1),children:D.jsx(Y0,{"data-state":cT(h.open),role:"dialog",id:h.contentId,...d,...f,ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),lT="PopoverClose",K8=C.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=io(lT,n);return D.jsx(ze.button,{type:"button",...r,ref:e,onClick:Ne(t.onClick,()=>i.onOpenChange(!1))})});K8.displayName=lT;var J8="PopoverArrow",aT=C.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Eu(n);return D.jsx(U0,{...i,...r,ref:e})});aT.displayName=J8;function cT(t){return t?"open":"closed"}var J0=tT,e6=rT,pae=lp,ex=sT,t6=ap,tx=aT,n6=[" ","Enter","ArrowUp","ArrowDown"],r6=[" ","Enter"],Ro="Select",[cp,up,i6]=J2(Ro),[ga]=ls(Ro,[i6,pa]),fp=pa(),[s6,so]=ga(Ro),[o6,l6]=ga(Ro),uT=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:i,onOpenChange:s,value:o,defaultValue:l,onValueChange:a,dir:c,name:u,autoComplete:f,disabled:h,required:d,form:p}=t,g=fp(e),[O,x]=C.useState(null),[m,y]=C.useState(null),[b,S]=C.useState(!1),v=Yd(c),[w,_]=Yi({prop:r,defaultProp:i??!1,onChange:s,caller:Ro}),[T,E]=Yi({prop:o,defaultProp:l,onChange:a,caller:Ro}),L=C.useRef(null),M=O?p||!!O.closest("form"):!0,[$,V]=C.useState(new Set),Z=Array.from($).map(Y=>Y.props.value).join(";");return D.jsx(q0,{...g,children:D.jsxs(s6,{required:d,scope:e,trigger:O,onTriggerChange:x,valueNode:m,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:S,contentId:Xi(),value:T,onValueChange:E,open:w,onOpenChange:_,dir:v,triggerPointerDownPosRef:L,disabled:h,children:[D.jsx(cp.Provider,{scope:e,children:D.jsx(o6,{scope:t.__scopeSelect,onNativeOptionAdd:C.useCallback(Y=>{V(j=>new Set(j).add(Y))},[]),onNativeOptionRemove:C.useCallback(Y=>{V(j=>{const U=new Set(j);return U.delete(Y),U})},[]),children:n})}),M?D.jsxs(MT,{"aria-hidden":!0,required:d,tabIndex:-1,name:u,autoComplete:f,value:T,onChange:Y=>E(Y.target.value),disabled:h,form:p,children:[T===void 0?D.jsx("option",{value:""}):null,Array.from($)]},Z):null]})})};uT.displayName=Ro;var fT="SelectTrigger",hT=C.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...i}=t,s=fp(n),o=so(fT,n),l=o.disabled||r,a=gt(e,o.onTriggerChange),c=up(n),u=C.useRef("touch"),[f,h,d]=LT(g=>{const O=c().filter(y=>!y.disabled),x=O.find(y=>y.value===o.value),m=IT(O,g,x);m!==void 0&&o.onValueChange(m.value)}),p=g=>{l||(o.onOpenChange(!0),d()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return D.jsx(ip,{asChild:!0,...s,children:D.jsx(ze.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":RT(o.value)?"":void 0,...i,ref:a,onClick:Ne(i.onClick,g=>{g.currentTarget.focus(),u.current!=="mouse"&&p(g)}),onPointerDown:Ne(i.onPointerDown,g=>{u.current=g.pointerType;const O=g.target;O.hasPointerCapture(g.pointerId)&&O.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(p(g),g.preventDefault())}),onKeyDown:Ne(i.onKeyDown,g=>{const O=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(O&&g.key===" ")&&n6.includes(g.key)&&(p(),g.preventDefault())})})})});hT.displayName=fT;var dT="SelectValue",pT=C.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:o="",...l}=t,a=so(dT,n),{onValueNodeHasChildrenChange:c}=a,u=s!==void 0,f=gt(e,a.onValueNodeChange);return fn(()=>{c(u)},[c,u]),D.jsx(ze.span,{...l,ref:f,style:{pointerEvents:"none"},children:RT(a.value)?D.jsx(D.Fragment,{children:o}):s})});pT.displayName=dT;var a6="SelectIcon",gT=C.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...i}=t;return D.jsx(ze.span,{"aria-hidden":!0,...i,ref:e,children:r||"▼"})});gT.displayName=a6;var c6="SelectPortal",mT=t=>D.jsx(Cu,{asChild:!0,...t});mT.displayName=c6;var Lo="SelectContent",OT=C.forwardRef((t,e)=>{const n=so(Lo,t.__scopeSelect),[r,i]=C.useState();if(fn(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?Bl.createPortal(D.jsx(xT,{scope:t.__scopeSelect,children:D.jsx(cp.Slot,{scope:t.__scopeSelect,children:D.jsx("div",{children:t.children})})}),s):null}return D.jsx(yT,{...t,ref:e})});OT.displayName=Lo;var br=10,[xT,oo]=ga(Lo),u6="SelectContentImpl",f6=$o("SelectContent.RemoveScroll"),yT=C.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:l,sideOffset:a,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:d,sticky:p,hideWhenDetached:g,avoidCollisions:O,...x}=t,m=so(Lo,n),[y,b]=C.useState(null),[S,v]=C.useState(null),w=gt(e,K=>b(K)),[_,T]=C.useState(null),[E,L]=C.useState(null),M=up(n),[$,V]=C.useState(!1),Z=C.useRef(!1);C.useEffect(()=>{if(y)return I0(y)},[y]),L0();const Y=C.useCallback(K=>{const[ne,...ae]=M().map(Me=>Me.ref.current),[fe]=ae.slice(-1),ve=document.activeElement;for(const Me of K)if(Me===ve||(Me==null||Me.scrollIntoView({block:"nearest"}),Me===ne&&S&&(S.scrollTop=0),Me===fe&&S&&(S.scrollTop=S.scrollHeight),Me==null||Me.focus(),document.activeElement!==ve))return},[M,S]),j=C.useCallback(()=>Y([_,y]),[Y,_,y]);C.useEffect(()=>{$&&j()},[$,j]);const{onOpenChange:U,triggerPointerDownPosRef:se}=m;C.useEffect(()=>{if(y){let K={x:0,y:0};const ne=fe=>{var ve,Me;K={x:Math.abs(Math.round(fe.pageX)-(((ve=se.current)==null?void 0:ve.x)??0)),y:Math.abs(Math.round(fe.pageY)-(((Me=se.current)==null?void 0:Me.y)??0))}},ae=fe=>{K.x<=10&&K.y<=10?fe.preventDefault():y.contains(fe.target)||U(!1),document.removeEventListener("pointermove",ne),se.current=null};return se.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",ae,{capture:!0})}}},[y,U,se]),C.useEffect(()=>{const K=()=>U(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[U]);const[Q,me]=LT(K=>{const ne=M().filter(ve=>!ve.disabled),ae=ne.find(ve=>ve.ref.current===document.activeElement),fe=IT(ne,K,ae);fe&&setTimeout(()=>fe.ref.current.focus())}),de=C.useCallback((K,ne,ae)=>{const fe=!Z.current&&!ae;(m.value!==void 0&&m.value===ne||fe)&&(T(K),fe&&(Z.current=!0))},[m.value]),R=C.useCallback(()=>y==null?void 0:y.focus(),[y]),$e=C.useCallback((K,ne,ae)=>{const fe=!Z.current&&!ae;(m.value!==void 0&&m.value===ne||fe)&&L(K)},[m.value]),Qe=r==="popper"?lO:bT,ke=Qe===lO?{side:l,sideOffset:a,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:d,sticky:p,hideWhenDetached:g,avoidCollisions:O}:{};return D.jsx(xT,{scope:n,content:y,viewport:S,onViewportChange:v,itemRefCallback:de,selectedItem:_,onItemLeave:R,itemTextRefCallback:$e,focusSelectedItem:j,selectedItemText:E,position:r,isPositioned:$,searchRef:Q,children:D.jsx(Kd,{as:f6,allowPinchZoom:!0,children:D.jsx(Ud,{asChild:!0,trapped:m.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:Ne(i,K=>{var ne;(ne=m.trigger)==null||ne.focus({preventScroll:!0}),K.preventDefault()}),children:D.jsx(ku,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:D.jsx(Qe,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:K=>K.preventDefault(),...x,...ke,onPlaced:()=>V(!0),ref:w,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:Ne(x.onKeyDown,K=>{const ne=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!ne&&K.key.length===1&&me(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let fe=M().filter(ve=>!ve.disabled).map(ve=>ve.ref.current);if(["ArrowUp","End"].includes(K.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const ve=K.target,Me=fe.indexOf(ve);fe=fe.slice(Me+1)}setTimeout(()=>Y(fe)),K.preventDefault()}})})})})})})});yT.displayName=u6;var h6="SelectItemAlignedPosition",bT=C.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...i}=t,s=so(Lo,n),o=oo(Lo,n),[l,a]=C.useState(null),[c,u]=C.useState(null),f=gt(e,w=>u(w)),h=up(n),d=C.useRef(!1),p=C.useRef(!0),{viewport:g,selectedItem:O,selectedItemText:x,focusSelectedItem:m}=o,y=C.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&c&&g&&O&&x){const w=s.trigger.getBoundingClientRect(),_=c.getBoundingClientRect(),T=s.valueNode.getBoundingClientRect(),E=x.getBoundingClientRect();if(s.dir!=="rtl"){const ve=E.left-_.left,Me=T.left-ve,qe=w.left-Me,mt=w.width+qe,wt=Math.max(mt,_.width),kt=window.innerWidth-br,Tt=Lv(Me,[br,Math.max(br,kt-wt)]);l.style.minWidth=mt+"px",l.style.left=Tt+"px"}else{const ve=_.right-E.right,Me=window.innerWidth-T.right-ve,qe=window.innerWidth-w.right-Me,mt=w.width+qe,wt=Math.max(mt,_.width),kt=window.innerWidth-br,Tt=Lv(Me,[br,Math.max(br,kt-wt)]);l.style.minWidth=mt+"px",l.style.right=Tt+"px"}const L=h(),M=window.innerHeight-br*2,$=g.scrollHeight,V=window.getComputedStyle(c),Z=parseInt(V.borderTopWidth,10),Y=parseInt(V.paddingTop,10),j=parseInt(V.borderBottomWidth,10),U=parseInt(V.paddingBottom,10),se=Z+Y+$+U+j,Q=Math.min(O.offsetHeight*5,se),me=window.getComputedStyle(g),de=parseInt(me.paddingTop,10),R=parseInt(me.paddingBottom,10),$e=w.top+w.height/2-br,Qe=M-$e,ke=O.offsetHeight/2,K=O.offsetTop+ke,ne=Z+Y+K,ae=se-ne;if(ne<=$e){const ve=L.length>0&&O===L[L.length-1].ref.current;l.style.bottom="0px";const Me=c.clientHeight-g.offsetTop-g.offsetHeight,qe=Math.max(Qe,ke+(ve?R:0)+Me+j),mt=ne+qe;l.style.height=mt+"px"}else{const ve=L.length>0&&O===L[0].ref.current;l.style.top="0px";const qe=Math.max($e,Z+g.offsetTop+(ve?de:0)+ke)+ae;l.style.height=qe+"px",g.scrollTop=ne-$e+g.offsetTop}l.style.margin=`${br}px 0`,l.style.minHeight=Q+"px",l.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>d.current=!0)}},[h,s.trigger,s.valueNode,l,c,g,O,x,s.dir,r]);fn(()=>y(),[y]);const[b,S]=C.useState();fn(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);const v=C.useCallback(w=>{w&&p.current===!0&&(y(),m==null||m(),p.current=!1)},[y,m]);return D.jsx(p6,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:d,onScrollButtonChange:v,children:D.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:D.jsx(ze.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});bT.displayName=h6;var d6="SelectPopperPosition",lO=C.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=br,...s}=t,o=fp(n);return D.jsx(Y0,{...o,...s,ref:e,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});lO.displayName=d6;var[p6,nx]=ga(Lo,{}),aO="SelectViewport",vT=C.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...i}=t,s=oo(aO,n),o=nx(aO,n),l=gt(e,s.onViewportChange),a=C.useRef(0);return D.jsxs(D.Fragment,{children:[D.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),D.jsx(cp.Slot,{scope:n,children:D.jsx(ze.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ne(i.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&f){const d=Math.abs(a.current-u.scrollTop);if(d>0){const p=window.innerHeight-br*2,g=parseFloat(f.style.minHeight),O=parseFloat(f.style.height),x=Math.max(g,O);if(x<p){const m=x+d,y=Math.min(p,m),b=m-y;f.style.height=y+"px",f.style.bottom==="0px"&&(u.scrollTop=b>0?b:0,f.style.justifyContent="flex-end")}}}a.current=u.scrollTop})})})]})});vT.displayName=aO;var ST="SelectGroup",[g6,m6]=ga(ST),O6=C.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Xi();return D.jsx(g6,{scope:n,id:i,children:D.jsx(ze.div,{role:"group","aria-labelledby":i,...r,ref:e})})});O6.displayName=ST;var wT="SelectLabel",x6=C.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=m6(wT,n);return D.jsx(ze.div,{id:i.id,...r,ref:e})});x6.displayName=wT;var Rh="SelectItem",[y6,kT]=ga(Rh),CT=C.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...o}=t,l=so(Rh,n),a=oo(Rh,n),c=l.value===r,[u,f]=C.useState(s??""),[h,d]=C.useState(!1),p=gt(e,m=>{var y;return(y=a.itemRefCallback)==null?void 0:y.call(a,m,r,i)}),g=Xi(),O=C.useRef("touch"),x=()=>{i||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return D.jsx(y6,{scope:n,value:r,disabled:i,textId:g,isSelected:c,onItemTextChange:C.useCallback(m=>{f(y=>y||((m==null?void 0:m.textContent)??"").trim())},[]),children:D.jsx(cp.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:D.jsx(ze.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:p,onFocus:Ne(o.onFocus,()=>d(!0)),onBlur:Ne(o.onBlur,()=>d(!1)),onClick:Ne(o.onClick,()=>{O.current!=="mouse"&&x()}),onPointerUp:Ne(o.onPointerUp,()=>{O.current==="mouse"&&x()}),onPointerDown:Ne(o.onPointerDown,m=>{O.current=m.pointerType}),onPointerMove:Ne(o.onPointerMove,m=>{var y;O.current=m.pointerType,i?(y=a.onItemLeave)==null||y.call(a):O.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ne(o.onPointerLeave,m=>{var y;m.currentTarget===document.activeElement&&((y=a.onItemLeave)==null||y.call(a))}),onKeyDown:Ne(o.onKeyDown,m=>{var b;((b=a.searchRef)==null?void 0:b.current)!==""&&m.key===" "||(r6.includes(m.key)&&x(),m.key===" "&&m.preventDefault())})})})})});CT.displayName=Rh;var nc="SelectItemText",_T=C.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,...s}=t,o=so(nc,n),l=oo(nc,n),a=kT(nc,n),c=l6(nc,n),[u,f]=C.useState(null),h=gt(e,x=>f(x),a.onItemTextChange,x=>{var m;return(m=l.itemTextRefCallback)==null?void 0:m.call(l,x,a.value,a.disabled)}),d=u==null?void 0:u.textContent,p=C.useMemo(()=>D.jsx("option",{value:a.value,disabled:a.disabled,children:d},a.value),[a.disabled,a.value,d]),{onNativeOptionAdd:g,onNativeOptionRemove:O}=c;return fn(()=>(g(p),()=>O(p)),[g,O,p]),D.jsxs(D.Fragment,{children:[D.jsx(ze.span,{id:a.textId,...s,ref:h}),a.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Bl.createPortal(s.children,o.valueNode):null]})});_T.displayName=nc;var TT="SelectItemIndicator",ET=C.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return kT(TT,n).isSelected?D.jsx(ze.span,{"aria-hidden":!0,...r,ref:e}):null});ET.displayName=TT;var cO="SelectScrollUpButton",PT=C.forwardRef((t,e)=>{const n=oo(cO,t.__scopeSelect),r=nx(cO,t.__scopeSelect),[i,s]=C.useState(!1),o=gt(e,r.onScrollButtonChange);return fn(()=>{if(n.viewport&&n.isPositioned){let l=function(){const c=a.scrollTop>0;s(c)};const a=n.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?D.jsx($T,{...t,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=n;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});PT.displayName=cO;var uO="SelectScrollDownButton",AT=C.forwardRef((t,e)=>{const n=oo(uO,t.__scopeSelect),r=nx(uO,t.__scopeSelect),[i,s]=C.useState(!1),o=gt(e,r.onScrollButtonChange);return fn(()=>{if(n.viewport&&n.isPositioned){let l=function(){const c=a.scrollHeight-a.clientHeight,u=Math.ceil(a.scrollTop)<c;s(u)};const a=n.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?D.jsx($T,{...t,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=n;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});AT.displayName=uO;var $T=C.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=t,s=oo("SelectScrollButton",n),o=C.useRef(null),l=up(n),a=C.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return C.useEffect(()=>()=>a(),[a]),fn(()=>{var u;const c=l().find(f=>f.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[l]),D.jsx(ze.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerDown:Ne(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Ne(i.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Ne(i.onPointerLeave,()=>{a()})})}),b6="SelectSeparator",QT=C.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return D.jsx(ze.div,{"aria-hidden":!0,...r,ref:e})});QT.displayName=b6;var fO="SelectArrow",v6=C.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=fp(n),s=so(fO,n),o=oo(fO,n);return s.open&&o.position==="popper"?D.jsx(U0,{...i,...r,ref:e}):null});v6.displayName=fO;var S6="SelectBubbleInput",MT=C.forwardRef(({__scopeSelect:t,value:e,...n},r)=>{const i=C.useRef(null),s=gt(r,i),o=gI(e);return C.useEffect(()=>{const l=i.current;if(!l)return;const a=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==e&&u){const f=new Event("change",{bubbles:!0});u.call(l,e),l.dispatchEvent(f)}},[o,e]),D.jsx(ze.select,{...n,style:{...G2,...n.style},ref:s,defaultValue:e})});MT.displayName=S6;function RT(t){return t===""||t===void 0}function LT(t){const e=Vs(t),n=C.useRef(""),r=C.useRef(0),i=C.useCallback(o=>{const l=n.current+o;e(l),(function a(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),s=C.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function IT(t,e,n){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let o=w6(t,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==n));const a=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return a!==n?a:void 0}function w6(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var k6=uT,C6=hT,_6=pT,T6=gT,E6=mT,P6=OT,A6=vT,$6=CT,Q6=_T,gae=ET,mae=PT,Oae=AT,M6=QT,R6="Separator",Iv="horizontal",L6=["horizontal","vertical"],NT=C.forwardRef((t,e)=>{const{decorative:n,orientation:r=Iv,...i}=t,s=I6(r)?r:Iv,l=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return D.jsx(ze.div,{"data-orientation":s,...l,...i,ref:e})});NT.displayName=R6;function I6(t){return L6.includes(t)}var N6=NT,DT="Toggle",VT=C.forwardRef((t,e)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...s}=t,[o,l]=Yi({prop:n,onChange:i,defaultProp:r??!1,caller:DT});return D.jsx(ze.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":t.disabled?"":void 0,...s,ref:e,onClick:Ne(t.onClick,()=>{t.disabled||l(!o)})})});VT.displayName=DT;var lo="ToggleGroup",[FT,BT]=ls(lo,[sp]),ZT=sp(),rx=k.forwardRef((t,e)=>{const{type:n,...r}=t;if(n==="single"){const i=r;return D.jsx(D6,{...i,ref:e})}if(n==="multiple"){const i=r;return D.jsx(V6,{...i,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${lo}\``)});rx.displayName=lo;var[zT,XT]=FT(lo),D6=k.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=t,[o,l]=Yi({prop:n,defaultProp:r??"",onChange:i,caller:lo});return D.jsx(zT,{scope:t.__scopeToggleGroup,type:"single",value:k.useMemo(()=>o?[o]:[],[o]),onItemActivate:l,onItemDeactivate:k.useCallback(()=>l(""),[l]),children:D.jsx(WT,{...s,ref:e})})}),V6=k.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=t,[o,l]=Yi({prop:n,defaultProp:r??[],onChange:i,caller:lo}),a=k.useCallback(u=>l((f=[])=>[...f,u]),[l]),c=k.useCallback(u=>l((f=[])=>f.filter(h=>h!==u)),[l]);return D.jsx(zT,{scope:t.__scopeToggleGroup,type:"multiple",value:o,onItemActivate:a,onItemDeactivate:c,children:D.jsx(WT,{...s,ref:e})})});rx.displayName=lo;var[F6,B6]=FT(lo),WT=k.forwardRef((t,e)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:s,dir:o,loop:l=!0,...a}=t,c=ZT(n),u=Yd(o),f={role:"group",dir:u,...a};return D.jsx(F6,{scope:n,rovingFocus:i,disabled:r,children:i?D.jsx(J5,{asChild:!0,...c,orientation:s,dir:u,loop:l,children:D.jsx(ze.div,{...f,ref:e})}):D.jsx(ze.div,{...f,ref:e})})}),Lh="ToggleGroupItem",jT=k.forwardRef((t,e)=>{const n=XT(Lh,t.__scopeToggleGroup),r=B6(Lh,t.__scopeToggleGroup),i=ZT(t.__scopeToggleGroup),s=n.value.includes(t.value),o=r.disabled||t.disabled,l={...t,pressed:s,disabled:o},a=k.useRef(null);return r.rovingFocus?D.jsx(G0,{asChild:!0,...i,focusable:!o,active:s,ref:a,children:D.jsx(Nv,{...l,ref:e})}):D.jsx(Nv,{...l,ref:e})});jT.displayName=Lh;var Nv=k.forwardRef((t,e)=>{const{__scopeToggleGroup:n,value:r,...i}=t,s=XT(Lh,n),o={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=s.type==="single"?o:void 0;return D.jsx(VT,{...l,...i,ref:e,onPressedChange:a=>{a?s.onItemActivate(r):s.onItemDeactivate(r)}})}),Z6=rx,z6=jT,ix="Toolbar",[X6]=ls(ix,[sp,BT]),sx=sp(),HT=BT(),[W6,qT]=X6(ix),YT=C.forwardRef((t,e)=>{const{__scopeToolbar:n,orientation:r="horizontal",dir:i,loop:s=!0,...o}=t,l=sx(n),a=Yd(i);return D.jsx(W6,{scope:n,orientation:r,dir:a,children:D.jsx(J5,{asChild:!0,...l,orientation:r,dir:a,loop:s,children:D.jsx(ze.div,{role:"toolbar","aria-orientation":r,dir:a,...o,ref:e})})})});YT.displayName=ix;var UT="ToolbarSeparator",GT=C.forwardRef((t,e)=>{const{__scopeToolbar:n,...r}=t,i=qT(UT,n);return D.jsx(N6,{orientation:i.orientation==="horizontal"?"vertical":"horizontal",...r,ref:e})});GT.displayName=UT;var j6="ToolbarButton",ox=C.forwardRef((t,e)=>{const{__scopeToolbar:n,...r}=t,i=sx(n);return D.jsx(G0,{asChild:!0,...i,focusable:!t.disabled,children:D.jsx(ze.button,{type:"button",...r,ref:e})})});ox.displayName=j6;var H6="ToolbarLink",q6=C.forwardRef((t,e)=>{const{__scopeToolbar:n,...r}=t,i=sx(n);return D.jsx(G0,{asChild:!0,...i,focusable:!0,children:D.jsx(ze.a,{...r,ref:e,onKeyDown:Ne(t.onKeyDown,s=>{s.key===" "&&s.currentTarget.click()})})})});q6.displayName=H6;var KT="ToolbarToggleGroup",JT=C.forwardRef((t,e)=>{const{__scopeToolbar:n,...r}=t,i=qT(KT,n),s=HT(n);return D.jsx(Z6,{"data-orientation":i.orientation,dir:i.dir,...s,...r,ref:e,rovingFocus:!1})});JT.displayName=KT;var Y6="ToolbarToggleItem",eE=C.forwardRef((t,e)=>{const{__scopeToolbar:n,...r}=t,i=HT(n),s={__scopeToolbar:t.__scopeToolbar};return D.jsx(ox,{asChild:!0,...s,children:D.jsx(z6,{...i,...r,ref:e})})});eE.displayName=Y6;var tE=YT,U6=GT,Tl=ox,G6=JT,bg=eE,[hp]=ls("Tooltip",[pa]),dp=pa(),nE="TooltipProvider",K6=700,hO="tooltip.open",[J6,lx]=hp(nE),rE=t=>{const{__scopeTooltip:e,delayDuration:n=K6,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=t,o=C.useRef(!0),l=C.useRef(!1),a=C.useRef(0);return C.useEffect(()=>{const c=a.current;return()=>window.clearTimeout(c)},[]),D.jsx(J6,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:C.useCallback(()=>{window.clearTimeout(a.current),o.current=!1},[]),onClose:C.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:C.useCallback(c=>{l.current=c},[]),disableHoverableContent:i,children:s})};rE.displayName=nE;var Rc="Tooltip",[eN,Pu]=hp(Rc),iE=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:i,onOpenChange:s,disableHoverableContent:o,delayDuration:l}=t,a=lx(Rc,t.__scopeTooltip),c=dp(e),[u,f]=C.useState(null),h=Xi(),d=C.useRef(0),p=o??a.disableHoverableContent,g=l??a.delayDuration,O=C.useRef(!1),[x,m]=Yi({prop:r,defaultProp:i??!1,onChange:w=>{w?(a.onOpen(),document.dispatchEvent(new CustomEvent(hO))):a.onClose(),s==null||s(w)},caller:Rc}),y=C.useMemo(()=>x?O.current?"delayed-open":"instant-open":"closed",[x]),b=C.useCallback(()=>{window.clearTimeout(d.current),d.current=0,O.current=!1,m(!0)},[m]),S=C.useCallback(()=>{window.clearTimeout(d.current),d.current=0,m(!1)},[m]),v=C.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>{O.current=!0,m(!0),d.current=0},g)},[g,m]);return C.useEffect(()=>()=>{d.current&&(window.clearTimeout(d.current),d.current=0)},[]),D.jsx(q0,{...c,children:D.jsx(eN,{scope:e,contentId:h,open:x,stateAttribute:y,trigger:u,onTriggerChange:f,onTriggerEnter:C.useCallback(()=>{a.isOpenDelayedRef.current?v():b()},[a.isOpenDelayedRef,v,b]),onTriggerLeave:C.useCallback(()=>{p?S():(window.clearTimeout(d.current),d.current=0)},[S,p]),onOpen:b,onClose:S,disableHoverableContent:p,children:n})})};iE.displayName=Rc;var dO="TooltipTrigger",sE=C.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=Pu(dO,n),s=lx(dO,n),o=dp(n),l=C.useRef(null),a=gt(e,l,i.onTriggerChange),c=C.useRef(!1),u=C.useRef(!1),f=C.useCallback(()=>c.current=!1,[]);return C.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),D.jsx(ip,{asChild:!0,...o,children:D.jsx(ze.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:a,onPointerMove:Ne(t.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:Ne(t.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:Ne(t.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ne(t.onFocus,()=>{c.current||i.onOpen()}),onBlur:Ne(t.onBlur,i.onClose),onClick:Ne(t.onClick,i.onClose)})})});sE.displayName=dO;var ax="TooltipPortal",[tN,nN]=hp(ax,{forceMount:void 0}),oE=t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:i}=t,s=Pu(ax,e);return D.jsx(tN,{scope:e,forceMount:n,children:D.jsx(ro,{present:n||s.open,children:D.jsx(Cu,{asChild:!0,container:i,children:r})})})};oE.displayName=ax;var Xl="TooltipContent",lE=C.forwardRef((t,e)=>{const n=nN(Xl,t.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=t,o=Pu(Xl,t.__scopeTooltip);return D.jsx(ro,{present:r||o.open,children:o.disableHoverableContent?D.jsx(aE,{side:i,...s,ref:e}):D.jsx(rN,{side:i,...s,ref:e})})}),rN=C.forwardRef((t,e)=>{const n=Pu(Xl,t.__scopeTooltip),r=lx(Xl,t.__scopeTooltip),i=C.useRef(null),s=gt(e,i),[o,l]=C.useState(null),{trigger:a,onClose:c}=n,u=i.current,{onPointerInTransitChange:f}=r,h=C.useCallback(()=>{l(null),f(!1)},[f]),d=C.useCallback((p,g)=>{const O=p.currentTarget,x={x:p.clientX,y:p.clientY},m=lN(x,O.getBoundingClientRect()),y=aN(x,m),b=cN(g.getBoundingClientRect()),S=fN([...y,...b]);l(S),f(!0)},[f]);return C.useEffect(()=>()=>h(),[h]),C.useEffect(()=>{if(a&&u){const p=O=>d(O,u),g=O=>d(O,a);return a.addEventListener("pointerleave",p),u.addEventListener("pointerleave",g),()=>{a.removeEventListener("pointerleave",p),u.removeEventListener("pointerleave",g)}}},[a,u,d,h]),C.useEffect(()=>{if(o){const p=g=>{const O=g.target,x={x:g.clientX,y:g.clientY},m=(a==null?void 0:a.contains(O))||(u==null?void 0:u.contains(O)),y=!uN(x,o);m?h():y&&(h(),c())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[a,u,o,c,h]),D.jsx(aE,{...t,ref:s})}),[iN,sN]=hp(Rc,{isInside:!1}),oN=R4("TooltipContent"),aE=C.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...l}=t,a=Pu(Xl,n),c=dp(n),{onClose:u}=a;return C.useEffect(()=>(document.addEventListener(hO,u),()=>document.removeEventListener(hO,u)),[u]),C.useEffect(()=>{if(a.trigger){const f=h=>{const d=h.target;d!=null&&d.contains(a.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[a.trigger,u]),D.jsx(ku,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:D.jsxs(Y0,{"data-state":a.stateAttribute,...c,...l,ref:e,style:{...l.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:[D.jsx(oN,{children:r}),D.jsx(iN,{scope:n,isInside:!0,children:D.jsx(B4,{id:a.contentId,role:"tooltip",children:i||r})})]})})});lE.displayName=Xl;var cE="TooltipArrow",uE=C.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=dp(n);return sN(cE,n).isInside?null:D.jsx(U0,{...i,...r,ref:e})});uE.displayName=cE;function lN(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function aN(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function cN(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function uN(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const l=e[s],a=e[o],c=l.x,u=l.y,f=a.x,h=a.y;u>r!=h>r&&n<(f-c)*(r-u)/(h-u)+c&&(i=!i)}return i}function fN(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),hN(e)}function hN(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var fE=rE,hE=iE,dE=sE,pE=oE,gE=lE,dN=uE,pN=Object.defineProperty,gN=(t,e,n)=>e in t?pN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$i=(t,e,n)=>gN(t,typeof e!="symbol"?e+"":e,n);let mN=class mE{constructor(e=new Map){this.map=e}clone(){return new mE(new Map(this.map))}increment(e){const n=this.map.get(e)??0;this.map.set(e,n+1)}decrement(e,n){let r=this.map.get(e);r!==void 0&&(r-=1,this.map.set(e,r),r===0&&n())}},uf=class{constructor(){$i(this,"map",new Map)}getOrCreate(e){let n=this.map.get(e);return n===void 0&&(n=new Set,this.map.set(e,n)),n}get(e){return this.map.get(e)}use(e,n){const r=this.get(e);r!==void 0&&n(r)}delete(e){return this.map.delete(e)}};function El(t,e){return e(t),t}function cx(){}const OE="cell";function Dv(t,e){return t===e}const pp=new Map;let ON=class{constructor(e={}){$i(this,"subscriptions",new uf),$i(this,"singletonSubscriptions",new Map),$i(this,"graph",new uf),$i(this,"state",new Map),$i(this,"distinctNodes",new Map),$i(this,"executionMaps",new Map),$i(this,"definitionRegistry",new Set),$i(this,"combinedCells",[]);for(const n of Object.getOwnPropertySymbols(e))this.state.set(n,e[n])}cellInstance(e,n=!0,r=Symbol()){return this.state.has(r)||this.state.set(r,e),n!==!1&&!this.distinctNodes.has(r)&&this.distinctNodes.set(r,n===!0?Dv:n),r}signalInstance(e=!0,n=Symbol()){return e!==!1&&this.distinctNodes.set(n,e===!0?Dv:e),n}sub(e,n){this.register(e);const r=this.subscriptions.getOrCreate(e);return r.add(n),()=>r.delete(n)}singletonSub(e,n){return this.register(e),n===void 0?this.singletonSubscriptions.delete(e):this.singletonSubscriptions.set(e,n),()=>this.singletonSubscriptions.delete(e)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(e,n){const r=this.signalInstance();return this.connect({map:i=>(...s)=>{i(s)},sink:r,sources:e}),this.sub(r,n)}pubIn(e){var n;const r=Reflect.ownKeys(e),i=this.getExecutionMap(r),s=i.refCount.clone(),o=i.participatingNodes.slice(),l=new Map(this.state),a=c=>{this.graph.use(c,u=>{for(const{sources:f,sink:h}of u)f.has(c)&&s.decrement(h,()=>{o.splice(o.indexOf(h),1),a(h)})})};for(;;){const c=o.shift();if(c===void 0)break;const u=c;let f=!1;const h=d=>{const p=this.distinctNodes.get(u);if(p!=null&&p(l.get(u),d)){f=!1;return}f=!0,l.set(u,d),this.state.has(u)&&this.state.set(u,d)};if(Object.prototype.hasOwnProperty.call(e,u)?h(e[u]):i.projections.use(u,d=>{for(const p of d){const g=[...Array.from(p.sources),...Array.from(p.pulls)].map(O=>l.get(O));p.map(h)(...g)}}),f){const d=l.get(u);this.inContext(()=>{this.subscriptions.use(u,p=>{for(const g of p)g(d)})}),(n=this.singletonSubscriptions.get(u))==null||n(d)}else a(u)}}connect({sources:e,pulls:n=[],map:r,sink:i}){const s={map:r,pulls:new Set(n),sink:this.register(i),sources:new Set(e)};for(const o of[...e,...n])this.register(o),this.graph.getOrCreate(o).add(s);this.executionMaps.clear()}pub(e,n){this.pubIn({[e]:n})}pipe(e,...n){return this.combineOperators(...n)(e)}transformer(...e){return n=>El(this.signalInstance(),r=>(this.link(this.pipe(r,...e),n),r))}link(e,n){this.connect({map:r=>i=>{r(i)},sink:n,sources:[e]})}combine(...e){return El(this.signalInstance(),n=>{this.connect({map:r=>(...i)=>{r(i)},sink:n,sources:e})})}combineCells(...e){const n=this.combinedCells.find(i=>e.length===i.sources.length&&e.every((s,o)=>s===i.sources[o]));if(n)return n.cell;const r=this.cellInstance(e.map(i=>this.getValue(i)),!0);return this.connect({map:i=>(...s)=>{i(s)},sink:r,sources:e}),this.combinedCells.push({sources:e,cell:r}),r}getValue(e){return this.register(e),this.state.get(e)}getValues(e){return e.map(n=>this.getValue(n))}register(e){const n=pp.get(e);return n===void 0||this.definitionRegistry.has(e)?e:(this.definitionRegistry.add(e),El(n.type===OE?this.cellInstance(n.initial,n.distinct,e):this.signalInstance(n.distinct,e),r=>{this.inContext(()=>{n.init(this,r)})}))}inContext(e){return e()}changeWith(e,n,r){this.connect({sources:[n],pulls:[e],sink:e,map:i=>(s,o)=>{i(r(o,s))}})}calculateExecutionMap(e){const n=[],r=new Set,i=new uf,s=new mN,o=new uf,l=(a,c=0)=>{s.increment(a),!r.has(a)&&(this.register(a),i.use(a,u=>{c=Math.max(...Array.from(u).map(f=>n.indexOf(f)))+1}),this.graph.use(a,u=>{for(const f of u)f.sources.has(a)?(o.getOrCreate(f.sink).add(f),l(f.sink,c)):i.getOrCreate(f.sink).add(a)}),r.add(a),n.splice(c,0,a))};return e.forEach(l),{participatingNodes:n,pendingPulls:i,projections:o,refCount:s}}getExecutionMap(e){let n=e;if(e.length===1){n=e[0];const i=this.executionMaps.get(n);if(i!==void 0)return i}else for(const[i,s]of this.executionMaps.entries())if(Array.isArray(i)&&i.length===e.length&&i.every(o=>e.includes(o)))return s;const r=this.calculateExecutionMap(e);return this.executionMaps.set(n,r),r}combineOperators(...e){return n=>{for(const r of e)n=r(n,this);return n}}};function ye(t,e=cx,n=!0){return El(Symbol(),r=>{pp.set(r,{type:OE,distinct:n,initial:t,init:e})})}function Pt(t=cx,e=!1){return El(Symbol(),n=>{pp.set(n,{type:"signal",distinct:e,init:t})})}function ao(t=cx){return El(Symbol(),e=>{pp.set(e,{type:"signal",distinct:!1,init:t})})}const xE=C.createContext(null);function gp(){const t=C.useContext(xE);if(t===null)throw new Error("useRealm must be used within a RealmContextProvider");return t}function hi(t){const e=gp();e.register(t);const n=C.useCallback(r=>e.sub(t,r),[e,t]);return C.useSyncExternalStore(n,()=>e.getValue(t),()=>e.getValue(t))}function Fr(...t){const e=gp(),n=C.useMemo(()=>e.combineCells.apply(e,t),[e,...t]);return hi(n)}function Hn(t){const e=gp();return e.register(t),C.useCallback(n=>{e.pub(t,n)},[e,t])}function Zs(t){return(e,n)=>{const r=n.signalInstance();return n.connect({map:i=>s=>{i(t(s))},sink:r,sources:[e]}),r}}function Ct(...t){return(e,n)=>{const r=n.signalInstance();return n.connect({map:i=>(...s)=>{i(s)},pulls:t,sink:r,sources:[e]}),r}}function yE(t){return(e,n)=>{const r=n.signalInstance();return n.connect({map:i=>()=>{i(t)},sink:r,sources:[e]}),r}}function Au(t){return(e,n)=>{const r=n.signalInstance();return n.connect({map:i=>s=>{t(s)&&i(s)},sink:r,sources:[e]}),r}}function bE(t,e){return(n,r)=>{const i=r.signalInstance();return r.connect({map:s=>o=>{s(e=t(e,o))},sink:i,sources:[n]}),i}}function xN(t,e){return e(t),t}function Ls(){}function dr(t){return function(e){return{init:n=>{var r;return(r=t.init)==null?void 0:r.call(t,n,e)},postInit:n=>{var r;return(r=t.postInit)==null?void 0:r.call(t,n,e)},update:n=>{var r;return(r=t.update)==null?void 0:r.call(t,n,e)}}}}function yN({children:t,plugins:e}){const n=k.useMemo(()=>xN(new ON,r=>{var i,s;for(const o of e)(i=o.init)==null||i.call(o,r);for(const o of e)(s=o.postInit)==null||s.call(o,r)}),[]);return k.useEffect(()=>{var r;for(const i of e)(r=i.update)==null||r.call(i,n)}),k.createElement(xE.Provider,{value:n},t)}const Ih=C.createContext(null);function vE(t,e){let n=null;return t!=null&&(n=t[1]),{getTheme:function(){return e??(n!=null?n.getTheme():null)}}}function hn(){const t=C.useContext(Ih);return t==null&&(function(e,...n){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",e);for(const s of n)i.append("v",s);throw r.search=i.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),t}function te(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Br=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,bN=Br&&"documentMode"in document?document.documentMode:null,Ur=Br&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Io=Br&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Nh=!(!Br||!("InputEvent"in window)||bN)&&"getTargetRanges"in new window.InputEvent("input"),Lc=Br&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Wl=Br&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,vN=Br&&/Android/.test(navigator.userAgent),SE=Br&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Vv=Br&&vN&&SE,Dh=Br&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!SE;function wE(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))e.push(r);return e}const SN=1,wN=3,kN=9,CN=11,No=0,kE=1,jl=2,_N=0,TN=1,EN=2,Ic=4,Nc=8,mp=128,CE=1792|(112|(3|Ic|Nc)|mp),ux=1,fx=2,hx=3,dx=4,px=5,gx=6,Op=Lc||Wl||Dh?" ":"​",Ki=`
47
+
48
+ `,PN=Io?" ":Op,zs={bold:1,capitalize:1024,code:16,highlight:mp,italic:2,lowercase:256,strikethrough:Ic,subscript:32,superscript:64,underline:Nc,uppercase:512},AN={directionless:1,unmergeable:2},Fv={center:fx,end:gx,justify:dx,left:ux,right:hx,start:px},$N={[fx]:"center",[gx]:"end",[dx]:"justify",[ux]:"left",[hx]:"right",[px]:"start"},QN={normal:0,segmented:2,token:1},MN={[_N]:"normal",[EN]:"segmented",[TN]:"token"},Bv="$config";function _E(t,e,n,r,i,s){let o=t.getFirstChild();for(;o!==null;){const l=o.__key;o.__parent===e&&(J(o)&&_E(o,l,n,r,i,s),n.has(l)||s.delete(l),i.push(l)),o=o.getNextSibling()}}const RN=100;let pO=!1,mx=0;function LN(t){mx=t.timeStamp}function vg(t,e,n){const r=t.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(t===i||r&&t.previousSibling===i)||r&&_p(t,n)!==void 0}function IN(t,e,n){const r=di(fr(n));let i=null,s=null;r!==null&&r.anchorNode===t&&(i=r.anchorOffset,s=r.focusOffset);const o=t.nodeValue;o!==null&&Nx(e,o,i,s,!1)}function NN(t,e,n){if(Ae(t)){const r=t.anchor.getNode();if(r.is(n)&&t.format!==r.getFormat())return!1}return xi(e)&&n.isAttached()}function DN(t,e,n,r){for(let i=t;i&&!GP(i);i=Mu(i)){const s=_p(i,e);if(s!==void 0){const o=Bt(s,n);if(o)return pt(o)||!vn(i)?void 0:[i,o]}else if(i===r)return[r,RP(n)]}}function TE(t,e,n){pO=!0;const r=performance.now()-mx>RN;try{Wn(t,(()=>{const i=Ke()||(function(h){return h.getEditorState().read((()=>{const d=Ke();return d!==null?d.clone():null}))})(t),s=new Map,o=t.getRootElement(),l=t._editorState,a=t._blockCursorElement;let c=!1,u="";for(let h=0;h<e.length;h++){const d=e[h],p=d.type,g=d.target,O=DN(g,t,l,o);if(!O)continue;const[x,m]=O;if(p==="characterData")r&&Ce(m)&&xi(g)&&NN(i,g,m)&&IN(g,m,t);else if(p==="childList"){c=!0;const y=d.addedNodes;for(let v=0;v<y.length;v++){const w=y[v],_=QP(w),T=w.parentNode;if(T!=null&&w!==a&&_===null&&!vg(w,T,t)){if(Io){const E=(vn(w)?w.innerText:null)||w.nodeValue;E&&(u+=E)}T.removeChild(w)}}const b=d.removedNodes,S=b.length;if(S>0){let v=0;for(let w=0;w<S;w++){const _=b[w];(vg(_,g,t)||a===_)&&(g.appendChild(_),v++)}S!==v&&s.set(x,m)}}}if(s.size>0)for(const[h,d]of s)d.reconcileObservedMutation(h,t);const f=n.takeRecords();if(f.length>0){for(let h=0;h<f.length;h++){const d=f[h],p=d.addedNodes,g=d.target;for(let O=0;O<p.length;O++){const x=p[O],m=x.parentNode;m==null||x.nodeName!=="BR"||vg(x,g,t)||m.removeChild(x)}}n.takeRecords()}i!==null&&(c&&Ln(i),Io&&FP(t)&&i.insertRawText(u))}))}finally{pO=!1}}function EE(t){const e=t._observer;e!==null&&TE(t,e.takeRecords(),e)}function PE(t){(function(e){mx===0&&fr(e).addEventListener("textInput",LN,!0)})(t),t._observer=new MutationObserver(((e,n)=>{TE(t,e,n)}))}function AE(t){const e=new Map,n=new Set;for(let r=typeof t=="function"?t:t.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=Pp(r);if(i&&i.stateConfigs)for(const s of i.stateConfigs){let o;"stateConfig"in s?(o=s.stateConfig,s.flat&&n.add(o.key)):o=s,e.set(o.key,o)}}return{flatKeys:n,sharedConfigMap:e}}let VN=class $E{constructor(e,n,r=void 0,i=new Map,s=void 0){this.node=e,this.sharedNodeState=n,this.unknownState=r,this.knownState=i;const{sharedConfigMap:o}=this.sharedNodeState,l=s!==void 0?s:(function(a,c,u){let f=u.size;if(c)for(const h in c){const d=a.get(h);d&&u.has(d)||f++}return f})(o,r,i);this.size=l}getValue(e){const n=this.knownState.get(e);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const i=this.unknownState[e.key];i!==void 0&&(r=e.parse(i)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},n={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in e&&(n[r]=e[r],delete e[r]);return Zv(e)&&(n.$=e),n}getWritable(e){if(this.node===e)return this;const{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new $E(e,n,(function(s,o,l){let a;if(l)for(const[c,u]of Object.entries(l)){const f=s.get(c);f?o.has(f)||o.set(f,f.parse(u)):(a=a||{},a[c]=u)}return a})(n.sharedConfigMap,i,r),i,this.size)}updateFromKnown(e,n){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:i,unknownState:s}=this;i.has(e)||s&&r in s||(s&&(delete s[r],this.unknownState=Zv(s)),this.size++),i.set(e,n)}updateFromUnknown(e,n){const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=n)}updateFromJSON(e){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState=void 0,e)for(const[r,i]of Object.entries(e))this.updateFromUnknown(r,i)}};function QE(t){const e=t.getWritable(),n=e.__state?e.__state.getWritable(e):new VN(e,ME(e));return e.__state=n,n}function ME(t){return t.__state?t.__state.sharedNodeState:$x(Bx(),t.getType()).sharedNodeState}function Zv(t){if(t)for(const e in t)return t}function zv(t,e,n){for(const[r,i]of e.knownState){if(t.has(r.key))continue;t.add(r.key);const s=n?n.getValue(r):r.defaultValue;if(s!==i&&!r.isEqual(s,i))return!0}return!1}function Xv(t,e,n){const{unknownState:r}=e,i=n?n.unknownState:void 0;if(r){for(const[s,o]of Object.entries(r))if(!t.has(s)&&(t.add(s),o!==(i?i[s]:void 0)))return!0}return!1}function Wv(t,e){const n=t.__state;return n&&n.node===t?n.getWritable(e):n}function jv(t,e){const n=t.__mode,r=t.__format,i=t.__style,s=e.__mode,o=e.__format,l=e.__style,a=t.__state,c=e.__state;return(n===null||n===s)&&(r===null||r===o)&&(i===null||i===l)&&(t.__state===null||a===c||(function(u,f){if(u===f)return!0;if(u&&f&&u.size!==f.size)return!1;const h=new Set;return!(u&&zv(h,u,f)||f&&zv(h,f,u)||u&&Xv(h,u,f)||f&&Xv(h,f,u))})(a,c))}function Hv(t,e){const n=t.mergeWithSibling(e),r=_t()._normalizedNodes;return r.add(t.__key),r.add(e.__key),n}function qv(t){let e,n,r=t;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&Ce(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(jv(e,r)){r=Hv(e,r);break}break}e.remove()}for(;(n=r.getNextSibling())!==null&&Ce(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(jv(r,n)){r=Hv(r,n);break}break}n.remove()}}else r.remove()}function Vh(t){return Yv(t.anchor),Yv(t.focus),t}function Yv(t){for(;t.type==="element";){const e=t.getNode(),n=t.offset;let r,i;if(n===e.getChildrenSize()?(r=e.getChildAtIndex(n-1),i=!0):(r=e.getChildAtIndex(n),i=!1),Ce(r)){t.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!J(r))break;t.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let Do,an,Dc,xp,gO,mO,Vo,Er,OO,Vc,Ft="",qr=null,Yr="",Ii="",pl=!1,Fh=!1;function Bh(t,e){const n=Vo.get(t);if(e!==null){const r=vO(t);r.parentNode===e&&e.removeChild(r)}if(Er.has(t)||an._keyToDOMMap.delete(t),J(n)){const r=zh(n,Vo);xO(r,0,r.length-1,null)}n!==void 0&&Dx(Vc,Dc,xp,n,"destroyed")}function xO(t,e,n,r){let i=e;for(;i<=n;++i){const s=t[i];s!==void 0&&Bh(s,r)}}function go(t,e){t.setProperty("text-align",e)}const FN="40px";function RE(t,e){const n=Do.theme.indent;if(typeof n=="string"){const i=t.classList.contains(n);e>0&&!i?t.classList.add(n):e<1&&i&&t.classList.remove(n)}const r=getComputedStyle(t).getPropertyValue("--lexical-indent-base-value")||FN;t.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function LE(t,e){const n=t.style;e===0?go(n,""):e===ux?go(n,"left"):e===fx?go(n,"center"):e===hx?go(n,"right"):e===dx?go(n,"justify"):e===px?go(n,"start"):e===gx&&go(n,"end")}function yO(t,e){const n=(function(r){const i=r.__dir;if(i!==null)return i;if(nn(r))return null;const s=r.getParentOrThrow();return nn(s)&&s.__dir===null?"auto":null})(e);n!==null?t.dir=n:t.removeAttribute("dir")}function Zh(t,e){const n=Er.get(t);n===void 0&&te(60);const r=n.createDOM(Do,an);if((function(i,s,o){const l=o._keyToDOMMap;(function(a,c,u){const f=`__lexicalKey_${c._key}`;a[f]=u})(s,o,i),l.set(i,s)})(t,r,an),Ce(n)?r.setAttribute("data-lexical-text","true"):pt(n)&&r.setAttribute("data-lexical-decorator","true"),J(n)){const i=n.__indent,s=n.__size;if(yO(r,n),i!==0&&RE(r,i),s!==0){const l=s-1;bO(zh(n,Er),n,0,l,n.getDOMSlot(r))}const o=n.__format;o!==0&&LE(r,o),n.isInline()||IE(null,n,r),Ep(n)&&(Ft+=Ki,Ii+=Ki)}else{const i=n.getTextContent();if(pt(n)){const s=n.decorate(an,Do);s!==null&&NE(t,s),r.contentEditable="false"}Ft+=i,Ii+=i}return e!==null&&e.insertChild(r),Dx(Vc,Dc,xp,n,"created"),r}function bO(t,e,n,r,i){const s=Ft;Ft="";let o=n;for(;o<=r;++o){Zh(t[o],i);const l=Er.get(t[o]);l!==null&&Ce(l)&&(qr===null&&(qr=l.getFormat()),Yr===""&&(Yr=l.getStyle()))}Ep(e)&&(Ft+=Ki),i.element.__lexicalTextContent=Ft,Ft=s+Ft}function Uv(t,e){if(t){const n=t.__last;if(n){const r=e.get(n);if(r)return To(r)?"line-break":pt(r)&&r.isInline()?"decorator":null}return"empty"}return null}function IE(t,e,n){const r=Uv(t,Vo),i=Uv(e,Er);r!==i&&e.getDOMSlot(n).setManagedLineBreak(i)}function BN(t,e,n){var r;qr=null,Yr="",(function(i,s,o){const l=Ft,a=i.__size,c=s.__size;Ft="";const u=o.element;if(a===1&&c===1){const f=i.__first,h=s.__first;if(f===h)rc(f,u);else{const p=vO(f),g=Zh(h,null);try{u.replaceChild(g,p)}catch(O){if(typeof O=="object"&&O!=null){const x=`${O.toString()} Parent: ${u.tagName}, new child: {tag: ${g.tagName} key: ${h}}, old child: {tag: ${p.tagName}, key: ${f}}.`;throw new Error(x)}throw O}Bh(f,null)}const d=Er.get(h);Ce(d)&&(qr===null&&(qr=d.getFormat()),Yr===""&&(Yr=d.getStyle()))}else{const f=zh(i,Vo),h=zh(s,Er);if(f.length!==a&&te(227),h.length!==c&&te(228),a===0)c!==0&&bO(h,s,0,c-1,o);else if(c===0){if(a!==0){const d=o.after==null&&o.before==null&&o.element.__lexicalLineBreak==null;xO(f,0,a-1,d?null:u),d&&(u.textContent="")}}else(function(d,p,g,O,x,m){const y=O-1,b=x-1;let S,v,w=m.getFirstChild(),_=0,T=0;for(;_<=y&&T<=b;){const M=p[_],$=g[T];if(M===$)w=Sg(rc($,m.element)),_++,T++;else{S===void 0&&(S=new Set(p)),v===void 0&&(v=new Set(g));const Z=v.has(M),Y=S.has($);if(Z)if(Y){const j=Bo(an,$);j===w?w=Sg(rc($,m.element)):(m.withBefore(w).insertChild(j),rc($,m.element)),_++,T++}else Zh($,m.withBefore(w)),T++;else w=Sg(vO(M)),Bh(M,m.element),_++}const V=Er.get($);V!==null&&Ce(V)&&(qr===null&&(qr=V.getFormat()),Yr===""&&(Yr=V.getStyle()))}const E=_>y,L=T>b;if(E&&!L){const M=g[b+1],$=M===void 0?null:an.getElementByKey(M);bO(g,d,T,b,m.withBefore($))}else L&&!E&&xO(p,_,y,m.element)})(s,f,h,a,c,o)}Ep(s)&&(Ft+=Ki),u.__lexicalTextContent=Ft,Ft=l+Ft})(t,e,e.getDOMSlot(n)),r=e,qr==null||qr===r.__textFormat||Fh||r.setTextFormat(qr),(function(i){Yr===""||Yr===i.__textStyle||Fh||i.setTextStyle(Yr)})(e)}function zh(t,e){const n=[];let r=t.__first;for(;r!==null;){const i=e.get(r);i===void 0&&te(101),n.push(r),r=i.__next}return n}function rc(t,e){const n=Vo.get(t);let r=Er.get(t);n!==void 0&&r!==void 0||te(61);const i=pl||mO.has(t)||gO.has(t),s=Bo(an,t);if(n===r&&!i){if(J(n)){const o=s.__lexicalTextContent;o!==void 0&&(Ft+=o,Ii+=o)}else{const o=n.getTextContent();Ii+=o,Ft+=o}return s}if(n!==r&&i&&Dx(Vc,Dc,xp,r,"updated"),r.updateDOM(n,s,Do)){const o=Zh(t,null);return e===null&&te(62),e.replaceChild(o,s),Bh(t,null),o}if(J(n)&&J(r)){const o=r.__indent;(pl||o!==n.__indent)&&RE(s,o);const l=r.__format;if((pl||l!==n.__format)&&LE(s,l),i&&(BN(n,r,s),nn(r)||r.isInline()||IE(n,r,s)),Ep(r)&&(Ft+=Ki,Ii+=Ki),(pl||r.__dir!==n.__dir)&&(yO(s,r),nn(r)&&!pl))for(const a of r.getChildren())J(a)&&yO(Bo(an,a.getKey()),a)}else{const o=r.getTextContent();if(pt(r)){const l=r.decorate(an,Do);l!==null&&NE(t,l)}Ft+=o,Ii+=o}if(!Fh&&nn(r)&&r.__cachedText!==Ii){const o=r.getWritable();o.__cachedText=Ii,r=o}return s}function NE(t,e){let n=an._pendingDecorators;const r=an._decorators;if(n===null){if(r[t]===e)return;n=MP(an)}n[t]=e}function Sg(t){let e=t.nextSibling;return e!==null&&e===an._blockCursorElement&&(e=e.nextSibling),e}function ZN(t,e,n,r,i,s){Ft="",Ii="",pl=r===jl,an=n,Do=n._config,Dc=n._nodes,xp=an._listeners.mutation,gO=i,mO=s,Vo=t._nodeMap,Er=e._nodeMap,Fh=e._readOnly,OO=new Map(n._keyToDOMMap);const o=new Map;return Vc=o,rc("root",null),an=void 0,Dc=void 0,gO=void 0,mO=void 0,Vo=void 0,Er=void 0,Do=void 0,OO=void 0,Vc=void 0,o}function vO(t){const e=OO.get(t);return e===void 0&&te(75,t),e}function Le(t){return{type:t}}const Ox=Le("SELECTION_CHANGE_COMMAND"),zN=Le("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),DE=Le("CLICK_COMMAND"),Fc=Le("DELETE_CHARACTER_COMMAND"),fc=Le("INSERT_LINE_BREAK_COMMAND"),SO=Le("INSERT_PARAGRAPH_COMMAND"),Pl=Le("CONTROLLED_TEXT_INSERTION_COMMAND"),xx=Le("PASTE_COMMAND"),wO=Le("REMOVE_TEXT_COMMAND"),Bc=Le("DELETE_WORD_COMMAND"),Zc=Le("DELETE_LINE_COMMAND"),Es=Le("FORMAT_TEXT_COMMAND"),yx=Le("UNDO_COMMAND"),bx=Le("REDO_COMMAND"),VE=Le("KEYDOWN_COMMAND"),FE=Le("KEY_ARROW_RIGHT_COMMAND"),BE=Le("MOVE_TO_END"),ZE=Le("KEY_ARROW_LEFT_COMMAND"),zE=Le("MOVE_TO_START"),XE=Le("KEY_ARROW_UP_COMMAND"),WE=Le("KEY_ARROW_DOWN_COMMAND"),Xh=Le("KEY_ENTER_COMMAND"),jE=Le("KEY_SPACE_COMMAND"),HE=Le("KEY_BACKSPACE_COMMAND"),qE=Le("KEY_ESCAPE_COMMAND"),YE=Le("KEY_DELETE_COMMAND"),UE=Le("KEY_TAB_COMMAND"),XN=Le("INSERT_TAB_COMMAND"),WN=Le("INDENT_CONTENT_COMMAND"),jN=Le("OUTDENT_CONTENT_COMMAND"),GE=Le("DROP_COMMAND"),HN=Le("FORMAT_ELEMENT_COMMAND"),KE=Le("DRAGSTART_COMMAND"),JE=Le("DRAGOVER_COMMAND"),eP=Le("DRAGEND_COMMAND"),vx=Le("COPY_COMMAND"),Sx=Le("CUT_COMMAND"),kO=Le("SELECT_ALL_COMMAND"),qN=Le("CLEAR_EDITOR_COMMAND"),YN=Le("CLEAR_HISTORY_COMMAND"),UN=Le("CAN_REDO_COMMAND"),GN=Le("CAN_UNDO_COMMAND"),tP=Le("FOCUS_COMMAND"),nP=Le("BLUR_COMMAND"),rP=Le("KEY_MODIFIER_COMMAND"),_i=Object.freeze({}),CO=30,_O=[["keydown",function(t,e){if(hc=t.timeStamp,iP=t.key,!e.isComposing()&&!xe(e,VE,t)&&t.key!=null){if(wg&&kS(t))return Wn(e,(()=>{ff(e,kg)})),wg=!1,void(kg="");if((function(n){return Je(n,"ArrowRight",{shiftKey:"any"})})(t))xe(e,FE,t);else if((function(n){return Je(n,"ArrowRight",Qi)})(t))xe(e,BE,t);else if((function(n){return Je(n,"ArrowLeft",{shiftKey:"any"})})(t))xe(e,ZE,t);else if((function(n){return Je(n,"ArrowLeft",Qi)})(t))xe(e,zE,t);else if((function(n){return Je(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(t))xe(e,XE,t);else if((function(n){return Je(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(t))xe(e,WE,t);else if((function(n){return Je(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(t))dc=!0,xe(e,Xh,t);else if((function(n){return n.key===" "})(t))xe(e,jE,t);else if((function(n){return Ur&&Je(n,"o",{ctrlKey:!0})})(t))t.preventDefault(),dc=!0,xe(e,fc,!0);else if((function(n){return Je(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(t))dc=!1,xe(e,Xh,t);else if((function(n){return Je(n,"Backspace",{shiftKey:"any"})||Ur&&Je(n,"h",{ctrlKey:!0})})(t))kS(t)?xe(e,HE,t):(t.preventDefault(),xe(e,Fc,!0));else if((function(n){return n.key==="Escape"})(t))xe(e,qE,t);else if((function(n){return Je(n,"Delete",{})||Ur&&Je(n,"d",{ctrlKey:!0})})(t))(function(n){return n.key==="Delete"})(t)?xe(e,YE,t):(t.preventDefault(),xe(e,Fc,!1));else if((function(n){return Je(n,"Backspace",wS)})(t))t.preventDefault(),xe(e,Bc,!0);else if((function(n){return Je(n,"Delete",wS)})(t))t.preventDefault(),xe(e,Bc,!1);else if((function(n){return Ur&&Je(n,"Backspace",{metaKey:!0})})(t))t.preventDefault(),xe(e,Zc,!0);else if((function(n){return Ur&&(Je(n,"Delete",{metaKey:!0})||Je(n,"k",{ctrlKey:!0}))})(t))t.preventDefault(),xe(e,Zc,!1);else if((function(n){return Je(n,"b",Qi)})(t))t.preventDefault(),xe(e,Es,"bold");else if((function(n){return Je(n,"u",Qi)})(t))t.preventDefault(),xe(e,Es,"underline");else if((function(n){return Je(n,"i",Qi)})(t))t.preventDefault(),xe(e,Es,"italic");else if((function(n){return Je(n,"Tab",{shiftKey:"any"})})(t))xe(e,UE,t);else if((function(n){return Je(n,"z",Qi)})(t))t.preventDefault(),xe(e,yx,void 0);else if((function(n){return Ur?Je(n,"z",{metaKey:!0,shiftKey:!0}):Je(n,"y",{ctrlKey:!0})||Je(n,"z",{ctrlKey:!0,shiftKey:!0})})(t))t.preventDefault(),xe(e,bx,void 0);else{const n=e._editorState._selection;n===null||Ae(n)?CS(t)&&(t.preventDefault(),xe(e,kO,t)):(function(r){return Je(r,"c",Qi)})(t)?(t.preventDefault(),xe(e,vx,t)):(function(r){return Je(r,"x",Qi)})(t)?(t.preventDefault(),xe(e,Sx,t)):CS(t)&&(t.preventDefault(),xe(e,kO,t))}(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(t)&&xe(e,rP,t)}}],["pointerdown",function(t,e){const n=t.target,r=t.pointerType;wa(n)&&r!=="touch"&&r!=="pen"&&t.button===0&&Wn(e,(()=>{bS(n)||(EO=!0)}))}],["compositionstart",function(t,e){Wn(e,(()=>{const n=Ke();if(Ae(n)&&!e.isComposing()){const r=n.anchor,i=n.anchor.getNode();Xt(r.key),(t.timeStamp<hc+CO||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||Ce(i)&&i.getStyle()!==n.style)&&xe(e,Pl,PN)}}))}],["compositionend",function(t,e){Io?Va=!0:Wl||!Lc&&!Dh?Wn(e,(()=>{ff(e,t.data)})):(wg=!0,kg=t.data)}],["input",function(t,e){t.stopPropagation(),Wn(e,(()=>{if(vn(t.target)&&bS(t.target))return;const n=Ke(),r=t.data,i=cP(t);if(r!=null&&Ae(n)&&lP(n,i,r,t.timeStamp,!1)){Va&&(ff(e,r),Va=!1);const s=n.anchor.getNode(),o=di(fr(e));if(o===null)return;const l=n.isBackward(),a=l?n.anchor.offset:n.focus.offset,c=l?n.focus.offset:n.anchor.offset;Nh&&!n.isCollapsed()&&Ce(s)&&o.anchorNode!==null&&s.getTextContent().slice(0,a)+r+s.getTextContent().slice(a+c)===NP(o.anchorNode)||xe(e,Pl,r);const u=r.length;Io&&u>1&&t.inputType==="insertCompositionText"&&!e.isComposing()&&(n.anchor.offset-=u),Lc||Wl||Dh||!e.isComposing()||(hc=0,Xt(null))}else Ix(!1,e,r!==null?r:void 0),Va&&(ff(e,r||void 0),Va=!1);(function(){Jt();const s=_t();EE(s)})()}),{event:t}),gl=null}],["click",function(t,e){Wn(e,(()=>{const n=Ke(),r=di(fr(e)),i=nl();if(r){if(Ae(n)){const s=n.anchor,o=s.getNode();if(s.type==="element"&&s.offset===0&&n.isCollapsed()&&!nn(o)&&Rn().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(t.detail===3&&!n.isCollapsed()&&o!==n.focus.getNode()){const l=(function(a,c){let u=a;for(;u!==Rn()&&u!=null;){if(c(u))return u;u=u.getParent()}return null})(o,(a=>J(a)&&!a.isInline()));J(l)&&l.select(0)}}else if(t.pointerType==="touch"||t.pointerType==="pen"){const s=r.anchorNode;(vn(s)||xi(s))&&Ln(_x(i,r,e,t))}}xe(e,DE,t)}))}],["cut",_i],["copy",_i],["dragstart",_i],["dragover",_i],["dragend",_i],["paste",_i],["focus",_i],["blur",_i],["drop",_i]];Nh&&_O.push(["beforeinput",(t,e)=>(function(n,r){const i=n.inputType,s=cP(n);i==="deleteCompositionText"||Io&&FP(r)||i!=="insertCompositionText"&&Wn(r,(()=>{const o=Ke();if(i==="deleteContentBackward"){if(o===null){const d=nl();if(!Ae(d))return;Ln(d.clone())}if(Ae(o)){const d=o.anchor.key===o.focus.key;if(l=n.timeStamp,iP==="MediaLast"&&l<hc+CO&&r.isComposing()&&d){if(Xt(null),hc=0,setTimeout((()=>{Wn(r,(()=>{Xt(null)}))}),CO),Ae(o)){const p=o.anchor.getNode();p.markDirty(),Ce(p)||te(142),aP(o,p)}}else{Xt(null),n.preventDefault();const p=o.anchor.getNode(),g=p.getTextContent(),O=p.canInsertTextAfter(),x=o.anchor.offset===0&&o.focus.offset===g.length;let m=Vv&&d&&!x&&O;if(m&&o.isCollapsed()&&(m=!pt(VP(o.anchor,!0))),!m){xe(r,Fc,!0);const y=Ke();Vv&&Ae(y)&&y.isCollapsed()&&(yo=y,setTimeout((()=>yo=null)))}}return}}var l;if(!Ae(o))return;const a=n.data;gl!==null&&Ix(!1,r,gl),o.dirty&&gl===null||!o.isCollapsed()||nn(o.anchor.getNode())||s===null||o.applyDOMRange(s),gl=null;const c=o.anchor,u=o.focus,f=c.getNode(),h=u.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":xe(r,Pl,n);break;case"insertFromComposition":Xt(null),xe(r,Pl,n);break;case"insertLineBreak":Xt(null),xe(r,fc,!1);break;case"insertParagraph":Xt(null),dc&&!Wl?(dc=!1,xe(r,fc,!1)):xe(r,SO,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":xe(r,xx,n);break;case"deleteByComposition":(function(d,p){return d!==p||J(d)||J(p)||!Is(d)||!Is(p)})(f,h)&&xe(r,wO,n);break;case"deleteByDrag":case"deleteByCut":xe(r,wO,n);break;case"deleteContent":xe(r,Fc,!1);break;case"deleteWordBackward":xe(r,Bc,!0);break;case"deleteWordForward":xe(r,Bc,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":xe(r,Zc,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":xe(r,Zc,!1);break;case"formatStrikeThrough":xe(r,Es,"strikethrough");break;case"formatBold":xe(r,Es,"bold");break;case"formatItalic":xe(r,Es,"italic");break;case"formatUnderline":xe(r,Es,"underline");break;case"historyUndo":xe(r,yx,void 0);break;case"historyRedo":xe(r,bx,void 0)}else{if(a===`
49
+ `)n.preventDefault(),xe(r,fc,!1);else if(a===Ki)n.preventDefault(),xe(r,SO,void 0);else if(a==null&&n.dataTransfer){const d=n.dataTransfer.getData("text/plain");n.preventDefault(),o.insertRawText(d)}else a!=null&&lP(o,s,a,n.timeStamp,!0)?(n.preventDefault(),xe(r,Pl,a)):gl=a;sP=n.timeStamp}}))})(t,e)]);let hc=0,iP=null,sP=0,gl=null;const Wh=new WeakMap;let TO=!1,EO=!1,dc=!1,Va=!1,wg=!1,kg="",yo=null,oP=[0,"",0,"root",0];function lP(t,e,n,r,i){const s=t.anchor,o=t.focus,l=s.getNode(),a=_t(),c=di(fr(a)),u=c!==null?c.anchorNode:null,f=s.key,h=a.getElementByKey(f),d=n.length;return f!==o.key||!Ce(l)||(!i&&(!Nh||sP<r+50)||l.isDirty()&&d<2||LP(n))&&s.offset!==o.offset&&!l.isComposing()||Ri(l)||l.isDirty()&&d>1||(i||!Nh)&&h!==null&&!l.isComposing()&&u!==Fo(h)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||l.getFormat()!==t.format||l.getStyle()!==t.style||(function(p,g){if(g.isSegmented())return!0;if(!p.isCollapsed())return!1;const O=p.anchor.offset,x=g.getParentOrThrow(),m=Is(g);return O===0?!g.canInsertTextBefore()||!x.canInsertTextBefore()&&!g.isComposing()||m||(function(y){const b=y.getPreviousSibling();return(Ce(b)||J(b)&&b.isInline())&&!b.canInsertTextAfter()})(g):O===g.getTextContentSize()&&(!g.canInsertTextAfter()||!x.canInsertTextAfter()&&!g.isComposing()||m)})(t,l)}function Gv(t,e){return xi(t)&&t.nodeValue!==null&&e!==0&&e!==t.nodeValue.length}function Kv(t,e,n){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:o}=t;TO&&(TO=!1,Gv(r,i)&&Gv(s,o)&&!yo)||Wn(e,(()=>{if(!n)return void Ln(null);if(!$u(e,r,s))return;let l=Ke();if(yo&&Ae(l)&&l.isCollapsed()){const a=l.anchor,c=yo.anchor;(a.key===c.key&&a.offset===c.offset+1||a.offset===1&&c.getNode().is(a.getNode().getPreviousSibling()))&&(l=yo.clone(),Ln(l))}if(yo=null,Ae(l)){const a=l.anchor,c=a.getNode();if(l.isCollapsed()){t.type==="Range"&&t.anchorNode===t.focusNode&&(l.dirty=!0);const u=fr(e).event,f=u?u.timeStamp:performance.now(),[h,d,p,g,O]=oP,x=Rn(),m=e.isComposing()===!1&&x.getTextContent()==="";if(f<O+200&&a.offset===p&&a.key===g)ih(l,h,d);else if(a.type==="text")Ce(c)||te(141),aP(l,c);else if(a.type==="element"&&!m){J(c)||te(259);const y=a.getNode();y.isEmpty()?(function(b,S){const v=S.getTextFormat(),w=S.getTextStyle();ih(b,v,w)})(l,y):ih(l,0,"")}}else{const u=a.key,f=l.focus.key,h=l.getNodes(),d=h.length,p=l.isBackward(),g=p?o:i,O=p?i:o,x=p?f:u,m=p?u:f;let y=CE,b=!1;for(let S=0;S<d;S++){const v=h[S],w=v.getTextContentSize();if(Ce(v)&&w!==0&&!(S===0&&v.__key===x&&g===w||S===d-1&&v.__key===m&&O===0)&&(b=!0,y&=v.getFormat(),y===0))break}l.format=b?y:0}}xe(e,Ox,void 0)}))}function ih(t,e,n){t.format===e&&t.style===n||(t.format=e,t.style=n,t.dirty=!0)}function aP(t,e){ih(t,e.getFormat(),e.getStyle())}function cP(t){if(!t.getTargetRanges)return null;const e=t.getTargetRanges();return e.length===0?null:e[0]}function ff(t,e){const n=t._compositionKey;if(Xt(null),n!==null&&e!=null){if(e===""){const r=Bt(n),i=Fo(t.getElementByKey(n));return void(i!==null&&i.nodeValue!==null&&Ce(r)&&Nx(r,i.nodeValue,null,null,!0))}if(e[e.length-1]===`
50
+ `){const r=Ke();if(Ae(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void xe(t,Xh,null)}}}Ix(!0,t,e)}function uP(t){let e=t.__lexicalEventHandles;return e===void 0&&(e=[],t.__lexicalEventHandles=e),e}const Al=new Map;function fP(t){const e=jP(t.target);if(e===null)return;const n=Rx(e.anchorNode);if(n===null)return;EO&&(EO=!1,Wn(n,(()=>{const a=nl(),c=e.anchorNode;(vn(c)||xi(c))&&Ln(_x(a,e,n,t))})));const r=Lx(n),i=r[r.length-1],s=i._key,o=Al.get(s),l=o||i;l!==n&&Kv(e,l,!1),Kv(e,n,!0),n!==i?Al.set(s,n):o&&Al.delete(s)}function Jv(t){t._lexicalHandled=!0}function eS(t){return t._lexicalHandled===!0}function KN(t){const e=t.ownerDocument,n=Wh.get(e);if(n===void 0)return;const r=n-1;r>=0||te(164),Wh.set(e,r),r===0&&e.removeEventListener("selectionchange",fP);const i=Qu(t);Cp(i)?((function(o){if(o._parentEditor!==null){const l=Lx(o),a=l[l.length-1]._key;Al.get(a)===o&&Al.delete(a)}else Al.delete(o._key)})(i),t.__lexicalEditor=null):i&&te(198);const s=uP(t);for(let o=0;o<s.length;o++)s[o]();t.__lexicalEventHandles=[]}function PO(t,e,n){Jt();const r=t.__key,i=t.getParent();if(i===null)return;const s=(function(l){const a=Ke();if(!Ae(a)||!J(l))return a;const{anchor:c,focus:u}=a,f=c.getNode(),h=u.getNode();return Uh(f,l)&&c.set(l.__key,0,"element"),Uh(h,l)&&u.set(l.__key,0,"element"),a})(t);let o=!1;if(Ae(s)&&e){const l=s.anchor,a=s.focus;l.key===r&&(Hh(l,t,i,t.getPreviousSibling(),t.getNextSibling()),o=!0),a.key===r&&(Hh(a,t,i,t.getPreviousSibling(),t.getNextSibling()),o=!0)}else vp(s)&&e&&t.isSelected()&&t.selectPrevious();if(Ae(s)&&e&&!o){const l=t.getIndexWithinParent();Ns(t),jh(s,i,l,-1)}else Ns(t);n||as(i)||i.canBeEmpty()||!i.isEmpty()||PO(i,e),e&&s&&nn(i)&&i.isEmpty()&&i.selectEnd()}function JN(t){return t}class ma{static getType(){const{ownNodeType:e}=Pp(this);return e===void 0&&te(64,this.name),e}static clone(e){te(65,this.name)}$config(){return{}}config(e,n){const r=n.extends||Object.getPrototypeOf(this.constructor);return Object.assign(n,{extends:r,type:e}),{[e]:n}}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))}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),$P(this,e)}getType(){return this.__type}isInline(){te(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const n=Bt(e);if(n===null)break;e=n.__parent}return!1}isSelected(e){const n=e||Ke();if(n==null)return!1;const r=n.getNodes().some((i=>i.__key===this.__key));if(Ce(this))return r;if(Ae(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(pt(this)&&this.isInline()&&i){const s=n.isBackward()?n.focus:n.anchor;if(i.is(s.getNode())&&s.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let n=e.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:Bt(e)}getParentOrThrow(){const e=this.getParent();return e===null&&te(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const n=e.getParent();if(as(n))return J(e)||e===this&&pt(e)||te(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&te(67,this.__key),e}getParents(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n),n=n.getParent();return e}getParentKeys(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n.__key),n=n.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:Bt(e)}getPreviousSiblings(){const e=[],n=this.getParent();if(n===null)return e;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)e.push(r),r=r.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:Bt(e)}getNextSiblings(){const e=[];let n=this.getNextSibling();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getCommonAncestor(e){const n=J(this)?this:this.getParent(),r=J(e)?e:e.getParent(),i=n&&r?mc(n,r):null;return i?i.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const n=mc(this,e);return n!==null&&(n.type==="descendant"||(n.type==="branch"?qx(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&te(279),!1)))}isParentOf(e){const n=mc(this,e);return n!==null&&n.type==="ancestor"}getNodesBetween(e){const n=this.isBefore(e),r=[],i=new Set;let s=this;for(;s!==null;){const o=s.__key;if(i.has(o)||(i.add(o),r.push(s)),s===e)break;const l=J(s)?n?s.getFirstChild():s.getLastChild():null;if(l!==null){s=l;continue}const a=n?s.getNextSibling():s.getPreviousSibling();if(a!==null){s=a;continue}const c=s.getParentOrThrow();if(i.has(c.__key)||r.push(c),c===e)break;let u=null,f=c;do{if(f===null&&te(68),u=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),f===null)break;u!==null||i.has(f.__key)||r.push(f)}while(u===null);s=u}return n||r.reverse(),r}isDirty(){const e=_t()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){const e=Bt(this.__key);return e===null&&te(113),e}getWritable(){Jt();const e=co(),n=_t(),r=e._nodeMap,i=this.__key,s=this.getLatest(),o=n._cloneNotNeeded,l=Ke();if(l!==null&&l.setCachedNodes(null),o.has(i))return Yh(s),s;const a=YP(s);return o.add(i),Yh(a),r.set(i,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){te(70)}updateDOM(e,n,r){te(71)}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){te(18,this.name)}updateFromJSON(e){return(function(n,r){const i=n.getWritable(),s=r.$;let o=s;for(const l of ME(i).flatKeys)l in r&&(o!==void 0&&o!==s||(o={...s}),o[l]=r[l]);return(i.__state||o)&&QE(n).updateFromJSON(o),i})(this,e)}static transform(){return null}remove(e){PO(this,!0,e)}replace(e,n){Jt();let r=Ke();r!==null&&(r=r.clone()),Ag(this,e);const i=this.getLatest(),s=this.__key,o=e.__key,l=e.getWritable(),a=this.getParentOrThrow().getWritable(),c=a.__size;Ns(l);const u=i.getPreviousSibling(),f=i.getNextSibling(),h=i.__prev,d=i.__next,p=i.__parent;if(PO(i,!1,!0),u===null?a.__first=o:u.getWritable().__next=o,l.__prev=h,f===null?a.__last=o:f.getWritable().__prev=o,l.__next=d,l.__parent=p,a.__size=c,n&&(J(this)&&J(l)||te(139),this.getChildren().forEach((g=>{l.append(g)}))),Ae(r)){Ln(r);const g=r.anchor,O=r.focus;g.key===s&&iS(g,l),O.key===s&&iS(O,l)}return Ps()===s&&Xt(o),l}insertAfter(e,n=!0){Jt(),Ag(this,e);const r=this.getWritable(),i=e.getWritable(),s=i.getParent(),o=Ke();let l=!1,a=!1;if(s!==null){const d=e.getIndexWithinParent();if(Ns(i),Ae(o)){const p=s.__key,g=o.anchor,O=o.focus;l=g.type==="element"&&g.key===p&&g.offset===d+1,a=O.type==="element"&&O.key===p&&O.offset===d+1}}const c=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),f=i.__key,h=r.__next;if(c===null?u.__last=f:c.getWritable().__prev=f,u.__size++,r.__next=f,i.__next=h,i.__prev=r.__key,i.__parent=r.__parent,n&&Ae(o)){const d=this.getIndexWithinParent();jh(o,u,d+1);const p=u.__key;l&&o.anchor.set(p,d+2,"element"),a&&o.focus.set(p,d+2,"element")}return e}insertBefore(e,n=!0){Jt(),Ag(this,e);const r=this.getWritable(),i=e.getWritable(),s=i.__key;Ns(i);const o=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=r.__prev,c=this.getIndexWithinParent();o===null?l.__first=s:o.getWritable().__next=s,l.__size++,r.__prev=s,i.__prev=a,i.__next=r.__key,i.__parent=r.__parent;const u=Ke();return n&&Ae(u)&&jh(u,this.getParentOrThrow(),c),e}isParentRequired(){return!1}createParentElementNode(){return Wi()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,n){Jt();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(J(r))return r.select();if(!Ce(r)){const s=r.getIndexWithinParent()+1;return i.select(s,s)}return r.select(e,n)}selectNext(e,n){Jt();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(J(r))return r.select(0,0);if(!Ce(r)){const s=r.getIndexWithinParent();return i.select(s,s)}return r.select(e,n)}markDirty(){this.getWritable()}reconcileObservedMutation(e,n){this.markDirty()}}class Oa extends ma{static getType(){return"linebreak"}static clone(e){return new Oa(e.__key)}constructor(e){super(e)}getTextContent(){return`
51
+ `}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(n){const r=n.parentElement;if(r!==null&&MO(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&hf(i)){const s=r.lastChild;if(s===n||s.previousSibling===n&&hf(s))return!0}}return!1})(e)||(function(n){const r=n.parentElement;if(r!==null&&MO(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&hf(i))return!1;const s=r.lastChild;if(s===n||s.previousSibling===n&&hf(s))return!0}return!1})(e)?null:{conversion:eD,priority:0}}}static importJSON(e){return Hl().updateFromJSON(e)}}function eD(t){return{node:Hl()}}function Hl(){return Ru(new Oa)}function To(t){return t instanceof Oa}function hf(t){return xi(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}function Cg(t,e){return 16&e?"code":e&mp?"mark":32&e?"sub":64&e?"sup":null}function _g(t,e){return 1&e?"strong":2&e?"em":"span"}function hP(t,e,n,r,i){const s=r.classList;let o=$l(i,"base");o!==void 0&&s.add(...o),o=$l(i,"underlineStrikethrough");let l=!1;const a=e&Nc&&e&Ic;o!==void 0&&(n&Nc&&n&Ic?(l=!0,a||s.add(...o)):a&&s.remove(...o));for(const c in zs){const u=zs[c];if(o=$l(i,c),o!==void 0)if(n&u){if(l&&(c==="underline"||c==="strikethrough")){e&u&&s.remove(...o);continue}e&u&&(!a||c!=="underline")&&c!=="strikethrough"||s.add(...o)}else e&u&&s.remove(...o)}}function dP(t,e,n){const r=e.firstChild,i=n.isComposing(),s=t+(i?Op:"");if(r==null)e.textContent=s;else{const o=r.nodeValue;if(o!==s)if(i||Io){const[l,a,c]=(function(u,f){const h=u.length,d=f.length;let p=0,g=0;for(;p<h&&p<d&&u[p]===f[p];)p++;for(;g+p<h&&g+p<d&&u[h-g-1]===f[d-g-1];)g++;return[p,h-p-g,f.slice(p,d-g)]})(o,s);a!==0&&r.deleteData(l,a),r.insertData(l,c)}else r.nodeValue=s}}function tS(t,e,n,r,i,s){dP(i,t,e);const o=s.theme.text;o!==void 0&&hP(0,0,r,t,o)}function df(t,e){const n=document.createElement(e);return n.appendChild(t),n}class el extends ma{static getType(){return"text"}static clone(e){return new el(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",n){super(n),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return MN[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Ps()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const n=zs[e];return!!(this.getFormat()&n)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,n){return qh(this.getLatest().__format,e,n)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,n){const r=this.__format,i=Cg(0,r),s=_g(0,r),o=i===null?s:i,l=document.createElement(o);let a=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),i!==null&&(a=document.createElement(s),l.appendChild(a)),tS(a,this,0,r,this.__text,e);const c=this.__style;return c!==""&&(l.style.cssText=c),l}updateDOM(e,n,r){const i=this.__text,s=e.__format,o=this.__format,l=Cg(0,s),a=Cg(0,o),c=_g(0,s),u=_g(0,o);if((l===null?c:l)!==(a===null?u:a))return!0;if(l===a&&c!==u){const g=n.firstChild;g==null&&te(48);const O=document.createElement(u);return tS(O,this,0,o,i,r),n.replaceChild(O,g),!1}let f=n;a!==null&&l!==null&&(f=n.firstChild,f==null&&te(49)),dP(i,f,this);const h=r.theme.text;h!==void 0&&s!==o&&hP(0,s,o,f,h);const d=e.__style,p=this.__style;return d!==p&&(n.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:iD,priority:0}),b:()=>({conversion:nD,priority:0}),code:()=>({conversion:Ti,priority:0}),em:()=>({conversion:Ti,priority:0}),i:()=>({conversion:Ti,priority:0}),mark:()=>({conversion:Ti,priority:0}),s:()=>({conversion:Ti,priority:0}),span:()=>({conversion:tD,priority:0}),strong:()=>({conversion:Ti,priority:0}),sub:()=>({conversion:Ti,priority:0}),sup:()=>({conversion:Ti,priority:0}),u:()=>({conversion:Ti,priority:0})}}static importJSON(e){return zt().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:n}=super.exportDOM(e);return vn(n)||te(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=df(n,"b")),this.hasFormat("italic")&&(n=df(n,"i")),this.hasFormat("strikethrough")&&(n=df(n,"s")),this.hasFormat("underline")&&(n=df(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,n){}setFormat(e){const n=this.getWritable();return n.__format=typeof e=="string"?zs[e]:e,n}setDetail(e){const n=this.getWritable();return n.__detail=typeof e=="string"?AN[e]:e,n}setStyle(e){const n=this.getWritable();return n.__style=e,n}toggleFormat(e){const n=qh(this.getFormat(),e,null);return this.setFormat(n)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const n=QN[e];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(e){if(this.__text===e)return this;const n=this.getWritable();return n.__text=e,n}select(e,n){Jt();let r=e,i=n;const s=Ke(),o=this.getTextContent(),l=this.__key;if(typeof o=="string"){const a=o.length;r===void 0&&(r=a),i===void 0&&(i=a)}else r=0,i=0;if(!Ae(s))return mP(l,r,l,i,"text","text");{const a=Ps();a!==s.anchor.key&&a!==s.focus.key||Xt(l),s.setTextNodeRange(this,r,this,i)}return s}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,n,r,i){const s=this.getWritable(),o=s.__text,l=r.length;let a=e;a<0&&(a=l+a,a<0&&(a=0));const c=Ke();if(i&&Ae(c)){const f=e+l;c.setTextNodeRange(s,f,s,f)}const u=o.slice(0,a)+r+o.slice(a+n);return s.__text=u,s}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Jt();const n=this.getLatest(),r=n.getTextContent();if(r==="")return[];const i=n.__key,s=Ps(),o=r.length;e.sort(((_,T)=>_-T)),e.push(o);const l=[],a=e.length;for(let _=0,T=0;_<o&&T<=a;T++){const E=e[T];E>_&&(l.push(r.slice(_,E)),_=E)}const c=l.length;if(c===1)return[n];const u=l[0],f=n.getParent();let h;const d=n.getFormat(),p=n.getStyle(),g=n.__detail;let O=!1,x=null,m=null;const y=Ke();if(Ae(y)){const[_,T]=y.isBackward()?[y.focus,y.anchor]:[y.anchor,y.focus];_.type==="text"&&_.key===i&&(x=_),T.type==="text"&&T.key===i&&(m=T)}n.isSegmented()?(h=zt(u),h.__format=d,h.__style=p,h.__detail=g,h.__state=Wv(n,h),O=!0):h=n.setTextContent(u);const b=[h];for(let _=1;_<c;_++){const T=zt(l[_]);T.__format=d,T.__style=p,T.__detail=g,T.__state=Wv(n,T);const E=T.__key;s===i&&Xt(E),b.push(T)}const S=x?x.offset:null,v=m?m.offset:null;let w=0;for(const _ of b){if(!x&&!m)break;const T=w+_.getTextContentSize();if(x!==null&&S!==null&&S<=T&&S>=w&&(x.set(_.getKey(),S-w,"text"),S<T&&(x=null)),m!==null&&v!==null&&v<=T&&v>=w){m.set(_.getKey(),v-w,"text");break}w=T}if(f!==null){(function(E){const L=E.getPreviousSibling(),M=E.getNextSibling();L!==null&&Yh(L),M!==null&&Yh(M)})(this);const _=f.getWritable(),T=this.getIndexWithinParent();O?(_.splice(T,0,b),this.remove()):_.splice(T,1,b),Ae(y)&&jh(y,f,T,c-1)}return b}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||te(50);const r=this.__key,i=e.__key,s=this.__text,o=s.length;Ps()===i&&Xt(r);const l=Ke();if(Ae(l)){const f=l.anchor,h=l.focus;f!==null&&f.key===i&&fS(f,n,r,e,o),h!==null&&h.key===i&&fS(h,n,r,e,o)}const a=e.__text,c=n?a+s:s+a;this.setTextContent(c);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function tD(t){return{forChild:wx(t.style),node:null}}function nD(t){const e=t,n=e.style.fontWeight==="normal";return{forChild:wx(e.style,n?void 0:"bold"),node:null}}const nS=new WeakMap;function rD(t){if(!vn(t))return!1;if(t.nodeName==="PRE")return!0;const e=t.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function iD(t){const e=t;t.parentElement===null&&te(129);let n=e.textContent||"";if((function(r){let i,s=r.parentNode;const o=[r];for(;s!==null&&(i=nS.get(s))===void 0&&!rD(s);)o.push(s),s=s.parentNode;const l=i===void 0?s:i;for(let a=0;a<o.length;a++)nS.set(o[a],l);return l})(e)!==null){const r=n.split(/(\r?\n|\t)/),i=[],s=r.length;for(let o=0;o<s;o++){const l=r[o];l===`
52
+ `||l===`\r
53
+ `?i.push(Hl()):l===" "?i.push(yp()):l!==""&&i.push(zt(l))}return{node:i}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=e,i=!0;for(;r!==null&&(r=rS(r,!1))!==null;){const s=r.textContent||"";if(s.length>0){/[ \t\n]$/.test(s)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=e,i=!0;for(;r!==null&&(r=rS(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:zt(n)}}function rS(t,e){let n=t;for(;;){let r;for(;(r=e?n.nextSibling:n.previousSibling)===null;){const s=n.parentElement;if(s===null)return null;n=s}if(n=r,vn(n)){const s=n.style.display;if(s===""&&!qP(n)||s!==""&&!s.startsWith("inline"))return null}let i=n;for(;(i=e?n.firstChild:n.lastChild)!==null;)n=i;if(xi(n))return n;if(n.nodeName==="BR")return null}}const sD={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ti(t){const e=sD[t.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:wx(t.style,e),node:null}}function zt(t=""){return Ru(new el(t))}function Ce(t){return t instanceof el}function wx(t,e){const n=t.fontWeight,r=t.textDecoration.split(" "),i=n==="700"||n==="bold",s=r.includes("line-through"),o=t.fontStyle==="italic",l=r.includes("underline"),a=t.verticalAlign;return c=>(Ce(c)&&(i&&!c.hasFormat("bold")&&c.toggleFormat("bold"),s&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),o&&!c.hasFormat("italic")&&c.toggleFormat("italic"),l&&!c.hasFormat("underline")&&c.toggleFormat("underline"),a!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),a!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),e&&!c.hasFormat(e)&&c.toggleFormat(e)),c)}class xa extends el{static getType(){return"tab"}static clone(e){return new xa(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){const n=super.createDOM(e),r=$l(e.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(e){return yp().updateFromJSON(e)}setTextContent(e){return e!==" "&&e!==""&&te(126),super.setTextContent(" ")}spliceText(e,n,r,i){return r===""&&n===0||r===" "&&n===1||te(286),this}setDetail(e){return e!==2&&te(127),this}setMode(e){return e!=="normal"&&te(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function yp(){return Ru(new xa)}function kx(t){return t instanceof xa}class oD{constructor(e,n,r){this._selection=null,this.key=e,this.offset=n,this.type=r}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:Hx(_r(js(this,"next")),_r(js(e,"next")))<0}getNode(){const e=Bt(this.key);return e===null&&te(20),e}set(e,n,r,i){const s=this._selection,o=this.key;i&&this.key===e&&this.offset===n&&this.type===r||(this.key=e,this.offset=n,this.type=r,ya()||(Ps()===o&&Xt(e),s!==null&&(s.setCachedNodes(null),s.dirty=!0)))}}function Rr(t,e,n){return new oD(t,e,n)}function Tg(t,e){let n=e.__key,r=t.offset,i="element";if(Ce(e)){i="text";const s=e.getTextContentSize();r>s&&(r=s)}else if(!J(e)){const s=e.getNextSibling();if(Ce(s))n=s.__key,r=0,i="text";else{const o=e.getParent();o&&(n=o.__key,r=e.getIndexWithinParent()+1)}}t.set(n,r,i)}function iS(t,e){if(J(e)){const n=e.getLastDescendant();J(n)||Ce(n)?Tg(t,n):Tg(t,e)}else Tg(t,e)}class bp{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!vp(e))return!1;const n=this._nodes,r=e._nodes;return n.size===r.size&&Array.from(n).every((i=>r.has(i)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new bp(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const n=this.getNodes(),r=n.length,i=n[r-1];let s;if(Ce(i))s=i.select();else{const o=i.getIndexWithinParent()+1;s=i.getParentOrThrow().select(o,o)}s.insertNodes(e);for(let o=0;o<r;o++)n[o].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=this._nodes,r=[];for(const i of n){const s=Bt(i);s!==null&&r.push(s)}return ya()||(this._cachedNodes=r),r}getTextContent(){const e=this.getNodes();let n="";for(let r=0;r<e.length;r++)n+=e[r].getTextContent();return n}deleteNodes(){const e=this.getNodes();if((Ke()||nl())===this&&e[0]){const n=Yt(e[0],"next");eA(Ws(n,n))}for(const n of e)n.remove()}}function Ae(t){return t instanceof tl}class tl{constructor(e,n,r,i){this.anchor=e,this.focus=n,e._selection=this,n._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!Ae(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=(function(r){const i=[],[s,o]=r.getTextSlices();s&&i.push(s.caret.origin);const l=new Set,a=new Set;for(const c of r)if(Pr(c)){const{origin:u}=c;i.length===0?l.add(u):(a.add(u),i.push(u))}else{const{origin:u}=c;J(u)&&a.has(u)||i.push(u)}if(o&&i.push(o.caret.origin),Xo(r.focus)&&J(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let c=Ji(r.focus.origin,"previous");Pr(c)&&l.has(c.origin)&&!c.origin.isEmpty()&&c.origin.is(i[i.length-1]);c=Ap(c))l.delete(c.origin),i.pop();for(;i.length>1;){const c=i[i.length-1];if(!J(c)||a.has(c)||c.isEmpty()||l.has(c))break;i.pop()}if(i.length===0&&r.isCollapsed()){const c=_r(r.anchor),u=_r(r.anchor.getFlipped()),f=d=>ji(d)?d.origin:d.getNodeAtCaret(),h=f(c)||f(u)||(r.anchor.getNodeAtCaret()?c.origin:u.origin);i.push(h)}return i})(Yx(LO(this),"next"));return ya()||(this._cachedNodes=n),n}setTextNodeRange(e,n,r,i){this.anchor.set(e.__key,n,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const n=e[0],r=e[e.length-1],i=this.anchor,s=this.focus,o=i.isBefore(s),[l,a]=AO(this);let c="",u=!0;for(let f=0;f<e.length;f++){const h=e[f];if(J(h)&&!h.isInline())u||(c+=`
54
+ `),u=!h.isEmpty();else if(u=!1,Ce(h)){let d=h.getTextContent();h===n?h===r?i.type==="element"&&s.type==="element"&&s.offset!==i.offset||(d=l<a?d.slice(l,a):d.slice(a,l)):d=o?d.slice(l):d.slice(a):h===r&&(d=o?d.slice(0,a):d.slice(0,l)),c+=d}else!pt(h)&&!To(h)||h===r&&this.isCollapsed()||(c+=h.getTextContent())}return c}applyDOMRange(e){const n=_t(),r=n.getEditorState()._selection,i=gP(e.startContainer,e.startOffset,e.endContainer,e.endOffset,n,r);if(i===null)return;const[s,o]=i;this.anchor.set(s.key,s.offset,s.type,!0),this.focus.set(o.key,o.offset,o.type,!0),Vh(this)}clone(){const e=this.anchor,n=this.focus;return new tl(Rr(e.key,e.offset,e.type),Rr(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=qh(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const n=zs[e];return!!(this.format&n)}insertRawText(e){const n=e.split(/(\r?\n|\t)/),r=[],i=n.length;for(let s=0;s<i;s++){const o=n[s];o===`
55
+ `||o===`\r
56
+ `?r.push(Hl()):o===" "?r.push(yp()):r.push(zt(o))}this.insertNodes(r)}insertText(e){const n=this.anchor,r=this.focus,i=this.format,s=this.style;let o=n,l=r;!this.isCollapsed()&&r.isBefore(n)&&(o=r,l=n),o.type==="element"&&(function(O,x,m,y){const b=O.getNode(),S=b.getChildAtIndex(O.offset),v=zt();if(v.setFormat(m),v.setStyle(y),EP(S))S.splice(0,0,[v]);else{const w=nn(b)?Wi().append(v):v;S===null?b.append(w):S.insertBefore(w)}O.is(x)&&x.set(v.__key,0,"text"),O.set(v.__key,0,"text")})(o,l,i,s),l.type==="element"&&ql(l,_r(js(l,"next")));const a=o.offset;let c=l.offset;const u=this.getNodes(),f=u.length;let h=u[0];Ce(h)||te(26);const d=h.getTextContent().length,p=h.getParentOrThrow();let g=u[f-1];if(f===1&&l.type==="element"&&(c=d,l.set(o.key,c,"text")),this.isCollapsed()&&a===d&&(Ri(h)||!h.canInsertTextAfter()||!p.canInsertTextAfter()&&h.getNextSibling()===null)){let O=h.getNextSibling();if(Ce(O)&&O.canInsertTextBefore()&&!Ri(O)||(O=zt(),O.setFormat(i),O.setStyle(s),p.canInsertTextAfter()?h.insertAfter(O):p.insertAfter(O)),O.select(0,0),h=O,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&a===0&&(Ri(h)||!h.canInsertTextBefore()||!p.canInsertTextBefore()&&h.getPreviousSibling()===null)){let O=h.getPreviousSibling();if(Ce(O)&&!Ri(O)||(O=zt(),O.setFormat(i),p.canInsertTextBefore()?h.insertBefore(O):p.insertBefore(O)),O.select(),h=O,e!=="")return void this.insertText(e)}else if(h.isSegmented()&&a!==d){const O=zt(h.getTextContent());O.setFormat(i),h.replace(O),h=O}else if(!this.isCollapsed()&&e!==""){const O=g.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||J(O)&&(!O.canInsertTextBefore()||!O.canInsertTextAfter()))return this.insertText(""),pP(this.anchor,this.focus,null),void this.insertText(e)}if(f===1){if(Is(h)){const y=zt(e);return y.select(),void h.replace(y)}const O=h.getFormat(),x=h.getStyle();if(a!==c||O===i&&x===s){if(kx(h)){const y=zt(e);return y.setFormat(i),y.setStyle(s),y.select(),void h.replace(y)}}else{if(h.getTextContent()!==""){const y=zt(e);if(y.setFormat(i),y.setStyle(s),y.select(),a===0)h.insertBefore(y,!1);else{const[b]=h.splitText(a);b.insertAfter(y,!1)}return void(y.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}h.setFormat(i),h.setStyle(s)}const m=c-a;h=h.spliceText(a,m,e,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(h.isComposing()?this.anchor.offset-=e.length:(this.format=O,this.style=x))}else{const O=new Set([...h.getParentKeys(),...g.getParentKeys()]),x=J(h)?h:h.getParentOrThrow();let m=J(g)?g:g.getParentOrThrow(),y=g;if(!x.is(m)&&m.isInline())do y=m,m=m.getParentOrThrow();while(m.isInline());if(l.type==="text"&&(c!==0||g.getTextContent()==="")||l.type==="element"&&g.getIndexWithinParent()<c)if(Ce(g)&&!Is(g)&&c!==g.getTextContentSize()){if(g.isSegmented()){const _=zt(g.getTextContent());g.replace(_),g=_}nn(l.getNode())||l.type!=="text"||(g=g.spliceText(0,c,"")),O.add(g.__key)}else{const _=g.getParentOrThrow();_.canBeEmpty()||_.getChildrenSize()!==1?g.remove():_.remove()}else O.add(g.__key);const b=m.getChildren(),S=new Set(u),v=x.is(m),w=x.isInline()&&h.getNextSibling()===null?x:h;for(let _=b.length-1;_>=0;_--){const T=b[_];if(T.is(h)||J(T)&&T.isParentOf(h))break;T.isAttached()&&(!S.has(T)||T.is(y)?v||w.insertAfter(T,!1):T.remove())}if(!v){let _=m,T=null;for(;_!==null;){const E=_.getChildren(),L=E.length;(L===0||E[L-1].is(T))&&(O.delete(_.__key),T=_),_=_.getParent()}}if(Is(h))if(a===d)h.select();else{const _=zt(e);_.select(),h.replace(_)}else h=h.spliceText(a,d-a,e,!0),h.getTextContent()===""?h.remove():h.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let _=1;_<f;_++){const T=u[_],E=T.__key;O.has(E)||T.remove()}}}removeText(){const e=Ke()===this;Oc(this,tA(LO(this))),e&&Ke()!==this&&Ln(this)}formatText(e,n=null){if(this.isCollapsed())return this.toggleFormat(e),void Xt(null);const r=this.getNodes(),i=[];for(const b of r)Ce(b)&&i.push(b);const s=b=>{r.forEach((S=>{if(J(S)){const v=S.getFormatFlags(e,b);S.setTextFormat(v)}}))},o=i.length;if(o===0)return this.toggleFormat(e),Xt(null),void s(n);const l=this.anchor,a=this.focus,c=this.isBackward(),u=c?a:l,f=c?l:a;let h=0,d=i[0],p=u.type==="element"?0:u.offset;if(u.type==="text"&&p===d.getTextContentSize()&&(h=1,d=i[1],p=0),d==null)return;const g=d.getFormatFlags(e,n);s(g);const O=o-1;let x=i[O];const m=f.type==="text"?f.offset:x.getTextContentSize();if(d.is(x)){if(p===m)return;if(Ri(d)||p===0&&m===d.getTextContentSize())d.setFormat(g);else{const b=d.splitText(p,m),S=p===0?b[0]:b[1];S.setFormat(g),u.type==="text"&&u.set(S.__key,0,"text"),f.type==="text"&&f.set(S.__key,m-p,"text")}return void(this.format=g)}p===0||Ri(d)||([,d]=d.splitText(p),p=0),d.setFormat(g);const y=x.getFormatFlags(e,g);m>0&&(m===x.getTextContentSize()||Ri(x)||([x]=x.splitText(m)),x.setFormat(y));for(let b=h+1;b<O;b++){const S=i[b],v=S.getFormatFlags(e,y);S.setFormat(v)}u.type==="text"&&u.set(d.__key,p,"text"),f.type==="text"&&f.set(x.__key,m,"text"),this.format=g|y}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const p=Ke();return Ae(p)||te(134),p.insertNodes(e)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=Qg(n,Vi),i=e[e.length-1];if(J(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const p=Eg(this);r.splice(p,0,e),i.selectEnd()}return}if(!e.some((p=>(J(p)||pt(p))&&!p.isInline()))){J(r)||te(211,n.constructor.name,n.getType());const p=Eg(this);return r.splice(p,0,e),void i.selectEnd()}const s=(function(p){const g=Wi();let O=null;for(let x=0;x<p.length;x++){const m=p[x],y=To(m);if(y||pt(m)&&m.isInline()||J(m)&&m.isInline()||Ce(m)||m.isParentRequired()){if(O===null&&(O=m.createParentElementNode(),g.append(O),y))continue;O!==null&&O.append(m)}else g.append(m),O=null}return g})(e),o=s.getLastDescendant(),l=s.getChildren(),a=!J(r)||!r.isEmpty()?this.insertParagraph():null,c=l[l.length-1];let u=l[0];var f;J(f=u)&&Vi(f)&&!f.isEmpty()&&J(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(J(r)||te(211,n.constructor.name,n.getType()),r.append(...u.getChildren()),u=l[1]),u&&(r===null&&te(212,n.constructor.name,n.getType()),(function(p,g,O){const x=g.getParentOrThrow().getLastChild();let m=g;const y=[g];for(;m!==x;)m.getNextSibling()||te(140),m=m.getNextSibling(),y.push(m);let b=p;for(const S of y)b=b.insertAfter(S)})(r,u));const h=Qg(o,Vi);a&&J(h)&&(a.canMergeWhenEmpty()||Vi(c))&&(h.append(...a.getChildren()),a.remove()),J(r)&&r.isEmpty()&&r.remove(),o.selectEnd();const d=J(r)?r.getLastChild():null;To(d)&&h!==r&&d.remove()}insertParagraph(){if(this.anchor.key==="root"){const o=Wi();return Rn().splice(this.anchor.offset,0,[o]),o.select(),o}const e=Eg(this),n=Qg(this.anchor.getNode(),Vi);J(n)||te(213);const r=n.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],s=n.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(e){const n=Hl();if(this.insertNodes([n]),e){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const e=this.getNodes(),n=e.length,r=n-1,i=this.anchor,s=this.focus;let o=e[0],l=e[r];const[a,c]=AO(this);if(n===0)return[];if(n===1){if(Ce(o)&&!this.isCollapsed()){const f=a>c?c:a,h=a>c?a:c,d=o.splitText(f,h),p=f===0?d[0]:d[1];return p!=null?[p]:[]}return[o]}const u=i.isBefore(s);if(Ce(o)){const f=u?a:c;f===o.getTextContentSize()?e.shift():f!==0&&([,o]=o.splitText(f),e[0]=o)}if(Ce(l)){const f=l.getTextContent().length,h=u?c:a;h===0?e.pop():h!==f&&([l]=l.splitText(h),e[r]=l)}return e}modify(e,n,r){if(hS(this,e,n,r))return;const i=e==="move",s=_t(),o=di(fr(s));if(!o)return;const l=s._blockCursorElement,a=s._rootElement,c=this.focus.getNode();if(a===null||l===null||!J(c)||c.isInline()||c.canBeEmpty()||QO(l,s,a),this.dirty){let u=Bo(s,this.anchor.key),f=Bo(s,this.focus.key);this.anchor.type==="text"&&(u=Fo(u)),this.focus.type==="text"&&(f=Fo(f)),u&&f&&xP(o,u,this.anchor.offset,f,this.focus.offset)}if((function(u,f,h,d){u.modify(f,h,d)})(o,e,n?"backward":"forward",r),o.rangeCount>0){const u=o.getRangeAt(0),f=this.anchor.getNode(),h=nn(f)?f:zP(f);if(this.applyDOMRange(u),this.dirty=!0,!i){const d=this.getNodes(),p=[];let g=!1;for(let O=0;O<d.length;O++){const x=d[O];Uh(x,h)?p.push(x):g=!0}if(g&&p.length>0)if(n){const O=p[0];J(O)?O.selectStart():O.getParentOrThrow().selectStart()}else{const O=p[p.length-1];J(O)?O.selectEnd():O.getParentOrThrow().selectEnd()}o.anchorNode===u.startContainer&&o.anchorOffset===u.startOffset||(function(O){const x=O.focus,m=O.anchor,y=m.key,b=m.offset,S=m.type;m.set(x.key,x.offset,x.type,!0),x.set(y,b,S,!0)})(this)}}r==="lineboundary"&&hS(this,e,n,r,"decorators")}forwardDeletion(e,n,r){if(!r&&(e.type==="element"&&J(n)&&e.offset===n.getChildrenSize()||e.type==="text"&&e.offset===n.getTextContentSize())){const i=n.getParent(),s=n.getNextSibling()||(i===null?null:i.getNextSibling());if(J(s)&&s.isShadowRoot())return!0}return!1}deleteCharacter(e){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,e))return;const s=Wx(js(r,e?"previous":"next"));if(s.getTextSlices().every((l=>l===null||l.distance===0))){let l={type:"initial"};for(const a of s.iterNodeCarets("shadowRoot"))if(Pr(a)){if(!a.origin.isInline()){if(a.origin.isShadowRoot()){if(l.type==="merge-block")break;if(J(s.anchor.origin)&&s.anchor.origin.isEmpty()){const c=_r(a);Oc(this,Ws(c,c)),s.anchor.origin.remove()}return}l.type!=="merge-next-block"&&l.type!=="merge-block"||(l={block:l.block,caret:a,type:"merge-block"})}}else{if(l.type==="merge-block")break;if(Xo(a)){if(J(a.origin)){if(a.origin.isInline()){if(!a.origin.isParentOf(s.anchor.origin))break}else l={block:a.origin,type:"merge-next-block"};continue}if(pt(a.origin)){if(!a.origin.isIsolated())if(l.type==="merge-next-block"&&(a.origin.isKeyboardSelectable()||!a.origin.isInline())&&J(s.anchor.origin)&&s.anchor.origin.isEmpty()){s.anchor.origin.remove();const c=Cx();c.add(a.origin.getKey()),Ln(c)}else a.origin.remove();return}break}}if(l.type==="merge-block"){const{caret:a,block:c}=l;return Oc(this,Ws(!a.origin.isEmpty()&&c.isEmpty()?ka(Yt(c,a.direction)):s.anchor,a)),this.removeText()}}const o=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&oS(this,r.getNode()))return}else{const l=o.type==="text"?o.getNode():null;if(i=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){const a=o.offset,c=l.getTextContentSize();if(l.is(i)||e&&a!==c||!e&&a!==0)return void lS(l,e,a)}else if(i!==null&&i.isSegmented()){const a=r.offset,c=i.getTextContentSize();if(i.is(l)||e&&a!==0||!e&&a!==c)return void lS(i,e,a)}(function(a,c){const u=a.anchor,f=a.focus,h=u.getNode(),d=f.getNode();if(h===d&&u.type==="text"&&f.type==="text"){const p=u.offset,g=f.offset,O=p<g,x=O?p:g,m=O?g:p,y=m-1;x!==y&&(function(b){return!(LP(b)||lD(b))})(h.getTextContent().slice(x,m))&&(c?f.set(f.key,y,f.type):u.set(u.key,y,u.type))}})(this,e)}}if(this.removeText(),e&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&nn(r.getParent())&&r.getPreviousSibling()===null&&oS(this,r)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function vp(t){return t instanceof bp}function sS(t){const e=t.offset;if(t.type==="text")return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function AO(t){const e=t.getStartEndPoints();if(e===null)return[0,0];const[n,r]=e;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[sS(n),sS(r)]}function oS(t,e){for(let n=e;n;n=n.getParent()){if(J(n)){if(n.collapseAtStart(t))return!0;if(as(n))break}if(n.getPreviousSibling())break}return!1}const lD=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function lS(t,e,n){const r=t,i=r.getTextContent().split(/(?=\s)/g),s=i.length;let o=0,l=0;for(let c=0;c<s;c++){const u=c===s-1;if(l=o,o+=i[c].length,e&&o===n||o>n||u){i.splice(c,1),u&&(l=void 0);break}}const a=i.join("").trim();a===""?r.remove():(r.setTextContent(a),r.select(l,l))}function aS(t,e,n,r){let i,s=e;if(vn(t)){let o=!1;const l=t.childNodes,a=l.length,c=r._blockCursorElement;s===a&&(o=!0,s=a-1);let u=l[s],f=!1;if(u===c)u=l[s+1],f=!0;else if(c!==null){const h=c.parentNode;t===h&&e>Array.prototype.indexOf.call(h.children,c)&&s--}if(i=bl(u),Ce(i))s=Ar(i,o?"next":"previous");else{let h=bl(t);if(h===null)return null;if(J(h)){const d=r.getElementByKey(h.getKey());d===null&&te(214),[h,s]=h.getDOMSlot(d).resolveChildIndex(h,d,t,e),J(h)||te(215),o&&s>=h.getChildrenSize()&&(s=Math.max(0,h.getChildrenSize()-1));let g=h.getChildAtIndex(s);if(J(g)&&(function(O,x,m){const y=O.getParent();return m===null||y===null||!y.canBeEmpty()||y!==m.getNode()})(g,0,n)){const O=o?g.getLastDescendant():g.getFirstDescendant();O===null?h=g:(g=O,h=J(g)?g:g.getParentOrThrow()),s=0}Ce(g)?(i=g,h=null,s=Ar(g,o?"next":"previous")):g!==h&&o&&!f&&(J(h)||te(216),s=Math.min(h.getChildrenSize(),s+1))}else{const d=h.getIndexWithinParent();s=e===0&&pt(h)&&bl(t)===h?d:d+1,h=h.getParentOrThrow()}if(J(h))return Rr(h.__key,s,"element")}}else i=bl(t);return Ce(i)?Rr(i.__key,Ar(i,s,"clamp"),"text"):null}function cS(t,e,n){const r=t.offset,i=t.getNode();if(r===0){const s=i.getPreviousSibling(),o=i.getParent();if(e){if((n||!e)&&s===null&&J(o)&&o.isInline()){const l=o.getPreviousSibling();Ce(l)&&t.set(l.__key,l.getTextContent().length,"text")}}else J(s)&&!n&&s.isInline()?t.set(s.__key,s.getChildrenSize(),"element"):Ce(s)&&t.set(s.__key,s.getTextContent().length,"text")}else if(r===i.getTextContent().length){const s=i.getNextSibling(),o=i.getParent();if(e&&J(s)&&s.isInline())t.set(s.__key,0,"element");else if((n||e)&&s===null&&J(o)&&o.isInline()&&!o.canInsertTextAfter()){const l=o.getNextSibling();Ce(l)&&t.set(l.__key,0,"text")}}}function pP(t,e,n){if(t.type==="text"&&e.type==="text"){const r=t.isBefore(e),i=t.is(e);cS(t,r,i),cS(e,!r,i),i&&e.set(t.key,t.offset,t.type);const s=_t();if(s.isComposing()&&s._compositionKey!==t.key&&Ae(n)){const o=n.anchor,l=n.focus;t.set(o.key,o.offset,o.type,!0),e.set(l.key,l.offset,l.type,!0)}}}function gP(t,e,n,r,i,s){if(t===null||n===null||!$u(i,t,n))return null;const o=aS(t,e,Ae(s)?s.anchor:null,i);if(o===null)return null;const l=aS(n,r,Ae(s)?s.focus:null,i);if(l===null)return null;if(o.type==="element"&&l.type==="element"){const a=bl(t),c=bl(n);if(pt(a)&&pt(c))return null}return pP(o,l,s),[o,l]}function aD(t){return J(t)&&!t.isInline()}function mP(t,e,n,r,i,s){const o=co(),l=new tl(Rr(t,e,i),Rr(n,r,s),0,"");return l.dirty=!0,o._selection=l,l}function OP(){const t=Rr("root",0,"element"),e=Rr("root",0,"element");return new tl(t,e,0,"")}function Cx(){return new bp(new Set)}function _x(t,e,n,r){const i=n._window;if(i===null)return null;const s=r||i.event,o=s?s.type:void 0,l=o==="selectionchange",a=!pO&&(l||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&s&&s.detail===3||o==="drop"||o===void 0);let c,u,f,h;if(Ae(t)&&!a)return t.clone();if(e===null)return null;if(c=e.anchorNode,u=e.focusNode,f=e.anchorOffset,h=e.focusOffset,l&&Ae(t)&&!$u(n,c,u))return t.clone();const d=gP(c,f,u,h,n,t);if(d===null)return null;const[p,g]=d;return new tl(p,g,Ae(t)?t.format:0,Ae(t)?t.style:"")}function Ke(){return co()._selection}function nl(){return _t()._editorState._selection}function jh(t,e,n,r=1){const i=t.anchor,s=t.focus,o=i.getNode(),l=s.getNode();if(!e.is(o)&&!e.is(l))return;const a=e.__key;if(t.isCollapsed()){const c=i.offset;if(n<=c&&r>0||n<c&&r<0){const u=Math.max(0,c+r);i.set(a,u,"element"),s.set(a,u,"element"),uS(t)}}else{const c=t.isBackward(),u=c?s:i,f=u.getNode(),h=c?i:s,d=h.getNode();if(e.is(f)){const p=u.offset;(n<=p&&r>0||n<p&&r<0)&&u.set(a,Math.max(0,p+r),"element")}if(e.is(d)){const p=h.offset;(n<=p&&r>0||n<p&&r<0)&&h.set(a,Math.max(0,p+r),"element")}}uS(t)}function uS(t){const e=t.anchor,n=e.offset,r=t.focus,i=r.offset,s=e.getNode(),o=r.getNode();if(t.isCollapsed()){if(!J(s))return;const l=s.getChildrenSize(),a=n>=l,c=a?s.getChildAtIndex(l-1):s.getChildAtIndex(n);if(Ce(c)){let u=0;a&&(u=c.getTextContentSize()),e.set(c.__key,u,"text"),r.set(c.__key,u,"text")}}else{if(J(s)){const l=s.getChildrenSize(),a=n>=l,c=a?s.getChildAtIndex(l-1):s.getChildAtIndex(n);if(Ce(c)){let u=0;a&&(u=c.getTextContentSize()),e.set(c.__key,u,"text")}}if(J(o)){const l=o.getChildrenSize(),a=i>=l,c=a?o.getChildAtIndex(l-1):o.getChildAtIndex(i);if(Ce(c)){let u=0;a&&(u=c.getTextContentSize()),r.set(c.__key,u,"text")}}}}function Hh(t,e,n,r,i){let s=null,o=0,l=null;r!==null?(s=r.__key,Ce(r)?(o=r.getTextContentSize(),l="text"):J(r)&&(o=r.getChildrenSize(),l="element")):i!==null&&(s=i.__key,Ce(i)?l="text":J(i)&&(l="element")),s!==null&&l!==null?t.set(s,o,l):(o=e.getIndexWithinParent(),o===-1&&(o=n.getChildrenSize()),t.set(n.__key,o,"element"))}function fS(t,e,n,r,i){t.type==="text"?t.set(n,t.offset+(e?0:i),"text"):t.offset>r.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function xP(t,e,n,r,i){try{t.setBaseAndExtent(e,n,r,i)}catch{}}function cD(t,e,n,r,i,s,o){const l=r.anchorNode,a=r.focusNode,c=r.anchorOffset,u=r.focusOffset,f=document.activeElement;if(i.has(kP)&&f!==s||f!==null&&Mx(f))return;if(!Ae(e))return void(t!==null&&$u(n,l,a)&&r.removeAllRanges());const h=e.anchor,d=e.focus,p=h.key,g=d.key,O=Bo(n,p),x=Bo(n,g),m=h.offset,y=d.offset,b=e.format,S=e.style,v=e.isCollapsed();let w=O,_=x,T=!1;if(h.type==="text"){w=Fo(O);const Z=h.getNode();T=Z.getFormat()!==b||Z.getStyle()!==S}else Ae(t)&&t.anchor.type==="text"&&(T=!0);var E,L,M,$,V;if(d.type==="text"&&(_=Fo(x)),w!==null&&_!==null&&(v&&(t===null||T||Ae(t)&&(t.format!==b||t.style!==S))&&(E=b,L=S,M=m,$=p,V=performance.now(),oP=[E,L,M,$,V]),c!==m||u!==y||l!==w||a!==_||r.type==="Range"&&v||(f!==null&&s.contains(f)||s.focus({preventScroll:!0}),h.type==="element"))){if(xP(r,w,m,_,y),!i.has(CP)&&e.isCollapsed()&&s!==null&&s===document.activeElement){const Z=Ae(e)&&e.anchor.type==="element"?w.childNodes[m]||null:r.rangeCount>0?r.getRangeAt(0):null;if(Z!==null){let Y;if(Z instanceof Text){const j=document.createRange();j.selectNode(Z),Y=j.getBoundingClientRect()}else Y=Z.getBoundingClientRect();(function(j,U,se){const Q=Vx(se),me=Fx(Q);if(Q===null||me===null)return;let{top:de,bottom:R}=U,$e=0,Qe=0,ke=se;for(;ke!==null;){const K=ke===Q.body;if(K)$e=0,Qe=fr(j).innerHeight;else{const ae=ke.getBoundingClientRect();$e=ae.top,Qe=ae.bottom}let ne=0;if(de<$e?ne=-($e-de):R>Qe&&(ne=R-Qe),ne!==0)if(K)me.scrollBy(0,ne);else{const ae=ke.scrollTop;ke.scrollTop+=ne;const fe=ke.scrollTop-ae;de-=fe,R-=fe}if(K)break;ke=Mu(ke)}})(n,Y,s)}}TO=!0}}function uD(t){let e=Ke()||nl();e===null&&(e=Rn().selectEnd()),e.insertNodes(t)}function Eg(t){let e=t;t.isCollapsed()||e.removeText();const n=Ke();Ae(n)&&(e=n),Ae(e)||te(161);const r=e.anchor;let i=r.getNode(),s=r.offset;for(;!Vi(i);){const o=i;if([i,s]=fD(i,s),o.is(i))break}return s}function fD(t,e){const n=t.getParent();if(!n){const i=Wi();return Rn().append(i),i.select(),[Rn(),0]}if(Ce(t)){const i=t.splitText(e);if(i.length===0)return[n,t.getIndexWithinParent()];const s=e===0?0:1;return[n,i[0].getIndexWithinParent()+s]}if(!J(t)||e===0)return[n,t.getIndexWithinParent()];const r=t.getChildAtIndex(e);if(r){const i=new tl(Rr(t.__key,e,"element"),Rr(t.__key,e,"element"),0,""),s=t.insertNewAfter(i);s&&s.append(r,...r.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function hS(t,e,n,r,i="decorators-and-blocks"){if(e==="move"&&r==="character"&&!t.isCollapsed()){const[u,f]=n===t.isBackward()?[t.focus,t.anchor]:[t.anchor,t.focus];return f.set(u.key,u.offset,u.type),!0}const s=js(t.focus,n?"previous":"next"),o=r==="lineboundary",l=e==="move";let a=s,c=i==="decorators-and-blocks";if(!nA(a)){for(const u of a){c=!1;const{origin:f}=u;if(!pt(f)||f.isIsolated()||(a=u,!o||!f.isInline()))break}if(c)for(const u of Wx(s).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(Pr(u))u.origin.isInline()||(a=u);else{if(J(u.origin))continue;pt(u.origin)&&!u.origin.isInline()&&(a=u)}break}}if(a===s)return!1;if(l&&!o&&pt(a.origin)&&a.origin.isKeyboardSelectable()){const u=Cx();return u.add(a.origin.getKey()),Ln(u),!0}return a=_r(a),l&&ql(t.anchor,a),ql(t.focus,a),c||!o}let Wt=null,jt=null,Mn=!1,Pg=!1,sh=0;const dS={characterData:!0,childList:!0,subtree:!0};function ya(){return Mn||Wt!==null&&Wt._readOnly}function Jt(){Mn&&te(13)}function yP(){sh>99&&te(14)}function co(){return Wt===null&&te(195,bP()),Wt}function _t(){return jt===null&&te(196,bP()),jt}function bP(){let t=0;const e=new Set,n=kp.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const s=Qu(i);if(Cp(s))t++;else if(s){let o=String(s.constructor.version||"<0.17.1");o===n&&(o+=" (separately built, likely a bundler configuration issue)"),e.add(o)}}let r=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(r+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),r}function hD(){return jt}function pS(t,e,n){const r=e.__type,i=$x(t,r);let s=n.get(r);s===void 0&&(s=Array.from(i.transforms),n.set(r,s));const o=s.length;for(let l=0;l<o&&(s[l](e),e.isAttached());l++);}function gS(t,e){return t!==void 0&&t.__key!==e&&t.isAttached()}function vP(t,e){if(!e)return;const n=t._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const i of r)n.add(i)}function dD(t){return Tx(t,_t()._nodes)}function Tx(t,e){const n=t.type,r=e.get(n);r===void 0&&te(17,n);const i=r.klass;t.type!==i.getType()&&te(18,i.name);const s=i.importJSON(t),o=t.children;if(J(s)&&Array.isArray(o))for(let l=0;l<o.length;l++){const a=Tx(o[l],e);s.append(a)}return s}function mS(t,e,n){const r=Wt,i=Mn,s=jt;Wt=e,Mn=!0,jt=t;try{return n()}finally{Wt=r,Mn=i,jt=s}}function Di(t,e){const n=t._pendingEditorState,r=t._rootElement,i=t._headless||r===null;if(n===null)return;const s=t._editorState,o=s._selection,l=n._selection,a=t._dirtyType!==No,c=Wt,u=Mn,f=jt,h=t._updating,d=t._observer;let p=null;if(t._pendingEditorState=null,t._editorState=n,!i&&a&&d!==null){jt=t,Wt=n,Mn=!1,t._updating=!0;try{const v=t._dirtyType,w=t._dirtyElements,_=t._dirtyLeaves;d.disconnect(),p=ZN(s,n,t,v,w,_)}catch(v){if(v instanceof Error&&t._onError(v),Pg)throw v;return PP(t,null,r,n),PE(t),t._dirtyType=jl,Pg=!0,Di(t,s),void(Pg=!1)}finally{d.observe(r,dS),t._updating=h,Wt=c,Mn=u,jt=f}}n._readOnly||(n._readOnly=!0);const g=t._dirtyLeaves,O=t._dirtyElements,x=t._normalizedNodes,m=t._updateTags,y=t._deferred;a&&(t._dirtyType=No,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set),(function(v,w){const _=v._decorators;let T=v._pendingDecorators||_;const E=w._nodeMap;let L;for(L in T)E.has(L)||(T===_&&(T=MP(v)),delete T[L])})(t,n);const b=i?null:di(fr(t));if(t._editable&&b!==null&&(a||l===null||l.dirty)&&r!==null&&!m.has(_P)){jt=t,Wt=n;try{if(d!==null&&d.disconnect(),a||l===null||l.dirty){const v=t._blockCursorElement;v!==null&&QO(v,t,r),cD(o,l,t,b,m,r)}(function(v,w,_){let T=v._blockCursorElement;if(Ae(_)&&_.isCollapsed()&&_.anchor.type==="element"&&w.contains(document.activeElement)){const E=_.anchor,L=E.getNode(),M=E.offset;let $=!1,V=null;if(M===L.getChildrenSize())$g(L.getChildAtIndex(M-1))&&($=!0);else{const Z=L.getChildAtIndex(M);if(Z!==null&&$g(Z)){const Y=Z.getPreviousSibling();(Y===null||$g(Y))&&($=!0,V=v.getElementByKey(Z.__key))}}if($){const Z=v.getElementByKey(L.__key);return T===null&&(v._blockCursorElement=T=(function(Y){const j=Y.theme,U=document.createElement("div");U.contentEditable="false",U.setAttribute("data-lexical-cursor","true");let se=j.blockCursor;if(se!==void 0){if(typeof se=="string"){const Q=wE(se);se=j.blockCursor=Q}se!==void 0&&U.classList.add(...se)}return U})(v._config)),w.style.caretColor="transparent",void(V===null?Z.appendChild(T):Z.insertBefore(T,V))}}T!==null&&QO(T,v,w)})(t,r,l)}finally{d!==null&&d.observe(r,dS),jt=f,Wt=c}}p!==null&&(function(v,w,_,T,E){const L=Array.from(v._listeners.mutation),M=L.length;for(let $=0;$<M;$++){const[V,Z]=L[$];for(const Y of Z){const j=w.get(Y);j!==void 0&&V(j,{dirtyLeaves:T,prevEditorState:E,updateTags:_})}}})(t,p,m,g,s),Ae(l)||l===null||o!==null&&o.is(l)||t.dispatchCommand(Ox,void 0);const S=t._pendingDecorators;S!==null&&(t._decorators=S,t._pendingDecorators=null,pc("decorator",t,!0,S)),(function(v,w,_){const T=vS(w),E=vS(_);T!==E&&pc("textcontent",v,!0,E)})(t,e||s,n),pc("update",t,!0,{dirtyElements:O,dirtyLeaves:g,editorState:n,mutatedNodes:p,normalizedNodes:x,prevEditorState:e||s,tags:m}),(function(v,w){if(v._deferred=[],w.length!==0){const _=v._updating;v._updating=!0;try{for(let T=0;T<w.length;T++)w[T]()}finally{v._updating=_}}})(t,y),(function(v){const w=v._updates;if(w.length!==0){const _=w.shift();if(_){const[T,E]=_;Sp(v,T,E)}}})(t)}function pc(t,e,n,...r){const i=e._updating;e._updating=n;try{const s=Array.from(e._listeners[t]);for(let o=0;o<s.length;o++)s[o].apply(null,r)}finally{e._updating=i}}function OS(t,e){const n=t._updates;let r=e||!1;for(;n.length!==0;){const i=n.shift();if(i){const[s,o]=i,l=t._pendingEditorState;let a;o!==void 0&&(a=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete&&(l===null&&te(191),l._flushSync=!0),a&&t._deferred.push(a),vP(t,o.tag)),l==null?Sp(t,s,o):s()}}return r}function Sp(t,e,n){const r=t._updateTags;let i,s=!1,o=!1;n!==void 0&&(i=n.onUpdate,vP(t,n.tag),s=n.skipTransforms||!1,o=n.discrete||!1),i&&t._deferred.push(i);const l=t._editorState;let a=t._pendingEditorState,c=!1;(a===null||a._readOnly)&&(a=t._pendingEditorState=SP(a||l),c=!0),a._flushSync=o;const u=Wt,f=Mn,h=jt,d=t._updating;Wt=a,Mn=!1,t._updating=!0,jt=t;const p=t._headless||t.getRootElement()===null;Ax(null);try{c&&(p?l._selection!==null&&(a._selection=l._selection.clone()):a._selection=(function(m,y){const b=m.getEditorState()._selection,S=di(fr(m));return Ae(b)||b==null?_x(b,S,m,y):b.clone()})(t,n&&n.event||null));const O=t._compositionKey;e(),s=OS(t,s),(function(m,y){const b=y.getEditorState()._selection,S=m._selection;if(Ae(S)){const v=S.anchor,w=S.focus;let _;if(v.type==="text"&&(_=v.getNode(),_.selectionTransform(b,S)),w.type==="text"){const T=w.getNode();_!==T&&T.selectionTransform(b,S)}}})(a,t),t._dirtyType!==No&&(s?(function(m,y){const b=y._dirtyLeaves,S=m._nodeMap;for(const v of b){const w=S.get(v);Ce(w)&&w.isAttached()&&w.isSimpleText()&&!w.isUnmergeable()&&qv(w)}})(a,t):(function(m,y){const b=y._dirtyLeaves,S=y._dirtyElements,v=m._nodeMap,w=Ps(),_=new Map;let T=b,E=T.size,L=S,M=L.size;for(;E>0||M>0;){if(E>0){y._dirtyLeaves=new Set;for(const $ of T){const V=v.get($);Ce(V)&&V.isAttached()&&V.isSimpleText()&&!V.isUnmergeable()&&qv(V),V!==void 0&&gS(V,w)&&pS(y,V,_),b.add($)}if(T=y._dirtyLeaves,E=T.size,E>0){sh++;continue}}y._dirtyLeaves=new Set,y._dirtyElements=new Map,L.delete("root")&&L.set("root",!0);for(const $ of L){const V=$[0],Z=$[1];if(S.set(V,Z),!Z)continue;const Y=v.get(V);Y!==void 0&&gS(Y,w)&&pS(y,Y,_)}T=y._dirtyLeaves,E=T.size,L=y._dirtyElements,M=L.size,sh++}y._dirtyLeaves=b,y._dirtyElements=S})(a,t),OS(t),(function(m,y,b,S){const v=m._nodeMap,w=y._nodeMap,_=[];for(const[T]of S){const E=w.get(T);E!==void 0&&(E.isAttached()||(J(E)&&_E(E,T,v,w,_,S),v.has(T)||S.delete(T),_.push(T)))}for(const T of _)w.delete(T);for(const T of b){const E=w.get(T);E===void 0||E.isAttached()||(v.has(T)||b.delete(T),w.delete(T))}})(l,a,t._dirtyLeaves,t._dirtyElements)),O!==t._compositionKey&&(a._flushSync=!0);const x=a._selection;if(Ae(x)){const m=a._nodeMap,y=x.anchor.key,b=x.focus.key;m.get(y)!==void 0&&m.get(b)!==void 0||te(19)}else vp(x)&&x._nodes.size===0&&(a._selection=null)}catch(O){return O instanceof Error&&t._onError(O),t._pendingEditorState=l,t._dirtyType=jl,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),void Di(t)}finally{Wt=u,Mn=f,jt=h,t._updating=d,sh=0}t._dirtyType!==No||t._deferred.length>0||(function(O,x){const m=x.getEditorState()._selection,y=O._selection;if(y!==null){if(y.dirty||!y.is(m))return!0}else if(m!==null)return!0;return!1})(a,t)?a._flushSync?(a._flushSync=!1,Di(t)):c&&kD((()=>{Di(t)})):(a._flushSync=!1,c&&(r.clear(),t._deferred=[],t._pendingEditorState=null))}function Wn(t,e,n){jt===t&&n===void 0?e():Sp(t,e,n)}class gc{constructor(e,n,r){this.element=e,this.before=n||null,this.after=r||null}withBefore(e){return new gc(this.element,e,this.after)}withAfter(e){return new gc(this.element,this.before,e)}withElement(e){return this.element===e?this:new gc(e,this.before,this.after)}insertChild(e){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&te(222),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&te(223),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&te(224),this.element.replaceChild(e,n),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{const n=e==="decorator"&&(Wl||Lc);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const n=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&n.removeChild(r),n.removeChild(e),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const n=this.getManagedLineBreak();if(n){if(e===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,s=document.createElement("br");if(r.insertBefore(s,i),e){const o=document.createElement("img");o.setAttribute("data-lexical-linebreak","true"),o.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",o.alt="",r.insertBefore(o,s),r.__lexicalLineBreak=o}else r.__lexicalLineBreak=s}getFirstChildOffset(){let e=0;for(let n=this.after;n!==null;n=n.previousSibling)e++;return e}resolveChildIndex(e,n,r,i){if(r===this.element){const a=this.getFirstChildOffset();return[e,Math.min(a+e.getChildrenSize(),Math.max(a,i))]}const s=xS(n,r);s.push(i);const o=xS(n,this.element);let l=e.getIndexWithinParent();for(let a=0;a<o.length;a++){const c=s[a],u=o[a];if(c===void 0||c<u)break;if(c>u){l+=1;break}}return[e.getParentOrThrow(),l]}}function xS(t,e){const n=[];let r=e;for(;r!==t&&r!==null;r=r.parentNode){let i=0;for(let s=r.previousSibling;s!==null;s=s.previousSibling)i++;n.push(i)}return r!==t&&te(225),n.reverse()}class ba extends ma{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=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),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 $N[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=_t()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){const e=[];let n=this.getFirstChild();for(;n!==null;){if(Ce(n)&&e.push(n),J(n)){const r=n.getAllTextNodes();e.push(...r)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;J(e);){const n=e.getFirstChild();if(n===null)break;e=n}return e}getLastDescendant(){let e=this.getLastChild();for(;J(e);){const n=e.getLastChild();if(n===null)break;e=n}return e}getDescendantByIndex(e){const n=this.getChildren(),r=n.length;if(e>=r){const s=n[r-1];return J(s)&&s.getLastDescendant()||s||null}const i=n[e];return J(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:Bt(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&te(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:Bt(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&te(96,this.__key),e}getChildAtIndex(e){const n=this.getChildrenSize();let r,i;if(e<n/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=e;){if(i===e)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=n-1;r!==null&&i>=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e="";const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const s=n[i];e+=s.getTextContent(),J(s)&&i!==r-1&&!s.isInline()&&(e+=Ki)}return e}getTextContentSize(){let e=0;const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const s=n[i];e+=s.getTextContentSize(),J(s)&&i!==r-1&&!s.isInline()&&(e+=Ki.length)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const n=Fv[e];return!!(this.getFormat()&n)}return!1}hasTextFormat(e){const n=zs[e];return!!(this.getTextFormat()&n)}getFormatFlags(e,n){return qh(this.getLatest().__textFormat,e,n)}getTextStyle(){return this.getLatest().__textStyle}select(e,n){Jt();const r=Ke();let i=e,s=n;const o=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&n===0){const a=this.getFirstChild();if(Ce(a)||J(a))return a.select(0,0)}else if(!(e!==void 0&&e!==o||n!==void 0&&n!==o)){const a=this.getLastChild();if(Ce(a)||J(a))return a.select()}}i===void 0&&(i=o),s===void 0&&(s=o);const l=this.__key;return Ae(r)?(r.anchor.set(l,i,"element"),r.focus.set(l,s,"element"),r.dirty=!0,r):mP(l,i,l,s,"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((n=>n.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const n=this.getWritable();return n.__dir=e,n}setFormat(e){return this.getWritable().__format=e!==""?Fv[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const n=this.getWritable();return n.__textFormat=e,n}setTextStyle(e){const n=this.getWritable();return n.__textStyle=e,n}setIndent(e){return this.getWritable().__indent=e,this}splice(e,n,r){const i=r.length,s=this.getChildrenSize(),o=this.getWritable();e+n<=s||te(226,String(e),String(n),String(s));const l=o.__key,a=[],c=[],u=this.getChildAtIndex(e+n);let f=null,h=s-n+i;if(e!==0)if(e===s)f=this.getLastChild();else{const p=this.getChildAtIndex(e);p!==null&&(f=p.getPreviousSibling())}if(n>0){let p=f===null?this.getFirstChild():f.getNextSibling();for(let g=0;g<n;g++){p===null&&te(100);const O=p.getNextSibling(),x=p.__key;Ns(p.getWritable()),c.push(x),p=O}}let d=f;for(let p=0;p<i;p++){const g=r[p];d!==null&&g.is(d)&&(f=d=d.getPreviousSibling());const O=g.getWritable();O.__parent===l&&h--,Ns(O);const x=g.__key;if(d===null)o.__first=x,O.__prev=null;else{const m=d.getWritable();m.__next=x,O.__prev=m.__key}g.__key===l&&te(76),O.__parent=l,a.push(x),d=g}if(e+n===s)d!==null&&(d.getWritable().__next=null,o.__last=d.__key);else if(u!==null){const p=u.getWritable();if(d!==null){const g=d.getWritable();p.__prev=d.__key,g.__next=u.__key}else p.__prev=null}if(o.__size=h,c.length){const p=Ke();if(Ae(p)){const g=new Set(c),O=new Set(a),{anchor:x,focus:m}=p;yS(x,g,O)&&Hh(x,x.getNode(),this,f,u),yS(m,g,O)&&Hh(m,m.getNode(),this,f,u),h!==0||this.canBeEmpty()||as(this)||this.remove()}}return o}getDOMSlot(e){return new gc(e)}exportDOM(e){const{element:n}=super.exportDOM(e);if(vn(n)){const r=this.getIndent();r>0&&(n.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(n.dir=i)}return{element:n}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),r=this.getTextStyle();return n!==0&&(e.textFormat=n),r!==""&&(e.textStyle=r),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,n){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,n,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,n){const r=this.getDOMSlot(e);let i=r.getFirstChild();for(let s=this.getFirstChild();s;s=s.getNextSibling()){const o=n.getElementByKey(s.getKey());o!==null&&(i==null?(r.insertChild(o),i=o):i!==o&&r.replaceChild(o,i),i=i.nextSibling)}}}function J(t){return t instanceof ba}function yS(t,e,n){let r=t.getNode();for(;r;){const i=r.__key;if(e.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class Ex extends ma{decorate(e,n){te(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function pt(t){return t instanceof Ex}class va extends ba{static getType(){return"root"}static clone(){return new va}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){te(51)}getTextContent(){const e=this.__cachedText;return!ya()&&_t()._dirtyType!==No||e===null?super.getTextContent():e}remove(){te(52)}replace(e){te(53)}insertBefore(e){te(54)}insertAfter(e){te(55)}updateDOM(e,n){return!1}splice(e,n,r){for(const i of r)J(i)||pt(i)||te(282);return super.splice(e,n,r)}static importJSON(e){return Rn().updateFromJSON(e)}collapseAtStart(){return!0}}function nn(t){return t instanceof va}function SP(t){return new wp(new Map(t._nodeMap))}function Px(){return new wp(new Map([["root",new va]]))}function wP(t){const e=t.exportJSON(),n=t.constructor;if(e.type!==n.getType()&&te(130,n.name),J(t)){const r=e.children;Array.isArray(r)||te(59,n.name);const i=t.getChildren();for(let s=0;s<i.length;s++){const o=wP(i[s]);r.push(o)}}return e}class wp{constructor(e,n){this._nodeMap=e,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,n){return mS(n&&n.editor||null,this,e)}clone(e){const n=new wp(this._nodeMap,e===void 0?this._selection:e);return n._readOnly=!0,n}toJSON(){return mS(null,this,(()=>({root:wP(Rn())})))}}const pD="historic",gD="history-push",oh="history-merge",mD="paste",kP="collaboration",CP="skip-scroll-into-view",_P="skip-dom-selection";class TP extends ba{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class Sa extends ba{static getType(){return"paragraph"}static clone(e){return new Sa(e.__key)}createDOM(e){const n=document.createElement("p"),r=$l(e.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(e,n,r){return!1}static importDOM(){return{p:e=>({conversion:OD,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(vn(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}static importJSON(e){return Wi().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,n){const r=Wi();r.setTextFormat(e.format),r.setTextStyle(e.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||Ce(e[0])&&e[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 OD(t){const e=Wi();return t.style&&(e.setFormat(t.style.textAlign),UP(t,e)),{node:e}}function Wi(){return Ru(new Sa)}function EP(t){return t instanceof Sa}const xD=0,yD=1,bD=3,vD=4;function PP(t,e,n,r){const i=t._keyToDOMMap;i.clear(),t._editorState=Px(),t._pendingEditorState=r,t._compositionKey=null,t._dirtyType=No,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,t._updateTags=new Set,t._updates=[],t._blockCursorElement=null;const s=t._observer;s!==null&&(s.disconnect(),t._observer=null),e!==null&&(e.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function SD(t){const e=t||{},n=hD(),r=e.theme||{},i=t===void 0?n:e.parentEditor||null,s=e.disableEvents||!1,o=Px(),l=e.namespace||(i!==null?i._config.namespace:IP()),a=e.editorState,c=[va,el,Oa,xa,Sa,TP,...e.nodes||[]],{onError:u,html:f}=e,h=e.editable===void 0||e.editable;let d;if(t===void 0&&n!==null)d=n._nodes;else{d=new Map;for(let g=0;g<c.length;g++){let O=c[g],x=null,m=null;if(typeof O!="function"){const w=O;O=w.replace,x=w.with,m=w.withKlass||null}const{ownNodeConfig:y}=Pp(O),b=O.getType(),S=O.transform(),v=new Set;y&&y.$transform&&v.add(y.$transform),S!==null&&v.add(S),d.set(b,{exportDOM:f&&f.export?f.export.get(O):void 0,klass:O,replace:x,replaceWithKlass:m,sharedNodeState:AE(c[g]),transforms:v})}}const p=new kp(o,i,d,{disableEvents:s,namespace:l,theme:r},u||console.error,(function(g,O){const x=new Map,m=new Set,y=b=>{Object.keys(b).forEach((S=>{let v=x.get(S);v===void 0&&(v=[],x.set(S,v)),v.push(b[S])}))};return g.forEach((b=>{const S=b.klass.importDOM;if(S==null||m.has(S))return;m.add(S);const v=S.call(b.klass);v!==null&&y(v)})),O&&y(O),x})(d,f?f.import:void 0),h,t);return a!==void 0&&(p._pendingEditorState=a,p._dirtyType=jl),p}class kp{constructor(e,n,r,i,s,o,l,a){this._createEditorArgs=a,this._parentEditor=n,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=No,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=IP(),this._onError=s,this._htmlConversions=o,this._editable=l,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const n=this._listeners.update;return n.add(e),()=>{n.delete(e)}}registerEditableListener(e){const n=this._listeners.editable;return n.add(e),()=>{n.delete(e)}}registerDecoratorListener(e){const n=this._listeners.decorator;return n.add(e),()=>{n.delete(e)}}registerTextContentListener(e){const n=this._listeners.textcontent;return n.add(e),()=>{n.delete(e)}}registerRootListener(e){const n=this._listeners.root;return e(this._rootElement,null),n.add(e),()=>{e(null,this._rootElement),n.delete(e)}}registerCommand(e,n,r){r===void 0&&te(35);const i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);const s=i.get(e);s===void 0&&te(36,String(e));const o=s[r];return o.add(n),()=>{o.delete(n),s.every((l=>l.size===0))&&i.delete(e)}}registerMutationListener(e,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,s=this._listeners.mutation;let o=s.get(n);o===void 0&&(o=new Set,s.set(n,o)),o.add(i);const l=r&&r.skipInitialization;return l!==void 0&&l||this.initializeMutationListener(n,i),()=>{o.delete(i),o.size===0&&s.delete(n)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return n===void 0&&te(37,e.name),n}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,n){const r=this._editorState,i=ES(r).get(n.getType());if(!i)return;const s=new Map;for(const o of i.keys())s.set(o,"created");s.size>0&&e(s,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,n){const r=this.getRegisteredNode(e);return r.transforms.add(n),r}registerNodeTransform(e,n){const r=this.registerNodeTransformToKlass(e,n),i=[r],s=r.replaceWithKlass;if(s!=null){const o=this.registerNodeTransformToKlass(s,n);i.push(o)}return(function(o,l){const a=ES(o.getEditorState()),c=[];for(const u of l){const f=a.get(u);f&&c.push(f)}c.length!==0&&o.update((()=>{for(const u of c)for(const f of u.keys()){const h=Bt(f);h&&h.markDirty()}}),o._pendingEditorState===null?{tag:oh}:void 0)})(this,i.map((o=>o.klass.getType()))),()=>{i.forEach((o=>o.transforms.delete(n)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,n){return xe(this,e,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const n=this._rootElement;if(e!==n){const r=$l(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,PP(this,n,e,i),n!==null&&(this._config.disableEvents||KN(n),r!=null&&n.classList.remove(...r)),e!==null){const s=Fx(e),o=e.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=s,this._dirtyType=jl,PE(this),this._updateTags.add(oh),Di(this),this._config.disableEvents||(function(l,a){const c=l.ownerDocument,u=Wh.get(c);(u===void 0||u<1)&&c.addEventListener("selectionchange",fP),Wh.set(c,(u||0)+1),l.__lexicalEditor=a;const f=uP(l);for(let h=0;h<_O.length;h++){const[d,p]=_O[h],g=typeof p=="function"?O=>{eS(O)||(Jv(O),(a.isEditable()||d==="click")&&p(O,a))}:O=>{if(eS(O))return;Jv(O);const x=a.isEditable();switch(d){case"cut":return x&&xe(a,Sx,O);case"copy":return xe(a,vx,O);case"paste":return x&&xe(a,xx,O);case"dragstart":return x&&xe(a,KE,O);case"dragover":return x&&xe(a,JE,O);case"dragend":return x&&xe(a,eP,O);case"focus":return x&&xe(a,tP,O);case"blur":return x&&xe(a,nP,O);case"drop":return x&&xe(a,GE,O)}};l.addEventListener(d,g),f.push((()=>{l.removeEventListener(d,g)}))}})(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add(oh),Di(this);pc("root",this,!1,e,n)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&te(38);let r=e;r._readOnly&&(r=SP(e),r._selection=e._selection?e._selection.clone():null),EE(this);const i=this._pendingEditorState,s=this._updateTags,o=n!==void 0?n.tag:null;i===null||i.isEmpty()||(o!=null&&s.add(o),Di(this)),this._pendingEditorState=r,this._dirtyType=jl,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&s.add(o),this._updating||Di(this)}parseEditorState(e,n){return(function(r,i,s){const o=Px(),l=Wt,a=Mn,c=jt,u=i._dirtyElements,f=i._dirtyLeaves,h=i._cloneNotNeeded,d=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,Wt=o,Mn=!1,jt=i,Ax(null);try{const p=i._nodes;Tx(r.root,p),s&&s(),o._readOnly=!0}catch(p){p instanceof Error&&i._onError(p)}finally{i._dirtyElements=u,i._dirtyLeaves=f,i._cloneNotNeeded=h,i._dirtyType=d,Wt=l,Mn=a,jt=c}return o})(typeof e=="string"?JSON.parse(e):e,this,n)}read(e){return Di(this),this.getEditorState().read(e,{editor:this})}update(e,n){(function(r,i,s){r._updating?r._updates.push([i,s]):Sp(r,i,s)})(this,e,n)}focus(e,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Wn(this,(()=>{const i=Ke(),s=Rn();i!==null?i.dirty||Ln(i.clone()):s.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?s.selectStart():s.selectEnd()),BP("focus"),ZP((()=>{r.removeAttribute("autocapitalize"),e&&e()}))})),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const n=di(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,pc("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}kp.version="0.35.0+prod.esm";let $O=null;function Ax(t){$O=t}let wD=1;function $x(t,e){const n=Qx(t,e);return n===void 0&&te(30,e),n}function Qx(t,e){return t._nodes.get(e)}const kD=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)};function bS(t){return pt(Tp(t))}function Mx(t){const e=document.activeElement;if(!vn(e))return!1;const n=e.nodeName;return pt(Tp(t))&&(n==="INPUT"||n==="TEXTAREA"||e.contentEditable==="true"&&Qu(e)==null)}function $u(t,e,n){const r=t.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(n)&&e!==null&&!Mx(e)&&Rx(e)===t}catch{return!1}}function Cp(t){return t instanceof kp}function Rx(t){let e=t;for(;e!=null;){const n=Qu(e);if(Cp(n))return n;e=Mu(e)}return null}function Qu(t){return t?t.__lexicalEditor:null}function Is(t){return kx(t)||t.isToken()}function Ri(t){return Is(t)||t.isSegmented()}function xi(t){return wa(t)&&t.nodeType===wN}function AP(t){return wa(t)&&t.nodeType===kN}function Fo(t){let e=t;for(;e!=null;){if(xi(e))return e;e=e.firstChild}return null}function qh(t,e,n){const r=zs[e];if(n!==null&&(t&r)==(n&r))return t;let i=t^r;return e==="subscript"?i&=-65:e==="superscript"?i&=-33:e==="lowercase"?(i&=-513,i&=-1025):e==="uppercase"?(i&=-257,i&=-1025):e==="capitalize"&&(i&=-257,i&=-513),i}function CD(t){return Ce(t)||To(t)||pt(t)}function $P(t,e){const n=(function(){const o=$O;return $O=null,o})();if((e=e||n&&n.__key)!=null)return void(t.__key=e);Jt(),yP();const r=_t(),i=co(),s=""+wD++;i._nodeMap.set(s,t),J(t)?r._dirtyElements.set(s,!0):r._dirtyLeaves.add(s),r._cloneNotNeeded.add(s),r._dirtyType=kE,t.__key=s}function Ns(t){const e=t.getParent();if(e!==null){const n=t.getWritable(),r=e.getWritable(),i=t.getPreviousSibling(),s=t.getNextSibling(),o=s!==null?s.__key:null,l=i!==null?i.__key:null,a=i!==null?i.getWritable():null,c=s!==null?s.getWritable():null;i===null&&(r.__first=o),s===null&&(r.__last=l),a!==null&&(a.__next=o),c!==null&&(c.__prev=l),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function Yh(t){yP();const e=t.getLatest(),n=e.__parent,r=co(),i=_t(),s=r._nodeMap,o=i._dirtyElements;n!==null&&(function(a,c,u){let f=a;for(;f!==null;){if(u.has(f))return;const h=c.get(f);if(h===void 0)break;u.set(f,!1),f=h.__parent}})(n,s,o);const l=e.__key;i._dirtyType=kE,J(t)?o.set(l,!0):i._dirtyLeaves.add(l)}function Xt(t){Jt();const e=_t(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,n!==null){const r=Bt(n);r!==null&&r.getWritable()}if(t!==null){const r=Bt(t);r!==null&&r.getWritable()}}}function Ps(){return ya()?null:_t()._compositionKey}function Bt(t,e){const n=(e||co())._nodeMap.get(t);return n===void 0?null:n}function QP(t,e){const n=_p(t,_t());return n!==void 0?Bt(n,e):null}function _p(t,e){return t[`__lexicalKey_${e._key}`]}function Tp(t,e){let n=t;for(;n!=null;){const r=QP(n,e);if(r!==null)return r;n=Mu(n)}return null}function MP(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function vS(t){return t.read((()=>Rn().getTextContent()))}function Rn(){return RP(co())}function RP(t){return t._nodeMap.get("root")}function Ln(t){Jt();const e=co();t!==null&&(t.dirty=!0,t.setCachedNodes(null)),e._selection=t}function bl(t){const e=_t(),n=(function(r,i){let s=r;for(;s!=null;){const o=_p(s,i);if(o!==void 0)return o;s=Mu(s)}return null})(t,e);return n===null?t===e.getRootElement()?Bt("root"):null:Bt(n)}function LP(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function Lx(t){const e=[];let n=t;for(;n!==null;)e.push(n),n=n._parentEditor;return e}function IP(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function NP(t){return xi(t)?t.nodeValue:null}function Ix(t,e,n){const r=di(fr(e));if(r===null)return;const i=r.anchorNode;let{anchorOffset:s,focusOffset:o}=r;if(i!==null){let l=NP(i);const a=Tp(i);if(l!==null&&Ce(a)){if(l===Op&&n){const c=n.length;l=n,s=c,o=c}l!==null&&Nx(a,l,s,o,t)}}}function Nx(t,e,n,r,i){let s=t;if(s.isAttached()&&(i||!s.isDirty())){const o=s.isComposing();let l=e;(o||i)&&e[e.length-1]===Op&&(l=e.slice(0,-1));const a=s.getTextContent();if(i||l!==a){if(l===""){if(Xt(null),Lc||Wl||Dh)s.remove();else{const g=_t();setTimeout((()=>{g.update((()=>{s.isAttached()&&s.remove()}))}),20)}return}const c=s.getParent(),u=nl(),f=s.getTextContentSize(),h=Ps(),d=s.getKey();if(s.isToken()||h!==null&&d===h&&!o||Ae(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===t.__key&&u.anchor.offset===0&&!s.canInsertTextBefore()&&!o||u.focus.key===t.__key&&u.focus.offset===f&&!s.canInsertTextAfter()&&!o))return void s.markDirty();const p=Ke();if(!Ae(p)||n===null||r===null)return void SS(s,l,p);if(p.setTextNodeRange(s,n,s,r),s.isSegmented()){const g=zt(s.getTextContent());s.replace(g),s=g}SS(s,l,p)}}}function SS(t,e,n){if(t.setTextContent(e),Ae(n)){const r=t.getKey();for(const i of["anchor","focus"]){const s=n[i];s.type==="text"&&s.key===r&&(s.offset=Ar(t,s.offset,"clamp"))}}}function pf(t,e,n){const r=e[n]||!1;return r==="any"||r===t[n]}function DP(t,e){return pf(t,e,"altKey")&&pf(t,e,"ctrlKey")&&pf(t,e,"shiftKey")&&pf(t,e,"metaKey")}function Je(t,e,n){return DP(t,n)&&t.key.toLowerCase()===e.toLowerCase()}const Qi={ctrlKey:!Ur,metaKey:Ur},wS={altKey:Ur,ctrlKey:!Ur};function kS(t){return t.key==="Backspace"}function CS(t){return Je(t,"a",Qi)}function _D(t){const e=Rn();if(Ae(t)){const n=t.anchor,r=t.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Vh(t),t}{const n=e.select(0,e.getChildrenSize());return Ln(Vh(n)),n}}function $l(t,e){t.__lexicalClassNameCache===void 0&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,r=n[e];if(r!==void 0)return r;const i=t[e];if(typeof i=="string"){const s=wE(i);return n[e]=s,s}return i}function Dx(t,e,n,r,i){if(n.size===0)return;const s=r.__type,o=r.__key,l=e.get(s);l===void 0&&te(33,s);const a=l.klass;let c=t.get(a);c===void 0&&(c=new Map,t.set(a,c));const u=c.get(o),f=u==="destroyed"&&i==="created";(u===void 0||f)&&c.set(o,f?"updated":i)}function _S(t,e,n){const r=t.getParent();let i=n,s=t;return r!==null&&(e&&n===0?(i=s.getIndexWithinParent(),s=r):e||n!==s.getChildrenSize()||(i=s.getIndexWithinParent()+1,s=r)),s.getChildAtIndex(e?i-1:i)}function VP(t,e){const n=t.offset;if(t.type==="element")return _S(t.getNode(),e,n);{const r=t.getNode();if(e&&n===0||!e&&n===r.getTextContentSize()){const i=e?r.getPreviousSibling():r.getNextSibling();return i===null?_S(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):i}}return null}function FP(t){const e=fr(t).event,n=e&&e.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function xe(t,e,n){return(function(r,i,s){const o=Lx(r);for(let l=4;l>=0;l--)for(let a=0;a<o.length;a++){const c=o[a],u=c._commands.get(i);if(u!==void 0){const f=u[l];if(f!==void 0){const h=Array.from(f),d=h.length;let p=!1;if(Wn(c,(()=>{for(let g=0;g<d;g++)if(h[g](s,r))return void(p=!0)})),p)return p}}}return!1})(t,e,n)}function Ep(t){return!nn(t)&&!t.isLastChild()&&!t.isInline()}function Bo(t,e){const n=t._keyToDOMMap.get(e);return n===void 0&&te(75,e),n}function Mu(t){const e=t.assignedSlot||t.parentElement;return HP(e)?e.host:e}function Vx(t){return AP(t)?t:vn(t)?t.ownerDocument:null}function BP(t){Jt(),_t()._updateTags.add(t)}function ZP(t){Jt(),_t()._deferred.push(t)}function Uh(t,e){let n=t.getParent();for(;n!==null;){if(n.is(e))return!0;n=n.getParent()}return!1}function Fx(t){const e=Vx(t);return e?e.defaultView:null}function fr(t){const e=t._window;return e===null&&te(78),e}function zP(t){let e=t.getParentOrThrow();for(;e!==null;){if(as(e))return e;e=e.getParentOrThrow()}return e}function as(t){return nn(t)||J(t)&&t.isShadowRoot()}function XP(t){const e=t.constructor.clone(t);return $P(e,null),e.afterCloneFrom(t),e}function Ru(t){const e=_t(),n=t.getType(),r=Qx(e,n);r===void 0&&te(200,t.constructor.name,n);const{replace:i,replaceWithKlass:s}=r;if(i!==null){const o=i(t),l=o.constructor;return s!==null?o instanceof s||te(201,s.name,s.getType(),l.name,l.getType(),t.constructor.name,n):o instanceof t.constructor&&l!==t.constructor||te(202,l.name,l.getType(),t.constructor.name,n),o.__key===t.__key&&te(203,t.constructor.name,n,l.name,l.getType()),o}return t}function Ag(t,e){!nn(t.getParent())||J(e)||pt(e)||te(99)}function WP(t){const e=Bt(t);return e===null&&te(63,t),e}function $g(t){return(pt(t)||J(t)&&!t.canBeEmpty())&&!t.isInline()}function QO(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=t.parentElement;r!==null&&r.removeChild(t)}function di(t){return Br?(t||window).getSelection():null}function jP(t){const e=Fx(t);return e?e.getSelection():null}function TD(t){return vn(t)&&t.tagName==="A"}function vn(t){return wa(t)&&t.nodeType===SN}function wa(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&typeof t.nodeType=="number"}function HP(t){return wa(t)&&t.nodeType===CN}function qP(t){const e=new RegExp(/^(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");return t.nodeName.match(e)!==null}function MO(t){const e=new RegExp(/^(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");return t.nodeName.match(e)!==null}function Vi(t){if(pt(t)&&!t.isInline())return!0;if(!J(t)||as(t))return!1;const e=t.getFirstChild(),n=e===null||To(e)||Ce(e)||e.isInline();return!t.isInline()&&t.canBeEmpty()!==!1&&n}function Qg(t,e){let n=t;for(;n!==null&&n.getParent()!==null&&!e(n);)n=n.getParentOrThrow();return e(n)?n:null}function Bx(){return _t()}const TS=new WeakMap,ED=new Map;function ES(t){if(!t._readOnly&&t.isEmpty())return ED;t._readOnly||te(192);let e=TS.get(t);return e||(e=(function(n){const r=new Map;for(const[i,s]of n._nodeMap){const o=s.__type;let l=r.get(o);l||(l=new Map,r.set(o,l)),l.set(i,s)}return r})(t),TS.set(t,e)),e}function YP(t){const e=t.constructor.clone(t);return e.afterCloneFrom(t),e}function UP(t,e){const n=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(n/40);e.setIndent(r)}function GP(t){return t.__lexicalUnmanaged===!0}function Fa(t,e){return(function(n,r){return Object.prototype.hasOwnProperty.call(n,r)})(t,e)&&t[e]!==ma[e]}function Pp(t){const e=Bv in t.prototype?t.prototype[Bv]():void 0,n=(function(o){return o===Ex||o===ba||o===ma})(t),r=!n&&Fa(t,"getType")?t.getType():void 0;let i,s=r;if(e)if(r)i=e[r];else for(const[o,l]of Object.entries(e))s=o,i=l;if(!n&&s&&(Fa(t,"getType")||(t.getType=()=>s),Fa(t,"clone")||(t.clone=o=>(Ax(o),new t)),Fa(t,"importJSON")||(t.importJSON=i&&i.$importJSON||(o=>new t().updateFromJSON(o))),!Fa(t,"importDOM")&&i)){const{importDOM:o}=i;o&&(t.importDOM=()=>o)}return{ownNodeConfig:i,ownNodeType:s}}function PD(t){const e=Bx();return Jt(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t))).klass}const AD={next:"previous",previous:"next"};class Zx{constructor(e){this.origin=e}[Symbol.iterator](){return jx({hasNext:Xo,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return Yt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Yt(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,n){const r=this.getNodeAtCaret();return e.is(this.origin)||e.is(r)||(r===null?this.insert(e):r.replace(e,n)),this}splice(e,n,r="next"){const i=r===this.direction?n:Array.from(n).reverse();let s=this;const o=this.getParentAtCaret(),l=new Map;for(let a=s.getAdjacentCaret();a!==null&&l.size<e;a=a.getAdjacentCaret()){const c=a.origin.getWritable();l.set(c.getKey(),c)}for(const a of i){if(l.size>0){const c=s.getNodeAtCaret();if(c){if(l.delete(c.getKey()),l.delete(a.getKey()),!(c.is(a)||s.origin.is(a))){const u=a.getParent();u&&u.is(o)&&a.remove(),c.replace(a)}}else c===null&&te(263,Array.from(l).join(" "))}else s.insert(a);s=Yt(a,this.direction)}for(const a of l.values())a.remove();return this}}class zc extends Zx{constructor(){super(...arguments);tr(this,"type","child")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:Ji(n,this.direction)}getParentCaret(n="root"){return Yt(zx(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=uo(this.direction);return Yt(this.getNodeAtCaret(),n)||Ji(this.origin,n)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(n){return n instanceof zc&&this.direction===n.direction&&this.origin.is(n.origin)}isSamePointCaret(n){return this.isSameNodeCaret(n)}}const $D={root:nn,shadowRoot:as};function uo(t){return AD[t]}function zx(t,e="root"){return $D[e](t)?null:t}class Zo extends Zx{constructor(){super(...arguments);tr(this,"type","sibling")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:Yt(n,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return J(this.origin)?Ji(this.origin,this.direction):null}getParentCaret(n="root"){return Yt(zx(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=uo(this.direction);return Yt(this.getNodeAtCaret(),n)||Ji(this.origin.getParentOrThrow(),n)}isSamePointCaret(n){return n instanceof Zo&&this.direction===n.direction&&this.origin.is(n.origin)}isSameNodeCaret(n){return(n instanceof Zo||n instanceof zo)&&this.direction===n.direction&&this.origin.is(n.origin)}}class zo extends Zx{constructor(n,r){super(n);tr(this,"type","text");this.offset=r}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:Xs(n,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(n="root"){return Yt(zx(this.getParentAtCaret(),n),this.direction)}getFlipped(){return Xs(this.origin,uo(this.direction),this.offset)}isSamePointCaret(n){return n instanceof zo&&this.direction===n.direction&&this.origin.is(n.origin)&&this.offset===n.offset}isSameNodeCaret(n){return(n instanceof Zo||n instanceof zo)&&this.direction===n.direction&&this.origin.is(n.origin)}getSiblingCaret(){return Yt(this.origin,this.direction)}}function ji(t){return t instanceof zo}function Xo(t){return t instanceof Zo}function Pr(t){return t instanceof zc}const QD={next:class extends zo{constructor(){super(...arguments);tr(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends zo{constructor(){super(...arguments);tr(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},MD={next:class extends Zo{constructor(){super(...arguments);tr(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Zo{constructor(){super(...arguments);tr(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},RD={next:class extends zc{constructor(){super(...arguments);tr(this,"direction","next")}getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends zc{constructor(){super(...arguments);tr(this,"direction","previous")}getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function Yt(t,e){return t?new MD[e](t):null}function Xs(t,e,n){return t?new QD[e](t,Ar(t,n)):null}function Ar(t,e,n="error"){const r=t.getTextContentSize();let i=e==="next"?r:e==="previous"?0:e;return(i<0||i>r)&&(n!=="clamp"&&(function(s,...o){const l=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",s);for(const c of o)a.append("v",c);l.search=a.toString(),console.warn(`Minified Lexical warning #${s}; visit ${l.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(284,String(e),String(r),t.getKey()),i=i<0?0:r),i}function RO(t,e){return new LD(t,e)}function Ji(t,e){return J(t)?new RD[e](t):null}function KP(t){return t&&t.getChildCaret()||t}function Ap(t){return t&&KP(t.getAdjacentCaret())}class Xx{constructor(e,n,r){tr(this,"type","node-caret-range");this.anchor=e,this.focus=n,this.direction=r}getLatest(){const e=this.anchor.getLatest(),n=this.focus.getLatest();return e===this.anchor&&n===this.focus?this:new Xx(e,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=i=>{const s=this[i].getLatest();return ji(s)?(function(o,l){const{direction:a,origin:c}=o,u=Ar(c,l==="focus"?uo(a):a);return RO(o,u-o.offset)})(s,i):null},n=e("anchor"),r=e("focus");if(n&&r){const{caret:i}=n,{caret:s}=r;if(i.isSameNodeCaret(s))return[RO(i,s.offset-i.offset),null]}return[n,r]}iterNodeCarets(e="root"){const n=ji(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=ji(r),s=o=>o.isSameNodeCaret(r)?null:Ap(o)||o.getParentCaret(e);return jx({hasNext:o=>o!==null&&!(i&&r.isSameNodeCaret(o)),initial:n.isSameNodeCaret(r)?null:s(n),map:o=>o,step:s})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class LD{constructor(e,n){tr(this,"type","slice");this.caret=e,this.distance=n}getSliceIndices(){const{distance:e,caret:{offset:n}}=this,r=n+e;return r<n?[r,n]:[n,r]}getTextContent(){const[e,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:n}}=this,[r,i]=this.getSliceIndices(),s=e.getTextContent();return Xs(e.setTextContent(s.slice(0,r)+s.slice(i)),n,r)}}function Wx(t){return Ws(t,Yt(Rn(),t.direction))}function JP(t){return Ws(t,t)}function Ws(t,e){return t.direction!==e.direction&&te(265),new Xx(t,e,t.direction)}function jx(t){const{initial:e,hasNext:n,step:r,map:i}=t;let s=e;return{[Symbol.iterator](){return this},next(){if(!n(s))return{done:!0,value:void 0};const o={done:!1,value:i(s)};return s=r(s),o}}}function Hx(t,e){const n=mc(t.origin,e.origin);switch(n===null&&te(275,t.origin.getKey(),e.origin.getKey()),n.type){case"same":{const r=t.type==="text",i=e.type==="text";return r&&i?(function(s,o){return Math.sign(s-o)})(t.offset,e.offset):t.type===e.type?0:r?-1:i?1:t.type==="child"?-1:1}case"ancestor":return t.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return qx(n)}}function qx(t){const{a:e,b:n}=t,r=e.__key,i=n.__key;let s=e,o=n;for(;s&&o;s=s.getNextSibling(),o=o.getNextSibling()){if(s.__key===i)return-1;if(o.__key===r)return 1}return s===null?1:-1}function gf(t,e){return e.is(t)}function PS(t){return J(t)?[t.getLatest(),null]:[t.getParent(),t.getLatest()]}function mc(t,e){if(t.is(e))return{commonAncestor:t,type:"same"};const n=new Map;for(let[r,i]=PS(t);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=PS(e);r;i=r,r=r.getParent()){const s=n.get(r);if(s!==void 0)return s===null?(gf(t,r)||te(276),{commonAncestor:r,type:"ancestor"}):i===null?(gf(e,r)||te(277),{commonAncestor:r,type:"descendant"}):((J(s)||gf(t,s))&&(J(i)||gf(e,i))&&r.is(s.getParent())&&r.is(i.getParent())||te(278),{a:s,b:i,commonAncestor:r,type:"branch"})}return null}function js(t,e){const{type:n,key:r,offset:i}=t,s=WP(t.key);return n==="text"?(Ce(s)||te(266,s.getType(),r),Xs(s,e,i)):(J(s)||te(267,s.getType(),r),rA(s,t.offset,e))}function ql(t,e){const{origin:n,direction:r}=e,i=r==="next";ji(e)?t.set(n.getKey(),e.offset,"text"):Xo(e)?Ce(n)?t.set(n.getKey(),Ar(n,r),"text"):t.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(Pr(e)&&J(n)||te(268),t.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}function eA(t){const e=Ke(),n=Ae(e)?e:OP();return Oc(n,t),Ln(n),n}function Oc(t,e){ql(t.anchor,e.anchor),ql(t.focus,e.focus)}function LO(t){const{anchor:e,focus:n}=t,r=js(e,"next"),i=js(n,"next"),s=Hx(r,i)<=0?"next":"previous";return Ws(Hs(r,s),Hs(i,s))}function ka(t){const{direction:e,origin:n}=t,r=Yt(n,uo(e)).getNodeAtCaret();return r?Yt(r,e):Ji(n.getParentOrThrow(),e)}function AS(t,e="root"){const n=[t];for(let r=Pr(t)?t.getParentCaret(e):t.getSiblingCaret();r!==null;r=r.getParentCaret(e))n.push(ka(r));return n}function Mg(t){return!!t&&t.origin.isAttached()}function tA(t,e="removeEmptySlices"){if(t.isCollapsed())return t;const n="root",r="next";let i=e;const s=Yx(t,r),o=AS(s.anchor,n),l=AS(s.focus.getFlipped(),n),a=new Set,c=[];for(const p of s.iterNodeCarets(n))if(Pr(p))a.add(p.origin.getKey());else if(Xo(p)){const{origin:g}=p;J(g)&&!a.has(g.getKey())||c.push(g)}for(const p of c)p.remove();for(const p of s.getTextSlices()){if(!p)continue;const{origin:g}=p.caret,O=g.getTextContentSize(),x=ka(Yt(g,r)),m=g.getMode();if(Math.abs(p.distance)===O&&i==="removeEmptySlices"||m==="token"&&p.distance!==0)x.remove();else if(p.distance!==0){i="removeEmptySlices";let y=p.removeTextSlice();const b=p.caret.origin;if(m==="segmented"){const S=y.origin,v=zt(S.getTextContent()).setStyle(S.getStyle()).setFormat(S.getFormat());x.replaceOrInsert(v),y=Xs(v,r,y.offset)}b.is(o[0].origin)&&(o[0]=y),b.is(l[0].origin)&&(l[0]=y.getFlipped())}}let u,f;for(const p of o)if(Mg(p)){u=_r(p);break}for(const p of l)if(Mg(p)){f=_r(p);break}const h=(function(p,g,O){if(!p||!g)return null;const x=p.getParentAtCaret(),m=g.getParentAtCaret();if(!x||!m)return null;const y=x.getParents().reverse();y.push(x);const b=m.getParents().reverse();b.push(m);const S=Math.min(y.length,b.length);let v;for(v=0;v<S&&y[v]===b[v];v++);const w=(E,L)=>{let M;for(let $=v;$<E.length;$++){const V=E[$];if(as(V))return;!M&&L(V)&&(M=V)}return M},_=w(y,Vi),T=_&&w(b,(E=>O.has(E.getKey())&&Vi(E)));return _&&T?[_,T]:null})(u,f,a);if(h){const[p,g]=h;Ji(p,"previous").splice(0,g.getChildren()),g.remove()}const d=[u,f,...o,...l].find(Mg);if(d)return JP(Hs(_r(d),t.direction));te(269,JSON.stringify(o.map((p=>p.origin.__key))))}function _r(t){const e=(function(i){let s=i;for(;Pr(s);){const o=Ap(s);if(!Pr(o))break;s=o}return s})(t.getLatest()),{direction:n}=e;if(Ce(e.origin))return ji(e)?e:Xs(e.origin,n,n);const r=e.getAdjacentCaret();return Xo(r)&&Ce(r.origin)?Xs(r.origin,n,uo(n)):e}function nA(t){return ji(t)&&t.offset!==Ar(t.origin,t.direction)}function Hs(t,e){return t.direction===e?t:t.getFlipped()}function Yx(t,e){return t.direction===e?t:Ws(Hs(t.focus,e),Hs(t.anchor,e))}function rA(t,e,n){let r=Ji(t,"next");for(let i=0;i<e;i++){const s=r.getAdjacentCaret();if(s===null)break;r=s}return Hs(r,n)}function ID(t){const{origin:e,offset:n,direction:r}=t;if(n===Ar(e,r))return t.getSiblingCaret();if(n===Ar(e,uo(r)))return ka(t.getSiblingCaret());const[i]=e.splitText(n);return Ce(i)||te(281),Hs(Yt(i,"next"),r)}function ND(t,e){return!0}function DD(t,{$copyElementNode:e=XP,$splitTextPointCaretNext:n=ID,rootMode:r="shadowRoot",$shouldSplit:i=ND}={}){if(ji(t))return n(t);const s=t.getParentCaret(r);if(s){const{origin:o}=s;if(Pr(t)&&(!o.canBeEmpty()||!i(o,"first")))return ka(s);const l=(function(a){const c=[];for(let u=a.getAdjacentCaret();u;u=u.getAdjacentCaret())c.push(u.origin);return c})(t);(l.length>0||o.canBeEmpty()&&i(o,"last"))&&s.insert(e(o).splice(0,0,l))}return s}const VD=Object.freeze(Object.defineProperty({__proto__:null,$addUpdateTag:BP,$applyNodeReplacement:Ru,$caretFromPoint:js,$caretRangeFromSelection:LO,$cloneWithProperties:YP,$comparePointCaretNext:Hx,$copyNode:XP,$create:PD,$createLineBreakNode:Hl,$createNodeSelection:Cx,$createParagraphNode:Wi,$createPoint:Rr,$createRangeSelection:OP,$createTabNode:yp,$createTextNode:zt,$extendCaretToRange:Wx,$getAdjacentChildCaret:Ap,$getAdjacentNode:VP,$getCaretInDirection:Hs,$getCaretRange:Ws,$getCaretRangeInDirection:Yx,$getCharacterOffsets:AO,$getChildCaret:Ji,$getChildCaretAtIndex:rA,$getChildCaretOrSelf:KP,$getCollapsedCaretRange:JP,$getCommonAncestor:mc,$getCommonAncestorResultBranchOrder:qx,$getEditor:Bx,$getNearestNodeFromDOMNode:Tp,$getNearestRootOrShadowRoot:zP,$getNodeByKey:Bt,$getNodeByKeyOrThrow:WP,$getPreviousSelection:nl,$getRoot:Rn,$getSelection:Ke,$getSiblingCaret:Yt,$getTextNodeOffset:Ar,$getTextPointCaret:Xs,$getTextPointCaretSlice:RO,$getWritableNodeState:QE,$hasAncestor:Uh,$insertNodes:uD,$isBlockElementNode:aD,$isChildCaret:Pr,$isDecoratorNode:pt,$isElementNode:J,$isExtendableTextPointCaret:nA,$isLeafNode:CD,$isLineBreakNode:To,$isNodeSelection:vp,$isParagraphNode:EP,$isRangeSelection:Ae,$isRootNode:nn,$isRootOrShadowRoot:as,$isSiblingCaret:Xo,$isTabNode:kx,$isTextNode:Ce,$isTextPointCaret:ji,$isTokenOrSegmented:Ri,$isTokenOrTab:Is,$normalizeCaret:_r,$normalizeSelection__EXPERIMENTAL:Vh,$onUpdate:ZP,$parseSerializedNode:dD,$removeTextFromCaretRange:tA,$rewindSiblingCaret:ka,$selectAll:_D,$setCompositionKey:Xt,$setPointFromCaret:ql,$setSelection:Ln,$setSelectionFromCaretRange:eA,$splitAtPointCaretNext:DD,$updateRangeSelectionFromCaretRange:Oc,ArtificialNode__DO_NOT_USE:TP,BLUR_COMMAND:nP,CAN_REDO_COMMAND:UN,CAN_UNDO_COMMAND:GN,CLEAR_EDITOR_COMMAND:qN,CLEAR_HISTORY_COMMAND:YN,CLICK_COMMAND:DE,COLLABORATION_TAG:kP,COMMAND_PRIORITY_CRITICAL:vD,COMMAND_PRIORITY_EDITOR:xD,COMMAND_PRIORITY_HIGH:bD,COMMAND_PRIORITY_LOW:yD,CONTROLLED_TEXT_INSERTION_COMMAND:Pl,COPY_COMMAND:vx,CUT_COMMAND:Sx,DELETE_CHARACTER_COMMAND:Fc,DELETE_LINE_COMMAND:Zc,DELETE_WORD_COMMAND:Bc,DRAGEND_COMMAND:eP,DRAGOVER_COMMAND:JE,DRAGSTART_COMMAND:KE,DROP_COMMAND:GE,DecoratorNode:Ex,ElementNode:ba,FOCUS_COMMAND:tP,FORMAT_ELEMENT_COMMAND:HN,FORMAT_TEXT_COMMAND:Es,HISTORIC_TAG:pD,HISTORY_MERGE_TAG:oh,HISTORY_PUSH_TAG:gD,INDENT_CONTENT_COMMAND:WN,INSERT_LINE_BREAK_COMMAND:fc,INSERT_PARAGRAPH_COMMAND:SO,INSERT_TAB_COMMAND:XN,INTERNAL_$isBlock:Vi,IS_ALL_FORMATTING:CE,IS_HIGHLIGHT:mp,IS_STRIKETHROUGH:Ic,IS_UNDERLINE:Nc,KEY_ARROW_DOWN_COMMAND:WE,KEY_ARROW_LEFT_COMMAND:ZE,KEY_ARROW_RIGHT_COMMAND:FE,KEY_ARROW_UP_COMMAND:XE,KEY_BACKSPACE_COMMAND:HE,KEY_DELETE_COMMAND:YE,KEY_DOWN_COMMAND:VE,KEY_ENTER_COMMAND:Xh,KEY_ESCAPE_COMMAND:qE,KEY_MODIFIER_COMMAND:rP,KEY_SPACE_COMMAND:jE,KEY_TAB_COMMAND:UE,LineBreakNode:Oa,MOVE_TO_END:BE,MOVE_TO_START:zE,OUTDENT_CONTENT_COMMAND:jN,PASTE_COMMAND:xx,PASTE_TAG:mD,ParagraphNode:Sa,REDO_COMMAND:bx,REMOVE_TEXT_COMMAND:wO,RootNode:va,SELECTION_CHANGE_COMMAND:Ox,SELECTION_INSERT_CLIPBOARD_NODES_COMMAND:zN,SELECT_ALL_COMMAND:kO,SKIP_DOM_SELECTION_TAG:_P,SKIP_SCROLL_INTO_VIEW_TAG:CP,TEXT_TYPE_TO_FORMAT:zs,TabNode:xa,TextNode:el,UNDO_COMMAND:yx,buildImportMap:JN,createCommand:Le,createEditor:SD,createSharedNodeState:AE,flipDirection:uo,getDOMOwnerDocument:Vx,getDOMSelection:di,getDOMSelectionFromTarget:jP,getDOMTextNode:Fo,getEditorPropertyFromDOMNode:Qu,getNearestEditorFromDOMNode:Rx,getRegisteredNode:Qx,getRegisteredNodeOrThrow:$x,getStaticNodeConfig:Pp,isBlockDomNode:MO,isCurrentlyReadOnlyMode:ya,isDOMDocumentNode:AP,isDOMNode:wa,isDOMTextNode:xi,isDOMUnmanaged:GP,isDocumentFragment:HP,isExactShortcutMatch:Je,isHTMLAnchorElement:TD,isHTMLElement:vn,isInlineDomNode:qP,isLexicalEditor:Cp,isModifierMatch:DP,isSelectionCapturedInDecoratorInput:Mx,isSelectionWithinEditor:$u,makeStepwiseIterator:jx,removeFromParent:Ns,setNodeIndentFromDOM:UP},Symbol.toStringTag,{value:"Module"})),q=VD,cs=q.$applyNodeReplacement,Ux=q.$caretFromPoint,iA=q.$cloneWithProperties,FD=q.$create,Yl=q.$createLineBreakNode,BD=q.$createNodeSelection,St=q.$createParagraphNode,Lu=q.$createRangeSelection,Gx=q.$createTabNode,pi=q.$createTextNode,ZD=q.$extendCaretToRange,zD=q.$getAdjacentChildCaret,$S=q.$getAdjacentNode,QS=q.$getCaretInDirection,XD=q.$getCaretRange,WD=q.$getCharacterOffsets,Gh=q.$getChildCaret,jD=q.$getCollapsedCaretRange,sA=q.$getEditor,Wo=q.$getNearestNodeFromDOMNode,ci=q.$getNodeByKey,HD=q.$getPreviousSelection,rn=q.$getRoot,be=q.$getSelection,Kx=q.$getSiblingCaret,Ca=q.$insertNodes,Kh=q.$isBlockElementNode,oA=q.$isChildCaret,Eo=q.$isDecoratorNode,Be=q.$isElementNode,qD=q.$isExtendableTextPointCaret,lA=q.$isLeafNode,Iu=q.$isLineBreakNode,Qt=q.$isNodeSelection,Jx=q.$isParagraphNode,Se=q.$isRangeSelection,$p=q.$isRootNode,ar=q.$isRootOrShadowRoot,aA=q.$isTabNode,tt=q.$isTextNode,cA=q.$isTextPointCaret,YD=q.$isTokenOrSegmented,IO=q.$normalizeCaret,Jh=q.$normalizeSelection__EXPERIMENTAL,UD=q.$parseSerializedNode,GD=q.$selectAll,MS=q.$setPointFromCaret,yi=q.$setSelection,KD=q.$setSelectionFromCaretRange,JD=q.$splitAtPointCaretNext,uA=q.ArtificialNode__DO_NOT_USE,fA=q.BLUR_COMMAND,mf=q.CAN_REDO_COMMAND,Of=q.CAN_UNDO_COMMAND,eV=q.CLEAR_EDITOR_COMMAND,tV=q.CLEAR_HISTORY_COMMAND,ey=q.CLICK_COMMAND,nV=q.COLLABORATION_TAG,es=q.COMMAND_PRIORITY_CRITICAL,Fe=q.COMMAND_PRIORITY_EDITOR,NO=q.COMMAND_PRIORITY_HIGH,dt=q.COMMAND_PRIORITY_LOW,rV=q.CONTROLLED_TEXT_INSERTION_COMMAND,hA=q.COPY_COMMAND,iV=q.CUT_COMMAND,Rg=q.DELETE_CHARACTER_COMMAND,sV=q.DELETE_LINE_COMMAND,oV=q.DELETE_WORD_COMMAND,dA=q.DRAGOVER_COMMAND,ty=q.DRAGSTART_COMMAND,pA=q.DROP_COMMAND,Nu=q.DecoratorNode,ts=q.ElementNode,gA=q.FOCUS_COMMAND,lV=q.FORMAT_ELEMENT_COMMAND,mA=q.FORMAT_TEXT_COMMAND,ed=q.HISTORIC_TAG,aV=q.HISTORY_MERGE_TAG,cV=q.HISTORY_PUSH_TAG,td=q.INDENT_CONTENT_COMMAND,RS=q.INSERT_LINE_BREAK_COMMAND,DO=q.INSERT_PARAGRAPH_COMMAND,OA=q.INSERT_TAB_COMMAND,xf=q.INTERNAL_$isBlock,xA=q.KEY_ARROW_DOWN_COMMAND,yA=q.KEY_ARROW_LEFT_COMMAND,uV=q.KEY_ARROW_RIGHT_COMMAND,bA=q.KEY_ARROW_UP_COMMAND,vA=q.KEY_BACKSPACE_COMMAND,SA=q.KEY_DELETE_COMMAND,wA=q.KEY_DOWN_COMMAND,ny=q.KEY_ENTER_COMMAND,Qp=q.KEY_ESCAPE_COMMAND,kA=q.KEY_SPACE_COMMAND,ry=q.KEY_TAB_COMMAND,VO=q.OUTDENT_CONTENT_COMMAND,iy=q.PASTE_COMMAND,fV=q.PASTE_TAG,hV=q.ParagraphNode,dV=q.REDO_COMMAND,pV=q.REMOVE_TEXT_COMMAND,CA=q.SELECTION_CHANGE_COMMAND,gV=q.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,mV=q.SELECT_ALL_COMMAND,Mp=q.TextNode,OV=q.UNDO_COMMAND,_A=q.buildImportMap,bi=q.createCommand,TA=q.createEditor,LS=q.createSharedNodeState,EA=q.getDOMSelection,xV=q.getNearestEditorFromDOMNode,PA=q.getRegisteredNode,yV=q.getStaticNodeConfig,IS=q.isBlockDomNode,bV=q.isDOMNode,NS=q.isDocumentFragment,AA=q.isHTMLAnchorElement,gi=q.isHTMLElement,DS=q.isInlineDomNode,vV=q.isSelectionCapturedInDecoratorInput,SV=q.isSelectionWithinEditor,$A=q.setNodeIndentFromDOM;function wV(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const FO=new Map;function QA(t){const e={};if(!t)return e;const n=t.split(";");for(const r of n)if(r!==""){const[i,s]=r.split(/:([^]+)/);i&&s&&(e[i.trim()]=s.trim())}return e}function VS(t){let e=FO.get(t);return e===void 0&&(e=QA(t),FO.set(t,e)),e}function MA(t){const e=sA().getElementByKey(t.getKey());if(e===null)return null;const n=e.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(e)}function RA(t){return MA($p(t)?t:t.getParentOrThrow())}function FS(t){const e=RA(t);return e!==null&&e.direction==="rtl"}function LA(t,e){const n=t.getStartEndPoints();if(e.isSelected(t)&&!YD(e)&&n!==null){const[r,i]=n,s=t.isBackward(),o=r.getNode(),l=i.getNode(),a=e.is(o),c=e.is(l);if(a||c){const[u,f]=WD(t),h=o.is(l),d=e.is(s?l:o),p=e.is(s?o:l);let g,O=0;h?(O=u>f?f:u,g=u>f?u:f):d?(O=s?f:u,g=void 0):p&&(O=0,g=s?u:f),e.__text=e.__text.slice(O,g)}}return e}function BS(t){if(t.type==="text")return t.offset===t.getNode().getTextContentSize();const e=t.getNode();return Be(e)||wV(177),t.offset===e.getChildrenSize()}function kV(t){const e=t.getStyle(),n=QA(e);FO.set(e,n)}function CV(t,e){const n=t.getFormatType(),r=t.getIndent();n!==e.getFormatType()&&e.setFormat(n),r!==e.getIndent()&&e.setIndent(r)}function _V(t,e,n=CV){if(t===null)return;const r=t.getStartEndPoints(),i=new Map;let s=null;if(r){const[o,l]=r;s=Lu(),s.anchor.set(o.key,o.offset,o.type),s.focus.set(l.key,l.offset,l.type);const a=Lg(o.getNode(),xf),c=Lg(l.getNode(),xf);Be(a)&&i.set(a.getKey(),a),Be(c)&&i.set(c.getKey(),c)}for(const o of t.getNodes())if(Be(o)&&xf(o))i.set(o.getKey(),o);else if(r===null){const l=Lg(o,xf);Be(l)&&i.set(l.getKey(),l)}for(const[o,l]of i){const a=e();n(l,a),l.replace(a,!0),s&&(o===s.anchor.key&&s.anchor.set(a.getKey(),s.anchor.offset,s.anchor.type),o===s.focus.key&&s.focus.set(a.getKey(),s.focus.offset,s.focus.type))}s&&t.is(be())&&yi(s)}function IA(t){const e=NA(t);return e!==null&&e.writingMode==="vertical-rl"}function NA(t){const e=t.anchor.getNode();return Be(e)?MA(e):RA(e)}function ZS(t,e){let n=IA(t)?!e:e;DA(t)&&(n=!n);const r=Ux(t.focus,n?"previous":"next");if(qD(r))return!1;for(const i of ZD(r)){if(oA(i))return!i.origin.isInline();if(!Be(i.origin)){if(Eo(i.origin))return!0;break}}return!1}function TV(t,e,n,r){t.modify(e?"extend":"move",n,r)}function DA(t){const e=NA(t);return e!==null&&e.direction==="rtl"}function zS(t,e,n){const r=DA(t);let i;i=IA(t)||r?!n:n,TV(t,e,i,"character")}function Lg(t,e){let n=t;for(;n!==null&&n.getParent()!==null&&!e(n);)n=n.getParentOrThrow();return e(n)?n:null}function VA(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Rp=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,EV=Rp&&"documentMode"in document?document.documentMode:null,PV=Rp&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);!(!Rp||!("InputEvent"in window)||EV)&&"getTargetRanges"in new window.InputEvent("input");function FA(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))e.push(r);return e}function In(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}const AV=Rp,$V=PV;function Lr(t,...e){const n=FA(...e);n.length>0&&t.classList.add(...n)}function Lp(t,...e){const n=FA(...e);n.length>0&&t.classList.remove(...n)}function QV(t){return t?t.getAdjacentCaret():null}function BA(t,e){let n=t;for(;n!=null;){if(n instanceof e)return n;n=n.getParent()}return null}function BO(t){const e=$r(t,(n=>Be(n)&&!n.isInline()));return Be(e)||VA(4,t.__key),e}const $r=(t,e)=>{let n=t;for(;n!==rn()&&n!=null;){if(e(n))return n;n=n.getParent()}return null};function ZA(t){const e=be()||HD();let n;if(Se(e))n=Ux(e.focus,"next");else{if(e!=null){const o=e.getNodes(),l=o[o.length-1];l&&(n=Kx(l,"next"))}n=n||Gh(rn(),"previous").getFlipped().insert(St())}const r=MV(t,n),i=zD(r),s=oA(i)?IO(i):r;return KD(jD(s)),t.getLatest()}function MV(t,e,n){let r=QS(e,"next");for(let i=r;i;i=JD(i,n))r=i;return cA(r)&&VA(283),r.insert(t.isInline()?St().append(t):t),QS(Kx(t.getLatest(),"next"),e.direction)}function sy(t,e){const n=e();return t.replace(n),n.append(t),n}function As(t,e){return t!==null&&Object.getPrototypeOf(t).constructor.name===e.name}function RV(t,e){const n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i!==null&&n.push(i)}return n}let Ig=!($V||!AV)&&void 0;function LV(t){let e=1;if((function(){if(Ig===void 0){const n=document.createElement("div");n.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(n);const r=n.getBoundingClientRect();n.style.setProperty("zoom","2"),Ig=n.getBoundingClientRect().width===r.width,document.body.removeChild(n)}return Ig})())for(;t;)e*=Number(window.getComputedStyle(t).getPropertyValue("zoom")),t=t.parentElement;return e}const yf=0,ZO=1,zO=2,vr=0,IV=1,XS=2,NV=3,DV=4;function VV(t,e,n,r,i){if(t===null||n.size===0&&r.size===0&&!i)return vr;const s=e._selection,o=t._selection;if(i)return IV;if(!(Se(s)&&Se(o)&&o.isCollapsed()&&s.isCollapsed()))return vr;const l=(function(x,m,y){const b=x._nodeMap,S=[];for(const v of m){const w=b.get(v);w!==void 0&&S.push(w)}for(const[v,w]of y){if(!w)continue;const _=b.get(v);_===void 0||$p(_)||S.push(_)}return S})(e,n,r);if(l.length===0)return vr;if(l.length>1){const x=e._nodeMap,m=x.get(s.anchor.key),y=x.get(o.anchor.key);return m&&y&&!t._nodeMap.has(m.__key)&&tt(m)&&m.__text.length===1&&s.anchor.offset===1?XS:vr}const a=l[0],c=t._nodeMap.get(a.__key);if(!tt(c)||!tt(a)||c.__mode!==a.__mode)return vr;const u=c.__text,f=a.__text;if(u===f)return vr;const h=s.anchor,d=o.anchor;if(h.key!==d.key||h.type!=="text")return vr;const p=h.offset,g=d.offset,O=f.length-u.length;return O===1&&g===p-1?XS:O===-1&&g===p+1?NV:O===-1&&g===p?DV:vr}function FV(t,e){let n=Date.now(),r=vr;return(i,s,o,l,a,c)=>{const u=Date.now();if(c.has(ed))return r=vr,n=u,zO;const f=VV(i,s,l,a,t.isComposing()),h=(()=>{const d=o===null||o.editor===t,p=c.has(cV);if(!p&&d&&c.has(aV))return yf;if(i===null)return ZO;const g=s._selection;return l.size>0||a.size>0?p===!1&&f!==vr&&f===r&&u<n+e&&d||l.size===1&&(function(O,x,m){const y=x._nodeMap.get(O),b=m._nodeMap.get(O),S=x._selection,v=m._selection;return!(Se(S)&&Se(v)&&S.anchor.type==="element"&&S.focus.type==="element"&&v.anchor.type==="text"&&v.focus.type==="text"||!tt(y)||!tt(b)||y.__parent!==b.__parent)&&JSON.stringify(x.read((()=>y.exportJSON())))===JSON.stringify(m.read((()=>b.exportJSON())))})(Array.from(l)[0],i,s)?yf:ZO:g!==null?yf:zO})();return n=u,r=f,h}}function WS(t){t.undoStack=[],t.redoStack=[],t.current=null}function BV(t,e,n){const r=FV(t,n);return In(t.registerCommand(OV,(()=>((function(s,o){const l=o.redoStack,a=o.undoStack;if(a.length!==0){const c=o.current,u=a.pop();c!==null&&(l.push(c),s.dispatchCommand(mf,!0)),a.length===0&&s.dispatchCommand(Of,!1),o.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:ed})}})(t,e),!0)),Fe),t.registerCommand(dV,(()=>((function(s,o){const l=o.redoStack,a=o.undoStack;if(l.length!==0){const c=o.current;c!==null&&(a.push(c),s.dispatchCommand(Of,!0));const u=l.pop();l.length===0&&s.dispatchCommand(mf,!1),o.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:ed})}})(t,e),!0)),Fe),t.registerCommand(eV,(()=>(WS(e),!1)),Fe),t.registerCommand(tV,(()=>(WS(e),t.dispatchCommand(mf,!1),t.dispatchCommand(Of,!1),!0)),Fe),t.registerUpdateListener((({editorState:s,prevEditorState:o,dirtyLeaves:l,dirtyElements:a,tags:c})=>{const u=e.current,f=e.redoStack,h=e.undoStack,d=u===null?null:u.editorState;if(u!==null&&s===d)return;const p=r(o,s,u,l,a,c);if(p===ZO)f.length!==0&&(e.redoStack=[],t.dispatchCommand(mf,!1)),u!==null&&(h.push({...u}),t.dispatchCommand(Of,!0));else if(p===zO)return;e.current={editor:t,editorState:s}})))}function zA(){return{current:null,redoStack:[],undoStack:[]}}function XA({delay:t,externalHistoryState:e}){const[n]=hn();return(function(r,i,s=1e3){const o=C.useMemo((()=>i||zA()),[i]);C.useEffect((()=>BV(r,o,s)),[s,r,o])})(n,e,t),null}function ZV(t,e){const n=e.body?e.body.childNodes:[];let r=[];const i=[];for(let s=0;s<n.length;s++){const o=n[s];if(!jA.has(o.nodeName)){const l=HA(o,t,i,!1);l!==null&&(r=r.concat(l))}}return(function(s){for(const o of s)o.getNextSibling()instanceof uA&&o.insertAfter(Yl());for(const o of s){const l=o.getChildren();for(const a of l)o.insertBefore(a);o.remove()}})(i),r}function zV(t,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=rn().getChildren();for(let i=0;i<r.length;i++)WA(t,r[i],n,e);return n.innerHTML}function WA(t,e,n,r=null){let i=r===null||e.isSelected(r);const s=Be(e)&&e.excludeFromCopy("html");let o=e;if(r!==null){let d=iA(e);d=tt(d)&&r!==null?LA(r,d):d,o=d}const l=Be(o)?o.getChildren():[],a=PA(t,o.getType());let c;c=a&&a.exportDOM!==void 0?a.exportDOM(t,o):o.exportDOM(t);const{element:u,after:f}=c;if(!u)return!1;const h=document.createDocumentFragment();for(let d=0;d<l.length;d++){const p=l[d],g=WA(t,p,h,r);!i&&Be(e)&&g&&e.extractWithChild(p,r,"html")&&(i=!0)}if(i&&!s){if((gi(u)||NS(u))&&u.append(h),n.append(u),f){const d=f.call(o,u);d&&(NS(u)?u.replaceChildren(d):u.replaceWith(d))}}else n.append(h);return i}const jA=new Set(["STYLE","SCRIPT"]);function HA(t,e,n,r,i=new Map,s){let o=[];if(jA.has(t.nodeName))return o;let l=null;const a=(function(p,g){const{nodeName:O}=p,x=g._htmlConversions.get(O.toLowerCase());let m=null;if(x!==void 0)for(const y of x){const b=y(p);b!==null&&(m===null||(m.priority||0)<=(b.priority||0))&&(m=b)}return m!==null?m.conversion:null})(t,e),c=a?a(t):null;let u=null;if(c!==null){u=c.after;const p=c.node;if(l=Array.isArray(p)?p[p.length-1]:p,l!==null){for(const[,g]of i)if(l=g(l,s),!l)break;l&&o.push(...Array.isArray(p)?p:[l])}c.forChild!=null&&i.set(t.nodeName,c.forChild)}const f=t.childNodes;let h=[];const d=(l==null||!ar(l))&&(l!=null&&Kh(l)||r);for(let p=0;p<f.length;p++)h.push(...HA(f[p],e,n,d,new Map(i),l));return u!=null&&(h=u(h)),IS(t)&&(h=XV(t,h,d?()=>{const p=new uA;return n.push(p),p}:St)),l==null?h.length>0?o=o.concat(h):IS(t)&&(function(p){return p.nextSibling==null||p.previousSibling==null?!1:DS(p.nextSibling)&&DS(p.previousSibling)})(t)&&(o=o.concat(Yl())):Be(l)&&l.append(...h),o}function XV(t,e,n){const r=t.style.textAlign,i=[];let s=[];for(let o=0;o<e.length;o++){const l=e[o];if(Kh(l))r&&!l.getFormat()&&l.setFormat(r),i.push(l);else if(s.push(l),o===e.length-1||o<e.length-1&&Kh(e[o+1])){const a=n();a.setFormat(r),a.append(...s),i.push(a),s=[]}}return i}function nd(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function WV(t,e=be()){return e==null&&nd(166),Se(e)&&e.isCollapsed()||e.getNodes().length===0?"":zV(t,e)}function jV(t,e=be()){return e==null&&nd(166),Se(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(HV(t,e))}function jS(t,e,n){const r=t.getData("application/x-lexical-editor");if(r)try{const l=JSON.parse(r);if(l.namespace===n._config.namespace&&Array.isArray(l.nodes))return HS(n,qV(l.nodes),e)}catch{}const i=t.getData("text/html"),s=t.getData("text/plain");if(i&&s!==i)try{const l=new DOMParser().parseFromString((function(a){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:c=>c}).createHTML(a):a})(i),"text/html");return HS(n,ZV(n,l),e)}catch{}const o=s||t.getData("text/uri-list");if(o!=null)if(Se(e)){const l=o.split(/(\r?\n|\t)/);l[l.length-1]===""&&l.pop();for(let a=0;a<l.length;a++){const c=be();if(Se(c)){const u=l[a];u===`
57
+ `||u===`\r
58
+ `?c.insertParagraph():u===" "?c.insertNodes([Gx()]):c.insertText(u)}}}else e.insertRawText(o)}function HS(t,e,n){t.dispatchCommand(gV,{nodes:e,selection:n})||(n.insertNodes(e),(function(r){if(Se(r)&&r.isCollapsed()){const i=r.anchor;let s=null;const o=Ux(i,"previous");if(o)if(cA(o))s=o.origin;else{const l=XD(o,Gh(rn(),"next").getFlipped());for(const a of l){if(tt(a.origin)){s=a.origin;break}if(Be(a.origin)&&!a.origin.isInline())break}}if(s&&tt(s)){const l=s.getFormat(),a=s.getStyle();r.format===l&&r.style===a||(r.format=l,r.style=a,r.dirty=!0)}}})(n))}function qA(t,e,n,r=[]){let i=e===null||n.isSelected(e);const s=Be(n)&&n.excludeFromCopy("html");let o=n;if(e!==null){let c=iA(n);c=tt(c)&&e!==null?LA(e,c):c,o=c}const l=Be(o)?o.getChildren():[],a=(function(c){const u=c.exportJSON(),f=c.constructor;if(u.type!==f.getType()&&nd(58,f.name),Be(c)){const h=u.children;Array.isArray(h)||nd(59,f.name)}return u})(o);if(tt(o)){const c=o.__text;c.length>0?a.text=c:i=!1}for(let c=0;c<l.length;c++){const u=l[c],f=qA(t,e,u,a.children);!i&&Be(n)&&f&&n.extractWithChild(u,e,"clone")&&(i=!0)}if(i&&!s)r.push(a);else if(Array.isArray(a.children))for(let c=0;c<a.children.length;c++){const u=a.children[c];r.push(u)}return i}function HV(t,e){const n=[],r=rn().getChildren();for(let i=0;i<r.length;i++)qA(t,e,r[i],n);return{namespace:t._config.namespace,nodes:n}}function qV(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n],i=UD(r);tt(i)&&kV(i),e.push(i)}return e}let cl=null;async function qS(t,e,n){if(cl!==null)return!1;if(e!==null)return new Promise(((c,u)=>{t.update((()=>{c(YS(t,e,n))}))}));const r=t.getRootElement(),i=t._window||window,s=window.document,o=EA(i);if(r===null||o===null)return!1;const l=s.createElement("span");l.style.cssText="position: fixed; top: -1000px;",l.append(s.createTextNode("#")),r.append(l);const a=new Range;return a.setStart(l,0),a.setEnd(l,1),o.removeAllRanges(),o.addRange(a),new Promise(((c,u)=>{const f=t.registerCommand(hA,(h=>(As(h,ClipboardEvent)&&(f(),cl!==null&&(window.clearTimeout(cl),cl=null),c(YS(t,h,n))),!0)),es);cl=window.setTimeout((()=>{f(),cl=null,c(!1)}),50),s.execCommand("copy"),l.remove()}))}function YS(t,e,n){if(n===void 0){const i=EA(t._window);if(!i)return!1;const s=i.anchorNode,o=i.focusNode;if(s!==null&&o!==null&&!SV(t,s,o))return!1;const l=be();if(l===null)return!1;n=UV(l)}e.preventDefault();const r=e.clipboardData;return r!==null&&(GV(r,n),!0)}const YV=[["text/html",WV],["application/x-lexical-editor",jV]];function UV(t=be()){const e={"text/plain":t?t.getTextContent():""};if(t){const n=sA();for(const[r,i]of YV){const s=i(n,t);s!==null&&(e[r]=s)}}return e}function GV(t,e){for(const n in e){const r=e[n];r!==void 0&&t.setData(n,r)}}function US(t,e){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(t,e);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(t,e);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const _a=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,KV=_a&&"documentMode"in document?document.documentMode:null,JV=!(!_a||!("InputEvent"in window)||KV)&&"getTargetRanges"in new window.InputEvent("input"),eF=_a&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),GS=_a&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,tF=_a&&/^(?=.*Chrome).*/i.test(navigator.userAgent),nF=_a&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!tF,KS=bi("DRAG_DROP_PASTE_FILE");let Ip=class YA extends ts{static getType(){return"quote"}static clone(e){return new YA(e.__key)}createDOM(e){const n=document.createElement("blockquote");return Lr(n,e.theme.quote),n}updateDOM(e,n){return!1}static importDOM(){return{blockquote:e=>({conversion:rF,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(gi(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(e){return Np().updateFromJSON(e)}insertNewAfter(e,n){const r=St(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){const e=St();return this.getChildren().forEach((n=>e.append(n))),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function Np(){return cs(new Ip)}function XO(t){return t instanceof Ip}let Du=class UA extends ts{static getType(){return"heading"}static clone(e){return new UA(e.__tag,e.__key)}constructor(e,n){super(n),this.__tag=e}getTag(){return this.__tag}setTag(e){const n=this.getWritable();return this.__tag=e,n}createDOM(e){const n=this.__tag,r=document.createElement(n),i=e.theme.heading;if(i!==void 0){const s=i[n];Lr(r,s)}return r}updateDOM(e,n,r){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:ul,priority:0}),h2:e=>({conversion:ul,priority:0}),h3:e=>({conversion:ul,priority:0}),h4:e=>({conversion:ul,priority:0}),h5:e=>({conversion:ul,priority:0}),h6:e=>({conversion:ul,priority:0}),p:e=>{const n=e.firstChild;return n!==null&&JS(n)?{conversion:()=>({node:null}),priority:3}:null},span:e=>JS(e)?{conversion:n=>({node:Bi("h1")}),priority:3}:null}}exportDOM(e){const{element:n}=super.exportDOM(e);if(gi(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(e){return Bi(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,n=!0){const r=e?e.anchor.offset:0,i=this.getLastDescendant(),s=!i||e&&e.anchor.key===i.getKey()&&r===i.getTextContentSize()||!e?St():Bi(this.getTag()),o=this.getDirection();if(s.setDirection(o),this.insertAfter(s,n),r===0&&!this.isEmpty()&&e){const l=St();l.select(),this.replace(l,!0)}return s}collapseAtStart(){const e=this.isEmpty()?St():Bi(this.getTag());return this.getChildren().forEach((n=>e.append(n))),this.replace(e),!0}extractWithChild(){return!0}};function JS(t){return t.nodeName.toLowerCase()==="span"&&t.style.fontSize==="26pt"}function ul(t){const e=t.nodeName.toLowerCase();let n=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(n=Bi(e),t.style!==null&&($A(t,n),n.setFormat(t.style.textAlign))),{node:n}}function rF(t){const e=Np();return t.style!==null&&(e.setFormat(t.style.textAlign),$A(t,e)),{node:e}}function Bi(t="h1"){return cs(new Du(t))}function Ul(t){return t instanceof Du}function bf(t){let e=null;if(As(t,DragEvent)?e=t.dataTransfer:As(t,ClipboardEvent)&&(e=t.clipboardData),e===null)return[!1,[],!1];const n=e.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(e.files),i]}function ew(t){const e=be();if(!Se(e))return!1;const n=new Set,r=e.getNodes();for(let i=0;i<r.length;i++){const s=r[i],o=s.getKey();if(n.has(o))continue;const l=$r(s,(c=>Be(c)&&!c.isInline()));if(l===null)continue;const a=l.getKey();l.canIndent()&&!n.has(a)&&(n.add(a),t(l))}return n.size>0}function tw(t){const e=Wo(t);return Eo(e)}function Ng(t){for(const e of["lowercase","uppercase","capitalize"])t.hasFormat(e)&&t.toggleFormat(e)}function iF(t){return In(t.registerCommand(ey,(e=>{const n=be();return!!Qt(n)&&(n.clear(),!0)}),Fe),t.registerCommand(Rg,(e=>{const n=be();return Se(n)?(n.deleteCharacter(e),!0):!!Qt(n)&&(n.deleteNodes(),!0)}),Fe),t.registerCommand(oV,(e=>{const n=be();return!!Se(n)&&(n.deleteWord(e),!0)}),Fe),t.registerCommand(sV,(e=>{const n=be();return!!Se(n)&&(n.deleteLine(e),!0)}),Fe),t.registerCommand(rV,(e=>{const n=be();if(typeof e=="string")n!==null&&n.insertText(e);else{if(n===null)return!1;const r=e.dataTransfer;if(r!=null)jS(r,n,t);else if(Se(n)){const i=e.data;return i&&n.insertText(i),!0}}return!0}),Fe),t.registerCommand(pV,(()=>{const e=be();return!!Se(e)&&(e.removeText(),!0)}),Fe),t.registerCommand(mA,(e=>{const n=be();return!!Se(n)&&(n.formatText(e),!0)}),Fe),t.registerCommand(lV,(e=>{const n=be();if(!Se(n)&&!Qt(n))return!1;const r=n.getNodes();for(const i of r){const s=$r(i,(o=>Be(o)&&!o.isInline()));s!==null&&s.setFormat(e)}return!0}),Fe),t.registerCommand(RS,(e=>{const n=be();return!!Se(n)&&(n.insertLineBreak(e),!0)}),Fe),t.registerCommand(DO,(()=>{const e=be();return!!Se(e)&&(e.insertParagraph(),!0)}),Fe),t.registerCommand(OA,(()=>(Ca([Gx()]),!0)),Fe),t.registerCommand(td,(()=>ew((e=>{const n=e.getIndent();e.setIndent(n+1)}))),Fe),t.registerCommand(VO,(()=>ew((e=>{const n=e.getIndent();n>0&&e.setIndent(Math.max(0,n-1))}))),Fe),t.registerCommand(bA,(e=>{const n=be();if(Qt(n)){const r=n.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if(Se(n)){const r=$S(n.focus,!0);if(!e.shiftKey&&Eo(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),e.preventDefault(),!0}return!1}),Fe),t.registerCommand(xA,(e=>{const n=be();if(Qt(n)){const r=n.getNodes();if(r.length>0)return r[0].selectNext(0,0),!0}else if(Se(n)){if((function(i){const s=i.focus;return s.key==="root"&&s.offset===rn().getChildrenSize()})(n))return e.preventDefault(),!0;const r=$S(n.focus,!1);if(!e.shiftKey&&Eo(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),e.preventDefault(),!0}return!1}),Fe),t.registerCommand(yA,(e=>{const n=be();if(Qt(n)){const r=n.getNodes();if(r.length>0)return e.preventDefault(),FS(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!Se(n))return!1;if(ZS(n,!0)){const r=e.shiftKey;return e.preventDefault(),zS(n,r,!0),!0}return!1}),Fe),t.registerCommand(uV,(e=>{const n=be();if(Qt(n)){const i=n.getNodes();if(i.length>0)return e.preventDefault(),FS(i[0])?i[0].selectPrevious():i[0].selectNext(0,0),!0}if(!Se(n))return!1;const r=e.shiftKey;return!!ZS(n,!1)&&(e.preventDefault(),zS(n,r,!1),!0)}),Fe),t.registerCommand(vA,(e=>{if(tw(e.target))return!1;const n=be();if(Se(n)){if((function(r){if(!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;const s=i.getNode();if($p(s))return!1;const o=BO(s);return o.getIndent()>0&&(o.is(s)||s.is(o.getFirstDescendant()))})(n))return e.preventDefault(),t.dispatchCommand(VO,void 0);if(GS&&navigator.language==="ko-KR")return!1}else if(!Qt(n))return!1;return e.preventDefault(),t.dispatchCommand(Rg,!0)}),Fe),t.registerCommand(SA,(e=>{if(tw(e.target))return!1;const n=be();return!(!Se(n)&&!Qt(n))&&(e.preventDefault(),t.dispatchCommand(Rg,!1))}),Fe),t.registerCommand(ny,(e=>{const n=be();if(!Se(n))return!1;if(Ng(n),e!==null){if((GS||eF||nF)&&JV)return!1;if(e.preventDefault(),e.shiftKey)return t.dispatchCommand(RS,!1)}return t.dispatchCommand(DO,void 0)}),Fe),t.registerCommand(Qp,(()=>{const e=be();return!!Se(e)&&(t.blur(),!0)}),Fe),t.registerCommand(pA,(e=>{const[,n]=bf(e);if(n.length>0){const i=US(e.clientX,e.clientY);if(i!==null){const{offset:s,node:o}=i,l=Wo(o);if(l!==null){const a=Lu();if(tt(l))a.anchor.set(l.getKey(),s,"text"),a.focus.set(l.getKey(),s,"text");else{const u=l.getParentOrThrow().getKey(),f=l.getIndexWithinParent()+1;a.anchor.set(u,f,"element"),a.focus.set(u,f,"element")}const c=Jh(a);yi(c)}t.dispatchCommand(KS,n)}return e.preventDefault(),!0}const r=be();return!!Se(r)}),Fe),t.registerCommand(ty,(e=>{const[n]=bf(e),r=be();return!(n&&!Se(r))}),Fe),t.registerCommand(dA,(e=>{const[n]=bf(e),r=be();if(n&&!Se(r))return!1;const i=US(e.clientX,e.clientY);if(i!==null){const s=Wo(i.node);Eo(s)&&e.preventDefault()}return!0}),Fe),t.registerCommand(mV,(()=>(GD(),!0)),Fe),t.registerCommand(hA,(e=>(qS(t,As(e,ClipboardEvent)?e:null),!0)),Fe),t.registerCommand(iV,(e=>((async function(n,r){await qS(r,As(n,ClipboardEvent)?n:null),r.update((()=>{const i=be();Se(i)?i.removeText():Qt(i)&&i.getNodes().forEach((s=>s.remove()))}))})(e,t),!0)),Fe),t.registerCommand(iy,(e=>{const[,n,r]=bf(e);return n.length>0&&!r?(t.dispatchCommand(KS,n),!0):bV(e.target)&&vV(e.target)?!1:be()!==null&&((function(i,s){i.preventDefault(),s.update((()=>{const o=be(),l=As(i,InputEvent)||As(i,KeyboardEvent)?null:i.clipboardData;l!=null&&o!==null&&jS(l,o,s)}),{tag:fV})})(e,t),!0)}),Fe),t.registerCommand(kA,(e=>{const n=be();return Se(n)&&Ng(n),!1}),Fe),t.registerCommand(ry,(e=>{const n=be();return Se(n)&&Ng(n),!1}),Fe))}function cn(t,e,n,r){const i=t.length;let s=0,o;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(e,n),t.splice(...o);else for(n&&t.splice(e,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(e,0),t.splice(...o),s+=1e4,e+=1e4}function nr(t,e){return t.length>0?(cn(t,t.length,0,e),t):e}const Gr=fo(/[A-Za-z]/),Yn=fo(/[\dA-Za-z]/),sF=fo(/[#-'*+\--9=?A-Z^-~]/);function WO(t){return t!==null&&(t<32||t===127)}const jO=fo(/\d/),oF=fo(/[\dA-Fa-f]/),lF=fo(/[!-/:-@[-`{-~]/);function we(t){return t!==null&&t<-2}function yt(t){return t!==null&&(t<0||t===32)}function Ve(t){return t===-2||t===-1||t===32}const aF=fo(new RegExp("\\p{P}|\\p{S}","u")),Mi=fo(/\s/);function fo(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function qs(t){if(t===null||yt(t)||Mi(t))return 1;if(aF(t))return 2}function Vu(t,e,n){const r=[];let i=-1;for(;++i<t.length;){const s=t[i].resolveAll;s&&!r.includes(s)&&(e=s(e,n),r.push(s))}return e}function cF(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,l){let a=-1;for(;++a<o.length;)if(o[a][0]==="enter"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._close){let c=a;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[a][1].end.offset-o[a][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[a][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[a][1].end)},f={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[a][1].start)},h=[["enter",u,l],["enter",o[c][1],l],["exit",o[c][1],l],["enter",f,l]],d=l.parser.constructs.insideSpan.null;d&&cn(h,h.length,0,Vu(d,o.slice(c+1,a),l)),cn(h,h.length,0,[["exit",f,l],["enter",o[a][1],l],["exit",o[a][1],l],["exit",u,l]]),cn(o,c-1,a-c+3,h),a=c+h.length-2;break}}for(a=-1;++a<o.length;)o[a][1].type==="strikethroughSequenceTemporary"&&(o[a][1].type="data");return o}function s(o,l,a){const c=this.previous,u=this.events;let f=0;return h;function h(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?a(p):(o.enter("strikethroughSequenceTemporary"),d(p))}function d(p){const g=qs(c);if(p===126)return f>1?a(p):(o.consume(p),f++,d);if(f<2&&!n)return a(p);const O=o.exit("strikethroughSequenceTemporary"),x=qs(p);return O._open=!x||x===2&&!!g,O._close=!g||g===2&&!!x,l(p)}}}const uF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];GA.peek=gF;function fF(){return{canContainEols:["delete"],enter:{strikethrough:dF},exit:{strikethrough:pF}}}function hF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:uF}],handlers:{delete:GA}}}function dF(t){this.enter({type:"delete",children:[]},t)}function pF(t){this.exit(t)}function GA(t,e,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(t,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function gF(){return"~"}KA.peek=vF;var mF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],OF={canContainEols:["highlight"],enter:{highlight:xF},exit:{highlight:yF}};function xF(t){this.enter({type:"highlight",children:[]},t)}function yF(t){this.exit(t)}var bF={unsafe:[{character:"=",inConstruct:"phrasing",notInConstruct:mF}],handlers:{highlight:KA}};function KA(t,e,n,r){const s=n.createTracker(r),o=n.enter("highlight");let l=s.move("==");return l+=s.move(n.containerPhrasing(t,{before:l,after:"=",...s.current()})),l+=s.move("=="),o(),l}function vF(){return"="}function nw(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function bae(){}function vae(){}const SF=["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"],rw={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 JA(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=48&&e<=57}function wF(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}function kF(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}function iw(t){return kF(t)||JA(t)}const sw=document.createElement("i");function Xc(t){const e="&"+t+";";sw.innerHTML=e;const n=sw.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}const CF=["","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 _F(t,e){const n=e||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let s=0,o=-1,l="",a,c;n.position&&("start"in n.position||"indent"in n.position?(c=n.position.indent,a=n.position.start):a=n.position);let u=(a?a.line:0)||1,f=(a?a.column:0)||1,h=p(),d;for(s--;++s<=t.length;)if(d===10&&(f=(c?c[o]:0)||1),d=t.charCodeAt(s),d===38){const x=t.charCodeAt(s+1);if(x===9||x===10||x===12||x===32||x===38||x===60||Number.isNaN(x)||r&&x===r){l+=String.fromCharCode(d),f++;continue}const m=s+1;let y=m,b=m,S;if(x===35){b=++y;const $=t.charCodeAt(b);$===88||$===120?(S="hexadecimal",b=++y):S="decimal"}else S="named";let v="",w="",_="";const T=S==="named"?iw:S==="decimal"?JA:wF;for(b--;++b<=t.length;){const $=t.charCodeAt(b);if(!T($))break;_+=String.fromCharCode($),S==="named"&&SF.includes(_)&&(v=_,w=Xc(_))}let E=t.charCodeAt(b)===59;if(E){b++;const $=S==="named"?Xc(_):!1;$&&(v=_,w=$)}let L=1+b-m,M="";if(!(!E&&n.nonTerminated===!1))if(!_)S!=="named"&&g(4,L);else if(S==="named"){if(E&&!w)g(5,1);else if(v!==_&&(b=y+v.length,L=1+b-y,E=!1),!E){const $=v?1:3;if(n.attribute){const V=t.charCodeAt(b);V===61?(g($,L),w=""):iw(V)?w="":g($,L)}else g($,L)}M=w}else{E||g(2,L);let $=Number.parseInt(_,S==="hexadecimal"?16:10);if(TF($))g(7,L),M="�";else if($ in rw)g(6,L),M=rw[$];else{let V="";EF($)&&g(6,L),$>65535&&($-=65536,V+=String.fromCharCode($>>>10|55296),$=56320|$&1023),M=V+String.fromCharCode($)}}if(M){O(),h=p(),s=b-1,f+=b-m+1,i.push(M);const $=p();$.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,M,{start:h,end:$},t.slice(m-1,b)),h=$}else _=t.slice(m-1,b),l+=_,f+=_.length,s=b-1}else d===10&&(u++,o++,f=0),Number.isNaN(d)?O():(l+=String.fromCharCode(d),f++);return i.join("");function p(){return{line:u,column:f,offset:s+((a?a.offset:0)||0)}}function g(x,m){let y;n.warning&&(y=p(),y.column+=m,y.offset+=m,n.warning.call(n.warningContext||void 0,CF[x],y,x))}function O(){l&&(i.push(l),n.text&&n.text.call(n.textContext||void 0,l,{start:h,end:p()}),l="")}}function TF(t){return t>=55296&&t<=57343||t>1114111}function EF(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}const PF=/["&'<>`]/g,AF=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,$F=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,QF=/[|\\{}()[\]^$+*?.]/g,ow=new WeakMap;function MF(t,e){if(t=t.replace(e.subset?RF(e.subset):PF,r),e.subset||e.escapeOnly)return t;return t.replace(AF,n).replace($F,r);function n(i,s,o){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),e)}function r(i,s,o){return e.format(i.charCodeAt(0),o.charCodeAt(s+1),e)}}function RF(t){let e=ow.get(t);return e||(e=LF(t),ow.set(t,e)),e}function LF(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(QF,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}function IF(t){return"&#x"+t.toString(16).toUpperCase()+";"}function NF(t,e){return MF(t,Object.assign({format:IF},e))}function Zi(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?lw(t.position):"start"in t||"end"in t?lw(t):"line"in t||"column"in t?HO(t):""}function HO(t){return aw(t&&t.line)+":"+aw(t&&t.column)}function lw(t){return HO(t&&t.start)+"-"+HO(t&&t.end)}function aw(t){return t&&typeof t=="number"?t:1}class st extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?i=e:!s.cause&&e&&(o=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?s.ruleId=r:(s.source=r.slice(0,a),s.ruleId=r.slice(a+1))}if(!s.place&&s.ancestors&&s.ancestors){const a=s.ancestors[s.ancestors.length-1];a&&(s.place=a.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Zi(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}st.prototype.file="";st.prototype.name="";st.prototype.reason="";st.prototype.message="";st.prototype.stack="";st.prototype.column=void 0;st.prototype.line=void 0;st.prototype.ancestors=void 0;st.prototype.cause=void 0;st.prototype.fatal=void 0;st.prototype.place=void 0;st.prototype.ruleId=void 0;st.prototype.source=void 0;const e$=" ";function DF(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:f,mdxJsxFlowTagExpressionAttribute:h,mdxJsxFlowTagAttributeValueLiteral:t,mdxJsxFlowTagAttributeValueExpression:t,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:f,mdxJsxTextTagExpressionAttribute:h,mdxJsxTextTagAttributeValueLiteral:t,mdxJsxTextTagAttributeValueExpression:t,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:l,mdxJsxFlowTagNamePrimary:a,mdxJsxFlowTagNameMember:c,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:d,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:p,mdxJsxFlowTagAttributeNameLocal:g,mdxJsxFlowTagAttributeValueLiteral:O,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:x,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:m,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:l,mdxJsxTextTagNamePrimary:a,mdxJsxTextTagNameMember:c,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:d,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:p,mdxJsxTextTagAttributeNameLocal:g,mdxJsxTextTagAttributeValueLiteral:O,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:x,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:m,mdxJsxTextTag:y}};function t(){this.buffer()}function e(w){return{line:w.line,column:w.column,offset:w.offset}}function n(w){this.config.enter.data.call(this,w),this.config.exit.data.call(this,w)}function r(w){const _={name:void 0,attributes:[],close:!1,selfClosing:!1,start:w.start,end:w.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=_,this.buffer()}function i(w){if(this.data.mdxJsxTagStack.length===0)throw new st("Unexpected closing slash `/` in tag, expected an open tag first",{start:w.start,end:w.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function s(w){if(this.data.mdxJsxTag.close)throw new st("Unexpected attribute in closing tag, expected the end of the tag",{start:w.start,end:w.end},"mdast-util-mdx-jsx:unexpected-attribute")}function o(w){if(this.data.mdxJsxTag.close)throw new st("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:w.start,end:w.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function l(){const w=this.data.mdxJsxTag;w.close=!0}function a(w){const _=this.data.mdxJsxTag;_.name=this.sliceSerialize(w)}function c(w){const _=this.data.mdxJsxTag;_.name+="."+this.sliceSerialize(w)}function u(w){const _=this.data.mdxJsxTag;_.name+=":"+this.sliceSerialize(w)}function f(w){const _=this.data.mdxJsxTag;s.call(this,w),_.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:e(w.start),end:void 0}})}function h(w){const _=this.data.mdxJsxTag;s.call(this,w),_.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:e(w.start),end:void 0}}),this.buffer()}function d(w){const _=this.data.mdxJsxTag,T=_.attributes[_.attributes.length-1];T.type;const E=w.estree;T.value=this.resume(),T.position,T.position.end=e(w.end),E&&(T.data={estree:E})}function p(w){const _=this.data.mdxJsxTag,T=_.attributes[_.attributes.length-1];T.type,T.name=this.sliceSerialize(w),T.position,T.position.end=e(w.end)}function g(w){const _=this.data.mdxJsxTag,T=_.attributes[_.attributes.length-1];T.type,T.name+=":"+this.sliceSerialize(w),T.position,T.position.end=e(w.end)}function O(w){const _=this.data.mdxJsxTag,T=_.attributes[_.attributes.length-1];T.value=_F(this.resume(),{nonTerminated:!1}),T.position,T.position.end=e(w.end)}function x(w){const _=this.data.mdxJsxTag,T=_.attributes[_.attributes.length-1];T.type;const E={type:"mdxJsxAttributeValueExpression",value:this.resume()},L=w.estree;L&&(E.data={estree:L}),T.value=E,T.position,T.position.end=e(w.end)}function m(){const w=this.data.mdxJsxTag;w.selfClosing=!0}function y(w){const _=this.data.mdxJsxTag,T=this.data.mdxJsxTagStack,E=T[T.length-1];if(_.close&&E.name!==_.name)throw new st("Unexpected closing tag `"+v(_)+"`, expected corresponding closing tag for `"+v(E)+"` ("+Zi(E)+")",{start:w.start,end:w.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),_.close?T.pop():this.enter({type:w.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:_.name||null,attributes:_.attributes,children:[]},w,b),_.selfClosing||_.close?this.exit(w,S):T.push(_)}function b(w,_){const T=this.data.mdxJsxTagStack,E=T[T.length-1],L=w?" before the end of `"+w.type+"`":"",M=w?{start:w.start,end:w.end}:void 0;throw new st("Expected a closing tag for `"+v(E)+"` ("+Zi({start:_.start,end:_.end})+")"+L,M,"mdast-util-mdx-jsx:end-tag-mismatch")}function S(w,_){const T=this.data.mdxJsxTag;throw new st("Expected the closing tag `"+v(T)+"` either after the end of `"+_.type+"` ("+Zi(_.end)+") or another opening tag after the start of `"+_.type+"` ("+Zi(_.start)+")",{start:w.start,end:w.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function v(w){return"<"+(w.close?"/":"")+(w.name||"")+">"}}function VF(t){const e={},n=e.quote||'"',r=e.quoteSmart||!1,i=e.tightSelfClosing||!1,s=e.printWidth||Number.POSITIVE_INFINITY,o=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return l.peek=BF,{handlers:{mdxJsxFlowElement:l,mdxJsxTextElement:l},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function l(a,c,u,f){const h=a.type==="mdxJsxFlowElement",d=a.name?!a.children||a.children.length===0:!1,p=t$(u),g=n$(p),O=u.createTracker(f),x=u.createTracker(f),m=[],y=(h?g:"")+"<"+(a.name||""),b=u.enter(a.type);if(O.move(y),x.move(y),a.attributes&&a.attributes.length>0){if(!a.name)throw new Error("Cannot serialize fragment w/ attributes");let T=-1;for(;++T<a.attributes.length;){const E=a.attributes[T];let L;if(E.type==="mdxJsxExpressionAttribute")L="{"+(E.value||"")+"}";else{if(!E.name)throw new Error("Cannot serialize attribute w/o name");const M=E.value,$=E.name;let V="";if(M!=null)if(typeof M=="object")V="{"+(M.value||"")+"}";else{const Z=r&&nw(M,n)>nw(M,o)?o:n;V=Z+NF(M,{subset:[Z]})+Z}L=$+(V?"=":"")+V}m.push(L)}}let S=!1;const v=m.join(" ");h&&(/\r?\n|\r/.test(v)||O.current().now.column+v.length+(d?i?2:3:1)>s)&&(S=!0);let w=O,_=y;if(S){w=x;let T=-1;for(;++T<m.length;)m[T]=g+e$+m[T];_+=w.move(`
59
+ `+m.join(`
60
+ `)+`
61
+ `+g)}else v&&(_+=w.move(" "+v));return d&&(_+=w.move((i||S?"":" ")+"/")),_+=w.move(">"),a.children&&a.children.length>0&&(a.type==="mdxJsxTextElement"?_+=w.move(u.containerPhrasing(a,{...w.current(),before:">",after:"<"})):(w.shift(2),_+=w.move(`
62
+ `),_+=w.move(FF(a,u,w.current())),_+=w.move(`
63
+ `))),d||(_+=w.move((h?g:"")+"</"+(a.name||"")+">")),b(),_}}function FF(t,e,n){const r=e.indexStack,i=t.children,s=e.createTracker(n),o=n$(t$(e)),l=[];let a=-1;for(r.push(-1);++a<i.length;){const c=i[a];r[r.length-1]=a;const u={before:`
64
+ `,after:`
65
+ `,...s.current()},f=e.handle(c,t,e,u),h=c.type==="mdxJsxFlowElement"?f:e.indentLines(f,function(d,p,g){return(g?"":o)+d});l.push(s.move(h)),c.type!=="list"&&(e.bulletLastUsed=void 0),a<i.length-1&&l.push(s.move(`
66
+
67
+ `))}return r.pop(),l.join("")}function t$(t){let e=0,n=t.stack.length;for(;--n>-1;){const r=t.stack[n];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&e++}return e}function n$(t){return e$.repeat(t)}function BF(){return"<"}var cw=Object.prototype.hasOwnProperty;function uw(t,e,n){for(n of t.keys())if(xc(n,e))return n}function xc(t,e){var n,r,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&xc(t[r],e[r]););return r===-1}if(n===Set){if(t.size!==e.size)return!1;for(r of t)if(i=r,i&&typeof i=="object"&&(i=uw(e,i),!i)||!e.has(i))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(r of t)if(i=r[0],i&&typeof i=="object"&&(i=uw(e,i),!i)||!xc(r[1],e.get(i)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return r===-1}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return r===-1}if(!n||typeof t=="object"){r=0;for(n in t)if(cw.call(t,n)&&++r&&!cw.call(e,n)||!(n in e)||!xc(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}var ZF={};let qO,r$,i$,s$,o$=!0;typeof process<"u"&&({FORCE_COLOR:qO,NODE_DISABLE_COLORS:r$,NO_COLOR:i$,TERM:s$}=ZF||{},o$=process.stdout&&process.stdout.isTTY);const We={enabled:!r$&&i$==null&&s$!=="dumb"&&(qO!=null&&qO!=="0"||o$),reset:ut(0,0),bold:ut(1,22),dim:ut(2,22),italic:ut(3,23),underline:ut(4,24),inverse:ut(7,27),hidden:ut(8,28),strikethrough:ut(9,29),black:ut(30,39),red:ut(31,39),green:ut(32,39),yellow:ut(33,39),blue:ut(34,39),magenta:ut(35,39),cyan:ut(36,39),white:ut(37,39),gray:ut(90,39),grey:ut(90,39),bgBlack:ut(40,49),bgRed:ut(41,49),bgGreen:ut(42,49),bgYellow:ut(43,49),bgBlue:ut(44,49),bgMagenta:ut(45,49),bgCyan:ut(46,49),bgWhite:ut(47,49)};function fw(t,e){let n=0,r,i="",s="";for(;n<t.length;n++)r=t[n],i+=r.open,s+=r.close,~e.indexOf(r.close)&&(e=e.replace(r.rgx,r.close+r.open));return i+e+s}function zF(t,e){let n={has:t,keys:e};return n.reset=We.reset.bind(n),n.bold=We.bold.bind(n),n.dim=We.dim.bind(n),n.italic=We.italic.bind(n),n.underline=We.underline.bind(n),n.inverse=We.inverse.bind(n),n.hidden=We.hidden.bind(n),n.strikethrough=We.strikethrough.bind(n),n.black=We.black.bind(n),n.red=We.red.bind(n),n.green=We.green.bind(n),n.yellow=We.yellow.bind(n),n.blue=We.blue.bind(n),n.magenta=We.magenta.bind(n),n.cyan=We.cyan.bind(n),n.white=We.white.bind(n),n.gray=We.gray.bind(n),n.grey=We.grey.bind(n),n.bgBlack=We.bgBlack.bind(n),n.bgRed=We.bgRed.bind(n),n.bgGreen=We.bgGreen.bind(n),n.bgYellow=We.bgYellow.bind(n),n.bgBlue=We.bgBlue.bind(n),n.bgMagenta=We.bgMagenta.bind(n),n.bgCyan=We.bgCyan.bind(n),n.bgWhite=We.bgWhite.bind(n),n}function ut(t,e){let n={open:`\x1B[${t}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(t)||(this.has.push(t),this.keys.push(n)),r===void 0?this:We.enabled?fw(this.keys,r+""):r+""):r===void 0?zF([t],[n]):We.enabled?fw([n],r+""):r+""}}function ho(){}ho.prototype={diff:function(e,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.callback;typeof i=="function"&&(s=i,i={}),this.options=i;var o=this;function l(b){return s?(setTimeout(function(){s(void 0,b)},0),!0):b}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e)),n=this.removeEmpty(this.tokenize(n));var a=n.length,c=e.length,u=1,f=a+c;i.maxEditLength&&(f=Math.min(f,i.maxEditLength));var h=(r=i.timeout)!==null&&r!==void 0?r:1/0,d=Date.now()+h,p=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(p[0],n,e,0);if(p[0].oldPos+1>=c&&g+1>=a)return l([{value:this.join(n),count:n.length}]);var O=-1/0,x=1/0;function m(){for(var b=Math.max(O,-u);b<=Math.min(x,u);b+=2){var S=void 0,v=p[b-1],w=p[b+1];v&&(p[b-1]=void 0);var _=!1;if(w){var T=w.oldPos-b;_=w&&0<=T&&T<a}var E=v&&v.oldPos+1<c;if(!_&&!E){p[b]=void 0;continue}if(!E||_&&v.oldPos+1<w.oldPos?S=o.addToPath(w,!0,void 0,0):S=o.addToPath(v,void 0,!0,1),g=o.extractCommon(S,n,e,b),S.oldPos+1>=c&&g+1>=a)return l(XF(o,S.lastComponent,n,e,o.useLongestToken));p[b]=S,S.oldPos+1>=c&&(x=Math.min(x,b-1)),g+1>=a&&(O=Math.max(O,b+1))}u++}if(s)(function b(){setTimeout(function(){if(u>f||Date.now()>d)return s();m()||b()},0)})();else for(;u<=f&&Date.now()<=d;){var y=m();if(y)return y}},addToPath:function(e,n,r,i){var s=e.lastComponent;return s&&s.added===n&&s.removed===r?{oldPos:e.oldPos+i,lastComponent:{count:s.count+1,added:n,removed:r,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:s}}},extractCommon:function(e,n,r,i){for(var s=n.length,o=r.length,l=e.oldPos,a=l-i,c=0;a+1<s&&l+1<o&&this.equals(n[a+1],r[l+1]);)a++,l++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=l,a},equals:function(e,n){return this.options.comparator?this.options.comparator(e,n):e===n||this.options.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],r=0;r<e.length;r++)e[r]&&n.push(e[r]);return n},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function XF(t,e,n,r,i){for(var s=[],o;e;)s.push(e),o=e.previousComponent,delete e.previousComponent,e=o;s.reverse();for(var l=0,a=s.length,c=0,u=0;l<a;l++){var f=s[l];if(f.removed){if(f.value=t.join(r.slice(u,u+f.count)),u+=f.count,l&&s[l-1].added){var d=s[l-1];s[l-1]=s[l],s[l]=d}}else{if(!f.added&&i){var h=n.slice(c,c+f.count);h=h.map(function(g,O){var x=r[u+O];return x.length>g.length?x:g}),f.value=t.join(h)}else f.value=t.join(n.slice(c,c+f.count));c+=f.count,f.added||(u+=f.count)}}var p=s[a-1];return a>1&&typeof p.value=="string"&&(p.added||p.removed)&&t.equals("",p.value)&&(s[a-2].value+=p.value,s.pop()),s}var hw=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,dw=/\S/,l$=new ho;l$.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!dw.test(t)&&!dw.test(e)};l$.tokenize=function(t){for(var e=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<e.length-1;n++)!e[n+1]&&e[n+2]&&hw.test(e[n])&&hw.test(e[n+2])&&(e[n]+=e[n+2],e.splice(n+1,2),n--);return e};var a$=new ho;a$.tokenize=function(t){this.options.stripTrailingCr&&(t=t.replace(/\r\n/g,`
68
+ `));var e=[],n=t.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?e[e.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),e.push(i))}return e};var WF=new ho;WF.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var jF=new ho;jF.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};function lh(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?lh=function(e){return typeof e}:lh=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lh(t)}var HF=Object.prototype.toString,Wc=new ho;Wc.useLongestToken=!0;Wc.tokenize=a$.tokenize;Wc.castInput=function(t){var e=this.options,n=e.undefinedReplacement,r=e.stringifyReplacer,i=r===void 0?function(s,o){return typeof o>"u"?n:o}:r;return typeof t=="string"?t:JSON.stringify(YO(t,null,null,i),i," ")};Wc.equals=function(t,e){return ho.prototype.equals.call(Wc,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function YO(t,e,n,r,i){e=e||[],n=n||[],r&&(t=r(i,t));var s;for(s=0;s<e.length;s+=1)if(e[s]===t)return n[s];var o;if(HF.call(t)==="[object Array]"){for(e.push(t),o=new Array(t.length),n.push(o),s=0;s<t.length;s+=1)o[s]=YO(t[s],e,n,r,i);return e.pop(),n.pop(),o}if(t&&t.toJSON&&(t=t.toJSON()),lh(t)==="object"&&t!==null){e.push(t),o={},n.push(o);var l=[],a;for(a in t)t.hasOwnProperty(a)&&l.push(a);for(l.sort(),s=0;s<l.length;s+=1)a=l[s],o[a]=YO(t[a],e,n,r,a);e.pop(),n.pop()}else o=t;return o}var UO=new ho;UO.tokenize=function(t){return t.slice()};UO.join=UO.removeEmpty=function(t){return t};We.red,We.grey,We.green;We.dim().italic;We.dim("→");We.dim("·");We.dim("↵");function rd(t){t=t.replace(/\r?\n/g,`
69
+ `);let e=t.match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,i=(e||[]).length;for(;n<i;n++)r=Math.min(r,e[n].length);return i&&r?t.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):t}class qF extends Error{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 cr(t,e,n,r,i,s,o){if(t)return;let l=o||s;if(o instanceof Error)throw o;let a=i;throw new qF({actual:e,expects:n,operator:r,message:l,details:a,generated:!o})}function YF(t,e){cr(!!t,!1,!0,"ok",!1,"Expected value to be truthy",e)}function ns(t,e){cr(!t,!0,!1,"not",!1,"Expected value to be falsey",e)}ns.ok=ns;ns.equal=function(t,e,n){cr(!xc(t,e),t,e,"not.equal",!1,"Expected values not to be deeply equal",n)};ns.type=function(t,e,n){let r=typeof t;cr(r!==e,r,e,"not.type",!1,`Expected "${r}" not to be "${e}"`,n)};ns.instance=function(t,e,n){let r="`"+(e.name||e.constructor.name)+"`";cr(!(t instanceof e),t,e,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)};ns.snapshot=function(t,e,n){t=rd(t),e=rd(e),cr(t!==e,t,e,"not.snapshot",!1,"Expected value not to match snapshot",n)};ns.fixture=function(t,e,n){t=rd(t),e=rd(e),cr(t!==e,t,e,"not.fixture",!1,"Expected value not to match fixture",n)};ns.match=function(t,e,n){typeof e=="string"?cr(!t.includes(e),t,e,"not.match",!1,`Expected value not to include "${e}" substring`,n):cr(!e.test(t),t,e,"not.match",!1,`Expected value not to match \`${String(e)}\` pattern`,n)};ns.throws=function(t,e,n){!n&&typeof e=="string"&&(n=e,e=null);try{t()}catch(r){typeof e=="function"?cr(!e(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):e instanceof RegExp?cr(!e.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(e)}\` pattern`,n):e||cr(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};const on={eof:null,exclamationMark:33,dash:45,equalsTo:61,greaterThan:62},pw={attentionSideAfter:2},Li={data:"data",lineEnding:"lineEnding",linePrefix:"linePrefix",characterEscape:"characterEscape"};var Ba="highlightSequenceTemporary",gw="highlightSequence",UF="highlight",GF="highlightText";function KF(){const t={name:"highlight",tokenize:n,resolveAll:e};return{text:{[on.equalsTo]:t},insideSpan:{null:[t]},attentionMarkers:{null:[on.equalsTo]}};function e(r,i){let s=-1;for(;++s<r.length;)if(r[s][0]==="enter"&&r[s][1].type===Ba&&r[s][1]._close){let o=s;for(;o--;)if(r[o][0]==="exit"&&r[o][1].type===Ba&&r[o][1]._open&&r[s][1].end.offset-r[s][1].start.offset===r[o][1].end.offset-r[o][1].start.offset){r[s][1].type=gw,r[o][1].type=gw;const l={type:UF,start:Object.assign({},r[o][1].start),end:Object.assign({},r[s][1].end)},a={type:GF,start:Object.assign({},r[o][1].end),end:Object.assign({},r[s][1].start)},c=[["enter",l,i],["enter",r[o][1],i],["exit",r[o][1],i],["enter",a,i]],u=i.parser.constructs.insideSpan.null;u&&cn(c,c.length,0,Vu(u,r.slice(o+1,s),i)),cn(c,c.length,0,[["exit",a,i],["enter",r[s][1],i],["exit",r[s][1],i],["exit",l,i]]),cn(r,o-1,s-o+3,c),s=o+c.length-2;break}}for(s=-1;++s<r.length;)r[s][1].type===Ba&&(r[s][1].type=Li.data);return r}function n(r,i,s){const o=this.previous,l=this.events;let a=0;return c;function c(f){return YF(f===on.equalsTo,"expected `=`"),o===on.equalsTo&&l[l.length-1][1].type!==Li.characterEscape?s(f):(r.enter(Ba),u(f))}function u(f){const h=qs(o);if(f===on.equalsTo)return a>1?s(f):(r.consume(f),a++,u);if(a<2)return s(f);const d=r.exit(Ba),p=qs(f);return d._open=!p||p===pw.attentionSideAfter&&!!h,d._close=!h||h===pw.attentionSideAfter&&!!p,i(f)}}}const JF=/[$_\p{ID_Start}]/u,eB=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,tB=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,nB=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rB=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,c$={};function xr(t){return t?JF.test(String.fromCodePoint(t)):!1}function Za(t,e){const r=(e||c$).jsx?tB:eB;return t?r.test(String.fromCodePoint(t)):!1}function Sae(t,e){return(c$.jsx?rB:nB).test(t)}function He(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(a){return Ve(a)?(t.enter(n),l(a)):e(a)}function l(a){return Ve(a)&&s++<i?(t.consume(a),l):(t.exit(n),e(a))}}const iB={}.hasOwnProperty,sB=Symbol("continue"),Dg=Symbol("exit"),oB=Symbol("skip");function lB(t,e){let n,r;typeof e=="function"?n=e:e&&typeof e=="object"&&(e.enter&&(n=e.enter),e.leave&&(r=e.leave)),i(t,void 0,void 0,[])();function i(s,o,l,a){return Vg(s)&&(c.displayName="node ("+s.type+")"),c;function c(){const u=n?mw(n(s,o,l,a)):[];if(u[0]===Dg)return u;if(u[0]!==oB){let f;for(f in s)if(iB.call(s,f)&&s[f]&&typeof s[f]=="object"&&f!=="data"&&f!=="position"){const h=a.concat(s),d=s[f];if(Array.isArray(d)){const p=d;let g=0;for(;g>-1&&g<p.length;){const O=p[g];if(Vg(O)){const x=i(O,f,g,h)();if(x[0]===Dg)return x;g=typeof x[1]=="number"?x[1]:g+1}else g++}}else if(Vg(d)){const p=i(d,f,void 0,h)();if(p[0]===Dg)return p}}}return r?mw(r(s,o,l,a)):u}}}function mw(t){return Array.isArray(t)?t:typeof t=="number"?[sB,t]:[t]}function Vg(t){return!!(t&&typeof t=="object"&&"type"in t&&typeof t.type=="string"&&t.type.length>0)}function aB(t,e){const n=e.prefix||"",r=e.suffix||"",i=Object.assign({},e.acornOptions),s=[],o=[],l=i.onComment,a=i.onToken;let c=!1,u,f;const h=Object.assign({},i,{onComment:s,preserveParens:!0});a&&(h.onToken=o);const d=cB(t,e.tokenTypes),p=d.value,g=n+p+r,O=Ow(p);if(O&&!e.allowEmpty)throw new st("Unexpected empty expression",{place:m(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{u=e.expression&&!O?e.acorn.parseExpressionAt(g,0,h):e.acorn.parse(g,h)}catch(y){const b=y,S=m(b.pos);b.message=String(b.message).replace(/ \(\d+:\d+\)$/,""),b.pos=S.offset,b.loc={line:S.line,column:S.column-1},f=b,c=b.raisedAt>=n.length+p.length||b.message==="Unterminated comment"}if(u&&e.expression&&!O)if(Ow(g.slice(u.end,g.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 y=m(u.end),b=new Error("Unexpected content after expression");b.pos=y.offset,b.loc={line:y.line,column:y.column-1},f=b,u=void 0}if(u){if(u.comments=s,lB(u,function(y,b,S,v){let w=v[v.length-1],_=b;y.type==="ParenthesizedExpression"&&w&&_&&(typeof S=="number"&&(w=w[_],_=S),w[_]=y.expression),x(y)}),Array.isArray(l))l.push(...s);else if(typeof l=="function")for(const y of s)l(y.type==="Block",y.value,y.start,y.end,y.loc.start,y.loc.end);for(const y of o)y.end<=n.length||y.start-n.length>=p.length||(x(y),Array.isArray(a)?a.push(y):a(y))}return{estree:u,error:f,swallow:c};function x(y){const b=m(y.start),S=m(y.end);y.start=b.offset,y.end=S.offset,y.loc={start:{line:b.line,column:b.column-1,offset:b.offset},end:{line:S.line,column:S.column-1,offset:S.offset}},y.range=[y.start,y.end]}function m(y){let b=y-n.length;b<0?b=0:b>p.length&&(b=p.length);let S=uB(d.stops,b);return S||(S={line:e.start.line,column:e.start.column,offset:e.start.offset}),S}}function Ow(t){return/^\s*$/.test(t.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function cB(t,e){const n={value:"",stops:[]};let r=-1;for(;++r<t.length;){const i=t[r];if(i[0]==="enter"){const s=i[1].type;if(s==="lineEnding"||e.includes(s)){const o=i[2].sliceStream(i[1]);for(;o.length>0&&o[0]===-1;)o.shift();const l=fB(o);n.stops.push([n.value.length,i[1].start]),n.value+=l,n.stops.push([n.value.length,i[1].end])}}}return n}function uB(t,e){let n=0;for(;n<t.length&&t[n][0]<=e;)n+=1;if(n===0)return;const[r,i]=t[n-1],s=e-r;return{line:i.line,column:i.column+s,offset:i.offset+s}}function fB(t){let e=-1;const n=[];let r;for(;++e<t.length;){const i=t[e];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
70
+ `;break}case-3:{s=`\r
71
+ `;break}case-2:{s=" ";break}case-1:{if(r)continue;s=" ";break}default:s=String.fromCharCode(i)}r=i===-2,n.push(s)}return n.join("")}function Fg(t){const e=t||{},n=e.loc||{},r=e.range||[void 0,void 0],i=xw(n.start,r[0]||e.start),s=xw(n.end,r[1]||e.end);if(i&&s)return{start:i,end:s}}function xw(t,e){if(t&&typeof t=="object"){const n="line"in t?Bg(t.line):void 0,r="column"in t?Bg(t.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:Bg(e)}}}function Bg(t){return typeof t=="number"&&t>-1?t:void 0}const hB=2,vl="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",dB="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",pB="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",yw="#unexpected-type-in-code-expected-an-object-spread-spread",gB="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",mB="#could-not-parse-expression-with-acorn";function bw(t,e,n,r,i,s,o,l,a,c,u){const f=this,h=this.events.length+3;let d=0,p,g;return O;function O(b){return t.enter(n),t.enter(r),t.consume(b),t.exit(r),p=f.now(),x}function x(b){if(b===null){if(g)throw g;const S=new st("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:f.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw S.url=vl+dB,S}if(we(b))return t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),y;if(b===125&&d===0){const S=s?OB.call(f,s,o,i,h,p,c||!1,a||!1):{type:"ok",estree:void 0};if(S.type==="ok"){t.enter(r),t.consume(b),t.exit(r);const v=t.exit(n);return l&&S.estree&&Object.assign(v,{estree:S.estree}),e}return g=S.message,t.enter(i),t.consume(b),m}return t.enter(i),m(b)}function m(b){return b===125&&d===0||b===null||we(b)?(t.exit(i),x(b)):(b===123&&!s?d+=1:b===125&&(d-=1),t.consume(b),m)}function y(b){const S=f.now();if(S.line!==p.line&&!u&&f.parser.lazy[S.line]){const v=new st("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 v.url=vl+pB,v}return Ve(b)?He(t,x,"linePrefix",hB+1)(b):x(b)}}function OB(t,e,n,r,i,s,o){const l=aB(this.events.slice(r),{acorn:t,tokenTypes:[n],acornOptions:e,start:i,expression:!0,allowEmpty:s,prefix:o?"({":"",suffix:o?"})":""}),a=l.estree;if(o&&a){const c=a.body[0];if(c.type!=="ExpressionStatement"||c.expression.type!=="ObjectExpression"){const u=Fg(c),f=new st("Unexpected `"+c.type+"` in code: expected an object spread (`{...spread}`)",{place:u.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw f.url=vl+yw,f}if(c.expression.properties[1]){const u=Fg(c.expression.properties[1]),f=new st("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=vl+gB,f}if(c.expression.properties[0]&&c.expression.properties[0].type!=="SpreadElement"){const u=Fg(c.expression.properties[0]),f=new st("Unexpected `"+c.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=vl+yw,f}}if(l.error){const c=new st("Could not parse expression with acorn",{cause:l.error,place:{line:l.error.loc.line,column:l.error.loc.column+1,offset:l.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return c.url=vl+mB,{type:"nok",message:c}}return{type:"ok",estree:a}}const vw="https://github.com/micromark/micromark-extension-mdx-jsx";function u$(t,e,n,r,i,s,o,l,a,c,u,f,h,d,p,g,O,x,m,y,b,S,v,w,_,T,E,L,M,$,V,Z){const Y=this;let j,U;return se;function se(P){return t.enter(l),t.enter(a),t.consume(P),t.exit(a),Q}function Q(P){return yt(P)?n(P):(j=me,ee(P))}function me(P){if(P===47)return t.enter(c),t.consume(P),t.exit(c),j=de,ee;if(P===62)return X(P);if(P!==null&&P>=0&&xr(P))return t.enter(f),t.enter(h),t.consume(P),R;B(P,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(P===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function de(P){if(P===62)return X(P);if(P!==null&&P>=0&&xr(P))return t.enter(f),t.enter(h),t.consume(P),R;B(P,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(P===42||P===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function R(P){if(P!==null&&P>=0&&Za(P,{jsx:!0}))return t.consume(P),R;if(P===46||P===47||P===58||P===62||P===123||yt(P)||Mi(P))return t.exit(h),j=$e,ee(P);B(P,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(P===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function $e(P){if(P===46)return t.enter(d),t.consume(P),t.exit(d),j=Qe,ee;if(P===58)return t.enter(g),t.consume(P),t.exit(g),j=ne,ee;if(P===47||P===62||P===123||P!==null&&P>=0&&xr(P))return t.exit(f),ve(P);B(P,"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 Qe(P){if(P!==null&&P>=0&&xr(P))return t.enter(p),t.consume(P),ke;B(P,"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 ke(P){if(P!==null&&P>=0&&Za(P,{jsx:!0}))return t.consume(P),ke;if(P===46||P===47||P===62||P===123||yt(P)||Mi(P))return t.exit(p),j=K,ee(P);B(P,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(P===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function K(P){if(P===46)return t.enter(d),t.consume(P),t.exit(d),j=Qe,ee;if(P===47||P===62||P===123||P!==null&&P>=0&&xr(P))return t.exit(f),ve(P);B(P,"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 ne(P){if(P!==null&&P>=0&&xr(P))return t.enter(O),t.consume(P),ae;B(P,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(P===43||P!==null&&P>46&&P<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function ae(P){if(P!==null&&P>=0&&Za(P,{jsx:!0}))return t.consume(P),ae;if(P===47||P===62||P===123||yt(P)||Mi(P))return t.exit(O),j=fe,ee(P);B(P,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function fe(P){if(P===47||P===62||P===123||P!==null&&P>=0&&xr(P))return t.exit(f),ve(P);B(P,"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 ve(P){if(P===47)return t.enter(u),t.consume(P),t.exit(u),j=F,ee;if(P===62)return X(P);if(P===123)return bw.call(Y,t,Me,x,m,y,r,i,s,!0,!1,o)(P);if(P!==null&&P>=0&&xr(P))return t.enter(b),t.enter(S),t.enter(v),t.consume(P),qe;B(P,"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 Me(P){return j=ve,ee(P)}function qe(P){if(P!==null&&P>=0&&Za(P,{jsx:!0}))return t.consume(P),qe;if(P===47||P===58||P===61||P===62||P===123||yt(P)||Mi(P))return t.exit(v),j=mt,ee(P);B(P,"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 mt(P){if(P===58)return t.enter(w),t.consume(P),t.exit(w),j=wt,ee;if(P===61)return t.exit(S),t.enter(T),t.consume(P),t.exit(T),j=er,ee;if(P===47||P===62||P===123||yt(P)||Mi(P)||P!==null&&P>=0&&xr(P))return t.exit(S),t.exit(b),j=ve,ee(P);B(P,"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 wt(P){if(P!==null&&P>=0&&xr(P))return t.enter(_),t.consume(P),kt;B(P,"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 kt(P){if(P!==null&&P>=0&&Za(P,{jsx:!0}))return t.consume(P),kt;if(P===47||P===61||P===62||P===123||yt(P)||Mi(P))return t.exit(_),t.exit(S),j=Tt,ee(P);B(P,"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 Tt(P){if(P===61)return t.enter(T),t.consume(P),t.exit(T),j=er,ee;if(P===47||P===62||P===123||P!==null&&P>=0&&xr(P))return t.exit(b),ve(P);B(P,"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 er(P){if(P===34||P===39)return t.enter(E),t.enter(L),t.consume(P),t.exit(L),U=P,Nn;if(P===123)return bw.call(Y,t,Dt,$,V,Z,r,i,s,!1,!1,o)(P);B(P,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(P===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function Dt(P){return t.exit(b),j=ve,ee(P)}function Nn(P){return P===null&&B(P,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(U)+"`"),P===U?(t.enter(L),t.consume(P),t.exit(L),t.exit(E),t.exit(b),U=void 0,j=ve,ee):we(P)?(j=Nn,ee(P)):(t.enter(M),I(P))}function I(P){return P===null||P===U||we(P)?(t.exit(M),Nn(P)):(t.consume(P),I)}function F(P){if(P===62)return X(P);B(P,"after self-closing slash","`>` to end the tag"+(P===42||P===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function X(P){return t.enter(a),t.consume(P),t.exit(a),t.exit(l),e}function ee(P){return we(P)?(t.enter("lineEnding"),t.consume(P),t.exit("lineEnding"),N):Ve(P)||Mi(P)?(t.enter("esWhitespace"),ie(P)):j(P)}function ie(P){return we(P)?(t.exit("esWhitespace"),ee(P)):Ve(P)||Mi(P)?(t.consume(P),ie):(t.exit("esWhitespace"),j(P))}function N(P){if(!o&&Y.parser.lazy[Y.now().line]){const ce=new st("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",Y.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw ce.url=vw+"#unexpected-lazy-line-in-container-expected-line-to-be",ce}return ee(P)}function B(P,ce,Te){const Ye=new st("Unexpected "+(P===null?"end of file":"character `"+(P===96?"` ` `":String.fromCodePoint(P))+"` ("+xB(P)+")")+" "+ce+", expected "+Te,Y.now(),"micromark-extension-mdx-jsx:unexpected-"+(P===null?"eof":"character"));throw Ye.url=vw+(P===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),Ye}}function xB(t){return"U+"+t.toString(16).toUpperCase().padStart(4,"0")}function yB(t,e){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,s){return u$.call(this,r,i,s,t,e.acornOptions,e.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")}}function bB(t,e){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:n};function n(r,i,s){const o=this;return l;function l(f){return a(f)}function a(f){return u$.call(o,r,c,s,t,e.acornOptions,e.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 c(f){return Ve(f)?He(r,u,"whitespace")(f):u(f)}function u(f){const h=o.parser.constructs.flow[123],d=Array.isArray(h)?h:h?[h]:[];let p;for(const g of d)if(g.name==="mdxFlowExpression"){p=g;break}return f===60?l(f):f===123&&p?r.attempt(p,u,s)(f):f===null||we(f)?i(f):s(f)}}}function vB(t){const e={},n=e.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"},e.acornOptions,{locations:!0})}else if(e.acornOptions||e.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:bB(n||void 0,{acornOptions:r,addResult:e.addResult||void 0})},text:{60:yB(n||void 0,{acornOptions:r,addResult:e.addResult||void 0})}}}function SB(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}const Sw={}.hasOwnProperty;function wB(t,e){const n=e||{};function r(i,...s){let o=r.invalid;const l=r.handlers;if(i&&Sw.call(i,t)){const a=String(i[t]);o=Sw.call(l,a)?l[a]:r.unknown}if(o)return o.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const kB={}.hasOwnProperty;function f$(t,e){let n=-1,r;if(e.extensions)for(;++n<e.extensions.length;)f$(t,e.extensions[n]);for(r in e)if(kB.call(e,r))switch(r){case"extensions":break;case"unsafe":{ww(t[r],e[r]);break}case"join":{ww(t[r],e[r]);break}case"handlers":{CB(t[r],e[r]);break}default:t.options[r]=e[r]}return t}function ww(t,e){e&&t.push(...e)}function CB(t,e){e&&Object.assign(t,e)}function _B(t,e,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(t,s.current()),TB);return i(),o}function TB(t,e,n){return">"+(n?"":" ")+t}function h$(t,e){return kw(t,e.inConstruct,!0)&&!kw(t,e.notInConstruct,!1)}function kw(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let r=-1;for(;++r<e.length;)if(t.includes(e[r]))return!0;return!1}function Cw(t,e,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
72
+ `&&h$(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
73
+ `}function EB(t,e){const n=String(t);let r=n.indexOf(e),i=r,s=0,o=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+e.length,r=n.indexOf(e,i);return o}function GO(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function PB(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function AB(t,e,n,r){const i=PB(n),s=t.value||"",o=i==="`"?"GraveAccent":"Tilde";if(GO(t,n)){const f=n.enter("codeIndented"),h=n.indentLines(s,$B);return f(),h}const l=n.createTracker(r),a=i.repeat(Math.max(EB(s,i)+1,3)),c=n.enter("codeFenced");let u=l.move(a);if(t.lang){const f=n.enter(`codeFencedLang${o}`);u+=l.move(n.safe(t.lang,{before:u,after:" ",encode:["`"],...l.current()})),f()}if(t.lang&&t.meta){const f=n.enter(`codeFencedMeta${o}`);u+=l.move(" "),u+=l.move(n.safe(t.meta,{before:u,after:`
74
+ `,encode:["`"],...l.current()})),f()}return u+=l.move(`
75
+ `),s&&(u+=l.move(s+`
76
+ `)),u+=l.move(a),c(),u}function $B(t,e,n){return(n?"":" ")+t}function oy(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function QB(t,e,n,r){const i=oy(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const a=n.createTracker(r);let c=a.move("[");return c+=a.move(n.safe(n.associationId(t),{before:c,after:"]",...a.current()})),c+=a.move("]: "),l(),!t.url||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(t.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(t.url,{before:c,after:t.title?" ":`
77
+ `,...a.current()}))),l(),t.title&&(l=n.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(n.safe(t.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),o(),c}function MB(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function Ys(t){return"&#x"+t.toString(16).toUpperCase()+";"}function id(t,e,n){const r=qs(t),i=qs(e);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}d$.peek=RB;function d$(t,e,n,r){const i=MB(n),s=n.enter("emphasis"),o=n.createTracker(r),l=o.move(i);let a=o.move(n.containerPhrasing(t,{after:i,before:l,...o.current()}));const c=a.charCodeAt(0),u=id(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(a=Ys(c)+a.slice(1));const f=a.charCodeAt(a.length-1),h=id(r.after.charCodeAt(0),f,i);h.inside&&(a=a.slice(0,-1)+Ys(f));const d=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},l+a+d}function RB(t,e,n){return n.options.emphasis||"*"}const ly=(function(t){if(t==null)return DB;if(typeof t=="function")return Dp(t);if(typeof t=="object")return Array.isArray(t)?LB(t):IB(t);if(typeof t=="string")return NB(t);throw new Error("Expected function, string, or object as test")});function LB(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=ly(t[n]);return Dp(r);function r(...i){let s=-1;for(;++s<e.length;)if(e[s].apply(this,i))return!0;return!1}}function IB(t){const e=t;return Dp(n);function n(r){const i=r;let s;for(s in t)if(i[s]!==e[s])return!1;return!0}}function NB(t){return Dp(e);function e(n){return n&&n.type===t}}function Dp(t){return e;function e(n,r,i){return!!(VB(n)&&t.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function DB(){return!0}function VB(t){return t!==null&&typeof t=="object"&&"type"in t}const p$=[],FB=!0,KO=!1,BB="skip";function ZB(t,e,n,r){let i;typeof e=="function"&&typeof n!="function"?(r=n,n=e):i=e;const s=ly(i),o=r?-1:1;l(t,void 0,[])();function l(a,c,u){const f=a&&typeof a=="object"?a:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(a.type+(d?"<"+d+">":""))+")"})}return h;function h(){let d=p$,p,g,O;if((!e||s(a,c,u[u.length-1]||void 0))&&(d=zB(n(a,u)),d[0]===KO))return d;if("children"in a&&a.children){const x=a;if(x.children&&d[0]!==BB)for(g=(r?x.children.length:-1)+o,O=u.concat(x);g>-1&&g<x.children.length;){const m=x.children[g];if(p=l(m,g,O)(),p[0]===KO)return p;g=typeof p[1]=="number"?p[1]:g+o}}return d}}}function zB(t){return Array.isArray(t)?t:typeof t=="number"?[FB,t]:t==null?p$:[t]}function XB(t,e,n,r){let i,s,o;typeof e=="function"&&typeof n!="function"?(s=void 0,o=e,i=n):(s=e,o=n,i=r),ZB(t,s,l,i);function l(a,c){const u=c[c.length-1],f=u?u.children.indexOf(a):void 0;return o(a,f,u)}}const WB={};function ay(t,e){const n=WB,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return g$(t,r,i)}function g$(t,e,n){if(jB(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return _w(t.children,e,n)}return Array.isArray(t)?_w(t,e,n):""}function _w(t,e,n){const r=[];let i=-1;for(;++i<t.length;)r[i]=g$(t[i],e,n);return r.join("")}function jB(t){return!!(t&&typeof t=="object")}function m$(t,e){let n=!1;return XB(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,KO}),!!((!t.depth||t.depth<3)&&ay(t)&&(e.options.setext||n))}function HB(t,e,n,r){const i=Math.max(Math.min(6,t.depth||1),1),s=n.createTracker(r);if(m$(t,n)){const u=n.enter("headingSetext"),f=n.enter("phrasing"),h=n.containerPhrasing(t,{...s.current(),before:`
78
+ `,after:`
79
+ `});return f(),u(),h+`
80
+ `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
81
+ `))+1))}const o="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");s.move(o+" ");let c=n.containerPhrasing(t,{before:"# ",after:`
82
+ `,...s.current()});return/^[\t ]/.test(c)&&(c=Ys(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),a(),l(),c}O$.peek=qB;function O$(t){return t.value||""}function qB(){return"<"}x$.peek=YB;function x$(t,e,n,r){const i=oy(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const a=n.createTracker(r);let c=a.move("![");return c+=a.move(n.safe(t.alt,{before:c,after:"]",...a.current()})),c+=a.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(t.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(t.url,{before:c,after:t.title?" ":")",...a.current()}))),l(),t.title&&(l=n.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(n.safe(t.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),o(),c}function YB(){return"!"}y$.peek=UB;function y$(t,e,n,r){const i=t.referenceType,s=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let a=l.move("![");const c=n.safe(t.alt,{before:a,after:"]",...l.current()});a+=l.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(t),{before:a,after:"]",...l.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function UB(){return"!"}b$.peek=GB;function b$(t,e,n){let r=t.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const o=n.unsafe[s],l=n.compilePattern(o);let a;if(o.atBreak)for(;a=l.exec(r);){let c=a.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(a.index+1)}}return i+r+i}function GB(){return"`"}function v$(t,e){const n=ay(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}S$.peek=KB;function S$(t,e,n,r){const i=oy(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,a;if(v$(t,n)){const u=n.stack;n.stack=[],l=n.enter("autolink");let f=o.move("<");return f+=o.move(n.containerPhrasing(t,{before:f,after:">",...o.current()})),f+=o.move(">"),l(),n.stack=u,f}l=n.enter("link"),a=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(t,{before:c,after:"](",...o.current()})),c+=o.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(t.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(a=n.enter("destinationRaw"),c+=o.move(n.safe(t.url,{before:c,after:t.title?" ":")",...o.current()}))),a(),t.title&&(a=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(t.title,{before:c,after:i,...o.current()})),c+=o.move(i),a()),c+=o.move(")"),l(),c}function KB(t,e,n){return v$(t,n)?"<":"["}w$.peek=JB;function w$(t,e,n,r){const i=t.referenceType,s=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let a=l.move("[");const c=n.containerPhrasing(t,{before:a,after:"]",...l.current()});a+=l.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(t),{before:a,after:"]",...l.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function JB(){return"["}function cy(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function eZ(t){const e=cy(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function tZ(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function k$(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function nZ(t,e,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=t.ordered?tZ(n):cy(n);const l=t.ordered?o==="."?")":".":eZ(n);let a=e&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!t.ordered){const u=t.children?t.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),k$(n)===o&&u){let f=-1;for(;++f<t.children.length;){const h=t.children[f];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(o=l),n.bulletCurrent=o;const c=n.containerFlow(t,r);return n.bulletLastUsed=o,n.bulletCurrent=s,i(),c}function rZ(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function iZ(t,e,n,r){const i=rZ(n);let s=n.bulletCurrent||cy(n);e&&e.type==="list"&&e.ordered&&(s=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+s);let o=s.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(s+" ".repeat(o-s.length)),l.shift(o);const a=n.enter("listItem"),c=n.indentLines(n.containerFlow(t,l.current()),u);return a(),c;function u(f,h,d){return h?(d?"":" ".repeat(o))+f:(d?s:s+" ".repeat(o-s.length))+f}}function sZ(t,e,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(t,r);return s(),i(),o}const oZ=ly(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function lZ(t,e,n,r){return(t.children.some(function(o){return oZ(o)})?n.containerPhrasing:n.containerFlow).call(n,t,r)}function aZ(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}C$.peek=cZ;function C$(t,e,n,r){const i=aZ(n),s=n.enter("strong"),o=n.createTracker(r),l=o.move(i+i);let a=o.move(n.containerPhrasing(t,{after:i,before:l,...o.current()}));const c=a.charCodeAt(0),u=id(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(a=Ys(c)+a.slice(1));const f=a.charCodeAt(a.length-1),h=id(r.after.charCodeAt(0),f,i);h.inside&&(a=a.slice(0,-1)+Ys(f));const d=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},l+a+d}function cZ(t,e,n){return n.options.strong||"*"}function uZ(t,e,n,r){return n.safe(t.value,r)}function fZ(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function hZ(t,e,n){const r=(k$(n)+(n.options.ruleSpaces?" ":"")).repeat(fZ(n));return n.options.ruleSpaces?r.slice(0,-1):r}const uy={blockquote:_B,break:Cw,code:AB,definition:QB,emphasis:d$,hardBreak:Cw,heading:HB,html:O$,image:x$,imageReference:y$,inlineCode:b$,link:S$,linkReference:w$,list:nZ,listItem:iZ,paragraph:sZ,root:lZ,strong:C$,text:uZ,thematicBreak:hZ},dZ=[pZ];function pZ(t,e,n,r){if(e.type==="code"&&GO(e,r)&&(t.type==="list"||t.type===e.type&&GO(t,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&m$(e,r))?void 0:n.spread?1:0}const mo=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],gZ=[{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:`
83
+ `,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:mo},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
84
+ ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:mo},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
85
+ *])`},{character:"*",inConstruct:"phrasing",notInConstruct:mo},{atBreak:!0,character:"+",after:`(?:[ \r
86
+ ])`},{atBreak:!0,character:"-",after:`(?:[ \r
87
+ -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
88
+ ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:mo},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:mo},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:mo},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:mo},{atBreak:!0,character:"~"}];function _$(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const mZ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function T$(t){return t.replace(mZ,OZ)}function OZ(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return _$(n.slice(s?2:1),s?16:10)}return Xc(n)||t}function xZ(t){return t.label||!t.identifier?t.label||"":T$(t.identifier)}function yZ(t){if(!t._compiled){const e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function bZ(t,e,n){const r=e.indexStack,i=t.children||[],s=[];let o=-1,l=n.before,a;r.push(-1);let c=e.createTracker(n);for(;++o<i.length;){const u=i[o];let f;if(r[r.length-1]=o,o+1<i.length){let p=e.handle.handlers[i[o+1].type];p&&p.peek&&(p=p.peek),f=p?p(i[o+1],t,e,{before:"",after:"",...c.current()}).charAt(0):""}else f=n.after;s.length>0&&(l==="\r"||l===`
89
+ `)&&u.type==="html"&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),l=" ",c=e.createTracker(n),c.move(s.join("")));let h=e.handle(u,t,e,{...c.current(),after:f,before:l});a&&a===h.slice(0,1)&&(h=Ys(a.charCodeAt(0))+h.slice(1));const d=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,a=void 0,d&&(s.length>0&&d.before&&l===s[s.length-1].slice(-1)&&(s[s.length-1]=s[s.length-1].slice(0,-1)+Ys(l.charCodeAt(0))),d.after&&(a=f)),c.move(h),s.push(h),l=h.slice(-1)}return r.pop(),s.join("")}function vZ(t,e,n){const r=e.indexStack,i=t.children||[],s=e.createTracker(n),o=[];let l=-1;for(r.push(-1);++l<i.length;){const a=i[l];r[r.length-1]=l,o.push(s.move(e.handle(a,t,e,{before:`
90
+ `,after:`
91
+ `,...s.current()}))),a.type!=="list"&&(e.bulletLastUsed=void 0),l<i.length-1&&o.push(s.move(SZ(a,i[l+1],t,e)))}return r.pop(),o.join("")}function SZ(t,e,n,r){let i=r.join.length;for(;i--;){const s=r.join[i](t,e,n,r);if(s===!0||s===1)break;if(typeof s=="number")return`
92
+ `.repeat(1+s);if(s===!1)return`
93
+
94
+ <!---->
95
+
96
+ `}return`
97
+
98
+ `}const wZ=/\r?\n|\r/g;function kZ(t,e){const n=[];let r=0,i=0,s;for(;s=wZ.exec(t);)o(t.slice(r,s.index)),n.push(s[0]),r=s.index+s[0].length,i++;return o(t.slice(r)),n.join("");function o(l){n.push(e(l,i,!l))}}function CZ(t,e,n){const r=(n.before||"")+(e||"")+(n.after||""),i=[],s=[],o={};let l=-1;for(;++l<t.unsafe.length;){const u=t.unsafe[l];if(!h$(t.stack,u))continue;const f=t.compilePattern(u);let h;for(;h=f.exec(r);){const d="before"in u||!!u.atBreak,p="after"in u,g=h.index+(d?h[1].length:0);i.includes(g)?(o[g].before&&!d&&(o[g].before=!1),o[g].after&&!p&&(o[g].after=!1)):(i.push(g),o[g]={before:d,after:p})}}i.sort(_Z);let a=n.before?n.before.length:0;const c=r.length-(n.after?n.after.length:0);for(l=-1;++l<i.length;){const u=i[l];u<a||u>=c||u+1<c&&i[l+1]===u+1&&o[u].after&&!o[u+1].before&&!o[u+1].after||i[l-1]===u-1&&o[u].before&&!o[u-1].before&&!o[u-1].after||(a!==u&&s.push(Tw(r.slice(a,u),"\\")),a=u,/[!-/:-@[-`{-~]/.test(r.charAt(u))&&(!n.encode||!n.encode.includes(r.charAt(u)))?s.push("\\"):(s.push(Ys(r.charCodeAt(u))),a++))}return s.push(Tw(r.slice(a,c),n.after)),s.join("")}function _Z(t,e){return t-e}function Tw(t,e){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],s=t+e;let o=-1,l=0,a;for(;a=n.exec(s);)r.push(a.index);for(;++o<r.length;)l!==r[o]&&i.push(t.slice(l,r[o])),i.push("\\"),l=r[o];return i.push(t.slice(l)),i.join("")}function TZ(t){const e=t||{},n=e.now||{};let r=e.lineShift||0,i=n.line||1,s=n.column||1;return{move:a,current:o,shift:l};function o(){return{now:{line:i,column:s},lineShift:r}}function l(c){r+=c}function a(c){const u=c||"",f=u.split(/\r?\n|\r/g),h=f[f.length-1];return i+=f.length-1,s=f.length===1?s+h.length:1+h.length+r,u}}function E$(t,e){const n=e||{},r={associationId:xZ,containerPhrasing:$Z,containerFlow:QZ,createTracker:TZ,compilePattern:yZ,enter:s,handlers:{...uy},handle:void 0,indentLines:kZ,indexStack:[],join:[...dZ],options:{},safe:MZ,stack:[],unsafe:[...gZ]};f$(r,n),r.options.tightDefinitions&&r.join.push(AZ),r.handle=wB("type",{invalid:EZ,unknown:PZ,handlers:r.handlers});let i=r.handle(t,void 0,r,{before:`
99
+ `,after:`
100
+ `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
101
+ `),i;function s(o){return r.stack.push(o),l;function l(){r.stack.pop()}}}function EZ(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function PZ(t){const e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function AZ(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function $Z(t,e){return bZ(t,this,e)}function QZ(t,e){return vZ(t,this,e)}function MZ(t,e){return CZ(this,t,e)}const RZ=["mdxJsxTextElement","mdxJsxFlowElement"];function P$(t){return RZ.includes(t.type)&&LZ.includes(t.name.toLowerCase())}const LZ=["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 IZ(t,e){const n=Ew(t),r=Ew(e),i={...n,...r};return NZ(i)}function Ew(t){const e={};return t.split(";").filter(r=>r.trim()!=="").forEach(r=>{const[i,s]=r.split(":").map(o=>o.trim());e[i]=s}),e}function NZ(t){return Object.entries(t).map(([e,n])=>`${e}: ${n}`).join("; ")}function DZ(t){return t.children instanceof Array}function A$({root:t,visitors:e,jsxComponentDescriptors:n,jsxIsAvailable:r,addImportStatements:i=!0}){let s=null;const o=new Set,l=new Map;e=e.sort((x,m)=>(m.priority??0)-(x.priority??0)),f(t,null);function a(x,m){o.add(x),m&&l.set(x,{...m})}function c(x,m){if(s===null)return s=m,s;if(!DZ(x))throw new Error("Attempting to append children to a non-parent");const y=x.children,b=y.at(-1);if(b){const S=e.find(v=>{var w;return(w=v.shouldJoin)==null?void 0:w.call(v,b,m)});if(S){const v=S.join(b,m);return y.splice(y.length-1,1,v),v}}return y.push(m),m}function u(x,m){x.getChildren().forEach(y=>{f(y,m)})}function f(x,m,y=null){var b;const S=e.find((v,w)=>{var _;return y!=null&&y.has(w)?!1:(_=v.testLexicalNode)==null?void 0:_.call(v,x)});if(!S)throw new Error(`no lexical visitor found for ${x.getType()}`,{cause:x});(b=S.visitLexicalNode)==null||b.call(S,{lexicalNode:x,mdastParent:m,actions:{addAndStepInto(v,w={},_=!0){const T={type:v,...w,..._?{children:[]}:{}};c(m,T),Be(x)&&_&&u(x,T)},appendToParent:c,visitChildren:u,visit:f,registerReferredComponent:a,nextVisitor(){f(x,m,(y??new Set).add(e.indexOf(S)))}}})}if(s===null)throw new Error("traversal ended with no root element");const h=new Map,d=new Map;for(const x of o){const m=n.find(y=>y.name===x)??l.get(x)??n.find(y=>y.name==="*");if(!m)throw new Error(`Component ${x} is used but not imported`);if(m.source)if(m.defaultExport)d.set(x,m.source);else{const{source:y}=m,b=h.get(y);b?b.push(x):h.set(y,[x])}}if(!i){for(const[x,m]of h.entries()){const y=m.filter(b=>l.has(b));y.length>0?h.set(x,y):h.delete(x)}for(const x of d.keys())l.has(x)||d.delete(x)}const p=Array.from(h).map(([x,m])=>({type:"mdxjsEsm",value:`import { ${m.join(", ")} } from '${x}'`}));p.push(...Array.from(d).map(([x,m])=>({type:"mdxjsEsm",value:`import ${x} from '${m}'`})));const g=s,O=g.children.find(x=>x.type==="yaml");return O?g.children.splice(g.children.indexOf(O)+1,0,...p):g.children.unshift(...p),ah(g,[]),$$(g),r||Q$(g),g}function $$(t){if("children"in t&&t.children.length>0){if(P$(t)&&t.children.length===1){const e=t.children[0];e.type==="mdxJsxTextElement"&&e.name==="span"&&(e.attributes.forEach(n=>{if(n.type==="mdxJsxAttribute"){const r=t.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=IZ(r.value,n.value));else t.attributes.push(n)}}),t.children=e.children)}t.children.forEach(e=>{$$(e)})}}function Q$(t){if(Object.hasOwn(t,"children")){const e=t,n=[];e.children.forEach(r=>{r.type==="mdxJsxTextElement"&&r.name==="u"?n.push({type:"html",value:"<u>"},...r.children,{type:"html",value:"</u>"}):(n.push(r),Q$(r))}),e.children=n}}const Pw=/\s+$/,Aw=/^\s+/;function ah(t,e){if(t.type==="strong"||t.type==="emphasis"){const n=t.children.at(-1);if((n==null?void 0:n.type)==="text"){const i=Pw.exec(n.value);if(i){n.value=n.value.replace(Pw,"");const s=e.at(-1);s&&(s.children.splice(s.children.indexOf(t)+1,0,{type:"text",value:i[0]}),ah(s,e.slice(0,-1)))}}const r=t.children.at(0);if((r==null?void 0:r.type)==="text"){const i=Aw.exec(r.value);if(i){r.value=r.value.replace(Aw,"");const s=e.at(-1);s&&(s.children.splice(s.children.indexOf(t),0,{type:"text",value:i[0]}),ah(s,e.slice(0,-1)))}}}if("children"in t&&t.children.length>0){const n=t;n.children.forEach(r=>{ah(r,[...e,n])})}}function VZ({root:t,toMarkdownOptions:e,toMarkdownExtensions:n,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:s}){return E$(A$({root:t,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:s}),{extensions:n,...e})+`
102
+ `}const $w={}.hasOwnProperty;function FZ(t){const e={};let n=-1;for(;++n<t.length;)BZ(e,t[n]);return e}function BZ(t,e){let n;for(n in e){const i=($w.call(t,n)?t[n]:void 0)||(t[n]={}),s=e[n];let o;if(s)for(o in s){$w.call(i,o)||(i[o]=[]);const l=s[o];ZZ(i[o],Array.isArray(l)?l:l?[l]:[])}}}function ZZ(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);cn(t,0,0,r)}function Ql(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function wae(t){const e=[];let n=-1,r=0,i=0;for(;++n<t.length;){const s=t.charCodeAt(n);let o="";if(s===37&&Yn(t.charCodeAt(n+1))&&Yn(t.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const l=t.charCodeAt(n+1);s<56320&&l>56319&&l<57344?(o=String.fromCharCode(s,l),i=1):o="�"}else o=String.fromCharCode(s);o&&(e.push(t.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}const zZ={tokenize:XZ};function XZ(t){const e=t.attempt(this.parser.constructs.contentInitial,r,i);let n;return e;function r(l){if(l===null){t.consume(l);return}return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),He(t,e,"linePrefix")}function i(l){return t.enter("paragraph"),s(l)}function s(l){const a=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,o(l)}function o(l){if(l===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(l);return}return we(l)?(t.consume(l),t.exit("chunkText"),s):(t.consume(l),o)}}const WZ={tokenize:jZ},Qw={tokenize:HZ};function jZ(t){const e=this,n=[];let r=0,i,s,o;return l;function l(y){if(r<n.length){const b=n[r];return e.containerState=b[1],t.attempt(b[0].continuation,a,c)(y)}return c(y)}function a(y){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&m();const b=e.events.length;let S=b,v;for(;S--;)if(e.events[S][0]==="exit"&&e.events[S][1].type==="chunkFlow"){v=e.events[S][1].end;break}x(r);let w=b;for(;w<e.events.length;)e.events[w][1].end={...v},w++;return cn(e.events,S+1,0,e.events.slice(b)),e.events.length=w,c(y)}return l(y)}function c(y){if(r===n.length){if(!i)return h(y);if(i.currentConstruct&&i.currentConstruct.concrete)return p(y);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Qw,u,f)(y)}function u(y){return i&&m(),x(r),h(y)}function f(y){return e.parser.lazy[e.now().line]=r!==n.length,o=e.now().offset,p(y)}function h(y){return e.containerState={},t.attempt(Qw,d,p)(y)}function d(y){return r++,n.push([e.currentConstruct,e.containerState]),h(y)}function p(y){if(y===null){i&&m(),x(0),t.consume(y);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),g(y)}function g(y){if(y===null){O(t.exit("chunkFlow"),!0),x(0),t.consume(y);return}return we(y)?(t.consume(y),O(t.exit("chunkFlow")),r=0,e.interrupt=void 0,l):(t.consume(y),g)}function O(y,b){const S=e.sliceStream(y);if(b&&S.push(null),y.previous=s,s&&(s.next=y),s=y,i.defineSkip(y.start),i.write(S),e.parser.lazy[y.start.line]){let v=i.events.length;for(;v--;)if(i.events[v][1].start.offset<o&&(!i.events[v][1].end||i.events[v][1].end.offset>o))return;const w=e.events.length;let _=w,T,E;for(;_--;)if(e.events[_][0]==="exit"&&e.events[_][1].type==="chunkFlow"){if(T){E=e.events[_][1].end;break}T=!0}for(x(r),v=w;v<e.events.length;)e.events[v][1].end={...E},v++;cn(e.events,_+1,0,e.events.slice(w)),e.events.length=v}}function x(y){let b=n.length;for(;b-- >y;){const S=n[b];e.containerState=S[1],S[0].exit.call(e,t)}n.length=y}function m(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}function HZ(t,e,n){return He(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const JO={name:"attention",resolveAll:qZ,tokenize:YZ};function qZ(t,e){let n=-1,r,i,s,o,l,a,c,u;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;a=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f={...t[r][1].end},h={...t[n][1].start};Mw(f,-a),Mw(h,a),o={type:a>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:h},s={type:a>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},t[r][1].end={...o.start},t[n][1].start={...l.end},c=[],t[r][1].end.offset-t[r][1].start.offset&&(c=nr(c,[["enter",t[r][1],e],["exit",t[r][1],e]])),c=nr(c,[["enter",i,e],["enter",o,e],["exit",o,e],["enter",s,e]]),c=nr(c,Vu(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),c=nr(c,[["exit",s,e],["enter",l,e],["exit",l,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(u=2,c=nr(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,cn(t,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function YZ(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=qs(r);let s;return o;function o(a){return s=a,t.enter("attentionSequence"),l(a)}function l(a){if(a===s)return t.consume(a),l;const c=t.exit("attentionSequence"),u=qs(a),f=!u||u===2&&i||n.includes(a),h=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?f:f&&(i||!h)),c._close=!!(s===42?h:h&&(u||!f)),e(a)}}function Mw(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const UZ={name:"autolink",tokenize:GZ};function GZ(t,e,n){let r=0;return i;function i(d){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(d){return Gr(d)?(t.consume(d),o):d===64?n(d):c(d)}function o(d){return d===43||d===45||d===46||Yn(d)?(r=1,l(d)):c(d)}function l(d){return d===58?(t.consume(d),r=0,a):(d===43||d===45||d===46||Yn(d))&&r++<32?(t.consume(d),l):(r=0,c(d))}function a(d){return d===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):d===null||d===32||d===60||WO(d)?n(d):(t.consume(d),a)}function c(d){return d===64?(t.consume(d),u):sF(d)?(t.consume(d),c):n(d)}function u(d){return Yn(d)?f(d):n(d)}function f(d){return d===46?(t.consume(d),r=0,u):d===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):h(d)}function h(d){if((d===45||Yn(d))&&r++<63){const p=d===45?h:f;return t.consume(d),p}return n(d)}}const Vp={partial:!0,tokenize:KZ};function KZ(t,e,n){return r;function r(s){return Ve(s)?He(t,i,"linePrefix")(s):i(s)}function i(s){return s===null||we(s)?e(s):n(s)}}const M$={continuation:{tokenize:ez},exit:tz,name:"blockQuote",tokenize:JZ};function JZ(t,e,n){const r=this;return i;function i(o){if(o===62){const l=r.containerState;return l.open||(t.enter("blockQuote",{_container:!0}),l.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(o),t.exit("blockQuoteMarker"),s}return n(o)}function s(o){return Ve(o)?(t.enter("blockQuotePrefixWhitespace"),t.consume(o),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(o))}}function ez(t,e,n){const r=this;return i;function i(o){return Ve(o)?He(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return t.attempt(M$,e,n)(o)}}function tz(t){t.exit("blockQuote")}const R$={name:"characterEscape",tokenize:nz};function nz(t,e,n){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),i}function i(s){return lF(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(s)}}const L$={name:"characterReference",tokenize:rz};function rz(t,e,n){const r=this;let i=0,s,o;return l;function l(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),a}function a(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),c):(t.enter("characterReferenceValue"),s=31,o=Yn,u(f))}function c(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,o=oF,u):(t.enter("characterReferenceValue"),s=7,o=jO,u(f))}function u(f){if(f===59&&i){const h=t.exit("characterReferenceValue");return o===Yn&&!Xc(r.sliceSerialize(h))?n(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return o(f)&&i++<s?(t.consume(f),u):n(f)}}const Rw={partial:!0,tokenize:sz},Lw={concrete:!0,name:"codeFenced",tokenize:iz};function iz(t,e,n){const r=this,i={partial:!0,tokenize:S};let s=0,o=0,l;return a;function a(v){return c(v)}function c(v){const w=r.events[r.events.length-1];return s=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,l=v,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(v)}function u(v){return v===l?(o++,t.consume(v),u):o<3?n(v):(t.exit("codeFencedFenceSequence"),Ve(v)?He(t,f,"whitespace")(v):f(v))}function f(v){return v===null||we(v)?(t.exit("codeFencedFence"),r.interrupt?e(v):t.check(Rw,g,b)(v)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===null||we(v)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(v)):Ve(v)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),He(t,d,"whitespace")(v)):v===96&&v===l?n(v):(t.consume(v),h)}function d(v){return v===null||we(v)?f(v):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===null||we(v)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(v)):v===96&&v===l?n(v):(t.consume(v),p)}function g(v){return t.attempt(i,b,O)(v)}function O(v){return t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),x}function x(v){return s>0&&Ve(v)?He(t,m,"linePrefix",s+1)(v):m(v)}function m(v){return v===null||we(v)?t.check(Rw,g,b)(v):(t.enter("codeFlowValue"),y(v))}function y(v){return v===null||we(v)?(t.exit("codeFlowValue"),m(v)):(t.consume(v),y)}function b(v){return t.exit("codeFenced"),e(v)}function S(v,w,_){let T=0;return E;function E(Z){return v.enter("lineEnding"),v.consume(Z),v.exit("lineEnding"),L}function L(Z){return v.enter("codeFencedFence"),Ve(Z)?He(v,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):M(Z)}function M(Z){return Z===l?(v.enter("codeFencedFenceSequence"),$(Z)):_(Z)}function $(Z){return Z===l?(T++,v.consume(Z),$):T>=o?(v.exit("codeFencedFenceSequence"),Ve(Z)?He(v,V,"whitespace")(Z):V(Z)):_(Z)}function V(Z){return Z===null||we(Z)?(v.exit("codeFencedFence"),w(Z)):_(Z)}}}function sz(t,e,n){const r=this;return i;function i(o){return o===null?n(o):(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):e(o)}}const Zg={name:"codeIndented",tokenize:lz},oz={partial:!0,tokenize:az};function lz(t,e,n){const r=this;return i;function i(c){return t.enter("codeIndented"),He(t,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?a(c):we(c)?t.attempt(oz,o,a)(c):(t.enter("codeFlowValue"),l(c))}function l(c){return c===null||we(c)?(t.exit("codeFlowValue"),o(c)):(t.consume(c),l)}function a(c){return t.exit("codeIndented"),e(c)}}function az(t,e,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):we(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i):He(t,s,"linePrefix",5)(o)}function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(o):we(o)?i(o):n(o)}}const cz={name:"codeText",previous:fz,resolve:uz,tokenize:hz};function uz(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function fz(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function hz(t,e,n){let r=0,i,s;return o;function o(f){return t.enter("codeText"),t.enter("codeTextSequence"),l(f)}function l(f){return f===96?(t.consume(f),r++,l):(t.exit("codeTextSequence"),a(f))}function a(f){return f===null?n(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),a):f===96?(s=t.enter("codeTextSequence"),i=0,u(f)):we(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),a):(t.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||we(f)?(t.exit("codeTextData"),a(f)):(t.consume(f),c)}function u(f){return f===96?(t.consume(f),i++,u):i===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(s.type="codeTextData",c(f))}}class dz{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&za(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),za(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),za(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);za(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);za(this.left,n.reverse())}}}function za(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function I$(t){const e={};let n=-1,r,i,s,o,l,a,c;const u=new dz(t);for(;++n<u.length;){for(;n in e;)n=e[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,s=0,s<a.length&&a[s][1].type==="lineEndingBlank"&&(s+=2),s<a.length&&a[s][1].type==="content"))for(;++s<a.length&&a[s][1].type!=="content";)a[s][1].type==="chunkText"&&(a[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,pz(u,n)),n=e[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=u.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},l=u.slice(i,n),l.unshift(r),u.splice(i,n-i+1,l))}}return cn(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function pz(t,e){const n=t.get(e)[1],r=t.get(e)[2];let i=e-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,a=[],c={};let u,f,h=-1,d=n,p=0,g=0;const O=[g];for(;d;){for(;t.get(++i)[1]!==d;);s.push(i),d._tokenizer||(u=r.sliceStream(d),d.next||u.push(null),f&&o.defineSkip(d.start),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(g=h+1,O.push(g),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(o.events=[],d?(d._tokenizer=void 0,d.previous=void 0):O.pop(),h=O.length;h--;){const x=l.slice(O[h],O[h+1]),m=s.pop();a.push([m,m+x.length-1]),t.splice(m,2,x)}for(a.reverse(),h=-1;++h<a.length;)c[p+a[h][0]]=p+a[h][1],p+=a[h][1]-a[h][0]-1;return c}const gz={resolve:Oz,tokenize:xz},mz={partial:!0,tokenize:yz};function Oz(t){return I$(t),t}function xz(t,e){let n;return r;function r(l){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?s(l):we(l)?t.check(mz,o,s)(l):(t.consume(l),i)}function s(l){return t.exit("chunkContent"),t.exit("content"),e(l)}function o(l){return t.consume(l),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function yz(t,e,n){const r=this;return i;function i(o){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),He(t,s,"linePrefix")}function s(o){if(o===null||we(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(o):t.interrupt(r.parser.constructs.flow,n,e)(o)}}function N$(t,e,n,r,i,s,o,l,a){const c=a||Number.POSITIVE_INFINITY;let u=0;return f;function f(x){return x===60?(t.enter(r),t.enter(i),t.enter(s),t.consume(x),t.exit(s),h):x===null||x===32||x===41||WO(x)?n(x):(t.enter(r),t.enter(o),t.enter(l),t.enter("chunkString",{contentType:"string"}),g(x))}function h(x){return x===62?(t.enter(s),t.consume(x),t.exit(s),t.exit(i),t.exit(r),e):(t.enter(l),t.enter("chunkString",{contentType:"string"}),d(x))}function d(x){return x===62?(t.exit("chunkString"),t.exit(l),h(x)):x===null||x===60||we(x)?n(x):(t.consume(x),x===92?p:d)}function p(x){return x===60||x===62||x===92?(t.consume(x),d):d(x)}function g(x){return!u&&(x===null||x===41||yt(x))?(t.exit("chunkString"),t.exit(l),t.exit(o),t.exit(r),e(x)):u<c&&x===40?(t.consume(x),u++,g):x===41?(t.consume(x),u--,g):x===null||x===32||x===40||WO(x)?n(x):(t.consume(x),x===92?O:g)}function O(x){return x===40||x===41||x===92?(t.consume(x),g):g(x)}}function D$(t,e,n,r,i,s){const o=this;let l=0,a;return c;function c(d){return t.enter(r),t.enter(i),t.consume(d),t.exit(i),t.enter(s),u}function u(d){return l>999||d===null||d===91||d===93&&!a||d===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):d===93?(t.exit(s),t.enter(i),t.consume(d),t.exit(i),t.exit(r),e):we(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||we(d)||l++>999?(t.exit("chunkString"),u(d)):(t.consume(d),a||(a=!Ve(d)),d===92?h:f)}function h(d){return d===91||d===92||d===93?(t.consume(d),l++,f):f(d)}}function V$(t,e,n,r,i,s){let o;return l;function l(h){return h===34||h===39||h===40?(t.enter(r),t.enter(i),t.consume(h),t.exit(i),o=h===40?41:h,a):n(h)}function a(h){return h===o?(t.enter(i),t.consume(h),t.exit(i),t.exit(r),e):(t.enter(s),c(h))}function c(h){return h===o?(t.exit(s),a(o)):h===null?n(h):we(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),He(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===o||h===null||we(h)?(t.exit("chunkString"),c(h)):(t.consume(h),h===92?f:u)}function f(h){return h===o||h===92?(t.consume(h),u):u(h)}}function yc(t,e){let n;return r;function r(i){return we(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):Ve(i)?He(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const bz={name:"definition",tokenize:Sz},vz={partial:!0,tokenize:wz};function Sz(t,e,n){const r=this;let i;return s;function s(d){return t.enter("definition"),o(d)}function o(d){return D$.call(r,t,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function l(d){return i=Ql(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),a):n(d)}function a(d){return yt(d)?yc(t,c)(d):c(d)}function c(d){return N$(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return t.attempt(vz,f,f)(d)}function f(d){return Ve(d)?He(t,h,"whitespace")(d):h(d)}function h(d){return d===null||we(d)?(t.exit("definition"),r.parser.defined.push(i),e(d)):n(d)}}function wz(t,e,n){return r;function r(l){return yt(l)?yc(t,i)(l):n(l)}function i(l){return V$(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return Ve(l)?He(t,o,"whitespace")(l):o(l)}function o(l){return l===null||we(l)?e(l):n(l)}}const kz={name:"hardBreakEscape",tokenize:Cz};function Cz(t,e,n){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),i}function i(s){return we(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const _z={name:"headingAtx",resolve:Tz,tokenize:Ez};function Tz(t,e){let n=t.length-2,r=3,i,s;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},s={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},cn(t,r,n-r+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),t}function Ez(t,e,n){let r=0;return i;function i(u){return t.enter("atxHeading"),s(u)}function s(u){return t.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(t.consume(u),o):u===null||yt(u)?(t.exit("atxHeadingSequence"),l(u)):n(u)}function l(u){return u===35?(t.enter("atxHeadingSequence"),a(u)):u===null||we(u)?(t.exit("atxHeading"),e(u)):Ve(u)?He(t,l,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function a(u){return u===35?(t.consume(u),a):(t.exit("atxHeadingSequence"),l(u))}function c(u){return u===null||u===35||yt(u)?(t.exit("atxHeadingText"),l(u)):(t.consume(u),c)}}const Pz=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Iw=["pre","script","style","textarea"],Az={concrete:!0,name:"htmlFlow",resolveTo:Mz,tokenize:Rz},$z={partial:!0,tokenize:Iz},Qz={partial:!0,tokenize:Lz};function Mz(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function Rz(t,e,n){const r=this;let i,s,o,l,a;return c;function c(R){return u(R)}function u(R){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(R),f}function f(R){return R===33?(t.consume(R),h):R===47?(t.consume(R),s=!0,g):R===63?(t.consume(R),i=3,r.interrupt?e:Q):Gr(R)?(t.consume(R),o=String.fromCharCode(R),O):n(R)}function h(R){return R===45?(t.consume(R),i=2,d):R===91?(t.consume(R),i=5,l=0,p):Gr(R)?(t.consume(R),i=4,r.interrupt?e:Q):n(R)}function d(R){return R===45?(t.consume(R),r.interrupt?e:Q):n(R)}function p(R){const $e="CDATA[";return R===$e.charCodeAt(l++)?(t.consume(R),l===$e.length?r.interrupt?e:M:p):n(R)}function g(R){return Gr(R)?(t.consume(R),o=String.fromCharCode(R),O):n(R)}function O(R){if(R===null||R===47||R===62||yt(R)){const $e=R===47,Qe=o.toLowerCase();return!$e&&!s&&Iw.includes(Qe)?(i=1,r.interrupt?e(R):M(R)):Pz.includes(o.toLowerCase())?(i=6,$e?(t.consume(R),x):r.interrupt?e(R):M(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):s?m(R):y(R))}return R===45||Yn(R)?(t.consume(R),o+=String.fromCharCode(R),O):n(R)}function x(R){return R===62?(t.consume(R),r.interrupt?e:M):n(R)}function m(R){return Ve(R)?(t.consume(R),m):E(R)}function y(R){return R===47?(t.consume(R),E):R===58||R===95||Gr(R)?(t.consume(R),b):Ve(R)?(t.consume(R),y):E(R)}function b(R){return R===45||R===46||R===58||R===95||Yn(R)?(t.consume(R),b):S(R)}function S(R){return R===61?(t.consume(R),v):Ve(R)?(t.consume(R),S):y(R)}function v(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(t.consume(R),a=R,w):Ve(R)?(t.consume(R),v):_(R)}function w(R){return R===a?(t.consume(R),a=null,T):R===null||we(R)?n(R):(t.consume(R),w)}function _(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||yt(R)?S(R):(t.consume(R),_)}function T(R){return R===47||R===62||Ve(R)?y(R):n(R)}function E(R){return R===62?(t.consume(R),L):n(R)}function L(R){return R===null||we(R)?M(R):Ve(R)?(t.consume(R),L):n(R)}function M(R){return R===45&&i===2?(t.consume(R),Y):R===60&&i===1?(t.consume(R),j):R===62&&i===4?(t.consume(R),me):R===63&&i===3?(t.consume(R),Q):R===93&&i===5?(t.consume(R),se):we(R)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check($z,de,$)(R)):R===null||we(R)?(t.exit("htmlFlowData"),$(R)):(t.consume(R),M)}function $(R){return t.check(Qz,V,de)(R)}function V(R){return t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),Z}function Z(R){return R===null||we(R)?$(R):(t.enter("htmlFlowData"),M(R))}function Y(R){return R===45?(t.consume(R),Q):M(R)}function j(R){return R===47?(t.consume(R),o="",U):M(R)}function U(R){if(R===62){const $e=o.toLowerCase();return Iw.includes($e)?(t.consume(R),me):M(R)}return Gr(R)&&o.length<8?(t.consume(R),o+=String.fromCharCode(R),U):M(R)}function se(R){return R===93?(t.consume(R),Q):M(R)}function Q(R){return R===62?(t.consume(R),me):R===45&&i===2?(t.consume(R),Q):M(R)}function me(R){return R===null||we(R)?(t.exit("htmlFlowData"),de(R)):(t.consume(R),me)}function de(R){return t.exit("htmlFlow"),e(R)}}function Lz(t,e,n){const r=this;return i;function i(o){return we(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):e(o)}}function Iz(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Vp,e,n)}}const Nz={name:"htmlText",tokenize:Dz};function Dz(t,e,n){const r=this;let i,s,o;return l;function l(Q){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(Q),a}function a(Q){return Q===33?(t.consume(Q),c):Q===47?(t.consume(Q),S):Q===63?(t.consume(Q),y):Gr(Q)?(t.consume(Q),_):n(Q)}function c(Q){return Q===45?(t.consume(Q),u):Q===91?(t.consume(Q),s=0,p):Gr(Q)?(t.consume(Q),m):n(Q)}function u(Q){return Q===45?(t.consume(Q),d):n(Q)}function f(Q){return Q===null?n(Q):Q===45?(t.consume(Q),h):we(Q)?(o=f,j(Q)):(t.consume(Q),f)}function h(Q){return Q===45?(t.consume(Q),d):f(Q)}function d(Q){return Q===62?Y(Q):Q===45?h(Q):f(Q)}function p(Q){const me="CDATA[";return Q===me.charCodeAt(s++)?(t.consume(Q),s===me.length?g:p):n(Q)}function g(Q){return Q===null?n(Q):Q===93?(t.consume(Q),O):we(Q)?(o=g,j(Q)):(t.consume(Q),g)}function O(Q){return Q===93?(t.consume(Q),x):g(Q)}function x(Q){return Q===62?Y(Q):Q===93?(t.consume(Q),x):g(Q)}function m(Q){return Q===null||Q===62?Y(Q):we(Q)?(o=m,j(Q)):(t.consume(Q),m)}function y(Q){return Q===null?n(Q):Q===63?(t.consume(Q),b):we(Q)?(o=y,j(Q)):(t.consume(Q),y)}function b(Q){return Q===62?Y(Q):y(Q)}function S(Q){return Gr(Q)?(t.consume(Q),v):n(Q)}function v(Q){return Q===45||Yn(Q)?(t.consume(Q),v):w(Q)}function w(Q){return we(Q)?(o=w,j(Q)):Ve(Q)?(t.consume(Q),w):Y(Q)}function _(Q){return Q===45||Yn(Q)?(t.consume(Q),_):Q===47||Q===62||yt(Q)?T(Q):n(Q)}function T(Q){return Q===47?(t.consume(Q),Y):Q===58||Q===95||Gr(Q)?(t.consume(Q),E):we(Q)?(o=T,j(Q)):Ve(Q)?(t.consume(Q),T):Y(Q)}function E(Q){return Q===45||Q===46||Q===58||Q===95||Yn(Q)?(t.consume(Q),E):L(Q)}function L(Q){return Q===61?(t.consume(Q),M):we(Q)?(o=L,j(Q)):Ve(Q)?(t.consume(Q),L):T(Q)}function M(Q){return Q===null||Q===60||Q===61||Q===62||Q===96?n(Q):Q===34||Q===39?(t.consume(Q),i=Q,$):we(Q)?(o=M,j(Q)):Ve(Q)?(t.consume(Q),M):(t.consume(Q),V)}function $(Q){return Q===i?(t.consume(Q),i=void 0,Z):Q===null?n(Q):we(Q)?(o=$,j(Q)):(t.consume(Q),$)}function V(Q){return Q===null||Q===34||Q===39||Q===60||Q===61||Q===96?n(Q):Q===47||Q===62||yt(Q)?T(Q):(t.consume(Q),V)}function Z(Q){return Q===47||Q===62||yt(Q)?T(Q):n(Q)}function Y(Q){return Q===62?(t.consume(Q),t.exit("htmlTextData"),t.exit("htmlText"),e):n(Q)}function j(Q){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(Q),t.exit("lineEnding"),U}function U(Q){return Ve(Q)?He(t,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):se(Q)}function se(Q){return t.enter("htmlTextData"),o(Q)}}const fy={name:"labelEnd",resolveAll:Zz,resolveTo:zz,tokenize:Xz},Vz={tokenize:Wz},Fz={tokenize:jz},Bz={tokenize:Hz};function Zz(t){let e=-1;const n=[];for(;++e<t.length;){const r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return t.length!==n.length&&cn(t,0,t.length,n),t}function zz(t,e){let n=t.length,r=0,i,s,o,l;for(;n--;)if(i=t[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const a={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},c={type:"label",start:{...t[s][1].start},end:{...t[o][1].end}},u={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[o-2][1].start}};return l=[["enter",a,e],["enter",c,e]],l=nr(l,t.slice(s+1,s+r+3)),l=nr(l,[["enter",u,e]]),l=nr(l,Vu(e.parser.constructs.insideSpan.null,t.slice(s+r+4,o-3),e)),l=nr(l,[["exit",u,e],t[o-2],t[o-1],["exit",c,e]]),l=nr(l,t.slice(o+1)),l=nr(l,[["exit",a,e]]),cn(t,s,t.length,l),t}function Xz(t,e,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return l;function l(h){return s?s._inactive?f(h):(o=r.parser.defined.includes(Ql(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelEnd"),a):n(h)}function a(h){return h===40?t.attempt(Vz,u,o?u:f)(h):h===91?t.attempt(Fz,u,o?c:f)(h):o?u(h):f(h)}function c(h){return t.attempt(Bz,u,f)(h)}function u(h){return e(h)}function f(h){return s._balanced=!0,n(h)}}function Wz(t,e,n){return r;function r(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return yt(f)?yc(t,s)(f):s(f)}function s(f){return f===41?u(f):N$(t,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return yt(f)?yc(t,a)(f):u(f)}function l(f){return n(f)}function a(f){return f===34||f===39||f===40?V$(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return yt(f)?yc(t,u)(f):u(f)}function u(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):n(f)}}function jz(t,e,n){const r=this;return i;function i(l){return D$.call(r,t,s,o,"reference","referenceMarker","referenceString")(l)}function s(l){return r.parser.defined.includes(Ql(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(l):n(l)}function o(l){return n(l)}}function Hz(t,e,n){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),i}function i(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):n(s)}}const qz={name:"labelStartImage",resolveAll:fy.resolveAll,tokenize:Yz};function Yz(t,e,n){const r=this;return i;function i(l){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(l),t.exit("labelImageMarker"),s}function s(l){return l===91?(t.enter("labelMarker"),t.consume(l),t.exit("labelMarker"),t.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):e(l)}}const Uz={name:"labelStartLink",resolveAll:fy.resolveAll,tokenize:Gz};function Gz(t,e,n){const r=this;return i;function i(o){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):e(o)}}const zg={name:"lineEnding",tokenize:Kz};function Kz(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),He(t,e,"linePrefix")}}const ch={name:"thematicBreak",tokenize:Jz};function Jz(t,e,n){let r=0,i;return s;function s(c){return t.enter("thematicBreak"),o(c)}function o(c){return i=c,l(c)}function l(c){return c===i?(t.enter("thematicBreakSequence"),a(c)):r>=3&&(c===null||we(c))?(t.exit("thematicBreak"),e(c)):n(c)}function a(c){return c===i?(t.consume(c),r++,a):(t.exit("thematicBreakSequence"),Ve(c)?He(t,l,"whitespace")(c):l(c))}}const wn={continuation:{tokenize:rX},exit:sX,name:"list",tokenize:nX},eX={partial:!0,tokenize:oX},tX={partial:!0,tokenize:iX};function nX(t,e,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(d){const p=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:jO(d)){if(r.containerState.type||(r.containerState.type=p,t.enter(p,{_container:!0})),p==="listUnordered")return t.enter("listItemPrefix"),d===42||d===45?t.check(ch,n,c)(d):c(d);if(!r.interrupt||d===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),a(d)}return n(d)}function a(d){return jO(d)&&++o<10?(t.consume(d),a):(!r.interrupt||o<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(t.exit("listItemValue"),c(d)):n(d)}function c(d){return t.enter("listItemMarker"),t.consume(d),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,t.check(Vp,r.interrupt?n:u,t.attempt(eX,h,f))}function u(d){return r.containerState.initialBlankLine=!0,s++,h(d)}function f(d){return Ve(d)?(t.enter("listItemPrefixWhitespace"),t.consume(d),t.exit("listItemPrefixWhitespace"),h):n(d)}function h(d){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(d)}}function rX(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(Vp,i,s);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,He(t,e,"listItemIndent",r.containerState.size+1)(l)}function s(l){return r.containerState.furtherBlankLines||!Ve(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(tX,e,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,He(t,t.attempt(wn,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function iX(t,e,n){const r=this;return He(t,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?e(s):n(s)}}function sX(t){t.exit(this.containerState.type)}function oX(t,e,n){const r=this;return He(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!Ve(s)&&o&&o[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const Nw={name:"setextUnderline",resolveTo:lX,tokenize:aX};function lX(t,e){let n=t.length,r,i,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",s?(t.splice(i,0,["enter",o,e]),t.splice(s+1,0,["exit",t[r][1],e]),t[r][1].end={...t[s][1].end}):t[r][1]=o,t.push(["exit",o,e]),t}function aX(t,e,n){const r=this;let i;return s;function s(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return t.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(t.consume(c),l):(t.exit("setextHeadingLineSequence"),Ve(c)?He(t,a,"lineSuffix")(c):a(c))}function a(c){return c===null||we(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}const cX={tokenize:uX};function uX(t){const e=this,n=t.attempt(Vp,r,t.attempt(this.parser.constructs.flowInitial,i,He(t,t.attempt(this.parser.constructs.flow,i,t.attempt(gz,i)),"linePrefix")));return n;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const fX={resolveAll:B$()},hX=F$("string"),dX=F$("text");function F$(t){return{resolveAll:B$(t==="text"?pX:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],s=n.attempt(i,o,l);return o;function o(u){return c(u)?s(u):l(u)}function l(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),a}function a(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),a)}function c(u){if(u===null)return!0;const f=i[u];let h=-1;if(f)for(;++h<f.length;){const d=f[h];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function B$(t){return e;function e(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return t?t(n,r):n}}function pX(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],i=e.sliceStream(r);let s=i.length,o=-1,l=0,a;for(;s--;){const c=i[s];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(c===-2)a=!0,l++;else if(c!==-1){s++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(l=0),l){const c={type:n===t.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(t.splice(n,0,["enter",c,e],["exit",c,e]),n+=2)}n++}return t}const gX={42:wn,43:wn,45:wn,48:wn,49:wn,50:wn,51:wn,52:wn,53:wn,54:wn,55:wn,56:wn,57:wn,62:M$},mX={91:bz},OX={[-2]:Zg,[-1]:Zg,32:Zg},xX={35:_z,42:ch,45:[Nw,ch],60:Az,61:Nw,95:ch,96:Lw,126:Lw},yX={38:L$,92:R$},bX={[-5]:zg,[-4]:zg,[-3]:zg,33:qz,38:L$,42:JO,60:[UZ,Nz],91:Uz,92:[kz,R$],93:fy,95:JO,96:cz},vX={null:[JO,fX]},SX={null:[42,95]},wX={null:[]},kX=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:SX,contentInitial:mX,disable:wX,document:gX,flow:xX,flowInitial:OX,insideSpan:vX,string:yX,text:bX},Symbol.toStringTag,{value:"Module"}));function CX(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],l=[];const a={attempt:w(S),check:w(v),consume:m,enter:y,exit:b,interrupt:w(v,{interrupt:!0})},c={code:null,containerState:{},defineSkip:g,events:[],now:p,parser:t,previous:null,sliceSerialize:h,sliceStream:d,write:f};let u=e.tokenize.call(c,a);return e.resolveAll&&s.push(e),c;function f(L){return o=nr(o,L),O(),o[o.length-1]!==null?[]:(_(e,0),c.events=Vu(s,c.events,c),c.events)}function h(L,M){return TX(d(L),M)}function d(L){return _X(o,L)}function p(){const{_bufferIndex:L,_index:M,line:$,column:V,offset:Z}=r;return{_bufferIndex:L,_index:M,line:$,column:V,offset:Z}}function g(L){i[L.line]=L.column,E()}function O(){let L;for(;r._index<o.length;){const M=o[r._index];if(typeof M=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<M.length;)x(M.charCodeAt(r._bufferIndex));else x(M)}}function x(L){u=u(L)}function m(L){we(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,E()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=L}function y(L,M){const $=M||{};return $.type=L,$.start=p(),c.events.push(["enter",$,c]),l.push($),$}function b(L){const M=l.pop();return M.end=p(),c.events.push(["exit",M,c]),M}function S(L,M){_(L,M.from)}function v(L,M){M.restore()}function w(L,M){return $;function $(V,Z,Y){let j,U,se,Q;return Array.isArray(V)?de(V):"tokenize"in V?de([V]):me(V);function me(ke){return K;function K(ne){const ae=ne!==null&&ke[ne],fe=ne!==null&&ke.null,ve=[...Array.isArray(ae)?ae:ae?[ae]:[],...Array.isArray(fe)?fe:fe?[fe]:[]];return de(ve)(ne)}}function de(ke){return j=ke,U=0,ke.length===0?Y:R(ke[U])}function R(ke){return K;function K(ne){return Q=T(),se=ke,ke.partial||(c.currentConstruct=ke),ke.name&&c.parser.constructs.disable.null.includes(ke.name)?Qe():ke.tokenize.call(M?Object.assign(Object.create(c),M):c,a,$e,Qe)(ne)}}function $e(ke){return L(se,Q),Z}function Qe(ke){return Q.restore(),++U<j.length?R(j[U]):Y}}}function _(L,M){L.resolveAll&&!s.includes(L)&&s.push(L),L.resolve&&cn(c.events,M,c.events.length-M,L.resolve(c.events.slice(M),c)),L.resolveTo&&(c.events=L.resolveTo(c.events,c))}function T(){const L=p(),M=c.previous,$=c.currentConstruct,V=c.events.length,Z=Array.from(l);return{from:V,restore:Y};function Y(){r=L,c.previous=M,c.currentConstruct=$,c.events.length=V,l=Z,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function _X(t,e){const n=e.start._index,r=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex;let o;if(n===i)o=[t[n].slice(r,s)];else{if(o=t.slice(n,i),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}s>0&&o.push(t[i].slice(0,s))}return o}function TX(t,e){let n=-1;const r=[];let i;for(;++n<t.length;){const s=t[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
103
+ `;break}case-3:{o=`\r
104
+ `;break}case-2:{o=e?" ":" ";break}case-1:{if(!e&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function EX(t){const r={constructs:FZ([kX,...(t||{}).extensions||[]]),content:i(zZ),defined:[],document:i(WZ),flow:i(cX),lazy:{},string:i(hX),text:i(dX)};return r;function i(s){return o;function o(l){return CX(r,s,l)}}}function PX(t){for(;!I$(t););return t}const Dw=/[\0\t\n\r]/g;function AX(){let t=1,e="",n=!0,r;return i;function i(s,o,l){const a=[];let c,u,f,h,d;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),f=0,e="",n&&(s.charCodeAt(0)===65279&&f++,n=void 0);f<s.length;){if(Dw.lastIndex=f,c=Dw.exec(s),h=c&&c.index!==void 0?c.index:s.length,d=s.charCodeAt(h),!c){e=s.slice(f);break}if(d===10&&f===h&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),f<h&&(a.push(s.slice(f,h)),t+=h-f),d){case 0:{a.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,a.push(-2);t++<u;)a.push(-1);break}case 10:{a.push(-4),t=1;break}default:r=!0,t=1}f=h+1}return l&&(r&&a.push(-5),e&&a.push(e),a.push(null)),a}}const Z$={}.hasOwnProperty;function $X(t,e,n){return typeof e!="string"&&(n=e,e=void 0),QX(n)(PX(EX(n).document().write(AX()(t,e,!0))))}function QX(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Dt),autolinkProtocol:T,autolinkEmail:T,atxHeading:s(wt),blockQuote:s(fe),characterEscape:T,characterReference:T,codeFenced:s(ve),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(ve,o),codeText:s(Me,o),codeTextData:T,data:T,codeFlowValue:T,definition:s(qe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(mt),hardBreakEscape:s(kt),hardBreakTrailing:s(kt),htmlFlow:s(Tt,o),htmlFlowData:T,htmlText:s(Tt,o),htmlTextData:T,image:s(er),label:o,link:s(Dt),listItem:s(I),listItemValue:h,listOrdered:s(Nn,f),listUnordered:s(Nn),paragraph:s(F),reference:R,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(wt),strong:s(X),thematicBreak:s(ie)},exit:{atxHeading:a(),atxHeadingSequence:S,autolink:a(),autolinkEmail:ae,autolinkProtocol:ne,blockQuote:a(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:Qe,characterReferenceMarkerNumeric:Qe,characterReferenceValue:ke,characterReference:K,codeFenced:a(O),codeFencedFence:g,codeFencedFenceInfo:d,codeFencedFenceMeta:p,codeFlowValue:E,codeIndented:a(x),codeText:a(Z),codeTextData:E,data:E,definition:a(),definitionDestinationString:b,definitionLabelString:m,definitionTitleString:y,emphasis:a(),hardBreakEscape:a(M),hardBreakTrailing:a(M),htmlFlow:a($),htmlFlowData:E,htmlText:a(V),htmlTextData:E,image:a(j),label:se,labelText:U,lineEnding:L,link:a(Y),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:$e,resourceDestinationString:Q,resourceTitleString:me,resource:de,setextHeading:a(_),setextHeadingLineSequence:w,setextHeadingText:v,strong:a(),thematicBreak:a()}};z$(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(N){let B={type:"root",children:[]};const P={stack:[B],tokenStack:[],config:e,enter:l,exit:c,buffer:o,resume:u,data:n},ce=[];let Te=-1;for(;++Te<N.length;)if(N[Te][1].type==="listOrdered"||N[Te][1].type==="listUnordered")if(N[Te][0]==="enter")ce.push(Te);else{const Ye=ce.pop();Te=i(N,Ye,Te)}for(Te=-1;++Te<N.length;){const Ye=e[N[Te][0]];Z$.call(Ye,N[Te][1].type)&&Ye[N[Te][1].type].call(Object.assign({sliceSerialize:N[Te][2].sliceSerialize},P),N[Te][1])}if(P.tokenStack.length>0){const Ye=P.tokenStack[P.tokenStack.length-1];(Ye[1]||Vw).call(P,void 0,Ye[0])}for(B.position={start:bs(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:bs(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},Te=-1;++Te<e.transforms.length;)B=e.transforms[Te](B)||B;return B}function i(N,B,P){let ce=B-1,Te=-1,Ye=!1,Zt,mr,wi,ki;for(;++ce<=P;){const gn=N[ce];switch(gn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{gn[0]==="enter"?Te++:Te--,ki=void 0;break}case"lineEndingBlank":{gn[0]==="enter"&&(Zt&&!ki&&!Te&&!wi&&(wi=ce),ki=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ki=void 0}if(!Te&&gn[0]==="enter"&&gn[1].type==="listItemPrefix"||Te===-1&&gn[0]==="exit"&&(gn[1].type==="listUnordered"||gn[1].type==="listOrdered")){if(Zt){let Ci=ce;for(mr=void 0;Ci--;){const Or=N[Ci];if(Or[1].type==="lineEnding"||Or[1].type==="lineEndingBlank"){if(Or[0]==="exit")continue;mr&&(N[mr][1].type="lineEndingBlank",Ye=!0),Or[1].type="lineEnding",mr=Ci}else if(!(Or[1].type==="linePrefix"||Or[1].type==="blockQuotePrefix"||Or[1].type==="blockQuotePrefixWhitespace"||Or[1].type==="blockQuoteMarker"||Or[1].type==="listItemIndent"))break}wi&&(!mr||wi<mr)&&(Zt._spread=!0),Zt.end=Object.assign({},mr?N[mr][1].start:gn[1].end),N.splice(mr||ce,0,["exit",Zt,gn[2]]),ce++,P++}if(gn[1].type==="listItemPrefix"){const Ci={type:"listItem",_spread:!1,start:Object.assign({},gn[1].start),end:void 0};Zt=Ci,N.splice(ce,0,["enter",Ci,gn[2]]),ce++,P++,wi=void 0,ki=!0}}}return N[B][1]._spread=Ye,P}function s(N,B){return P;function P(ce){l.call(this,N(ce),ce),B&&B.call(this,ce)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(N,B,P){this.stack[this.stack.length-1].children.push(N),this.stack.push(N),this.tokenStack.push([B,P||void 0]),N.position={start:bs(B.start),end:void 0}}function a(N){return B;function B(P){N&&N.call(this,P),c.call(this,P)}}function c(N,B){const P=this.stack.pop(),ce=this.tokenStack.pop();if(ce)ce[0].type!==N.type&&(B?B.call(this,N,ce[0]):(ce[1]||Vw).call(this,N,ce[0]));else throw new Error("Cannot close `"+N.type+"` ("+Zi({start:N.start,end:N.end})+"): it’s not open");P.position.end=bs(N.end)}function u(){return ay(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(N){if(this.data.expectingFirstListItemValue){const B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(N),10),this.data.expectingFirstListItemValue=void 0}}function d(){const N=this.resume(),B=this.stack[this.stack.length-1];B.lang=N}function p(){const N=this.resume(),B=this.stack[this.stack.length-1];B.meta=N}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function O(){const N=this.resume(),B=this.stack[this.stack.length-1];B.value=N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const N=this.resume(),B=this.stack[this.stack.length-1];B.value=N.replace(/(\r?\n|\r)$/g,"")}function m(N){const B=this.resume(),P=this.stack[this.stack.length-1];P.label=B,P.identifier=Ql(this.sliceSerialize(N)).toLowerCase()}function y(){const N=this.resume(),B=this.stack[this.stack.length-1];B.title=N}function b(){const N=this.resume(),B=this.stack[this.stack.length-1];B.url=N}function S(N){const B=this.stack[this.stack.length-1];if(!B.depth){const P=this.sliceSerialize(N).length;B.depth=P}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function w(N){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(N).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function T(N){const P=this.stack[this.stack.length-1].children;let ce=P[P.length-1];(!ce||ce.type!=="text")&&(ce=ee(),ce.position={start:bs(N.start),end:void 0},P.push(ce)),this.stack.push(ce)}function E(N){const B=this.stack.pop();B.value+=this.sliceSerialize(N),B.position.end=bs(N.end)}function L(N){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const P=B.children[B.children.length-1];P.position.end=bs(N.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(B.type)&&(T.call(this,N),E.call(this,N))}function M(){this.data.atHardBreak=!0}function $(){const N=this.resume(),B=this.stack[this.stack.length-1];B.value=N}function V(){const N=this.resume(),B=this.stack[this.stack.length-1];B.value=N}function Z(){const N=this.resume(),B=this.stack[this.stack.length-1];B.value=N}function Y(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=B,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function j(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=B,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function U(N){const B=this.sliceSerialize(N),P=this.stack[this.stack.length-2];P.label=T$(B),P.identifier=Ql(B).toLowerCase()}function se(){const N=this.stack[this.stack.length-1],B=this.resume(),P=this.stack[this.stack.length-1];if(this.data.inReference=!0,P.type==="link"){const ce=N.children;P.children=ce}else P.alt=B}function Q(){const N=this.resume(),B=this.stack[this.stack.length-1];B.url=N}function me(){const N=this.resume(),B=this.stack[this.stack.length-1];B.title=N}function de(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function $e(N){const B=this.resume(),P=this.stack[this.stack.length-1];P.label=B,P.identifier=Ql(this.sliceSerialize(N)).toLowerCase(),this.data.referenceType="full"}function Qe(N){this.data.characterReferenceType=N.type}function ke(N){const B=this.sliceSerialize(N),P=this.data.characterReferenceType;let ce;P?(ce=_$(B,P==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ce=Xc(B);const Te=this.stack[this.stack.length-1];Te.value+=ce}function K(N){const B=this.stack.pop();B.position.end=bs(N.end)}function ne(N){E.call(this,N);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(N)}function ae(N){E.call(this,N);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(N)}function fe(){return{type:"blockquote",children:[]}}function ve(){return{type:"code",lang:null,meta:null,value:""}}function Me(){return{type:"inlineCode",value:""}}function qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function mt(){return{type:"emphasis",children:[]}}function wt(){return{type:"heading",depth:0,children:[]}}function kt(){return{type:"break"}}function Tt(){return{type:"html",value:""}}function er(){return{type:"image",title:null,url:"",alt:null}}function Dt(){return{type:"link",title:null,url:"",children:[]}}function Nn(N){return{type:"list",ordered:N.type==="listOrdered",start:null,spread:N._spread,children:[]}}function I(N){return{type:"listItem",spread:N._spread,checked:null,children:[]}}function F(){return{type:"paragraph",children:[]}}function X(){return{type:"strong",children:[]}}function ee(){return{type:"text",value:""}}function ie(){return{type:"thematicBreak"}}}function bs(t){return{line:t.line,column:t.column,offset:t.offset}}function z$(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?z$(t,r):MX(t,r)}}function MX(t,e){let n;for(n in e)if(Z$.call(e,n))switch(n){case"canContainEols":{const r=e[n];r&&t[n].push(...r);break}case"transforms":{const r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{const r=e[n];r&&Object.assign(t[n],r);break}}}function Vw(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Zi({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Zi({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Zi({start:e.start,end:e.end})+") is still open")}function Xa(t){return t.children instanceof Array}class e1 extends Error{constructor(e,n){super(e),this.name="MarkdownParseError",this.cause=n}}class t1 extends Error{constructor(e){super(e),this.name="UnrecognizedMarkdownConstructError"}}function RX(t){const e=new Map;return t.type!=="root"?{importDeclarations:{}}:(t.children.filter(r=>r.type==="mdxjsEsm").filter(r=>r.value.startsWith("import ")).forEach(r=>{var i,s;(((s=(i=r.data)==null?void 0:i.estree)==null?void 0:s.body)??[]).forEach(o=>{o.type==="ImportDeclaration"&&o.specifiers.forEach(l=>{e.set(l.local.name,{source:`${o.source.value}`,defaultExport:l.type==="ImportDefaultSpecifier"})})})}),{importDeclarations:Object.fromEntries(e.entries())})}function LX({root:t,markdown:e,visitors:n,syntaxExtensions:r,mdastExtensions:i,...s}){var o;let l;try{l=$X(e,{extensions:r,mdastExtensions:i})}catch(a){throw a instanceof Error?new e1(`Error parsing markdown: ${a.message}`,a):new e1(`Error parsing markdown: ${a}`,a)}l.children.length===0&&l.children.push({type:"paragraph",children:[]}),((o=l.children.at(-1))==null?void 0:o.type)!=="paragraph"&&l.children.push({type:"paragraph",children:[]}),X$({root:t,mdastRoot:l,visitors:n,...s})}function X$({root:t,mdastRoot:e,visitors:n,...r}){const i=new WeakMap,s=new WeakMap,o=RX(e);n=n.sort((c,u)=>(u.priority??0)-(c.priority??0));function l(c,u){if(!Xa(c))throw new Error("Attempting to visit children of a non-parent");c.children.forEach(f=>{a(f,u,c)})}function a(c,u,f,h=null){const d=n.find((p,g)=>h!=null&&h.has(g)?!1:typeof p.testNode=="string"?p.testNode===c.type:p.testNode(c,r));if(!d)try{throw new t1(`Unsupported markdown syntax: ${E$(c)}`)}catch{throw new t1(`Parsing of the following markdown structure failed: ${JSON.stringify({type:c.type,name:"name"in c?c.name:"N/A"})}`)}d.visitNode({mdastNode:c,lexicalParent:u,mdastParent:f,descriptors:r,metaData:o,actions:{visitChildren:l,nextVisitor(){a(c,u,f,(h??new Set).add(n.indexOf(d)))},addAndStepInto(p){u.append(p),Xa(c)&&l(c,p)},addFormatting(p,g){g||Xa(c)&&(g=c),g&&i.set(g,p|(i.get(f)??0))},removeFormatting(p,g){g||Xa(c)&&(g=c),g&&i.set(g,p^(i.get(f)??0))},getParentFormatting(){return i.get(f)??0},addStyle(p,g){g||Xa(c)&&(g=c),g&&s.set(g,p)},getParentStyle(){return s.get(f)??""}}})}a(e,t,null)}var IX=Object.defineProperty,NX=(t,e,n)=>e in t?IX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xg=(t,e,n)=>(NX(t,typeof e!="symbol"?e+"":e,n),n);const Fw="generic-html";class Fu extends ts{constructor(e,n,r,i){super(i),Xg(this,"__tag"),Xg(this,"__nodeType"),Xg(this,"__attributes"),this.__tag=e,this.__nodeType=n,this.__attributes=r}static getType(){return Fw}static clone(e){return new Fu(e.__tag,e.__nodeType,e.__attributes,e.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(e){const n=this.getWritable();n.__attributes=e}getStyle(){var e;return(e=this.__attributes.find(n=>n.name==="style"))==null?void 0:e.value}createDOM(){const e=this.__tag,n=document.createElement(e);return this.__attributes.forEach(r=>{n.setAttribute(r.name,r.value)}),n}updateDOM(){return!1}static importDOM(){return{}}exportDOM(e){const{element:n}=super.exportDOM(e);return{element:n}}static importJSON(e){const n=W$(e.tag,e.mdxType,e.attributes);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:Fw,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}}function W$(t,e,n){return cs(new Fu(t,e,n))}function DX(t){return t instanceof Fu}const VX={testLexicalNode:DX,visitLexicalNode({actions:t,lexicalNode:e}){t.addAndStepInto("mdxJsxTextElement",{name:e.getTag(),type:e.getNodeType(),attributes:e.getAttributes()})},priority:-100},FX={testLexicalNode:Iu,visitLexicalNode:({mdastParent:t,actions:e})=>{e.appendToParent(t,{type:"text",value:`
105
+ `})}},BX={testLexicalNode:Jx,visitLexicalNode:({actions:t})=>{t.addAndStepInto("paragraph")}},ZX={testLexicalNode:$p,visitLexicalNode:({actions:t})=>{t.addAndStepInto("root")}},uh=1,fh=2,hh=4,dh=8,hy=16,ph=32,gh=64,mh=128;function Bw(t){return t.type==="text"}const zX=["u","span","sub","sup"],XX={shouldJoin:(t,e)=>{if(["text","emphasis","strong","highlight"].includes(t.type))return t.type===e.type;if(t.type==="mdxJsxTextElement"&&e.type==="mdxJsxTextElement"&&zX.includes(e.name)){const n=e;return t.name===n.name&&JSON.stringify(t.attributes)===JSON.stringify(n.attributes)}return!1},join(t,e){return Bw(t)&&Bw(e)?{type:"text",value:t.value+e.value}:{...t,children:[...t.children,...e.children]}},testLexicalNode:tt,visitLexicalNode:({lexicalNode:t,mdastParent:e,actions:n})=>{const r=t.getPreviousSibling(),i=tt(r)?r.getFormat():0,s=t.getTextContent(),o=t.getFormat(),l=t.getStyle();let a=e;if(l&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:l}]})),i&o&dh&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),i&o&gh&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),i&o&ph&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),i&o&fh&&(a=n.appendToParent(a,{type:"emphasis",children:[]})),i&o&uh&&(a=n.appendToParent(a,{type:"strong",children:[]})),i&o&hh&&(a=n.appendToParent(a,{type:"delete",children:[]})),i&o&mh&&(a=n.appendToParent(a,{type:"highlight",children:[]})),o&dh&&!(i&dh)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),o&gh&&!(i&gh)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),o&ph&&!(i&ph)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),o&fh&&!(i&fh)&&(a=n.appendToParent(a,{type:"emphasis",children:[]})),o&uh&&!(i&uh)&&(a=n.appendToParent(a,{type:"strong",children:[]})),o&hh&&!(i&hh)&&(a=n.appendToParent(a,{type:"delete",children:[]})),o&mh&&!(i&mh)&&(a=n.appendToParent(a,{type:"highlight",children:[]})),o&hy){n.appendToParent(a,{type:"inlineCode",value:s});return}n.appendToParent(a,{type:"text",value:s})}},WX={testNode:"break",visitNode:function({lexicalParent:t}){t.append(Yl())}};function vf(t,e){return[{testNode:n=>n.type==="mdxJsxTextElement"&&n.name===t,visitNode({actions:n,mdastNode:r,lexicalParent:i}){n.addFormatting(e),n.visitChildren(r,i)}},{testNode:n=>n.type==="html"&&n.value===`<${t}>`,visitNode({actions:n,mdastParent:r}){n.addFormatting(e,r)}},{testNode:n=>n.type==="html"&&n.value===`</${t}>`,visitNode({actions:n,mdastParent:r}){n.removeFormatting(e,r)}}]}const jX={testNode:"delete",visitNode({mdastNode:t,actions:e,lexicalParent:n}){e.addFormatting(hh),e.visitChildren(t,n)}},HX={testNode:"highlight",visitNode({mdastNode:t,actions:e,lexicalParent:n}){e.addFormatting(mh),e.visitChildren(t,n)}},qX={testNode:"inlineCode",visitNode({mdastNode:t,actions:e}){e.addAndStepInto(pi(t.value).setFormat(e.getParentFormatting()|hy))}},YX={testNode:"emphasis",visitNode({mdastNode:t,actions:e,lexicalParent:n}){e.addFormatting(fh),e.visitChildren(t,n)}},UX={testNode:"strong",visitNode({mdastNode:t,actions:e,lexicalParent:n}){e.addFormatting(uh),e.visitChildren(t,n)}},GX=[YX,UX,...vf("u",dh),...vf("code",hy),qX,jX,HX,...vf("sup",gh),...vf("sub",ph)],KX={testNode:P$,visitNode:function({mdastNode:t,actions:e,lexicalParent:n}){t.name==="span"&&t.attributes.length===1&&t.attributes[0].type==="mdxJsxAttribute"&&t.attributes[0].name==="style"?(e.addStyle(t.attributes[0].value,t),e.visitChildren(t,n)):e.addAndStepInto(W$(t.name,t.type,t.attributes))},priority:-100},JX=["listitem","quote","admonition"],eW={testNode:"paragraph",visitNode:function({mdastNode:t,lexicalParent:e,actions:n}){JX.includes(e.getType())?n.visitChildren(t,e):n.addAndStepInto(St())}},tW={testNode:"root",visitNode({actions:t,mdastNode:e,lexicalParent:n}){t.visitChildren(e,n)}},nW={testNode:"text",visitNode({mdastNode:t,actions:e}){const n=pi(t.value);n.setFormat(e.getParentFormatting());const r=e.getParentStyle();r!==""&&n.setStyle(r),e.addAndStepInto(n)}},rW=()=>k.createElement(XA,{externalHistoryState:hi(PW)});function iW(t){return{canContainEols:["comment"],enter:{comment(e){this.buffer()}},exit:{comment(e){this.resume()}}}}const Zw=(t,e,n)=>{return r;function r(p){return t.enter("comment"),t.consume(p),i}function i(p){return p===on.exclamationMark?(t.consume(p),s):n(p)}function s(p){return p===on.dash?(t.consume(p),o):n(p)}function o(p){return p===on.dash?(t.consume(p),l):n(p)}function l(p){return p===on.greaterThan?n(p):we(p)?u(p):(t.enter(Li.data),p===on.dash?(t.consume(p),a):c(p))}function a(p){return p===on.greaterThan?n(p):c(p)}function c(p){return p===on.eof?n(p):p===on.dash?(t.consume(p),h):we(p)?(t.exit(Li.data),u(p)):(t.consume(p),c)}function u(p){return t.enter(Li.lineEnding),t.consume(p),t.exit(Li.lineEnding),He(t,f,Li.linePrefix)}function f(p){return we(p)?u(p):(t.enter(Li.data),c(p))}function h(p){return p===on.dash?(t.consume(p),d):c(p)}function d(p){return p===on.greaterThan?(t.exit(Li.data),t.enter("commentEnd"),t.consume(p),t.exit("commentEnd"),t.exit("comment"),e(p)):p===on.dash?(t.consume(p),d):c(p)}},sW={flow:{60:{tokenize:Zw,concrete:!0}},text:{60:{tokenize:Zw}}},oW="_bold_1tncs_10",lW="_italic_1tncs_14",aW="_underline_1tncs_18",cW="_strikethrough_1tncs_34",uW="_underlineStrikethrough_1tncs_38",fW="_subscript_1tncs_42",hW="_superscript_1tncs_47",dW="_code_1tncs_52",pW="_nestedListItem_1tncs_59",gW="_listitem_1tncs_69",mW="_listItemChecked_1tncs_73",OW="_listItemUnchecked_1tncs_74",xW="_admonitionDanger_1tncs_151",yW="_admonitionInfo_1tncs_152",bW="_admonitionNote_1tncs_153",vW="_admonitionTip_1tncs_154",SW="_admonitionCaution_1tncs_155",Gt={bold:oW,italic:lW,underline:aW,strikethrough:cW,underlineStrikethrough:uW,subscript:fW,superscript:hW,code:dW,nestedListItem:pW,listitem:gW,listItemChecked:mW,listItemUnchecked:OW,admonitionDanger:xW,admonitionInfo:yW,admonitionNote:bW,admonitionTip:vW,admonitionCaution:SW},Fp={text:{bold:Gt.bold,italic:Gt.italic,underline:Gt.underline,code:Gt.code,strikethrough:Gt.strikethrough,subscript:Gt.subscript,superscript:Gt.superscript,underlineStrikethrough:Gt.underlineStrikethrough},list:{listitem:Gt.listitem,listitemChecked:Gt.listItemChecked,listitemUnchecked:Gt.listItemUnchecked,nested:{listitem:Gt.nestedListItem}},admonition:{danger:Gt.admonitionDanger,info:Gt.admonitionInfo,note:Gt.admonitionNote,tip:Gt.admonitionTip,caution:Gt.admonitionCaution}},jc=bi("NESTED_EDITOR_UPDATED_COMMAND"),us=ye(null),bt=ye(null),n1=ye(""),r1=ye(!0),Ir=ye(!1,t=>{t.sub(t.pipe(Ir,Ct(us)),([e,n])=>{n==null||n.setEditable(!e)})}),i1=ye(""),zw=ye(!1),Hc=ye(!1),wW=ye(0),sd=ye(null),s1=Pt(t=>{t.link(t.pipe(sd,Au(e=>e!==null)),s1)}),kW=Pt(t=>{t.sub(t.pipe(kW,Ct(bt)),([e,n])=>{n==null||n.dispatchCommand(mA,e)})}),Gl=ye(null,t=>{t.sub(t.pipe(Gl,Ct(bt)),([e,n])=>{if(!e||!n)return;const r=e.anchor.getNode();let i=r.getKey()==="root"?r:$r(r,l=>{const a=l.getParent();return a!==null&&ar(a)});i??(i=r.getTopLevelElementOrThrow());const s=i.getKey();if(n.getElementByKey(s)!==null){const l=Ul(i)?i.getTag():i.getType();t.pub(AW,l)}})}),j$=ye(""),jo=ye(""),od=ye(!1),Bp=Pt(t=>{t.link(jo,Bp),t.sub(j$,e=>{t.pubIn({[od]:!0,[jo]:e})})}),o1=Pt(t=>{t.link(t.pipe(Bp,Ct(l1),Au(([,e])=>!e),Zs(([e])=>e)),o1)},!0),dy=ye([]),py=ye([]),H$=ye([]),q$=ye([]),Zp=ye([]),gy=ye([]),ld=ye({}),my=ye(!1),zp=ye([]),Y$=ye([]),Bu=ye([]),rl=ye(null),CW=ye(null),U$=ye(null),fs=dn(py),mi=dn(dy),ad=dn(H$),cd=dn(q$),hs=dn(Zp),Oy=dn(gy),l1=ye(!1),xy=Pt(t=>{t.sub(t.pipe(xy,Ct(jo,us,Hc),Au(([e,n])=>e.trim()!==n.trim())),([e,,n,r])=>{t.pub(l1,!0),n==null||n.update(()=>{rn().clear(),yy(t,rn(),e),r?n.focus():yi(null)},{onUpdate:()=>{t.pub(l1,!1)}})})}),G$=Pt(t=>{t.sub(t.pipe(G$,Ct(bt,Hc)),([e,n,r])=>{n==null||n.update(()=>{const i=be();if(i!==null){const s={children:[],append(o){this.children.push(o)},getType(){return i.getNodes()[0].getType()}};yy(t,s,e),Ca(s.children)}r?n.focus():yi(null)})})});function K$(){return bE((t,[e,n])=>(t.forEach(r=>{if(!r)throw new Error("You have a subscription that does not return a teardown");r()}),n?e.map(r=>r(n)):[]),[])}const _W=ye(null),J$=ye([],t=>{t.pipe(t.combine(J$,bt),K$())}),e3=ye([],t=>{t.pipe(t.combine(e3,us),K$())}),t3=ye(null,Ls,(t,e)=>!!(t&&e&&t.editorRef===e.editorRef)),a1=Pt(),ds=ye(t=>{throw new Error(`No icon component for ${t}`)});function dn(t,e){return Pt((n,r)=>{n.changeWith(t,r,(i,s)=>{Array.isArray(s)||(s=[s]);let o=i;for(const l of s)i.includes(l)||(o=[...o,l]);return o}),e==null||e(n,r)})}function n3(t){const e=be();Se(e)&&t.pubIn({[Gl]:e,[wW]:e.format})}const r3=dn(e3,(t,e)=>{t.pub(e,[n=>n.registerCommand(CA,(r,i)=>(t.pubIn({[bt]:i,[Hc]:!0}),i._parentEditor===null&&i.getEditorState().read(()=>{t.pub(t3,{rootNode:rn(),editorType:"lexical",editorRef:i})}),n3(t),!1),es),n=>n.registerUpdateListener(({dirtyElements:r,dirtyLeaves:i,editorState:s})=>{if(t.getValue(sd)!==null||r.size===0&&i.size===0)return;let l;s.read(()=>{rn().getLastChild()instanceof Nu&&n.update(()=>{rn().append(St())},{discrete:!0}),l=VZ({root:rn(),visitors:t.getValue(Zp),jsxComponentDescriptors:t.getValue(zp),toMarkdownExtensions:t.getValue(gy),toMarkdownOptions:t.getValue(ld),jsxIsAvailable:t.getValue(my)})}),t.pub(jo,l.trim()),t.pub(od,!1)}),n=>n.registerCommand(gA,()=>(t.pub(Hc,!0),!1),es)])}),qc=dn(J$,(t,e)=>{t.pub(e,[n=>n.registerUpdateListener(({editorState:r})=>{r.read(()=>{n3(t)})}),n=>n.registerCommand(fA,r=>{var i;const s=t.getValue(us);return s&&!((i=s.getRootElement())!=null&&i.contains(r.relatedTarget))&&t.pubIn({[Hc]:!1,[a1]:r}),!1},es)])});function yy(t,e,n){try{LX({root:e,visitors:t.getValue(dy),mdastExtensions:t.getValue(q$),markdown:n,syntaxExtensions:t.getValue(H$),jsxComponentDescriptors:t.getValue(zp),directiveDescriptors:t.getValue(Y$),codeBlockEditorDescriptors:t.getValue(Bu)}),t.pub(sd,null)}catch(r){if(r instanceof e1||r instanceof t1)t.pubIn({[jo]:n,[sd]:{error:r.message,source:n}});else throw r}}const i3=ye([]),il=dn(i3),s3=ye([]);dn(s3);const o3=ye([]);dn(o3);const l3=ye([]);dn(l3);const TW=ye([]),by=dn(TW),a3=ye([]),c3=dn(a3),EW=ye(!1,t=>{t.link(t.pipe(bt,Zs(e=>{var n,r;return["td","th"].includes(((r=(n=e==null?void 0:e.getRootElement())==null?void 0:n.parentNode)==null?void 0:r.nodeName.toLowerCase())??"")})),EW)}),PW=ye(zA()),AW=ye("");Pt();const c1=Pt(t=>{t.sub(t.pipe(c1,Ct(bt)),([e,n])=>{n==null||n.update(()=>{const r=be();Se(r)&&(_V(r,e),setTimeout(()=>{n.focus()}))})})}),vy=Pt(t=>{t.sub(t.pipe(vy,Ct(bt)),([e,n])=>{n==null||n.focus(()=>{n.getEditorState().read(()=>{const r=be();Se(r)&&(n.update(()=>{const i=e();i.isInline()?(Ca([i]),ar(i.getParentOrThrow())&&sy(i,St).selectEnd()):ZA(i),setTimeout(()=>{"select"in i&&typeof i.select=="function"&&i.select()})}),setTimeout(()=>{n.dispatchCommand(jc,void 0)}))})},{defaultSelection:"rootEnd"})})}),Yc=ye("rich-text",t=>{function e(){return bE((n,r)=>({current:n.next,next:r}),{current:"rich-text",next:"rich-text"})}t.sub(t.pipe(Yc,e(),Ct(Uc)),([{current:n},r])=>{(n==="source"||n==="diff")&&t.pub(xy,r)}),t.sub(t.pipe(Yc,e(),Au(n=>n.current==="rich-text"),Ct(bt)),([,n])=>{n==null||n.dispatchCommand(jc,void 0)})}),Uc=ye("",t=>{t.link(jo,Uc),t.link(Uc,Bp)},!0),u3=ye([]),Ta=dn(u3),f3=ye(()=>{throw new Error("No translation function provided")}),Xw=ye(Fp),$W=dr({init(t,e){const n=(e==null?void 0:e.initialMarkdown)??"";t.register(r3),t.register(qc),t.register(Bp),t.register(Uc),t.pubIn({[j$]:e!=null&&e.trim?n.trim():n,[ds]:e==null?void 0:e.iconComponentFor,[mi]:[tW,eW,nW,WX,...GX],[fs]:[hV,Mp,Fu],[hs]:[ZX,BX,XX,FX,VX],[n1]:e==null?void 0:e.contentEditableClassName,[r1]:e==null?void 0:e.spellCheck,[ld]:e==null?void 0:e.toMarkdownOptions,[zw]:e==null?void 0:e.autoFocus,[i1]:e==null?void 0:e.placeholder,[Ir]:e==null?void 0:e.readOnly,[f3]:e==null?void 0:e.translation,[cd]:[fF(),OF],[ad]:[cF(),KF()],[Oy]:[VF(),hF(),bF],[Xw]:(e==null?void 0:e.lexicalTheme)??Fp}),t.singletonSub(s1,e==null?void 0:e.onError),t.singletonSub(o1,r=>{e==null||e.onChange(r,t.getValue(od))}),t.singletonSub(a1,e==null?void 0:e.onBlur),e!=null&&e.suppressHtmlProcessing||t.pubIn({[cd]:[DF(),iW()],[ad]:[vB(),SB(),sW],[mi]:KX}),e!=null&&e.suppressSharedHistory||t.pub(il,rW)},postInit(t,e){const n=TA({editable:(e==null?void 0:e.readOnly)!==!0,namespace:(e==null?void 0:e.lexicalEditorNamespace)??"MDXEditor",nodes:[...t.getValue(py),...(e==null?void 0:e.additionalLexicalNodes)??[]],onError:r=>{throw r},theme:t.getValue(Xw)});(e==null?void 0:e.editorState)!==null&&n.update(()=>{const r=(e==null?void 0:e.initialMarkdown.trim())??"";yy(t,rn(),r);const i=e==null?void 0:e.autoFocus;if(i){if(i===!0){setTimeout(()=>{n.focus(Ls,{defaultSelection:"rootStart"})});return}setTimeout(()=>{n.focus(Ls,{defaultSelection:i.defaultSelection??"rootStart"})})}}),t.pub(us,n),t.pub(bt,n)},update(t,e){t.pubIn({[n1]:e==null?void 0:e.contentEditableClassName,[r1]:e==null?void 0:e.spellCheck,[ld]:e==null?void 0:e.toMarkdownOptions,[zw]:e==null?void 0:e.autoFocus,[i1]:e==null?void 0:e.placeholder,[Ir]:e==null?void 0:e.readOnly}),t.singletonSub(o1,n=>{e==null||e.onChange(n,t.getValue(od))}),t.singletonSub(a1,e==null?void 0:e.onBlur),t.singletonSub(s1,e==null?void 0:e.onError)}});function ps(){return hi(f3)}function QW(){return rn().getTextContent()}function MW(t,e=!0){if(t)return!1;let n=QW();return e&&(n=n.trim()),n===""}function RW(t){if(!MW(t,!1))return!1;const e=rn().getChildren(),n=e.length;if(n>1)return!1;for(let r=0;r<n;r++){const i=e[r];if(Eo(i))return!1;if(Be(i)){if(!Jx(i)||i.__indent!==0)return!1;const s=i.getChildren(),o=s.length;for(let l=0;l<o;l++){const a=s[r];if(!tt(a))return!1}}}return!0}function h3(t){return()=>RW(t)}const d3=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?C.useLayoutEffect:C.useEffect;function LW({editor:t,ariaActiveDescendant:e,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:s,ariaExpanded:o,ariaInvalid:l,ariaLabel:a,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:f,ariaRequired:h,autoCapitalize:d,className:p,id:g,role:O="textbox",spellCheck:x=!0,style:m,tabIndex:y,"data-testid":b,...S},v){const[w,_]=C.useState(t.isEditable()),T=C.useCallback((L=>{L&&L.ownerDocument&&L.ownerDocument.defaultView?t.setRootElement(L):t.setRootElement(null)}),[t]),E=C.useMemo((()=>(function(...L){return M=>{L.forEach(($=>{typeof $=="function"?$(M):$!=null&&($.current=M)}))}})(v,T)),[T,v]);return d3((()=>(_(t.isEditable()),t.registerEditableListener((L=>{_(L)})))),[t]),D.jsx("div",{"aria-activedescendant":w?e:void 0,"aria-autocomplete":w?n:"none","aria-controls":w?r:void 0,"aria-describedby":i,...s!=null?{"aria-errormessage":s}:{},"aria-expanded":w&&O==="combobox"?!!o:void 0,...l!=null?{"aria-invalid":l}:{},"aria-label":a,"aria-labelledby":c,"aria-multiline":u,"aria-owns":w?f:void 0,"aria-readonly":!w||void 0,"aria-required":h,autoCapitalize:d,className:p,contentEditable:w,"data-testid":b,id:g,ref:E,role:O,spellCheck:x,style:m,tabIndex:y,...S})}const IW=C.forwardRef(LW);function Ww(t){return t.getEditorState().read(h3(t.isComposing()))}const p3=C.forwardRef(NW);function NW(t,e){const{placeholder:n,...r}=t,[i]=hn();return D.jsxs(D.Fragment,{children:[D.jsx(IW,{editor:i,...r,ref:e}),n!=null&&D.jsx(DW,{editor:i,content:n})]})}function DW({content:t,editor:e}){const n=(function(o){const[l,a]=C.useState((()=>Ww(o)));return d3((()=>{function c(){const u=Ww(o);a(u)}return c(),In(o.registerUpdateListener((()=>{c()})),o.registerEditableListener((()=>{c()})))}),[o]),l})(e),[r,i]=C.useState(e.isEditable());if(C.useLayoutEffect((()=>(i(e.isEditable()),e.registerEditableListener((o=>{i(o)})))),[e]),!n)return null;let s=null;return typeof t=="function"?s=t(r):t!==null&&(s=t),s===null?null:D.jsx("div",{"aria-hidden":!0,children:s})}function u1(t,e){return u1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},u1(t,e)}var jw={error:null},VW=(function(t){var e,n;function r(){for(var s,o=arguments.length,l=new Array(o),a=0;a<o;a++)l[a]=arguments[a];return(s=t.call.apply(t,[this].concat(l))||this).state=jw,s.resetErrorBoundary=function(){for(var c,u=arguments.length,f=new Array(u),h=0;h<u;h++)f[h]=arguments[h];s.props.onReset==null||(c=s.props).onReset.apply(c,f),s.reset()},s}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,u1(e,n),r.getDerivedStateFromError=function(s){return{error:s}};var i=r.prototype;return i.reset=function(){this.setState(jw)},i.componentDidCatch=function(s,o){var l,a;(l=(a=this.props).onError)==null||l.call(a,s,o)},i.componentDidUpdate=function(s,o){var l,a,c,u,f=this.state.error,h=this.props.resetKeys;f!==null&&o.error!==null&&((c=s.resetKeys)===void 0&&(c=[]),(u=h)===void 0&&(u=[]),c.length!==u.length||c.some((function(d,p){return!Object.is(d,u[p])})))&&((l=(a=this.props).onResetKeysChange)==null||l.call(a,s.resetKeys,h),this.reset())},i.render=function(){var s=this.state.error,o=this.props,l=o.fallbackRender,a=o.FallbackComponent,c=o.fallback;if(s!==null){var u={error:s,resetErrorBoundary:this.resetErrorBoundary};if(C.isValidElement(c))return c;if(typeof l=="function")return l(u);if(a)return C.createElement(a,u);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r})(C.Component);function g3({children:t,onError:e}){return D.jsx(VW,{fallback:D.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:e,children:t})}const FW=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?C.useLayoutEffect:C.useEffect;function BW(t){return{initialValueFn:()=>t.isEditable(),subscribe:e=>t.registerEditableListener(e)}}function ZW(){return(function(t){const[e]=hn(),n=C.useMemo((()=>t(e)),[e,t]),[r,i]=C.useState((()=>n.initialValueFn())),s=C.useRef(r);return FW((()=>{const{initialValueFn:o,subscribe:l}=n,a=o();return s.current!==a&&(s.current=a,i(a)),l((c=>{s.current=c,i(c)}))}),[n,t]),r})(BW)}function zW(t){const e=window.location.origin,n=r=>{if(r.origin!==e)return;const i=t.getRootElement();if(document.activeElement!==i)return;const s=r.data;if(typeof s=="string"){let o;try{o=JSON.parse(s)}catch{return}if(o&&o.protocol==="nuanria_messaging"&&o.type==="request"){const l=o.payload;if(l&&l.functionId==="makeChanges"){const a=l.args;if(a){const[c,u,f,h,d,p]=a;t.update((()=>{const g=be();if(Se(g)){const O=g.anchor;let x=O.getNode(),m=0,y=0;if(tt(x)&&c>=0&&u>=0&&(m=c,y=c+u,g.setTextNodeRange(x,m,x,y)),m===y&&f===""||(g.insertRawText(f),x=O.getNode()),tt(x)){m=h,y=h+d;const b=x.getTextContentSize();m=m>b?b:m,y=y>b?b:y,g.setTextNodeRange(x,m,x,y)}r.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}const f1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?C.useLayoutEffect:C.useEffect;function Hw(t){return t.getEditorState().read(h3(t.isComposing()))}function m3({contentEditable:t,placeholder:e=null,ErrorBoundary:n}){const[r]=hn(),i=(function(s,o){const[l,a]=C.useState((()=>s.getDecorators()));return f1((()=>s.registerDecoratorListener((c=>{Bl.flushSync((()=>{a(c)}))}))),[s]),C.useEffect((()=>{a(s.getDecorators())}),[s]),C.useMemo((()=>{const c=[],u=Object.keys(l);for(let f=0;f<u.length;f++){const h=u[f],d=D.jsx(o,{onError:g=>s._onError(g),children:D.jsx(C.Suspense,{fallback:null,children:l[h]})}),p=s.getElementByKey(h);p!==null&&c.push(Bl.createPortal(d,p,h))}return c}),[o,l,s])})(r,n);return(function(s){f1((()=>In(iF(s),zW(s))),[s])})(r),D.jsxs(D.Fragment,{children:[t,D.jsx(XW,{content:e}),i]})}function XW({content:t}){const[e]=hn(),n=(function(i){const[s,o]=C.useState((()=>Hw(i)));return f1((()=>{function l(){const a=Hw(i);o(a)}return l(),In(i.registerUpdateListener((()=>{l()})),i.registerEditableListener((()=>{l()})))}),[i]),s})(e),r=ZW();return n?typeof t=="function"?t(r):t:null}var Wg={exports:{}};/*!
106
+ Copyright (c) 2018 Jed Watson.
107
+ Licensed under the MIT License (MIT), see
108
+ http://jedwatson.github.io/classnames
109
+ */var qw;function WW(){return qw||(qw=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var l=arguments[o];l&&(s=i(s,r(l)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var l in s)e.call(s,l)&&s[l]&&(o=i(o,l));return o}function i(s,o){return o?s?s+" "+o:s+o:s}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(Wg)),Wg.exports}var jW=WW();const it=q2(jW),HW={undo:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.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"},k.createElement("path",{d:"m9 11-6 6v3h9l3-3"}),k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M4.5 12.75V11.25H19.5V12.75H4.5Z",fill:"currentColor"})),frontmatter:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M4.5 8.75V7.25H8.5V8.75H4.5Z",fill:"currentColor"}),k.createElement("path",{d:"M4.5 14.75V13.25H8.5V14.75H4.5Z",fill:"currentColor"}),k.createElement("path",{d:"M9.5 8.75V7.25H13.5V8.75H9.5Z",fill:"currentColor"}),k.createElement("path",{d:"M9.5 14.75V13.25H13.5V14.75H9.5Z",fill:"currentColor"}),k.createElement("path",{d:"M14.5 8.75V7.25H18.5V8.75H14.5Z",fill:"currentColor"}),k.createElement("path",{d:"M14.5 14.75V13.25H18.5V14.75H14.5Z",fill:"currentColor"})),frame_source:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M11.9999 14.6537L7.59619 10.25H16.4037L11.9999 14.6537Z",fill:"currentColor"})),admonition:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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"})),sandpack:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M12.9999 22.5C12.4947 22.5 12.0671 22.325 11.7171 21.975C11.3671 21.625 11.1921 21.1974 11.1921 20.6922V7.30775C11.1921 6.80258 11.3671 6.375 11.7171 6.025C12.0671 5.675 12.4947 5.5 12.9999 5.5H16.3844C16.8895 5.5 17.3171 5.675 17.6671 6.025C18.0171 6.375 18.1921 6.80258 18.1921 7.30775V20.6922C18.1921 21.1974 18.0171 21.625 17.6671 21.975C17.3171 22.325 16.8895 22.5 16.3844 22.5H12.9999ZM12.6921 7.30775V20.6922C12.6921 20.7692 12.7242 20.8398 12.7884 20.9038C12.8524 20.9679 12.9229 21 12.9999 21H16.3844C16.4614 21 16.5319 20.9679 16.5959 20.9038C16.66 20.8398 16.6921 20.7692 16.6921 20.6922V7.30775C16.6921 7.23075 16.66 7.16025 16.5959 7.09625C16.5319 7.03208 16.4614 7 16.3844 7H12.9999C12.9229 7 12.8524 7.03208 12.7884 7.09625C12.7242 7.16025 12.6921 7.23075 12.6921 7.30775ZM6.61537 18.5C6.1102 18.5 5.68262 18.325 5.33262 17.975C4.98262 17.625 4.80762 17.1974 4.80762 16.6923V3.30775C4.80762 2.80258 4.98262 2.375 5.33262 2.025C5.68262 1.675 6.1102 1.5 6.61537 1.5H9.99987C10.505 1.5 10.9326 1.675 11.2826 2.025C11.6326 2.375 11.8076 2.80258 11.8076 3.30775V16.6923C11.8076 17.1974 11.6326 17.625 11.2826 17.975C10.9326 18.325 10.505 18.5 9.99987 18.5H6.61537ZM6.30762 3.30775V16.6923C6.30762 16.7692 6.3397 16.8398 6.40387 16.9038C6.46787 16.9679 6.53837 17 6.61537 17H9.99987C10.0769 17 10.1474 16.9679 10.2114 16.9038C10.2755 16.8398 10.3076 16.7692 10.3076 16.6923V3.30775C10.3076 3.23075 10.2755 3.16025 10.2114 3.09625C10.1474 3.03208 10.0769 3 9.99987 3H6.61537C6.53837 3 6.46787 3.03208 6.40387 3.09625C6.3397 3.16025 6.30762 3.23075 6.30762 3.30775Z",fill:"currentColor"})),rich_text:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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"}),k.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"}),k.createElement("path",{d:"M12.5 7H17.5V8.25H12.5V7Z",fill:"currentColor"}),k.createElement("path",{d:"M12.5 9.25H17.5V10.5H12.5V9.25Z",fill:"currentColor"})),difference:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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"}),k.createElement("rect",{x:"9",y:"10",width:"5.5",height:"1.5",fill:"currentColor"}),k.createElement("rect",{x:"9",y:"15",width:"5.5",height:"1.5",fill:"currentColor"}),k.createElement("rect",{x:"11",y:"8",width:"1.5",height:"5.5",fill:"currentColor"})),markdown:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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"}),k.createElement("path",{d:"M13 15H11.5V11L9.5 14L7.5 11V15H6V8H7.5L9.5 11L11.5 8H13V15Z",fill:"currentColor"}),k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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"}),k.createElement("path",{d:"M11.3848 9.68275V7.5H12.8848V9.68275H15V11.1827H12.8848V13.2307H11.3848V11.1827H9.26925V9.68275H11.3848Z",fill:"currentColor"})),add_column:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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"}),k.createElement("path",{d:"M9.18275 11.3848H7V12.8848H9.18275V15H10.6827V12.8848H12.7307V11.3848H10.6827V9.26925H9.18275V11.3848Z",fill:"currentColor"})),insert_col_left:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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"}))},qW="_editorRoot_1e2ox_53",YW="_editorWrapper_1e2ox_155",UW="_selectContainer_1e2ox_288",GW="_selectItem_1e2ox_301",KW="_selectTrigger_1e2ox_308",JW="_selectDropdownArrow_1e2ox_374",ej="_contentEditable_1e2ox_380",tj="_codeMirrorWrapper_1e2ox_392",nj="_codeMirrorToolbar_1e2ox_409",rj="_iconButton_1e2ox_457",ij="_primaryButton_1e2ox_507",sj="_secondaryButton_1e2ox_508",oj="_linkDialogEditForm_1e2ox_541",lj="_linkDialogAnchor_1e2ox_587",aj="_linkDialogPopoverContent_1e2ox_601",cj="_tableColumnEditorPopoverContent_1e2ox_602",uj="_dialogContent_1e2ox_603",fj="_popoverArrow_1e2ox_650",hj="_linkDialogPreviewAnchor_1e2ox_654",dj="_tooltipTrigger_1e2ox_677",pj="_tooltipContent_1e2ox_681",gj="_actionButton_1e2ox_695",mj="_tableEditor_1e2ox_714",Oj="_toolCell_1e2ox_725",xj="_tableColumnEditorTrigger_1e2ox_744",yj="_addRowButton_1e2ox_746",bj="_addColumnButton_1e2ox_747",vj="_tableColumnEditorToolbar_1e2ox_789",Sj="_toggleGroupRoot_1e2ox_802",wj="_tableToolsColumn_1e2ox_820",kj="_leftAlignedCell_1e2ox_829",Cj="_rightAlignedCell_1e2ox_833",_j="_centeredCell_1e2ox_837",Tj="_dialogOverlay_1e2ox_870",Ej="_focusedImage_1e2ox_916",Pj="_imageWrapper_1e2ox_920",Aj="_editImageToolbar_1e2ox_933",$j="_editImageButton_1e2ox_937",Qj="_imageControlWrapperResizing_1e2ox_1032",Mj="_imageResizer_1e2ox_1036",Rj="_imageResizerN_1e2ox_1045",Lj="_imageResizerNe_1e2ox_1051",Ij="_imageResizerE_1e2ox_1057",Nj="_imageResizerSe_1e2ox_1063",Dj="_imageResizerS_1e2ox_1063",Vj="_imageResizerSw_1e2ox_1075",Fj="_imageResizerW_1e2ox_1081",Bj="_imageResizerNw_1e2ox_1087",Zj="_imagePlaceholder_1e2ox_1093",zj="_imageDimensionsContainer_1e2ox_1101",Xj="_placeholder_1e2ox_1106",Wj="_rootContentEditableWrapper_1e2ox_1119",jj="_downshiftInputWrapper_1e2ox_1129",Hj="_downshiftInput_1e2ox_1129",qj="_downshiftAutocompleteContainer_1e2ox_1160",Yj="_textInput_1e2ox_1206",Uj="_multiFieldForm_1e2ox_1214",Gj="_formField_1e2ox_1220",Kj="_popupContainer_1e2ox_1240",re={editorRoot:qW,editorWrapper:YW,selectContainer:UW,selectItem:GW,selectTrigger:KW,selectDropdownArrow:JW,contentEditable:ej,codeMirrorWrapper:tj,codeMirrorToolbar:nj,iconButton:rj,primaryButton:ij,secondaryButton:sj,linkDialogEditForm:oj,linkDialogAnchor:lj,linkDialogPopoverContent:aj,tableColumnEditorPopoverContent:cj,dialogContent:uj,popoverArrow:fj,linkDialogPreviewAnchor:hj,tooltipTrigger:dj,tooltipContent:pj,actionButton:gj,tableEditor:mj,toolCell:Oj,tableColumnEditorTrigger:xj,addRowButton:yj,addColumnButton:bj,tableColumnEditorToolbar:vj,toggleGroupRoot:Sj,tableToolsColumn:wj,leftAlignedCell:kj,rightAlignedCell:Cj,centeredCell:_j,dialogOverlay:Tj,focusedImage:Ej,imageWrapper:Pj,editImageToolbar:Aj,editImageButton:$j,imageControlWrapperResizing:Qj,imageResizer:Mj,imageResizerN:Rj,imageResizerNe:Lj,imageResizerE:Ij,imageResizerSe:Nj,imageResizerS:Dj,imageResizerSw:Vj,imageResizerW:Fj,imageResizerNw:Bj,imagePlaceholder:Zj,imageDimensionsContainer:zj,placeholder:Xj,rootContentEditableWrapper:Wj,downshiftInputWrapper:jj,downshiftInput:Hj,downshiftAutocompleteContainer:qj,textInput:Yj,multiFieldForm:Uj,formField:Gj,popupContainer:Kj},Jj=new Set(["http:","https:","mailto:","sms:","tel:"]);class gs extends ts{static getType(){return"link"}static clone(e){return new gs(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",n={},r){super(r);const{target:i=null,rel:s=null,title:o=null}=n;this.__url=e,this.__target=i,this.__rel=s,this.__title=o}createDOM(e){const n=document.createElement("a");return this.updateLinkDOM(null,n,e),Lr(n,e.theme.link),n}updateLinkDOM(e,n,r){if(AA(n)){e&&e.__url===this.__url||(n.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const s=`__${i}`,o=this[s];e&&e[s]===o||(o?n[i]=o:n.removeAttribute(i))}}}updateDOM(e,n,r){return this.updateLinkDOM(e,n,r),!1}static importDOM(){return{a:e=>({conversion:eH,priority:1})}}static importJSON(e){return rs().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=Gw(e);try{const n=new URL(Gw(e));if(!Jj.has(n.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){const n=this.getWritable();return n.__url=e,n}getTarget(){return this.getLatest().__target}setTarget(e){const n=this.getWritable();return n.__target=e,n}getRel(){return this.getLatest().__rel}setRel(e){const n=this.getWritable();return n.__rel=e,n}getTitle(){return this.getLatest().__title}setTitle(e){const n=this.getWritable();return n.__title=e,n}insertNewAfter(e,n=!0){const r=rs(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,n),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n,r){if(!Se(n))return!1;const i=n.anchor.getNode(),s=n.focus.getNode();return this.isParentOf(i)&&this.isParentOf(s)&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function eH(t){let e=null;if(AA(t)){const n=t.textContent;(n!==null&&n!==""||t.children.length>0)&&(e=rs(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:e}}function rs(t="",e){return cs(new gs(t,e))}function Tn(t){return t instanceof gs}let Xp=class O3 extends gs{constructor(e="",n={},r){super(e,n,r),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null&&n.isUnlinked}static getType(){return"autolink"}static clone(e){return new O3(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const n=this.getWritable();return n.__isUnlinked=e,n}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,n,r){return super.updateDOM(e,n,r)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return h1().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,n=!0){const r=this.getParentOrThrow().insertNewAfter(e,n);if(Be(r)){const i=h1(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(i),i}return null}};function h1(t="",e){return cs(new Xp(t,e))}function Sr(t){return t instanceof Xp}const Kl=bi("TOGGLE_LINK_COMMAND");function Yw(t,e){if(t.type==="element"){const n=t.getNode();return Be(n)||(function(r,...i){const s=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",r);for(const l of i)o.append("v",l);throw s.search=o.toString(),Error(`Minified Lexical error #${r}; visit ${s.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[t.offset+e]||null}return null}function jg(t,e={}){const{target:n,title:r}=e,i=e.rel===void 0?"noreferrer":e.rel,s=be();if(s===null||!Se(s)&&!Qt(s))return;if(Qt(s)){const c=s.getNodes();return c.length===0?void 0:void c.forEach((u=>{if(t===null){const f=$r(u,(h=>!Sr(h)&&Tn(h)));f&&(f.insertBefore(u),f.getChildren().length===0&&f.remove())}else{const f=$r(u,(h=>!Sr(h)&&Tn(h)));if(f)f.setURL(t),n!==void 0&&f.setTarget(n),i!==void 0&&f.setRel(i);else{const h=rs(t,{rel:i,target:n});u.insertBefore(h),h.append(u)}}}))}const o=s.extract();if(t===null)return void o.forEach((c=>{const u=$r(c,(f=>!Sr(f)&&Tn(f)));if(u){const f=u.getChildren();for(let h=0;h<f.length;h++)u.insertBefore(f[h]);u.remove()}}));const l=new Set,a=c=>{l.has(c.getKey())||(l.add(c.getKey()),c.setURL(t),n!==void 0&&c.setTarget(n),i!==void 0&&c.setRel(i),r!==void 0&&c.setTitle(r))};if(o.length===1){const c=Uw(o[0],Tn);if(c!==null)return a(c)}(function(c){const u=be();if(!Se(u))return c();const f=Jh(u),h=f.isBackward(),d=Yw(f.anchor,h?-1:0),p=Yw(f.focus,h?0:-1);if(c(),d||p){const g=be();if(Se(g)){const O=g.clone();if(d){const x=d.getParent();x&&O.anchor.set(x.getKey(),d.getIndexWithinParent()+(h?1:0),"element")}if(p){const x=p.getParent();x&&O.focus.set(x.getKey(),p.getIndexWithinParent()+(h?0:1),"element")}yi(Jh(O))}}})((()=>{let c=null;for(const u of o){if(!u.isAttached())continue;const f=Uw(u,Tn);if(f){a(f);continue}if(Be(u)){if(!u.isInline())continue;if(Tn(u)){if(!(Sr(u)||c!==null&&c.getParentOrThrow().isParentOf(u))){a(u),c=u;continue}for(const d of u.getChildren())u.insertBefore(d);u.remove();continue}}const h=u.getPreviousSibling();Tn(h)&&h.is(c)?h.append(u):(c=rs(t,{rel:i,target:n,title:r}),u.insertAfter(c),c.append(u))}}))}function Uw(t,e){let n=t;for(;n!==null&&n.getParent()!==null&&!e(n);)n=n.getParentOrThrow();return e(n)?n:null}const tH=/^\+?[0-9\s()-]{5,}$/;function Gw(t){return t.match(/^[a-z][a-z0-9+.-]*:/i)||t.match(/^[/#.]/)?t:t.includes("@")?`mailto:${t}`:tH.test(t)?`tel:${t}`:`https://${t}`}function $s(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Gc(t){let e=1,n=t.getParent();for(;n!=null;){if(De(n)){const r=n.getParent();if(Ee(r)){e++,n=r.getParent();continue}$s(40)}return e}return e}function d1(t){let e=t.getParent();Ee(e)||$s(40);let n=e;for(;n!==null;)n=n.getParent(),Ee(n)&&(e=n);return e}function x3(t){let e=[];const n=t.getChildren().filter(De);for(let r=0;r<n.length;r++){const i=n[r],s=i.getFirstChild();Ee(s)?e=e.concat(x3(s)):e.push(i)}return e}function Kr(t){return De(t)&&Ee(t.getFirstChild())}function Kw(t){return Sn().append(t)}function y3(t,e){return De(t)&&(e.length===0||e.length===1&&t.is(e[0])&&t.getChildrenSize()===0)}function p1(t){const e=be();if(e!==null){let n=e.getNodes();if(Se(e)){const i=e.getStartEndPoints();i===null&&$s(143);const[s]=i,o=s.getNode(),l=o.getParent();if(ar(o)){const a=o.getFirstChild();if(a)n=a.selectStart().getNodes();else{const c=St();o.append(c),n=c.select().getNodes()}}else if(y3(o,n)){const a=yn(t);if(ar(l)){o.replace(a);const c=Sn();Be(o)&&(c.setFormat(o.getFormatType()),c.setIndent(o.getIndent())),a.append(c)}else if(De(o)){const c=o.getParentOrThrow();Ho(a,c.getChildren()),c.replace(a)}return}}const r=new Set;for(let i=0;i<n.length;i++){const s=n[i];if(Be(s)&&s.isEmpty()&&!De(s)&&!r.has(s.getKey())){Jw(s,t);continue}let o=lA(s)?s.getParent():De(s)&&s.isEmpty()?s:null;for(;o!=null;){const l=o.getKey();if(Ee(o)){if(!r.has(l)){const a=yn(t);Ho(a,o.getChildren()),o.replace(a),r.add(l)}break}{const a=o.getParent();if(ar(a)&&!r.has(l)){r.add(l),Jw(o,t);break}o=a}}}}}function Ho(t,e){t.splice(t.getChildrenSize(),0,e)}function Jw(t,e){if(Ee(t))return t;const n=t.getPreviousSibling(),r=t.getNextSibling(),i=Sn();let s;if(Ho(i,t.getChildren()),Ee(n)&&e===n.getListType())n.append(i),Ee(r)&&e===r.getListType()&&(Ho(n,r.getChildren()),r.remove()),s=n;else if(Ee(r)&&e===r.getListType())r.getFirstChildOrThrow().insertBefore(i),s=r;else{const o=yn(e);o.append(i),t.replace(o),s=o}return i.setFormat(t.getFormatType()),i.setIndent(t.getIndent()),t.remove(),s}function Sy(t,e){const n=t.getLastChild(),r=e.getFirstChild();n&&r&&Kr(n)&&Kr(r)&&(Sy(n.getFirstChild(),r.getFirstChild()),r.remove());const i=e.getChildren();i.length>0&&t.append(...i),e.remove()}function nH(){const t=be();if(Se(t)){const e=new Set,n=t.getNodes(),r=t.anchor.getNode();if(y3(r,n))e.add(d1(r));else for(let i=0;i<n.length;i++){const s=n[i];if(lA(s)){const o=BA(s,ms);o!=null&&e.add(d1(o))}}for(const i of e){let s=i;const o=x3(i);for(const l of o){const a=St().setTextStyle(t.style).setTextFormat(t.format);Ho(a,l.getChildren()),s.insertAfter(a),s=a,l.__key===t.anchor.key&&MS(t.anchor,IO(Gh(a,"next"))),l.__key===t.focus.key&&MS(t.focus,IO(Gh(a,"next"))),l.remove()}i.remove()}}}function b3(t){const e=t.getListType()!=="check";let n=t.getStart();for(const r of t.getChildren())De(r)&&(r.getValue()!==n&&r.setValue(n),e&&r.getLatest().__checked!=null&&r.setChecked(void 0),Ee(r.getFirstChild())||n++)}function rH(t){const e=new Set;if(Kr(t)||e.has(t.getKey()))return;const n=t.getParent(),r=t.getNextSibling(),i=t.getPreviousSibling();if(Kr(r)&&Kr(i)){const s=i.getFirstChild();if(Ee(s)){s.append(t);const o=r.getFirstChild();Ee(o)&&(Ho(s,o.getChildren()),r.remove(),e.add(r.getKey()))}}else if(Kr(r)){const s=r.getFirstChild();if(Ee(s)){const o=s.getFirstChild();o!==null&&o.insertBefore(t)}}else if(Kr(i)){const s=i.getFirstChild();Ee(s)&&s.append(t)}else if(Ee(n)){const s=Sn().setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle()),o=yn(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());s.append(o),o.append(t),i?i.insertAfter(s):r?r.insertBefore(s):n.append(s)}}function iH(t){if(Kr(t))return;const e=t.getParent(),n=e?e.getParent():void 0;if(Ee(n?n.getParent():void 0)&&De(n)&&Ee(e)){const r=e?e.getFirstChild():void 0,i=e?e.getLastChild():void 0;if(t.is(r))n.insertBefore(t),e.isEmpty()&&n.remove();else if(t.is(i))n.insertAfter(t),e.isEmpty()&&n.remove();else{const s=e.getListType(),o=Sn(),l=yn(s);o.append(l),t.getPreviousSiblings().forEach((u=>l.append(u)));const a=Sn(),c=yn(s);a.append(c),Ho(c,t.getNextSiblings()),n.insertBefore(o),n.insertAfter(a),n.replace(t)}}}function sH(){const t=be();if(!Se(t)||!t.isCollapsed())return!1;const e=t.anchor.getNode();if(!De(e)||e.getChildrenSize()!==0)return!1;const n=d1(e),r=e.getParent();Ee(r)||$s(40);const i=r.getParent();let s;if(ar(i))s=St(),n.insertAfter(s);else{if(!De(i))return!1;s=Sn(),i.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();const o=e.getNextSiblings();if(o.length>0){const l=yn(r.getListType());if(De(s)){const a=Sn();a.append(l),s.insertAfter(a)}else s.insertAfter(l);l.append(...o)}return(function(l){let a=l;for(;a.getNextSibling()==null&&a.getPreviousSibling()==null;){const c=a.getParent();if(c==null||!De(c)&&!Ee(c))break;a=c}a.remove()})(e),!0}function ud(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))e.push(r);return e}let ms=class extends ts{$config(){return this.config("listitem",{$transform:e=>{if(e.__checked==null)return;const n=e.getParent();Ee(n)&&n.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)},extends:ts,importDOM:_A({li:()=>({conversion:oH,priority:0})})})}constructor(e=1,n=void 0,r){super(r),this.__value=e===void 0?1:e,this.__checked=n}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){const n=document.createElement("li");return this.updateListItemDOM(null,n,e),n}updateListItemDOM(e,n,r){const i=this.getParent();Ee(i)&&i.getListType()==="check"&&(function(l,a,c,u){Ee(a.getFirstChild())?(l.removeAttribute("role"),l.removeAttribute("tabIndex"),l.removeAttribute("aria-checked")):(l.setAttribute("role","checkbox"),l.setAttribute("tabIndex","-1"),c&&a.__checked===c.__checked||l.setAttribute("aria-checked",a.getChecked()?"true":"false"))})(n,this,e),n.value=this.__value,(function(l,a,c){const u=[],f=[],h=a.list,d=h?h.listitem:void 0;let p;if(h&&h.nested&&(p=h.nested.listitem),d!==void 0&&u.push(...ud(d)),h){const g=c.getParent(),O=Ee(g)&&g.getListType()==="check",x=c.getChecked();O&&!x||f.push(h.listitemUnchecked),O&&x||f.push(h.listitemChecked),O&&u.push(x?h.listitemChecked:h.listitemUnchecked)}if(p!==void 0){const g=ud(p);c.getChildren().some((O=>Ee(O)))?u.push(...g):f.push(...g)}f.length>0&&Lp(l,...f),u.length>0&&Lr(l,...u)})(n,r.theme,this);const s=e?e.__style:"",o=this.__style;s!==o&&(o===""?n.removeAttribute("style"):n.style.cssText=o),(function(l,a,c){const u=VS(a.__textStyle);for(const f in u)l.style.setProperty(`--listitem-marker-${f}`,u[f]);if(c)for(const f in VS(c.__textStyle))f in u||l.style.removeProperty(`--listitem-marker-${f}`)})(n,this,e)}updateDOM(e,n,r){const i=n;return this.updateListItemDOM(e,i,r),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const n=this.createDOM(e._config),r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();return i&&(n.dir=i),{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let n=0;n<e.length;n++){const r=e[n];if(Be(r)&&this.canMergeWith(r)){const i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(e,n){if(De(e))return super.replace(e);this.setIndent(0);const r=this.getParentOrThrow();if(!Ee(r))return e;if(r.__first===this.getKey())r.insertBefore(e);else if(r.__last===this.getKey())r.insertAfter(e);else{const i=yn(r.getListType());let s=this.getNextSibling();for(;s;){const o=s;s=s.getNextSibling(),i.append(o)}r.insertAfter(e),e.insertAfter(i)}return n&&(Be(e)||$s(139),this.getChildren().forEach((i=>{e.append(i)}))),this.remove(),r.getChildrenSize()===0&&r.remove(),e}insertAfter(e,n=!0){const r=this.getParentOrThrow();if(Ee(r)||$s(39),De(e))return super.insertAfter(e,n);const i=this.getNextSiblings();if(r.insertAfter(e,n),i.length!==0){const s=yn(r.getListType());i.forEach((o=>s.append(o))),e.insertAfter(s,n)}return e}remove(e){const n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),n&&r&&Kr(n)&&Kr(r)&&(Sy(n.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(e,n=!0){const r=Sn().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(r,n),r}collapseAtStart(e){const n=St();this.getChildren().forEach((o=>n.append(o)));const r=this.getParentOrThrow(),i=r.getParentOrThrow(),s=De(i);if(r.getChildrenSize()===1)if(s)r.remove(),i.select();else{r.insertBefore(n),r.remove();const o=e.anchor,l=e.focus,a=n.getKey();o.type==="element"&&o.getNode().is(this)&&o.set(a,o.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(a,l.offset,"element")}else r.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){const n=this.getWritable();return n.__value=e,n}getChecked(){const e=this.getLatest();let n;const r=this.getParent();return Ee(r)&&(n=r.getListType()),n==="check"?!!e.__checked:void 0}setChecked(e){const n=this.getWritable();return n.__checked=e,n}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 n=e.getParentOrThrow(),r=0;for(;De(n);)n=n.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(e){typeof e!="number"&&$s(117),(e=Math.floor(e))>=0||$s(199);let n=this.getIndent();for(;n!==e;)n<e?(rH(this),n++):(iH(this),n--);return this}canInsertAfter(e){return De(e)}canReplaceWith(e){return De(e)}canMergeWith(e){return De(e)||Jx(e)}extractWithChild(e,n){if(!Se(n))return!1;const r=n.anchor.getNode(),i=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return yn("bullet")}canMergeWhenEmpty(){return!0}};function oH(t){if(t.classList.contains("task-list-item")){for(const n of t.children)if(n.tagName==="INPUT")return lH(n)}const e=t.getAttribute("aria-checked");return{node:Sn(e==="true"||e!=="false"&&void 0)}}function lH(t){return t.getAttribute("type")!=="checkbox"?{node:null}:{node:Sn(t.hasAttribute("checked"))}}function Sn(t){return cs(new ms(void 0,t))}function De(t){return t instanceof ms}let Os=class extends ts{$config(){return this.config("list",{$transform:e=>{(function(n){const r=n.getNextSibling();Ee(r)&&n.getListType()===r.getListType()&&Sy(n,r)})(e),b3(e)},extends:ts,importDOM:_A({ol:()=>({conversion:tk,priority:0}),ul:()=>({conversion:tk,priority:0})})})}constructor(e="number",n=1,r){super(r);const i=cH[e]||e;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=n}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 n=this.getWritable();return n.__listType=e,n.__tag=e==="number"?"ol":"ul",n}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){const n=this.getWritable();return n.__start=e,n}createDOM(e,n){const r=this.__tag,i=document.createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,ek(i,e.theme,this),i}updateDOM(e,n,r){return e.__tag!==this.__tag||(ek(n,r.theme,this),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const n=this.createDOM(e._config,e);return gi(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,n,r){let i=r;for(let s=0;s<r.length;s++){const o=r[s];De(o)||(i===r&&(i=[...r]),i[s]=Sn().append(!Be(o)||Ee(o)||o.isInline()?o:pi(o.getTextContent())))}return super.splice(e,n,i)}extractWithChild(e){return De(e)}};function ek(t,e,n){const r=[],i=[],s=e.list;if(s!==void 0){const o=s[`${n.__tag}Depth`]||[],l=Gc(n)-1,a=l%o.length,c=o[a],u=s[n.__tag];let f;const h=s.nested,d=s.checklist;if(h!==void 0&&h.list&&(f=h.list),u!==void 0&&r.push(u),d!==void 0&&n.__listType==="check"&&r.push(d),c!==void 0){r.push(...ud(c));for(let p=0;p<o.length;p++)p!==a&&i.push(n.__tag+p)}if(f!==void 0){const p=ud(f);l>1?r.push(...p):i.push(...p)}}i.length>0&&Lp(t,...i),r.length>0&&Lr(t,...r)}function aH(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n];if(De(r)){e.push(r);const i=r.getChildren();i.length>1&&i.forEach((s=>{Ee(s)&&e.push(Kw(s))}))}else e.push(Kw(r))}return e}function tk(t){const e=t.nodeName.toLowerCase();let n=null;return e==="ol"?n=yn("number",t.start):e==="ul"&&(n=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list"))return!0;for(const i of r.childNodes)if(gi(i)&&i.hasAttribute("aria-checked"))return!0;return!1})(t)?yn("check"):yn("bullet")),{after:aH,node:n}}const cH={ol:"number",ul:"bullet"};function yn(t="number",e=1){return cs(new Os(t,e))}function Ee(t){return t instanceof Os}const v3=bi("INSERT_CHECK_LIST_COMMAND");function uH(t){return In(t.registerCommand(v3,(()=>(p1("check"),!0)),dt),t.registerCommand(xA,(e=>ik(e,t,!1)),dt),t.registerCommand(bA,(e=>ik(e,t,!0)),dt),t.registerCommand(Qp,(()=>{if(g1()!=null){const e=t.getRootElement();return e!=null&&e.focus(),!0}return!1}),dt),t.registerCommand(kA,(e=>{const n=g1();return!(n==null||!t.isEditable())&&(t.update((()=>{const r=Wo(n);De(r)&&(e.preventDefault(),r.toggleChecked())})),!0)}),dt),t.registerCommand(yA,(e=>t.getEditorState().read((()=>{const n=be();if(Se(n)&&n.isCollapsed()){const{anchor:r}=n,i=r.type==="element";if(i||r.offset===0){const s=r.getNode(),o=$r(s,(l=>Be(l)&&!l.isInline()));if(De(o)){const l=o.getParent();if(Ee(l)&&l.getListType()==="check"&&(i||o.getFirstDescendant()===s)){const a=t.getElementByKey(o.__key);if(a!=null&&document.activeElement!==a)return a.focus(),e.preventDefault(),!0}}}}return!1}))),dt),t.registerRootListener(((e,n)=>{e!==null&&(e.addEventListener("click",nk),e.addEventListener("pointerdown",rk)),n!==null&&(n.removeEventListener("click",nk),n.removeEventListener("pointerdown",rk))})))}function S3(t,e){const n=t.target;if(!gi(n))return;const r=n.firstChild;if(gi(r)&&(r.tagName==="UL"||r.tagName==="OL"))return;const i=n.parentNode;if(!i||i.__lexicalListType!=="check")return;const s=n.getBoundingClientRect(),o=LV(n),l=t.clientX/o,a=window.getComputedStyle?window.getComputedStyle(n,"::before"):{width:"0px"},c=parseFloat(a.width),u=t.pointerType==="touch"?32:0;(n.dir==="rtl"?l<s.right+u&&l>s.right-c-u:l>s.left-u&&l<s.left+c+u)&&e()}function nk(t){S3(t,(()=>{if(gi(t.target)){const e=t.target,n=xV(e);n!=null&&n.isEditable()&&n.update((()=>{const r=Wo(e);De(r)&&(e.focus(),r.toggleChecked())}))}}))}function rk(t){S3(t,(()=>{t.preventDefault()}))}function g1(){const t=document.activeElement;return gi(t)&&t.tagName==="LI"&&t.parentNode!=null&&t.parentNode.__lexicalListType==="check"?t:null}function ik(t,e,n){const r=g1();return r!=null&&e.update((()=>{const i=Wo(r);if(!De(i))return;const s=(function(o,l){let a=l?o.getPreviousSibling():o.getNextSibling(),c=o;for(;a==null&&De(c);)c=c.getParentOrThrow().getParent(),c!=null&&(a=l?c.getPreviousSibling():c.getNextSibling());for(;De(a);){const u=l?a.getLastChild():a.getFirstChild();if(!Ee(u))return a;a=l?u.getLastChild():u.getFirstChild()}return null})(i,n);if(s!=null){s.selectStart();const o=e.getElementByKey(s.__key);o!=null&&(t.preventDefault(),setTimeout((()=>{o.focus()}),0))}})),!1}const fH=bi("UPDATE_LIST_START_COMMAND"),w3=bi("INSERT_UNORDERED_LIST_COMMAND"),k3=bi("INSERT_ORDERED_LIST_COMMAND"),C3=bi("REMOVE_LIST_COMMAND");function hH(t){return In(t.registerCommand(k3,(()=>(p1("number"),!0)),dt),t.registerCommand(fH,(e=>{const{listNodeKey:n,newStart:r}=e,i=ci(n);return!!Ee(i)&&(i.getListType()==="number"&&(i.setStart(r),b3(i)),!0)}),dt),t.registerCommand(w3,(()=>(p1("bullet"),!0)),dt),t.registerCommand(C3,(()=>(nH(),!0)),dt),t.registerCommand(DO,(()=>sH()),dt),t.registerNodeTransform(ms,(e=>{const n=e.getFirstChild();if(n){if(tt(n)){const r=n.getStyle(),i=n.getFormat();e.getTextStyle()!==r&&e.setTextStyle(r),e.getTextFormat()!==i&&e.setTextFormat(i)}}else{const r=be();Se(r)&&(r.style!==e.getTextStyle()||r.format!==e.getTextFormat())&&r.isCollapsed()&&e.is(r.anchor.getNode())&&e.setTextStyle(r.style).setTextFormat(r.format)}})),t.registerNodeTransform(Mp,(e=>{const n=e.getParent();if(De(n)&&e.is(n.getFirstChild())){const r=e.getStyle(),i=e.getFormat();r===n.getTextStyle()&&i===n.getTextFormat()||n.setTextStyle(r).setTextFormat(i)}})))}function dH(t){const e=n=>{const r=n.getParent();if(Ee(n.getFirstChild())||!Ee(r))return;const i=$r(n,(s=>De(s)&&Ee(s.getParent())&&De(s.getPreviousSibling())));if(i===null&&n.getIndent()>0)n.setIndent(0);else if(De(i)){const s=i.getPreviousSibling();if(De(s)){const o=(function(a){let c=a,u=c.getFirstChild();for(;Ee(u);){const f=u.getLastChild();if(!De(f))break;c=f,u=c.getFirstChild()}return c})(s),l=o.getParent();if(Ee(l)){const a=Gc(l);a+1<Gc(r)&&n.setIndent(a)}}}};return t.registerNodeTransform(Os,(n=>{const r=[n];for(;r.length>0;){const i=r.shift();if(Ee(i)){for(const s of i.getChildren())if(De(s)){e(s);const o=s.getFirstChild();Ee(o)&&r.push(o)}}}}))}function pH(t){try{const e=t.anchor,n=t.focus,r=t.anchor.getNode(),i=t.focus.getNode();return r===i?r:t.isBackward()?BS(n)?r:i:BS(e)?r:i}catch{return null}}const gH=["transform","perspective","filter","backdrop-filter","contain","container-type"],mH=["layout","paint","strict","content"];function OH(t){let e=t==null?void 0:t.parentElement;for(;e;){const n=window.getComputedStyle(e),i=n.willChange.split(",").map(o=>o.trim()).some(o=>gH.includes(o));if(n.transform!=="none"||n.perspective!=="none"||n.filter!=="none"||n.backdropFilter!=="none"||mH.includes(n.contain)||n.containerType!=="normal"||n.contentVisibility==="auto"||i)return e;e=e.parentElement}return null}function _3(t){const e=be(),n=window.getSelection(),r=document.activeElement,i=t.getRootElement();if(e!==null&&n!==null&&i!==null&&i.contains(n.anchorNode)&&t.isEditable()){const s=n.getRangeAt(0);let o;if(n.isCollapsed){let a=n.anchorNode;(a==null?void 0:a.nodeType)==3&&(a=a.parentNode),o=a.getBoundingClientRect(),o.width=0}else if(n.anchorNode===i){let a=i;for(;a.firstElementChild!=null;)a=a.firstElementChild;o=a.getBoundingClientRect()}else o=s.getBoundingClientRect();const l=OH(i);if(l){const a=l.getBoundingClientRect();return{top:Math.round(o.top-a.top),left:Math.round(o.left-a.left),width:Math.round(o.width),height:Math.round(o.height)}}return{top:Math.round(o.top),left:Math.round(o.left),width:Math.round(o.width),height:Math.round(o.height)}}else if((r==null?void 0:r.className)!=="link-input")return null;return null}function xH(t,e){let n="";return t.getEditorState().read(()=>{const r=be();if(!r||!Se(r)||r.isCollapsed())return;const i=r.getNodes();if(i.length===0)return;const s=new Set;i.forEach(a=>{let c=a;for(;c;){if(Ul(c)||De(c)||c.getType()==="paragraph"||c.getType()==="quote"){Be(c)&&s.add(c);break}c=c.getParent()}});const o=s.size>0?Array.from(s):i;function l(a){if(Ul(a)){const c=parseInt(a.getTag().replace("h","")),f=a.getChildren().map(h=>l(h)).join("");return"#".repeat(c)+" "+f+`
110
+
111
+ `}else if(De(a)){const c=a.getParent(),u=c&&Ee(c)&&c.getListType()==="number"?"1. ":"- ",h=a.getChildren().map(d=>l(d)).join("");return u+h+`
112
+ `}else{if(Ee(a))return a.getChildren().map(u=>l(u)).join("")+`
113
+ `;if(tt(a)){let c=a.getTextContent();const u=a.getFormat();return u&16?`\`${c}\``:(u&1&&(c=`**${c}**`),u&2&&(c=`*${c}*`),u&4&&(c=`~~${c}~~`),c)}else if(Tn(a)){const c=a.getURL(),u=a.getTitle(),h=a.getChildren().map(d=>l(d)).join("");return u?`[${h}](${c} "${u}")`:`[${h}](${c})`}else if(Be(a))return a.getChildren().map(u=>l(u)).join("")}return a.getTextContent()}n=o.map(a=>l(a)).join("")}),n.trim()}const yH=({children:t})=>{const e=hi(us),n=k.useMemo(()=>[e,vE(null,Fp)],[e]);return k.createElement(Ih.Provider,{value:n},t)},bH=()=>{const t=ps(),e=Hn(U$),n=Hn(_W),r=f=>{n(f),e(f?{current:f}:null)},[i,s,o,l,a,c,u]=Fr(n1,r1,i3,s3,l3,i1,o3);return k.createElement(k.Fragment,null,l.map((f,h)=>k.createElement(f,{key:h})),k.createElement(T3,{wrappers:a},k.createElement("div",{className:it(re.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},k.createElement(m3,{contentEditable:k.createElement("div",{ref:r},k.createElement(p3,{className:it(re.contentEditable,i),ariaLabel:t("contentArea.editableMarkdown","editable markdown"),spellCheck:s})),placeholder:k.createElement("div",{className:it(re.contentEditable,re.placeholder,i)},k.createElement("p",null,c)),ErrorBoundary:g3}))),o.map((f,h)=>k.createElement(f,{key:h})),u.map((f,h)=>k.createElement(f,{key:h})))},vH={listItemIndent:"one"},SH=t=>HW[t];function wH(t,e,n={}){let r=e;for(const[i,s]of Object.entries(n))r=r.replaceAll(`{{${i}}}`,String(s));return r}const T3=({wrappers:t,children:e})=>{if(t.length===0)return k.createElement(k.Fragment,null,e);const n=t[0];return k.createElement(n,null,k.createElement(T3,{wrappers:t.slice(1)},e))},kH=({children:t,className:e,overlayContainer:n})=>{const r=k.useRef(null),i=k.useRef(null),s=Hn(rl),o=Hn(CW);return k.useEffect(()=>{const l=document.createElement("div");return l.classList.add("mdxeditor-popup-container",re.editorRoot,re.popupContainer,...(e??"").trim().split(" ").filter(Boolean)),(n??document.body).appendChild(l),r.current=l,s(r),o(i),()=>{l.remove()}},[e,r,n,s,o]),k.createElement("div",{className:it("mdxeditor",re.editorRoot,re.editorWrapper,e),ref:i},t)},CH=({mdxRef:t})=>{const e=gp();return k.useImperativeHandle(t,()=>({getMarkdown:()=>{const n=e.getValue(Yc);return n==="source"||n==="diff"?e.getValue(Uc):e.getValue(jo)},setMarkdown:n=>{e.pub(xy,n)},insertMarkdown:n=>{e.pub(G$,n)},focus:(n,r)=>{var i;(i=e.getValue(us))==null||i.focus(n,r)},getContentEditableHTML:()=>{var n;return((n=e.getValue(U$))==null?void 0:n.current.innerHTML)??""},getSelectionMarkdown:()=>{const n=e.getValue(Yc);if(n==="source"||n==="diff")return"";const r=e.getValue(bt);return r?(e.getValue(Zp),e.getValue(gy),e.getValue(ld),e.getValue(zp),e.getValue(my),xH(r)):""}}),[e]),null},_ae=k.forwardRef((t,e)=>k.createElement(yN,{plugins:[$W({contentEditableClassName:t.contentEditableClassName??"",spellCheck:t.spellCheck??!0,initialMarkdown:t.markdown,onChange:t.onChange??Ls,onBlur:t.onBlur??Ls,toMarkdownOptions:t.toMarkdownOptions??vH,autoFocus:t.autoFocus??!1,placeholder:t.placeholder??"",readOnly:!!t.readOnly,iconComponentFor:t.iconComponentFor??SH,suppressHtmlProcessing:t.suppressHtmlProcessing??!1,onError:t.onError??Ls,translation:t.translation??wH,trim:t.trim??!0,lexicalTheme:t.lexicalTheme,..."editorState"in t?{editorState:t.editorState}:{},suppressSharedHistory:t.suppressSharedHistory??!1,additionalLexicalNodes:t.additionalLexicalNodes??[],lexicalEditorNamespace:t.lexicalEditorNamespace??"MDXEditor"}),...t.plugins??[]]},k.createElement(kH,{className:t.className,overlayContainer:t.overlayContainer},k.createElement(yH,null,k.createElement(bH,null))),k.createElement(CH,{mdxRef:e}))),E3=typeof window<"u"&&typeof window.document.createElement<"u",P3=E3&&(()=>{var t;const e=(t=navigator.userAgentData)==null?void 0:t.platform;return e?/mac/i.test(e):/Mac|iPod|iPhone|iPad/.test(navigator.userAgent)})();function _H(t,e){return P3?t:e}const TH={testLexicalNode:Ul,visitLexicalNode:({lexicalNode:t,actions:e})=>{const n=parseInt(t.getTag()[1],10);e.addAndStepInto("heading",{depth:n})}},EH={testNode:"heading",visitNode:function({mdastNode:t,actions:e}){e.addAndStepInto(Bi(`h${t.depth}`))}},PH=["Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6"],A3=[1,2,3,4,5,6],AH={Digit1:1,Digit2:2,Digit3:3,Digit4:4,Digit5:5,Digit6:6},wy=ye(A3,t=>{t.pub(r3,e=>e.registerCommand(wA,n=>{const{code:r,ctrlKey:i,metaKey:s,altKey:o}=n;return PH.includes(r)&&_H(s,i)&&o?(n.preventDefault(),e.update(()=>{if(r==="Digit0")t.pub(c1,()=>St());else{const l=t.getValue(wy),a=AH[r];l.includes(a)&&t.pub(c1,()=>Bi(`h${a}`))}}),!0):!1},dt))}),Tae=dr({init(t){t.pubIn({[Ta]:"headings",[mi]:EH,[fs]:Du,[hs]:TH})},update(t,e){t.pub(wy,(e==null?void 0:e.allowedHeadingLevels)??A3)}});function sk(t,e){return t.getEditorState().read((()=>{const n=ci(e);return n!==null&&n.isSelected()}))}function $3(t){const[e]=hn(),[n,r]=C.useState((()=>sk(e,t)));return C.useEffect((()=>{let i=!0;const s=e.registerUpdateListener((()=>{i&&r(sk(e,t))}));return()=>{i=!1,s()}}),[e,t]),[n,C.useCallback((i=>{e.update((()=>{let s=be();Qt(s)||(s=BD(),yi(s)),Qt(s)&&(i?s.add(t):s.delete(t))}))}),[e,t]),C.useCallback((()=>{e.update((()=>{const i=be();Qt(i)&&i.clear()}))}),[e])]}const Q3=bi("INSERT_HORIZONTAL_RULE_COMMAND");function $H({nodeKey:t}){const[e]=hn(),[n,r,i]=$3(t);return C.useEffect((()=>In(e.registerCommand(ey,(s=>{const o=e.getElementByKey(t);return s.target===o&&(s.shiftKey||i(),r(!n),!0)}),dt))),[i,e,n,t,r]),C.useEffect((()=>{const s=e.getElementByKey(t),o=e._config.theme.hrSelected??"selected";s!==null&&(n?Lr(s,o):Lp(s,o))}),[e,n,t]),null}let Zu=class M3 extends Nu{static getType(){return"horizontalrule"}static clone(e){return new M3(e.__key)}static importJSON(e){return Ea().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:QH,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){const n=document.createElement("hr");return Lr(n,e.theme.hr),n}getTextContent(){return`
114
+ `}isInline(){return!1}updateDOM(){return!1}decorate(){return D.jsx($H,{nodeKey:this.__key})}};function QH(){return{node:Ea()}}function Ea(){return cs(new Zu)}function ky(t){return t instanceof Zu}function MH(){const[t]=hn();return C.useEffect((()=>t.registerCommand(Q3,(e=>{const n=be();if(!Se(n))return!1;if(n.focus.getNode()!==null){const r=Ea();ZA(r)}return!0}),Fe)),[t]),null}const RH={testLexicalNode:ky,visitLexicalNode({actions:t}){t.addAndStepInto("thematicBreak")}},LH={testNode:"thematicBreak",visitNode({actions:t}){t.addAndStepInto(Ea())}},IH=ao(t=>{t.sub(t.pipe(IH,Ct(bt)),([,e])=>{e==null||e.dispatchCommand(Q3,void 0)})}),Eae=dr({init(t){t.pubIn({[Ta]:"thematicBreak",[mi]:LH,[fs]:Zu,[hs]:RH,[il]:MH})}}),NH={testNode:"list",visitNode:function({mdastNode:t,lexicalParent:e,actions:n}){const r=t.children.some(s=>typeof s.checked=="boolean")?"check":t.ordered?"number":"bullet",i=yn(r);if(De(e)){const s=Sn();s.append(i),e.insertAfter(s)}else e.append(i);n.visitChildren(t,i)}},DH={testNode:"listItem",visitNode({mdastNode:t,actions:e,lexicalParent:n}){const r=n.getListType()==="check"?t.checked??!1:void 0;e.addAndStepInto(Sn(r))}},VH={testLexicalNode:Ee,visitLexicalNode:({lexicalNode:t,actions:e})=>{e.addAndStepInto("list",{ordered:t.getListType()==="number",spread:!1})}},FH={testLexicalNode:De,visitLexicalNode:({lexicalNode:t,mdastParent:e,actions:n})=>{const r=t.getChildren(),i=r[0];if(r.length===1&&Ee(i)){const s=e.children.at(-1);s?n.visitChildren(t,s):n.visitChildren(i,e)}else{const s=t.getParent(),o=n.appendToParent(e,{type:"listItem",checked:s.getListType()==="check"?!!t.getChecked():void 0,spread:!1,children:[]});let l=null;for(const a of t.getChildren())tt(a)||Iu(a)||a.isInline()&&(Be(a)||Eo(a))?(l??(l=n.appendToParent(o,{type:"paragraph",children:[]})),n.visit(a,l)):(l=null,n.visit(a,o))}}};function BH(t,e){return In(t.registerCommand(ry,(n=>{const r=be();if(!Se(r))return!1;n.preventDefault();const i=(function(s){const o=s.getNodes();if(RV(o,(h=>Kh(h)&&h.canIndent()?h:null)).length>0)return!0;const l=s.anchor,a=s.focus,c=a.isBefore(l)?a:l,u=c.getNode(),f=BO(u);if(f.canIndent()){const h=f.getKey();let d=Lu();if(d.anchor.set(h,0,"element"),d.focus.set(h,0,"element"),d=Jh(d),d.anchor.is(c))return!0}return!1})(r)?n.shiftKey?VO:td:OA;return t.dispatchCommand(i,void 0)}),Fe),t.registerCommand(td,(()=>{if(e==null)return!1;const n=be();if(!Se(n))return!1;const r=n.getNodes().map((i=>BO(i).getIndent()));return Math.max(...r)+1>=e}),es))}function ok({maxIndent:t}){const[e]=hn();return C.useEffect((()=>BH(e,t)),[e,t]),null}function lk(){const[t]=hn();return C.useEffect((()=>uH(t)),[t]),null}function ak({hasStrictIndent:t=!1}){const[e]=hn();return C.useEffect((()=>{if(!e.hasNodes([Os,ms]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[e]),C.useEffect((()=>{if(t)return dH(e)}),[e,t]),(function(n){C.useEffect((()=>hH(n)),[n])})(e),null}const ZH={name:"tasklistCheck",tokenize:XH};function zH(){return{text:{91:ZH}}}function XH(t,e,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(a),t.exit("taskListCheckMarker"),s)}function s(a){return yt(a)?(t.enter("taskListCheckValueUnchecked"),t.consume(a),t.exit("taskListCheckValueUnchecked"),o):a===88||a===120?(t.enter("taskListCheckValueChecked"),t.consume(a),t.exit("taskListCheckValueChecked"),o):n(a)}function o(a){return a===93?(t.enter("taskListCheckMarker"),t.consume(a),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),l):n(a)}function l(a){return we(a)?e(a):Ve(a)?t.check({tokenize:WH},e,n)(a):n(a)}}function WH(t,e,n){return He(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function jH(){return{exit:{taskListCheckValueChecked:ck,taskListCheckValueUnchecked:ck,paragraph:qH}}}function HH(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:YH}}}function ck(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function qH(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=e.children;let s=-1,o;for(;++s<i.length;){const l=i[s];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function YH(t,e,n,r){const i=t.children[0],s=typeof t.checked=="boolean"&&i&&i.type==="paragraph",o="["+(t.checked?"x":" ")+"] ",l=n.createTracker(r);s&&l.move(o);let a=uy.listItem(t,e,n,{...r,...l.current()});return s&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),a;function c(u){return u+o}}const UH=new Map([["number",k3],["bullet",w3],["check",v3],["",C3]]),uk=ye("",t=>{t.sub(t.pipe(Gl,Ct(bt)),([e,n])=>{if(!e||!n)return;const r=e.anchor.getNode();let i=r.getKey()==="root"?r:$r(r,l=>{const a=l.getParent();return a!==null&&ar(a)});i??(i=r.getTopLevelElementOrThrow());const s=i.getKey();if(n.getElementByKey(s)!==null)if(Ee(i)){const l=BA(r,Os),a=l?l.getListType():i.getListType();t.pub(uk,a)}else t.pub(uk,"")})}),GH=Pt(t=>{t.sub(t.pipe(GH,Ct(bt)),([e,n])=>{n==null||n.dispatchCommand(UH.get(e),void 0)})}),Pae=dr({init(t){var e;(e=t.getValue(us))==null||e.registerCommand(td,()=>!JH(7),es),t.pubIn({[Ta]:"lists",[cd]:jH(),[ad]:zH(),[mi]:[NH,DH],[fs]:[ms,Os],[hs]:[VH,FH],[Oy]:HH(),[il]:[ok,ak,lk],[by]:[ok,ak,lk]})}});function KH(t){const e=t.getNodes();return e.length===0?new Set([t.anchor.getNode().getParentOrThrow(),t.focus.getNode().getParentOrThrow()]):new Set(e.map(n=>Be(n)?n:n.getParentOrThrow()))}function JH(t){const e=be();if(!Se(e))return!1;const n=KH(e);let r=0;for(const i of n)if(Ee(i))r=Math.max(Gc(i)+1,r);else if(De(i)){const s=i.getParent();if((s==null?void 0:s.getChildren().length)===1){const o=s.getParent();if(De(o)&&o.getChildren().length===1)return!1}if(!Ee(s))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(Gc(s)+1,r)}return r<=t}function eq(t){return t.length}function tq(t,e){const n=e||{},r=(n.align||[]).concat(),i=n.stringLength||eq,s=[],o=[],l=[],a=[];let c=0,u=-1;for(;++u<t.length;){const g=[],O=[];let x=-1;for(t[u].length>c&&(c=t[u].length);++x<t[u].length;){const m=nq(t[u][x]);if(n.alignDelimiters!==!1){const y=i(m);O[x]=y,(a[x]===void 0||y>a[x])&&(a[x]=y)}g.push(m)}o[u]=g,l[u]=O}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)s[f]=fk(r[f]);else{const g=fk(r);for(;++f<c;)s[f]=g}f=-1;const h=[],d=[];for(;++f<c;){const g=s[f];let O="",x="";g===99?(O=":",x=":"):g===108?O=":":g===114&&(x=":");let m=n.alignDelimiters===!1?1:Math.max(1,a[f]-O.length-x.length);const y=O+"-".repeat(m)+x;n.alignDelimiters!==!1&&(m=O.length+m+x.length,m>a[f]&&(a[f]=m),d[f]=m),h[f]=y}o.splice(1,0,h),l.splice(1,0,d),u=-1;const p=[];for(;++u<o.length;){const g=o[u],O=l[u];f=-1;const x=[];for(;++f<c;){const m=g[f]||"";let y="",b="";if(n.alignDelimiters!==!1){const S=a[f]-(O[f]||0),v=s[f];v===114?y=" ".repeat(S):v===99?S%2?(y=" ".repeat(S/2+.5),b=" ".repeat(S/2-.5)):(y=" ".repeat(S/2),b=y):b=" ".repeat(S)}n.delimiterStart!==!1&&!f&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&m==="")&&(n.delimiterStart!==!1||f)&&x.push(" "),n.alignDelimiters!==!1&&x.push(y),x.push(m),n.alignDelimiters!==!1&&x.push(b),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&x.push("|")}p.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return p.join(`
115
+ `)}function nq(t){return t==null?"":String(t)}function fk(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function rq(){return{enter:{table:iq,tableData:hk,tableHeader:hk,tableRow:oq},exit:{codeText:lq,table:sq,tableData:Hg,tableHeader:Hg,tableRow:Hg}}}function iq(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function sq(t){this.exit(t),this.data.inTable=void 0}function oq(t){this.enter({type:"tableRow",children:[]},t)}function Hg(t){this.exit(t)}function hk(t){this.enter({type:"tableCell",children:[]},t)}function lq(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,aq));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function aq(t,e){return e==="|"?e:t}function cq(t){const e=t||{},n=e.tableCellPadding,r=e.tablePipeAlign,i=e.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
116
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:a,tableRow:l}};function o(d,p,g,O){return c(u(d,g,O),d.align)}function l(d,p,g,O){const x=f(d,g,O),m=c([x]);return m.slice(0,m.indexOf(`
117
+ `))}function a(d,p,g,O){const x=g.enter("tableCell"),m=g.enter("phrasing"),y=g.containerPhrasing(d,{...O,before:s,after:s});return m(),x(),y}function c(d,p){return tq(d,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function u(d,p,g){const O=d.children;let x=-1;const m=[],y=p.enter("table");for(;++x<O.length;)m[x]=f(O[x],p,g);return y(),m}function f(d,p,g){const O=d.children;let x=-1;const m=[],y=p.enter("tableRow");for(;++x<O.length;)m[x]=a(O[x],d,p,g);return y(),m}function h(d,p,g){let O=uy.inlineCode(d,p,g);return g.stack.includes("tableCell")&&(O=O.replace(/\|/g,"\\$&")),O}}class uq{constructor(){this.map=[]}add(e,n,r){fq(this,e,n,r)}consume(e){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push(e.slice()),e.length=0;let i=r.pop();for(;i;){for(const s of i)e.push(s);i=r.pop()}this.map.length=0}}function fq(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function hq(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function dq(){return{flow:{null:{name:"table",tokenize:pq,resolveAll:gq}}}}function pq(t,e,n){const r=this;let i=0,s=0,o;return l;function l(E){let L=r.events.length-1;for(;L>-1;){const V=r.events[L][1].type;if(V==="lineEnding"||V==="linePrefix")L--;else break}const M=L>-1?r.events[L][1].type:null,$=M==="tableHead"||M==="tableRow"?v:a;return $===v&&r.parser.lazy[r.now().line]?n(E):$(E)}function a(E){return t.enter("tableHead"),t.enter("tableRow"),c(E)}function c(E){return E===124||(o=!0,s+=1),u(E)}function u(E){return E===null?n(E):we(E)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),d):n(E):Ve(E)?He(t,u,"whitespace")(E):(s+=1,o&&(o=!1,i+=1),E===124?(t.enter("tableCellDivider"),t.consume(E),t.exit("tableCellDivider"),o=!0,u):(t.enter("data"),f(E)))}function f(E){return E===null||E===124||yt(E)?(t.exit("data"),u(E)):(t.consume(E),E===92?h:f)}function h(E){return E===92||E===124?(t.consume(E),f):f(E)}function d(E){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(E):(t.enter("tableDelimiterRow"),o=!1,Ve(E)?He(t,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):p(E))}function p(E){return E===45||E===58?O(E):E===124?(o=!0,t.enter("tableCellDivider"),t.consume(E),t.exit("tableCellDivider"),g):S(E)}function g(E){return Ve(E)?He(t,O,"whitespace")(E):O(E)}function O(E){return E===58?(s+=1,o=!0,t.enter("tableDelimiterMarker"),t.consume(E),t.exit("tableDelimiterMarker"),x):E===45?(s+=1,x(E)):E===null||we(E)?b(E):S(E)}function x(E){return E===45?(t.enter("tableDelimiterFiller"),m(E)):S(E)}function m(E){return E===45?(t.consume(E),m):E===58?(o=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(E),t.exit("tableDelimiterMarker"),y):(t.exit("tableDelimiterFiller"),y(E))}function y(E){return Ve(E)?He(t,b,"whitespace")(E):b(E)}function b(E){return E===124?p(E):E===null||we(E)?!o||i!==s?S(E):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(E)):S(E)}function S(E){return n(E)}function v(E){return t.enter("tableRow"),w(E)}function w(E){return E===124?(t.enter("tableCellDivider"),t.consume(E),t.exit("tableCellDivider"),w):E===null||we(E)?(t.exit("tableRow"),e(E)):Ve(E)?He(t,w,"whitespace")(E):(t.enter("data"),_(E))}function _(E){return E===null||E===124||yt(E)?(t.exit("data"),w(E)):(t.consume(E),E===92?T:_)}function T(E){return E===92||E===124?(t.consume(E),_):_(E)}}function gq(t,e){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],l=!1,a=0,c,u,f;const h=new uq;for(;++n<t.length;){const d=t[n],p=d[1];d[0]==="enter"?p.type==="tableHead"?(l=!1,a!==0&&(dk(h,e,a,c,u),u=void 0,a=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",c,e]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,f=void 0,s=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",u,e]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],f=Sf(h,e,s,i,void 0,f),s=[0,0,0,0]),o[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],f=Sf(h,e,s,i,void 0,f)),s=o,o=[s[1],n,0,0])):p.type==="tableHead"?(l=!0,a=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(a=n,s[1]!==0?(o[0]=o[1],f=Sf(h,e,s,i,n,f)):o[1]!==0&&(f=Sf(h,e,o,i,n,f)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(o[3]=n)}for(a!==0&&dk(h,e,a,c,u),h.consume(e.events),n=-1;++n<e.events.length;){const d=e.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=hq(e.events,n))}return t}function Sf(t,e,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(s.end=Object.assign({},ml(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const a=ml(e.events,n[1]);if(s={type:o,start:Object.assign({},a),end:Object.assign({},a)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const c=ml(e.events,n[2]),u=ml(e.events,n[3]),f={type:l,start:Object.assign({},c),end:Object.assign({},u)};if(t.add(n[2],0,[["enter",f,e]]),r!==2){const h=e.events[n[2]],d=e.events[n[3]];if(h[1].end=Object.assign({},d[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,g=n[3]-n[2]-1;t.add(p,g,[])}}t.add(n[3]+1,0,[["exit",f,e]])}return i!==void 0&&(s.end=Object.assign({},ml(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function dk(t,e,n,r,i){const s=[],o=ml(e.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,e])),r.end=Object.assign({},o),s.push(["exit",r,e]),t.add(n+1,0,s)}function ml(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const pk=[["Cat","rgb(125, 50, 0)"],["Dog","rgb(100, 0, 0)"],["Rabbit","rgb(150, 0, 0)"],["Frog","rgb(200, 0, 0)"],["Fox","rgb(200, 75, 0)"],["Hedgehog","rgb(0, 75, 0)"],["Pigeon","rgb(0, 125, 0)"],["Squirrel","rgb(75, 100, 0)"],["Bear","rgb(125, 100, 0)"],["Tiger","rgb(0, 0, 150)"],["Leopard","rgb(0, 0, 200)"],["Zebra","rgb(0, 0, 250)"],["Wolf","rgb(0, 100, 150)"],["Owl","rgb(0, 100, 100)"],["Gull","rgb(100, 0, 100)"],["Squid","rgb(150, 0, 150)"]],gk=pk[Math.floor(Math.random()*pk.length)],mq=C.createContext({clientID:0,color:gk[1],isCollabActive:!1,name:gk[0],yjsDocMap:new Map});function Oq(t,e){return C.useContext(mq)}function mk(t){const e=new Set,{ownNodeConfig:n}=yV(t),r=t.transform();if(n){const i=n.$transform;i&&e.add(i)}return r&&e.add(r),e}function xq({initialEditor:t,children:e,initialNodes:n,initialTheme:r,skipCollabChecks:i,skipEditableListener:s}){const o=C.useRef(!1),l=C.useContext(Ih);l==null&&(function(p,...g){const O=new URL("https://lexical.dev/docs/error"),x=new URLSearchParams;x.append("code",p);for(const m of g)x.append("v",m);throw O.search=x.toString(),Error(`Minified Lexical error #${p}; visit ${O.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(9);const[a,{getTheme:c}]=l,u=C.useMemo((()=>{const p=r||c()||void 0,g=vE(l,p);p!==void 0&&(t._config.theme=p),t._parentEditor=t._parentEditor||a;const O=t._createEditorArgs,x=O&&O.namespace;if(n){x||(t._config.namespace=a._config.namespace);for(let m of n){let y=null,b=null;if(typeof m!="function"){const v=m;m=v.replace,y=v.with,b=v.withKlass||null}const S=PA(t,m.getType());t._nodes.set(m.getType(),{exportDOM:S?S.exportDOM:void 0,klass:m,replace:y,replaceWithKlass:b,sharedNodeState:LS(m),transforms:mk(m)})}}else if(O&&O.nodes)x||(t._config.namespace=a._config.namespace);else{const m=t._nodes=new Map(a._nodes);x||(t._config.namespace=a._config.namespace);for(const[y,b]of m)t._nodes.set(y,{exportDOM:b.exportDOM,klass:b.klass,replace:b.replace,replaceWithKlass:b.replaceWithKlass,sharedNodeState:LS(b.klass),transforms:mk(b.klass)})}return[t,g]}),[]),{isCollabActive:f,yjsDocMap:h}=Oq(),d=i||o.current||h.has(t.getKey());return C.useEffect((()=>{d&&(o.current=!0)}),[d]),C.useEffect((()=>{if(!s){const p=g=>t.setEditable(g);return p(a.isEditable()),a.registerEditableListener(p)}}),[t,a,s]),D.jsx(Ih.Provider,{value:u,children:!f||d?e:null})}function R3(t,e){return t===null||t===e?!1:t.dataset.editorDialog!==void 0||t.dataset.toolbarItem!==void 0||t.dataset.editorDropdown?!0:R3(t.parentElement,e)}function yq(){const t=[...Array(256).keys()].map(n=>n.toString(16).padStart(2,"0")),e=crypto.getRandomValues(new Uint8Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,[...e.entries()].map(([n,r])=>[4,6,8,10].includes(n)?`-${t[r]}`:t[r]).join("")}const L3=t=>t===0?"th":"td",I3={center:re.centeredCell,left:re.leftAlignedCell,right:re.rightAlignedCell},bq=({mdastNode:t,parentEditor:e,lexicalTable:n})=>{const[r,i]=k.useState(null),[s,o]=Fr(ds,Ir),l=k.useMemo(()=>g=>(g.__cacheKey??(g.__cacheKey=yq()),g.__cacheKey),[]),a=k.useCallback(g=>{const O=n.getColCount();if(g===null){i(null);return}let[x,m]=g;if(x>O-1&&(x=0,m++),x<0&&(x=O-1,m-=1),m>n.getRowCount()-1){i(null),e.update(()=>{if(n.getLatest().getNextSibling())n.getLatest().selectNext();else{const b=St();n.insertAfter(b),b.select()}});return}if(m<0){i(null),e.update(()=>{n.getLatest().selectPrevious()});return}i([x,m])},[n,e]);k.useEffect(()=>{n.focusEmitter.subscribe(a)},[n,a]);const c=k.useCallback(g=>{g.preventDefault(),e.update(()=>{n.addRowToBottom(),i([0,n.getRowCount()])})},[e,n]),u=k.useCallback(g=>{g.preventDefault(),e.update(()=>{n.addColumnToRight(),i([n.getColCount(),0])})},[e,n]),[f,h]=k.useState([-1,-1]),d=k.useCallback(g=>{let O=g.target;for(;O&&!["TH","TD"].includes(O.tagName);){if(O===g.currentTarget)return;O=O.parentElement}if(O===null)return;const x=O.parentElement,y=x.parentElement.tagName==="TFOOT"?-1:Array.from(x.children).indexOf(O),b=O.tagName==="TH"?-1:Array.from(x.parentElement.children).indexOf(x);h([y,b])},[]),p=ps();return k.createElement("table",{className:re.tableEditor,onMouseOver:d,onMouseLeave:()=>{h([-1,-1])}},k.createElement("colgroup",null,o?null:k.createElement("col",null),Array.from({length:t.children[0].children.length},(g,O)=>{const m=(t.align??[])[O]??"left",y=I3[m];return k.createElement("col",{key:O,className:y})}),o?null:k.createElement("col",null)),o||k.createElement("thead",null,k.createElement("tr",null,k.createElement("th",{className:re.tableToolsColumn}),Array.from({length:t.children[0].children.length},(g,O)=>k.createElement("th",{key:O,"data-tool-cell":!0},k.createElement(wq,{setActiveCellWithBoundaries:a,parentEditor:e,colIndex:O,highlightedCoordinates:f,lexicalTable:n,align:(t.align??[])[O]}))),k.createElement("th",{className:re.tableToolsColumn,"data-tool-cell":!0},k.createElement("button",{className:re.iconButton,type:"button",title:p("table.deleteTable","Delete table"),onClick:g=>{g.preventDefault(),e.update(()=>{n.selectNext(),n.remove()})}},s("delete_small"))))),k.createElement("tbody",null,t.children.map((g,O)=>{const x=L3(O);return k.createElement("tr",{key:O},o||k.createElement(x,{className:re.toolCell,"data-tool-cell":!0},k.createElement(kq,{setActiveCellWithBoundaries:a,parentEditor:e,rowIndex:O,highlightedCoordinates:f,lexicalTable:n})),g.children.map((m,y)=>{var b;return k.createElement(vq,{align:(b=t.align)==null?void 0:b[y],key:l(m),contents:m.children,setActiveCell:a,rowIndex:O,colIndex:y,lexicalTable:n,parentEditor:e,activeCell:o?[-1,-1]:r})}),o||O===0&&k.createElement("th",{rowSpan:n.getRowCount(),"data-tool-cell":!0},k.createElement("button",{type:"button",className:re.addColumnButton,onClick:u},s("add_column"))))})),o||k.createElement("tfoot",null,k.createElement("tr",null,k.createElement("th",null),k.createElement("th",{colSpan:n.getColCount()},k.createElement("button",{type:"button",className:re.addRowButton,onClick:c},s("add_row"))),k.createElement("th",null))))},vq=({align:t,...e})=>{const{activeCell:n,setActiveCell:r}=e,i=!!(n&&n[0]===e.colIndex&&n[1]===e.rowIndex),s=I3[t??"left"],o=L3(e.rowIndex);return k.createElement(o,{className:s,"data-active":i,onClick:()=>{r([e.colIndex,e.rowIndex])}},k.createElement(Sq,{...e,focus:i}))},Sq=({focus:t,setActiveCell:e,parentEditor:n,lexicalTable:r,contents:i,colIndex:s,rowIndex:o})=>{const[l,a,c,u,f,h,d,p,g]=Fr(dy,Zp,py,zp,Y$,Bu,my,us,a3),[O]=k.useState(()=>{const m=TA({nodes:c,theme:Fp,namespace:"TableCellEditor"});return m.update(()=>{X$({root:rn(),mdastRoot:{type:"root",children:[{type:"paragraph",children:i}]},visitors:l,jsxComponentDescriptors:u,directiveDescriptors:f,codeBlockEditorDescriptors:h})}),m}),x=k.useCallback(m=>{O.getEditorState().read(()=>{const y=A$({root:rn(),jsxComponentDescriptors:u,visitors:a,jsxIsAvailable:d});n.update(()=>{r.updateCellContents(s,o,y.children[0].children)},{discrete:!0}),n.dispatchCommand(jc,void 0)}),e(m)},[s,O,a,u,d,r,n,o,e]);return k.useEffect(()=>In(O.registerCommand(ry,m=>{m.preventDefault();const y=m.shiftKey?[s-1,o]:[s+1,o];return x(y),!0},es),O.registerCommand(gA,()=>(e([s,o]),!1),dt),O.registerCommand(ny,m=>{m==null||m.preventDefault();const y=m!=null&&m.shiftKey?[s,o-1]:[s,o+1];return x(y),!0},es),O.registerCommand(fA,m=>{const y=m.relatedTarget;return R3(y,p.getRootElement())?!1:(x(null),!0)},Fe),O.registerCommand(jc,()=>(x(null),!0),Fe)),[s,O,p,o,x,e]),k.useEffect(()=>{t&&O.focus()},[t,O]),k.createElement(xq,{initialEditor:O},k.createElement(m3,{contentEditable:k.createElement(p3,null),placeholder:k.createElement("div",null),ErrorBoundary:g3}),g.map((m,y)=>k.createElement(m,{key:y})),k.createElement(XA,null))},wq=({parentEditor:t,highlightedCoordinates:e,align:n,lexicalTable:r,colIndex:i,setActiveCellWithBoundaries:s})=>{const[o,l]=Fr(rl,ds),a=k.useCallback(h=>{t.update(()=>{r.insertColumnAt(h)}),s([h,0])},[t,r,s]),c=k.useCallback(h=>{t.update(()=>{r.deleteColumnAt(h)})},[t,r]),u=k.useCallback((h,d)=>{t.update(()=>{r.setColumnAlign(h,d)})},[t,r]),f=ps();return k.createElement(J0,null,k.createElement(lp,{className:re.tableColumnEditorTrigger,"data-active":e[0]===i+1,title:f("table.columnMenu","Column menu")},l("more_horiz")),k.createElement(ex,{container:o==null?void 0:o.current},k.createElement(ap,{className:it(re.tableColumnEditorPopoverContent),onOpenAutoFocus:h=>{h.preventDefault()},sideOffset:5,side:"top"},k.createElement(tE,{className:re.tableColumnEditorToolbar},k.createElement(G6,{className:re.toggleGroupRoot,onValueChange:h=>{u(i,h)},value:n??"left",type:"single","aria-label":f("table.textAlignment","Text alignment")},k.createElement(bg,{value:"left",title:f("table.alignLeft","Align left")},l("format_align_left")),k.createElement(bg,{value:"center",title:f("table.alignCenter","Align center")},l("format_align_center")),k.createElement(bg,{value:"right",title:f("table.alignRight","Align right")},l("format_align_right"))),k.createElement(U6,null),k.createElement(Tl,{onClick:a.bind(null,i),title:f("table.insertColumnLeft","Insert a column to the left of this one")},l("insert_col_left")),k.createElement(Tl,{onClick:a.bind(null,i+1),title:f("table.insertColumnRight","Insert a column to the right of this one")},l("insert_col_right")),k.createElement(Tl,{onClick:c.bind(null,i),title:f("table.deleteColumn","Delete this column")},l("delete_small"))),k.createElement(tx,{className:re.popoverArrow}))))},kq=({parentEditor:t,highlightedCoordinates:e,lexicalTable:n,rowIndex:r,setActiveCellWithBoundaries:i})=>{const[s,o]=Fr(rl,ds),l=k.useCallback(u=>{t.update(()=>{n.insertRowAt(u)}),i([0,u])},[t,n,i]),a=k.useCallback(u=>{t.update(()=>{n.deleteRowAt(u)})},[t,n]),c=ps();return k.createElement(J0,null,k.createElement(lp,{className:re.tableColumnEditorTrigger,"data-active":e[1]===r,title:c("table.rowMenu","Row menu")},o("more_horiz")),k.createElement(ex,{container:s==null?void 0:s.current},k.createElement(ap,{className:it(re.tableColumnEditorPopoverContent),onOpenAutoFocus:u=>{u.preventDefault()},sideOffset:5,side:"bottom"},k.createElement(tE,{className:re.tableColumnEditorToolbar},k.createElement(Tl,{onClick:l.bind(null,r),title:c("table.insertRowAbove","Insert a row above this one")},o("insert_row_above")),k.createElement(Tl,{onClick:l.bind(null,r+1),title:c("table.insertRowBelow","Insert a row below this one")},o("insert_row_below")),k.createElement(Tl,{onClick:a.bind(null,r),title:c("table.deleteRow","Delete this row")},o("delete_small"))),k.createElement(tx,{className:re.popoverArrow}))))};var Cq=Object.defineProperty,_q=(t,e,n)=>e in t?Cq(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ok=(t,e,n)=>(_q(t,typeof e!="symbol"?e+"":e,n),n);const xk={type:"tableCell",children:[]};function Tq(){let t=Ls;return{publish:e=>{t(e)},subscribe:e=>{t=e}}}class Pa extends Nu{constructor(e,n){super(n),Ok(this,"__mdastNode"),Ok(this,"focusEmitter",Tq()),this.__mdastNode=e??{type:"table",children:[]}}static getType(){return"table"}static clone(e){return new Pa(structuredClone(e.__mdastNode),e.__key)}static importJSON(e){return Cy(e.mdastNode)}static importDOM(){return{table:()=>({conversion:Pq,priority:3})}}exportJSON(){return{mdastNode:structuredClone(this.__mdastNode),type:"table",version:1}}getMdastNode(){return this.__mdastNode}getRowCount(){return this.__mdastNode.children.length}getColCount(){var e;return((e=this.__mdastNode.children[0])==null?void 0:e.children.length)||0}createDOM(){return document.createElement("div")}updateDOM(){return!1}updateCellContents(e,n,r){const s=this.getWritable().__mdastNode,o=s.children[n],l=o.children,a=l[e],c=Array.from(l),u={...a,children:r},f={...o,children:c};c[e]=u,s.children[n]=f}insertColumnAt(e){const r=this.getWritable().__mdastNode;for(let i=0;i<r.children.length;i++){const s=r.children[i],o=s.children,l=Array.from(o),a={...s,children:l};l.splice(e,0,structuredClone(xk)),r.children[i]=a}r.align&&r.align.length>0&&r.align.splice(e,0,"left")}deleteColumnAt(e){const r=this.getWritable().__mdastNode;for(let i=0;i<r.children.length;i++){const s=r.children[i],o=s.children,l=Array.from(o),a={...s,children:l};l.splice(e,1),r.children[i]=a}}insertRowAt(e){const r=this.getWritable().__mdastNode,i={type:"tableRow",children:Array.from({length:this.getColCount()},()=>structuredClone(xk))};r.children.splice(e,0,i)}deleteRowAt(e){this.getRowCount()===1?(this.selectNext(),this.remove()):this.getWritable().__mdastNode.children.splice(e,1)}addRowToBottom(){this.insertRowAt(this.getRowCount())}addColumnToRight(){this.insertColumnAt(this.getColCount())}setColumnAlign(e,n){const i=this.getWritable().__mdastNode;i.align??(i.align=[]),i.align[e]=n}decorate(e){return k.createElement(bq,{lexicalTable:this,mdastNode:this.__mdastNode,parentEditor:e})}select(e){this.focusEmitter.publish(e??[0,0])}isInline(){return!1}}function Eq(t){return t instanceof Pa}function Cy(t){return new Pa(t)}function Pq(t){const e=t.querySelectorAll("tr"),n=Array.from(e).map(r=>({type:"tableRow",children:Array.from(r.querySelectorAll("td, th")).map(i=>({type:"tableCell",children:[{type:"text",value:i.textContent}]}))}));return{node:new Pa({type:"table",children:n})}}const Aq={testLexicalNode:Eq,visitLexicalNode({actions:t,mdastParent:e,lexicalNode:n}){t.appendToParent(e,n.getMdastNode())}},$q={testNode:"table",visitNode({mdastNode:t,lexicalParent:e}){e.append(Cy(t))}};function Qq(t=1,e=1){const n={type:"table",children:[]};for(let r=0;r<t;r++){const i={type:"tableRow",children:[]};for(let s=0;s<e;s++){const o={type:"tableCell",children:[]};i.children.push(o)}n.children.push(i)}return n}const Mq=Pt(t=>{t.link(t.pipe(Mq,Zs(({rows:e,columns:n})=>()=>Cy(Qq(e,n)))),vy)}),Aae=dr({init(t,e){t.pubIn({[cd]:rq(),[ad]:dq(),[mi]:$q,[fs]:Pa,[hs]:Aq,[Oy]:cq({tableCellPadding:(e==null?void 0:e.tableCellPadding)??!0,tablePipeAlign:(e==null?void 0:e.tablePipeAlign)??!0})})}}),Rq={testNode:"link",visitNode({mdastNode:t,actions:e}){e.addAndStepInto(rs(t.url,{title:t.title}))}},Lq={testLexicalNode:Tn,visitLexicalNode:({lexicalNode:t,actions:e})=>{e.addAndStepInto("link",{url:t.getURL(),title:t.getTitle()})}};function Iq({validateUrl:t,attributes:e}){const[n]=hn();return C.useEffect((()=>{if(!n.hasNodes([gs]))throw new Error("LinkPlugin: LinkNode not registered on editor");return In(n.registerCommand(Kl,(r=>{if(r===null)return jg(r),!0;if(typeof r=="string")return!(t!==void 0&&!t(r))&&(jg(r,e),!0);{const{url:i,target:s,rel:o,title:l}=r;return jg(i,{...e,rel:o,target:s,title:l}),!0}}),dt),t!==void 0?n.registerCommand(iy,(r=>{const i=be();if(!Se(i)||i.isCollapsed()||!As(r,ClipboardEvent)||r.clipboardData===null)return!1;const s=r.clipboardData.getData("text");return!!t(s)&&!i.getNodes().some((o=>Be(o)))&&(n.dispatchCommand(Kl,{...e,url:s}),r.preventDefault(),!0)}),dt):()=>{})}),[n,t,e]),null}function yk(t,e=(n=>n)){return n=>{const r=t.exec(n);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:e(r[0])}}}function N3(t,e){for(let n=0;n<e.length;n++){const r=e[n](t);if(r)return r}return null}const Nq=/[.,;\s]/;function fd(t){return Nq.test(t)}function D3(t){return fd(t[t.length-1])}function m1(t){return fd(t[0])}function V3(t){let e=t.getPreviousSibling();return Be(e)&&(e=e.getLastDescendant()),e===null||Iu(e)||tt(e)&&D3(e.getTextContent())}function F3(t){let e=t.getNextSibling();return Be(e)&&(e=e.getFirstDescendant()),e===null||Iu(e)||tt(e)&&m1(e.getTextContent())}function Dq(t,e,n,r){return(t>0?fd(n[t-1]):V3(r[0]))?e<n.length?fd(n[e]):F3(r[r.length-1]):!1}function Vq(t,e,n){const r=[],i=[],s=[];let o=0,l=0;const a=[...t];for(;a.length>0;){const c=a[0],u=c.getTextContent().length,f=l;l+u<=e?(r.push(c),o+=u):f>=n?s.push(c):i.push(c),l+=u,a.shift()}return[o,r,i,s]}function Fq(t,e,n,r){const i=h1(r.url,r.attributes);if(t.length===1){let s,o=t[0];e===0?[s,o]=o.splitText(n):[,s,o]=o.splitText(e,n);const l=pi(r.text);return l.setFormat(s.getFormat()),l.setDetail(s.getDetail()),l.setStyle(s.getStyle()),i.append(l),s.replace(i),o}if(t.length>1){const s=t[0];let o,l=s.getTextContent().length;e===0?o=s:[,o]=s.splitText(e);const a=[];let c;for(let d=1;d<t.length;d++){const p=t[d],g=p.getTextContent().length,O=l;if(O<n)if(l+g<=n)a.push(p);else{const[x,m]=p.splitText(n-O);a.push(x),c=m}l+=g}const u=be(),f=u?u.getNodes().find(tt):void 0,h=pi(o.getTextContent());return h.setFormat(o.getFormat()),h.setDetail(o.getDetail()),h.setStyle(o.getStyle()),i.append(h,...a),f&&f===o&&(Se(u)?h.select(u.anchor.offset,u.focus.offset):Qt(u)&&h.select(0,h.getTextContent().length)),o.replace(i),c}}function qg(t,e,n){const r=t.getChildren(),i=r.length;for(let a=0;a<i;a++){const c=r[a];if(!tt(c)||!c.isSimpleText())return Oh(t),void n(null,t.getURL())}const s=t.getTextContent(),o=N3(s,e);if(o===null||o.text!==s||!V3(t)||!F3(t))return Oh(t),void n(null,t.getURL());const l=t.getURL();if(l!==o.url&&(t.setURL(o.url),n(o.url,l)),o.attributes){const a=t.getRel();a!==o.attributes.rel&&(t.setRel(o.attributes.rel||null),n(o.attributes.rel||null,a));const c=t.getTarget();c!==o.attributes.target&&(t.setTarget(o.attributes.target||null),n(o.attributes.target||null,c))}}function Oh(t){const e=t.getChildren();for(let n=e.length-1;n>=0;n--)t.insertAfter(e[n]);return t.remove(),e.map((n=>n.getLatest()))}function Bq(t,e,n){C.useEffect((()=>{t.hasNodes([Xp])||(function(i,...s){const o=new URL("https://lexical.dev/docs/error"),l=new URLSearchParams;l.append("code",i);for(const a of s)l.append("v",a);throw o.search=l.toString(),Error(`Minified Lexical error #${i}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(77);const r=(i,s)=>{n&&n(i,s)};return In(t.registerNodeTransform(Mp,(i=>{const s=i.getParentOrThrow(),o=i.getPreviousSibling();if(Sr(s)&&!s.getIsUnlinked())qg(s,e,r);else if(!Tn(s)){if(i.isSimpleText()&&(m1(i.getTextContent())||!Sr(o))){const l=(function(a){const c=[a];let u=a.getNextSibling();for(;u!==null&&tt(u)&&u.isSimpleText()&&(c.push(u),!/[\s]/.test(u.getTextContent()));)u=u.getNextSibling();return c})(i);(function(a,c,u){let f=[...a];const h=f.map((O=>O.getTextContent())).join("");let d,p=h,g=0;for(;(d=N3(p,c))&&d!==null;){const O=d.index,x=O+d.length;if(Dq(g+O,g+x,h,f)){const[m,,y,b]=Vq(f,g+O,g+x),S=Fq(y,g+O-m,g+x-m,d);f=S?[S,...b]:b,u(d.url,null),g=0}else g+=x;p=p.substring(x)}})(l,e,r)}(function(l,a,c){const u=l.getPreviousSibling(),f=l.getNextSibling(),h=l.getTextContent();var d;!Sr(u)||u.getIsUnlinked()||m1(h)&&(d=h,!(u.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(d):/^\.[a-zA-Z0-9]{1,}/.test(d)))||(u.append(l),qg(u,a,c),c(null,u.getURL())),!Sr(f)||f.getIsUnlinked()||D3(h)||(Oh(f),qg(f,a,c),c(null,f.getURL()))})(i,e,r)}})),t.registerCommand(Kl,(i=>{const s=be();return i!==null||!Se(s)||s.extract().forEach((o=>{const l=o.getParent();Sr(l)&&(l.setIsUnlinked(!l.getIsUnlinked()),l.markDirty())})),!1}),dt))}),[t,e,n])}function Zq({matchers:t,onChange:e}){const[n]=hn();return Bq(n,t,e),null}const zq=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,Xq=/(([^<>()[\]\\.,;:\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,}))/,Wq=[yk(zq,t=>t.startsWith("http")?t:`https://${t}`),yk(Xq,t=>`mailto:${t}`)],jq=()=>k.createElement(Zq,{matchers:Wq}),Hq=ye(!1),$ae=dr({init(t,e){const n=!!(e!=null&&e.disableAutoLink),r=e!=null&&e.validateUrl?{validateUrl:e.validateUrl}:{},i=()=>k.createElement(k.Fragment,null,k.createElement(Iq,{...r}),n?null:k.createElement(jq,null));t.pubIn({[Ta]:"link",[mi]:Rq,[fs]:[gs,Xp],[hs]:Lq,[Hq]:n,[by]:i,[c3]:i,[il]:i})}});function qq(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Yq=["color"],Uq=C.forwardRef(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=qq(t,Yq);return C.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),C.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"}))});const bk=()=>k.createElement("div",{className:re.imagePlaceholder},k.createElement(Uq,null));function O1(t){const{nodeKey:e,imageSource:n,initialImagePath:r,title:i,alt:s,width:o,height:l}=t,[a,c,u]=Fr(yQ,ds,Ir),[f]=hn(),h=Hn(OQ),d=ps();return k.createElement("div",{className:re.editImageToolbar},k.createElement("button",{className:re.iconButton,type:"button",title:d("imageEditor.deleteImage","Delete image"),disabled:u,onClick:p=>{p.preventDefault(),f.update(()=>{var g;(g=ci(e))==null||g.remove()})}},c("delete_small")),!a&&k.createElement("button",{type:"button",className:it(re.iconButton,re.editImageButton),title:d("imageEditor.editImage","Edit image"),disabled:u,onClick:()=>{h({nodeKey:e,initialValues:{src:r??n,title:i,altText:s,width:Jl(o),height:Jl(l)}})}},c("settings")))}var zu=t=>t.type==="checkbox",wo=t=>t instanceof Date,_n=t=>t==null;const B3=t=>typeof t=="object";var Rt=t=>!_n(t)&&!Array.isArray(t)&&B3(t)&&!wo(t),Z3=t=>Rt(t)&&t.target?zu(t.target)?t.target.checked:t.target.value:t,Gq=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,z3=(t,e)=>t.has(Gq(e)),Kq=t=>{const e=t.constructor&&t.constructor.prototype;return Rt(e)&&e.hasOwnProperty("isPrototypeOf")},_y=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function At(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(_y&&(t instanceof Blob||e))return t;const n=Array.isArray(t);if(!n&&!(Rt(t)&&Kq(t)))return t;const r=n?[]:Object.create(Object.getPrototypeOf(t));for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=At(t[i]));return r}var Wp=t=>/^\w*$/.test(t),Ot=t=>t===void 0,Ty=t=>Array.isArray(t)?t.filter(Boolean):[],Ey=t=>Ty(t.replace(/["|']|\]/g,"").split(/\.|\[/)),pe=(t,e,n)=>{if(!e||!Rt(t))return n;const r=(Wp(e)?[e]:Ey(e)).reduce((i,s)=>_n(i)?i:i[s],t);return Ot(r)||r===t?Ot(t[e])?n:t[e]:r},zn=t=>typeof t=="boolean",xn=t=>typeof t=="function",ft=(t,e,n)=>{let r=-1;const i=Wp(e)?[e]:Ey(e),s=i.length,o=s-1;for(;++r<s;){const l=i[r];let a=n;if(r!==o){const c=t[l];a=Rt(c)||Array.isArray(c)?c:isNaN(+i[r+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;t[l]=a,t=t[l]}};const hd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},wr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ei={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},X3=k.createContext(null);X3.displayName="HookFormControlContext";const Py=()=>k.useContext(X3);var W3=(t,e,n,r=!0)=>{const i={defaultValues:e._defaultValues};for(const s in t)Object.defineProperty(i,s,{get:()=>{const o=s;return e._proxyFormState[o]!==wr.all&&(e._proxyFormState[o]=!r||wr.all),n&&(n[o]=!0),t[o]}});return i};const Ay=typeof window<"u"?k.useLayoutEffect:k.useEffect;function Jq(t){const e=Py(),{control:n=e,disabled:r,name:i,exact:s}=t||{},[o,l]=k.useState(n._formState),a=k.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ay(()=>n._subscribe({name:i,formState:a.current,exact:s,callback:c=>{!r&&l({...n._formState,...c})}}),[i,r,s]),k.useEffect(()=>{a.current.isValid&&n._setValid(!0)},[n]),k.useMemo(()=>W3(o,n,a.current,!1),[o,n])}var qn=t=>typeof t=="string",x1=(t,e,n,r,i)=>qn(t)?(r&&e.watch.add(t),pe(n,t,i)):Array.isArray(t)?t.map(s=>(r&&e.watch.add(s),pe(n,s))):(r&&(e.watchAll=!0),n),y1=t=>_n(t)||!B3(t);function kr(t,e,n=new WeakSet){if(y1(t)||y1(e))return Object.is(t,e);if(wo(t)&&wo(e))return Object.is(t.getTime(),e.getTime());const r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);for(const s of r){const o=t[s];if(!i.includes(s))return!1;if(s!=="ref"){const l=e[s];if(wo(o)&&wo(l)||Rt(o)&&Rt(l)||Array.isArray(o)&&Array.isArray(l)?!kr(o,l,n):!Object.is(o,l))return!1}}return!0}function eY(t){const e=Py(),{control:n=e,name:r,defaultValue:i,disabled:s,exact:o,compute:l}=t||{},a=k.useRef(i),c=k.useRef(l),u=k.useRef(void 0),f=k.useRef(n),h=k.useRef(r);c.current=l;const[d,p]=k.useState(()=>{const b=n._getWatch(r,a.current);return c.current?c.current(b):b}),g=k.useCallback(b=>{const S=x1(r,n._names,b||n._formValues,!1,a.current);return c.current?c.current(S):S},[n._formValues,n._names,r]),O=k.useCallback(b=>{if(!s){const S=x1(r,n._names,b||n._formValues,!1,a.current);if(c.current){const v=c.current(S);kr(v,u.current)||(p(v),u.current=v)}else p(S)}},[n._formValues,n._names,s,r]);Ay(()=>((f.current!==n||!kr(h.current,r))&&(f.current=n,h.current=r,O()),n._subscribe({name:r,formState:{values:!0},exact:o,callback:b=>{O(b.values)}})),[n,o,r,O]),k.useEffect(()=>n._removeUnmounted());const x=f.current!==n,m=h.current,y=k.useMemo(()=>{if(s)return null;const b=!x&&!kr(m,r);return x||b?g():null},[s,x,r,m,g]);return y!==null?y:d}function tY(t){const e=Py(),{name:n,disabled:r,control:i=e,shouldUnregister:s,defaultValue:o,exact:l=!0}=t,a=z3(i._names.array,n),c=k.useMemo(()=>pe(i._formValues,n,pe(i._defaultValues,n,o)),[i,n,o]),u=eY({control:i,name:n,defaultValue:c,exact:l}),f=Jq({control:i,name:n,exact:l}),h=k.useRef(t),d=k.useRef(void 0),p=k.useRef(i.register(n,{...t.rules,value:u,...zn(t.disabled)?{disabled:t.disabled}:{}}));h.current=t;const g=k.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!pe(f.errors,n)},isDirty:{enumerable:!0,get:()=>!!pe(f.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!pe(f.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!pe(f.validatingFields,n)},error:{enumerable:!0,get:()=>pe(f.errors,n)}}),[f,n]),O=k.useCallback(b=>p.current.onChange({target:{value:Z3(b),name:n},type:hd.CHANGE}),[n]),x=k.useCallback(()=>p.current.onBlur({target:{value:pe(i._formValues,n),name:n},type:hd.BLUR}),[n,i._formValues]),m=k.useCallback(b=>{const S=pe(i._fields,n);S&&S._f&&b&&(S._f.ref={focus:()=>xn(b.focus)&&b.focus(),select:()=>xn(b.select)&&b.select(),setCustomValidity:v=>xn(b.setCustomValidity)&&b.setCustomValidity(v),reportValidity:()=>xn(b.reportValidity)&&b.reportValidity()})},[i._fields,n]),y=k.useMemo(()=>({name:n,value:u,...zn(r)||f.disabled?{disabled:f.disabled||r}:{},onChange:O,onBlur:x,ref:m}),[n,r,f.disabled,O,x,m,u]);return k.useEffect(()=>{const b=i._options.shouldUnregister||s,S=d.current;S&&S!==n&&!a&&i.unregister(S),i.register(n,{...h.current.rules,...zn(h.current.disabled)?{disabled:h.current.disabled}:{}});const v=(w,_)=>{const T=pe(i._fields,w);T&&T._f&&(T._f.mount=_)};if(v(n,!0),b){const w=At(pe(i._options.defaultValues,n,h.current.defaultValue));ft(i._defaultValues,n,w),Ot(pe(i._formValues,n))&&ft(i._formValues,n,w)}return!a&&i.register(n),d.current=n,()=>{(a?b&&!i._state.action:b)?i.unregister(n):v(n,!1)}},[n,i,a,s]),k.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),k.useMemo(()=>({field:y,formState:f,fieldState:g}),[y,f,g])}const nY=t=>t.render(tY(t)),rY=k.createContext(null);rY.displayName="HookFormContext";var iY=(t,e,n,r,i)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:i||!0}}:{},bc=t=>Array.isArray(t)?t:[t],vk=()=>{let t=[];return{get observers(){return t},next:i=>{for(const s of t)s.next&&s.next(i)},subscribe:i=>(t.push(i),{unsubscribe:()=>{t=t.filter(s=>s!==i)}}),unsubscribe:()=>{t=[]}}};function j3(t,e){const n={};for(const r in t)if(t.hasOwnProperty(r)){const i=t[r],s=e[r];if(i&&Rt(i)&&s){const o=j3(i,s);Rt(o)&&(n[r]=o)}else t[r]&&(n[r]=s)}return n}var mn=t=>Rt(t)&&!Object.keys(t).length,$y=t=>t.type==="file",dd=t=>{if(!_y)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},H3=t=>t.type==="select-multiple",Qy=t=>t.type==="radio",sY=t=>Qy(t)||zu(t),Yg=t=>dd(t)&&t.isConnected;function oY(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=Ot(t)?r++:t[e[r++]];return t}function lY(t){for(const e in t)if(t.hasOwnProperty(e)&&!Ot(t[e]))return!1;return!0}function $t(t,e){const n=Array.isArray(e)?e:Wp(e)?[e]:Ey(e),r=n.length===1?t:oY(t,n),i=n.length-1,s=n[i];return r&&delete r[s],i!==0&&(Rt(r)&&mn(r)||Array.isArray(r)&&lY(r))&&$t(t,n.slice(0,-1)),t}var aY=t=>{for(const e in t)if(xn(t[e]))return!0;return!1};function q3(t){return Array.isArray(t)||Rt(t)&&!aY(t)}function b1(t,e={}){for(const n in t){const r=t[n];q3(r)?(e[n]=Array.isArray(r)?[]:{},b1(r,e[n])):Ot(r)||(e[n]=!0)}return e}function Ol(t,e,n){n||(n=b1(e));for(const r in t){const i=t[r];if(q3(i))Ot(e)||y1(n[r])?n[r]=b1(i,Array.isArray(i)?[]:{}):Ol(i,_n(e)?{}:e[r],n[r]);else{const s=e[r];n[r]=!kr(i,s)}}return n}const Sk={value:!1,isValid:!1},wk={value:!0,isValid:!0};var Y3=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!Ot(t[0].attributes.value)?Ot(t[0].value)||t[0].value===""?wk:{value:t[0].value,isValid:!0}:wk:Sk}return Sk},U3=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>Ot(t)?t:e?t===""?NaN:t&&+t:n&&qn(t)?new Date(t):r?r(t):t;const kk={isValid:!1,value:null};var G3=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,kk):kk;function Ck(t){const e=t.ref;return $y(e)?e.files:Qy(e)?G3(t.refs).value:H3(e)?[...e.selectedOptions].map(({value:n})=>n):zu(e)?Y3(t.refs).value:U3(Ot(e.value)?t.ref.value:e.value,t)}var cY=(t,e,n,r)=>{const i={};for(const s of t){const o=pe(e,s);o&&ft(i,s,o._f)}return{criteriaMode:n,names:[...t],fields:i,shouldUseNativeValidation:r}},pd=t=>t instanceof RegExp,Wa=t=>Ot(t)?t:pd(t)?t.source:Rt(t)?pd(t.value)?t.value.source:t.value:t,_k=t=>({isOnSubmit:!t||t===wr.onSubmit,isOnBlur:t===wr.onBlur,isOnChange:t===wr.onChange,isOnAll:t===wr.all,isOnTouch:t===wr.onTouched});const Tk="AsyncFunction";var uY=t=>!!t&&!!t.validate&&!!(xn(t.validate)&&t.validate.constructor.name===Tk||Rt(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===Tk)),fY=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),Ek=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const vc=(t,e,n,r)=>{for(const i of n||Object.keys(t)){const s=pe(t,i);if(s){const{_f:o,...l}=s;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],i)&&!r)return!0;if(o.ref&&e(o.ref,o.name)&&!r)return!0;if(vc(l,e))break}else if(Rt(l)&&vc(l,e))break}}};function Pk(t,e,n){const r=pe(t,n);if(r||Wp(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),o=pe(e,s),l=pe(t,s);if(o&&!Array.isArray(o)&&n!==s)return{name:n};if(l&&l.type)return{name:s,error:l};if(l&&l.root&&l.root.type)return{name:`${s}.root`,error:l.root};i.pop()}return{name:n}}var hY=(t,e,n,r)=>{n(t);const{name:i,...s}=t;return mn(s)||Object.keys(s).length>=Object.keys(e).length||Object.keys(s).find(o=>e[o]===(!r||wr.all))},dY=(t,e,n)=>!t||!e||t===e||bc(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r))),pY=(t,e,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(e||t):(n?r.isOnBlur:i.isOnBlur)?!t:(n?r.isOnChange:i.isOnChange)?t:!0,gY=(t,e)=>!Ty(pe(t,e)).length&&$t(t,e),mY=(t,e,n)=>{const r=bc(pe(t,n));return ft(r,"root",e[n]),ft(t,n,r),t};function Ak(t,e,n="validate"){if(qn(t)||Array.isArray(t)&&t.every(qn)||zn(t)&&!t)return{type:n,message:qn(t)?t:"",ref:e}}var fl=t=>Rt(t)&&!pd(t)?t:{value:t,message:""},$k=async(t,e,n,r,i,s)=>{const{ref:o,refs:l,required:a,maxLength:c,minLength:u,min:f,max:h,pattern:d,validate:p,name:g,valueAsNumber:O,mount:x}=t._f,m=pe(n,g);if(!x||e.has(g))return{};const y=l?l[0]:o,b=M=>{i&&y.reportValidity&&(y.setCustomValidity(zn(M)?"":M||""),y.reportValidity())},S={},v=Qy(o),w=zu(o),_=v||w,T=(O||$y(o))&&Ot(o.value)&&Ot(m)||dd(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,E=iY.bind(null,g,r,S),L=(M,$,V,Z=Ei.maxLength,Y=Ei.minLength)=>{const j=M?$:V;S[g]={type:M?Z:Y,message:j,ref:o,...E(M?Z:Y,j)}};if(s?!Array.isArray(m)||!m.length:a&&(!_&&(T||_n(m))||zn(m)&&!m||w&&!Y3(l).isValid||v&&!G3(l).isValid)){const{value:M,message:$}=qn(a)?{value:!!a,message:a}:fl(a);if(M&&(S[g]={type:Ei.required,message:$,ref:y,...E(Ei.required,$)},!r))return b($),S}if(!T&&(!_n(f)||!_n(h))){let M,$;const V=fl(h),Z=fl(f);if(!_n(m)&&!isNaN(m)){const Y=o.valueAsNumber||m&&+m;_n(V.value)||(M=Y>V.value),_n(Z.value)||($=Y<Z.value)}else{const Y=o.valueAsDate||new Date(m),j=Q=>new Date(new Date().toDateString()+" "+Q),U=o.type=="time",se=o.type=="week";qn(V.value)&&m&&(M=U?j(m)>j(V.value):se?m>V.value:Y>new Date(V.value)),qn(Z.value)&&m&&($=U?j(m)<j(Z.value):se?m<Z.value:Y<new Date(Z.value))}if((M||$)&&(L(!!M,V.message,Z.message,Ei.max,Ei.min),!r))return b(S[g].message),S}if((c||u)&&!T&&(qn(m)||s&&Array.isArray(m))){const M=fl(c),$=fl(u),V=!_n(M.value)&&m.length>+M.value,Z=!_n($.value)&&m.length<+$.value;if((V||Z)&&(L(V,M.message,$.message),!r))return b(S[g].message),S}if(d&&!T&&qn(m)){const{value:M,message:$}=fl(d);if(pd(M)&&!m.match(M)&&(S[g]={type:Ei.pattern,message:$,ref:o,...E(Ei.pattern,$)},!r))return b($),S}if(p){if(xn(p)){const M=await p(m,n),$=Ak(M,y);if($&&(S[g]={...$,...E(Ei.validate,$.message)},!r))return b($.message),S}else if(Rt(p)){let M={};for(const $ in p){if(!mn(M)&&!r)break;const V=Ak(await p[$](m,n),y,$);V&&(M={...V,...E($,V.message)},b(V.message),r&&(S[g]=M))}if(!mn(M)&&(S[g]={ref:y,...M},!r))return S}}return b(!0),S};const OY={mode:wr.onSubmit,reValidateMode:wr.onChange,shouldFocusError:!0};function xY(t={}){let e={...OY,...t},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:xn(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},i=Rt(e.defaultValues)||Rt(e.values)?At(e.defaultValues||e.values)||{}:{},s=e.shouldUnregister?{}:At(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},a,c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={...u};let h={...f};const d={array:vk(),state:vk()},p=e.criteriaMode===wr.all,g=I=>F=>{clearTimeout(c),c=setTimeout(I,F)},O=async I=>{if(!o.keepIsValid&&!e.disabled&&(f.isValid||h.isValid||I)){let F;e.resolver?(F=mn((await _()).errors),x()):F=await E(r,!0),F!==n.isValid&&d.state.next({isValid:F})}},x=(I,F)=>{!e.disabled&&(f.isValidating||f.validatingFields||h.isValidating||h.validatingFields)&&((I||Array.from(l.mount)).forEach(X=>{X&&(F?ft(n.validatingFields,X,F):$t(n.validatingFields,X))}),d.state.next({validatingFields:n.validatingFields,isValidating:!mn(n.validatingFields)}))},m=(I,F=[],X,ee,ie=!0,N=!0)=>{if(ee&&X&&!e.disabled){if(o.action=!0,N&&Array.isArray(pe(r,I))){const B=X(pe(r,I),ee.argA,ee.argB);ie&&ft(r,I,B)}if(N&&Array.isArray(pe(n.errors,I))){const B=X(pe(n.errors,I),ee.argA,ee.argB);ie&&ft(n.errors,I,B),gY(n.errors,I)}if((f.touchedFields||h.touchedFields)&&N&&Array.isArray(pe(n.touchedFields,I))){const B=X(pe(n.touchedFields,I),ee.argA,ee.argB);ie&&ft(n.touchedFields,I,B)}(f.dirtyFields||h.dirtyFields)&&(n.dirtyFields=Ol(i,s)),d.state.next({name:I,isDirty:M(I,F),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ft(s,I,F)},y=(I,F)=>{ft(n.errors,I,F),d.state.next({errors:n.errors})},b=I=>{n.errors=I,d.state.next({errors:n.errors,isValid:!1})},S=(I,F,X,ee)=>{const ie=pe(r,I);if(ie){const N=pe(s,I,Ot(X)?pe(i,I):X);Ot(N)||ee&&ee.defaultChecked||F?ft(s,I,F?N:Ck(ie._f)):Z(I,N),o.mount&&!o.action&&O()}},v=(I,F,X,ee,ie)=>{let N=!1,B=!1;const P={name:I};if(!e.disabled){if(!X||ee){(f.isDirty||h.isDirty)&&(B=n.isDirty,n.isDirty=P.isDirty=M(),N=B!==P.isDirty);const ce=kr(pe(i,I),F);B=!!pe(n.dirtyFields,I),ce?$t(n.dirtyFields,I):ft(n.dirtyFields,I,!0),P.dirtyFields=n.dirtyFields,N=N||(f.dirtyFields||h.dirtyFields)&&B!==!ce}if(X){const ce=pe(n.touchedFields,I);ce||(ft(n.touchedFields,I,X),P.touchedFields=n.touchedFields,N=N||(f.touchedFields||h.touchedFields)&&ce!==X)}N&&ie&&d.state.next(P)}return N?P:{}},w=(I,F,X,ee)=>{const ie=pe(n.errors,I),N=(f.isValid||h.isValid)&&zn(F)&&n.isValid!==F;if(e.delayError&&X?(a=g(()=>y(I,X)),a(e.delayError)):(clearTimeout(c),a=null,X?ft(n.errors,I,X):$t(n.errors,I)),(X?!kr(ie,X):ie)||!mn(ee)||N){const B={...ee,...N&&zn(F)?{isValid:F}:{},errors:n.errors,name:I};n={...n,...B},d.state.next(B)}},_=async I=>(x(I,!0),await e.resolver(s,e.context,cY(I||l.mount,r,e.criteriaMode,e.shouldUseNativeValidation))),T=async I=>{const{errors:F}=await _(I);if(x(I),I)for(const X of I){const ee=pe(F,X);ee?ft(n.errors,X,ee):$t(n.errors,X)}else n.errors=F;return F},E=async(I,F,X={valid:!0})=>{for(const ee in I){const ie=I[ee];if(ie){const{_f:N,...B}=ie;if(N){const P=l.array.has(N.name),ce=ie._f&&uY(ie._f);ce&&f.validatingFields&&x([N.name],!0);const Te=await $k(ie,l.disabled,s,p,e.shouldUseNativeValidation&&!F,P);if(ce&&f.validatingFields&&x([N.name]),Te[N.name]&&(X.valid=!1,F||t.shouldUseNativeValidation))break;!F&&(pe(Te,N.name)?P?mY(n.errors,Te,N.name):ft(n.errors,N.name,Te[N.name]):$t(n.errors,N.name))}!mn(B)&&await E(B,F,X)}}return X.valid},L=()=>{for(const I of l.unMount){const F=pe(r,I);F&&(F._f.refs?F._f.refs.every(X=>!Yg(X)):!Yg(F._f.ref))&&ne(I)}l.unMount=new Set},M=(I,F)=>!e.disabled&&(I&&F&&ft(s,I,F),!kr(me(),i)),$=(I,F,X)=>x1(I,l,{...o.mount?s:Ot(F)?i:qn(I)?{[I]:F}:F},X,F),V=I=>Ty(pe(o.mount?s:i,I,e.shouldUnregister?pe(i,I,[]):[])),Z=(I,F,X={})=>{const ee=pe(r,I);let ie=F;if(ee){const N=ee._f;N&&(!N.disabled&&ft(s,I,U3(F,N)),ie=dd(N.ref)&&_n(F)?"":F,H3(N.ref)?[...N.ref.options].forEach(B=>B.selected=ie.includes(B.value)):N.refs?zu(N.ref)?N.refs.forEach(B=>{(!B.defaultChecked||!B.disabled)&&(Array.isArray(ie)?B.checked=!!ie.find(P=>P===B.value):B.checked=ie===B.value||!!ie)}):N.refs.forEach(B=>B.checked=B.value===ie):$y(N.ref)?N.ref.value="":(N.ref.value=ie,N.ref.type||d.state.next({name:I,values:At(s)})))}(X.shouldDirty||X.shouldTouch)&&v(I,ie,X.shouldTouch,X.shouldDirty,!0),X.shouldValidate&&Q(I)},Y=(I,F,X)=>{for(const ee in F){if(!F.hasOwnProperty(ee))return;const ie=F[ee],N=I+"."+ee,B=pe(r,N);(l.array.has(I)||Rt(ie)||B&&!B._f)&&!wo(ie)?Y(N,ie,X):Z(N,ie,X)}},j=(I,F,X={})=>{const ee=pe(r,I),ie=l.array.has(I),N=At(F);ft(s,I,N),ie?(d.array.next({name:I,values:At(s)}),(f.isDirty||f.dirtyFields||h.isDirty||h.dirtyFields)&&X.shouldDirty&&d.state.next({name:I,dirtyFields:Ol(i,s),isDirty:M(I,N)})):ee&&!ee._f&&!_n(N)?Y(I,N,X):Z(I,N,X),Ek(I,l)?d.state.next({...n,name:I,values:At(s)}):d.state.next({name:o.mount?I:void 0,values:At(s)})},U=async I=>{o.mount=!0;const F=I.target;let X=F.name,ee=!0;const ie=pe(r,X),N=ce=>{ee=Number.isNaN(ce)||wo(ce)&&isNaN(ce.getTime())||kr(ce,pe(s,X,ce))},B=_k(e.mode),P=_k(e.reValidateMode);if(ie){let ce,Te;const Ye=F.type?Ck(ie._f):Z3(I),Zt=I.type===hd.BLUR||I.type===hd.FOCUS_OUT,mr=!fY(ie._f)&&!e.resolver&&!pe(n.errors,X)&&!ie._f.deps||pY(Zt,pe(n.touchedFields,X),n.isSubmitted,P,B),wi=Ek(X,l,Zt);ft(s,X,Ye),Zt?(!F||!F.readOnly)&&(ie._f.onBlur&&ie._f.onBlur(I),a&&a(0)):ie._f.onChange&&ie._f.onChange(I);const ki=v(X,Ye,Zt),gn=!mn(ki)||wi;if(!Zt&&d.state.next({name:X,type:I.type,values:At(s)}),mr)return(f.isValid||h.isValid)&&(e.mode==="onBlur"?Zt&&O():Zt||O()),gn&&d.state.next({name:X,...wi?{}:ki});if(!Zt&&wi&&d.state.next({...n}),e.resolver){const{errors:Ci}=await _([X]);if(x([X]),N(Ye),ee){const Or=Pk(n.errors,r,X),av=Pk(Ci,r,Or.name||X);ce=av.error,X=av.name,Te=mn(Ci)}}else x([X],!0),ce=(await $k(ie,l.disabled,s,p,e.shouldUseNativeValidation))[X],x([X]),N(Ye),ee&&(ce?Te=!1:(f.isValid||h.isValid)&&(Te=await E(r,!0)));ee&&(ie._f.deps&&(!Array.isArray(ie._f.deps)||ie._f.deps.length>0)&&Q(ie._f.deps),w(X,Te,ce,ki))}},se=(I,F)=>{if(pe(n.errors,F)&&I.focus)return I.focus(),1},Q=async(I,F={})=>{let X,ee;const ie=bc(I);if(e.resolver){const N=await T(Ot(I)?I:ie);X=mn(N),ee=I?!ie.some(B=>pe(N,B)):X}else I?(ee=(await Promise.all(ie.map(async N=>{const B=pe(r,N);return await E(B&&B._f?{[N]:B}:B)}))).every(Boolean),!(!ee&&!n.isValid)&&O()):ee=X=await E(r);return d.state.next({...!qn(I)||(f.isValid||h.isValid)&&X!==n.isValid?{}:{name:I},...e.resolver||!I?{isValid:X}:{},errors:n.errors}),F.shouldFocus&&!ee&&vc(r,se,I?ie:l.mount),ee},me=(I,F)=>{let X={...o.mount?s:i};return F&&(X=j3(F.dirtyFields?n.dirtyFields:n.touchedFields,X)),Ot(I)?X:qn(I)?pe(X,I):I.map(ee=>pe(X,ee))},de=(I,F)=>({invalid:!!pe((F||n).errors,I),isDirty:!!pe((F||n).dirtyFields,I),error:pe((F||n).errors,I),isValidating:!!pe(n.validatingFields,I),isTouched:!!pe((F||n).touchedFields,I)}),R=I=>{I&&bc(I).forEach(F=>$t(n.errors,F)),d.state.next({errors:I?n.errors:{}})},$e=(I,F,X)=>{const ee=(pe(r,I,{_f:{}})._f||{}).ref,ie=pe(n.errors,I)||{},{ref:N,message:B,type:P,...ce}=ie;ft(n.errors,I,{...ce,...F,ref:ee}),d.state.next({name:I,errors:n.errors,isValid:!1}),X&&X.shouldFocus&&ee&&ee.focus&&ee.focus()},Qe=(I,F)=>xn(I)?d.state.subscribe({next:X=>"values"in X&&I($(void 0,F),X)}):$(I,F,!0),ke=I=>d.state.subscribe({next:F=>{dY(I.name,F.name,I.exact)&&hY(F,I.formState||f,er,I.reRenderRoot)&&I.callback({values:{...s},...n,...F,defaultValues:i})}}).unsubscribe,K=I=>(o.mount=!0,h={...h,...I.formState},ke({...I,formState:{...u,...I.formState}})),ne=(I,F={})=>{for(const X of I?bc(I):l.mount)l.mount.delete(X),l.array.delete(X),F.keepValue||($t(r,X),$t(s,X)),!F.keepError&&$t(n.errors,X),!F.keepDirty&&$t(n.dirtyFields,X),!F.keepTouched&&$t(n.touchedFields,X),!F.keepIsValidating&&$t(n.validatingFields,X),!e.shouldUnregister&&!F.keepDefaultValue&&$t(i,X);d.state.next({values:At(s)}),d.state.next({...n,...F.keepDirty?{isDirty:M()}:{}}),!F.keepIsValid&&O()},ae=({disabled:I,name:F})=>{if(zn(I)&&o.mount||I||l.disabled.has(F)){const ie=l.disabled.has(F)!==!!I;I?l.disabled.add(F):l.disabled.delete(F),ie&&o.mount&&!o.action&&O()}},fe=(I,F={})=>{let X=pe(r,I);const ee=zn(F.disabled)||zn(e.disabled);return ft(r,I,{...X||{},_f:{...X&&X._f?X._f:{ref:{name:I}},name:I,mount:!0,...F}}),l.mount.add(I),X?ae({disabled:zn(F.disabled)?F.disabled:e.disabled,name:I}):S(I,!0,F.value),{...ee?{disabled:F.disabled||e.disabled}:{},...e.progressive?{required:!!F.required,min:Wa(F.min),max:Wa(F.max),minLength:Wa(F.minLength),maxLength:Wa(F.maxLength),pattern:Wa(F.pattern)}:{},name:I,onChange:U,onBlur:U,ref:ie=>{if(ie){fe(I,F),X=pe(r,I);const N=Ot(ie.value)&&ie.querySelectorAll&&ie.querySelectorAll("input,select,textarea")[0]||ie,B=sY(N),P=X._f.refs||[];if(B?P.find(ce=>ce===N):N===X._f.ref)return;ft(r,I,{_f:{...X._f,...B?{refs:[...P.filter(Yg),N,...Array.isArray(pe(i,I))?[{}]:[]],ref:{type:N.type,name:I}}:{ref:N}}}),S(I,!1,void 0,N)}else X=pe(r,I,{}),X._f&&(X._f.mount=!1),(e.shouldUnregister||F.shouldUnregister)&&!(z3(l.array,I)&&o.action)&&l.unMount.add(I)}}},ve=()=>e.shouldFocusError&&vc(r,se,l.mount),Me=I=>{zn(I)&&(d.state.next({disabled:I}),vc(r,(F,X)=>{const ee=pe(r,X);ee&&(F.disabled=ee._f.disabled||I,Array.isArray(ee._f.refs)&&ee._f.refs.forEach(ie=>{ie.disabled=ee._f.disabled||I}))},0,!1))},qe=(I,F)=>async X=>{let ee;X&&(X.preventDefault&&X.preventDefault(),X.persist&&X.persist());let ie=At(s);if(d.state.next({isSubmitting:!0}),e.resolver){const{errors:N,values:B}=await _();x(),n.errors=N,ie=At(B)}else await E(r);if(l.disabled.size)for(const N of l.disabled)$t(ie,N);if($t(n.errors,"root"),mn(n.errors)){d.state.next({errors:{}});try{await I(ie,X)}catch(N){ee=N}}else F&&await F({...n.errors},X),ve(),setTimeout(ve);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:mn(n.errors)&&!ee,submitCount:n.submitCount+1,errors:n.errors}),ee)throw ee},mt=(I,F={})=>{pe(r,I)&&(Ot(F.defaultValue)?j(I,At(pe(i,I))):(j(I,F.defaultValue),ft(i,I,At(F.defaultValue))),F.keepTouched||$t(n.touchedFields,I),F.keepDirty||($t(n.dirtyFields,I),n.isDirty=F.defaultValue?M(I,At(pe(i,I))):M()),F.keepError||($t(n.errors,I),f.isValid&&O()),d.state.next({...n}))},wt=(I,F={})=>{const X=I?At(I):i,ee=At(X),ie=mn(I),N=ie?i:ee;if(F.keepDefaultValues||(i=X),!F.keepValues){if(F.keepDirtyValues){const B=new Set([...l.mount,...Object.keys(Ol(i,s))]);for(const P of Array.from(B)){const ce=pe(n.dirtyFields,P),Te=pe(s,P),Ye=pe(N,P);ce&&!Ot(Te)?ft(N,P,Te):!ce&&!Ot(Ye)&&j(P,Ye)}}else{if(_y&&Ot(I))for(const B of l.mount){const P=pe(r,B);if(P&&P._f){const ce=Array.isArray(P._f.refs)?P._f.refs[0]:P._f.ref;if(dd(ce)){const Te=ce.closest("form");if(Te){Te.reset();break}}}}if(F.keepFieldsRef)for(const B of l.mount)j(B,pe(N,B));else r={}}s=e.shouldUnregister?F.keepDefaultValues?At(i):{}:At(N),d.array.next({values:{...N}}),d.state.next({values:{...N}})}l={mount:F.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!F.keepIsValid||!!F.keepDirtyValues||!e.shouldUnregister&&!mn(N),o.watch=!!e.shouldUnregister,o.keepIsValid=!!F.keepIsValid,o.action=!1,F.keepErrors||(n.errors={}),d.state.next({submitCount:F.keepSubmitCount?n.submitCount:0,isDirty:ie?!1:F.keepDirty?n.isDirty:!!(F.keepDefaultValues&&!kr(I,i)),isSubmitted:F.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ie?{}:F.keepDirtyValues?F.keepDefaultValues&&s?Ol(i,s):n.dirtyFields:F.keepDefaultValues&&I?Ol(i,I):F.keepDirty?n.dirtyFields:{},touchedFields:F.keepTouched?n.touchedFields:{},errors:F.keepErrors?n.errors:{},isSubmitSuccessful:F.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},kt=(I,F)=>wt(xn(I)?I(s):I,{...e.resetOptions,...F}),Tt=(I,F={})=>{const X=pe(r,I),ee=X&&X._f;if(ee){const ie=ee.refs?ee.refs[0]:ee.ref;ie.focus&&setTimeout(()=>{ie.focus(),F.shouldSelect&&xn(ie.select)&&ie.select()})}},er=I=>{n={...n,...I}},Nn={control:{register:fe,unregister:ne,getFieldState:de,handleSubmit:qe,setError:$e,_subscribe:ke,_runSchema:_,_updateIsValidating:x,_focusError:ve,_getWatch:$,_getDirty:M,_setValid:O,_setFieldArray:m,_setDisabledField:ae,_setErrors:b,_getFieldArray:V,_reset:wt,_resetDefaultValues:()=>xn(e.defaultValues)&&e.defaultValues().then(I=>{kt(I,e.resetOptions),d.state.next({isLoading:!1})}),_removeUnmounted:L,_disableForm:Me,_subjects:d,_proxyFormState:f,get _fields(){return r},get _formValues(){return s},get _state(){return o},set _state(I){o=I},get _defaultValues(){return i},get _names(){return l},set _names(I){l=I},get _formState(){return n},get _options(){return e},set _options(I){e={...e,...I}}},subscribe:K,trigger:Q,register:fe,handleSubmit:qe,watch:Qe,setValue:j,getValues:me,reset:kt,resetField:mt,clearErrors:R,unregister:ne,setError:$e,setFocus:Tt,getFieldState:de};return{...Nn,formControl:Nn}}function K3(t={}){const e=k.useRef(void 0),n=k.useRef(void 0),[r,i]=k.useState({isDirty:!1,isValidating:!1,isLoading:xn(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:xn(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:r},t.defaultValues&&!xn(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:o,...l}=xY(t);e.current={...l,formState:r}}const s=e.current.control;return s._options=t,Ay(()=>{const o=s._subscribe({formState:s._proxyFormState,callback:()=>i({...s._formState}),reRenderRoot:!0});return i(l=>({...l,isReady:!0})),s._formState.isReady=!0,o},[s]),k.useEffect(()=>s._disableForm(t.disabled),[s,t.disabled]),k.useEffect(()=>{t.mode&&(s._options.mode=t.mode),t.reValidateMode&&(s._options.reValidateMode=t.reValidateMode)},[s,t.mode,t.reValidateMode]),k.useEffect(()=>{t.errors&&(s._setErrors(t.errors),s._focusError())},[s,t.errors]),k.useEffect(()=>{t.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,t.shouldUnregister]),k.useEffect(()=>{if(s._proxyFormState.isDirty){const o=s._getDirty();o!==r.isDirty&&s._subjects.state.next({isDirty:o})}},[s,r.isDirty]),k.useEffect(()=>{var o;t.values&&!kr(t.values,n.current)?(s._reset(t.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((o=s._options.resetOptions)===null||o===void 0)&&o.keepIsValid||s._setValid(),n.current=t.values,i(l=>({...l}))):s._resetDefaultValues()},[s,t.values]),k.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),e.current.formState=k.useMemo(()=>W3(r,s),[s,r]),e.current}function ic(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function xt(){return xt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},xt.apply(null,arguments)}var Ug={exports:{}},Gg,Qk;function yY(){if(Qk)return Gg;Qk=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gg=t,Gg}var Kg,Mk;function bY(){if(Mk)return Kg;Mk=1;var t=yY();function e(){}function n(){}return n.resetWarningCache=e,Kg=function(){function r(o,l,a,c,u,f){if(f!==t){var h=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 h.name="Invariant Violation",h}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},Kg}var Rk;function vY(){return Rk||(Rk=1,Ug.exports=bY()()),Ug.exports}var SY=vY();const le=q2(SY);var Jg={exports:{}},nt={};/** @license React v17.0.2
118
+ * react-is.production.min.js
119
+ *
120
+ * Copyright (c) Facebook, Inc. and its affiliates.
121
+ *
122
+ * This source code is licensed under the MIT license found in the
123
+ * LICENSE file in the root directory of this source tree.
124
+ */var Lk;function wY(){if(Lk)return nt;Lk=1;var t=60103,e=60106,n=60107,r=60108,i=60114,s=60109,o=60110,l=60112,a=60113,c=60120,u=60115,f=60116,h=60121,d=60122,p=60117,g=60129,O=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;t=x("react.element"),e=x("react.portal"),n=x("react.fragment"),r=x("react.strict_mode"),i=x("react.profiler"),s=x("react.provider"),o=x("react.context"),l=x("react.forward_ref"),a=x("react.suspense"),c=x("react.suspense_list"),u=x("react.memo"),f=x("react.lazy"),h=x("react.block"),d=x("react.server.block"),p=x("react.fundamental"),g=x("react.debug_trace_mode"),O=x("react.legacy_hidden")}function m($){if(typeof $=="object"&&$!==null){var V=$.$$typeof;switch(V){case t:switch($=$.type,$){case n:case i:case r:case a:case c:return $;default:switch($=$&&$.$$typeof,$){case o:case l:case f:case u:case s:return $;default:return V}}case e:return V}}}var y=s,b=t,S=l,v=n,w=f,_=u,T=e,E=i,L=r,M=a;return nt.ContextConsumer=o,nt.ContextProvider=y,nt.Element=b,nt.ForwardRef=S,nt.Fragment=v,nt.Lazy=w,nt.Memo=_,nt.Portal=T,nt.Profiler=E,nt.StrictMode=L,nt.Suspense=M,nt.isAsyncMode=function(){return!1},nt.isConcurrentMode=function(){return!1},nt.isContextConsumer=function($){return m($)===o},nt.isContextProvider=function($){return m($)===s},nt.isElement=function($){return typeof $=="object"&&$!==null&&$.$$typeof===t},nt.isForwardRef=function($){return m($)===l},nt.isFragment=function($){return m($)===n},nt.isLazy=function($){return m($)===f},nt.isMemo=function($){return m($)===u},nt.isPortal=function($){return m($)===e},nt.isProfiler=function($){return m($)===i},nt.isStrictMode=function($){return m($)===r},nt.isSuspense=function($){return m($)===a},nt.isValidElementType=function($){return typeof $=="string"||typeof $=="function"||$===n||$===i||$===g||$===r||$===a||$===c||$===O||typeof $=="object"&&$!==null&&($.$$typeof===f||$.$$typeof===u||$.$$typeof===s||$.$$typeof===o||$.$$typeof===l||$.$$typeof===p||$.$$typeof===h||$[0]===d)},nt.typeOf=m,nt}var Ik;function kY(){return Ik||(Ik=1,Jg.exports=wY()),Jg.exports}kY();let Nk=t=>typeof t=="object"&&t!=null&&t.nodeType===1,Dk=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",em=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){let n=getComputedStyle(t,null);return Dk(n.overflowY,e)||Dk(n.overflowX,e)||(r=>{let i=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(t)}return!1},wf=(t,e,n,r,i,s,o,l)=>s<t&&o>e||s>t&&o<e?0:s<=t&&l<=n||o>=e&&l>=n?s-t-r:o>e&&l<n||s<t&&l>n?o-e+i:0,CY=t=>{let e=t.parentElement;return e??(t.getRootNode().host||null)};var _Y=(t,e)=>{var n,r,i,s,o,l;if(typeof document>"u")return[];let{inline:a,boundary:c,skipOverflowHiddenElements:u}=e,f=typeof c=="function"?c:M=>M!==c;if(!Nk(t))throw new TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,d=[],p=t;for(;Nk(p)&&f(p);){if(p=CY(p),p===h){d.push(p);break}p!=null&&p===document.body&&em(p)&&!em(document.documentElement)||p!=null&&em(p,u)&&d.push(p)}let g=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,O=(s=(i=window.visualViewport)==null?void 0:i.height)!=null?s:innerHeight,x=(o=window.scrollX)!=null?o:pageXOffset,m=(l=window.scrollY)!=null?l:pageYOffset,{height:y,width:b,top:S,right:v,bottom:w,left:_}=t.getBoundingClientRect(),T=S,E=a==="center"?_+b/2:a==="end"?v:_,L=[];for(let M=0;M<d.length;M++){let $=d[M],{height:V,width:Z,top:Y,right:j,bottom:U,left:se}=$.getBoundingClientRect();if(S>=0&&_>=0&&w<=O&&v<=g&&S>=Y&&w<=U&&_>=se&&v<=j)return L;let Q=getComputedStyle($),me=parseInt(Q.borderLeftWidth,10),de=parseInt(Q.borderTopWidth,10),R=parseInt(Q.borderRightWidth,10),$e=parseInt(Q.borderBottomWidth,10),Qe=0,ke=0,K="offsetWidth"in $?$.offsetWidth-$.clientWidth-me-R:0,ne="offsetHeight"in $?$.offsetHeight-$.clientHeight-de-$e:0,ae="offsetWidth"in $?$.offsetWidth===0?0:Z/$.offsetWidth:0,fe="offsetHeight"in $?$.offsetHeight===0?0:V/$.offsetHeight:0;if(h===$)Qe=wf(m,m+O,O,de,$e,m+T,m+T+y,y),ke=a==="start"?E:a==="center"?E-g/2:a==="end"?E-g:wf(x,x+g,g,me,R,x+E,x+E+b,b),Qe=Math.max(0,Qe+m),ke=Math.max(0,ke+x);else{Qe=wf(Y,U,V,de,$e+ne,T,T+y,y),ke=a==="start"?E-se-me:a==="center"?E-(se+Z/2)+K/2:a==="end"?E-j+R+K:wf(se,j,Z,me,R+K,E,E+b,b);let{scrollLeft:ve,scrollTop:Me}=$;Qe=Math.max(0,Math.min(Me+Qe/fe,$.scrollHeight-V/fe+ne)),ke=Math.max(0,Math.min(ve+ke/ae,$.scrollWidth-Z/ae+K)),T+=Me-Qe,E+=ve-ke}L.push({el:$,top:Qe,left:ke})}return L},TY=0;function J3(){}function EY(t,e){if(t){var n=_Y(t,{boundary:e});n.forEach(function(r){var i=r.el,s=r.top,o=r.left;i.scrollTop=s,i.scrollLeft=o})}}function Vk(t,e,n){var r=t===e||e instanceof n.Node&&t.contains&&t.contains(e);return r}function eQ(t,e){var n;function r(){n&&clearTimeout(n)}function i(){for(var s=arguments.length,o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];r(),n=setTimeout(function(){n=null,t.apply(void 0,o)},e)}return i.cancel=r,i}function Pi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return e.some(function(l){return l&&l.apply(void 0,[r].concat(s)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function kf(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){e.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}function PY(){return String(TY++)}function AY(t){var e=t.isOpen,n=t.resultCount,r=t.previousResultCount;return e?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.":""}function v1(t,e){return Object.keys(t).reduce(function(n,r){return n[r]=tQ(e,r)?e[r]:t[r],n},{})}function tQ(t,e){return t[e]!==void 0}function $Y(t){var e=t.key,n=t.keyCode;return n>=37&&n<=40&&e.indexOf("Arrow")!==0?"Arrow"+e:e}function Cf(t,e,n,r,i){if(i===void 0&&(i=!0),n===0)return-1;var s=n-1;(typeof e!="number"||e<0||e>=n)&&(e=t>0?-1:s+1);var o=e+t;o<0?o=i?s:0:o>s&&(o=i?0:s);var l=Kc(t,o,n,r,i);return l===-1?e>=n?-1:e:l}function Kc(t,e,n,r,i){var s=r(e);if(!s||!s.hasAttribute("disabled"))return e;if(t>0){for(var o=e+1;o<n;o++)if(!r(o).hasAttribute("disabled"))return o}else for(var l=e-1;l>=0;l--)if(!r(l).hasAttribute("disabled"))return l;return i?t>0?Kc(1,0,n,r,!1):Kc(-1,n-1,n,r,!1):-1}function Fk(t,e,n,r){return r===void 0&&(r=!0),e.some(function(i){return i&&(Vk(i,t,n)||r&&Vk(i,n.document.activeElement,n))})}var QY=eQ(function(t){nQ(t).textContent=""},500);function MY(t,e){var n=nQ(e);t&&(n.textContent=t,QY(e))}function nQ(t){t===void 0&&(t=document);var e=t.getElementById("a11y-status-message");return e||(e=t.createElement("div"),e.setAttribute("id","a11y-status-message"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-relevant","additions text"),Object.assign(e.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),t.body.appendChild(e),e)}var RY=["isInitialMount","highlightedIndex","items","environment"],rQ={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function LY(t,e,n){var r=t.props,i=t.type,s={};Object.keys(e).forEach(function(o){IY(o,t,e,n),n[o]!==e[o]&&(s[o]=n[o])}),r.onStateChange&&Object.keys(s).length&&r.onStateChange(xt({type:i},s))}function IY(t,e,n,r){var i=e.props,s=e.type,o="on"+My(t)+"Change";i[o]&&r[t]!==void 0&&r[t]!==n[t]&&i[o](xt({type:s},r))}function NY(t,e){return e.changes}function DY(t){var e=t.selectedItem,n=t.itemToString;return e?n(e)+" has been selected.":""}var VY=eQ(function(t,e){MY(t(),e)},200),FY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect;function BY(t){var e=t.id,n=e===void 0?"downshift-"+PY():e,r=t.labelId,i=t.menuId,s=t.getItemId,o=t.toggleButtonId,l=t.inputId,a=C.useRef({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:s||function(c){return n+"-item-"+c},toggleButtonId:o||n+"-toggle-button",inputId:l||n+"-input"});return a.current}function ZY(t,e,n,r){var i,s;if(t===void 0){if(e===void 0)throw new Error(r);i=n[e],s=e}else s=e===void 0?n.indexOf(t):e,i=t;return[i,s]}function zY(t){return t?String(t):""}function My(t){return""+t.slice(0,1).toUpperCase()+t.slice(1)}function iQ(t){var e=C.useRef(t);return e.current=t,e}function XY(t,e,n){var r=C.useRef(),i=C.useRef(),s=C.useCallback(function(h,d){i.current=d,h=v1(h,d.props);var p=t(h,d),g=d.props.stateReducer(h,xt({},d,{changes:p}));return g},[t]),o=C.useReducer(s,e),l=o[0],a=o[1],c=iQ(n),u=C.useCallback(function(h){return a(xt({props:c.current},h))},[c]),f=i.current;return C.useEffect(function(){f&&r.current&&r.current!==l&&LY(f,v1(r.current,f.props),l),r.current=l},[l,n,f]),[l,u]}var Sc={itemToString:zY,stateReducer:NY,getA11ySelectionMessage:DY,scrollIntoView:EY,environment:typeof window>"u"?{}:window};function ri(t,e,n){n===void 0&&(n=rQ);var r=t["default"+My(e)];return r!==void 0?r:n[e]}function _f(t,e,n){n===void 0&&(n=rQ);var r=t[e];if(r!==void 0)return r;var i=t["initial"+My(e)];return i!==void 0?i:ri(t,e,n)}function WY(t){var e=_f(t,"selectedItem"),n=_f(t,"isOpen"),r=_f(t,"highlightedIndex"),i=_f(t,"inputValue");return{highlightedIndex:r<0&&e&&n?t.items.indexOf(e):r,isOpen:n,selectedItem:e,inputValue:i}}function wc(t,e,n){var r=t.items,i=t.initialHighlightedIndex,s=t.defaultHighlightedIndex,o=e.selectedItem,l=e.highlightedIndex;return r.length===0?-1:i!==void 0&&l===i?i:s!==void 0?s:o?r.indexOf(o):n===0?-1:n<0?r.length-1:0}function jY(t,e,n,r){var i=C.useRef({isMouseDown:!1,isTouchMove:!1});return C.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var s=function(){i.current.isMouseDown=!0},o=function(f){i.current.isMouseDown=!1,t&&!Fk(f.target,e.map(function(h){return h.current}),n)&&r()},l=function(){i.current.isTouchMove=!1},a=function(){i.current.isTouchMove=!0},c=function(f){t&&!i.current.isTouchMove&&!Fk(f.target,e.map(function(h){return h.current}),n,!1)&&r()};return n.addEventListener("mousedown",s),n.addEventListener("mouseup",o),n.addEventListener("touchstart",l),n.addEventListener("touchmove",a),n.addEventListener("touchend",c),function(){n.removeEventListener("mousedown",s),n.removeEventListener("mouseup",o),n.removeEventListener("touchstart",l),n.removeEventListener("touchmove",a),n.removeEventListener("touchend",c)}}},[t,n]),i}var HY=function(){return J3};function Bk(t,e,n){var r=n.isInitialMount,i=n.highlightedIndex,s=n.items,o=n.environment,l=ic(n,RY);C.useEffect(function(){r||VY(function(){return t(xt({highlightedIndex:i,highlightedItem:s[i],resultCount:s.length},l))},o.document)},e)}function qY(t){var e=t.highlightedIndex,n=t.isOpen,r=t.itemRefs,i=t.getItemNodeFromIndex,s=t.menuElement,o=t.scrollIntoView,l=C.useRef(!0);return FY(function(){e<0||!n||!Object.keys(r.current).length||(l.current===!1?l.current=!0:o(i(e),s))},[e]),l}var YY=J3;function Zk(t,e,n){var r;n===void 0&&(n=!0);var i=((r=t.items)==null?void 0:r.length)&&e>=0;return xt({isOpen:!1,highlightedIndex:-1},i&&xt({selectedItem:t.items[e],isOpen:ri(t,"isOpen"),highlightedIndex:ri(t,"highlightedIndex")},n&&{inputValue:t.itemToString(t.items[e])}))}function UY(t,e,n){var r=e.type,i=e.props,s;switch(r){case n.ItemMouseMove:s={highlightedIndex:e.disabled?-1:e.index};break;case n.MenuMouseLeave:s={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:s={isOpen:!t.isOpen,highlightedIndex:t.isOpen?-1:wc(i,t,0)};break;case n.FunctionOpenMenu:s={isOpen:!0,highlightedIndex:wc(i,t,0)};break;case n.FunctionCloseMenu:s={isOpen:!1};break;case n.FunctionSetHighlightedIndex:s={highlightedIndex:e.highlightedIndex};break;case n.FunctionSetInputValue:s={inputValue:e.inputValue};break;case n.FunctionReset:s={highlightedIndex:ri(i,"highlightedIndex"),isOpen:ri(i,"isOpen"),selectedItem:ri(i,"selectedItem"),inputValue:ri(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return xt({},t,s)}le.array.isRequired,le.func,le.func,le.func,le.number,le.number,le.number,le.bool,le.bool,le.bool,le.any,le.any,le.any,le.string,le.string,le.string,le.func,le.string,le.func,le.func,le.func,le.func,le.func,le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})});function GY(t){var e=t.isOpen,n=t.resultCount,r=t.previousResultCount;return e?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.":""}rr(rr({},Sc),{getA11yStatusMessage:GY});var Ry=0,Ly=1,Iy=2,Ny=3,Dy=4,Vy=5,Fy=6,By=7,Zy=8,gd=9,zy=10,sQ=11,oQ=12,Xy=13,lQ=14,aQ=15,cQ=16,uQ=17,fQ=18,Wy=19,hQ=20,dQ=21,jy=22,pQ=Object.freeze({__proto__:null,InputKeyDownArrowDown:Ry,InputKeyDownArrowUp:Ly,InputKeyDownEscape:Iy,InputKeyDownHome:Ny,InputKeyDownEnd:Dy,InputKeyDownPageUp:Vy,InputKeyDownPageDown:Fy,InputKeyDownEnter:By,InputChange:Zy,InputBlur:gd,InputFocus:zy,MenuMouseLeave:sQ,ItemMouseMove:oQ,ItemClick:Xy,ToggleButtonClick:lQ,FunctionToggleMenu:aQ,FunctionOpenMenu:cQ,FunctionCloseMenu:uQ,FunctionSetHighlightedIndex:fQ,FunctionSelectItem:Wy,FunctionSetInputValue:hQ,FunctionReset:dQ,ControlledPropUpdatedSelectedItem:jy});function KY(t){var e=WY(t),n=e.selectedItem,r=e.inputValue;return r===""&&n&&t.defaultInputValue===void 0&&t.initialInputValue===void 0&&t.inputValue===void 0&&(r=t.itemToString(n)),xt({},e,{inputValue:r})}le.array.isRequired,le.func,le.func,le.func,le.func,le.number,le.number,le.number,le.bool,le.bool,le.bool,le.any,le.any,le.any,le.string,le.string,le.string,le.string,le.string,le.string,le.func,le.string,le.string,le.func,le.func,le.func,le.func,le.func,le.func,le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})});function JY(t,e,n){var r=C.useRef(),i=XY(t,e,n),s=i[0],o=i[1];return C.useEffect(function(){tQ(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&o({type:jy,inputValue:n.itemToString(n.selectedItem)}),r.current=s.selectedItem===r.current?n.selectedItem:s.selectedItem)},[s.selectedItem,n.selectedItem]),[v1(s,n),o]}var eU=xt({},Sc,{selectedItemChanged:function(e,n){return e!==n},getA11yStatusMessage:AY});function tU(t,e){var n,r=e.type,i=e.props,s=e.altKey,o;switch(r){case Xy:o={isOpen:ri(i,"isOpen"),highlightedIndex:ri(i,"highlightedIndex"),selectedItem:i.items[e.index],inputValue:i.itemToString(i.items[e.index])};break;case Ry:t.isOpen?o={highlightedIndex:Cf(1,t.highlightedIndex,i.items.length,e.getItemNodeFromIndex,!0)}:o={highlightedIndex:s&&t.selectedItem==null?-1:wc(i,t,1,e.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case Ly:t.isOpen?s?o=Zk(i,t.highlightedIndex):o={highlightedIndex:Cf(-1,t.highlightedIndex,i.items.length,e.getItemNodeFromIndex,!0)}:o={highlightedIndex:wc(i,t,-1,e.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case By:o=Zk(i,t.highlightedIndex);break;case Iy:o=xt({isOpen:!1,highlightedIndex:-1},!t.isOpen&&{selectedItem:null,inputValue:""});break;case Vy:o={highlightedIndex:Cf(-10,t.highlightedIndex,i.items.length,e.getItemNodeFromIndex,!1)};break;case Fy:o={highlightedIndex:Cf(10,t.highlightedIndex,i.items.length,e.getItemNodeFromIndex,!1)};break;case Ny:o={highlightedIndex:Kc(1,0,i.items.length,e.getItemNodeFromIndex,!1)};break;case Dy:o={highlightedIndex:Kc(-1,i.items.length-1,i.items.length,e.getItemNodeFromIndex,!1)};break;case gd:o=xt({isOpen:!1,highlightedIndex:-1},t.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&e.selectItem&&{selectedItem:i.items[t.highlightedIndex],inputValue:i.itemToString(i.items[t.highlightedIndex])});break;case Zy:o={isOpen:!0,highlightedIndex:ri(i,"highlightedIndex"),inputValue:e.inputValue};break;case zy:o={isOpen:!0,highlightedIndex:wc(i,t,0)};break;case Wy:o={selectedItem:e.selectedItem,inputValue:i.itemToString(e.selectedItem)};break;case jy:o={inputValue:e.inputValue};break;default:return UY(t,e,pQ)}return xt({},t,o)}var nU=["onMouseLeave","refKey","ref"],rU=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],iU=["onClick","onPress","refKey","ref"],sU=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];gQ.stateChangeTypes=pQ;function gQ(t){t===void 0&&(t={});var e=xt({},eU,t),n=e.initialIsOpen,r=e.defaultIsOpen,i=e.items,s=e.scrollIntoView,o=e.environment,l=e.getA11yStatusMessage,a=e.getA11ySelectionMessage,c=e.itemToString,u=KY(e),f=JY(tU,u,e),h=f[0],d=f[1],p=h.isOpen,g=h.highlightedIndex,O=h.selectedItem,x=h.inputValue,m=C.useRef(null),y=C.useRef({}),b=C.useRef(null),S=C.useRef(null),v=C.useRef(!0),w=BY(e),_=C.useRef(),T=iQ({state:h,props:e}),E=C.useCallback(function(K){return y.current[w.getItemId(K)]},[w]);Bk(l,[p,g,x,i],xt({isInitialMount:v.current,previousResultCount:_.current,items:i,environment:o,itemToString:c},h)),Bk(a,[O],xt({isInitialMount:v.current,previousResultCount:_.current,items:i,environment:o,itemToString:c},h));var L=qY({menuElement:m.current,highlightedIndex:g,isOpen:p,itemRefs:y,scrollIntoView:s,getItemNodeFromIndex:E});YY({isInitialMount:v.current}),C.useEffect(function(){var K=n||r||p;K&&b.current&&b.current.focus()},[]),C.useEffect(function(){v.current||(_.current=i.length)});var M=jY(p,[b,m,S],o,function(){d({type:gd,selectItem:!1})}),$=HY();C.useEffect(function(){return v.current=!1,function(){v.current=!0}},[]),C.useEffect(function(){var K;if(!p)y.current={};else if(((K=o.document)==null?void 0:K.activeElement)!==b.current){var ne;b==null||(ne=b.current)==null||ne.focus()}},[p,o]);var V=C.useMemo(function(){return{ArrowDown:function(ne){ne.preventDefault(),d({type:Ry,altKey:ne.altKey,getItemNodeFromIndex:E})},ArrowUp:function(ne){ne.preventDefault(),d({type:Ly,altKey:ne.altKey,getItemNodeFromIndex:E})},Home:function(ne){T.current.state.isOpen&&(ne.preventDefault(),d({type:Ny,getItemNodeFromIndex:E}))},End:function(ne){T.current.state.isOpen&&(ne.preventDefault(),d({type:Dy,getItemNodeFromIndex:E}))},Escape:function(ne){var ae=T.current.state;(ae.isOpen||ae.inputValue||ae.selectedItem||ae.highlightedIndex>-1)&&(ne.preventDefault(),d({type:Iy}))},Enter:function(ne){var ae=T.current.state;!ae.isOpen||ne.which===229||(ne.preventDefault(),d({type:By,getItemNodeFromIndex:E}))},PageUp:function(ne){T.current.state.isOpen&&(ne.preventDefault(),d({type:Vy,getItemNodeFromIndex:E}))},PageDown:function(ne){T.current.state.isOpen&&(ne.preventDefault(),d({type:Fy,getItemNodeFromIndex:E}))}}},[d,T,E]),Z=C.useCallback(function(K){return xt({id:w.labelId,htmlFor:w.inputId},K)},[w]),Y=C.useCallback(function(K,ne){var ae,fe=K===void 0?{}:K,ve=fe.onMouseLeave,Me=fe.refKey,qe=Me===void 0?"ref":Me,mt=fe.ref,wt=ic(fe,nU),kt=ne===void 0?{}:ne;return kt.suppressRefError,xt((ae={},ae[qe]=kf(mt,function(Tt){m.current=Tt}),ae.id=w.menuId,ae.role="listbox",ae["aria-labelledby"]=wt&&wt["aria-label"]?void 0:""+w.labelId,ae.onMouseLeave=Pi(ve,function(){d({type:sQ})}),ae),wt)},[d,$,w]),j=C.useCallback(function(K){var ne,ae,fe=K===void 0?{}:K,ve=fe.item,Me=fe.index,qe=fe.refKey,mt=qe===void 0?"ref":qe,wt=fe.ref,kt=fe.onMouseMove,Tt=fe.onMouseDown,er=fe.onClick;fe.onPress;var Dt=fe.disabled,Nn=ic(fe,rU),I=T.current,F=I.props,X=I.state,ee=ZY(ve,Me,F.items,"Pass either item or index to getItemProps!"),ie=ee[1],N="onClick",B=er,P=function(){ie!==X.highlightedIndex&&(L.current=!1,d({type:oQ,index:ie,disabled:Dt}))},ce=function(){d({type:Xy,index:ie})},Te=function(Zt){return Zt.preventDefault()};return xt((ne={},ne[mt]=kf(wt,function(Ye){Ye&&(y.current[w.getItemId(ie)]=Ye)}),ne.disabled=Dt,ne.role="option",ne["aria-selected"]=""+(ie===X.highlightedIndex),ne.id=w.getItemId(ie),ne),!Dt&&(ae={},ae[N]=Pi(B,ce),ae),{onMouseMove:Pi(kt,P),onMouseDown:Pi(Tt,Te)},Nn)},[d,T,L,w]),U=C.useCallback(function(K){var ne,ae=K===void 0?{}:K,fe=ae.onClick;ae.onPress;var ve=ae.refKey,Me=ve===void 0?"ref":ve,qe=ae.ref,mt=ic(ae,iU),wt=T.current.state,kt=function(){d({type:lQ})};return xt((ne={},ne[Me]=kf(qe,function(Tt){S.current=Tt}),ne["aria-controls"]=w.menuId,ne["aria-expanded"]=wt.isOpen,ne.id=w.toggleButtonId,ne.tabIndex=-1,ne),!mt.disabled&&xt({},{onClick:Pi(fe,kt)}),mt)},[d,T,w]),se=C.useCallback(function(K,ne){var ae,fe=K===void 0?{}:K,ve=fe.onKeyDown,Me=fe.onChange,qe=fe.onInput,mt=fe.onFocus,wt=fe.onBlur;fe.onChangeText;var kt=fe.refKey,Tt=kt===void 0?"ref":kt,er=fe.ref,Dt=ic(fe,sU),Nn=ne===void 0?{}:ne;Nn.suppressRefError;var I=T.current.state,F=function(Te){var Ye=$Y(Te);Ye&&V[Ye]&&V[Ye](Te)},X=function(Te){d({type:Zy,inputValue:Te.target.value})},ee=function(Te){if(I.isOpen&&!M.current.isMouseDown){var Ye=Te.relatedTarget===null&&o.document.activeElement!==o.document.body;d({type:gd,selectItem:!Ye})}},ie=function(){I.isOpen||d({type:zy})},N="onChange",B={};if(!Dt.disabled){var P;B=(P={},P[N]=Pi(Me,qe,X),P.onKeyDown=Pi(ve,F),P.onBlur=Pi(wt,ee),P.onFocus=Pi(mt,ie),P)}return xt((ae={},ae[Tt]=kf(er,function(ce){b.current=ce}),ae["aria-activedescendant"]=I.isOpen&&I.highlightedIndex>-1?w.getItemId(I.highlightedIndex):"",ae["aria-autocomplete"]="list",ae["aria-controls"]=w.menuId,ae["aria-expanded"]=I.isOpen,ae["aria-labelledby"]=Dt&&Dt["aria-label"]?void 0:""+w.labelId,ae.autoComplete="off",ae.id=w.inputId,ae.role="combobox",ae.value=I.inputValue,ae),B,Dt)},[$,T,w,V,d,M,o]),Q=C.useCallback(function(){d({type:aQ})},[d]),me=C.useCallback(function(){d({type:uQ})},[d]),de=C.useCallback(function(){d({type:cQ})},[d]),R=C.useCallback(function(K){d({type:fQ,highlightedIndex:K})},[d]),$e=C.useCallback(function(K){d({type:Wy,selectedItem:K})},[d]),Qe=C.useCallback(function(K){d({type:hQ,inputValue:K})},[d]),ke=C.useCallback(function(){d({type:dQ})},[d]);return{getItemProps:j,getLabelProps:Z,getMenuProps:Y,getInputProps:se,getToggleButtonProps:U,toggleMenu:Q,openMenu:de,closeMenu:me,setHighlightedIndex:R,setInputValue:Qe,selectItem:$e,reset:ke,highlightedIndex:g,isOpen:p,selectedItem:O,inputValue:x}}le.array,le.array,le.array,le.func,le.func,le.func,le.number,le.number,le.number,le.func,le.func,le.string,le.string,le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})});Sc.itemToString,Sc.stateReducer,Sc.environment;const zk=20,mQ=t=>t.suggestions.length>0?k.createElement(oU,{...t}):k.createElement("input",{className:re.textInput,size:40,autoFocus:!0,...t.register(t.inputName)}),oU=({autofocus:t,suggestions:e,control:n,inputName:r,placeholder:i,initialInputValue:s,setValue:o})=>{const[l,a]=k.useState(e.slice(0,zk)),c=hi(ds),u=e.length>0,{isOpen:f,getToggleButtonProps:h,getMenuProps:d,getInputProps:p,highlightedIndex:g,getItemProps:O,selectedItem:x}=gQ({initialInputValue:s,onInputValueChange({inputValue:y=""}){o(r,y),y=y.toLowerCase()||"";const b=[];for(const S of e)if(S.toLowerCase().includes(y)&&(b.push(S),b.length>=zk))break;a(b)},items:l,itemToString(y){return y??""}}),m=f&&l.length>0;return k.createElement("div",{className:re.downshiftAutocompleteContainer},k.createElement("div",{"data-visible-dropdown":m,className:re.downshiftInputWrapper},k.createElement(nY,{name:r,control:n,render:({field:y})=>{const b=p();return k.createElement("input",{...b,name:y.name,placeholder:i,className:re.downshiftInput,size:30,"data-editor-dialog":!0,autoFocus:t})}}),u&&k.createElement("button",{"aria-label":"toggle menu",type:"button",...h()},c("arrow_drop_down"))),k.createElement("div",{className:re.downshiftAutocompleteContainer},k.createElement("ul",{...d(),"data-visible":m},l.map((y,b)=>k.createElement("li",{"data-selected":x===y,"data-highlighted":g===b,key:`${y}${b}`,...O({item:y,index:b})},y)))))},lU=()=>{const[t,e,n,r,i]=Fr(S1,Po,rl,Qs,Jc),s=Hn(bQ),o=Hn(xQ),l=ps(),{register:a,handleSubmit:c,control:u,setValue:f,reset:h}=K3({values:e.type==="editing"?e.initialValues:{}}),d=()=>{h({src:"",title:"",altText:"",width:void 0,height:void 0})};return e.type==="inactive"?null:k.createElement(cI,{open:!0,onOpenChange:p=>{p||(o(),d())}},k.createElement(uI,{container:n==null?void 0:n.current},k.createElement(fI,{className:re.dialogOverlay}),k.createElement(hI,{className:re.dialogContent,onOpenAutoFocus:p=>{p.preventDefault()}},k.createElement(dI,null,l("uploadImage.dialogTitle","Upload an image")),k.createElement("form",{onSubmit:async p=>{p.preventDefault(),p.stopPropagation(),await c(s)(p),d()},className:re.multiFieldForm},r===null?k.createElement("input",{type:"hidden",accept:"image/*",...a("file")}):k.createElement("div",{className:re.formField},k.createElement("label",{htmlFor:"file"},l("uploadImage.uploadInstructions","Upload an image from your device:")),k.createElement("input",{type:"file",accept:"image/*",...a("file")})),k.createElement("div",{className:re.formField},k.createElement("label",{htmlFor:"src"},r!==null?l("uploadImage.addViaUrlInstructions","Or add an image from an URL:"):l("uploadImage.addViaUrlInstructionsNoUpload","Add an image from an URL:")),k.createElement(mQ,{register:a,initialInputValue:e.type==="editing"?e.initialValues.src??"":"",inputName:"src",suggestions:t,setValue:f,control:u,placeholder:l("uploadImage.autoCompletePlaceholder","Select or paste an image src")})),k.createElement("div",{className:re.formField},k.createElement("label",{htmlFor:"alt"},l("uploadImage.alt","Alt:")),k.createElement("input",{type:"text",...a("altText"),className:re.textInput})),k.createElement("div",{className:re.formField},k.createElement("label",{htmlFor:"title"},l("uploadImage.title","Title:")),k.createElement("input",{type:"text",...a("title"),className:re.textInput})),i&&k.createElement("div",{className:re.imageDimensionsContainer},k.createElement("div",{className:re.formField},k.createElement("label",{htmlFor:"width"},l("uploadImage.width","Width:")),k.createElement("input",{type:"number",min:0,...a("width"),className:re.textInput})),k.createElement("div",{className:re.formField},k.createElement("label",{htmlFor:"height"},l("uploadImage.height","Height:")),k.createElement("input",{type:"number",min:0,...a("height"),className:re.textInput}))),k.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},k.createElement("button",{type:"submit",title:l("dialogControls.save","Save"),"aria-label":l("dialogControls.save","Save"),className:it(re.primaryButton)},l("dialogControls.save","Save")),k.createElement(pI,{asChild:!0},k.createElement("button",{type:"reset",title:l("dialogControls.cancel","Cancel"),"aria-label":l("dialogControls.cancel","Cancel"),className:it(re.secondaryButton)},l("dialogControls.cancel","Cancel"))))))))};function tm(t,e,n){return Math.min(Math.max(t,e),n)}const lt={east:1,north:8,south:2,west:4};function aU({onResizeStart:t,onResizeEnd:e,imageRef:n,maxWidth:r,editor:i}){const s=C.useRef(null),o=C.useRef({priority:"",value:"default"}),l=C.useRef({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),a=i.getRootElement(),c=r??(a!==null?a.getBoundingClientRect().width-20:100),u=a!==null?a.getBoundingClientRect().height-20:100,f=100,h=100,d=m=>{const y=m===lt.east||m===lt.west,b=m===lt.north||m===lt.south,S=m&lt.north&&m&lt.west||m&lt.south&&m&lt.east,v=y?"ew":b?"ns":S?"nwse":"nesw";a!==null&&a.style.setProperty("cursor",`${v}-resize`,"important"),document.body!==null&&(document.body.style.setProperty("cursor",`${v}-resize`,"important"),o.current.value=document.body.style.getPropertyValue("-webkit-user-select"),o.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))},p=()=>{a!==null&&a.style.setProperty("cursor","text"),document.body!==null&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",o.current.value,o.current.priority))},g=(m,y)=>{if(!i.isEditable())return;const b=n.current,S=s.current;if(b!==null&&S!==null){m.preventDefault();const{width:v,height:w}=b.getBoundingClientRect(),_=l.current;_.startWidth=v,_.startHeight=w,_.ratio=v/w,_.currentWidth=v,_.currentHeight=w,_.startX=m.clientX,_.startY=m.clientY,_.isResizing=!0,_.direction=y,d(y),t(),S.classList.add(re.imageControlWrapperResizing),b.style.height=`${w}px`,b.style.width=`${v}px`,document.addEventListener("pointermove",O),document.addEventListener("pointerup",x)}},O=m=>{const y=n.current,b=l.current,S=b.direction&(lt.east|lt.west),v=b.direction&(lt.south|lt.north);if(y!==null&&b.isResizing)if(S&&v){let w=Math.floor(b.startX-m.clientX);w=b.direction&lt.east?-w:w;const _=tm(b.startWidth+w,f,c),T=_/b.ratio;y.style.width=`${_}px`,y.style.height=`${T}px`,b.currentHeight=T,b.currentWidth=_}else if(v){let w=Math.floor(b.startY-m.clientY);w=b.direction&lt.south?-w:w;const _=tm(b.startHeight+w,h,u);y.style.height=`${_}px`,b.currentHeight=_}else{let w=Math.floor(b.startX-m.clientX);w=b.direction&lt.east?-w:w;const _=tm(b.startWidth+w,f,c);y.style.width=`${_}px`,b.currentWidth=_}},x=()=>{const m=n.current,y=l.current,b=s.current;if(m!==null&&b!==null&&y.isResizing){const S=y.currentWidth,v=y.currentHeight;y.startWidth=0,y.startHeight=0,y.ratio=0,y.startX=0,y.startY=0,y.currentWidth=0,y.currentHeight=0,y.isResizing=!1,b.classList.remove(re.imageControlWrapperResizing),p(),e(S,v),document.removeEventListener("pointermove",O),document.removeEventListener("pointerup",x)}};return C.createElement("div",{ref:s},C.createElement("div",{className:it(re.imageResizer,re.imageResizerN),onPointerDown:m=>{g(m,lt.north)}}),C.createElement("div",{className:it(re.imageResizer,re.imageResizerNe),onPointerDown:m=>{g(m,lt.north|lt.east)}}),C.createElement("div",{className:it(re.imageResizer,re.imageResizerE),onPointerDown:m=>{g(m,lt.east)}}),C.createElement("div",{className:it(re.imageResizer,re.imageResizerSe),onPointerDown:m=>{g(m,lt.south|lt.east)}}),C.createElement("div",{className:it(re.imageResizer,re.imageResizerS),onPointerDown:m=>{g(m,lt.south)}}),C.createElement("div",{className:it(re.imageResizer,re.imageResizerSw),onPointerDown:m=>{g(m,lt.south|lt.west)}}),C.createElement("div",{className:it(re.imageResizer,re.imageResizerW),onPointerDown:m=>{g(m,lt.west)}}),C.createElement("div",{className:it(re.imageResizer,re.imageResizerNw),onPointerDown:m=>{g(m,lt.north|lt.west)}}))}const cU="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(`
125
+ <svg id="imgLoadError" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
126
+ <rect x="0" y="0" width="100" height="100" fill="none" stroke="red" stroke-width="4" stroke-dasharray="4" />
127
+ <text x="50" y="55" text-anchor="middle" font-size="20" fill="red">⚠️</text>
128
+ </svg>
129
+ `),uU={__cache:{},read(t){if(this.__cache[t]||(this.__cache[t]=new Promise(e=>{const n=new Image;n.onerror=()=>{this.__cache[t]=cU,e()},n.onload=()=>{this.__cache[t]=t,e()},n.src=t})),this.__cache[t]instanceof Promise)throw this.__cache[t];return this.__cache[t]}};function fU({title:t,alt:e,className:n,imageRef:r,src:i,width:s,height:o}){return k.createElement("img",{className:n??void 0,alt:e,src:uU.read(i),title:t,ref:r,draggable:"false",width:s,height:o})}function hU({src:t,title:e,alt:n,nodeKey:r,width:i,height:s,rest:o}){const[l,a,c,u,f,h]=Fr(C1,w1,Jc,k1,Ir,_1),d=k.useRef(null),p=k.useRef(null),[g,O,x]=$3(r),[m]=hn(),[y,b]=k.useState(null),S=k.useRef(null),[v,w]=k.useState(!1),[_,T]=k.useState(null),[E,L]=k.useState(null),M=k.useCallback(Q=>{if(g&&Qt(be())){Q.preventDefault();const de=ci(r);md(de)&&de.remove()}return!1},[g,r]),$=k.useCallback(Q=>{const me=be(),de=p.current;return g&&Qt(me)&&me.getNodes().length===1&&de!==null&&de!==document.activeElement?(Q.preventDefault(),de.focus(),!0):!1},[g]),V=k.useCallback(Q=>p.current===Q.target?(yi(null),m.update(()=>{O(!0);const me=m.getRootElement();me!==null&&me.focus()}),!0):!1,[m,O]);k.useEffect(()=>{u?(async()=>{E||L(t);const me=await u(t);T(me)})().catch(me=>{console.error(me)}):T(t)},[t,u,E]),k.useEffect(()=>{if(c&&d.current){const{current:Q}=d;Xk(Q,"width",i),Xk(Q,"height",s)}},[c,i,s]),k.useEffect(()=>{let Q=!0;const me=In(m.registerUpdateListener(({editorState:de})=>{Q&&b(de.read(()=>be()))}),m.registerCommand(CA,(de,R)=>(S.current=R,!1),dt),m.registerCommand(ey,de=>{const R=de;return v?!0:R.target===d.current?(R.shiftKey?O(!g):(x(),O(!0)),!0):!1},dt),m.registerCommand(ty,de=>de.target===d.current?(de.preventDefault(),!0):!1,dt),m.registerCommand(SA,M,dt),m.registerCommand(vA,M,dt),m.registerCommand(ny,$,dt),m.registerCommand(Qp,V,dt));return()=>{Q=!1,me()}},[x,m,v,g,r,M,$,V,O]);const Z=(Q,me)=>{setTimeout(()=>{w(!1)},200),m.update(()=>{const de=ci(r);md(de)&&de.setWidthAndHeight(Q,me)})},Y=()=>{w(!0)},j=Qt(y),U=g,se=k.useMemo(()=>{if(o.length===0)return null;const Q=o.find(me=>me.type==="mdxJsxAttribute"&&(me.name==="class"||me.name==="className"));return Q?Q.value:null},[o]);return _!==null?k.createElement(k.Suspense,{fallback:l?k.createElement(l,null):null},k.createElement("div",{className:re.imageWrapper,"data-editor-block-type":"image"},k.createElement("div",{draggable:j},k.createElement(fU,{width:i,height:s,className:it({[re.focusedImage]:U},se),src:_,title:e??"",alt:n??"",imageRef:d})),j&&U&&!a&&k.createElement(aU,{editor:m,imageRef:d,onResizeStart:Y,onResizeEnd:Z}),f||k.createElement(h,{nodeKey:r,imageSource:_,initialImagePath:E,title:e??"",alt:n??"",width:i,height:s}))):null}const Xk=(t,e,n)=>{typeof n=="number"?t.style[e]=`${n}px`:t.style.removeProperty(e)};var dU=Object.defineProperty,pU=(t,e,n)=>e in t?dU(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hl=(t,e,n)=>(pU(t,typeof e!="symbol"?e+"":e,n),n);function gU(t){if(t instanceof HTMLImageElement){const{alt:e,src:n,title:r,width:i,height:s}=t;return{node:sl({altText:e,src:n,title:r,width:i,height:s})}}return null}class Xu extends Nu{constructor(e,n,r,i,s,o,l){super(l),hl(this,"__src"),hl(this,"__altText"),hl(this,"__title"),hl(this,"__width"),hl(this,"__height"),hl(this,"__rest"),this.__src=e,this.__title=r,this.__altText=n,this.__width=i??"inherit",this.__height=s??"inherit",this.__rest=o??[]}static getType(){return"image"}static clone(e){return new Xu(e.__src,e.__altText,e.__title,e.__width,e.__height,e.__rest,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__src=e.__src,this.__altText=e.__altText,this.__title=e.__title,this.__width=e.__width,this.__height=e.__height,this.__rest=e.__rest}static importJSON(e){const{altText:n,title:r,src:i,width:s,rest:o,height:l}=e;return sl({altText:n,title:r,src:i,height:l,width:s,rest:o})}exportDOM(){const e=document.createElement("img");return e.setAttribute("src",this.__src),e.setAttribute("alt",this.__altText),this.__title&&e.setAttribute("title",this.__title),this.__width&&e.setAttribute("width",this.__width.toString()),this.__height&&e.setAttribute("height",this.__height.toString()),{element:e}}static importDOM(){return{img:()=>({conversion:gU,priority:0})}}exportJSON(){return{altText:this.getAltText(),title:this.getTitle(),height:this.__height==="inherit"?0:this.__height,width:this.__width==="inherit"?0:this.__width,src:this.getSrc(),rest:this.__rest,type:"image",version:1}}setWidthAndHeight(e,n){const r=this.getWritable();r.__width=e,r.__height=n}createDOM(e,n){const r=document.createElement("span"),s=e.theme.image;return s!==void 0&&(r.className=s),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(e){this.getWritable().__title=e}setSrc(e){this.getWritable().__src=e}setAltText(e){this.getWritable().__altText=e??""}shouldBeSerializedAsElement(){return this.__width!=="inherit"||this.__height!=="inherit"||this.__rest.length>0}decorate(e){return k.createElement(hU,{src:this.getSrc(),title:this.getTitle(),nodeKey:this.getKey(),width:this.__width,height:this.__height,alt:this.__altText,rest:this.__rest})}}function sl(t){const{altText:e,title:n,src:r,key:i,width:s,height:o,rest:l}=t;return new Xu(r,e,n,s,o,l,i)}function md(t){return t instanceof Xu}const mU={testLexicalNode:md,visitLexicalNode({mdastParent:t,lexicalNode:e,actions:n}){if(e.shouldBeSerializedAsElement()){const r=new Image;e.getHeight()!=="inherit"&&(r.height=e.getHeight()),e.getWidth()!=="inherit"&&(r.width=e.getWidth()),e.getAltText()&&(r.alt=e.getAltText()),e.getTitle()&&(r.title=e.getTitle());for(const i of e.getRest())i.type==="mdxJsxAttribute"&&typeof i.value=="string"&&r.setAttribute(i.name,i.value);n.appendToParent(t,{type:"html",value:r.outerHTML.replace(/>$/,` src="${e.getSrc()}" />`)})}else n.appendToParent(t,{type:"image",url:e.getSrc(),alt:e.getAltText(),title:e.getTitle()})}},OU={testNode:"image",visitNode({mdastNode:t,actions:e}){e.addAndStepInto(sl({src:t.url,altText:t.alt??"",title:t.title??""}))}},xU={testNode:t=>t.type==="html"&&t.value.trim().startsWith("<img"),visitNode({mdastNode:t,lexicalParent:e}){const n=document.createElement("div");n.innerHTML=t.value;const r=n.querySelector("img");if(!r)throw new Error("Invalid HTML image");const i=r.src,s=r.alt,o=r.title,l=r.width,a=r.height,c=sl({src:i||"",altText:s,title:o,width:l,height:a});if(e.getType()==="root"){const u=St();u.append(c),e.append(u)}else e.append(c)}};function ja(t,e){const n=t.attributes.find(r=>r.type==="mdxJsxAttribute"&&r.name===e);if(n)return n.value}const yU={testNode:t=>(t.type==="mdxJsxTextElement"||t.type==="mdxJsxFlowElement")&&t.name==="img",visitNode({mdastNode:t,lexicalParent:e}){const n=ja(t,"src");if(!n)return;const r=ja(t,"alt")??"",i=ja(t,"title"),s=ja(t,"height"),o=ja(t,"width"),l=t.attributes.filter(c=>c.type==="mdxJsxAttribute"&&!["src","alt","title","height","width"].includes(c.name)),a=sl({src:n,altText:r,title:i,width:o?parseInt(o,10):void 0,height:s?parseInt(s,10):void 0,rest:l});if(e.getType()==="root"){const c=St();c.append(a),e.append(c)}else e.append(a)}},Hy=Pt(t=>{t.sub(t.pipe(Hy,Ct(bt)),([e,n])=>{n==null||n.update(()=>{const r=sl({altText:e.altText??"",src:e.src,title:e.title??"",width:Jl(e.width),height:Jl(e.height)});Ca([r]),ar(r.getParentOrThrow())&&sy(r,St).selectEnd()})})}),bU=Pt(t=>{t.sub(t.pipe(bU,Ct(Qs)),([e,n])=>{const r=i=>{t.pub(Hy,{...e,src:i})};"file"in e?n==null||n(e.file).then(r).catch(i=>{throw i}):r(e.src)})}),S1=ye([]),w1=ye(!1),Qs=ye(null),k1=ye(null),C1=ye(null),Po=ye({type:"inactive"},t=>{t.sub(t.pipe(bQ,Ct(bt,Qs,Po,Jc)),([e,n,r,i,s])=>{const o=i.type==="editing"?l=>{n==null||n.update(()=>{const{nodeKey:a}=i,c=ci(a);if(c.setTitle(e.title),c.setAltText(e.altText),c.setSrc(l),s){const u=Jl(e.width),f=Jl(e.height);c.setWidthAndHeight(u??"inherit",f??"inherit")}}),t.pub(Po,{type:"inactive"})}:l=>{t.pub(Hy,{...e,src:l}),t.pub(Po,{type:"inactive"})};e.file&&e.file.length>0?r==null||r(e.file.item(0)).then(o).catch(l=>{throw l}):e.src&&o(e.src)}),t.pub(qc,e=>{const n=t.getValue(Qs);return In(e.registerCommand(Od,r=>{const i=sl(r);return Ca([i]),ar(i.getParentOrThrow())&&sy(i,St).selectEnd(),!0},Fe),e.registerCommand(ty,r=>kU(r),NO),e.registerCommand(dA,r=>CU(r,!!n),dt),e.registerCommand(pA,r=>_U(r,e,t.getValue(Qs)),NO),e.registerCommand(iy,r=>{var i,s;if(!n){let c=Array.from(((i=r.clipboardData)==null?void 0:i.items)??[]);return c=c.filter(u=>u.type.includes("text")),!c.length||c.length===0}const o=Array.from(((s=r.clipboardData)==null?void 0:s.items)??[]);if(o.some(c=>!c.type.includes("image"))||!o.length||o.length===0)return!1;const a=t.getValue(Qs);return Promise.all(o.map(c=>a(c.getAsFile()))).then(c=>{c.forEach(u=>{e.dispatchCommand(Od,{src:u,altText:""})})}).catch(c=>{throw c}),!0},es))})}),vU=ao(t=>{t.link(t.pipe(vU,yE({type:"new"})),Po)}),OQ=Pt(t=>{t.link(t.pipe(OQ,Zs(e=>({type:"editing",...e}))),Po)}),xQ=ao(t=>{t.link(t.pipe(xQ,yE({type:"inactive"})),Po)}),yQ=ye(!1),Jc=ye(!1),bQ=Pt(),_1=ye(O1),Jl=t=>{if(typeof t>"u")return;const e=parseInt(String(t),10);return Number.isNaN(e)?void 0:e},Qae=dr({init(t,e){t.pubIn({[mi]:[OU,xU,yU],[fs]:Xu,[hs]:mU,[il]:(e==null?void 0:e.ImageDialog)??lU,[Qs]:(e==null?void 0:e.imageUploadHandler)??null,[S1]:(e==null?void 0:e.imageAutocompleteSuggestions)??[],[w1]:!!(e!=null&&e.disableImageResize),[yQ]:!!(e!=null&&e.disableImageSettingsButton),[Jc]:!!(e!=null&&e.allowSetImageDimensions),[k1]:(e==null?void 0:e.imagePreviewHandler)??null,[_1]:(e==null?void 0:e.EditImageToolbar)??O1,[C1]:(e==null?void 0:e.imagePlaceholder)??bk})},update(t,e){t.pubIn({[Qs]:(e==null?void 0:e.imageUploadHandler)??null,[S1]:(e==null?void 0:e.imageAutocompleteSuggestions)??[],[w1]:!!(e!=null&&e.disableImageResize),[k1]:(e==null?void 0:e.imagePreviewHandler)??null,[Jc]:!!(e!=null&&e.allowSetImageDimensions),[_1]:(e==null?void 0:e.EditImageToolbar)??O1,[C1]:(e==null?void 0:e.imagePlaceholder)??bk})}}),SU=t=>E3?(t??window).getSelection():null,Od=bi("INSERT_IMAGE_COMMAND"),wU="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function kU(t){const e=qy();if(!e)return!1;const n=t.dataTransfer;if(!n)return!1;n.setData("text/plain","_");const r=document.createElement("img");return r.src=wU,n.setDragImage(r,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{altText:e.__altText,title:e.__title,key:e.getKey(),src:e.__src},type:"image"})),!0}function CU(t,e){var n;if(e){let i=Array.from(((n=t.dataTransfer)==null?void 0:n.items)??[]);if(i=i.filter(s=>s.type.includes("image")),i.length>0)return t.preventDefault(),!0}return qy()?(vQ(t)||t.preventDefault(),!0):!1}function _U(t,e,n){var r;let i=Array.from(((r=t.dataTransfer)==null?void 0:r.items)??[]);if(i=i.filter(l=>l.type.includes("image")),i.length>0&&n!==null)return t.preventDefault(),Promise.all(i.map(l=>l.kind==="string"?new Promise(a=>{l.getAsString(a)}):n(l.getAsFile()))).then(l=>{l.forEach(a=>{e.dispatchCommand(Od,{src:a,altText:""})})}).catch(l=>{throw l}),!0;const s=qy();if(!s)return!1;const o=TU(t);if(!o)return!1;if(t.preventDefault(),vQ(t)){const l=EU(t);s.remove();const a=Lu();l!=null&&a.applyDOMRange(l),yi(a),e.dispatchCommand(Od,o)}return!0}function qy(){const t=be();if(!Qt(t))return null;const n=t.getNodes()[0];return md(n)?n:null}function TU(t){var e;const n=(e=t.dataTransfer)==null?void 0:e.getData("application/x-lexical-drag");if(!n)return null;const{type:r,data:i}=JSON.parse(n);return r!=="image"?null:i}function vQ(t){const e=t.target;return!!(e&&e instanceof HTMLElement&&e.parentElement)}function EU(t){let e;const n=t.target,r=n==null?null:n.nodeType===9?n.defaultView:n.ownerDocument.defaultView,i=SU(r);if(document.caretRangeFromPoint)e=document.caretRangeFromPoint(t.clientX,t.clientY);else if(t.rangeParent&&i!==null)i.collapse(t.rangeParent,t.rangeOffset??0),e=i.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return e}function Mae(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const PU={testNode:"blockquote",visitNode({actions:t}){t.addAndStepInto(Np())}},AU={testLexicalNode:XO,visitLexicalNode:({lexicalNode:t,mdastParent:e,actions:n})=>{const r={type:"paragraph",children:[]};n.appendToParent(e,{type:"blockquote",children:[r]}),n.visitChildren(t,r)}},Rae=dr({init(t){t.pubIn({[Ta]:"quote",[mi]:PU,[fs]:Ip,[hs]:AU})}});function Wk(){let t=Ls;return{publish:()=>{t()},subscribe:e=>{t=e}}}var $U=Object.defineProperty,QU=(t,e,n)=>e in t?$U(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vs=(t,e,n)=>(QU(t,typeof e!="symbol"?e+"":e,n),n);class Aa extends Nu{constructor(e,n,r,i){super(i),vs(this,"__code"),vs(this,"__meta"),vs(this,"__language"),vs(this,"__focusEmitter",Wk()),vs(this,"setCode",s=>{s!==this.__code&&(this.getWritable().__code=s)}),vs(this,"setMeta",s=>{s!==this.__meta&&(this.getWritable().__meta=s)}),vs(this,"setLanguage",s=>{s!==this.__language&&(this.getWritable().__language=s)}),vs(this,"select",()=>{this.__focusEmitter.publish()}),this.__code=e,this.__meta=r,this.__language=n}static getType(){return"codeblock"}static clone(e){return new Aa(e.__code,e.__language,e.__meta,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__code=e.__code,this.__meta=e.__meta,this.__language=e.__language,this.__focusEmitter=Wk()}static importJSON(e){const{code:n,meta:r,language:i}=e;return Wu({code:n,language:i,meta:r})}static importDOM(){return{pre:()=>({conversion:IU,priority:3})}}exportJSON(){return{code:this.getCode(),language:this.getLanguage(),meta:this.getMeta(),type:"codeblock",version:1}}createDOM(e,n){return document.createElement("div")}updateDOM(){return!1}getCode(){return this.__code}getMeta(){return this.__meta}getLanguage(){return this.__language}decorate(e){return k.createElement(RU,{parentEditor:e,code:this.getCode(),meta:this.getMeta(),language:this.getLanguage(),codeBlockNode:this,nodeKey:this.getKey(),focusEmitter:this.__focusEmitter})}isInline(){return!1}}const SQ=k.createContext(null),MU=({parentEditor:t,lexicalNode:e,children:n})=>{const r=k.useMemo(()=>({lexicalNode:e,parentEditor:t,setCode:i=>{t.update(()=>{e.setCode(i),setTimeout(()=>{t.dispatchCommand(jc,void 0)},0)})},setLanguage:i=>{t.update(()=>{e.setLanguage(i)})},setMeta:i=>{t.update(()=>{e.setMeta(i)})}}),[e,t]);return k.createElement(SQ.Provider,{value:r},n)};function T1(){const t=k.useContext(SQ);if(!t)throw new Error("useCodeBlockEditor must be used within a CodeBlockEditor");return t}const RU=t=>{const e=hi(Bu),n=hi(Yy);let r=e.sort((a,c)=>c.priority-a.priority).find(a=>a.match(t.language||"",t.meta||""));if(r??(r=e.find(a=>a.match(n||"",t.meta||""))),!r)throw new Error(`No CodeBlockEditor registered for language=${t.language} meta=${t.meta}`);const i=r.Editor,{codeBlockNode:s,parentEditor:o,...l}=t;return k.createElement(MU,{parentEditor:t.parentEditor,lexicalNode:t.codeBlockNode},k.createElement(i,{...l}))};function Wu(t){const{code:e="",language:n="",meta:r=""}=t;return new Aa(e,n,r)}function LU(t){return t instanceof Aa}function IU(t){const e=t,n=e.textContent,r=t.getAttribute("class")??"",i=t.getAttribute("data-language")??"",s=/language-(\w+)/.exec(r),o=s?s[1]:i,l=e.getAttribute("data-meta")??"";return{node:Wu({code:n,language:o,meta:l})}}const NU={testLexicalNode:LU,visitLexicalNode:({lexicalNode:t,actions:e})=>{e.addAndStepInto("code",{value:t.getCode(),lang:t.getLanguage(),meta:t.getMeta()})}},DU={testNode:(t,{codeBlockEditorDescriptors:e})=>t.type==="code"?e.find(r=>r.match(t.lang,t.meta))!==void 0:!1,visitNode({mdastNode:t,actions:e}){e.addAndStepInto(Wu({code:t.value,language:t.lang,meta:t.meta}))}},Yy=ye(""),wQ=Pt(t=>{t.link(t.pipe(wQ,Ct(Yy),Zs(([e,n])=>()=>Wu({language:n,...e}))),vy)}),VU=dn(Bu),Lae=dr({update(t,e){t.pub(Yy,(e==null?void 0:e.defaultCodeBlockLanguage)??"")},init(t,e){t.pubIn({[Ta]:"codeblock",[Bu]:(e==null?void 0:e.codeBlockEditorDescriptors)??[],[mi]:DU,[fs]:Aa,[hs]:NU})}});let E1=[],kQ=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?kQ:E1).push(n=n+t[e])})();function FU(t){if(t<768)return!1;for(let e=0,n=E1.length;;){let r=e+n>>1;if(t<E1[r])n=r;else if(t>=kQ[r])e=r+1;else return!0;if(e==n)return!1}}function jk(t){return t>=127462&&t<=127487}const Hk=8205;function BU(t,e,n=!0,r=!0){return(n?CQ:ZU)(t,e,r)}function CQ(t,e,n){if(e==t.length)return e;e&&_Q(t.charCodeAt(e))&&TQ(t.charCodeAt(e-1))&&e--;let r=nm(t,e);for(e+=qk(r);e<t.length;){let i=nm(t,e);if(r==Hk||i==Hk||n&&FU(i))e+=qk(i),r=i;else if(jk(i)){let s=0,o=e-2;for(;o>=0&&jk(nm(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function ZU(t,e,n){for(;e>0;){let r=CQ(t,e-2,n);if(r<e)return r;e--}return 0}function nm(t,e){let n=t.charCodeAt(e);if(!TQ(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return _Q(r)?(n-55296<<10)+(r-56320)+65536:n}function _Q(t){return t>=56320&&t<57344}function TQ(t){return t>=55296&&t<56320}function qk(t){return t<65536?1:2}let Ge=class EQ{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=ea(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),Jr.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=ea(this,e,n);let r=[];return this.decompose(e,n,r,0),Jr.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new kc(this),s=new kc(e);for(let o=n,l=n;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(l+=i.value.length,i.done||l>=r)return!0}}iter(e=1){return new kc(this,e)}iterRange(e,n=this.length){return new PQ(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new AQ(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?EQ.empty:e.length<=32?new Et(e):Jr.from(Et.split(e,[]))}};class Et extends Ge{constructor(e,n=zU(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.text[s],l=i+o.length;if((n?r:l)>=e)return new XU(i,l,r,o);i=l+1,r++}}decompose(e,n,r,i){let s=e<=0&&n>=this.length?this:new Et(Yk(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),l=xh(s.text,o.text.slice(),0,s.length);if(l.length<=32)r.push(new Et(l,o.length+s.length));else{let a=l.length>>1;r.push(new Et(l.slice(0,a)),new Et(l.slice(a)))}}else r.push(s)}replace(e,n,r){if(!(r instanceof Et))return super.replace(e,n,r);[e,n]=ea(this,e,n);let i=xh(this.text,xh(r.text,Yk(this.text,0,e)),n),s=this.length+r.length-(n-e);return i.length<=32?new Et(i,s):Jr.from(Et.split(i,[]),s)}sliceString(e,n=this.length,r=`
130
+ `){[e,n]=ea(this,e,n);let i="";for(let s=0,o=0;s<=n&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(i+=r),e<a&&n>s&&(i+=l.slice(Math.max(0,e-s),n-s)),s=a+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(n.push(new Et(r,i)),r=[],i=-1);return i>-1&&n.push(new Et(r,i)),n}}class Jr extends Ge{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.children[s],l=i+o.length,a=r+o.lines-1;if((n?a:l)>=e)return o.lineInner(e,n,r,i);i=l+1,r=a+1}}decompose(e,n,r,i){for(let s=0,o=0;o<=n&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&n>=o){let c=i&((o<=e?1:0)|(a>=n?2:0));o>=e&&a<=n&&!c?r.push(l):l.decompose(e-o,n-o,r,c)}o=a+1}}replace(e,n,r){if([e,n]=ea(this,e,n),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],l=s+o.length;if(e>=s&&n<=l){let a=o.replace(e-s,n-s,r),c=this.lines-o.lines+a.lines;if(a.lines<c>>4&&a.lines>c>>6){let u=this.children.slice();return u[i]=a,new Jr(u,this.length-(n-e)+r.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
131
+ `){[e,n]=ea(this,e,n);let i="";for(let s=0,o=0;s<this.children.length&&o<=n;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(i+=r),e<a&&n>o&&(i+=l.sliceString(e-o,n-o,r)),o=a+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Jr))return 0;let r=0,[i,s,o,l]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,s+=n){if(i==o||s==l)return r;let a=this.children[i],c=e.children[s];if(a!=c)return r+a.scanIdentical(c,n);r+=a.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let d of e)r+=d.lines;if(r<32){let d=[];for(let p of e)p.flatten(d);return new Et(d,n)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,l=[],a=0,c=-1,u=[];function f(d){let p;if(d.lines>s&&d instanceof Jr)for(let g of d.children)f(g);else d.lines>o&&(a>o||!a)?(h(),l.push(d)):d instanceof Et&&a&&(p=u[u.length-1])instanceof Et&&d.lines+p.lines<=32?(a+=d.lines,c+=d.length+1,u[u.length-1]=new Et(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>i&&h(),a+=d.lines,c+=d.length+1,u.push(d))}function h(){a!=0&&(l.push(u.length==1?u[0]:Jr.from(u,c)),c=-1,a=u.length=0)}for(let d of e)f(d);return h(),l.length==1?l[0]:new Jr(l,n)}}Ge.empty=new Et([""],0);function zU(t){let e=-1;for(let n of t)e+=n.length+1;return e}function xh(t,e,n=0,r=1e9){for(let i=0,s=0,o=!0;s<t.length&&i<=r;s++){let l=t[s],a=i+l.length;a>=n&&(a>r&&(l=l.slice(0,r-i)),i<n&&(l=l.slice(n-i)),o?(e[e.length-1]+=l,o=!1):e.push(l)),i=a+1}return e}function Yk(t,e,n){return xh(t,[""],e,n)}class kc{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof Et?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,l=i instanceof Et?i.text.length:i.children.length;if(o==(n>0?l:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
132
+ `,this;e--}else if(i instanceof Et){let a=i.text[o+(n<0?-1:0)];if(this.offsets[r]+=n,a.length>Math.max(0,e))return this.value=e==0?a:n>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=i.children[o+(n<0?-1:0)];e>a.length?(e-=a.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(a),this.offsets.push(n>0?1:(a instanceof Et?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class PQ{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new kc(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class AQ{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ge.prototype[Symbol.iterator]=function(){return this.iter()},kc.prototype[Symbol.iterator]=PQ.prototype[Symbol.iterator]=AQ.prototype[Symbol.iterator]=function(){return this});let XU=class{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}};function ea(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function qt(t,e,n=!0,r=!0){return BU(t,e,n,r)}function WU(t){return t>=56320&&t<57344}function jU(t){return t>=55296&&t<56320}function En(t,e){let n=t.charCodeAt(e);if(!jU(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return WU(r)?(n-55296<<10)+(r-56320)+65536:n}function Uy(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function ei(t){return t<65536?1:2}const P1=/\r\n?|\n/;var tn=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(tn||(tn={}));class ui{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let s=this.sections[n++],o=this.sections[n++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,n=!1){A1(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new ui(e)}composeDesc(e){return this.empty?e:e.empty?this:$Q(this,e)}mapDesc(e,n=!1){return e.empty?this:$1(this,e,n)}mapPos(e,n=-1,r=tn.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],c=i+l;if(a<0){if(c>e)return s+(e-i);s+=l}else{if(r!=tn.Simple&&c>=e&&(r==tn.TrackDel&&i<e&&c>e||r==tn.TrackBefore&&i<e||r==tn.TrackAfter&&c>e))return null;if(c>e||c==e&&n<0&&!l)return e==i||n<0?s:s+a;s+=a}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let s=this.sections[r++],o=this.sections[r++],l=i+s;if(o>=0&&i<=n&&l>=e)return i<e&&l>n?"cover":!0;i=l}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ui(e)}static create(e){return new ui(e)}}class Vt extends ui{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return A1(this,(n,r,i,s,o)=>e=e.replace(i,i+(r-n),o),!1),e}mapDesc(e,n=!1){return $1(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,s=0;i<n.length;i+=2){let o=n[i],l=n[i+1];if(l>=0){n[i]=l,n[i+1]=o;let a=i>>1;for(;r.length<a;)r.push(Ge.empty);r.push(o?e.slice(s,s+o):Ge.empty)}s+=o}return new Vt(n,r)}compose(e){return this.empty?e:e.empty?this:$Q(this,e,!0)}map(e,n=!1){return e.empty?this:$1(this,e,n,!0)}iterChanges(e,n=!1){A1(this,e,n)}get desc(){return ui.create(this.sections)}filter(e){let n=[],r=[],i=[],s=new eu(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&s.len==0;){if(s.done)break e;let u=Math.min(s.len,a-l);ln(i,u,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;ln(n,u,f),f>0&&Ms(r,n,s.text),s.forward(u),l+=u}let c=e[o++];for(;l<c;){if(s.done)break e;let u=Math.min(s.len,c-l);ln(n,u,-1),ln(i,u,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(u),l+=u}}return{changes:new Vt(n,r),filtered:ui.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],s=[],o=0,l=null;function a(u=!1){if(!u&&!i.length)return;o<n&&ln(i,n-o,-1);let f=new Vt(i,s);l=l?l.compose(f.map(l)):f,i=[],s=[],o=0}function c(u){if(Array.isArray(u))for(let f of u)c(f);else if(u instanceof Vt){if(u.length!=n)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${n})`);a(),l=l?l.compose(u.map(l)):u}else{let{from:f,to:h=f,insert:d}=u;if(f>h||f<0||h>n)throw new RangeError(`Invalid change range ${f} to ${h} (in doc of length ${n})`);let p=d?typeof d=="string"?Ge.of(d.split(r||P1)):d:Ge.empty,g=p.length;if(f==h&&g==0)return;f<o&&a(),f>o&&ln(i,f-o,-1),ln(i,h-f,g),Ms(s,i,p),o=h}}return c(e),a(!l),l}static empty(e){return new Vt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;r.length<i;)r.push(Ge.empty);r[i]=Ge.of(s.slice(1)),n.push(s[0],r[i].length)}}}return new Vt(n,r)}static createSet(e,n){return new Vt(e,n)}}function ln(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Ms(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(Ge.empty);t.push(n)}}function A1(t,e,n){let r=t.inserted;for(let i=0,s=0,o=0;o<t.sections.length;){let l=t.sections[o++],a=t.sections[o++];if(a<0)i+=l,s+=l;else{let c=i,u=s,f=Ge.empty;for(;c+=l,u+=a,a&&r&&(f=f.append(r[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],a=t.sections[o++];e(i,c,s,u,f),i=c,s=u}}}function $1(t,e,n,r=!1){let i=[],s=r?[]:null,o=new eu(t),l=new eu(e);for(let a=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let c=Math.min(o.len,l.len);ln(i,c,-1),o.forward(c),l.forward(c)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!n))){let c=l.len;for(ln(i,l.ins,-1);c;){let u=Math.min(o.len,c);o.ins>=0&&a<o.i&&o.len<=u&&(ln(i,0,o.ins),s&&Ms(s,i,o.text),a=o.i),o.forward(u),c-=u}l.next()}else if(o.ins>=0){let c=0,u=o.len;for(;u;)if(l.ins==-1){let f=Math.min(u,l.len);c+=f,u-=f,l.forward(f)}else if(l.ins==0&&l.len<u)u-=l.len,l.next();else break;ln(i,c,a<o.i?o.ins:0),s&&a<o.i&&Ms(s,i,o.text),a=o.i,o.forward(o.len-u)}else{if(o.done&&l.done)return s?Vt.createSet(i,s):ui.create(i);throw new Error("Mismatched change set lengths")}}}function $Q(t,e,n=!1){let r=[],i=n?[]:null,s=new eu(t),o=new eu(e);for(let l=!1;;){if(s.done&&o.done)return i?Vt.createSet(r,i):ui.create(r);if(s.ins==0)ln(r,s.len,0,l),s.next();else if(o.len==0&&!o.done)ln(r,0,o.ins,l),i&&Ms(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(s.len2,o.len),c=r.length;if(s.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;ln(r,a,u,l),i&&u&&Ms(i,r,o.text)}else o.ins==-1?(ln(r,s.off?0:s.len,a,l),i&&Ms(i,r,s.textBit(a))):(ln(r,s.off?0:s.len,o.off?0:o.ins,l),i&&!o.off&&Ms(i,r,o.text));l=(s.ins>a||o.ins>=0&&o.len>a)&&(l||r.length>c),s.forward2(a),o.forward(a)}}}}class eu{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Ge.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Ge.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ko{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ko(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return H.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return H.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return H.range(e.anchor,e.head)}static create(e,n,r){return new ko(e,n,r)}}class H{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:H.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new H([this.main],0)}addRange(e,n=!0){return H.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,H.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new H(e.ranges.map(n=>ko.fromJSON(n)),e.main)}static single(e,n=e){return new H([H.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return H.normalized(e.slice(),n);r=s.to}return new H(e,n)}static cursor(e,n=0,r,i){return ko.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?ko.create(n,e,48|s):ko.create(e,n,(n>e?8:0)|s)}static normalized(e,n=0){let r=e[n];e.sort((i,s)=>i.from-s.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,a=Math.max(s.to,o.to);i<=n&&n--,e.splice(--i,2,s.anchor>s.head?H.range(a,l):H.range(l,a))}}return new H(e,n)}}function QQ(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Gy=0;class ge{constructor(e,n,r,i,s){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=Gy++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new ge(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:Ky),!!e.static,e.enables)}of(e){return new yh([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new yh(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new yh(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function Ky(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class yh{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=Gy++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,c=!1,u=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?c=!0:(((n=e[f.id])!==null&&n!==void 0?n:1)&1)==0&&u.push(e[f.id]);return{create(f){return f.values[o]=r(f),1},update(f,h){if(a&&h.docChanged||c&&(h.docChanged||h.selection)||Q1(f,u)){let d=r(f);if(l?!Uk(d,f.values[o],i):!i(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,h)=>{let d,p=h.config.address[s];if(p!=null){let g=yd(h,p);if(this.dependencies.every(O=>O instanceof ge?h.facet(O)===f.facet(O):O instanceof Ut?h.field(O,!1)==f.field(O,!1):!0)||(l?Uk(d=r(f),g,i):i(d=r(f),g)))return f.values[o]=g,0}else d=r(f);return f.values[o]=d,1}}}}function Uk(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function Q1(t,e){let n=!1;for(let r of e)Cc(t,r)&1&&(n=!0);return n}function HU(t,e,n){let r=n.map(a=>t[a.id]),i=n.map(a=>a.type),s=r.filter(a=>!(a&1)),o=t[e.id]>>1;function l(a){let c=[];for(let u=0;u<r.length;u++){let f=yd(a,r[u]);if(i[u]==2)for(let h of f)c.push(h);else c.push(f)}return e.combine(c)}return{create(a){for(let c of r)Cc(a,c);return a.values[o]=l(a),1},update(a,c){if(!Q1(a,s))return 0;let u=l(a);return e.compare(u,a.values[o])?0:(a.values[o]=u,1)},reconfigure(a,c){let u=Q1(a,r),f=c.config.facets[e.id],h=c.facet(e);if(f&&!u&&Ky(n,f))return a.values[o]=h,0;let d=l(a);return e.compare(d,h)?(a.values[o]=h,0):(a.values[o]=d,1)}}}const Tf=ge.define({static:!0});class Ut{constructor(e,n,r,i,s){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let n=new Ut(Gy++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Tf).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let s=r.values[n],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[n]=o,1)},reconfigure:(r,i)=>{let s=r.facet(Tf),o=i.facet(Tf),l;return(l=s.find(a=>a.field==this))&&l!=o.find(a=>a.field==this)?(r.values[n]=l.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,Tf.of({field:this,create:e})]}get extension(){return this}}const bo={lowest:4,low:3,default:2,high:1,highest:0};function Ha(t){return e=>new MQ(e,t)}const xs={highest:Ha(bo.highest),high:Ha(bo.high),default:Ha(bo.default),low:Ha(bo.low),lowest:Ha(bo.lowest)};class MQ{constructor(e,n){this.inner=e,this.prec=n}}class jp{of(e){return new M1(this,e)}reconfigure(e){return jp.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class M1{constructor(e,n){this.compartment=e,this.inner=n}}class xd{constructor(e,n,r,i,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],s=Object.create(null),o=new Map;for(let h of qU(e,n,o))h instanceof Ut?i.push(h):(s[h.facet.id]||(s[h.facet.id]=[])).push(h);let l=Object.create(null),a=[],c=[];for(let h of i)l[h.id]=c.length<<1,c.push(d=>h.slot(d));let u=r==null?void 0:r.config.facets;for(let h in s){let d=s[h],p=d[0].facet,g=u&&u[h]||[];if(d.every(O=>O.type==0))if(l[p.id]=a.length<<1|1,Ky(g,d))a.push(r.facet(p));else{let O=p.combine(d.map(x=>x.value));a.push(r&&p.compare(O,r.facet(p))?r.facet(p):O)}else{for(let O of d)O.type==0?(l[O.id]=a.length<<1|1,a.push(O.value)):(l[O.id]=c.length<<1,c.push(x=>O.dynamicSlot(x)));l[p.id]=c.length<<1,c.push(O=>HU(O,p,d))}}let f=c.map(h=>h(l));return new xd(e,o,f,l,a,s)}}function qU(t,e,n){let r=[[],[],[],[],[]],i=new Map;function s(o,l){let a=i.get(o);if(a!=null){if(a<=l)return;let c=r[a].indexOf(o);c>-1&&r[a].splice(c,1),o instanceof M1&&n.delete(o.compartment)}if(i.set(o,l),Array.isArray(o))for(let c of o)s(c,l);else if(o instanceof M1){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;n.set(o.compartment,c),s(c,l)}else if(o instanceof MQ)s(o.inner,o.prec);else if(o instanceof Ut)r[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof yh)r[l].push(o),o.facet.extensions&&s(o.facet.extensions,bo.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(c,l)}}return s(t,bo.default),r.reduce((o,l)=>o.concat(l))}function Cc(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function yd(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const RQ=ge.define(),R1=ge.define({combine:t=>t.some(e=>e),static:!0}),LQ=ge.define({combine:t=>t.length?t[0]:void 0,static:!0}),IQ=ge.define(),NQ=ge.define(),DQ=ge.define(),VQ=ge.define({combine:t=>t.length?t[0]:!1});class ys{constructor(e,n){this.type=e,this.value=n}static define(){return new YU}}class YU{of(e){return new ys(this,e)}}class UU{constructor(e){this.map=e}of(e){return new Ie(this,e)}}class Ie{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Ie(this.type,n)}is(e){return this.type==e}static define(e={}){return new UU(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(n);s&&r.push(s)}return r}}Ie.reconfigure=Ie.define();Ie.appendConfig=Ie.define();class Mt{constructor(e,n,r,i,s,o){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&QQ(r,n.newLength),s.some(l=>l.type==Mt.time)||(this.annotations=s.concat(Mt.time.of(Date.now())))}static create(e,n,r,i,s,o){return new Mt(e,n,r,i,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Mt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Mt.time=ys.define();Mt.userEvent=ys.define();Mt.addToHistory=ys.define();Mt.remote=ys.define();function GU(t,e){let n=[];for(let r=0,i=0;;){let s,o;if(r<t.length&&(i==e.length||e[i]>=t[r]))s=t[r++],o=t[r++];else if(i<e.length)s=e[i++],o=e[i++];else return n;!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function FQ(t,e,n){var r;let i,s,o;return n?(i=e.changes,s=Vt.empty(e.changes.length),o=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:Ie.mapEffects(t.effects,i).concat(Ie.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function L1(t,e,n){let r=e.selection,i=Ml(e.annotations);return e.userEvent&&(i=i.concat(Mt.userEvent.of(e.userEvent))),{changes:e.changes instanceof Vt?e.changes:Vt.of(e.changes||[],n,t.facet(LQ)),selection:r&&(r instanceof H?r:H.single(r.anchor,r.head)),effects:Ml(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function BQ(t,e,n){let r=L1(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let o=!!e[s].sequential;r=FQ(r,L1(t,e[s],o?r.changes.newLength:t.doc.length),o)}let i=Mt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return JU(n?KU(i):i)}function KU(t){let e=t.startState,n=!0;for(let i of e.facet(IQ)){let s=i(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:GU(n,s))}if(n!==!0){let i,s;if(n===!1)s=t.changes.invertedDesc,i=Vt.empty(e.doc.length);else{let o=t.changes.filter(n);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}t=Mt.create(e,i,t.selection&&t.selection.map(s),Ie.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let r=e.facet(NQ);for(let i=r.length-1;i>=0;i--){let s=r[i](t);s instanceof Mt?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Mt?t=s[0]:t=BQ(e,Ml(s),!1)}return t}function JU(t){let e=t.startState,n=e.facet(DQ),r=t;for(let i=n.length-1;i>=0;i--){let s=n[i](t);s&&Object.keys(s).length&&(r=FQ(r,L1(e,s,t.changes.newLength),!0))}return r==t?t:Mt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const eG=[];function Ml(t){return t==null?eG:Array.isArray(t)?t:[t]}var vt=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(vt||(vt={}));const tG=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let I1;try{I1=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function nG(t){if(I1)return I1.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||tG.test(n)))return!0}return!1}function rG(t){return e=>{if(!/\S/.test(e))return vt.Space;if(nG(e))return vt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return vt.Word;return vt.Other}}class je{constructor(e,n,r,i,s,o){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Cc(this,l<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Cc(this,r),yd(this,r)}update(...e){return BQ(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let l of e.effects)l.is(jp.reconfigure)?(n&&(i=new Map,n.compartments.forEach((a,c)=>i.set(c,a)),n=null),i.set(l.value.compartment,l.value.extension)):l.is(Ie.reconfigure)?(n=null,r=l.value):l.is(Ie.appendConfig)&&(n=null,r=Ml(r).concat(l.value));let s;n?s=e.startState.values.slice():(n=xd.resolve(r,i,this),s=new je(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(a,c)=>c.reconfigure(a,this),null).values);let o=e.startState.facet(R1)?e.newSelection:e.newSelection.asSingle();new je(n,e.newDoc,o,s,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:H.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),s=[r.range],o=Ml(r.effects);for(let l=1;l<n.ranges.length;l++){let a=e(n.ranges[l]),c=this.changes(a.changes),u=c.map(i);for(let h=0;h<l;h++)s[h]=s[h].map(u);let f=i.mapDesc(c,!0);s.push(a.range.map(f)),i=i.compose(u),o=Ie.mapEffects(o,u).concat(Ie.mapEffects(Ml(a.effects),f))}return{changes:i,selection:H.create(s,n.mainIndex),effects:o}}changes(e=[]){return e instanceof Vt?e:Vt.of(e,this.doc.length,this.facet(je.lineSeparator))}toText(e){return Ge.of(e.split(this.facet(je.lineSeparator)||P1))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Cc(this,n),yd(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof Ut&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],l=e[s];i.push(o.init(a=>o.spec.fromJSON(l,a)))}}return je.create({doc:e.doc,selection:H.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=xd.resolve(e.extensions||[],new Map),r=e.doc instanceof Ge?e.doc:Ge.of((e.doc||"").split(n.staticFacet(je.lineSeparator)||P1)),i=e.selection?e.selection instanceof H?e.selection:H.single(e.selection.anchor,e.selection.head):H.single(0);return QQ(i,r.length),n.staticFacet(R1)||(i=i.asSingle()),new je(n,r,i,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(je.tabSize)}get lineBreak(){return this.facet(je.lineSeparator)||`
133
+ `}get readOnly(){return this.facet(VQ)}phrase(e,...n){for(let r of this.facet(je.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>n.length?r:n[s-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let s of this.facet(RQ))for(let o of s(this,n,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return rG(n.length?n[0]:"")}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,l=e-r;for(;o>0;){let a=qt(n,o,!1);if(s(n.slice(a,o))!=vt.Word)break;o=a}for(;l<i;){let a=qt(n,l);if(s(n.slice(l,a))!=vt.Word)break;l=a}return o==l?null:H.range(o+r,l+r)}}je.allowMultipleSelections=R1;je.tabSize=ge.define({combine:t=>t.length?t[0]:4});je.lineSeparator=LQ;je.readOnly=VQ;je.phrases=ge.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});je.languageData=RQ;je.changeFilter=IQ;je.transactionFilter=NQ;je.transactionExtender=DQ;jp.reconfigure=Ie.define();function vi(t,e,n={}){let r={};for(let i of t)for(let s of Object.keys(i)){let o=i[s],l=r[s];if(l===void 0)r[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(n,s))r[s]=n[s](l,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Us{eq(e){return this==e}range(e,n=e){return N1.create(e,n,this)}}Us.prototype.startSide=Us.prototype.endSide=0;Us.prototype.point=!1;Us.prototype.mapMode=tn.TrackDel;function Jy(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}let N1=class ZQ{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new ZQ(e,n,r)}};function D1(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class eb{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let s=r?this.to:this.from;for(let o=i,l=s.length;;){if(o==l)return o;let a=o+l>>1,c=s[a]-e||(r?this.value[a].endSide:this.value[a].startSide)-n;if(a==o)return c>=0?o:l;c>=0?l=a:o=a+1}}between(e,n,r,i){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n){let r=[],i=[],s=[],o=-1,l=-1;for(let a=0;a<this.value.length;a++){let c=this.value[a],u=this.from[a]+e,f=this.to[a]+e,h,d;if(u==f){let p=n.mapPos(u,c.startSide,c.mapMode);if(p==null||(h=d=p,c.startSide!=c.endSide&&(d=n.mapPos(u,c.endSide),d<h)))continue}else if(h=n.mapPos(u,c.startSide),d=n.mapPos(f,c.endSide),h>d||h==d&&c.startSide>0&&c.endSide<=0)continue;(d-h||c.endSide-c.startSide)<0||(o<0&&(o=h),c.point&&(l=Math.max(l,d-h)),r.push(c),i.push(h-o),s.push(d-o))}return{mapped:r.length?new eb(i,s,r,l):null,pos:o}}}class Xe{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Xe(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(D1)),this.isEmpty)return n.length?Xe.of(n):this;let l=new zQ(this,null,-1).goto(0),a=0,c=[],u=new is;for(;l.value||a<n.length;)if(a<n.length&&(l.from-n[a].from||l.startSide-n[a].value.startSide)>=0){let f=n[a++];u.addInner(f.from,f.to,f.value)||c.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(a==n.length||this.chunkEnd(l.chunkIndex)<n[a].from)&&(!o||i>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&u.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||i>l.to||s<l.from||o(l.from,l.to,l.value))&&(u.addInner(l.from,l.to,l.value)||c.push(N1.create(l.from,l.to,l.value))),l.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?Xe.empty:this.nextLayer.update({add:c,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],a=this.chunk[o],c=e.touchesRange(l,l+a.length);if(c===!1)i=Math.max(i,a.maxPoint),n.push(a),r.push(e.mapPos(l));else if(c===!0){let{mapped:u,pos:f}=a.map(l,e);u&&(i=Math.max(i,u.maxPoint),n.push(u),r.push(f))}}let s=this.nextLayer.map(e);return n.length==0?s:new Xe(r,n,s||Xe.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(n>=s&&e<=s+o.length&&o.between(s,e-s,n-s,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return tu.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return tu.from(e).goto(n)}static compare(e,n,r,i,s=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),l=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),a=Gk(o,l,r),c=new qa(o,a,s),u=new qa(l,a,s);r.iterGaps((f,h,d)=>Kk(c,f,u,h,d,i)),r.empty&&r.length==0&&Kk(c,0,u,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let s=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),o=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=Gk(s,o),a=new qa(s,l,0).goto(r),c=new qa(o,l,0).goto(r);for(;;){if(a.to!=c.to||!V1(a.active,c.active)||a.point&&(!c.point||!Jy(a.point,c.point)))return!1;if(a.to>i)return!0;a.next(),c.next()}}static spans(e,n,r,i,s=-1){let o=new qa(e,null,s).goto(n),l=n,a=o.openStart;for(;;){let c=Math.min(o.to,r);if(o.point){let u=o.activeForPoint(o.to),f=o.pointFrom<n?u.length+1:o.point.startSide<0?u.length:Math.min(u.length,a);i.point(l,c,o.point,u,f,o.pointRank),a=Math.min(o.openEnd(c),u.length)}else c>l&&(i.span(l,c,o.active,a),a=o.openEnd(c));if(o.to>r)return a+(o.point&&o.to>r?1:0);l=o.to,o.next()}}static of(e,n=!1){let r=new is;for(let i of e instanceof N1?[e]:n?iG(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Xe.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Xe.empty;i=i.nextLayer)n=new Xe(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}Xe.empty=new Xe([],[],null,-1);function iG(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(D1(e,r)>0)return t.slice().sort(D1);e=r}return t}Xe.empty.nextLayer=Xe.empty;class is{finishChunk(e){this.chunks.push(new eb(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new is)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Xe.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Xe.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function Gk(t,e,n){let r=new Map;for(let s of t)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let l=r.get(s.chunk[o]);l!=null&&(n?n.mapPos(l):l)==s.chunkPos[o]&&!(n!=null&&n.touchesRange(l,l+s.chunk[o].length))&&i.add(s.chunk[o])}return i}class zQ{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class tu{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new zQ(o,n,r,s));return i.length==1?i[0]:new tu(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)rm(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)rm(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),rm(this.heap,0)}}}function rm(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class qa{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=tu.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Ef(this.active,e),Ef(this.activeTo,e),Ef(this.activeRank,e),this.minActive=Jk(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||i-this.activeTo[n])>0;)n++;Pf(this.active,n,r),Pf(this.activeTo,n,i),Pf(this.activeRank,n,s),e&&Pf(e,n,this.cursor.from),this.minActive=Jk(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Ef(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function Kk(t,e,n,r,i,s){t.goto(e),n.goto(r);let o=r+i,l=r,a=r-e,c=!!s.boundChange;for(let u=!1;;){let f=t.to+a-n.to,h=f||t.endSide-n.endSide,d=h<0?t.to+a:n.to,p=Math.min(d,o);if(t.point||n.point?(t.point&&n.point&&Jy(t.point,n.point)&&V1(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(l,p,t.point,n.point),u=!1):(u&&s.boundChange(l),p>l&&!V1(t.active,n.active)&&s.compareRange(l,p,t.active,n.active),c&&p<o&&(f||t.openEnd(d)!=n.openEnd(d))&&(u=!0)),d>o)break;l=d,h<=0&&t.next(),h>=0&&n.next()}}function V1(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!Jy(t[n],e[n]))return!1;return!0}function Ef(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function Pf(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function Jk(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function Nr(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=qt(t,i));return r}function F1(t,e,n,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==t.length)break;s+=t.charCodeAt(i)==9?n-s%n:1,i=qt(t,i)}return r===!0?-1:t.length}const B1="ͼ",eC=typeof Symbol>"u"?"__"+B1:Symbol.for(B1),Z1=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),tC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Gs{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,l,a,c){let u=[],f=/^@(\w+)\b/.exec(o[0]),h=f&&f[1]=="keyframes";if(f&&l==null)return a.push(o[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))s(d.split(/,\s*/).map(g=>o.map(O=>g.replace(/&/,O))).reduce((g,O)=>g.concat(O)),p,a);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");s(i(d),p,u,h)}else p!=null&&u.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(u.length||h)&&a.push((r&&!f&&!c?o.map(r):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
134
+ `)}static newName(){let e=tC[eC]||1;return tC[eC]=e+1,B1+e.toString(36)}static mount(e,n,r){let i=e[Z1],s=r&&r.nonce;i?s&&i.setNonce(s):i=new sG(e,s),i.mount(Array.isArray(n)?n:[n],e)}}let nC=new Map;class sG{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=nC.get(r);if(s)return e[Z1]=s;this.sheet=new i.CSSStyleSheet,nC.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[Z1]=this}mount(e,n){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let l=e[o],a=this.modules.indexOf(l);if(a<s&&a>-1&&(this.modules.splice(a,1),s--,a=-1),a==-1){if(this.modules.splice(s++,0,l),r)for(let c=0;c<l.rules.length;c++)r.insertRule(l.rules[c],i++)}else{for(;s<a;)i+=this.modules[s++].rules.length;i+=l.rules.length,s++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let o="";for(let a=0;a<this.modules.length;a++)o+=this.modules[a].getRules()+`
135
+ `;this.styleTag.textContent=o;let l=n.head||n;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Ks={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},nu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},oG=typeof navigator<"u"&&/Mac/.test(navigator.platform),lG=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var en=0;en<10;en++)Ks[48+en]=Ks[96+en]=String(en);for(var en=1;en<=24;en++)Ks[en+111]="F"+en;for(var en=65;en<=90;en++)Ks[en]=String.fromCharCode(en+32),nu[en]=String.fromCharCode(en);for(var im in Ks)nu.hasOwnProperty(im)||(nu[im]=Ks[im]);function aG(t){var e=oG&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||lG&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?nu:Ks)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function rt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)XQ(t,arguments[e]);return t}function XQ(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)XQ(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let On=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},z1=typeof document<"u"?document:{documentElement:{style:{}}};const X1=/Edge\/(\d+)/.exec(On.userAgent),WQ=/MSIE \d/.test(On.userAgent),W1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(On.userAgent),Hp=!!(WQ||W1||X1),rC=!Hp&&/gecko\/(\d+)/i.test(On.userAgent),sm=!Hp&&/Chrome\/(\d+)/.exec(On.userAgent),cG="webkitFontSmoothing"in z1.documentElement.style,j1=!Hp&&/Apple Computer/.test(On.vendor),iC=j1&&(/Mobile\/\w+/.test(On.userAgent)||On.maxTouchPoints>2);var Oe={mac:iC||/Mac/.test(On.platform),windows:/Win/.test(On.platform),linux:/Linux|X11/.test(On.platform),ie:Hp,ie_version:WQ?z1.documentMode||6:W1?+W1[1]:X1?+X1[1]:0,gecko:rC,gecko_version:rC?+(/Firefox\/(\d+)/.exec(On.userAgent)||[0,0])[1]:0,chrome:!!sm,chrome_version:sm?+sm[1]:0,ios:iC,android:/Android\b/.test(On.userAgent),webkit_version:cG?+(/\bAppleWebKit\/(\d+)/.exec(On.userAgent)||[0,0])[1]:0,safari:j1,safari_version:j1?+(/\bVersion\/(\d+(\.\d+)?)/.exec(On.userAgent)||[0,0])[1]:0,tabSize:z1.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function tb(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const bd=Object.create(null);function nb(t,e,n){if(t==e)return!0;t||(t=bd),e||(e=bd);let r=Object.keys(t),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=n&&(i.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function uG(t,e){for(let n=t.attributes.length-1;n>=0;n--){let r=t.attributes[n].name;e[r]==null&&t.removeAttribute(r)}for(let n in e){let r=e[n];n=="style"?t.style.cssText=r:t.getAttribute(n)!=r&&t.setAttribute(n,r)}}function sC(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function fG(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class Si{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var sn=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})(sn||(sn={}));class Pe extends Us{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new ju(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new qo(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=jQ(e,n);r=(s?n?-3e8:-1:5e8)-1,i=(o?n?2e8:1:-6e8)+1}return new qo(e,r,i,n,e.widget||null,!0)}static line(e){return new Hu(e)}static set(e,n=!1){return Xe.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Pe.none=Xe.empty;class ju extends Pe{constructor(e){let{start:n,end:r}=jQ(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?tb(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||bd}eq(e){return this==e||e instanceof ju&&this.tagName==e.tagName&&nb(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}ju.prototype.point=!1;class Hu extends Pe{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Hu&&this.spec.class==e.spec.class&&nb(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Hu.prototype.mapMode=tn.TrackBefore;Hu.prototype.point=!0;class qo extends Pe{constructor(e,n,r,i,s,o){super(n,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?n<=0?tn.TrackBefore:tn.TrackAfter:tn.TrackDel}get type(){return this.startSide!=this.endSide?sn.WidgetRange:this.startSide<=0?sn.WidgetBefore:sn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof qo&&hG(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}qo.prototype.point=!0;function jQ(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function hG(t,e){return t==e||!!(t&&e&&t.compare(e))}function Rl(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class ru extends Us{constructor(e,n){super(),this.tagName=e,this.attributes=n}eq(e){return e==this||e instanceof ru&&this.tagName==e.tagName&&nb(this.attributes,e.attributes)}static create(e){return new ru(e.tagName,e.attributes||bd)}static set(e,n=!1){return Xe.of(e,n)}}ru.prototype.startSide=ru.prototype.endSide=-1;function iu(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function H1(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function _c(t,e){if(!e.anchorNode)return!1;try{return H1(t,e.anchorNode)}catch{return!1}}function bh(t){return t.nodeType==3?su(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Tc(t,e,n,r){return n?oC(t,e,n,r,-1)||oC(t,e,n,r,1):!1}function Js(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function vd(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function oC(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:ss(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=Js(t)+(i<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?ss(t):0}else return!1}}function ss(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Sd(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function dG(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function HQ(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function pG(t,e,n,r,i,s,o,l){let a=t.ownerDocument,c=a.defaultView||window;for(let u=t,f=!1;u&&!f;)if(u.nodeType==1){let h,d=u==a.body,p=1,g=1;if(d)h=dG(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let m=u.getBoundingClientRect();({scaleX:p,scaleY:g}=HQ(u,m)),h={left:m.left,right:m.left+u.clientWidth*p,top:m.top,bottom:m.top+u.clientHeight*g}}let O=0,x=0;if(i=="nearest")e.top<h.top?(x=e.top-(h.top+o),n>0&&e.bottom>h.bottom+x&&(x=e.bottom-h.bottom+o)):e.bottom>h.bottom&&(x=e.bottom-h.bottom+o,n<0&&e.top-x<h.top&&(x=e.top-(h.top+o)));else{let m=e.bottom-e.top,y=h.bottom-h.top;x=(i=="center"&&m<=y?e.top+m/2-y/2:i=="start"||i=="center"&&n<0?e.top-o:e.bottom-y+o)-h.top}if(r=="nearest"?e.left<h.left?(O=e.left-(h.left+s),n>0&&e.right>h.right+O&&(O=e.right-h.right+s)):e.right>h.right&&(O=e.right-h.right+s,n<0&&e.left<h.left+O&&(O=e.left-(h.left+s))):O=(r=="center"?e.left+(e.right-e.left)/2-(h.right-h.left)/2:r=="start"==l?e.left-s:e.right-(h.right-h.left)+s)-h.left,O||x)if(d)c.scrollBy(O,x);else{let m=0,y=0;if(x){let b=u.scrollTop;u.scrollTop+=x/g,y=(u.scrollTop-b)*g}if(O){let b=u.scrollLeft;u.scrollLeft+=O/p,m=(u.scrollLeft-b)*p}e={left:e.left-m,top:e.top-y,right:e.right-m,bottom:e.bottom-y},m&&Math.abs(m-O)<1&&(r="nearest"),y&&Math.abs(y-x)<1&&(i="nearest")}if(d)break;(e.top<h.top||e.bottom>h.bottom||e.left<h.left||e.right>h.right)&&(e={left:Math.max(e.left,h.left),right:Math.min(e.right,h.right),top:Math.max(e.top,h.top),bottom:Math.min(e.bottom,h.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function gG(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class mG{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?ss(n):0),r,Math.min(e.focusOffset,r?ss(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let xo=null;Oe.safari&&Oe.safari_version>=26&&(xo=!1);function qQ(t){if(t.setActive)return t.setActive();if(xo)return t.focus(xo);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(xo==null?{get preventScroll(){return xo={preventScroll:!0},!0}}:void 0),!xo){xo=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],s=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let lC;function su(t,e,n=e){let r=lC||(lC=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Ll(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,t.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function OG(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function xG(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,ss(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=ss(n))}else{if(n==t)return!0;r=Js(n),n=n.parentNode}}function YQ(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function UQ(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=ss(n)}else if(n.parentNode&&!vd(n))r=Js(n),n=n.parentNode;else return null}}function GQ(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!vd(n))r=Js(n)+1,n=n.parentNode;else return null}}class Tr{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new Tr(e.parentNode,Js(e),n)}static after(e,n){return new Tr(e.parentNode,Js(e)+1,n)}}var ct=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})(ct||(ct={}));const Yo=ct.LTR,rb=ct.RTL;function KQ(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const yG=KQ("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),bG=KQ("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),q1=Object.create(null),Xr=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);q1[e]=n,q1[n]=-e}function JQ(t){return t<=247?yG[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?bG[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const vG=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class ii{get dir(){return this.level%2?rb:Yo}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let s=-1;for(let o=0;o<e.length;o++){let l=e[o];if(l.from<=n&&l.to>=n){if(l.level==r)return o;(s<0||(i!=0?i<0?l.from<n:l.to>n:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function e9(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!e9(r.inner,i.inner))return!1}return!0}const at=[];function SG(t,e,n,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,l=s<r.length?r[s].from:n,a=s?256:i;for(let c=o,u=a,f=a;c<l;c++){let h=JQ(t.charCodeAt(c));h==512?h=u:h==8&&f==4&&(h=16),at[c]=h==4?2:h,h&7&&(f=h),u=h}for(let c=o,u=a,f=a;c<l;c++){let h=at[c];if(h==128)c<l-1&&u==at[c+1]&&u&24?h=at[c]=u:at[c]=256;else if(h==64){let d=c+1;for(;d<l&&at[d]==64;)d++;let p=c&&u==8||d<n&&at[d]==8?f==1?1:8:256;for(let g=c;g<d;g++)at[g]=p;c=d-1}else h==8&&f==1&&(at[c]=1);u=h,h&7&&(f=h)}}}function wG(t,e,n,r,i){let s=i==1?2:1;for(let o=0,l=0,a=0;o<=r.length;o++){let c=o?r[o-1].to:e,u=o<r.length?r[o].from:n;for(let f=c,h,d,p;f<u;f++)if(d=q1[h=t.charCodeAt(f)])if(d<0){for(let g=l-3;g>=0;g-=3)if(Xr[g+1]==-d){let O=Xr[g+2],x=O&2?i:O&4?O&1?s:i:0;x&&(at[f]=at[Xr[g]]=x),l=g;break}}else{if(Xr.length==189)break;Xr[l++]=f,Xr[l++]=h,Xr[l++]=a}else if((p=at[f])==2||p==1){let g=p==i;a=g?0:1;for(let O=l-3;O>=0;O-=3){let x=Xr[O+2];if(x&2)break;if(g)Xr[O+2]|=2;else{if(x&4)break;Xr[O+2]|=4}}}}}function kG(t,e,n,r){for(let i=0,s=r;i<=n.length;i++){let o=i?n[i-1].to:t,l=i<n.length?n[i].from:e;for(let a=o;a<l;){let c=at[a];if(c==256){let u=a+1;for(;;)if(u==l){if(i==n.length)break;u=n[i++].to,l=i<n.length?n[i].from:e}else if(at[u]==256)u++;else break;let f=s==1,h=(u<e?at[u]:r)==1,d=f==h?f?1:2:r;for(let p=u,g=i,O=g?n[g-1].to:t;p>a;)p==O&&(p=n[--g].from,O=g?n[g-1].to:t),at[--p]=d;a=u}else s=c,a++}}}function Y1(t,e,n,r,i,s,o){let l=r%2?2:1;if(r%2==i%2)for(let a=e,c=0;a<n;){let u=!0,f=!1;if(c==s.length||a<s[c].from){let g=at[a];g!=l&&(u=!1,f=g==16)}let h=!u&&l==1?[]:null,d=u?r:r+1,p=a;e:for(;;)if(c<s.length&&p==s[c].from){if(f)break e;let g=s[c];if(!u)for(let O=g.to,x=c+1;;){if(O==n)break e;if(x<s.length&&s[x].from==O)O=s[x++].to;else{if(at[O]==l)break e;break}}if(c++,h)h.push(g);else{g.from>a&&o.push(new ii(a,g.from,d));let O=g.direction==Yo!=!(d%2);U1(t,O?r+1:r,i,g.inner,g.from,g.to,o),a=g.to}p=g.to}else{if(p==n||(u?at[p]!=l:at[p]==l))break;p++}h?Y1(t,a,p,r+1,i,h,o):a<p&&o.push(new ii(a,p,d)),a=p}else for(let a=n,c=s.length;a>e;){let u=!0,f=!1;if(!c||a>s[c-1].to){let g=at[a-1];g!=l&&(u=!1,f=g==16)}let h=!u&&l==1?[]:null,d=u?r:r+1,p=a;e:for(;;)if(c&&p==s[c-1].to){if(f)break e;let g=s[--c];if(!u)for(let O=g.from,x=c;;){if(O==e)break e;if(x&&s[x-1].to==O)O=s[--x].from;else{if(at[O-1]==l)break e;break}}if(h)h.push(g);else{g.to<a&&o.push(new ii(g.to,a,d));let O=g.direction==Yo!=!(d%2);U1(t,O?r+1:r,i,g.inner,g.from,g.to,o),a=g.from}p=g.from}else{if(p==e||(u?at[p-1]!=l:at[p-1]==l))break;p--}h?Y1(t,p,a,r+1,i,h,o):p<a&&o.push(new ii(p,a,d)),a=p}}function U1(t,e,n,r,i,s,o){let l=e%2?2:1;SG(t,i,s,r,l),wG(t,i,s,r,l),kG(i,s,r,l),Y1(t,i,s,e,n,r,o)}function CG(t,e,n){if(!t)return[new ii(0,0,e==rb?1:0)];if(e==Yo&&!n.length&&!vG.test(t))return t9(t.length);if(n.length)for(;t.length>at.length;)at[at.length]=256;let r=[],i=e==Yo?0:1;return U1(t,i,i,n,0,t.length,r),r}function t9(t){return[new ii(0,t,0)]}let n9="";function _G(t,e,n,r,i){var s;let o=r.head-t.from,l=ii.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),a=e[l],c=a.side(i,n);if(o==c){let h=l+=i?1:-1;if(h<0||h>=e.length)return null;a=e[l=h],o=a.side(!i,n),c=a.side(i,n)}let u=qt(t.text,o,a.forward(i,n));(u<a.from||u>a.to)&&(u=c),n9=t.text.slice(Math.min(o,u),Math.max(o,u));let f=l==(i?e.length-1:0)?null:e[l+(i?1:-1)];return f&&u==c&&f.level+(i?0:1)<a.level?H.cursor(f.side(!i,n)+t.from,f.forward(i,n)?1:-1,f.level):H.cursor(u+t.from,a.forward(i,n)?-1:1,a.level)}function TG(t,e,n){for(let r=e;r<n;r++){let i=JQ(t.charCodeAt(r));if(i==1)return Yo;if(i==2||i==4)return rb}return Yo}const r9=ge.define(),i9=ge.define(),s9=ge.define(),o9=ge.define(),G1=ge.define(),l9=ge.define(),a9=ge.define(),ib=ge.define(),sb=ge.define(),c9=ge.define({combine:t=>t.some(e=>e)}),u9=ge.define({combine:t=>t.some(e=>e)}),f9=ge.define();class Il{constructor(e,n="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new Il(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Il(H.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Af=Ie.define({map:(t,e)=>t.map(e)}),h9=Ie.define();function $n(t,e,n){let r=t.facet(o9);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const Fi=ge.define({combine:t=>t.length?t[0]:!0});let EG=0;const Sl=ge.define({combine(t){return t.filter((e,n)=>{for(let r=0;r<n;r++)if(t[r].plugin==e.plugin)return!1;return!0})}});class It{constructor(e,n,r,i,s){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Sl.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Sl.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=n||{};return new It(EG++,e,r,i,l=>{let a=[];return o&&a.push(qp.of(c=>{let u=c.plugin(l);return u?o(u):Pe.none})),s&&a.push(s(l)),a})}static fromClass(e,n){return It.define((r,i)=>new e(r,i),n)}}class om{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if($n(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){$n(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){$n(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const d9=ge.define(),ob=ge.define(),qp=ge.define(),p9=ge.define(),lb=ge.define(),qu=ge.define(),g9=ge.define();function aC(t,e){let n=t.state.facet(g9);if(!n.length)return n;let r=n.map(s=>s instanceof Function?s(t):s),i=[];return Xe.spans(r,e.from,e.to,{point(){},span(s,o,l,a){let c=s-e.from,u=o-e.from,f=i;for(let h=l.length-1;h>=0;h--,a--){let d=l[h].spec.bidiIsolate,p;if(d==null&&(d=TG(e.text,c,u)),a>0&&f.length&&(p=f[f.length-1]).to==c&&p.direction==d)p.to=u,f=p.inner;else{let g={from:c,to:u,direction:d,inner:[]};f.push(g),f=g.inner}}}}),i}const m9=ge.define();function ab(t){let e=0,n=0,r=0,i=0;for(let s of t.state.facet(m9)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:n,top:r,bottom:i}}const sc=ge.define();class ir{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new ir(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,s=0,o=0;;){let l=i<e.length?e[i].fromB:1e9,a=s<n.length?n[s]:1e9,c=Math.min(l,a);if(c==1e9)break;let u=c+o,f=c,h=u;for(;;)if(s<n.length&&n[s]<=f){let d=n[s+1];s+=2,f=Math.max(f,d);for(let p=i;p<e.length&&e[p].fromB<=f;p++)o=e[p].toA-e[p].toB;h=Math.max(h,d+o)}else if(i<e.length&&e[i].fromB<=f){let d=e[i++];f=Math.max(f,d.toB),h=Math.max(h,d.toA),o=d.toA-d.toB}else break;r.push(new ir(u,h,c,f))}return r}}class wd{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Vt.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,l,a)=>i.push(new ir(s,o,l,a))),this.changedRanges=i}static create(e,n,r){return new wd(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const PG=[];class Lt{constructor(e,n,r=0){this.dom=e,this.length=n,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return PG}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&uG(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,n=this.posAtStart){let r=n;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,n){return null}domPosFor(e,n){let r=Js(this.dom),i=this.length?e>0:n>0;return new Tr(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Up)return e;return null}static get(e){return e.cmTile}}class Yp extends Lt{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let n=this.dom,r=null,i,s=(e==null?void 0:e.node)==n?e:null,o=0;for(let l of this.children){if(l.sync(e),o+=l.length+l.breakAfter,i=r?r.nextSibling:n.firstChild,s&&i!=l.dom&&(s.written=!0),l.dom.parentNode==n)for(;i&&i!=l.dom;)i=cC(i);else n.insertBefore(l.dom,i);r=l.dom}for(i=r?r.nextSibling:n.firstChild,s&&i&&(s.written=!0);i;)i=cC(i);this.length=o}}function cC(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class Up extends Yp{constructor(e,n){super(n),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let n=Lt.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!n.length)return;r=r.parent,r.breakAfter&&s++,i=n.pop()}else{let o=r.children[i++];if(o instanceof Hi)n.push(i),r=o,i=0;else{let l=s+o.length,a=e(o,s);if(a!==void 0)return a;s=l+o.breakAfter}}}resolveBlock(e,n){let r,i=-1,s,o=-1;if(this.blockTiles((l,a)=>{let c=a+l.length;if(e>=a&&e<=c){if(l.isWidget()&&n>=-1&&n<=1){if(l.flags&32)return!0;l.flags&16&&(r=void 0)}(a<e||e==c&&(n<-1?l.length:l.covers(1)))&&(!r||!l.isWidget()&&r.isWidget())&&(r=l,i=e-a),(c>e||e==a&&(n>1?l.length:l.covers(-1)))&&(!s||!l.isWidget()&&s.isWidget())&&(s=l,o=e-a)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&n<0||!s?{tile:r,offset:i}:{tile:s,offset:o}}}class Hi extends Yp{constructor(e,n){super(e),this.wrapper=n}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,n){let r=new Hi(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class ta extends Yp{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,r){let i=new ta(n||document.createElement("div"),e);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,n,r){let i=null,s=-1,o=null,l=-1;function a(u,f){for(let h=0,d=0;h<u.children.length&&d<=f;h++){let p=u.children[h],g=d+p.length;g>=f&&(p.isComposite()?a(p,f-d):(!o||o.isHidden&&(n>0||r&&$G(o,p)))&&(g>f||p.flags&32)?(o=p,l=f-d):(d<f||p.flags&16&&!p.isHidden)&&(i=p,s=f-d)),d=g}}a(this,e);let c=(n<0?i:o)||i||o;return c?{tile:c,offset:c==i?s:l}:null}coordsIn(e,n){let r=this.resolveInline(e,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n):AG(this)}domIn(e,n){let r=this.resolveInline(e,n);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new Tr(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:n);let o=r.tile.parent,l=!1;for(let a of o.children){if(l)return new Tr(a.dom,0);a==r.tile&&(l=!0)}}return new Tr(this.dom,0)}}function AG(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=bh(e);return n[n.length-1]||null}function $G(t,e){let n=t.coordsIn(0,1),r=e.coordsIn(0,1);return n&&r&&r.top<n.bottom}class An extends Yp{constructor(e,n){super(e),this.mark=n}get domAttrs(){return this.mark.attrs}static of(e,n){let r=new An(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class Co extends Lt{constructor(e,n){super(e,n.length),this.text=n}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&n<0||e==r&&n>=0?Oe.chrome||Oe.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):n<0?i--:s<r&&s++;let l=su(this.dom,i,s).getClientRects();if(!l.length)return null;let a=l[(o?o<0:n>=0)?0:l.length-1];return Oe.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,c=>c.width)||a),o?Sd(a,o<0):a||null}static of(e,n){let r=new Co(n||document.createTextNode(e),e);return n||(r.flags|=2),r}}class Uo extends Lt{constructor(e,n,r,i){super(e,n,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,r){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;if(r)return Sd(this.dom.getBoundingClientRect(),this.length?e==0:n<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let l=this.flags&16?!0:this.flags&32?!1:e>0;for(let a=l?s.length-1:0;o=s[a],!(e>0?a==0:a==s.length-1||o.top<o.bottom);a+=l?-1:1);return Sd(o,!l)}}get overrideDOMText(){if(!this.length)return Ge.empty;let{root:e}=this;if(!e)return Ge.empty;let n=this.posAtStart;return e.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,n,r,i,s){return s||(s=e.toDOM(n),e.editable||(s.contentEditable="false")),new Uo(s,r,e,i)}}class kd extends Lt{constructor(e){let n=document.createElement("img");n.className="cm-widgetBuffer",n.setAttribute("aria-hidden","true"),super(n,0,e)}get isHidden(){return!0}get overrideDOMText(){return Ge.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class QG{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,n,r){let{tile:i,index:s,beforeBreak:o,parents:l}=this;for(;e||n>0;)if(i.isComposite())if(o){if(!e)break;r&&r.break(),e--,o=!1}else if(s==i.children.length){if(!e&&!l.length)break;r&&r.leave(i),o=!!i.breakAfter,{tile:i,index:s}=l.pop(),s++}else{let a=i.children[s],c=a.breakAfter;(n>0?a.length<=e:a.length<e)&&(!r||r.skip(a,0,a.length)!==!1||!a.isComposite)?(o=!!c,s++,e-=a.length):(l.push({tile:i,index:s}),i=a,s=0,r&&a.isComposite()&&r.enter(a))}else if(s==i.length)o=!!i.breakAfter,{tile:i,index:s}=l.pop(),s++;else if(e){let a=Math.min(e,i.length-s);r&&r.skip(i,s,s+a),e-=a,s+=a}else break;return this.tile=i,this.index=s,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class MG{constructor(e,n,r,i){this.from=e,this.to=n,this.wrapper=r,this.rank=i}}class RG{constructor(e,n,r){this.cache=e,this.root=n,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,n,r,i){var s;this.flushBuffer();let o=this.ensureMarks(n,r),l=o.lastChild;if(l&&l.isText()&&!(l.flags&8)&&l.length+e.length<512){this.cache.reused.set(l,2);let a=o.children[o.children.length-1]=new Co(l.dom,l.text+e);a.parent=o}else o.append(i||Co.of(e,(s=this.cache.find(Co))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,n){let r=this.curLine;r.dom!=n.line.dom&&(r.setDOM(this.cache.reused.has(n.line)?lm(n.line.dom):n.line.dom),this.cache.reused.set(n.line,2));let i=r;for(let l=n.marks.length-1;l>=0;l--){let a=n.marks[l],c=i.lastChild;if(c instanceof An&&c.mark.eq(a.mark))c.dom!=a.dom&&c.setDOM(lm(a.dom)),i=c;else{if(this.cache.reused.get(a)){let f=Lt.get(a.dom);f&&f.setDOM(lm(a.dom))}let u=An.of(a.mark,a.dom);i.append(u),i=u}this.cache.reused.set(a,2)}let s=Lt.get(e.text);s&&this.cache.reused.set(s,2);let o=new Co(e.text,e.text.nodeValue);o.flags|=8,i.append(o)}addInlineWidget(e,n,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(n,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,r){this.flushBuffer(),this.ensureMarks(n,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var r;e||(e=O9);let i=ta.start(e,n||((r=this.cache.find(ta))===null||r===void 0?void 0:r.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,n){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],l;if(n>0&&(l=i.lastChild)&&l instanceof An&&l.mark.eq(o))i=l,n--;else{let a=An.of(o,(r=this.cache.find(An,c=>c.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(a),i=a,n=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!uC(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(Oe.ios&&uC(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(am,0,32)||new Uo(am.toDOM(),0,am,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let n=new MG(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let r of this.wrappers){let i=n.lastChild;if(r.from<this.pos&&i instanceof Hi&&i.wrapper.eq(r.wrapper))n=i;else{let s=Hi.of(r.wrapper,(e=this.cache.find(Hi,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);n.append(s),n=s}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),r=this.cache.find(kd,void 0,1);return r&&(r.flags=n),r||new kd(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class LG{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=i;let l=this.textOff=Math.min(e,i.length);return s?null:i.slice(0,l)}let n=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,n);return this.textOff=n,r}}const Cd=[Uo,ta,Co,An,kd,Hi,Up];for(let t=0;t<Cd.length;t++)Cd[t].bucket=t;class IG{constructor(e){this.view=e,this.buckets=Cd.map(()=>[]),this.index=Cd.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,r=this.buckets[n];r.length<6?r.push(e):r[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,r=2){let i=e.bucket,s=this.buckets[i],o=this.index[i];for(let l=s.length-1;l>=0;l--){let a=(l+o)%s.length,c=s[a];if((!n||n(c))&&!this.reused.has(c))return s.splice(a,1),a<o&&this.index[i]--,this.reused.set(c,r),c}return null}findWidget(e,n,r){let i=this.buckets[0];if(i.length)for(let s=0,o=0;;s++){if(s==i.length){if(o)return null;o=1,s=0}let l=i[s];if(!this.reused.has(l)&&(o==0?l.widget.compare(e):l.widget.constructor==e.constructor&&e.updateDOM(l.dom,this.view)))return i.splice(s,1),s<this.index[0]&&this.index[0]--,l.widget==e&&l.length==n&&(l.flags&497)==r?(this.reused.set(l,1),l):(this.reused.set(l,2),new Uo(l.dom,n,e,l.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,n=2){if(!this.reused.has(e))return this.reused.set(e,n),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class NG{constructor(e,n,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new IG(e),this.text=new LG(e.state.doc),this.builder=new RG(this.cache,new Up(e,e.contentDOM),Xe.iter(r)),this.cache.reused.set(n,2),this.old=new QG(n),this.reuseWalker={skip:(o,l,a)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,n){let r=n&&this.getCompositionContext(n.text);for(let i=0,s=0,o=0;;){let l=o<e.length?e[o++]:null,a=l?l.fromA:this.old.root.length;if(a>i){let c=a-i;this.preserve(c,!o,!l),i=a,s+=c}if(!l)break;n&&l.fromA<=n.range.fromA&&l.toA>=n.range.toA?(this.forward(l.fromA,n.range.fromA,n.range.fromA<n.range.toA?1:-1),this.emit(s,n.range.fromB),this.cache.clear(),this.builder.addComposition(n,r),this.text.skip(n.range.toB-n.range.fromB),this.forward(n.range.fromA,l.toA),this.emit(n.range.toB,l.toB)):(this.forward(l.fromA,l.toA),this.emit(s,l.toB)),s=l.toB,i=l.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,n,r){let i=FG(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(o,l,a)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(a-l);else{let c=a>0||l<o.length?Uo.of(o.widget,this.view,a-l,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);c.flags&256?(c.flags&=-2,this.builder.addBlockWidget(c)):(this.builder.ensureLine(null),this.builder.addInlineWidget(c,i,s),s=i.length)}else if(o.isText())this.builder.ensureLine(null),!l&&a==o.length?this.builder.addText(o.text,i,s,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(l,a),i,s)),s=i.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof kd)this.cache.add(o);else if(o instanceof An)this.builder.ensureLine(null),this.builder.addMark(o,i,s),this.cache.reused.set(o,1),s=i.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof An&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=s=0):o instanceof An&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let r=null,i=this.builder,s=0,o=Xe.spans(this.decorations,e,n,{point:(l,a,c,u,f,h)=>{if(c instanceof qo){if(this.disallowBlockEffectsFor[h]){if(c.block)throw new RangeError("Block decorations may not be specified via plugins");if(a>this.view.state.doc.lineAt(l).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=u.length,f>u.length)i.continueWidget(a-l);else{let d=c.widget||(c.block?na.block:na.inline),p=DG(c),g=this.cache.findWidget(d,a-l,p)||Uo.of(d,this.view,a-l,p);c.block?(c.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(g)):(i.ensureLine(r),i.addInlineWidget(g,u,f))}r=null}else r=VG(r,c);a>l&&this.text.skip(a-l)},span:(l,a,c,u)=>{for(let f=l;f<a;){let h=this.text.next(Math.min(512,a-f));h==null?(i.addLineStartIfNotCovered(r),i.addBreak(),f++):(i.ensureLine(r),i.addText(h,c,f==l?u:c.length),f+=h.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=o>s,this.openMarks=o}forward(e,n,r=1){n-e<=10?this.old.advance(n-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let n=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=Lt.get(i);if(i==this.view.contentDOM)break;s instanceof An?n.push(s):s!=null&&s.isLine()?r=s:s instanceof Hi||(i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new ta(i,O9):r||n.push(An.of(new ju({tagName:i.nodeName.toLowerCase(),attributes:fG(i)}),i)))}return{line:r,marks:n}}}function uC(t,e){let n=r=>{for(let i of r.children)if((e?i.isText():i.length)||n(i))return!0;return!1};return n(t)}function DG(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const O9={class:"cm-line"};function VG(t,e){let n=e.spec.attributes,r=e.spec.class;return!n&&!r||(t||(t={class:"cm-line"}),n&&tb(n,t),r&&(t.class+=" "+r)),t}function FG(t){let e=[];for(let n=t.parents.length;n>1;n--){let r=n==t.parents.length?t.tile:t.parents[n].tile;r instanceof An&&e.push(r.mark)}return e}function lm(t){let e=Lt.get(t);return e&&e.setDOM(t.cloneNode()),t}class na extends Si{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}na.inline=new na("span");na.block=new na("div");const am=new class extends Si{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class fC{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Pe.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Up(e,e.contentDOM),this.updateInner([new ir(0,0,0,e.state.doc.length)],null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:f})=>f<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!YG(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?ZG(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:u,to:f}=this.hasComposition;r=new ir(u,f,e.changes.mapPos(u,-1),e.changes.mapPos(f,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(Oe.ie||Oe.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.blockWrappers;this.updateDeco();let a=WG(o,this.decorations,e.changes);a.length&&(r=ir.extendWithRanges(r,a));let c=HG(l,this.blockWrappers,e.changes);return c.length&&(r=ir.extendWithRanges(r,c)),s&&!r.some(u=>u.fromA<=s.range.fromA&&u.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(n||e.length){let o=this.tile,l=new NG(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);this.tile=l.run(e,n),K1(o,l.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Oe.chrome||Oe.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof cm&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(h9)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,o=!s&&!(this.view.state.facet(Fi)||r.tabIndex>-1)&&_c(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||n||o))return;let l=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,c,u;if(a.empty?u=c=this.inlineDOMNearPos(a.anchor,a.assoc||1):(u=this.inlineDOMNearPos(a.head,a.head==a.from?1:-1),c=this.inlineDOMNearPos(a.anchor,a.anchor==a.from?1:-1)),Oe.gecko&&a.empty&&!this.hasComposition&&BG(c)){let h=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(h,c.node.childNodes[c.offset]||null)),c=u=new Tr(h,0),l=!0}let f=this.view.observer.selectionRange;(l||!f.focusNode||(!Tc(c.node,c.offset,f.anchorNode,f.anchorOffset)||!Tc(u.node,u.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,a))&&(this.view.observer.ignore(()=>{Oe.android&&Oe.chrome&&r.contains(f.focusNode)&&qG(f.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let h=iu(this.view.root);if(h)if(a.empty){if(Oe.gecko){let d=zG(c.node,c.offset);if(d&&d!=3){let p=(d==1?UQ:GQ)(c.node,c.offset);p&&(c=new Tr(p.node,p.offset))}}h.collapse(c.node,c.offset),a.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=a.bidiLevel)}else if(h.extend){h.collapse(c.node,c.offset);try{h.extend(u.node,u.offset)}catch{}}else{let d=document.createRange();a.anchor>a.head&&([c,u]=[u,c]),d.setEnd(u.node,u.offset),d.setStart(c.node,c.offset),h.removeAllRanges(),h.addRange(d)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(c,u)),this.impreciseAnchor=c.precise?null:new Tr(f.anchorNode,f.anchorOffset),this.impreciseHead=u.precise?null:new Tr(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Tc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=iu(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let o=this.lineAt(n.head,n.assoc);if(!o)return;let l=o.posAtStart;if(n.head==l||n.head==l+o.length)return;let a=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!a||!c||a.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc,n.assoc);r.collapse(u.node,u.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&r.collapse(i,s)}posFromDOM(e,n){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let s;if(e==r.dom)s=r.dom.childNodes[n];else{let o=ss(e)==0?0:n==0?-1:1;for(;;){let l=e.parentNode;if(l==r.dom)break;o==0&&l.firstChild!=l.lastChild&&(e==l.firstChild?o=-1:o=1),e=l}o<0?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!Lt.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let o=0,l=i;;o++){let a=r.children[o];if(a.dom==s)return l;l+=a.length+a.breakAfter}}else return r.isText()?e==r.dom?i+n:i+(n?r.length:0):i}domAtPos(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.domPosFor(e,n):r.domIn(i,n)}inlineDOMNearPos(e,n){let r,i=-1,s=!1,o,l=-1,a=!1;return this.tile.blockTiles((c,u)=>{if(c.isWidget()){if(c.flags&32&&u>=e)return!0;c.flags&16&&(s=!0)}else{let f=u+c.length;if(u<=e&&(r=c,i=e-u,s=f<e),f>=e&&!o&&(o=c,l=e-u,a=u>e),u>e&&o)return!0}}),!r&&!o?this.domAtPos(e,n):(s&&o?r=null:a&&r&&(o=null),r&&n<0||!o?r.domIn(i,n):o.domIn(l,n))}coordsAt(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.widget instanceof cm?null:r.coordsInWidget(i,n,!0):r.coordsIn(i,n)}lineAt(e,n){let{tile:r}=this.tile.resolveBlock(e,n);return r.isLine()?r:null}coordsForChar(e){let{tile:n,offset:r}=this.tile.resolveBlock(e,1);if(!n.isLine())return null;function i(s,o){if(s.isComposite())for(let l of s.children){if(l.length>=o){let a=i(l,o);if(a)return a}if(o-=l.length,o<0)break}else if(s.isText()&&o<s.length){let l=qt(s.text,o);if(l==o)return null;let a=su(s.dom,o,l).getClientRects();for(let c=0;c<a.length;c++){let u=a[c];if(c==a.length-1||u.top<u.bottom&&u.left<u.right)return u}}return null}return i(n,r)}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==ct.LTR,c=0,u=(f,h,d)=>{for(let p=0;p<f.children.length&&!(h>i);p++){let g=f.children[p],O=h+g.length,x=g.dom.getBoundingClientRect(),{height:m}=x;if(d&&!p&&(c+=x.top-d.top),g instanceof Hi)O>r&&u(g,h,x);else if(h>=r&&(c>0&&n.push(-c),n.push(m+c),c=0,o)){let y=g.dom.lastChild,b=y?bh(y):[];if(b.length){let S=b[b.length-1],v=a?S.right-x.left:x.right-S.left;v>l&&(l=v,this.minWidth=s,this.minWidthFrom=h,this.minWidthTo=O)}}d&&p==f.children.length-1&&(c+=d.bottom-x.bottom),h=O+g.breakAfter}};return u(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.dom).direction=="rtl"?ct.RTL:ct.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let l=0,a;for(let c of o.children){if(!c.isText()||/[^ -~]/.test(c.text))return;let u=bh(c.dom);if(u.length!=1)return;l+=u[0].width,a=u[0].height}if(l)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:l/o.length,textHeight:a}}});if(e)return e;let n=document.createElement("div"),r,i,s;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let o=bh(n.firstChild)[0];r=n.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,s=o&&o.height?o.height:r,n.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let s=i==n.viewports.length?null:n.viewports[i],o=s?s.from-1:this.view.state.doc.length;if(o>r){let l=(n.lineBlockAt(o).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(Pe.replace({widget:new cm(l),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return Pe.set(e)}updateDeco(){let e=1,n=this.view.state.facet(qp).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(lb).map((s,o)=>{let l=typeof s=="function";return l&&(r=!0),l?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(Xe.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(p9).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(f9))try{if(c(this.view,e.range,e))return!0}catch(u){$n(this.view.state,u,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let s=ab(this.view),o={left:r.left-s.left,top:r.top-s.top,right:r.right+s.right,bottom:r.bottom+s.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;if(pG(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==ct.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(r.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||r.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let c=this.view.docView.lineAt(n.head,1);c&&c.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let n=r=>r.isWidget()||r.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){K1(this.tile)}}function K1(t,e){let n=e==null?void 0:e.get(t);if(n!=1){n==null&&t.destroy();for(let r of t.children)K1(r,e)}}function BG(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function x9(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=UQ(n.focusNode,n.focusOffset),i=GQ(n.focusNode,n.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let l=Lt.get(i.node);if(!l||l.isText()&&l.text!=i.node.nodeValue)s=i;else if(t.docView.lastCompositionAfterCursor){let a=Lt.get(r.node);!a||a.isText()&&a.text!=r.node.nodeValue||(s=i)}}if(t.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function ZG(t,e,n){let r=x9(t,n);if(!r)return null;let{node:i,from:s,to:o}=r,l=i.nodeValue;if(/[\n\r]/.test(l)||t.state.doc.sliceString(r.from,r.to)!=l)return null;let a=e.invertedDesc;return{range:new ir(a.mapPos(s),a.mapPos(o),s,o),text:i}}function zG(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let XG=class{constructor(){this.changes=[]}compareRange(e,n){Rl(e,n,this.changes)}comparePoint(e,n){Rl(e,n,this.changes)}boundChange(e){Rl(e,e,this.changes)}};function WG(t,e,n){let r=new XG;return Xe.compare(t,e,n,r),r.changes}class jG{constructor(){this.changes=[]}compareRange(e,n){Rl(e,n,this.changes)}comparePoint(){}boundChange(e){Rl(e,e,this.changes)}}function HG(t,e,n){let r=new jG;return Xe.compare(t,e,n,r),r.changes}function qG(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function YG(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}class cm extends Si{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function UG(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),s=e-i.from;if(i.length==0)return H.cursor(e);s==0?n=1:s==i.length&&(n=-1);let o=s,l=s;n<0?o=qt(i.text,s,!1):l=qt(i.text,s);let a=r(i.text.slice(o,l));for(;o>0;){let c=qt(i.text,o,!1);if(r(i.text.slice(c,o))!=a)break;o=c}for(;l<i.length;){let c=qt(i.text,l);if(r(i.text.slice(l,c))!=a)break;l=c}return H.range(o+i.from,l+i.from)}function GG(t,e,n,r,i){let s=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let l=t.viewState.heightOracle.textHeight,a=Math.floor((i-n.top-(t.defaultLineHeight-l)*.5)/l);s+=a*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+F1(o,s,t.state.tabSize)}function J1(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==sn.Text&&(i.type!=s.type||(n<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function KG(t,e,n,r){let i=J1(t,e.head,e.assoc||-1),s=!r||i.type!=sn.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),l=t.textDirectionAt(i.from),a=t.posAtCoords({x:n==(l==ct.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(a!=null)return H.cursor(a,n?-1:1)}return H.cursor(n?i.to:i.from,n?-1:1)}function hC(t,e,n,r){let i=t.state.doc.lineAt(e.head),s=t.bidiSpans(i),o=t.textDirectionAt(i.from);for(let l=e,a=null;;){let c=_G(i,s,o,l,n),u=n9;if(!c){if(i.number==(n?t.state.doc.lines:1))return l;u=`
136
+ `,i=t.state.doc.line(i.number+(n?1:-1)),s=t.bidiSpans(i),c=t.visualLineSide(i,!n)}if(a){if(!a(u))return l}else{if(!r)return c;a=r(u)}l=c}}function JG(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return s=>{let o=r(s);return i==vt.Space&&(i=o),i==o}}function eK(t,e,n,r){let i=e.head,s=n?1:-1;if(i==(n?t.state.doc.length:0))return H.cursor(i,e.assoc);let o=e.goalColumn,l,a=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,(e.empty?e.assoc:0)||(n?1:-1)),u=t.documentTop;if(c)o==null&&(o=c.left-a.left),l=s<0?c.top:c.bottom;else{let p=t.viewState.lineBlockAt(i);o==null&&(o=Math.min(a.right-a.left,t.defaultCharacterWidth*(i-p.from))),l=(s<0?p.top:p.bottom)+u}let f=a.left+o,h=r??t.viewState.heightOracle.textHeight>>1,d=e0(t,{x:f,y:l+h*s},!1,s);return H.cursor(d.pos,d.assoc,void 0,o)}function Ec(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(s,o,l)=>{if(e>s&&e<o){let a=r||n||(e-s<o-e?-1:1);e=a<0?s:o,r=a}});if(!r)return e}}function y9(t,e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=Ec(t,i.from,0);o!=i.from&&(s=H.cursor(o,-1))}else{let o=Ec(t,i.from,-1),l=Ec(t,i.to,1);(o!=i.from||l!=i.to)&&(s=H.range(i.from==i.anchor?o:l,i.from==i.head?o:l))}s&&(n||(n=e.ranges.slice()),n[r]=s)}return n?H.create(n,e.mainIndex):e}function um(t,e,n){let r=Ec(t.state.facet(qu).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:H.cursor(r,r<n.from?1:-1)}class ti{constructor(e,n){this.pos=e,this.assoc=n}}function e0(t,e,n,r){let i=t.contentDOM.getBoundingClientRect(),s=i.top+t.viewState.paddingTop,{x:o,y:l}=e,a=l-s,c;for(;;){if(a<0)return new ti(0,1);if(a>t.viewState.docHeight)return new ti(t.state.doc.length,-1);if(c=t.elementAtHeight(a),r==null)break;if(c.type==sn.Text){if(r<0?c.to<t.viewport.from:c.from>t.viewport.to)break;let h=t.docView.coordsAt(r<0?c.from:c.to,r>0?-1:1);if(h&&(r<0?h.top<=a+s:h.bottom>=a+s))break}let f=t.viewState.heightOracle.textHeight/2;a=r>0?c.bottom+f:c.top-f}if(t.viewport.from>=c.to||t.viewport.to<=c.from){if(n)return null;if(c.type==sn.Text){let f=GG(t,i,c,o,l);return new ti(f,f==c.from?1:-1)}}if(c.type!=sn.Text)return a<(c.top+c.bottom)/2?new ti(c.from,1):new ti(c.to,-1);let u=t.docView.lineAt(c.from,2);return(!u||u.length!=c.length)&&(u=t.docView.lineAt(c.from,-2)),new tK(t,o,l,t.textDirectionAt(c.from)).scanTile(u,c.from)}class tK{constructor(e,n,r,i){this.view=e,this.x=n,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[ii.find(i,e-r.from,-1,n)].level==this.baseDir}dirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[ii.find(i,e-r.from,-1,n)].dir}bidiIn(e,n){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<n)}scan(e,n){let r=0,i=e.length-1,s=new Set,o=this.bidiIn(e[0],e[i]),l,a,c=-1,u=1e9,f;e:for(;r<i;){let d=i-r,p=r+i>>1;t:if(s.has(p)){let O=r+Math.floor(Math.random()*d);for(let x=0;x<d;x++){if(!s.has(O)){p=O;break t}O++,O==i&&(O=r)}break e}s.add(p);let g=n(p);if(g)for(let O=0;O<g.length;O++){let x=g[O],m=0;if(x.bottom<this.y)(!l||l.bottom<x.bottom)&&(l=x),m=1;else if(x.top>this.y)(!a||a.top>x.top)&&(a=x),m=-1;else{let y=x.left>this.x?this.x-x.left:x.right<this.x?this.x-x.right:0,b=Math.abs(y);b<u&&(c=p,u=b,f=x),y&&(m=y<0==(this.baseDir==ct.LTR)?-1:1)}m==-1&&(!o||this.baseDirAt(e[p],1))?i=p:m==1&&(!o||this.baseDirAt(e[p+1],-1))&&(r=p+1)}}if(!f){let d=l&&(!a||this.y-l.bottom<a.top-this.y)?l:a;return this.y=(d.top+d.bottom)/2,this.scan(e,n)}let h=(o?this.dirAt(e[c],1):this.baseDir)==ct.LTR;return{i:c,after:this.x>(f.left+f.right)/2==h}}scanText(e,n){let r=[];for(let s=0;s<e.length;s=qt(e.text,s))r.push(n+s);r.push(n+e.length);let i=this.scan(r,s=>{let o=r[s]-n,l=r[s+1]-n;return su(e.dom,o,l).getClientRects()});return i.after?new ti(r[i.i+1],-1):new ti(r[i.i],1)}scanTile(e,n){if(!e.length)return new ti(n,1);if(e.children.length==1){let l=e.children[0];if(l.isText())return this.scanText(l,n);if(l.isComposite())return this.scanTile(l,n)}let r=[n];for(let l=0,a=n;l<e.children.length;l++)r.push(a+=e.children[l].length);let i=this.scan(r,l=>{let a=e.children[l];return a.flags&48?null:(a.dom.nodeType==1?a.dom:su(a.dom,0,a.length)).getClientRects()}),s=e.children[i.i],o=r[i.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):i.after?new ti(r[i.i+1],-1):new ti(o,1)}}const oc="￿";class nK{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(je.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=oc}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=Lt.get(i),l=i.nextSibling;if(l==n){o!=null&&o.breakAfter&&!l&&r!=this.view.contentDOM&&this.lineBreak();break}let a=Lt.get(l);(o&&a?o.breakAfter:(o?o.breakAfter:vd(i))||vd(l)&&(i.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>s)&&!iK(l,n)&&this.lineBreak(),i=l}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(l=i.exec(n))&&(s=l.index,o=l[0].length),this.append(n.slice(r,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);r=s+o}}readNode(e){let n=Lt.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(rK(e,r.node,r.offset)?n:0))}}function rK(t,e,n){for(;;){if(!e||n<ss(e))return!1;if(e==t)return!0;n=Js(e)+1,e=e.parentNode}}function iK(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let r=Lt.get(t);if(!(r!=null&&r.isWidget()))return!1;r&&(n||(n=[])).push(r)}if(n)for(let r of n){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}class dC{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class sK{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=b9(e.docView.tile,n,r,0))){let l=s||o?[]:lK(e),a=new nK(l,e);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=aK(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!H1(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),c=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!H1(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),u=e.viewport;if((Oe.ios||Oe.chrome)&&e.state.selection.main.empty&&a!=c&&(u.from>0||u.to<e.state.doc.length)){let f=Math.min(a,c),h=Math.max(a,c),d=u.from-f,p=u.to-h;(d==0||d==1||f==0)&&(p==0||p==-1||h==e.state.doc.length)&&(a=0,c=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(H.range(c,a)):this.newSel=H.single(c,a)}}}function b9(t,e,n,r){if(t.isComposite()){let i=-1,s=-1,o=-1,l=-1;for(let a=0,c=r,u=r;a<t.children.length;a++){let f=t.children[a],h=c+f.length;if(c<e&&h>n)return b9(f,e,n,c);if(h>=e&&i==-1&&(i=a,s=c),c>n&&f.dom.parentNode==t.dom){o=a,l=u;break}u=h,c=h+f.breakAfter}return{from:s,to:l<0?r+t.length:l,startDOM:(i?t.children[i-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:o<t.children.length&&o>=0?t.children[o].dom:null}}else return t.isText()?{from:r,to:r+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function v9(t,e){let n,{newSel:r}=e,i=t.state.selection.main,s=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=i.from,c=null;(s===8||Oe.android&&e.text.length<l-o)&&(a=i.to,c="end");let u=S9(t.state.doc.sliceString(o,l,oc),e.text,a-o,c);u&&(Oe.chrome&&s==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==oc+oc&&u.toB--,n={from:o+u.from,to:o+u.toA,insert:Ge.of(e.text.slice(u.from,u.toB).split(oc))})}else r&&(!t.hasFocus&&t.state.facet(Fi)||_d(r,i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(Oe.mac||Oe.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=H.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Ge.of([n.insert.toString().replace("."," ")])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:t.state.doc.lineAt(i.from).to<i.to&&t.docView.lineHasWidget(i.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:i.from,to:i.to,insert:t.state.toText(t.inputState.insertingText)}:Oe.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
137
+ `&&t.lineWrapping&&(r&&(r=H.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Ge.of([" "])}),n)return cb(t,n,r,s);if(r&&!_d(r,i)){let o=!1,l="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),l=t.inputState.lastSelectionOrigin,l=="select.pointer"&&(r=y9(t.state.facet(qu).map(a=>a(t)),r))),t.dispatch({selection:r,scrollIntoView:o,userEvent:l}),!0}else return!1}function cb(t,e,n,r=-1){if(Oe.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(Oe.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ll(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Ll(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ll(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,l=()=>o||(o=oK(t,e,n));return t.state.facet(l9).some(a=>a(t,e.from,e.to,s,l))||t.dispatch(l()),!0}function oK(t,e,n){let r,i=t.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let a=e.from<s.from?-1:1,c=a<0?s.from:s.to,u=Ec(i.facet(qu).map(f=>f(t)),c,a);e.from==u&&(o=u)}if(o>-1)r={changes:e,selection:H.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=s.from<e.from?i.sliceDoc(s.from,e.from):"",c=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let a=i.changes(e),c=n&&n.main.to<=a.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let u=t.state.sliceDoc(e.from,e.to),f,h=n&&x9(t,n.main.head);if(h){let p=e.insert.length-(e.to-e.from);f={from:h.from,to:h.to-p}}else f=t.state.doc.lineAt(s.head);let d=s.to-e.to;r=i.changeByRange(p=>{if(p.from==s.from&&p.to==s.to)return{changes:a,range:c||p.map(a)};let g=p.to-d,O=g-u.length;if(t.state.sliceDoc(O,g)!=u||g>=f.from&&O<=f.to)return{range:p};let x=i.changes({from:O,to:g,insert:e.insert}),m=p.to-s.to;return{changes:x,range:c?H.range(Math.max(0,c.anchor+m),Math.max(0,c.head+m)):p.map(x)}})}else r={changes:a,selection:c&&i.selection.replaceRange(c)}}let l="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,l+=".compose",t.inputState.compositionFirstChange&&(l+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:l,scrollIntoView:!0})}function S9(t,e,n,r){let i=Math.min(t.length,e.length),s=0;for(;s<i&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&t.length==e.length)return null;let o=t.length,l=e.length;for(;o>0&&l>0&&t.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(r=="end"){let a=Math.max(0,s-Math.min(o,l));n-=o+a-s}if(o<s&&t.length<e.length){let a=n<=s&&n>=o?s-n:0;s-=a,l=s+(l-o),o=s}else if(l<s){let a=n<=s&&n>=l?s-n:0;s-=a,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function lK(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new dC(n,r)),(i!=n||s!=r)&&e.push(new dC(i,s))),e}function aK(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?H.single(n+e,r+e):null}function _d(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class cK{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Oe.safari&&e.contentDOM.addEventListener("input",()=>null),Oe.gecko&&kK(e.contentDOM.ownerDocument)}handleEvent(e){!OK(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=uK(e),r=this.handlers,i=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,l=r[s];l&&o!=!l.handlers.length&&(i.removeEventListener(s,this.handleEvent),l=null),l||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!n[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&k9.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Oe.android&&Oe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return Oe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=w9.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||fK.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Ll(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:Oe.safari&&!Oe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function pC(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){$n(n.state,i)}}}function uK(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let l in s){let a=s[l];a&&n(l).handlers.push(pC(r.value,a))}if(o)for(let l in o){let a=o[l];a&&n(l).observers.push(pC(r.value,a))}}for(let r in Dr)n(r).handlers.push(Dr[r]);for(let r in hr)n(r).observers.push(hr[r]);return e}const w9=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],fK="dthko",k9=[16,17,18,20,91,92,224,225],$f=6;function Qf(t){return Math.max(0,t)*.7+8}function hK(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class dK{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=gG(e.contentDOM),this.atoms=e.state.facet(qu).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(je.allowMultipleSelections)&&pK(e,n),this.dragging=mK(e,n)&&T9(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&hK(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,s=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let a=ab(this.view);e.clientX-a.left<=i+$f?n=-Qf(i-e.clientX):e.clientX+a.right>=o-$f&&(n=Qf(e.clientX-o)),e.clientY-a.top<=s+$f?r=-Qf(s-e.clientY):e.clientY+a.bottom>=l-$f&&(r=Qf(e.clientY-l)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=y9(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function pK(t,e){let n=t.state.facet(r9);return n.length?n[0](e):Oe.mac?e.metaKey:e.ctrlKey}function gK(t,e){let n=t.state.facet(i9);return n.length?n[0](e):Oe.mac?!e.altKey:!e.ctrlKey}function mK(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=iu(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function OK(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Lt.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const Dr=Object.create(null),hr=Object.create(null),C9=Oe.ie&&Oe.ie_version<15||Oe.ios&&Oe.webkit_version<604;function xK(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),_9(t,n.value)},50)}function Gp(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function _9(t,e){e=Gp(t.state,ib,e);let{state:n}=t,r,i=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(t0!=null&&n.selection.ranges.every(a=>a.empty)&&t0==s.toString()){let a=-1;r=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==a)return{range:c};a=u.from;let f=n.toText((o?s.line(i++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:f},range:H.cursor(c.from+f.length)}})}else o?r=n.changeByRange(a=>{let c=s.line(i++);return{changes:{from:a.from,to:a.to,insert:c.text},range:H.cursor(a.from+c.length)}}):r=n.replaceSelection(s);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}hr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Dr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);hr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};hr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Dr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(s9))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=bK(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new dK(t,e,n,r)),r&&t.observer.ignore(()=>{qQ(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function gC(t,e,n,r){if(r==1)return H.cursor(e,n);if(r==2)return UG(t.state,e,n);{let i=t.docView.lineAt(e,n),s=t.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,l=i?i.posAtEnd:s.to;return l<t.state.doc.length&&l==s.to&&l++,H.range(o,l)}}const yK=Oe.ie&&Oe.ie_version<=11;let mC=null,OC=0,xC=0;function T9(t){if(!yK)return t.detail;let e=mC,n=xC;return mC=t,xC=Date.now(),OC=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(OC+1)%3:1}function bK(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=T9(e),i=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),i=i.map(s.changes))},get(s,o,l){let a=t.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),c,u=gC(t,a.pos,a.assoc,r);if(n.pos!=a.pos&&!o){let f=gC(t,n.pos,n.assoc,r),h=Math.min(f.from,u.from),d=Math.max(f.to,u.to);u=h<u.from?H.range(h,d):H.range(d,h)}return o?i.replaceRange(i.main.extend(u.from,u.to)):l&&r==1&&i.ranges.length>1&&(c=vK(i,a.pos))?c:l?i.addRange(u):H.create([u])}}}function vK(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return H.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Dr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,o=s+i.length;(s>=n.to||o<=n.from)&&(n=H.range(s,o))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",Gp(t.state,sb,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Dr.dragend=t=>(t.inputState.draggedContent=null,!1);function yC(t,e,n,r){if(n=Gp(t.state,ib,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=r&&s&&gK(t,e)?{from:s.from,to:s.to}:null,l={from:i,insert:n},a=t.state.changes(o?[o,l]:l);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(i,-1),head:a.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Dr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,s=()=>{++i==n.length&&yC(t,e,r.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<n.length;o++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(r[o]=l.result),s()},l.readAsText(n[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return yC(t,e,r,!0),!0}return!1};Dr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=C9?null:e.clipboardData;return n?(_9(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(xK(t),!1)};function SK(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function wK(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>i&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),i=o.number}r=!0}return{text:Gp(t,sb,e.join(t.lineBreak)),ranges:n,linewise:r}}let t0=null;Dr.copy=Dr.cut=(t,e)=>{if(!_c(t.contentDOM,t.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=wK(t.state);if(!n&&!i)return!1;t0=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=C9?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(SK(t,n),!1)};const E9=ys.define();function P9(t,e){let n=[];for(let r of t.facet(a9)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:E9.of(!0)}):null}function A9(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=P9(t.state,e);n?t.dispatch(n):t.update([])}},10)}hr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),A9(t)};hr.blur=t=>{t.observer.clearSelectionRange(),A9(t)};hr.compositionstart=hr.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};hr.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Oe.chrome&&Oe.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};hr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Dr.beforeinput=(t,e)=>{var n,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let l=o[0],a=t.posAtDOM(l.startContainer,l.startOffset),c=t.posAtDOM(l.endContainer,l.endOffset);return cb(t,{from:a,to:c,insert:t.state.toText(s)},null),!0}}let i;if(Oe.chrome&&Oe.android&&(i=w9.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Oe.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Oe.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>hr.compositionend(t,e),20),!1};const bC=new Set;function kK(t){bC.has(t)||(bC.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const vC=["pre-wrap","normal","pre-line","break-spaces"];let ra=!1;function SC(){ra=!1}class CK{constructor(e){this.lineWrapping=e,this.doc=Ge.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return vC.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,s,o){let l=vC.indexOf(e)>-1,a=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=l||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=s,a){this.heightSamples={};for(let c=0;c<o.length;c++){let u=o[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return a}}class _K{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Cr{constructor(e,n,r,i,s){this.from=e,this.length=n,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?sn.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof qo?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Cr(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var ht=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(ht||(ht={}));const vh=.001;class bn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>vh&&(ra=!0),this.height=e)}replace(e,n,r){return bn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let s=this,o=r.doc;for(let l=i.length-1;l>=0;l--){let{fromA:a,toA:c,fromB:u,toB:f}=i[l],h=s.lineAt(a,ht.ByPosNoHeight,r.setDoc(n),0,0),d=h.to>=c?h:s.lineAt(c,ht.ByPosNoHeight,r,0,0);for(f+=d.to-c,c=d.to;l>0&&h.from<=i[l-1].toA;)a=i[l-1].fromA,u=i[l-1].fromB,l--,a<h.from&&(h=s.lineAt(a,ht.ByPosNoHeight,r,0,0));u+=h.from-a,a=h.from;let p=ub.build(r.setDoc(o),e,u,f);s=Td(s,s.replace(a,c,p))}return s.updateHeight(r,0)}static empty(){return new Bn(0,0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,s=0;for(;;)if(n==r)if(i>s*2){let l=e[n-1];l.break?e.splice(--n,1,l.left,null,l.right):e.splice(--n,1,l.left,l.right),r+=1+l.break,i-=l.size}else if(s>i*2){let l=e[r];l.break?e.splice(r,1,l.left,null,l.right):e.splice(r,1,l.left,l.right),r+=2+l.break,s-=l.size}else break;else if(i<s){let l=e[n++];l&&(i+=l.size)}else{let l=e[--r];l&&(s+=l.size)}let o=0;return e[n-1]==null?(o=1,n--):e[n]==null&&(o=1,r++),new EK(bn.of(e.slice(0,n)),o,bn.of(e.slice(r)))}}function Td(t,e){return t==e?t:(t.constructor!=e.constructor&&(ra=!0),e)}bn.prototype.size=1;const TK=Pe.replace({});class $9 extends bn{constructor(e,n,r){super(e,n),this.deco=r,this.spaceAbove=0}mainBlock(e,n){return new Cr(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,n,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new Cr(i,0,r,this.spaceAbove,TK):this.mainBlock(r,i)}lineAt(e,n,r,i,s){let o=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(o):o}forEachLine(e,n,r,i,s,o){e<=s+this.length&&n>=s&&o(this.lineAt(0,ht.ByPos,r,i,s))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Bn extends $9{constructor(e,n,r){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,n){return new Cr(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Bn||i instanceof Kt&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Kt?i=new Bn(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):bn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Kt extends bn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,s=i-r+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*s);o=a/s,this.length>s+1&&(l=(this.height-a)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:l}}blockAt(e,n,r,i){let{firstLine:s,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(n,i);if(n.lineWrapping){let c=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),u=n.doc.lineAt(c),f=l+u.length*a,h=Math.max(r,e-f/2);return new Cr(u.from,u.length,h,f,0)}else{let c=Math.max(0,Math.min(o-s,Math.floor((e-r)/l))),{from:u,length:f}=n.doc.line(s+c);return new Cr(u,f,r+l*c,l,0)}}lineAt(e,n,r,i,s){if(n==ht.ByHeight)return this.blockAt(e,r,i,s);if(n==ht.ByPosNoHeight){let{from:d,to:p}=r.doc.lineAt(e);return new Cr(d,p-d,0,0,0)}let{firstLine:o,perLine:l,perChar:a}=this.heightMetrics(r,s),c=r.doc.lineAt(e),u=l+c.length*a,f=c.number-o,h=i+l*f+a*(c.from-s-f);return new Cr(c.from,c.length,Math.max(i,Math.min(h,i+this.height-u)),u,0)}forEachLine(e,n,r,i,s,o){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:l,perLine:a,perChar:c}=this.heightMetrics(r,s);for(let u=e,f=i;u<=n;){let h=r.doc.lineAt(u);if(u==e){let p=h.number-l;f+=a*p+c*(e-s-p)}let d=a+c*h.length;o(new Cr(h.from,h.length,f,d,0)),f+=d,u=h.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let s=r[r.length-1];s instanceof Kt?r[r.length-1]=new Kt(s.length+i):r.push(null,new Kt(i-1))}if(e>0){let s=r[0];s instanceof Kt?r[0]=new Kt(e+s.length):r.unshift(new Kt(e-1),null)}return bn.of(r)}decomposeLeft(e,n){n.push(new Kt(e-1),null)}decomposeRight(e,n){n.push(null,new Kt(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let s=n+this.length;if(i&&i.from<=n+this.length&&i.more){let o=[],l=Math.max(n,i.from),a=-1;for(i.from>n&&o.push(new Kt(i.from-n-1).updateHeight(e,n));l<=s&&i.more;){let u=e.doc.lineAt(l).length;o.length&&o.push(null);let f=i.heights[i.index++],h=0;f<0&&(h=-f,f=i.heights[i.index++]),a==-1?a=f:Math.abs(f-a)>=vh&&(a=-2);let d=new Bn(u,f,h);d.outdated=!1,o.push(d),l+=u+1}l<=s&&o.push(null,new Kt(s-l).updateHeight(e,l));let c=bn.of(o);return(a<0||Math.abs(c.height-this.height)>=vh||Math.abs(a-this.heightMetrics(e,n).perLine)>=vh)&&(ra=!0),Td(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class EK extends bn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,s,i+this.left.length+this.break)}lineAt(e,n,r,i,s){let o=i+this.left.height,l=s+this.left.length+this.break,a=n==ht.ByHeight?e<o:e<l,c=a?this.left.lineAt(e,n,r,i,s):this.right.lineAt(e,n,r,o,l);if(this.break||(a?c.to<l:c.from>l))return c;let u=n==ht.ByPosNoHeight?ht.ByPosNoHeight:ht.ByPos;return a?c.join(this.right.lineAt(l,u,r,o,l)):this.left.lineAt(l,u,r,i,s).join(c)}forEachLine(e,n,r,i,s,o){let l=i+this.left.height,a=s+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,n,r,i,s,o),n>=a&&this.right.forEachLine(e,n,r,l,a,o);else{let c=this.lineAt(a,ht.ByPos,r,i,s);e<c.from&&this.left.forEachLine(e,c.from-1,r,i,s,o),c.to>=e&&c.from<=n&&o(c),n>c.to&&this.right.forEachLine(c.to+1,n,r,l,a,o)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of r)s.push(l);if(e>0&&wC(s,o-1),n<this.length){let l=s.length;this.decomposeRight(n,s),wC(s,l)}return bn.of(s)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?bn.of(this.break?[e,null,n]:[e,n]):(this.left=Td(this.left,e),this.right=Td(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:s,right:o}=this,l=n+s.length+this.break,a=null;return i&&i.from<=n+s.length&&i.more?a=s=s.updateHeight(e,n,r,i):s.updateHeight(e,n,r),i&&i.from<=l+o.length&&i.more?a=o=o.updateHeight(e,l,r,i):o.updateHeight(e,l,r),a?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function wC(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Kt&&(r=t[e+1])instanceof Kt&&t.splice(e-1,3,new Kt(n.length+1+r.length))}const PK=5;class ub{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Bn?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Bn(r-this.pos,-1,0)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=n-e;r.block?this.addBlock(new $9(o,i,r)):(o||s||i>=PK)&&this.addLineDeco(i,s,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Bn(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let r=new Kt(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Bn)return e;let n=new Bn(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Bn)&&!this.isCovered?this.nodes.push(new Bn(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Bn&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let s=new ub(r,e);return Xe.spans(n,r,i,s,0),s.finish(r)}}function AK(t,e,n){let r=new $K;return Xe.compare(t,e,n,r,0),r.changes}class $K{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&Rl(e,n,this.changes,5)}}function QK(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,s=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),l=Math.max(0,n.top),a=Math.min(i.innerHeight,n.bottom);for(let c=t.parentNode;c&&c!=r.body;)if(c.nodeType==1){let u=c,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let h=u.getBoundingClientRect();s=Math.max(s,h.left),o=Math.min(o,h.right),l=Math.max(l,h.top),a=Math.min(c==t.parentNode?i.innerHeight:a,h.bottom)}c=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:l-(n.top+e),bottom:Math.max(l,a)-(n.top+e)}}function MK(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function RK(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class fm{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=n[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,n){return Pe.replace({widget:new LK(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class LK extends Si{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class kC{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=CC,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=ct.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(ob).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new CK(n),this.stateDeco=_C(e),this.heightMap=bn.empty().applyChanges(this.stateDeco,Ge.empty,this.heightOracle.setDoc(e.doc),[new ir(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Pe.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new Mf(s,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?CC:new fb(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(lc(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=_C(this.state);let i=e.changedRanges,s=ir.extendWithRanges(i,AK(r,this.stateDeco,e?e.changes:Vt.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);SC(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||ra)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let a=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<a.from||n.range.head>a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,n));let c=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(u9)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?ct.RTL:ct.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",l=n.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let c=0,u=0;if(l.width&&l.height){let{scaleX:b,scaleY:S}=HQ(n,l);(b>.005&&Math.abs(this.scaleX-b)>.005||S>.005&&Math.abs(this.scaleY-S)>.005)&&(this.scaleX=b,this.scaleY=S,c|=16,o=a=!0)}let f=(parseInt(r.paddingTop)||0)*this.scaleY,h=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=h)&&(this.paddingTop=f,this.paddingBottom=h,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=YQ(e.scrollDOM);let p=(this.printing?RK:QK)(n,this.paddingTop),g=p.top-this.pixelViewport.top,O=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let x=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(x!=this.inView&&(this.inView=x,x&&(a=!0)),!this.inView&&!this.scrollTarget&&!MK(e.dom))return 0;let m=l.width;if((this.contentDOMWidth!=m||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),a){let b=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(b)&&(o=!0),o||i.lineWrapping&&Math.abs(m-this.contentDOMWidth)>i.charWidth){let{lineHeight:S,charWidth:v,textHeight:w}=e.docView.measureTextSize();o=S>0&&i.refresh(s,S,v,w,Math.max(5,m/v),b),o&&(e.docView.minWidth=0,c|=16)}g>0&&O>0?u=Math.max(g,O):g<0&&O<0&&(u=Math.min(g,O)),SC();for(let S of this.viewports){let v=S.from==this.viewport.from?b:e.docView.measureVisibleLineHeights(S);this.heightMap=(o?bn.empty().applyChanges(this.stateDeco,Ge.empty,this.heightOracle,[new ir(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new _K(S.from,v))}ra&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new Mf(i.lineAt(o-r*1e3,ht.ByHeight,s,0,0).from,i.lineAt(l+(1-r)*1e3,ht.ByHeight,s,0,0).to);if(n){let{head:c}=n.range;if(c<a.from||c>a.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(c,ht.ByPos,s,0,0),h;n.y=="center"?h=(f.top+f.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c<a.from?h=f.top:h=f.bottom-u,a=new Mf(i.lineAt(h-1e3/2,ht.ByHeight,s,0,0).from,i.lineAt(h+u+1e3/2,ht.ByHeight,s,0,0).to)}}return a}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new Mf(this.heightMap.lineAt(r,ht.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,ht.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,ht.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,ht.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:l}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||s>=l+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<l+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new fm(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=ct.LTR&&!r)return[];let l=[],a=(u,f,h,d)=>{if(f-u<s)return;let p=this.state.selection.main,g=[p.from];p.empty||g.push(p.to);for(let x of g)if(x>u&&x<f){a(u,x-10,h,d),a(x+10,f,h,d);return}let O=NK(e,x=>x.from>=h.from&&x.to<=h.to&&Math.abs(x.from-u)<s&&Math.abs(x.to-f)<s&&!g.some(m=>x.from<m&&x.to>m));if(!O){if(f<h.to&&n&&r&&n.visibleRanges.some(y=>y.from<=f&&y.to>=f)){let y=n.moveToLineBoundary(H.cursor(f),!1,!0).head;y>u&&(f=y)}let x=this.gapSize(h,u,f,d),m=r||x<2e6?x:2e6;O=new fm(u,f,x,m)}l.push(O)},c=u=>{if(u.length<o||u.type!=sn.Text)return;let f=IK(u.from,u.to,this.stateDeco);if(f.total<o)return;let h=this.scrollTarget?this.scrollTarget.range.head:null,d,p;if(r){let g=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,O,x;if(h!=null){let m=Lf(f,h),y=((this.visibleBottom-this.visibleTop)/2+g)/u.height;O=m-y,x=m+y}else O=(this.visibleTop-u.top-g)/u.height,x=(this.visibleBottom-u.top+g)/u.height;d=Rf(f,O),p=Rf(f,x)}else{let g=f.total*this.heightOracle.charWidth,O=i*this.heightOracle.charWidth,x=0;if(g>2e6)for(let v of e)v.from>=u.from&&v.from<u.to&&v.size!=v.displaySize&&v.from*this.heightOracle.charWidth+x<this.pixelViewport.left&&(x=v.size-v.displaySize);let m=this.pixelViewport.left+x,y=this.pixelViewport.right+x,b,S;if(h!=null){let v=Lf(f,h),w=((y-m)/2+O)/g;b=v-w,S=v+w}else b=(m-O)/g,S=(y+O)/g;d=Rf(f,b),p=Rf(f,S)}d>u.from&&a(u.from,d,u,f),p<u.to&&a(p,u.to,u,f)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(c):c(u);return l}gapSize(e,n,r,i){let s=Lf(i,r)-Lf(i,n);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){fm.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Pe.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];Xe.spans(n,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],l=r[s];(o.from!=l.from||o.to!=l.to)&&(i|=4,e&&e.mapPos(o.from,-1)==l.from&&e.mapPos(o.to,1)==l.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||lc(this.heightMap.lineAt(e,ht.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||lc(this.heightMap.lineAt(this.scaler.fromDOM(e),ht.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return lc(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Mf{constructor(e,n){this.from=e,this.to=n}}function IK(t,e,n){let r=[],i=t,s=0;return Xe.spans(n,t,e,{span(){},point(o,l){o>i&&(r.push({from:i,to:o}),s+=o-i),i=l}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function Rf({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:s,to:o}=e[i],l=o-s;if(r<=l)return s+r;r-=l}}function Lf(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function NK(t,e){for(let n of t)if(e(n))return n}const CC={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function _C(t){let e=t.facet(qp).filter(r=>typeof r!="function"),n=t.facet(lb).filter(r=>typeof r!="function");return n.length&&e.push(Xe.join(n)),e}class fb{constructor(e,n,r){let i=0,s=0,o=0;this.viewports=r.map(({from:l,to:a})=>{let c=n.lineAt(l,ht.ByPos,e,0,0).top,u=n.lineAt(a,ht.ByPos,e,0,0).bottom;return i+=u-c,{from:l,to:a,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof fb?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function lc(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Cr(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>lc(i,e)):t._content)}const If=ge.define({combine:t=>t.join(" ")}),n0=ge.define({combine:t=>t.indexOf(!0)>-1}),r0=Gs.newName(),Q9=Gs.newName(),M9=Gs.newName(),R9={"&light":"."+Q9,"&dark":"."+M9};function i0(t,e,n){return new Gs(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const DK=i0("."+r0,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},R9),VK={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},hm=Oe.ie&&Oe.ie_version<=11;class FK{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new mG,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(Oe.ie&&Oe.ie_version<=11||Oe.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Oe.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Oe.chrome&&Oe.chrome_version<126)&&(this.editContext=new ZK(e),e.state.facet(Fi)&&(e.contentDOM.editContext=this.editContext.editContext)),hm&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Fi)?r.root.activeElement!=this.dom:!_c(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Oe.ie&&Oe.ie_version<=11||Oe.android&&Oe.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Tc(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=iu(e.root);if(!n)return!1;let r=Oe.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&BK(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=_c(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&xG(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,VK),hm&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),hm&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Ll(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),n==-1?{from:n,to:r}=o:(n=Math.min(o.from,n),r=Math.max(o.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&_c(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new sK(this.view,e,n,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=v9(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!_d(this.view.state.selection,n.newSel.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let r=TC(n,e.previousSibling||e.target.previousSibling,-1),i=TC(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Fi)!=e.state.facet(Fi)&&(e.view.contentDOM.editContext=e.state.facet(Fi)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function TC(t,e,n){for(;e;){let r=Lt.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function EC(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor,1);return Tc(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function BK(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return EC(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?EC(t,n):null}class ZK{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:o}=i,l=this.toEditorPos(r.updateRangeStart),a=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:l,drifted:!1});let c=a-l>r.text.length;l==this.from&&s<this.from?l=s:a==this.to&&s>this.to&&(a=s);let u=S9(e.state.sliceDoc(l,a),r.text,(c?i.from:i.to)-l,c?"end":null);if(!u){let h=H.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));_d(h,i)||e.dispatch({selection:h,userEvent:"select"});return}let f={from:u.from+l,to:u.toA+l,insert:Ge.of(r.text.slice(u.from,u.toB).split(`
138
+ `))};if((Oe.mac||Oe.android)&&f.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:l,to:a,insert:Ge.of([r.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let h=this.to-this.from+(f.to-f.from+f.insert.length);cb(e,f,H.single(this.toEditorPos(r.selectionStart,h),this.toEditorPos(r.selectionEnd,h)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),l=this.toEditorPos(r.rangeEnd);o<l;o++){let a=e.coordsForChar(o);s=a&&new DOMRect(a.left,a.top,a.right-a.left,a.bottom-a.top)||s||new DOMRect,i.push(s)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(l)){let a=this.toEditorPos(s.rangeStart),c=this.toEditorPos(s.rangeEnd);if(a<c){let u=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(l)?1:2}px`;i.push(Pe.mark({attributes:{style:u}}).range(a,c))}}}e.dispatch({effects:h9.of(Pe.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=iu(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,l,a,c)=>{if(r)return;let u=c.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(c)){i=this.pendingContextChange=null,n+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(s+=n,o+=n,o<=this.from)this.from+=u,this.to+=u;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=u}n+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class he{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||OG(e.parent)||document,this.viewState=new kC(e.state||je.create(e)),e.scrollTo&&e.scrollTo.is(Af)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Sl).map(i=>new om(i));for(let i of this.plugins)i.update(this);this.observer=new FK(this),this.inputState=new cK(this),this.inputState.ensureHandlers(this.plugins),this.docView=new fC(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof Mt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,s=this.state;for(let h of e){if(h.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=h.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,l=0,a=null;e.some(h=>h.annotation(E9))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=P9(s,o),a||(l=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(je.phrases)!=this.state.facet(je.phrases))return this.setState(s);i=wd.create(this,s,e),i.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let h of e){if(f&&(f=f.map(h.changes)),h.scrollIntoView){let{main:d}=h.state.selection;f=new Il(d.empty?d:H.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of h.effects)d.is(Af)&&(f=d.value.clip(this.state))}this.viewState.update(i,f),this.bidiCache=Ed.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(sc)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(If)!=i.state.facet(If)&&(this.viewState.mustMeasureContent=!0),(n||r||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let h of this.state.facet(G1))try{h(i)}catch(d){$n(this.state,d,"update listener")}(a||u)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),u&&!v9(this,u)&&c.force&&Ll(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new kC(e),this.plugins=e.facet(Sl).map(r=>new om(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new fC(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Sl),r=e.state.facet(Sl);if(n!=r){let i=[];for(let s of r){let o=n.indexOf(s);if(o<0)i.push(new om(s));else{let l=this.plugins[o];l.mustUpdate=e,i.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){$n(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(YQ(r))s=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(i);s=d.from,o=d.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];a&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(d=>{try{return d.read(this)}catch(p){return $n(this.state,p),PC}}),f=wd.create(this,this.state,[]),h=!1;f.flags|=a,n?n.flags|=a:n=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),h=this.docView.update(f),h&&this.docViewUpdate());for(let d=0;d<c.length;d++)if(u[d]!=PC)try{let p=c[d];p.write&&p.write(u[d],this)}catch(p){$n(this.state,p)}if(h&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let p=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o;if(p>1||p<-1){i=i+p,r.scrollTop=i/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(G1))l(n)}get themeClasses(){return r0+" "+(this.state.facet(n0)?M9:Q9)+" "+this.state.facet(If)}updateAttrs(){let e=AC(this,d9,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Fi)?"true":"false",class:"cm-content",style:`${Oe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),AC(this,ob,n);let r=this.observer.ignore(()=>{let i=sC(this.contentDOM,this.contentAttrs,n),s=sC(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(he.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(sc);let e=this.state.facet(he.cspNonce);Gs.mount(this.root,this.styleModules.concat(DK).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return um(this,e,hC(this,e,n,r))}moveByGroup(e,n){return um(this,e,hC(this,e,n,r=>JG(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[n?r.length-1:0];return H.cursor(s.side(n,i)+e.from,s.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return KG(this,e,n,r)}moveVertically(e,n,r){return um(this,e,eK(this,e,n,r))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let r=e0(this,e,n);return r&&r.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),e0(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[ii.find(s,e-i.from,-1,n)];return Sd(r,o.dir==ct.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(c9)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>zK)return t9(e.length);let n=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||e9(s.isolates,r=aC(this,e))))return s.order;r||(r=aC(this,e));let i=CG(e.text,n,r);return this.bidiCache.push(new Ed(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Oe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{qQ(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Af.of(new Il(typeof e=="number"?H.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return Af.of(new Il(H.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return It.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return It.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Gs.newName(),i=[If.of(r),sc.of(i0(`.${r}`,e))];return n&&n.dark&&i.push(n0.of(!0)),i}static baseTheme(e){return xs.lowest(sc.of(i0("."+r0,e,R9)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&Lt.get(r)||Lt.get(e);return((n=i==null?void 0:i.root)===null||n===void 0?void 0:n.view)||null}}he.styleModule=sc;he.inputHandler=l9;he.clipboardInputFilter=ib;he.clipboardOutputFilter=sb;he.scrollHandler=f9;he.focusChangeEffect=a9;he.perLineTextDirection=c9;he.exceptionSink=o9;he.updateListener=G1;he.editable=Fi;he.mouseSelectionStyle=s9;he.dragMovesSelection=i9;he.clickAddsSelectionRange=r9;he.decorations=qp;he.blockWrappers=p9;he.outerDecorations=lb;he.atomicRanges=qu;he.bidiIsolatedRanges=g9;he.scrollMargins=m9;he.darkTheme=n0;he.cspNonce=ge.define({combine:t=>t.length?t[0]:""});he.contentAttributes=ob;he.editorAttributes=d9;he.lineWrapping=he.contentAttributes.of({class:"cm-lineWrapping"});he.announce=Ie.define();const zK=4096,PC={};class Ed{constructor(e,n,r,i,s,o){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:ct.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new Ed(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function AC(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(t):s;o&&tb(o,n)}return n}const XK=Oe.mac?"mac":Oe.windows?"win":Oe.linux?"linux":"key";function WK(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,s,o,l;for(let a=0;a<n.length-1;++a){const c=n[a];if(/^(cmd|meta|m)$/i.test(c))l=!0;else if(/^a(lt)?$/i.test(c))i=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+c)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),l&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function Nf(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const jK=xs.default(he.domEventHandlers({keydown(t,e){return I9(L9(e.state),t,e,"editor")}})),$a=ge.define({enables:jK}),$C=new WeakMap;function L9(t){let e=t.facet($a),n=$C.get(e);return n||$C.set(e,n=YK(e.reduce((r,i)=>r.concat(i),[]))),n}function HK(t,e,n){return I9(L9(t.state),e,t,n)}let Ts=null;const qK=4e3;function YK(t,e=XK){let n=Object.create(null),r=Object.create(null),i=(o,l)=>{let a=r[o];if(a==null)r[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,l,a,c,u)=>{var f,h;let d=n[o]||(n[o]=Object.create(null)),p=l.split(/ (?!$)/).map(x=>WK(x,e));for(let x=1;x<p.length;x++){let m=p.slice(0,x).join(" ");i(m,!0),d[m]||(d[m]={preventDefault:!0,stopPropagation:!1,run:[y=>{let b=Ts={view:y,prefix:m,scope:o};return setTimeout(()=>{Ts==b&&(Ts=null)},qK),!0}]})}let g=p.join(" ");i(g,!1);let O=d[g]||(d[g]={preventDefault:!1,stopPropagation:!1,run:((h=(f=d._any)===null||f===void 0?void 0:f.run)===null||h===void 0?void 0:h.slice())||[]});a&&O.run.push(a),c&&(O.preventDefault=!0),u&&(O.stopPropagation=!0)};for(let o of t){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of l){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let h in u)u[h].run.push(d=>f(d,s0))}let a=o[e]||o.key;if(a)for(let c of l)s(c,a,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(c,"Shift-"+a,o.shift,o.preventDefault,o.stopPropagation)}return n}let s0=null;function I9(t,e,n,r){s0=e;let i=aG(e),s=En(i,0),o=ei(s)==i.length&&i!=" ",l="",a=!1,c=!1,u=!1;Ts&&Ts.view==n&&Ts.scope==r&&(l=Ts.prefix+" ",k9.indexOf(e.keyCode)<0&&(c=!0,Ts=null));let f=new Set,h=O=>{if(O){for(let x of O.run)if(!f.has(x)&&(f.add(x),x(n)))return O.stopPropagation&&(u=!0),!0;O.preventDefault&&(O.stopPropagation&&(u=!0),c=!0)}return!1},d=t[r],p,g;return d&&(h(d[l+Nf(i,e,!o)])?a=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Oe.windows&&e.ctrlKey&&e.altKey)&&!(Oe.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(p=Ks[e.keyCode])&&p!=i?(h(d[l+Nf(p,e,!0)])||e.shiftKey&&(g=nu[e.keyCode])!=i&&g!=p&&h(d[l+Nf(g,e,!1)]))&&(a=!0):o&&e.shiftKey&&h(d[l+Nf(i,e,!0)])&&(a=!0),!a&&h(d._any)&&(a=!0)),c&&(a=!0),a&&u&&e.stopPropagation(),s0=null,a}class Yu{constructor(e,n,r,i,s){this.className=e,this.left=n,this.top=r,this.width=i,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let s=N9(e);return[new Yu(n,i.left-s.left,i.top-s.top,null,i.bottom-i.top)]}else return UK(e,n,r)}}function N9(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==ct.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function QC(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let s=t.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,l=t.posAtCoords({x:s.left+1,y:o}),a=t.posAtCoords({x:s.right-1,y:o});return l==null||a==null?r:{from:Math.max(r.from,Math.min(l,a)),to:Math.min(r.to,Math.max(l,a))}}function UK(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),s=t.textDirection==ct.LTR,o=t.contentDOM,l=o.getBoundingClientRect(),a=N9(t),c=o.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),f=l.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),h=l.right-(u?parseInt(u.paddingRight):0),d=J1(t,r,1),p=J1(t,i,-1),g=d.type==sn.Text?d:null,O=p.type==sn.Text?p:null;if(g&&(t.lineWrapping||d.widgetLineBreaks)&&(g=QC(t,r,1,g)),O&&(t.lineWrapping||p.widgetLineBreaks)&&(O=QC(t,i,-1,O)),g&&O&&g.from==O.from&&g.to==O.to)return m(y(n.from,n.to,g));{let S=g?y(n.from,null,g):b(d,!1),v=O?y(null,n.to,O):b(p,!0),w=[];return(g||d).to<(O||p).from-(g&&O?1:0)||d.widgetLineBreaks>1&&S.bottom+t.defaultLineHeight/2<v.top?w.push(x(f,S.bottom,h,v.top)):S.bottom<v.top&&t.elementAtHeight((S.bottom+v.top)/2).type==sn.Text&&(S.bottom=v.top=(S.bottom+v.top)/2),m(S).concat(w).concat(m(v))}function x(S,v,w,_){return new Yu(e,S-a.left,v-a.top,Math.max(0,w-S),_-v)}function m({top:S,bottom:v,horizontal:w}){let _=[];for(let T=0;T<w.length;T+=2)_.push(x(w[T],S,w[T+1],v));return _}function y(S,v,w){let _=1e9,T=-1e9,E=[];function L(V,Z,Y,j,U){let se=t.coordsAtPos(V,V==w.to?-2:2),Q=t.coordsAtPos(Y,Y==w.from?2:-2);!se||!Q||(_=Math.min(se.top,Q.top,_),T=Math.max(se.bottom,Q.bottom,T),U==ct.LTR?E.push(s&&Z?f:se.left,s&&j?h:Q.right):E.push(!s&&j?f:Q.left,!s&&Z?h:se.right))}let M=S??w.from,$=v??w.to;for(let V of t.visibleRanges)if(V.to>M&&V.from<$)for(let Z=Math.max(V.from,M),Y=Math.min(V.to,$);;){let j=t.state.doc.lineAt(Z);for(let U of t.bidiSpans(j)){let se=U.from+j.from,Q=U.to+j.from;if(se>=Y)break;Q>Z&&L(Math.max(se,Z),S==null&&se<=M,Math.min(Q,Y),v==null&&Q>=$,U.dir)}if(Z=j.to+1,Z>=Y)break}return E.length==0&&L(M,S==null,$,v==null,t.textDirection),{top:_,bottom:T,horizontal:E}}function b(S,v){let w=l.top+(v?S.top:S.bottom);return{top:w,bottom:w,horizontal:[]}}}function GK(t,e){return t.constructor==e.constructor&&t.eq(e)}class KK{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Sh)!=e.state.facet(Sh)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(Sh);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!GK(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e,Oe.safari&&Oe.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Sh=ge.define();function D9(t){return[It.define(e=>new KK(e,t)),Sh.of(t)]}const ou=ge.define({combine(t){return vi(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function JK(t={}){return[ou.of(t),eJ,tJ,nJ,u9.of(!0)]}function V9(t){return t.startState.facet(ou)!=t.state.facet(ou)}const eJ=D9({above:!0,markers(t){let{state:e}=t,n=e.facet(ou),r=[];for(let i of e.selection.ranges){let s=i==e.selection.main;if(i.empty||n.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=i.empty?i:H.cursor(i.head,i.head>i.anchor?-1:1);for(let a of Yu.forRange(t,o,l))r.push(a)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=V9(t);return n&&MC(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){MC(e.state,t)},class:"cm-cursorLayer"});function MC(t,e){e.style.animationDuration=t.facet(ou).cursorBlinkRate+"ms"}const tJ=D9({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Yu.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||V9(t)},class:"cm-selectionLayer"}),nJ=xs.highest(he.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),F9=Ie.define({map(t,e){return t==null?null:e.mapPos(t)}}),ac=Ut.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(F9)?r.value:n,t)}}),rJ=It.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(ac);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(ac)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(ac),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(ac)!=t&&this.view.dispatch({effects:F9.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function iJ(){return[ac,rJ]}function RC(t,e,n,r,i){e.lastIndex=0;for(let s=t.iterRange(n,r),o=n,l;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;l=e.exec(s.value);)i(o+l.index,l)}function sJ(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:s}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=s:r.push({from:i,to:s});return r}class oJ{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(l,a,c,u)=>i(u,c,c+l[0].length,l,a);else if(typeof r=="function")this.addMatch=(l,a,c,u)=>{let f=r(l,a,c);f&&u(c,c+l[0].length,f)};else if(r)this.addMatch=(l,a,c,u)=>u(c,c+l[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new is,r=n.add.bind(n);for(let{from:i,to:s}of sJ(e,this.maxLength))RC(e.state.doc,this.regexp,i,s,(o,l)=>this.addMatch(l,e,o,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((s,o,l,a)=>{a>=e.view.viewport.from&&l<=e.view.viewport.to&&(r=Math.min(l,r),i=Math.max(a,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let s of e.visibleRanges){let o=Math.max(s.from,r),l=Math.min(s.to,i);if(l>=o){let a=e.state.doc.lineAt(o),c=a.to<l?e.state.doc.lineAt(l):a,u=Math.max(s.from,a.from),f=Math.min(s.to,c.to);if(this.boundary){for(;o>a.from;o--)if(this.boundary.test(a.text[o-1-a.from])){u=o;break}for(;l<c.to;l++)if(this.boundary.test(c.text[l-c.from])){f=l;break}}let h=[],d,p=(g,O,x)=>h.push(x.range(g,O));if(a==c)for(this.regexp.lastIndex=u-a.from;(d=this.regexp.exec(a.text))&&d.index<f-a.from;)this.addMatch(d,e,d.index+a.from,p);else RC(e.state.doc,this.regexp,u,f,(g,O)=>this.addMatch(O,e,g,p));n=n.update({filterFrom:u,filterTo:f,filter:(g,O)=>g<u||O>f,add:h})}}return n}}const o0=/x/.unicode!=null?"gu":"g",lJ=new RegExp(`[\0-\b
139
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,o0),aJ={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let dm=null;function cJ(){var t;if(dm==null&&typeof document<"u"&&document.body){let e=document.body.style;dm=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return dm||!1}const wh=ge.define({combine(t){let e=vi(t,{render:null,specialChars:lJ,addSpecialChars:null});return(e.replaceTabs=!cJ())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,o0)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,o0)),e}});function uJ(t={}){return[wh.of(t),fJ()]}let LC=null;function fJ(){return LC||(LC=It.fromClass(class{constructor(t){this.view=t,this.decorations=Pe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(wh)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new oJ({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,s=En(e[0],0);if(s==9){let o=i.lineAt(r),l=n.state.tabSize,a=Nr(o.text,l,r-o.from);return Pe.replace({widget:new gJ((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Pe.replace({widget:new pJ(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(wh);t.startState.facet(wh)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const hJ="•";function dJ(t){return t>=32?hJ:t==10?"␤":String.fromCharCode(9216+t)}class pJ extends Si{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=dJ(this.code),r=e.state.phrase("Control character")+" "+(aJ[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let s=document.createElement("span");return s.textContent=n,s.title=r,s.setAttribute("aria-label",r),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class gJ extends Si{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function mJ(){return xJ}const OJ=Pe.line({class:"cm-activeLine"}),xJ=It.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(OJ.range(i.from)),e=i.from)}return Pe.set(n)}},{decorations:t=>t.decorations}),l0=2e3;function yJ(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),s=[];if(e.off>l0||n.off>l0||e.col<0||n.col<0){let o=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let a=r;a<=i;a++){let c=t.doc.line(a);c.length<=l&&s.push(H.range(c.from+o,c.to+l))}}else{let o=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let a=r;a<=i;a++){let c=t.doc.line(a),u=F1(c.text,o,t.tabSize,!0);if(u<0)s.push(H.cursor(c.to));else{let f=F1(c.text,l,t.tabSize);s.push(H.range(c.from+u,c.from+f))}}}return s}function bJ(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function IC(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,s=i>l0?-1:i==r.length?bJ(t,e.clientX):Nr(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:s,off:i}}function vJ(t,e){let n=IC(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let s=i.changes.mapPos(i.startState.doc.line(n.line).from),o=i.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},r=r.map(i.changes)}},get(i,s,o){let l=IC(t,i);if(!l)return r;let a=yJ(t.state,n,l);return a.length?o?H.create(a.concat(r.ranges)):H.create(a):r}}:null}function SJ(t){let e=(n=>n.altKey&&n.button==0);return he.mouseSelectionStyle.of((n,r)=>e(r)?vJ(n,r):null)}const wJ={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},kJ={style:"cursor: crosshair"};function CJ(t={}){let[e,n]=wJ[t.key||"Alt"],r=It.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,he.contentAttributes.of(i=>{var s;return!((s=i.plugin(r))===null||s===void 0)&&s.isDown?kJ:null})]}const Df="-10000px";class B9{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=r(o,s))}update(e,n){var r;let i=e.state.facet(this.facet),s=i.filter(a=>a);if(i===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let o=[],l=n?[]:null;for(let a=0;a<s.length;a++){let c=s[a],u=-1;if(c){for(let f=0;f<this.tooltips.length;f++){let h=this.tooltips[f];h&&h.create==c.create&&(u=f)}if(u<0)o[a]=this.createTooltipView(c,a?o[a-1]:null),l&&(l[a]=!!c.above);else{let f=o[a]=this.tooltipViews[u];l&&(l[a]=n[u]),f.update&&f.update(e)}}}for(let a of this.tooltipViews)o.indexOf(a)<0&&(this.removeTooltipView(a),(r=a.destroy)===null||r===void 0||r.call(a));return n&&(l.forEach((a,c)=>n[c]=a),n.length=l.length),this.input=i,this.tooltips=s,this.tooltipViews=o,!0}}function _J(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const pm=ge.define({combine:t=>{var e,n,r;return{position:Oe.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||_J}}}),NC=new WeakMap,hb=It.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(pm);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new B9(t,db,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(pm);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=Df,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(Oe.safari){let o=s.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else n=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=ab(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let l=this.manager.tooltipViews[o];return l.getCoords?l.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(pm).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:s}=t,o=[];for(let l=0;l<this.manager.tooltips.length;l++){let a=this.manager.tooltips[l],c=this.manager.tooltipViews[l],{dom:u}=c,f=t.pos[l],h=t.size[l];if(!f||a.clip!==!1&&(f.bottom<=Math.max(n.top,r.top)||f.top>=Math.min(n.bottom,r.bottom)||f.right<Math.max(n.left,r.left)-.1||f.left>Math.min(n.right,r.right)+.1)){u.style.top=Df;continue}let d=a.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,g=h.right-h.left,O=(e=NC.get(c))!==null&&e!==void 0?e:h.bottom-h.top,x=c.offset||EJ,m=this.view.textDirection==ct.LTR,y=h.width>r.right-r.left?m?r.left:r.right-h.width:m?Math.max(r.left,Math.min(f.left-(d?14:0)+x.x,r.right-g)):Math.min(Math.max(r.left,f.left-g+(d?14:0)-x.x),r.right-g),b=this.above[l];!a.strictSide&&(b?f.top-O-p-x.y<r.top:f.bottom+O+p+x.y>r.bottom)&&b==r.bottom-f.bottom>f.top-r.top&&(b=this.above[l]=!b);let S=(b?f.top-r.top:r.bottom-f.bottom)-p;if(S<O&&c.resize!==!1){if(S<this.view.defaultLineHeight){u.style.top=Df;continue}NC.set(c,O),u.style.height=(O=S)/s+"px"}else u.style.height&&(u.style.height="");let v=b?f.top-O-p-x.y:f.bottom+p+x.y,w=y+g;if(c.overlap!==!0)for(let _ of o)_.left<w&&_.right>y&&_.top<v+O&&_.bottom>v&&(v=b?_.top-O-2-p:_.bottom+p+2);if(this.position=="absolute"?(u.style.top=(v-t.parent.top)/s+"px",DC(u,(y-t.parent.left)/i)):(u.style.top=v/s+"px",DC(u,y/i)),d){let _=f.left+(m?x.x:-x.x)-(y+14-7);d.style.left=_/i+"px"}c.overlap!==!0&&o.push({left:y,top:v,right:w,bottom:v+O}),u.classList.toggle("cm-tooltip-above",b),u.classList.toggle("cm-tooltip-below",!b),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Df}},{eventObservers:{scroll(){this.maybeMeasure()}}});function DC(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const TJ=he.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),EJ={x:0,y:0},db=ge.define({enables:[hb,TJ]}),Pd=ge.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Kp{static create(e){return new Kp(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new B9(e,Pd,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const PJ=db.compute([Pd],t=>{let e=t.facet(Pd);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:Kp.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class AJ{constructor(e,n,r,i,s){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.tile.nearest(n.target);if(!r)return;let i,s=1;if(r.isWidget())i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let l=e.coordsAtPos(i);if(!l||n.y<l.top||n.y>l.bottom||n.x<l.left-e.defaultCharacterWidth||n.x>l.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(i)).find(u=>u.from<=i&&u.to>=i),c=a&&a.dir==ct.RTL?-1:1;s=n.x<l.left?-c:c}let o=this.source(e,i,s);if(o!=null&&o.then){let l=this.pending={pos:i};o.then(a=>{this.pending==l&&(this.pending=null,a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])}))},a=>$n(e.state,a,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(hb),n=e?e.manager.tooltips.findIndex(r=>r.create==Kp.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:s}=this;if(i.length&&s&&!$J(s.dom,e)||this.pending){let{pos:o}=i[0]||this.pending,l=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!QJ(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Vf=4;function $J(t,e){let{left:n,right:r,top:i,bottom:s}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let l=o.getBoundingClientRect();i=Math.min(l.top,i),s=Math.max(l.bottom,s)}return e.clientX>=n-Vf&&e.clientX<=r+Vf&&e.clientY>=i-Vf&&e.clientY<=s+Vf}function QJ(t,e,n,r,i,s){let o=t.scrollDOM.getBoundingClientRect(),l=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>r||o.right<r||o.top>i||Math.min(o.bottom,l)<i)return!1;let a=t.posAtCoords({x:r,y:i},!1);return a>=e&&a<=n}function MJ(t,e={}){let n=Ie.define(),r=Ut.define({create(){return[]},update(i,s){if(i.length&&(e.hideOnChange&&(s.docChanged||s.selection)?i=[]:e.hideOn&&(i=i.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let l of i){let a=s.changes.mapPos(l.pos,-1,tn.TrackDel);if(a!=null){let c=Object.assign(Object.create(null),l);c.pos=a,c.end!=null&&(c.end=s.changes.mapPos(c.end)),o.push(c)}}i=o}for(let o of s.effects)o.is(n)&&(i=o.value),o.is(RJ)&&(i=[]);return i},provide:i=>Pd.from(i)});return{active:r,extension:[r,It.define(i=>new AJ(i,t,r,n,e.hoverTime||300)),PJ]}}function Z9(t,e){let n=t.plugin(hb);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const RJ=Ie.define(),VC=ge.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function pb(t,e){let n=t.plugin(z9),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const z9=It.fromClass(class{constructor(t){this.input=t.state.facet(lu),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(VC);this.top=new Ff(t,!0,e.topContainer),this.bottom=new Ff(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(VC);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Ff(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ff(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(lu);if(n!=this.input){let r=n.filter(a=>a),i=[],s=[],o=[],l=[];for(let a of r){let c=this.specs.indexOf(a),u;c<0?(u=a(t.view),l.push(u)):(u=this.panels[c],u.update&&u.update(t)),i.push(u),(u.top?s:o).push(u)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>he.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Ff{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=FC(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=FC(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function FC(t){let e=t.nextSibling;return t.remove(),e}const lu=ge.define({enables:z9});function LJ(t,e){let n,r=new Promise(o=>n=o),i=o=>IJ(o,e,n);t.state.field(gm,!1)?t.dispatch({effects:X9.of(i)}):t.dispatch({effects:Ie.appendConfig.of(gm.init(()=>[i]))});let s=W9.of(i);return{close:s,result:r.then(o=>((t.win.queueMicrotask||(a=>t.win.setTimeout(a,10)))(()=>{t.state.field(gm).indexOf(i)>-1&&t.dispatch({effects:s})}),o))}}const gm=Ut.define({create(){return[]},update(t,e){for(let n of e.effects)n.is(X9)?t=[n.value].concat(t):n.is(W9)&&(t=t.filter(r=>r!=n.value));return t},provide:t=>lu.computeN([t],e=>e.field(t))}),X9=Ie.define(),W9=Ie.define();function IJ(t,e,n){let r=e.content?e.content(t,()=>o(null)):null;if(!r){if(r=rt("form"),e.input){let l=rt("input",e.input);/^(text|password|number|email|tel|url)$/.test(l.type)&&l.classList.add("cm-textfield"),l.name||(l.name="input"),r.appendChild(rt("label",(e.label||"")+": ",l))}else r.appendChild(document.createTextNode(e.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(rt("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let i=r.nodeName=="FORM"?[r]:r.querySelectorAll("form");for(let l=0;l<i.length;l++){let a=i[l];a.addEventListener("keydown",c=>{c.keyCode==27?(c.preventDefault(),o(null)):c.keyCode==13&&(c.preventDefault(),o(a))}),a.addEventListener("submit",c=>{c.preventDefault(),o(a)})}let s=rt("div",r,rt("button",{onclick:()=>o(null),"aria-label":t.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function o(l){s.contains(s.ownerDocument.activeElement)&&t.focus(),n(l)}return{dom:s,top:e.top,mount:()=>{if(e.focus){let l;typeof e.focus=="string"?l=r.querySelector(e.focus):l=r.querySelector("input")||r.querySelector("button"),l&&"select"in l?l.select():l&&"focus"in l&&l.focus()}}}}class os extends Us{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}os.prototype.elementClass="";os.prototype.toDOM=void 0;os.prototype.mapMode=tn.TrackBefore;os.prototype.startSide=os.prototype.endSide=-1;os.prototype.point=!0;const kh=ge.define(),NJ=ge.define(),DJ={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Xe.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Pc=ge.define();function VJ(t){return[j9(),Pc.of({...DJ,...t})]}const BC=ge.define({combine:t=>t.some(e=>e)});function j9(t){return[FJ]}const FJ=It.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Pc).map(e=>new zC(t,e)),this.fixed=!t.state.facet(BC);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(BC)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Xe.iter(this.view.state.facet(kh),this.view.viewport.from),r=[],i=this.gutters.map(s=>new BJ(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let l of s.type)if(l.type==sn.Text&&o){a0(n,r,l.from);for(let a of i)a.line(this.view,l,r);o=!1}else if(l.widget)for(let a of i)a.widget(this.view,l)}else if(s.type==sn.Text){a0(n,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Pc),n=t.state.facet(Pc),r=t.docChanged||t.heightChanged||t.viewportChanged||!Xe.eq(t.startState.facet(kh),t.state.facet(kh),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let s of n){let o=e.indexOf(s);o<0?i.push(new zC(this.view,s)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>he.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==ct.LTR?{left:r,right:i}:{right:r,left:i}})});function ZC(t){return Array.isArray(t)?t:[t]}function a0(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class BJ{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Xe.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==i.elements.length){let l=new H9(e,o,s,r);i.elements.push(l),i.dom.appendChild(l.dom)}else i.elements[this.i].update(e,o,s,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];a0(this.cursor,i,n.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,n,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let s of e.state.facet(NJ)){let o=s(e,n.widget,n);o&&(i||(i=[])).push(o)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class zC{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let a=s.getBoundingClientRect();o=(a.top+a.bottom)/2}else o=i.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[r](e,l,i)&&i.preventDefault()});this.markers=ZC(n.markers(e)),n.initialSpacer&&(this.spacer=new H9(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=ZC(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Xe.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class H9{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),ZJ(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let l=o,a=s<n.length?n[s++]:null,c=!1;if(a){let u=a.elementClass;u&&(r+=" "+u);for(let f=o;f<this.markers.length;f++)if(this.markers[f].compare(a)){l=f,c=!0;break}}else l=this.markers.length;for(;o<l;){let u=this.markers[o++];if(u.toDOM){u.destroy(i);let f=i.nextSibling;i.remove(),i=f}}if(!a)break;a.toDOM&&(c?i=i.nextSibling:this.dom.insertBefore(a.toDOM(e),i)),c&&o++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function ZJ(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const zJ=ge.define(),XJ=ge.define(),wl=ge.define({combine(t){return vi(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let s=r[i],o=n[i];r[i]=s?(l,a,c)=>s(l,a,c)||o(l,a,c):o}return r}})}});class mm extends os{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Om(t,e){return t.state.facet(wl).formatNumber(e,t.state)}const WJ=Pc.compute([wl],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(zJ)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new mm(Om(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(XJ)){let s=i(e,n,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(wl)!=e.state.facet(wl),initialSpacer(e){return new mm(Om(e,XC(e.state.doc.lines)))},updateSpacer(e,n){let r=Om(n.view,XC(n.view.state.doc.lines));return r==e.number?e:new mm(r)},domEventHandlers:t.facet(wl).domEventHandlers,side:"before"}));function q9(t={}){return[wl.of(t),j9(),WJ]}function XC(t){let e=9;for(;e<t;)e=e*10+9;return e}const jJ=new class extends os{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},HJ=kh.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(jJ.range(i)))}return Xe.of(e)});function qJ(){return HJ}const Y9=1024;let YJ=0,sr=class{constructor(e,n){this.from=e,this.to=n}};class Re{constructor(e={}){this.id=YJ++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Nt.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Re.closedBy=new Re({deserialize:t=>t.split(" ")});Re.openedBy=new Re({deserialize:t=>t.split(" ")});Re.group=new Re({deserialize:t=>t.split(" ")});Re.isolate=new Re({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Re.contextHash=new Re({perNode:!0});Re.lookAhead=new Re({perNode:!0});Re.mounted=new Re({perNode:!0});class Nl{constructor(e,n,r,i=!1){this.tree=e,this.overlay=n,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[Re.mounted.id]}}const UJ=Object.create(null);class Nt{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):UJ,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Nt(e.name||"",n,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Re.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Re.group),s=-1;s<(i?i.length:0);s++){let o=n[s<0?r.name:i[s]];if(o)return o}}}}Nt.none=new Nt("",Object.create(null),0,8);class Qa{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);if(o){i||(i=Object.assign({},r.props));let l=o[1],a=o[0];a.combine&&a.id in i&&(l=a.combine(i[a.id],l)),i[a.id]=l}}n.push(i?new Nt(r.name,i,r.id,r.flags):r)}return new Qa(n)}}const Bf=new WeakMap,WC=new WeakMap;var et;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"})(et||(et={}));class Ze{constructor(e,n,r,i,s){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=Nl.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new Ad(this.topNode,e)}cursorAt(e,n=0,r=0){let i=Bf.get(this)||this.topNode,s=new Ad(i);return s.moveTo(e,n),Bf.set(this,s._tree),s}get topNode(){return new un(this,0,0,null)}resolve(e,n=0){let r=au(Bf.get(this)||this.topNode,e,n,!1);return Bf.set(this,r),r}resolveInner(e,n=0){let r=au(WC.get(this)||this.topNode,e,n,!0);return WC.set(this,r),r}resolveStack(e,n=0){return JJ(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,l=(o&et.IncludeAnonymous)>0;for(let a=this.cursor(o|et.IncludeAnonymous);;){let c=!1;if(a.from<=s&&a.to>=i&&(!l&&a.type.isAnonymous||n(a)!==!1)){if(a.firstChild())continue;c=!0}for(;c&&r&&(l||!a.type.isAnonymous)&&r(a),!a.nextSibling();){if(!a.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Ob(Nt.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Ze(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Ze(Nt.none,n,r,i)))}static build(e){return eee(e)}}Ze.empty=new Ze(Nt.none,[],[],0);class gb{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new gb(this.buffer,this.index)}}class eo{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return Nt.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,n,r,i,s){let{buffer:o}=this,l=-1;for(let a=e;a!=n&&!(U9(s,i,o[a+1],o[a+2])&&(l=a,r>0));a=o[a+3]);return l}slice(e,n,r){let i=this.buffer,s=new Uint16Array(n-e),o=0;for(let l=e,a=0;l<n;){s[a++]=i[l++],s[a++]=i[l++]-r;let c=s[a++]=i[l++]-r;s[a++]=i[l++]-e,o=Math.max(o,c)}return new eo(s,o,this.set)}}function U9(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function au(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let o=!r&&t instanceof un&&t.index<0?null:t.parent;if(!o)return t;t=o}let s=r?0:et.IgnoreOverlays;if(r)for(let o=t,l=o.parent;l;o=l,l=o.parent)o instanceof un&&o.index<0&&((i=l.enter(e,n,s))===null||i===void 0?void 0:i.from)!=o.from&&(t=l);for(;;){let o=t.enter(e,n,s);if(!o)return t;t=o}}class G9{cursor(e=0){return new Ad(this,e)}getChild(e,n=null,r=null){let i=jC(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return jC(this,e,n,r)}resolve(e,n=0){return au(this,e,n,!1)}resolveInner(e,n=0){return au(this,e,n,!0)}matchContext(e){return c0(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class un extends G9{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,c=n>0?l.length:-1;e!=c;e+=n){let u=l[e],f=a[e]+o.from,h;if(!(!(s&et.EnterBracketed&&u instanceof Ze&&(h=Nl.get(u))&&!h.overlay&&h.bracketed&&r>=f&&r<=f+u.length)&&!U9(i,r,f,f+u.length))){if(u instanceof eo){if(s&et.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,n,r-f,i);if(d>-1)return new si(new GJ(o,u,e,f),null,d)}else if(s&et.IncludeAnonymous||!u.type.isAnonymous||mb(u)){let d;if(!(s&et.IgnoreMounts)&&(d=Nl.get(u))&&!d.overlay)return new un(d.tree,f,e,o);let p=new un(u,f,e,o);return s&et.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(n<0?u.children.length-1:0,n,r,i,s)}}}if(s&et.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,r=0){let i;if(!(r&et.IgnoreOverlays)&&(i=Nl.get(this._tree))&&i.overlay){let s=e-this.from,o=r&et.EnterBracketed&&i.bracketed;for(let{from:l,to:a}of i.overlay)if((n>0||o?l<=s:l<s)&&(n<0||o?a>=s:a>s))return new un(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function jC(t,e,n,r){let i=t.cursor(),s=[];if(!i.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=i.type.is(n),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function c0(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class GJ{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class si extends G9{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return s<0?null:new si(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,r=0){if(r&et.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new si(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new si(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new si(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),n.push(0)}return new Ze(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function K9(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let o=t[s];(o.from>n.from||o.to<n.to)&&(n=o,e=s)}let r=n instanceof un&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new KJ(i,n)}class KJ{constructor(e,n){this.heads=e,this.node=n}get next(){return K9(this.heads)}}function JJ(t,e,n){let r=t.resolveInner(e,n),i=null;for(let s=r instanceof un?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,n)),s=o}else{let o=Nl.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new un(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(au(l,e,n,!1))}}return i?K9(i):r}class Ad{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~et.EnterBracketed,e instanceof un)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof un?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&et.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&et.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&et.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let s=n+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let l=r._tree.children[s];if(this.mode&et.IncludeAnonymous||l instanceof eo||!l.type.isAnonymous||mb(l))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;n=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)n=new si(this.buffer,n,this.stack[i]);return this.bufferNode=new si(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return c0(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return c0(this._tree,e,i);let o=r[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function mb(t){return t.children.some(e=>e instanceof eo||!e.type.isAnonymous||mb(e))}function eee(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=Y9,reused:s=[],minRepeatType:o=r.types.length}=t,l=Array.isArray(n)?new gb(n,n.length):n,a=r.types,c=0,u=0;function f(S,v,w,_,T,E){let{id:L,start:M,end:$,size:V}=l,Z=u,Y=c;if(V<0)if(l.next(),V==-1){let me=s[L];w.push(me),_.push(M-S);return}else if(V==-3){c=L;return}else if(V==-4){u=L;return}else throw new RangeError(`Unrecognized record size: ${V}`);let j=a[L],U,se,Q=M-S;if($-M<=i&&(se=O(l.pos-v,T))){let me=new Uint16Array(se.size-se.skip),de=l.pos-se.size,R=me.length;for(;l.pos>de;)R=x(se.start,me,R);U=new eo(me,$-se.start,r),Q=se.start-S}else{let me=l.pos-V;l.next();let de=[],R=[],$e=L>=o?L:-1,Qe=0,ke=$;for(;l.pos>me;)$e>=0&&l.id==$e&&l.size>=0?(l.end<=ke-i&&(p(de,R,M,Qe,l.end,ke,$e,Z,Y),Qe=de.length,ke=l.end),l.next()):E>2500?h(M,me,de,R):f(M,me,de,R,$e,E+1);if($e>=0&&Qe>0&&Qe<de.length&&p(de,R,M,Qe,M,ke,$e,Z,Y),de.reverse(),R.reverse(),$e>-1&&Qe>0){let K=d(j,Y);U=Ob(j,de,R,0,de.length,0,$-M,K,K)}else U=g(j,de,R,$-M,Z-$,Y)}w.push(U),_.push(Q)}function h(S,v,w,_){let T=[],E=0,L=-1;for(;l.pos>v;){let{id:M,start:$,end:V,size:Z}=l;if(Z>4)l.next();else{if(L>-1&&$<L)break;L<0&&(L=V-i),T.push(M,$,V),E++,l.next()}}if(E){let M=new Uint16Array(E*4),$=T[T.length-2];for(let V=T.length-3,Z=0;V>=0;V-=3)M[Z++]=T[V],M[Z++]=T[V+1]-$,M[Z++]=T[V+2]-$,M[Z++]=Z;w.push(new eo(M,T[2]-$,r)),_.push($-S)}}function d(S,v){return(w,_,T)=>{let E=0,L=w.length-1,M,$;if(L>=0&&(M=w[L])instanceof Ze){if(!L&&M.type==S&&M.length==T)return M;($=M.prop(Re.lookAhead))&&(E=_[L]+M.length+$)}return g(S,w,_,T,E,v)}}function p(S,v,w,_,T,E,L,M,$){let V=[],Z=[];for(;S.length>_;)V.push(S.pop()),Z.push(v.pop()+w-T);S.push(g(r.types[L],V,Z,E-T,M-E,$)),v.push(T-w)}function g(S,v,w,_,T,E,L){if(E){let M=[Re.contextHash,E];L=L?[M].concat(L):[M]}if(T>25){let M=[Re.lookAhead,T];L=L?[M].concat(L):[M]}return new Ze(S,v,w,_,L)}function O(S,v){let w=l.fork(),_=0,T=0,E=0,L=w.end-i,M={size:0,start:0,skip:0};e:for(let $=w.pos-S;w.pos>$;){let V=w.size;if(w.id==v&&V>=0){M.size=_,M.start=T,M.skip=E,E+=4,_+=4,w.next();continue}let Z=w.pos-V;if(V<0||Z<$||w.start<L)break;let Y=w.id>=o?4:0,j=w.start;for(w.next();w.pos>Z;){if(w.size<0)if(w.size==-3||w.size==-4)Y+=4;else break e;else w.id>=o&&(Y+=4);w.next()}T=j,_+=V,E+=Y}return(v<0||_==S)&&(M.size=_,M.start=T,M.skip=E),M.size>4?M:void 0}function x(S,v,w){let{id:_,start:T,end:E,size:L}=l;if(l.next(),L>=0&&_<o){let M=w;if(L>4){let $=l.pos-(L-4);for(;l.pos>$;)w=x(S,v,w)}v[--w]=M,v[--w]=E-S,v[--w]=T-S,v[--w]=_}else L==-3?c=_:L==-4&&(u=_);return w}let m=[],y=[];for(;l.pos>0;)f(t.start||0,t.bufferStart||0,m,y,-1,0);let b=(e=t.length)!==null&&e!==void 0?e:m.length?y[0]+m[0].length:0;return new Ze(a[t.topID],m.reverse(),y.reverse(),b)}const HC=new WeakMap;function Ch(t,e){if(!t.isAnonymous||e instanceof eo||e.type!=t)return 1;let n=HC.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Ze)){n=1;break}n+=Ch(t,r)}HC.set(e,n)}return n}function Ob(t,e,n,r,i,s,o,l,a){let c=0;for(let p=r;p<i;p++)c+=Ch(t,e[p]);let u=Math.ceil(c*1.5/8),f=[],h=[];function d(p,g,O,x,m){for(let y=O;y<x;){let b=y,S=g[y],v=Ch(t,p[y]);for(y++;y<x;y++){let w=Ch(t,p[y]);if(v+w>=u)break;v+=w}if(y==b+1){if(v>u){let w=p[b];d(w.children,w.positions,0,w.children.length,g[b]+m);continue}f.push(p[b])}else{let w=g[y-1]+p[y-1].length-S;f.push(Ob(t,p,g,b,y,S,w,null,a))}h.push(S+m-s)}}return d(e,n,r,i,0),(l||a)(f,h,o)}class J9{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof si?this.setBuffer(e.context.buffer,e.index,n):e instanceof un&&this.map.set(e.tree,n)}get(e){return e instanceof si?this.getBuffer(e.context.buffer,e.index):e instanceof un?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class qi{constructor(e,n,r,i,s=!1,o=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new qi(0,e.length,e,0,!1,r)];for(let s of n)s.to>e.length&&i.push(s);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,c=0;;l++){let u=l<n.length?n[l]:null,f=u?u.fromA:1e9;if(f-a>=r)for(;o&&o.from<f;){let h=o;if(a>=h.from||f<=h.to||c){let d=Math.max(h.from,a)-c,p=Math.min(h.to,f)-c;h=d>=p?null:new qi(d,p,h.tree,h.offset+c,l>0,!!u)}if(h&&i.push(h),o.to>f)break;o=s<e.length?e[s++]:null}if(!u)break;a=u.toA,c=u.toA-u.toB}return i}}class Jp{startParse(e,n,r){return typeof e=="string"&&(e=new tee(e)),r=r?r.length?r.map(i=>new sr(i.from,i.to)):[new sr(0,0)]:[new sr(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let s=i.advance();if(s)return s}}}class tee{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function eM(t){return(e,n,r,i)=>new ree(e,t,n,r,i)}class qC{constructor(e,n,r,i,s,o){this.parser=e,this.parse=n,this.overlay=r,this.bracketed=i,this.target=s,this.from=o}}function YC(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class nee{constructor(e,n,r,i,s,o,l,a){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=s,this.bracketed=o,this.target=l,this.prev=a,this.depth=0,this.ranges=[]}}const u0=new Re({perNode:!0});class ree{constructor(e,n,r,i,s){this.nest=n,this.input=r,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new Ze(r.type,r.children,r.positions,r.length,r.propValues.concat([[u0,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[Re.mounted.id]=new Nl(n,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new oee(this.fragments),n=null,r=null,i=new Ad(new un(this.baseTree,this.ranges[0].from,0,null),et.IncludeAnonymous|et.IgnoreMounts);e:for(let s,o;;){let l=!0,a;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)l=!1;else if(e.hasNode(i)){if(n){let c=n.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let f=u.from+c.pos,h=u.to+c.pos;f>=i.from&&h<=i.to&&!n.ranges.some(d=>d.from<h&&d.to>f)&&n.ranges.push({from:f,to:h})}}l=!1}else if(r&&(o=iee(r.ranges,i.from,i.to)))l=o!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(see(i),n&&n.depth++,r&&r.depth++);let c=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")n=new nee(s.parser,s.overlay,c,this.inner.length,i.from,!!s.bracketed,i.tree,n);else{let u=KC(this.ranges,s.overlay||(i.from<i.to?[new sr(i.from,i.to)]:[]));u.length&&YC(u),(u.length||!s.overlay)&&this.inner.push(new qC(s.parser,u.length?s.parser.startParse(this.input,JC(c,u),u):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new sr(f.from-i.from,f.to-i.from)):null,!!s.bracketed,i.tree,u.length?u[0].from:i.from)),s.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):l=!1}}else if(n&&(a=n.predicate(i))&&(a===!0&&(a=new sr(i.from,i.to)),a.from<a.to)){let c=n.ranges.length-1;c>=0&&n.ranges[c].to==a.from?n.ranges[c]={from:n.ranges[c].from,to:a.to}:n.ranges.push(a)}if(l&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let c=KC(this.ranges,n.ranges);c.length&&(YC(c),this.inner.splice(n.index,0,new qC(n.parser,n.parser.startParse(this.input,JC(n.mounts,c),c),n.ranges.map(u=>new sr(u.from-n.start,u.to-n.start)),n.bracketed,n.target,c[0].from))),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function iee(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function UC(t,e,n,r,i,s){if(e<n){let o=t.buffer[e+1];r.push(t.slice(e,n,o)),i.push(o-s)}}function see(t){let{node:e}=t,n=[],r=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let i=t.tree,s=i.children.indexOf(r),o=i.children[s],l=o.buffer,a=[s];function c(u,f,h,d,p,g){let O=n[g],x=[],m=[];UC(o,u,O,x,m,d);let y=l[O+1],b=l[O+2];a.push(x.length);let S=g?c(O+4,l[O+3],o.set.types[l[O]],y,b-y,g-1):e.toTree();return x.push(S),m.push(y-d),UC(o,l[O+3],f,x,m,d),new Ze(h,x,m,p)}i.children[s]=c(0,l.length,Nt.none,0,o.length,n.length-1);for(let u of a){let f=t.tree.children[u],h=t.tree.positions[u];t.yield(new un(f,h+t.from,u,t._tree))}}class GC{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(et.IncludeAnonymous|et.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,et.IgnoreOverlays|et.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof Ze)n=n.children[0];else break}return!1}}let oee=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(u0))!==null&&n!==void 0?n:r.to,this.inner=new GC(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(u0))!==null&&e!==void 0?e:n.to,this.inner=new GC(n.tree,-n.offset)}}findMounts(e,n){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(r=s.tree)===null||r===void 0?void 0:r.prop(Re.mounted);if(o&&o.parser==n)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=s.to)break;a.tree==this.curFrag.tree&&i.push({frag:a,pos:s.from-a.offset,mount:o})}}}return i}};function KC(t,e){let n=null,r=e;for(let i=1,s=0;i<t.length;i++){let o=t[i-1].to,l=t[i].from;for(;s<r.length;s++){let a=r[s];if(a.from>=l)break;a.to<=o||(n||(r=n=e.slice()),a.from<o?(n[s]=new sr(a.from,o),a.to>l&&n.splice(s+1,0,new sr(l,a.to))):a.to>l?n[s--]=new sr(l,a.to):n.splice(s--,1))}}return r}function lee(t,e,n,r){let i=0,s=0,o=!1,l=!1,a=-1e9,c=[];for(;;){let u=i==t.length?1e9:o?t[i].to:t[i].from,f=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let h=Math.max(a,n),d=Math.min(u,f,r);h<d&&c.push(new sr(h,d))}if(a=Math.min(u,f),a==1e9)break;u==a&&(o?(o=!1,i++):o=!0),f==a&&(l?(l=!1,s++):l=!0)}return c}function JC(t,e){let n=[];for(let{pos:r,mount:i,frag:s}of t){let o=r+(i.overlay?i.overlay[0].from:0),l=o+i.tree.length,a=Math.max(s.from,o),c=Math.min(s.to,l);if(i.overlay){let u=i.overlay.map(h=>new sr(h.from+r,h.to+r)),f=lee(e,u,a,c);for(let h=0,d=a;;h++){let p=h==f.length,g=p?c:f[h].from;if(g>d&&n.push(new qi(d,g,i.tree,-o,s.from>=d||s.openStart,s.to<=g||s.openEnd)),p)break;d=f[h].to}}else n.push(new qi(a,c,i.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return n}let aee=0;class jn{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=aee++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof jn&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new jn(r,[],null,[]);if(i.set.push(i),n)for(let s of n.set)i.set.push(s);return i}static defineModifier(e){let n=new $d(e);return r=>r.modified.indexOf(n)>-1?r:$d.get(r.base||r,r.modified.concat(n).sort((i,s)=>i.id-s.id))}}let cee=0;class $d{constructor(e){this.name=e,this.instances=[],this.id=cee++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(l=>l.base==e&&uee(n,l.modified));if(r)return r;let i=[],s=new jn(e.name,i,e,n);for(let l of n)l.instances.push(s);let o=fee(n);for(let l of e.set)if(!l.modified.length)for(let a of o)i.push($d.get(l,a));return s}}function uee(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function fee(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function Ma(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let s=[],o=2,l=i;for(let f=0;;){if(l=="..."&&f>0&&f+3==i.length){o=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!h)throw new RangeError("Invalid path: "+i);if(s.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),f+=h[0].length,f==i.length)break;let d=i[f++];if(f==i.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+i);l=i.slice(f)}let a=s.length-1,c=s[a];if(!c)throw new RangeError("Invalid path: "+i);let u=new cu(r,o,a>0?s.slice(0,a):null);e[c]=u.sort(e[c])}}return tM.add(e)}const tM=new Re({combine(t,e){let n,r,i;for(;t||e;){if(!t||e&&t.depth>=e.depth?(i=e,e=e.next):(i=t,t=t.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let s=new cu(i.tags,i.mode,i.context);n?n.next=s:r=s,n=s}return r}});class cu{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}cu.empty=new cu([],2,null);function nM(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let o of s.tag)n[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let l of s)for(let a of l.set){let c=n[a.id];if(c){o=o?o+" "+c:c;break}}return o},scope:r}}function hee(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function dee(t,e,n,r=0,i=t.length){let s=new pee(r,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),r,i,"",s.highlighters),s.flush(i)}class pee{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,s){let{type:o,from:l,to:a}=e;if(l>=r||a<=n)return;o.isTop&&(s=this.highlighters.filter(d=>!d.scope||d.scope(o)));let c=i,u=gee(e)||cu.empty,f=hee(s,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(n,l),c),u.opaque)return;let h=e.tree&&e.tree.prop(Re.mounted);if(h&&h.overlay){let d=e.node.enter(h.overlay[0].from+l,1),p=this.highlighters.filter(O=>!O.scope||O.scope(h.tree.type)),g=e.firstChild();for(let O=0,x=l;;O++){let m=O<h.overlay.length?h.overlay[O]:null,y=m?m.from+l:a,b=Math.max(n,x),S=Math.min(r,y);if(b<S&&g)for(;e.from<S&&(this.highlightRange(e,b,S,i,s),this.startSpan(Math.min(S,e.to),c),!(e.to>=y||!e.nextSibling())););if(!m||y>r)break;x=m.to+l,x>n&&(this.highlightRange(d.cursor(),Math.max(n,m.from+l),Math.min(r,x),"",p),this.startSpan(Math.min(r,x),c))}g&&e.parent()}else if(e.firstChild()){h&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,s),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function gee(t){let e=t.type.prop(tM);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const ue=jn.define,Zf=ue(),Cs=ue(),e_=ue(Cs),t_=ue(Cs),_s=ue(),zf=ue(_s),xm=ue(_s),Hr=ue(),Oo=ue(Hr),Wr=ue(),jr=ue(),f0=ue(),Ya=ue(f0),Xf=ue(),A={comment:Zf,lineComment:ue(Zf),blockComment:ue(Zf),docComment:ue(Zf),name:Cs,variableName:ue(Cs),typeName:e_,tagName:ue(e_),propertyName:t_,attributeName:ue(t_),className:ue(Cs),labelName:ue(Cs),namespace:ue(Cs),macroName:ue(Cs),literal:_s,string:zf,docString:ue(zf),character:ue(zf),attributeValue:ue(zf),number:xm,integer:ue(xm),float:ue(xm),bool:ue(_s),regexp:ue(_s),escape:ue(_s),color:ue(_s),url:ue(_s),keyword:Wr,self:ue(Wr),null:ue(Wr),atom:ue(Wr),unit:ue(Wr),modifier:ue(Wr),operatorKeyword:ue(Wr),controlKeyword:ue(Wr),definitionKeyword:ue(Wr),moduleKeyword:ue(Wr),operator:jr,derefOperator:ue(jr),arithmeticOperator:ue(jr),logicOperator:ue(jr),bitwiseOperator:ue(jr),compareOperator:ue(jr),updateOperator:ue(jr),definitionOperator:ue(jr),typeOperator:ue(jr),controlOperator:ue(jr),punctuation:f0,separator:ue(f0),bracket:Ya,angleBracket:ue(Ya),squareBracket:ue(Ya),paren:ue(Ya),brace:ue(Ya),content:Hr,heading:Oo,heading1:ue(Oo),heading2:ue(Oo),heading3:ue(Oo),heading4:ue(Oo),heading5:ue(Oo),heading6:ue(Oo),contentSeparator:ue(Hr),list:ue(Hr),quote:ue(Hr),emphasis:ue(Hr),strong:ue(Hr),link:ue(Hr),monospace:ue(Hr),strikethrough:ue(Hr),inserted:ue(),deleted:ue(),changed:ue(),invalid:ue(),meta:Xf,documentMeta:ue(Xf),annotation:ue(Xf),processingInstruction:ue(Xf),definition:jn.defineModifier("definition"),constant:jn.defineModifier("constant"),function:jn.defineModifier("function"),standard:jn.defineModifier("standard"),local:jn.defineModifier("local"),special:jn.defineModifier("special")};for(let t in A){let e=A[t];e instanceof jn&&(e.name=t)}nM([{tag:A.link,class:"tok-link"},{tag:A.heading,class:"tok-heading"},{tag:A.emphasis,class:"tok-emphasis"},{tag:A.strong,class:"tok-strong"},{tag:A.keyword,class:"tok-keyword"},{tag:A.atom,class:"tok-atom"},{tag:A.bool,class:"tok-bool"},{tag:A.url,class:"tok-url"},{tag:A.labelName,class:"tok-labelName"},{tag:A.inserted,class:"tok-inserted"},{tag:A.deleted,class:"tok-deleted"},{tag:A.literal,class:"tok-literal"},{tag:A.string,class:"tok-string"},{tag:A.number,class:"tok-number"},{tag:[A.regexp,A.escape,A.special(A.string)],class:"tok-string2"},{tag:A.variableName,class:"tok-variableName"},{tag:A.local(A.variableName),class:"tok-variableName tok-local"},{tag:A.definition(A.variableName),class:"tok-variableName tok-definition"},{tag:A.special(A.variableName),class:"tok-variableName2"},{tag:A.definition(A.propertyName),class:"tok-propertyName tok-definition"},{tag:A.typeName,class:"tok-typeName"},{tag:A.namespace,class:"tok-namespace"},{tag:A.className,class:"tok-className"},{tag:A.macroName,class:"tok-macroName"},{tag:A.propertyName,class:"tok-propertyName"},{tag:A.operator,class:"tok-operator"},{tag:A.comment,class:"tok-comment"},{tag:A.meta,class:"tok-meta"},{tag:A.invalid,class:"tok-invalid"},{tag:A.punctuation,class:"tok-punctuation"}]);var ym;const Rs=new Re;function eg(t){return ge.define({combine:t?e=>e.concat(t):void 0})}const xb=new Re;class Un{constructor(e,n,r=[],i=""){this.data=e,this.name=i,je.prototype.hasOwnProperty("tree")||Object.defineProperty(je.prototype,"tree",{get(){return ot(this)}}),this.parser=n,this.extension=[to.of(this),je.languageData.of((s,o,l)=>{let a=n_(s,o,l),c=a.type.prop(Rs);if(!c)return[];let u=s.facet(c),f=a.type.prop(xb);if(f){let h=a.resolve(o-a.from,l);for(let d of f)if(d.test(h,s)){let p=s.facet(d.facet);return d.type=="replace"?p:p.concat(u)}}return u})].concat(r)}isActiveAt(e,n,r=-1){return n_(e,n,r).type.prop(Rs)==this.data}findRegions(e){let n=e.facet(to);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(Rs)==this.data){r.push({from:o,to:o+s.length});return}let l=s.prop(Re.mounted);if(l){if(l.tree.prop(Rs)==this.data){if(l.overlay)for(let a of l.overlay)r.push({from:a.from+o,to:a.to+o});else r.push({from:o,to:o+s.length});return}else if(l.overlay){let a=r.length;if(i(l.tree,l.overlay[0].from+o),r.length>a)return}}for(let a=0;a<s.children.length;a++){let c=s.children[a];c instanceof Ze&&i(c,s.positions[a]+o)}};return i(ot(e),0),r}get allowsNesting(){return!0}}Un.setState=Ie.define();function n_(t,e,n){let r=t.facet(to),i=ot(t).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,n,et.ExcludeBuffers|et.EnterBracketed))s.type.isTop&&(i=s);return i}class ia extends Un{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=eg(e.languageData);return new ia(n,e.parser.configure({props:[Rs.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new ia(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ot(t){let e=t.field(Un.state,!1);return e?e.tree:Ze.empty}class mee{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let Ua=null;class Go{constructor(e,n,r=[],i,s,o,l,a){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Go(e,n,[],Ze.empty,0,r,[],null)}startParse(){return this.parser.startParse(new mee(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Ze.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(qi.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(qi.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Ua;Ua=this;try{return e()}finally{Ua=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=r_(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((c,u,f,h)=>a.push({fromA:c,toA:u,fromB:f,toB:h})),r=qi.applyChanges(r,a),i=Ze.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);u<f&&l.push({from:u,to:f})}}}return new Go(this.parser,n,r,i,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=r_(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends Jp{createParse(n,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let a=Ua;if(a){for(let c of i)a.tempSkipped.push(c);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new Ze(Nt.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Ua}}function r_(t,e,n){return qi.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class sa{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new sa(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Go.create(e.facet(to).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new sa(r)}}Un.state=Ut.define({create:sa.init,update(t,e){for(let n of e.effects)if(n.is(Un.setState))return n.value;return e.startState.facet(to)!=e.state.facet(to)?sa.init(e.state):t.apply(e)}});let rM=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(rM=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const bm=typeof navigator<"u"&&(!((ym=navigator.scheduling)===null||ym===void 0)&&ym.isInputPending)?()=>navigator.scheduling.isInputPending():null,Oee=It.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Un.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Un.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=rM(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(Un.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!bm?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<i&&r.doc.length>i+1e3,a=s.context.work(()=>bm&&bm()||Date.now()>o,i+(l?0:1e5));this.chunkBudget-=Date.now()-n,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Un.setState.of(new sa(s.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>$n(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),to=ge.define({combine(t){return t.length?t[0]:null},enables:t=>[Un.state,Oee,he.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class oa{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class z{constructor(e,n,r,i,s,o=void 0){this.name=e,this.alias=n,this.extensions=r,this.filename=i,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:r}=e;if(!n){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(r)}return new z(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,n,r)}static matchFilename(e,n){for(let i of e)if(i.filename&&i.filename.test(n))return i;let r=/\.([^.]+)$/.exec(n);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,n,r=!0){n=n.toLowerCase();for(let i of e)if(i.alias.some(s=>s==n))return i;if(r)for(let i of e)for(let s of i.alias){let o=n.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(n[o-1])&&!/\w/.test(n[o+s.length])))return i}return null}}const xee=ge.define(),Uu=ge.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Ko(t){let e=t.facet(Uu);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function uu(t,e){let n="",r=t.tabSize,i=t.facet(Uu)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let s=0;s<e;s++)n+=i;return n}function yb(t,e){t instanceof je&&(t=new tg(t));for(let r of t.state.facet(xee)){let i=r(t,e);if(i!==void 0)return i}let n=ot(t.state);return n.length>=e?yee(t,n,e):null}class tg{constructor(e,n={}){this.state=e,this.options=n,this.unit=Ko(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,n=e.length){return Nr(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Ra=new Re;function yee(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let s=[];for(let o=i;o&&!(o.from<r.node.from||o.to>r.node.to||o.from==r.node.from&&o.type==r.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return iM(r,t,n)}function iM(t,e,n){for(let r=t;r;r=r.next){let i=vee(r.node);if(i)return i(bb.create(e,n,r))}return 0}function bee(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function vee(t){let e=t.type.prop(Ra);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Re.closedBy))){let i=t.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>sM(o,!0,1,void 0,s&&!bee(o)?i.from:void 0)}return t.parent==null?See:null}function See(){return 0}class bb extends tg{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new bb(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(wee(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return iM(this.context.next,this.base,this.pos)}}function wee(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function kee(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let l=n.to;;){let a=e.childAfter(l);if(!a||a==r)return null;if(!a.type.isSkipped){if(a.from>=o)return null;let c=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+c}}l=a.to}}function Cee({closing:t,align:e=!0,units:n=1}){return r=>sM(r,e,n,t)}function sM(t,e,n,r,i){let s=t.textAfter,o=s.match(/^\s*/)[0].length,l=r&&s.slice(o,o+r.length)==r||i==t.pos+o,a=e?kee(t):null;return a?l?t.column(a.from):t.column(a.to):t.baseIndent+(l?0:t.unit*n)}const _ee=t=>t.baseIndent;function _h({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const Tee=200;function Eee(){return je.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+Tee)return t;let s=n.sliceString(i.from,r);if(!e.some(c=>c.test(s)))return t;let{state:o}=t,l=-1,a=[];for(let{head:c}of o.selection.ranges){let u=o.doc.lineAt(c);if(u.from==l)continue;l=u.from;let f=yb(o,u.from);if(f==null)continue;let h=/^\s*/.exec(u.text)[0],d=uu(o,f);h!=d&&a.push({from:u.from,to:u.from+h.length,insert:d})}return a.length?[t,{changes:a,sequential:!0}]:t})}const oM=ge.define(),La=new Re;function lM(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function Pee(t,e,n){let r=ot(t);if(r.length<n)return null;let i=r.resolveStack(n,1),s=null;for(let o=i;o;o=o.next){let l=o.node;if(l.to<=n||l.from>n)continue;if(s&&l.from<e)break;let a=l.type.prop(La);if(a&&(l.to<r.length-50||r.length==t.doc.length||!Aee(l))){let c=a(l,t);c&&c.from<=n&&c.from>=e&&c.to>n&&(s=c)}}return s}function Aee(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Qd(t,e,n){for(let r of t.facet(oM)){let i=r(t,e,n);if(i)return i}return Pee(t,e,n)}function aM(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const ng=Ie.define({map:aM}),Gu=Ie.define({map:aM});function cM(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const Jo=Ut.define({create(){return Pe.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=i_(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(ng)&&!$ee(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(hM),i=r?Pe.replace({widget:new Dee(r(e.state,n.value))}):s_;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(Gu)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=i_(t,e.selection.main.head)),t},provide:t=>he.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(s_.range(r,i))}return Pe.set(e,!0)}});function i_(t,e,n=e){let r=!1;return t.between(e,n,(i,s)=>{i<n&&s>e&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,s)=>i>=n||s<=e}):t}function Md(t,e,n){var r;let i=null;return(r=t.field(Jo,!1))===null||r===void 0||r.between(e,n,(s,o)=>{(!i||i.from>s)&&(i={from:s,to:o})}),i}function $ee(t,e,n){let r=!1;return t.between(e,e,(i,s)=>{i==e&&s==n&&(r=!0)}),r}function uM(t,e){return t.field(Jo,!1)?e:e.concat(Ie.appendConfig.of(dM()))}const Qee=t=>{for(let e of cM(t)){let n=Qd(t.state,e.from,e.to);if(n)return t.dispatch({effects:uM(t.state,[ng.of(n),fM(t,n)])}),!0}return!1},Mee=t=>{if(!t.state.field(Jo,!1))return!1;let e=[];for(let n of cM(t)){let r=Md(t.state,n.from,n.to);r&&e.push(Gu.of(r),fM(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function fM(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return he.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const Ree=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),s=Qd(e,i.from,i.to);s&&n.push(ng.of(s)),r=(s?t.lineBlockAt(s.to):i).to+1}return n.length&&t.dispatch({effects:uM(t.state,n)}),!!n.length},Lee=t=>{let e=t.state.field(Jo,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(Gu.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},Iee=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Qee},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Mee},{key:"Ctrl-Alt-[",run:Ree},{key:"Ctrl-Alt-]",run:Lee}],Nee={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},hM=ge.define({combine(t){return vi(t,Nee)}});function dM(t){return[Jo,Bee]}function pM(t,e){let{state:n}=t,r=n.facet(hM),i=o=>{let l=t.lineBlockAt(t.posAtDOM(o.target)),a=Md(t.state,l.from,l.to);a&&t.dispatch({effects:Gu.of(a)}),o.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const s_=Pe.replace({widget:new class extends Si{toDOM(t){return pM(t,null)}}});class Dee extends Si{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return pM(e,this.value)}}const Vee={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class vm extends os{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function Fee(t={}){let e={...Vee,...t},n=new vm(e,!0),r=new vm(e,!1),i=It.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(to)!=o.state.facet(to)||o.startState.field(Jo,!1)!=o.state.field(Jo,!1)||ot(o.startState)!=ot(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new is;for(let a of o.viewportLineBlocks){let c=Md(o.state,a.from,a.to)?r:Qd(o.state,a.from,a.to)?n:null;c&&l.add(a.from,a.from,c)}return l.finish()}}),{domEventHandlers:s}=e;return[i,VJ({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(i))===null||l===void 0?void 0:l.markers)||Xe.empty},initialSpacer(){return new vm(e,!1)},domEventHandlers:{...s,click:(o,l,a)=>{if(s.click&&s.click(o,l,a))return!0;let c=Md(o.state,l.from,l.to);if(c)return o.dispatch({effects:Gu.of(c)}),!0;let u=Qd(o.state,l.from,l.to);return u?(o.dispatch({effects:ng.of(u)}),!0):!1}}}),dM()]}const Bee=he.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Ku{constructor(e,n){this.specs=e;let r;function i(l){let a=Gs.newName();return(r||(r=Object.create(null)))["."+a]=l,a}const s=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,o=n.scope;this.scope=o instanceof Un?l=>l.prop(Rs)==o.data:o?l=>l==o:void 0,this.style=nM(e.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=r?new Gs(r):null,this.themeType=n.themeType}static define(e,n){return new Ku(e,n||{})}}const h0=ge.define(),gM=ge.define({combine(t){return t.length?[t[0]]:null}});function Sm(t){let e=t.facet(h0);return e.length?e:t.facet(gM)}function mM(t,e){let n=[zee],r;return t instanceof Ku&&(t.module&&n.push(he.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(gM.of(t)):r?n.push(h0.computeN([he.darkTheme],i=>i.facet(he.darkTheme)==(r=="dark")?[t]:[])):n.push(h0.of(t)),n}class Zee{constructor(e){this.markCache=Object.create(null),this.tree=ot(e.state),this.decorations=this.buildDeco(e,Sm(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=ot(e.state),r=Sm(e.state),i=r!=Sm(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!i&&n.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return Pe.none;let r=new is;for(let{from:i,to:s}of e.visibleRanges)dee(this.tree,n,(o,l,a)=>{r.add(o,l,this.markCache[a]||(this.markCache[a]=Pe.mark({class:a})))},i,s);return r.finish()}}const zee=xs.high(It.fromClass(Zee,{decorations:t=>t.decorations})),Xee=Ku.define([{tag:A.meta,color:"#404740"},{tag:A.link,textDecoration:"underline"},{tag:A.heading,textDecoration:"underline",fontWeight:"bold"},{tag:A.emphasis,fontStyle:"italic"},{tag:A.strong,fontWeight:"bold"},{tag:A.strikethrough,textDecoration:"line-through"},{tag:A.keyword,color:"#708"},{tag:[A.atom,A.bool,A.url,A.contentSeparator,A.labelName],color:"#219"},{tag:[A.literal,A.inserted],color:"#164"},{tag:[A.string,A.deleted],color:"#a11"},{tag:[A.regexp,A.escape,A.special(A.string)],color:"#e40"},{tag:A.definition(A.variableName),color:"#00f"},{tag:A.local(A.variableName),color:"#30a"},{tag:[A.typeName,A.namespace],color:"#085"},{tag:A.className,color:"#167"},{tag:[A.special(A.variableName),A.macroName],color:"#256"},{tag:A.definition(A.propertyName),color:"#00c"},{tag:A.comment,color:"#940"},{tag:A.invalid,color:"#f00"}]),Wee=he.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),OM=1e4,xM="()[]{}",yM=ge.define({combine(t){return vi(t,{afterCursor:!0,brackets:xM,maxScanDistance:OM,renderMatch:qee})}}),jee=Pe.mark({class:"cm-matchingBracket"}),Hee=Pe.mark({class:"cm-nonmatchingBracket"});function qee(t){let e=[],n=t.matched?jee:Hee;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const Yee=Ut.define({create(){return Pe.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(yM);for(let i of e.state.selection.ranges){if(!i.empty)continue;let s=oi(e.state,i.head,-1,r)||i.head>0&&oi(e.state,i.head-1,1,r)||r.afterCursor&&(oi(e.state,i.head,1,r)||i.head<e.state.doc.length&&oi(e.state,i.head+1,-1,r));s&&(n=n.concat(r.renderMatch(s,e.state)))}return Pe.set(n,!0)},provide:t=>he.decorations.from(t)}),Uee=[Yee,Wee];function Gee(t={}){return[yM.of(t),Uee]}const bM=new Re;function d0(t,e,n){let r=t.prop(e<0?Re.openedBy:Re.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function p0(t){let e=t.type.prop(bM);return e?e(t.node):t}function oi(t,e,n,r={}){let i=r.maxScanDistance||OM,s=r.brackets||xM,o=ot(t),l=o.resolveInner(e,n);for(let a=l;a;a=a.parent){let c=d0(a.type,n,s);if(c&&a.from<a.to){let u=p0(a);if(u&&(n>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return Kee(t,e,n,a,u,c,s)}}return Jee(t,e,n,o,l.type,i,s)}function Kee(t,e,n,r,i,s,o){let l=r.parent,a={from:i.from,to:i.to},c=0,u=l==null?void 0:l.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(c==0&&s.indexOf(u.type.name)>-1&&u.from<u.to){let f=p0(u);return{start:a,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(d0(u.type,n,o))c++;else if(d0(u.type,-n,o)){if(c==0){let f=p0(u);return{start:a,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}c--}}while(n<0?u.prevSibling():u.nextSibling());return{start:a,matched:!1}}function Jee(t,e,n,r,i,s,o){let l=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),a=o.indexOf(l);if(a<0||a%2==0!=n>0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),f=0;for(let h=0;!u.next().done&&h<=s;){let d=u.value;n<0&&(h+=d.length);let p=e+h*n;for(let g=n>0?0:d.length-1,O=n>0?d.length:-1;g!=O;g+=n){let x=o.indexOf(d[g]);if(!(x<0||r.resolveInner(p+g,1).type!=i))if(x%2==0==n>0)f++;else{if(f==1)return{start:c,end:{from:p+g,to:p+g+1},matched:x>>1==a>>1};f--}}n>0&&(h+=d.length)}return u.done?{start:c,matched:!1}:null}function o_(t,e,n,r=0,i=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let s=i;for(let o=r;o<e;o++)t.charCodeAt(o)==9?s+=n-s%n:s++;return s}class vM{constructor(e,n,r,i){this.string=e,this.tabSize=n,this.indentUnit=r,this.overrideIndent=i,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let n=this.string.charAt(this.pos),r;if(typeof e=="string"?r=n==e:r=n&&(e instanceof RegExp?e.test(n):e(n)),r)return++this.pos,n}eatWhile(e){let n=this.pos;for(;this.eat(e););return this.pos>n}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=o_(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return(e=this.overrideIndent)!==null&&e!==void 0?e:o_(this.string,null,this.tabSize)}match(e,n,r){if(typeof e=="string"){let i=o=>r?o.toLowerCase():o,s=this.string.substr(this.pos,e.length);return i(s)==i(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&n!==!1&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function ete(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||tte,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||wb,mergeTokens:t.mergeTokens!==!1}}function tte(t){if(typeof t!="object")return t;let e={};for(let n in t){let r=t[n];e[n]=r instanceof Array?r.slice():r}return e}const l_=new WeakMap;class vb extends Un{constructor(e){let n=eg(e.languageData),r=ete(e),i,s=new class extends Jp{createParse(o,l,a){return new rte(i,o,l,a)}};super(n,s,[],e.name),this.topNode=ote(n,this),i=this,this.streamParser=r,this.stateAfter=new Re({perNode:!0}),this.tokenTable=e.tokenTable?new CM(r.tokenTable):ste}static define(e){return new vb(e)}getIndent(e){let n,{overrideIndentation:r}=e.options;r&&(n=l_.get(e.state),n!=null&&n<e.pos-1e4&&(n=void 0));let i=Sb(this,e.node.tree,e.node.from,e.node.from,n??e.pos),s,o;if(i?(o=i.state,s=i.pos+1):(o=this.streamParser.startState(e.unit),s=e.node.from),e.pos-s>1e4)return null;for(;s<e.pos;){let a=e.state.doc.lineAt(s),c=Math.min(e.pos,a.to);if(a.length){let u=r?r(a.from):-1,f=new vM(a.text,e.state.tabSize,e.unit,u<0?void 0:u);for(;f.pos<c-a.from;)wM(this.streamParser.token,f,o)}else this.streamParser.blankLine(o,e.unit);if(c==e.pos)break;s=a.to+1}let l=e.lineAt(e.pos);return r&&n==null&&l_.set(e.state,l.from),this.streamParser.indent(o,/^\s*(.*)/.exec(l.text)[1],e)}get allowsNesting(){return!1}}function Sb(t,e,n,r,i){let s=n>=r&&n+e.length<=i&&e.prop(t.stateAfter);if(s)return{state:t.streamParser.copyState(s),pos:n+e.length};for(let o=e.children.length-1;o>=0;o--){let l=e.children[o],a=n+e.positions[o],c=l instanceof Ze&&a<i&&Sb(t,l,a,r,i);if(c)return c}return null}function SM(t,e,n,r,i){if(i&&n<=0&&r>=e.length)return e;!i&&n==0&&e.type==t.topNode&&(i=!0);for(let s=e.children.length-1;s>=0;s--){let o=e.positions[s],l=e.children[s],a;if(o<r&&l instanceof Ze){if(!(a=SM(t,l,n-o,r-o,i)))break;return i?new Ze(e.type,e.children.slice(0,s).concat(a),e.positions.slice(0,s+1),o+a.length):a}}return null}function nte(t,e,n,r,i){for(let s of e){let o=s.from+(s.openStart?25:0),l=s.to-(s.openEnd?25:0),a=o<=n&&l>n&&Sb(t,s.tree,0-s.offset,n,l),c;if(a&&a.pos<=r&&(c=SM(t,s.tree,n+s.offset,a.pos+s.offset,!1)))return{state:a.state,tree:c}}return{state:t.streamParser.startState(i?Ko(i):4),tree:Ze.empty}}let rte=class{constructor(e,n,r,i){this.lang=e,this.input=n,this.fragments=r,this.ranges=i,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=i[i.length-1].to;let s=Go.get(),o=i[0].from,{state:l,tree:a}=nte(e,r,o,this.to,s==null?void 0:s.state);this.state=l,this.parsedPos=this.chunkStart=o+a.length;for(let c=0;c<a.children.length;c++)this.chunks.push(a.children[c]),this.chunkPos.push(a.positions[c]);s&&this.parsedPos<s.viewport.from-1e5&&i.some(c=>c.from<=s.viewport.from&&c.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(Ko(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=Go.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),r=Math.min(n,this.chunkStart+512);for(e&&(r=Math.min(r,e.viewport.to));this.parsedPos<r;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==`
140
+ `&&(n="");else{let r=n.indexOf(`
141
+ `);r>-1&&(n=n.slice(0,r))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),r=e+n.length;for(let i=this.rangeIndex;;){let s=this.ranges[i].to;if(s>=r||(n=n.slice(0,s-(r-n.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,l=this.lineAfter(o);n+=l,r=o+l.length}return{line:n,end:r}}skipGapsTo(e,n,r){for(;;){let i=this.ranges[this.rangeIndex].to,s=e+n;if(r>0?i>s:i>=s)break;let o=this.ranges[++this.rangeIndex].from;n+=o-i}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,n,r,i){let s=4;if(this.ranges.length>1){i=this.skipGapsTo(n,i,1),n+=i;let l=this.chunk.length;i=this.skipGapsTo(r,i,-1),r+=i,s+=this.chunk.length-l}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&o>=0&&this.chunk[o]==e&&this.chunk[o+2]==n?this.chunk[o+2]=r:this.chunk.push(e,n,r,s),i}parseLine(e){let{line:n,end:r}=this.nextLine(),i=0,{streamParser:s}=this.lang,o=new vM(n,e?e.state.tabSize:4,e?Ko(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=wM(s.token,o,this.state);if(l&&(i=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,i)),o.start>1e4)break}this.parsedPos=r,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=Ze.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:ite,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new Ze(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new Ze(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function wM(t,e,n){e.start=e.pos;for(let r=0;r<10;r++){let i=t(e,n);if(e.pos>e.start)return i}throw new Error("Stream parser failed to advance stream.")}const wb=Object.create(null),fu=[Nt.none],ite=new Qa(fu),a_=[],c_=Object.create(null),kM=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])kM[t]=_M(wb,e);class CM{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),kM)}resolve(e){return e?this.table[e]||(this.table[e]=_M(this.extra,e)):0}}const ste=new CM(wb);function wm(t,e){a_.indexOf(t)>-1||(a_.push(t),console.warn(e))}function _M(t,e){let n=[];for(let l of e.split(" ")){let a=[];for(let c of l.split(".")){let u=t[c]||A[c];u?typeof u=="function"?a.length?a=a.map(u):wm(c,`Modifier ${c} used at start of tag`):a.length?wm(c,`Tag ${c} used as modifier`):a=Array.isArray(u)?u:[u]:wm(c,`Unknown highlighting tag ${c}`)}for(let c of a)n.push(c)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(l=>l.id),s=c_[i];if(s)return s.id;let o=c_[i]=Nt.define({id:fu.length,name:r,props:[Ma({[r]:n})]});return fu.push(o),o.id}function ote(t,e){let n=Nt.define({id:fu.length,name:"Document",props:[Rs.add(()=>t),Ra.add(()=>r=>e.getIndent(r))],top:!0});return fu.push(n),n}ct.RTL,ct.LTR;class kb{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=ot(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),s=i.search(EM(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function u_(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function lte(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let s=1;s<i.length;s++)n[i[s]]=!0}let r=u_(e)+u_(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function TM(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:lte(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:n}:null}}function ate(t,e){return n=>{for(let r=ot(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class f_{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function Ao(t){return t.selection.main.from}function EM(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",s=r[r.length-1]!="$";return!i&&!s?t:new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const Cb=ys.define();function cte(t,e,n,r){let{main:i}=t.selection,s=n-i.from,o=r-i.from;return{...t.changeByRange(l=>{if(l!=i&&n!=r&&t.sliceDoc(l.from+s,l.from+o)!=t.sliceDoc(n,r))return{range:l};let a=t.toText(e);return{changes:{from:l.from+s,to:r==i.from?l.to:l.from+o,insert:a},range:H.cursor(l.from+s+a.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const h_=new WeakMap;function ute(t){if(!Array.isArray(t))return t;let e=h_.get(t);return e||h_.set(t,e=TM(t)),e}const Rd=Ie.define(),hu=Ie.define();class fte{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=En(e,n),i=ei(r);this.chars.push(r);let s=e.slice(n,n+i),o=s.toUpperCase();this.folded.push(En(o==s?s.toLowerCase():o,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:s,byWord:o}=this;if(n.length==1){let m=En(e,0),y=ei(m),b=y==e.length?0:-100;if(m!=n[0])if(m==r[0])b+=-200;else return null;return this.ret(b,[0,y])}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=n.length,c=0;if(l<0){for(let m=0,y=Math.min(e.length,200);m<y&&c<a;){let b=En(e,m);(b==n[c]||b==r[c])&&(i[c++]=m),m+=ei(b)}if(c<a)return null}let u=0,f=0,h=!1,d=0,p=-1,g=-1,O=/[a-z]/.test(e),x=!0;for(let m=0,y=Math.min(e.length,200),b=0;m<y&&f<a;){let S=En(e,m);l<0&&(u<a&&S==n[u]&&(s[u++]=m),d<a&&(S==n[d]||S==r[d]?(d==0&&(p=m),g=m+1,d++):d=0));let v,w=S<255?S>=48&&S<=57||S>=97&&S<=122?2:S>=65&&S<=90?1:0:(v=Uy(S))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!m||w==1&&O||b==0&&w!=0)&&(n[f]==S||r[f]==S&&(h=!0)?o[f++]=m:o.length&&(x=!1)),b=w,m+=ei(S)}return f==a&&o[0]==0&&x?this.result(-100+(h?-200:0),o,e):d==a&&p==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-900-e.length,[p,g]):f==a?this.result(-100+(h?-200:0)+-700+(x?0:-1100),o,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],s=0;for(let o of n){let l=o+(this.astral?ei(En(r,o)):1);s&&i[s-1]==o?i[s-1]=l:(i[s++]=o,i[s++]=l)}return this.ret(e-r.length,i)}}class hte{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 n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const Ht=ge.define({combine(t){return vi(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:dte,filterStrict:!1,compareCompletions:(e,n)=>(e.sortText||e.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>d_(e(r),n(r)),optionClass:(e,n)=>r=>d_(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function d_(t,e){return t?e?t+" "+e:t:e}function dte(t,e,n,r,i,s){let o=t.textDirection==ct.RTL,l=o,a=!1,c="top",u,f,h=e.left-i.left,d=i.right-e.right,p=r.right-r.left,g=r.bottom-r.top;if(l&&h<Math.min(p,d)?l=!1:!l&&d<Math.min(p,h)&&(l=!0),p<=(l?h:d))u=Math.max(i.top,Math.min(n.top,i.bottom-g))-e.top,f=Math.min(400,l?h:d);else{a=!0,f=Math.min(400,(o?e.right:i.right-e.left)-30);let m=i.bottom-e.bottom;m>=g||m>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let O=(e.bottom-e.top)/s.offsetHeight,x=(e.right-e.left)/s.offsetWidth;return{style:`${c}: ${u/O}px; max-width: ${f/x}px`,class:"cm-completionInfo-"+(a?o?"left-narrow":"right-narrow":l?"left":"right")}}function pte(t){let e=t.addToOptions.slice();return t.icons&&e.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}),e.push({render(n,r,i,s){let o=document.createElement("span");o.className="cm-completionLabel";let l=n.displayLabel||n.label,a=0;for(let c=0;c<s.length;){let u=s[c++],f=s[c++];u>a&&o.appendChild(document.createTextNode(l.slice(a,u)));let h=o.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(l.slice(u,f))),h.className="cm-completionMatchedText",a=f}return a<l.length&&o.appendChild(document.createTextNode(l.slice(a))),o},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}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function km(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class gte{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:s,selected:o}=i.open,l=e.state.facet(Ht);this.optionContent=pte(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=km(s.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(n).open;for(let u=a.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<c.length){this.applyCompletion(e,c[+f[1]]),a.preventDefault();return}}),this.dom.addEventListener("focusout",a=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Ht).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:hu.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:s,selected:o,disabled:l}=r.open;(!i.open||i.open.options!=s)&&(this.range=km(s.length,o,e.state.facet(Ht).maxRenderedOptions),this.showOptions(s,r.id)),this.updateSel(),l!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;(n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=km(n.options.length,n.selected,this.view.state.facet(Ht).maxRenderedOptions),this.showOptions(n.options,e.id));let r=this.updateSelectedOption(n.selected);if(r){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:s}=i;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(i);if(!o)return;"then"in o?o.then(l=>{l&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(l,i)}).catch(l=>$n(this.view.state,l,"completion info")):(this.addInfoPane(o,i),r.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",r.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;r.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&(r.removeAttribute("aria-selected"),r.removeAttribute("aria-describedby"));return n&&Ote(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return i.top>Math.min(s.bottom,n.bottom)-10||i.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(Ht).positionInfo(this.view,n,i,r,s,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,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",o=>{o.target==i&&o.preventDefault()});let s=null;for(let o=r.from;o<r.to;o++){let{completion:l,match:a}=e[o],{section:c}=l;if(c){let h=typeof c=="string"?c:c.name;if(h!=s&&(o>r.from||r.from==0))if(s=h,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let d=i.appendChild(document.createElement("completion-section"));d.textContent=h}}const u=i.appendChild(document.createElement("li"));u.id=n+"-"+o,u.setAttribute("role","option");let f=this.optionClass(l);f&&(u.className=f);for(let h of this.optionContent){let d=h(l,this.view.state,this.view,a);d&&u.appendChild(d)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function mte(t,e){return n=>new gte(n,t,e)}function Ote(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function p_(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function xte(t,e){let n=[],r=null,i=null,s=u=>{n.push(u);let{section:f}=u.completion;if(f){r||(r=[]);let h=typeof f=="string"?f:f.name;r.some(d=>d.name==h)||r.push(typeof f=="string"?{name:h}:f)}},o=e.facet(Ht);for(let u of t)if(u.hasResult()){let f=u.result.getMatch;if(u.result.filter===!1)for(let h of u.result.options)s(new f_(h,u.source,f?f(h):[],1e9-n.length));else{let h=e.sliceDoc(u.from,u.to),d,p=o.filterStrict?new hte(h):new fte(h);for(let g of u.result.options)if(d=p.match(g.label)){let O=g.displayLabel?f?f(g,d.matched):[]:d.matched,x=d.score+(g.boost||0);if(s(new f_(g,u.source,O,x)),typeof g.section=="object"&&g.section.rank==="dynamic"){let{name:m}=g.section;i||(i=Object.create(null)),i[m]=Math.max(x,i[m]||-1e9)}}}}if(r){let u=Object.create(null),f=0,h=(d,p)=>(d.rank==="dynamic"&&p.rank==="dynamic"?i[p.name]-i[d.name]:0)||(typeof d.rank=="number"?d.rank:1e9)-(typeof p.rank=="number"?p.rank:1e9)||(d.name<p.name?-1:1);for(let d of r.sort(h))f-=1e5,u[d.name]=f;for(let d of n){let{section:p}=d.completion;p&&(d.score+=u[typeof p=="string"?p:p.name])}}let l=[],a=null,c=o.compareCompletions;for(let u of n.sort((f,h)=>h.score-f.score||c(f.completion,h.completion))){let f=u.completion;!a||a.label!=f.label||a.detail!=f.detail||a.type!=null&&f.type!=null&&a.type!=f.type||a.apply!=f.apply||a.boost!=f.boost?l.push(u):p_(u.completion)>p_(a)&&(l[l.length-1]=u),a=u.completion}return l}class kl{constructor(e,n,r,i,s,o){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new kl(this.options,g_(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,s,o){if(i&&!o&&e.some(c=>c.isPending))return i.setDisabled();let l=xte(e,n);if(!l.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let a=n.facet(Ht).selectOnOpen?0:-1;if(i&&i.selected!=a&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;u<l.length;u++)if(l[u].completion==c){a=u;break}}return new kl(l,g_(r,a),{pos:e.reduce((c,u)=>u.hasResult()?Math.min(c,u.from):c,1e8),create:kte,above:s.aboveCursor},i?i.timestamp:Date.now(),a,!1)}map(e){return new kl(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new kl(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Ld{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new Ld(Ste,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Ht),s=(r.override||n.languageDataAt("autocomplete",Ao(n)).map(ute)).map(a=>(this.active.find(u=>u.source==a)||new or(a,this.active.some(u=>u.state!=0)?1:0)).update(e,r));s.length==this.active.length&&s.every((a,c)=>a==this.active[c])&&(s=this.active);let o=this.open,l=e.effects.some(a=>a.is(_b));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!yte(s,this.active)||l?o=kl.build(s,n,this.id,o,r,l):o&&o.disabled&&!s.some(a=>a.isPending)&&(o=null),!o&&s.every(a=>!a.isPending)&&s.some(a=>a.hasResult())&&(s=s.map(a=>a.hasResult()?new or(a.source,0):a));for(let a of e.effects)a.is(AM)&&(o=o&&o.setSelected(a.value,this.id));return s==this.active&&o==this.open?this:new Ld(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?bte:vte}}function yte(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,s=r==e.length;if(i||s)return i==s;if(t[n++].result!=e[r++].result)return!1}}const bte={"aria-autocomplete":"list"},vte={};function g_(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Ste=[];function PM(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(Cb);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class or{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=PM(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new or(i.source,0)),r&4&&i.state==0&&(i=new or(this.source,1)),i=i.updateFor(e,r);for(let s of e.effects)if(s.is(Rd))i=new or(i.source,1,s.value);else if(s.is(hu))i=new or(i.source,0);else if(s.is(_b))for(let o of s.value)o.source==i.source&&(i=o);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Ao(e.state))}}class Dl extends or{constructor(e,n,r,i,s,o){super(e,3,n),this.limit=r,this.result=i,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=Ao(e.state);if(l>o||!i||n&2&&(Ao(e.startState)==this.from||l<this.limit))return new or(this.source,n&4?1:0);let a=e.changes.mapPos(this.limit);return wte(i.validFor,e.state,s,o)?new Dl(this.source,this.explicit,a,i,s,o):i.update&&(i=i.update(i,s,o,new kb(e.state,l,!1)))?new Dl(this.source,this.explicit,a,i,i.from,(r=i.to)!==null&&r!==void 0?r:Ao(e.state)):new or(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Dl(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new or(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function wte(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):EM(t,!0).test(i)}const _b=Ie.define({map(t,e){return t.map(n=>n.map(e))}}),AM=Ie.define(),Pn=Ut.define({create(){return Ld.start()},update(t,e){return t.update(e)},provide:t=>[db.from(t,e=>e.tooltip),he.contentAttributes.from(t,e=>e.attrs)]});function Tb(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Pn).active.find(i=>i.source==e.source);return r instanceof Dl?(typeof n=="string"?t.dispatch({...cte(t.state,n,r.from,r.to),annotations:Cb.of(e.completion)}):n(t,e.completion,r.from,r.to),!0):!1}const kte=mte(Pn,Tb);function Wf(t,e="option"){return n=>{let r=n.state.field(Pn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Ht).interactionDelay)return!1;let i=1,s;e=="page"&&(s=Z9(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=r.open.options,l=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),n.dispatch({effects:AM.of(l)}),!0}}const Cte=t=>{let e=t.state.field(Pn,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Ht).interactionDelay?!1:Tb(t,e.open.options[e.open.selected])},Cm=t=>t.state.field(Pn,!1)?(t.dispatch({effects:Rd.of(!0)}),!0):!1,_te=t=>{let e=t.state.field(Pn,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:hu.of(null)}),!0)};class Tte{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Ete=50,Pte=1e3,Ate=It.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Pn).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Pn),n=t.state.facet(Ht);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Pn)==e)return;let r=t.transactions.some(s=>{let o=PM(s,n);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;s<this.running.length;s++){let o=this.running[s];if(r||o.context.abortOnDocChange&&t.docChanged||o.updates.length+t.transactions.length>Ete&&Date.now()-o.time>Pte){for(let l of o.context.abortListeners)try{l()}catch(a){$n(this.view.state,a)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(Rd)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Pn);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ht).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=Ao(e),r=new kb(e,n,t.explicit,this.view),i=new Tte(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:hu.of(null)}),$n(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ht).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Ht),r=this.view.state.field(Pn);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let l=Ao(s.updates.length?s.updates[0].startState:this.view.state),a=Math.min(l,s.done.from+(s.active.explicit?0:1)),c=new Dl(s.active.source,s.active.explicit,a,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:l);for(let u of s.updates)c=c.update(u,n);if(c.hasResult()){e.push(c);continue}}let o=r.active.find(l=>l.source==s.active.source);if(o&&o.isPending)if(s.done==null){let l=new or(s.active.source,0);for(let a of s.updates)l=l.update(a,n);l.isPending||e.push(l)}else this.startQuery(o)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:_b.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Pn,!1);if(e&&e.tooltip&&this.view.state.facet(Ht).closeOnBlur){let n=e.open&&Z9(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:hu.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Rd.of(!1)}),20),this.composing=0}}}),$te=typeof navigator=="object"&&/Win/.test(navigator.platform),Qte=xs.highest(he.domEventHandlers({keydown(t,e){let n=e.state.field(Pn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!($te&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(o=>o.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&Tb(e,r),!1}})),$M=he.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"}}});class Mte{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class Eb{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,tn.TrackDel),r=e.mapPos(this.to,1,tn.TrackDel);return n==null||r==null?null:new Eb(this.field,n,r)}}class Pb{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let a of this.lines){if(r.length){let c=o,u=/^\t*/.exec(a)[0].length;for(let f=0;f<u;f++)c+=e.facet(Uu);i.push(n+c.length-u),a=c+a.slice(u)}r.push(a),n+=a.length+1}let l=this.fieldPositions.map(a=>new Eb(a.field,i[a.line]+a.from,i[a.line]+a.to));return{text:r,ranges:l}}static parse(e){let n=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let l=s[1]?+s[1]:null,a=s[2]||s[3]||"",c=-1,u=a.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<n.length;f++)(l!=null?n[f].seq==l:u&&n[f].name==u)&&(c=f);if(c<0){let f=0;for(;f<n.length&&(l==null||n[f].seq!=null&&n[f].seq<l);)f++;n.splice(f,0,{seq:l,name:u}),c=f;for(let h of i)h.field>=c&&h.field++}for(let f of i)if(f.line==r.length&&f.from>s.index){let h=s[2]?3+(s[1]||"").length:2;f.from-=h,f.to-=h}i.push(new Mte(c,r.length,s.index,s.index+u.length)),o=o.slice(0,s.index)+a+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(l,a,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return a}),r.push(o)}return new Pb(r,i)}}let Rte=Pe.widget({widget:new class extends Si{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Lte=Pe.mark({class:"cm-snippetField"});class Ia{constructor(e,n){this.ranges=e,this.active=n,this.deco=Pe.set(e.map(r=>(r.from==r.to?Rte:Lte).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new Ia(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const Ju=Ie.define({map(t,e){return t&&t.map(e)}}),Ite=Ie.define(),du=Ut.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Ju))return n.value;if(n.is(Ite)&&t)return new Ia(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>he.decorations.from(t,e=>e?e.deco:Pe.none)});function Ab(t,e){return H.create(t.filter(n=>n.field==e).map(n=>H.range(n.from,n.to)))}function Nte(t){let e=Pb.parse(t);return(n,r,i,s)=>{let{text:o,ranges:l}=e.instantiate(n.state,i),{main:a}=n.state.selection,c={changes:{from:i,to:s==a.from?a.to:s,insert:Ge.of(o)},scrollIntoView:!0,annotations:r?[Cb.of(r),Mt.userEvent.of("input.complete")]:void 0};if(l.length&&(c.selection=Ab(l,0)),l.some(u=>u.field>0)){let u=new Ia(l,0),f=c.effects=[Ju.of(u)];n.state.field(du,!1)===void 0&&f.push(Ie.appendConfig.of([du,Zte,zte,$M]))}n.dispatch(n.state.update(c))}}function QM(t){return({state:e,dispatch:n})=>{let r=e.field(du,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,s=t>0&&!r.ranges.some(o=>o.field==i+t);return n(e.update({selection:Ab(r.ranges,i),effects:Ju.of(s?null:new Ia(r.ranges,i)),scrollIntoView:!0})),!0}}const Dte=({state:t,dispatch:e})=>t.field(du,!1)?(e(t.update({effects:Ju.of(null)})),!0):!1,Vte=QM(1),Fte=QM(-1),Bte=[{key:"Tab",run:Vte,shift:Fte},{key:"Escape",run:Dte}],m_=ge.define({combine(t){return t.length?t[0]:Bte}}),Zte=xs.highest($a.compute([m_],t=>t.facet(m_)));function Cn(t,e){return{...e,apply:Nte(t)}}const zte=he.domEventHandlers({mousedown(t,e){let n=e.state.field(du,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:Ab(n.ranges,i.field),effects:Ju.of(n.ranges.some(s=>s.field>i.field)?new Ia(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),pu={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},_o=Ie.define({map(t,e){let n=e.mapPos(t,-1,tn.TrackAfter);return n??void 0}}),$b=new class extends Us{};$b.startSide=1;$b.endSide=-1;const MM=Ut.define({create(){return Xe.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(_o)&&(t=t.update({add:[$b.range(n.value,n.value+1)]}));return t}});function Xte(){return[jte,MM]}const _m="()[]{}<>«»»«[]{}";function RM(t){for(let e=0;e<_m.length;e+=2)if(_m.charCodeAt(e)==t)return _m.charAt(e+1);return Uy(t<128?t:t+1)}function LM(t,e){return t.languageDataAt("closeBrackets",e)[0]||pu}const Wte=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),jte=he.inputHandler.of((t,e,n,r)=>{if((Wte?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&ei(En(r,0))==1||e!=i.from||n!=i.to)return!1;let s=Yte(t.state,r);return s?(t.dispatch(s),!0):!1}),Hte=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=LM(t,t.selection.main.head).brackets||pu.brackets,i=null,s=t.changeByRange(o=>{if(o.empty){let l=Ute(t.doc,o.head);for(let a of r)if(a==l&&rg(t.doc,o.head)==RM(En(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:H.cursor(o.head-a.length)}}return{range:i=o}});return i||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},qte=[{key:"Backspace",run:Hte}];function Yte(t,e){let n=LM(t,t.selection.main.head),r=n.brackets||pu.brackets;for(let i of r){let s=RM(En(i,0));if(e==i)return s==i?Jte(t,i,r.indexOf(i+i+i)>-1,n):Gte(t,i,s,n.before||pu.before);if(e==s&&IM(t,t.selection.main.from))return Kte(t,i,s)}return null}function IM(t,e){let n=!1;return t.field(MM).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function rg(t,e){let n=t.sliceString(e,e+2);return n.slice(0,ei(En(n,0)))}function Ute(t,e){let n=t.sliceString(e-2,e);return ei(En(n,0))==n.length?n:n.slice(1)}function Gte(t,e,n,r){let i=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:_o.of(o.to+e.length),range:H.range(o.anchor+e.length,o.head+e.length)};let l=rg(t.doc,o.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:e+n,from:o.head},effects:_o.of(o.head+e.length),range:H.cursor(o.head+e.length)}:{range:i=o}});return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Kte(t,e,n){let r=null,i=t.changeByRange(s=>s.empty&&rg(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:H.cursor(s.head+n.length)}:r={range:s});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Jte(t,e,n,r){let i=r.stringPrefixes||pu.stringPrefixes,s=null,o=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:_o.of(l.to+e.length),range:H.range(l.anchor+e.length,l.head+e.length)};let a=l.head,c=rg(t.doc,a),u;if(c==e){if(O_(t,a))return{changes:{insert:e+e,from:a},effects:_o.of(a+e.length),range:H.cursor(a+e.length)};if(IM(t,a)){let h=n&&t.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+h.length,insert:h},range:H.cursor(a+h.length)}}}else{if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&(u=x_(t,a-2*e.length,i))>-1&&O_(t,u))return{changes:{insert:e+e+e+e,from:a},effects:_o.of(a+e.length),range:H.cursor(a+e.length)};if(t.charCategorizer(a)(c)!=vt.Word&&x_(t,a,i)>-1&&!ene(t,a,e,i))return{changes:{insert:e+e,from:a},effects:_o.of(a+e.length),range:H.cursor(a+e.length)}}return{range:s=l}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function O_(t,e){let n=ot(t).resolveInner(e+1);return n.parent&&n.from==e}function ene(t,e,n,r){let i=ot(t).resolveInner(e,-1),s=r.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+s)),a=l.indexOf(n);if(!a||a>-1&&r.indexOf(l.slice(0,a))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+a;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function x_(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=vt.Word)return e;for(let i of n){let s=e-i.length;if(t.sliceDoc(s,e)==i&&r(t.sliceDoc(s-1,s))!=vt.Word)return s}return-1}function tne(t={}){return[Qte,Pn,Ht.of(t),Ate,nne,$M]}const NM=[{key:"Ctrl-Space",run:Cm},{mac:"Alt-`",run:Cm},{mac:"Alt-i",run:Cm},{key:"Escape",run:_te},{key:"ArrowDown",run:Wf(!0)},{key:"ArrowUp",run:Wf(!1)},{key:"PageDown",run:Wf(!0,"page")},{key:"PageUp",run:Wf(!1,"page")},{key:"Enter",run:Cte}],nne=xs.highest($a.computeN([Ht],t=>t.facet(Ht).defaultKeymap?[NM]:[])),rne=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=Mb(t.state,n.from);return r.line?ine(t):r.block?one(t):!1};function Qb(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const ine=Qb(cne,0),sne=Qb(DM,0),one=Qb((t,e)=>DM(t,e,ane(e)),0);function Mb(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const Ga=50;function lne(t,{open:e,close:n},r,i){let s=t.sliceDoc(r-Ga,r),o=t.sliceDoc(i,i+Ga),l=/\s*$/.exec(s)[0].length,a=/^\s*/.exec(o)[0].length,c=s.length-l;if(s.slice(c-e.length,c)==e&&o.slice(a,a+n.length)==n)return{open:{pos:r-l,margin:l&&1},close:{pos:i+a,margin:a&&1}};let u,f;i-r<=2*Ga?u=f=t.sliceDoc(r,i):(u=t.sliceDoc(r,r+Ga),f=t.sliceDoc(i-Ga,i));let h=/^\s*/.exec(u)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-n.length;return u.slice(h,h+e.length)==e&&f.slice(p,p+n.length)==n?{open:{pos:r+h+e.length,margin:/\s/.test(u.charAt(h+e.length))?1:0},close:{pos:i-d-n.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function ane(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function DM(t,e,n=e.selection.ranges){let r=n.map(s=>Mb(e,s.from).block);if(!r.every(s=>s))return null;let i=n.map((s,o)=>lne(e,r[o],s.from,s.to));if(t!=2&&!i.every(s=>s))return{changes:e.changes(n.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(t!=1&&i.some(s=>s)){let s=[];for(let o=0,l;o<i.length;o++)if(l=i[o]){let a=r[o],{open:c,close:u}=l;s.push({from:c.pos-a.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+a.close.length})}return{changes:s}}return null}function cne(t,e,n=e.selection.ranges){let r=[],i=-1;e:for(let{from:s,to:o}of n){let l=r.length,a=1e9,c;for(let u=s;u<=o;){let f=e.doc.lineAt(u);if(c==null&&(c=Mb(e,f.from).line,!c))continue e;if(f.from>i&&(s==o||o>f.from)){i=f.from;let h=/^\s*/.exec(f.text)[0].length,d=h==f.length,p=f.text.slice(h,h+c.length)==c?h:-1;h<f.text.length&&h<a&&(a=h),r.push({line:f,comment:p,token:c,indent:h,empty:d,single:!1})}u=f.to+1}if(a<1e9)for(let u=l;u<r.length;u++)r[u].indent<r[u].line.text.length&&(r[u].indent=a);r.length==l+1&&(r[l].single=!0)}if(t!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:l,token:a,indent:c,empty:u,single:f}of r)(f||!u)&&s.push({from:l.from+c,insert:a+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:l,token:a}of r)if(l>=0){let c=o.from+l,u=c+a.length;o.text[u-o.from]==" "&&u++,s.push({from:c,to:u})}return{changes:s}}return null}const g0=ys.define(),une=ys.define(),fne=ge.define(),VM=ge.define({combine(t){return vi(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),FM=Ut.define({create(){return li.empty},update(t,e){let n=e.state.facet(VM),r=e.annotation(g0);if(r){let a=Qn.fromTransaction(e,r.selection),c=r.side,u=c==0?t.undone:t.done;return a?u=Id(u,u.length,n.minDepth,a):u=zM(u,e.startState.selection),new li(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(une);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Mt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=Qn.fromTransaction(e),o=e.annotation(Mt.time),l=e.annotation(Mt.userEvent);return s?t=t.addChanges(s,o,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,l,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new li(t.done.map(Qn.fromJSON),t.undone.map(Qn.fromJSON))}});function hne(t={}){return[FM,VM.of(t),he.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?BM:e.inputType=="historyRedo"?m0:null;return r?(e.preventDefault(),r(n)):!1}})]}function ig(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(FM,!1);if(!i)return!1;let s=i.pop(t,n,e);return s?(r(s),!0):!1}}const BM=ig(0,!1),m0=ig(1,!1),dne=ig(0,!0),pne=ig(1,!0);class Qn{constructor(e,n,r,i,s){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new Qn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.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(e){return new Qn(e.changes&&Vt.fromJSON(e.changes),[],e.mapped&&ui.fromJSON(e.mapped),e.startSelection&&H.fromJSON(e.startSelection),e.selectionsAfter.map(H.fromJSON))}static fromTransaction(e,n){let r=lr;for(let i of e.startState.facet(fne)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new Qn(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,lr)}static selection(e){return new Qn(void 0,lr,void 0,void 0,e)}}function Id(t,e,n,r){let i=e+1>n+20?e-n-1:0,s=t.slice(i,e);return s.push(r),s}function gne(t,e){let n=[],r=!1;return t.iterChangedRanges((i,s)=>n.push(i,s)),e.iterChangedRanges((i,s,o,l)=>{for(let a=0;a<n.length;){let c=n[a++],u=n[a++];l>=c&&o<=u&&(r=!0)}}),r}function mne(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function ZM(t,e){return t.length?e.length?t.concat(e):t:e}const lr=[],One=200;function zM(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-One));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Id(t,t.length-1,1e9,n.setSelAfter(r)))}else return[Qn.selection([e])]}function xne(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Tm(t,e){if(!t.length)return t;let n=t.length,r=lr;for(;n;){let i=yne(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=t.slice(0,n);return s[n-1]=i,s}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[Qn.selection(r)]:lr}function yne(t,e,n){let r=ZM(t.selectionsAfter.length?t.selectionsAfter.map(l=>l.map(e)):lr,n);if(!t.changes)return Qn.selection(r);let i=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new Qn(i,Ie.mapEffects(t.effects,e),o,t.startSelection.map(s),r)}const bne=/^(input\.type|delete)($|\.)/;class li{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new li(this.done,this.undone):this}addChanges(e,n,r,i,s){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!r||bne.test(r))&&(!l.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,gne(l.changes,e.changes))||r=="input.type.compose")?o=Id(o,o.length-1,i.minDepth,new Qn(e.changes.compose(l.changes),ZM(Ie.mapEffects(e.effects,l.changes),l.effects),l.mapped,l.startSelection,lr)):o=Id(o,o.length,i.minDepth,e),new li(o,lr,n,r)}addSelection(e,n,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:lr;return s.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&mne(s[s.length-1],e)?this:new li(zM(this.done,e),this.undone,n,r)}addMapping(e){return new li(Tm(this.done,e),Tm(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1],o=s.selectionsAfter[0]||(s.startSelection?s.startSelection.map(s.changes.invertedDesc,1):n.selection);if(r&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:g0.of({side:e,rest:xne(i),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let l=i.length==1?lr:i.slice(0,i.length-1);return s.mapped&&(l=Tm(l,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:g0.of({side:e,rest:l,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}li.empty=new li(lr,lr);const vne=[{key:"Mod-z",run:BM,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:m0,preventDefault:!0},{linux:"Ctrl-Shift-z",run:m0,preventDefault:!0},{key:"Mod-u",run:dne,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:pne,preventDefault:!0}];function Na(t,e){return H.create(t.ranges.map(e),t.mainIndex)}function Zr(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function zr({state:t,dispatch:e},n){let r=Na(t.selection,n);return r.eq(t.selection,!0)?!1:(e(Zr(t,r)),!0)}function sg(t,e){return H.cursor(e?t.to:t.from)}function XM(t,e){return zr(t,n=>n.empty?t.moveByChar(n,e):sg(n,e))}function pn(t){return t.textDirectionAt(t.state.selection.main.head)==ct.LTR}const WM=t=>XM(t,!pn(t)),jM=t=>XM(t,pn(t));function HM(t,e){return zr(t,n=>n.empty?t.moveByGroup(n,e):sg(n,e))}const Sne=t=>HM(t,!pn(t)),wne=t=>HM(t,pn(t));function kne(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function og(t,e,n){let r=ot(t).resolveInner(e.head),i=n?Re.closedBy:Re.openedBy;for(let a=e.head;;){let c=n?r.childAfter(a):r.childBefore(a);if(!c)break;kne(t,c,i)?r=c:a=n?c.to:c.from}let s=r.type.prop(i),o,l;return s&&(o=n?oi(t,r.from,1):oi(t,r.to,-1))&&o.matched?l=n?o.end.to:o.end.from:l=n?r.to:r.from,H.cursor(l,n?-1:1)}const Cne=t=>zr(t,e=>og(t.state,e,!pn(t))),_ne=t=>zr(t,e=>og(t.state,e,pn(t)));function qM(t,e){return zr(t,n=>{if(!n.empty)return sg(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const YM=t=>qM(t,!1),UM=t=>qM(t,!0);function GM(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let s of t.state.facet(he.scrollMargins)){let o=s(t);o!=null&&o.top&&(n=Math.max(o==null?void 0:o.top,n)),o!=null&&o.bottom&&(r=Math.max(o==null?void 0:o.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function KM(t,e){let n=GM(t),{state:r}=t,i=Na(r.selection,o=>o.empty?t.moveVertically(o,e,n.height):sg(o,e));if(i.eq(r.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(r.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),a=l.top+n.marginTop,c=l.bottom-n.marginBottom;o&&o.top>a&&o.bottom<c&&(s=he.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-a}))}return t.dispatch(Zr(r,i),{effects:s}),!0}const y_=t=>KM(t,!1),O0=t=>KM(t,!0);function po(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let s=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=H.cursor(r.from+s))}return i}const Tne=t=>zr(t,e=>po(t,e,!0)),Ene=t=>zr(t,e=>po(t,e,!1)),Pne=t=>zr(t,e=>po(t,e,!pn(t))),Ane=t=>zr(t,e=>po(t,e,pn(t))),$ne=t=>zr(t,e=>H.cursor(t.lineBlockAt(e.head).from,1)),Qne=t=>zr(t,e=>H.cursor(t.lineBlockAt(e.head).to,-1));function Mne(t,e,n){let r=!1,i=Na(t.selection,s=>{let o=oi(t,s.head,-1)||oi(t,s.head,1)||s.head>0&&oi(t,s.head-1,1)||s.head<t.doc.length&&oi(t,s.head+1,-1);if(!o||!o.end)return s;r=!0;let l=o.start.from==s.head?o.end.to:o.end.from;return H.cursor(l)});return r?(e(Zr(t,i)),!0):!1}const Rne=({state:t,dispatch:e})=>Mne(t,e);function pr(t,e){let n=Na(t.state.selection,r=>{let i=e(r);return H.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Zr(t.state,n)),!0)}function JM(t,e){return pr(t,n=>t.moveByChar(n,e))}const eR=t=>JM(t,!pn(t)),tR=t=>JM(t,pn(t));function nR(t,e){return pr(t,n=>t.moveByGroup(n,e))}const Lne=t=>nR(t,!pn(t)),Ine=t=>nR(t,pn(t)),Nne=t=>pr(t,e=>og(t.state,e,!pn(t))),Dne=t=>pr(t,e=>og(t.state,e,pn(t)));function rR(t,e){return pr(t,n=>t.moveVertically(n,e))}const iR=t=>rR(t,!1),sR=t=>rR(t,!0);function oR(t,e){return pr(t,n=>t.moveVertically(n,e,GM(t).height))}const b_=t=>oR(t,!1),v_=t=>oR(t,!0),Vne=t=>pr(t,e=>po(t,e,!0)),Fne=t=>pr(t,e=>po(t,e,!1)),Bne=t=>pr(t,e=>po(t,e,!pn(t))),Zne=t=>pr(t,e=>po(t,e,pn(t))),zne=t=>pr(t,e=>H.cursor(t.lineBlockAt(e.head).from)),Xne=t=>pr(t,e=>H.cursor(t.lineBlockAt(e.head).to)),S_=({state:t,dispatch:e})=>(e(Zr(t,{anchor:0})),!0),w_=({state:t,dispatch:e})=>(e(Zr(t,{anchor:t.doc.length})),!0),k_=({state:t,dispatch:e})=>(e(Zr(t,{anchor:t.selection.main.anchor,head:0})),!0),C_=({state:t,dispatch:e})=>(e(Zr(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Wne=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),jne=({state:t,dispatch:e})=>{let n=lg(t).map(({from:r,to:i})=>H.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:H.create(n),userEvent:"select"})),!0},Hne=({state:t,dispatch:e})=>{let n=Na(t.selection,r=>{let i=ot(t),s=i.resolveStack(r.from,1);if(r.empty){let o=i.resolveStack(r.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:l}=o;if((l.from<r.from&&l.to>=r.to||l.to>r.to&&l.from<=r.from)&&o.next)return H.range(l.to,l.from)}return r});return n.eq(t.selection)?!1:(e(Zr(t,n)),!0)};function lR(t,e){let{state:n}=t,r=n.selection,i=n.selection.ranges.slice();for(let s of n.selection.ranges){let o=n.doc.lineAt(s.head);if(e?o.to<t.state.doc.length:o.from>0)for(let l=s;;){let a=t.moveVertically(l,e);if(a.head<o.from||a.head>o.to){i.some(c=>c.head==a.head)||i.push(a);break}else{if(a.head==l.head)break;l=a}}}return i.length==r.ranges.length?!1:(t.dispatch(Zr(n,H.create(i,i.length-1))),!0)}const qne=t=>lR(t,!1),Yne=t=>lR(t,!0),Une=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=H.create([n.main]):n.main.empty||(r=H.create([H.cursor(n.main.head)])),r?(e(Zr(t,r)),!0):!1};function ef(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(s=>{let{from:o,to:l}=s;if(o==l){let a=e(s);a<o?(n="delete.backward",a=jf(t,a,!1)):a>o&&(n="delete.forward",a=jf(t,a,!0)),o=Math.min(o,a),l=Math.max(l,a)}else o=jf(t,o,!1),l=jf(t,l,!0);return o==l?{range:s}:{changes:{from:o,to:l},range:H.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?he.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function jf(t,e,n){if(t instanceof he)for(let r of t.state.facet(he.atomicRanges).map(i=>i(t)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=n?s:i)});return e}const aR=(t,e,n)=>ef(t,r=>{let i=r.from,{state:s}=t,o=s.doc.lineAt(i),l,a;if(n&&!e&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(l=o.text.slice(0,i-o.from))){if(l[l.length-1]==" ")return i-1;let c=Nr(l,s.tabSize),u=c%Ko(s)||Ko(s);for(let f=0;f<u&&l[l.length-1-f]==" ";f++)i--;a=i}else a=qt(o.text,i-o.from,e,e)+o.from,a==i&&o.number!=(e?s.doc.lines:1)?a+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(a-o.from,i-o.from))&&(a=qt(o.text,a-o.from,!1,!1)+o.from);return a}),x0=t=>aR(t,!1,!0),cR=t=>aR(t,!0,!1),uR=(t,e)=>ef(t,n=>{let r=n.head,{state:i}=t,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let l=null;;){if(r==(e?s.to:s.from)){r==n.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let a=qt(s.text,r-s.from,e)+s.from,c=s.text.slice(Math.min(r,a)-s.from,Math.max(r,a)-s.from),u=o(c);if(l!=null&&u!=l)break;(c!=" "||r!=n.head)&&(l=u),r=a}return r}),fR=t=>uR(t,!1),Gne=t=>uR(t,!0),Kne=t=>ef(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Jne=t=>ef(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),ere=t=>ef(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),tre=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ge.of(["",""])},range:H.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},nre=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,s=t.doc.lineAt(i),o=i==s.from?i-1:qt(s.text,i-s.from,!1)+s.from,l=i==s.to?i+1:qt(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:l,insert:t.doc.slice(i,l).append(t.doc.slice(o,i))},range:H.cursor(l)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function lg(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),s=t.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=t.doc.lineAt(r.to-1)),n>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});n=s.number+1}return e}function hR(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let s of lg(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),l=o.length+1;if(n){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let a of s.ranges)i.push(H.range(Math.min(t.doc.length,a.anchor+l),Math.min(t.doc.length,a.head+l)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let a of s.ranges)i.push(H.range(a.anchor-l,a.head-l))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:H.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const rre=({state:t,dispatch:e})=>hR(t,e,!1),ire=({state:t,dispatch:e})=>hR(t,e,!0);function dR(t,e,n){if(t.readOnly)return!1;let r=[];for(let s of lg(t))n?r.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):r.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)});let i=t.changes(r);return e(t.update({changes:i,selection:t.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const sre=({state:t,dispatch:e})=>dR(t,e,!1),ore=({state:t,dispatch:e})=>dR(t,e,!0),lre=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(lg(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=Na(e.selection,i=>{let s;if(t.lineWrapping){let o=t.lineBlockAt(i.head),l=t.coordsAtPos(i.head,i.assoc||1);l&&(s=o.bottom+t.documentTop-l.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,s)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function are(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=ot(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(Re.closedBy))&&s.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const __=pR(!1),cre=pR(!0);function pR(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,l=e.doc.lineAt(s),a=!t&&s==o&&are(e,s);t&&(s=o=(o<=l.to?l:e.doc.lineAt(o)).to);let c=new tg(e,{simulateBreak:s,simulateDoubleBreak:!!a}),u=yb(c,s);for(u==null&&(u=Nr(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<l.to&&/\s/.test(l.text[o-l.from]);)o++;a?{from:s,to:o}=a:s>l.from&&s<l.from+100&&!/\S/.test(l.text.slice(0,s))&&(s=l.from);let f=["",uu(e,u)];return a&&f.push(uu(e,c.lineIndent(l.from,-1))),{changes:{from:s,to:o,insert:Ge.of(f)},range:H.cursor(s+1+f[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Rb(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let l=t.doc.lineAt(o);l.number>n&&(r.empty||r.to>l.from)&&(e(l,i,r),n=l.number),o=l.to+1}let s=t.changes(i);return{changes:i,range:H.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const ure=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new tg(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),i=Rb(t,(s,o,l)=>{let a=yb(r,s.from);if(a==null)return;/\S/.test(s.text)||(a=0);let c=/^\s*/.exec(s.text)[0],u=uu(t,a);(c!=u||l.from<s.from+c.length)&&(n[s.from]=a,o.push({from:s.from,to:s.from+c.length,insert:u}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},gR=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Rb(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Uu)})}),{userEvent:"input.indent"})),!0),mR=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Rb(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let s=Nr(i,t.tabSize),o=0,l=uu(t,Math.max(0,s-Ko(t)));for(;o<i.length&&o<l.length&&i.charCodeAt(o)==l.charCodeAt(o);)o++;r.push({from:n.from+o,to:n.from+i.length,insert:l.slice(o)})}),{userEvent:"delete.dedent"})),!0),fre=t=>(t.setTabFocusMode(),!0),hre=[{key:"Ctrl-b",run:WM,shift:eR,preventDefault:!0},{key:"Ctrl-f",run:jM,shift:tR},{key:"Ctrl-p",run:YM,shift:iR},{key:"Ctrl-n",run:UM,shift:sR},{key:"Ctrl-a",run:$ne,shift:zne},{key:"Ctrl-e",run:Qne,shift:Xne},{key:"Ctrl-d",run:cR},{key:"Ctrl-h",run:x0},{key:"Ctrl-k",run:Kne},{key:"Ctrl-Alt-h",run:fR},{key:"Ctrl-o",run:tre},{key:"Ctrl-t",run:nre},{key:"Ctrl-v",run:O0}],dre=[{key:"ArrowLeft",run:WM,shift:eR,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Sne,shift:Lne,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:Pne,shift:Bne,preventDefault:!0},{key:"ArrowRight",run:jM,shift:tR,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:wne,shift:Ine,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Ane,shift:Zne,preventDefault:!0},{key:"ArrowUp",run:YM,shift:iR,preventDefault:!0},{mac:"Cmd-ArrowUp",run:S_,shift:k_},{mac:"Ctrl-ArrowUp",run:y_,shift:b_},{key:"ArrowDown",run:UM,shift:sR,preventDefault:!0},{mac:"Cmd-ArrowDown",run:w_,shift:C_},{mac:"Ctrl-ArrowDown",run:O0,shift:v_},{key:"PageUp",run:y_,shift:b_},{key:"PageDown",run:O0,shift:v_},{key:"Home",run:Ene,shift:Fne,preventDefault:!0},{key:"Mod-Home",run:S_,shift:k_},{key:"End",run:Tne,shift:Vne,preventDefault:!0},{key:"Mod-End",run:w_,shift:C_},{key:"Enter",run:__,shift:__},{key:"Mod-a",run:Wne},{key:"Backspace",run:x0,shift:x0,preventDefault:!0},{key:"Delete",run:cR,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:fR,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:Gne,preventDefault:!0},{mac:"Mod-Backspace",run:Jne,preventDefault:!0},{mac:"Mod-Delete",run:ere,preventDefault:!0}].concat(hre.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),pre=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Cne,shift:Nne},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:_ne,shift:Dne},{key:"Alt-ArrowUp",run:rre},{key:"Shift-Alt-ArrowUp",run:sre},{key:"Alt-ArrowDown",run:ire},{key:"Shift-Alt-ArrowDown",run:ore},{key:"Mod-Alt-ArrowUp",run:qne},{key:"Mod-Alt-ArrowDown",run:Yne},{key:"Escape",run:Une},{key:"Mod-Enter",run:cre},{key:"Alt-l",mac:"Ctrl-l",run:jne},{key:"Mod-i",run:Hne,preventDefault:!0},{key:"Mod-[",run:mR},{key:"Mod-]",run:gR},{key:"Mod-Alt-\\",run:ure},{key:"Shift-Mod-k",run:lre},{key:"Shift-Mod-\\",run:Rne},{key:"Mod-/",run:rne},{key:"Alt-A",run:sne},{key:"Ctrl-m",mac:"Shift-Alt-m",run:fre}].concat(dre),gre={key:"Tab",run:gR,shift:mR};var T_={};class Nd{constructor(e,n,r,i,s,o,l,a,c,u=0,f){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=c,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new Nd(e,[],n,r,r,0,[],0,i?new E_(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),l=s.dynamicPrecedence(i);if(l&&(this.score+=l),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let a=this.stack.length-(r-1)*3-(e&262144?6:0),c=a?this.stack[a-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let f=a?this.stack[a-1]:0,h=this.bufferBase+this.buffer.length-f;if(i<s.minRepeatTerm||e&131072){let d=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,c,d,h+4,!0)}if(e&262144)this.state=this.stack[a];else{let d=this.stack[a-3];this.state=s.getGoto(d,i,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,l=this.buffer.length;if(l==0&&o.parent&&(l=o.bufferBase-o.parent.bufferBase,o=o.parent),l>0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(n==r)return;if(o.buffer[l-2]>=n){o.buffer[l-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,n,r,i);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let l=!1;for(let a=o;a>0&&this.buffer[a-2]>r;a-=4)if(this.buffer[a-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;this.pos=i;let l=o.stateFlag(s,1);!l&&(i>r||n<=o.maxNode)&&(this.reducePos=i),this.pushState(s,l?r:Math.min(r,this.reducePos)),this.shiftContext(n,r),n<=o.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new Nd(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new mre(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<n.length;s+=2)(o=n[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(n[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<n.length;s+=2){let o=n[s+1];i.some((l,a)=>a&1&&l==o)||i.push(n[s],o)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let s=n[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,s)=>{if(!n.includes(i))return n.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-s;if(l>1){let a=o&65535,c=this.stack.length-l*3;if(c>=0&&e.getGoto(this.stack[c],a,!1)>=0)return l<<19|65536|a}}else{let l=r(o,s+1);if(l!=null)return l}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new E_(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class E_{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class mre{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class Dd{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Dd(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Dd(this.stack,this.pos,this.index)}}function cc(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let s=0;for(;;){let o=t.charCodeAt(r++),l=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),s+=a,l)break;s*=46}n?n[i++]=s:n=new e(s)}return n}class Th{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const P_=new Th;class Ore{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=P_,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;n<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,l=this.range;for(;l.to<=r;)l=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=P_,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class Vl{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;OR(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}Vl.prototype.contextual=Vl.prototype.fallback=Vl.prototype.extend=!1;class Vd{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?cc(e):e}token(e,n){let r=e.pos,i=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(OR(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,o==null)break;e.reset(o,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}Vd.prototype.contextual=Vl.prototype.fallback=Vl.prototype.extend=!1;class Jn{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function OR(t,e,n,r,i,s){let o=0,l=1<<r,{dialect:a}=n.p.parser;e:for(;(l&t[o])!=0;){let c=t[o+1];for(let d=o+3;d<c;d+=2)if((t[d+1]&l)>0){let p=t[d];if(a.allows(p)&&(e.token.value==-1||e.token.value==p||xre(p,e.token.value,i,s))){e.acceptToken(p);break}}let u=e.next,f=0,h=t[o+2];if(e.next<0&&h>f&&t[c+h*3-3]==65535){o=t[c+h*3-1];continue e}for(;f<h;){let d=f+h>>1,p=c+d+(d<<1),g=t[p],O=t[p+1]||65536;if(u<g)h=d;else if(u>=O)f=d+1;else{o=t[p+2],e.advance();continue e}}break}}function A_(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function xre(t,e,n,r){let i=A_(n,r,e);return i<0||A_(n,r,t)<i}const Dn=typeof process<"u"&&T_&&/\bparse\b/.test(T_.LOG);let Em=null;function $_(t,e,n){let r=t.cursor(et.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}let yre=class{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?$_(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?$_(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[n]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof Ze){if(o==e){if(o<this.safeFrom)return null;let l=o+s.length;if(l<=this.safeTo){let a=s.prop(Re.lookAhead);if(!a||l+a<this.fragment.to)return s}}this.index[n]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}};class bre{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Th)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let c=0;c<s.length;c++){if((1<<c&o)==0)continue;let u=s[c],f=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=o||f.context!=l)&&(this.updateCachedToken(f,u,e),f.mask=o,f.context=l),f.lookAhead>f.end+25&&(a=Math.max(f.lookAhead,a)),f.value!=0)){let h=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!u.extend&&(r=f,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return a&&e.setLookAhead(a),!r&&e.pos==this.stream.end&&(r=new Th,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Th,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let l=s.specializers[o](this.stream.read(e.start,e.end),r);if(l>=0&&r.p.parser.dialect.allows(l>>1)){(l&1)==0?e.value=l>>1:e.extended=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:s}=e,{parser:o}=e.p,{data:l}=o;for(let a=0;a<2;a++)for(let c=o.stateSlot(s,a?2:1);;c+=3){if(l[c]==65535)if(l[c+1]==1)c=Ni(l,c+2);else{i==0&&l[c+1]==2&&(i=this.putAction(Ni(l,c+2),n,r,i));break}l[c]==n&&(i=this.putAction(Ni(l,c+1),n,r,i))}return i}}class vre{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Ore(n,i),this.tokens=new bre(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[Nd.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new yre(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let l=e[o];for(;;){if(this.tokens.mainToken=null,l.pos>n)r.push(l);else{if(this.advanceStack(l,r,e))continue;{i||(i=[],s=[]),i.push(l);let a=this.tokens.getMainToken(l);s.push(a.value,a.end)}}break}}if(!r.length){let o=i&&wre(i);if(o)return Dn&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Dn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return Dn&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((l,a)=>a.score-l.score);r.length>o;)r.pop();r.some(l=>l.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let l=r[o];for(let a=o+1;a<r.length;a++){let c=r[a];if(l.sameState(c)||l.buffer.length>500&&c.buffer.length>500)if((l.score-c.score||l.buffer.length-c.buffer.length)>0)r.splice(a--,1);else{r.splice(o--,1);continue e}}}r.length>12&&(r.sort((o,l)=>l.score-o.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:s}=this,o=Dn?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let h=this.parser.nodeSet.types[f.type.id]==f.type?s.getGoto(e.state,f.type.id):-1;if(h>-1&&f.length&&(!c||(f.prop(Re.contextHash)||0)==u))return e.useNode(f,h),Dn&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof Ze)||f.children.length==0||f.positions[0]>0)break;let d=f.children[0];if(d instanceof Ze&&f.positions[0]==0)f=d;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),Dn&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let c=0;c<a.length;){let u=a[c++],f=a[c++],h=a[c++],d=c==a.length||!r,p=d?e:e.split(),g=this.tokens.mainToken;if(p.apply(u,f,g?g.start:p.pos,h),Dn&&console.log(o+this.stackID(p)+` (via ${(u&65536)==0?"shift":`reduce of ${s.getName(u&65535)}`} for ${s.getName(f)} @ ${i}${p==e?"":", split"})`),d)return!0;p.pos>i?n.push(p):r.push(p)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return Q_(e,n),!0}}runRecovery(e,n,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let l=e[o],a=n[o<<1],c=n[(o<<1)+1],u=Dn?this.stackID(l)+" -> ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),Dn&&console.log(u+this.stackID(l)+" (restarted)"),this.advanceFully(l,r))))continue;let f=l.split(),h=u;for(let d=0;d<10&&f.forceReduce()&&(Dn&&console.log(h+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));d++)Dn&&(h=this.stackID(f)+" -> ");for(let d of l.recoverByInsert(a))Dn&&console.log(u+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,r);this.stream.end>l.pos?(c==l.pos&&(c++,a=0),l.recoverByDelete(a,c),Dn&&console.log(u+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),Q_(l,r)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(e){return e.close(),Ze.build({buffer:Dd.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(Em||(Em=new WeakMap)).get(e);return n||Em.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function Q_(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class Sre{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const Pm=t=>t;class xR{constructor(e){this.start=e.start,this.shift=e.shift||Pm,this.reduce=e.reduce||Pm,this.reuse=e.reuse||Pm,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class la extends Jp{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;l<e.repeatNodeCount;l++)n.push("");let r=Object.keys(e.topRules).map(l=>e.topRules[l][1]),i=[];for(let l=0;l<n.length;l++)i.push([]);function s(l,a,c){i[l].push([a,a.deserialize(String(c))])}if(e.nodeProps)for(let l of e.nodeProps){let a=l[0];typeof a=="string"&&(a=Re[a]);for(let c=1;c<l.length;){let u=l[c++];if(u>=0)s(u,a,l[c++]);else{let f=l[c+-u];for(let h=-u;h>0;h--)s(l[c++],a,f);c++}}}this.nodeSet=new Qa(n.map((l,a)=>Nt.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:i[a],top:r.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Y9;let o=cc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(M_),this.states=cc(e.states,Uint32Array),this.data=cc(e.stateData),this.goto=cc(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new Vl(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new vre(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let s=i[n+1];;){let o=i[s++],l=o&1,a=i[s++];if(l&&r)return a;for(let c=s+(o>>1);s<c;s++)if(i[s]==e)return a;if(l)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=Ni(r,s+2)];else{if(r[s+1]==2)return Ni(r,s+2);break}if(o==n||o==0)return Ni(r,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Ni(this.data,s+2);else break;i=n(Ni(this.data,s+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ni(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((s,o)=>o&1&&s==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(la.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(l=>l.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return n.specializers[i]=M_(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<n.length;s++)if(!r[s])for(let o=this.dialects[n[s]],l;(l=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[l]=1;return new Sre(e,r,i)}static deserialize(e){return new la(e)}}function Ni(t,e){return t[e]|t[e+1]<<16}function wre(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function M_(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}const kre=122,R_=1,Cre=123,_re=124,yR=2,Tre=125,Ere=3,Pre=4,bR=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Are=58,$re=40,vR=95,Qre=91,Eh=45,Mre=46,Rre=35,Lre=37,Ire=38,Nre=92,Dre=10,Vre=42;function gu(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Lb(t){return t>=48&&t<=57}function L_(t){return Lb(t)||t>=97&&t<=102||t>=65&&t<=70}const SR=(t,e,n)=>(r,i)=>{for(let s=!1,o=0,l=0;;l++){let{next:a}=r;if(gu(a)||a==Eh||a==vR||s&&Lb(a))!s&&(a!=Eh||l>0)&&(s=!0),o===l&&a==Eh&&o++,r.advance();else if(a==Nre&&r.peek(1)!=Dre){if(r.advance(),L_(r.next)){do r.advance();while(L_(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(o==2&&i.canShift(yR)?e:a==$re?n:t);break}}},Fre=new Jn(SR(Cre,yR,_re)),Bre=new Jn(SR(Tre,Ere,Pre)),Zre=new Jn(t=>{if(bR.includes(t.peek(-1))){let{next:e}=t;(gu(e)||e==vR||e==Rre||e==Mre||e==Vre||e==Qre||e==Are&&gu(t.peek(1))||e==Eh||e==Ire)&&t.acceptToken(kre)}}),zre=new Jn(t=>{if(!bR.includes(t.peek(-1))){let{next:e}=t;if(e==Lre&&(t.advance(),t.acceptToken(R_)),gu(e)){do t.advance();while(gu(t.next)||Lb(t.next));t.acceptToken(R_)}}}),Xre=Ma({"AtKeyword import charset namespace keyframes media supports":A.definitionKeyword,"from to selector":A.keyword,NamespaceName:A.namespace,KeyframeName:A.labelName,KeyframeRangeName:A.operatorKeyword,TagName:A.tagName,ClassName:A.className,PseudoClassName:A.constant(A.className),IdName:A.labelName,"FeatureName PropertyName":A.propertyName,AttributeName:A.attributeName,NumberLiteral:A.number,KeywordQuery:A.keyword,UnaryQueryOp:A.operatorKeyword,"CallTag ValueName":A.atom,VariableName:A.variableName,Callee:A.operatorKeyword,Unit:A.unit,"UniversalSelector NestingSelector":A.definitionOperator,"MatchOp CompareOp":A.compareOperator,"ChildOp SiblingOp, LogicOp":A.logicOperator,BinOp:A.arithmeticOperator,Important:A.modifier,Comment:A.blockComment,ColorLiteral:A.color,"ParenthesizedContent StringLiteral":A.string,":":A.punctuation,"PseudoOp #":A.derefOperator,"; ,":A.separator,"( )":A.paren,"[ ]":A.squareBracket,"{ }":A.brace}),Wre={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},jre={__proto__:null,or:98,and:98,not:106,only:106,layer:170},Hre={__proto__:null,selector:112,layer:166},qre={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},Yre={__proto__:null,to:207},Ure=la.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O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&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement sup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~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},dynamicPrecedences:{76:1},specialized:[{term:124,get:t=>Wre[t]||-1},{term:125,get:t=>jre[t]||-1},{term:4,get:t=>Hre[t]||-1},{term:25,get:t=>qre[t]||-1},{term:123,get:t=>Yre[t]||-1}],tokenPrec:1963});let Am=null;function $m(){if(!Am&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let r in t)r!="cssText"&&r!="cssFloat"&&typeof t[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(e.push(r),n.add(r)));Am=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return Am||[]}const I_=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),N_=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),Gre=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),Kre=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),Ai=/^(\w[\w-]*|-\w[\w-]*|)$/,Jre=/^-(-[\w-]*)?$/;function eie(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let r=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const D_=new J9,tie=["Declaration"];function nie(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function wR(t,e,n){if(e.to-e.from>4096){let r=D_.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(et.IncludeAnonymous);if(o.firstChild())do for(let l of wR(t,o.node,n))s.has(l.label)||(s.add(l.label),i.push(l));while(o.nextSibling());return D_.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(tie)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let l=t.sliceString(s.from,s.to);i.has(l)||(i.add(l),r.push({label:l,type:"variable"}))}}),r}}const kR=t=>e=>{let{state:n,pos:r}=e,i=ot(n).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:$m(),validFor:Ai};if(i.name=="ValueName")return{from:i.from,options:N_,validFor:Ai};if(i.name=="PseudoClassName")return{from:i.from,options:I_,validFor:Ai};if(t(i)||(e.explicit||s)&&eie(i,n.doc))return{from:t(i)||s?i.from:r,options:wR(n.doc,nie(i),t),validFor:Jre};if(i.name=="TagName"){for(let{parent:a}=i;a;a=a.parent)if(a.name=="Block")return{from:i.from,options:$m(),validFor:Ai};return{from:i.from,options:Gre,validFor:Ai}}if(i.name=="AtKeyword")return{from:i.from,options:Kre,validFor:Ai};if(!e.explicit)return null;let o=i.resolve(r),l=o.childBefore(r);return l&&l.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:I_,validFor:Ai}:l&&l.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:N_,validFor:Ai}:o.name=="Block"||o.name=="Styles"?{from:r,options:$m(),validFor:Ai}:null},CR=kR(t=>t.name=="VariableName"),mu=ia.define({name:"css",parser:Ure.configure({props:[Ra.add({Declaration:_h()}),La.add({"Block KeyframeList":lM})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function _R(){return new oa(mu,mu.data.of({autocomplete:CR}))}const rie=Object.freeze(Object.defineProperty({__proto__:null,css:_R,cssCompletionSource:CR,cssLanguage:mu,defineCSSCompletionSource:kR},Symbol.toStringTag,{value:"Module"})),iie=55,sie=1,oie=56,lie=2,aie=57,cie=3,V_=4,uie=5,Ib=6,TR=7,ER=8,PR=9,AR=10,fie=11,hie=12,die=13,Qm=58,pie=14,gie=15,F_=59,$R=21,mie=23,QR=24,Oie=25,y0=27,MR=28,xie=29,yie=32,bie=35,vie=37,Sie=38,wie=0,kie=1,Cie={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},_ie={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},B_={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Tie(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}let Z_=null,z_=null,X_=0;function b0(t,e){let n=t.pos+e;if(X_==n&&z_==t)return Z_;let r=t.peek(e),i="";for(;Tie(r);)i+=String.fromCharCode(r),r=t.peek(++e);return z_=t,X_=n,Z_=i?i.toLowerCase():r==Eie||r==Pie?void 0:null}const RR=60,Fd=62,Nb=47,Eie=63,Pie=33,Aie=45;function W_(t,e){this.name=t,this.parent=e}const $ie=[Ib,AR,TR,ER,PR],Qie=new xR({start:null,shift(t,e,n,r){return $ie.indexOf(e)>-1?new W_(b0(r,1)||"",t):t},reduce(t,e){return e==$R&&t?t.parent:t},reuse(t,e,n,r){let i=e.type.id;return i==Ib||i==vie?new W_(b0(r,1)||"",t):t},strict:!1}),Mie=new Jn((t,e)=>{if(t.next!=RR){t.next<0&&e.context&&t.acceptToken(Qm);return}t.advance();let n=t.next==Nb;n&&t.advance();let r=b0(t,0);if(r===void 0)return;if(!r)return t.acceptToken(n?gie:pie);let i=e.context?e.context.name:null;if(n){if(r==i)return t.acceptToken(fie);if(i&&_ie[i])return t.acceptToken(Qm,-2);if(e.dialectEnabled(wie))return t.acceptToken(hie);for(let s=e.context;s;s=s.parent)if(s.name==r)return;t.acceptToken(die)}else{if(r=="script")return t.acceptToken(TR);if(r=="style")return t.acceptToken(ER);if(r=="textarea")return t.acceptToken(PR);if(Cie.hasOwnProperty(r))return t.acceptToken(AR);i&&B_[i]&&B_[i][r]?t.acceptToken(Qm,-1):t.acceptToken(Ib)}},{contextual:!0}),Rie=new Jn(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(F_);break}if(t.next==Aie)e++;else if(t.next==Fd&&e>=2){n>=3&&t.acceptToken(F_,-2);break}else e=0;t.advance()}});function Lie(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const Iie=new Jn((t,e)=>{if(t.next==Nb&&t.peek(1)==Fd){let n=e.dialectEnabled(kie)||Lie(e.context);t.acceptToken(n?uie:V_,2)}else t.next==Fd&&t.acceptToken(V_,1)});function Db(t,e,n){let r=2+t.length;return new Jn(i=>{for(let s=0,o=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(e);break}if(s==0&&i.next==RR||s==1&&i.next==Nb||s>=2&&s<r&&i.next==t.charCodeAt(s-2))s++,o++;else if(s==r&&i.next==Fd){l>o?i.acceptToken(e,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const Nie=Db("script",iie,sie),Die=Db("style",oie,lie),Vie=Db("textarea",aie,cie),Fie=Ma({"Text RawText IncompleteTag IncompleteCloseTag":A.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":A.angleBracket,TagName:A.tagName,"MismatchedCloseTag/TagName":[A.tagName,A.invalid],AttributeName:A.attributeName,"AttributeValue UnquotedAttributeValue":A.attributeValue,Is:A.definitionOperator,"EntityReference CharacterReference":A.character,Comment:A.blockComment,ProcessingInst:A.processingInstruction,DoctypeDecl:A.documentMeta}),Bie=la.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+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R!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:Qie,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[Fie],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caP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,Mie,Rie,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function LR(t,e){let n=Object.create(null);for(let r of t.getChildren(QR)){let i=r.getChild(Oie),s=r.getChild(y0)||r.getChild(MR);i&&(n[e.read(i.from,i.to)]=s?s.type.id==y0?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return n}function j_(t,e){let n=t.getChild(mie);return n?e.read(n.from,n.to):" "}function Mm(t,e,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=LR(t.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function IR(t=[],e=[]){let n=[],r=[],i=[],s=[];for(let l of t)(l.tag=="script"?n:l.tag=="style"?r:l.tag=="textarea"?i:s).push(l);let o=e.length?Object.create(null):null;for(let l of e)(o[l.name]||(o[l.name]=[])).push(l);return eM((l,a)=>{let c=l.type.id;if(c==xie)return Mm(l,a,n);if(c==yie)return Mm(l,a,r);if(c==bie)return Mm(l,a,i);if(c==$R&&s.length){let u=l.node,f=u.firstChild,h=f&&j_(f,a),d;if(h){for(let p of s)if(p.tag==h&&(!p.attrs||p.attrs(d||(d=LR(f,a))))){let g=u.lastChild,O=g.type.id==Sie?g.from:u.to;if(O>f.to)return{parser:p.parser,overlay:[{from:f.to,to:O}]}}}}if(o&&c==QR){let u=l.node,f;if(f=u.firstChild){let h=o[a.read(f.from,f.to)];if(h)for(let d of h){if(d.tagName&&d.tagName!=j_(u.parent,a))continue;let p=u.lastChild;if(p.type.id==y0){let g=p.from+1,O=p.lastChild,x=p.to-(O&&O.isError?0:1);if(x>g)return{parser:d.parser,overlay:[{from:g,to:x}],bracketed:!0}}else if(p.type.id==MR)return{parser:d.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const Zie=316,zie=317,H_=1,Xie=2,Wie=3,jie=4,Hie=318,qie=320,Yie=321,Uie=5,Gie=6,Kie=0,v0=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],NR=125,Jie=59,S0=47,ese=42,tse=43,nse=45,rse=60,ise=44,sse=63,ose=46,lse=91,ase=new xR({start:!1,shift(t,e){return e==Uie||e==Gie||e==qie?t:e==Yie},strict:!1}),cse=new Jn((t,e)=>{let{next:n}=t;(n==NR||n==-1||e.context)&&t.acceptToken(Hie)},{contextual:!0,fallback:!0}),use=new Jn((t,e)=>{let{next:n}=t,r;v0.indexOf(n)>-1||n==S0&&((r=t.peek(1))==S0||r==ese)||n!=NR&&n!=Jie&&n!=-1&&!e.context&&t.acceptToken(Zie)},{contextual:!0}),fse=new Jn((t,e)=>{t.next==lse&&!e.context&&t.acceptToken(zie)},{contextual:!0}),hse=new Jn((t,e)=>{let{next:n}=t;if(n==tse||n==nse){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(H_);t.acceptToken(r?H_:Xie)}}else n==sse&&t.peek(1)==ose&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(Wie))},{contextual:!0});function Rm(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const dse=new Jn((t,e)=>{if(t.next!=rse||!e.dialectEnabled(Kie)||(t.advance(),t.next==S0))return;let n=0;for(;v0.indexOf(t.next)>-1;)t.advance(),n++;if(Rm(t.next,!0)){for(t.advance(),n++;Rm(t.next,!1);)t.advance(),n++;for(;v0.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==ise)return;for(let r=0;;r++){if(r==7){if(!Rm(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(jie,-n)}),pse=Ma({"get set async static":A.modifier,"for while do if else switch try catch finally return throw break continue default case defer":A.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":A.operatorKeyword,"let var const using function class extends":A.definitionKeyword,"import export from":A.moduleKeyword,"with debugger new":A.keyword,TemplateString:A.special(A.string),super:A.atom,BooleanLiteral:A.bool,this:A.self,null:A.null,Star:A.modifier,VariableName:A.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":A.function(A.variableName),VariableDefinition:A.definition(A.variableName),Label:A.labelName,PropertyName:A.propertyName,PrivatePropertyName:A.special(A.propertyName),"CallExpression/MemberExpression/PropertyName":A.function(A.propertyName),"FunctionDeclaration/VariableDefinition":A.function(A.definition(A.variableName)),"ClassDeclaration/VariableDefinition":A.definition(A.className),"NewExpression/VariableName":A.className,PropertyDefinition:A.definition(A.propertyName),PrivatePropertyDefinition:A.definition(A.special(A.propertyName)),UpdateOp:A.updateOperator,"LineComment Hashbang":A.lineComment,BlockComment:A.blockComment,Number:A.number,String:A.string,Escape:A.escape,ArithOp:A.arithmeticOperator,LogicOp:A.logicOperator,BitOp:A.bitwiseOperator,CompareOp:A.compareOperator,RegExp:A.regexp,Equals:A.definitionOperator,Arrow:A.function(A.punctuation),": Spread":A.punctuation,"( )":A.paren,"[ ]":A.squareBracket,"{ }":A.brace,"InterpolationStart InterpolationEnd":A.special(A.brace),".":A.derefOperator,", ;":A.separator,"@":A.meta,TypeName:A.typeName,TypeDefinition:A.definition(A.typeName),"type enum interface implements namespace module declare":A.definitionKeyword,"abstract global Privacy readonly override":A.modifier,"is keyof unique infer asserts":A.operatorKeyword,JSXAttributeValue:A.attributeValue,JSXText:A.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":A.angleBracket,"JSXIdentifier JSXNameSpacedName":A.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":A.attributeName,"JSXBuiltin/JSXIdentifier":A.standard(A.tagName)}),gse={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},mse={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},Ose={__proto__:null,"<":193},xse=la.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ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e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:ase,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[pse],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r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`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Vd("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>gse[t]||-1},{term:343,get:t=>mse[t]||-1},{term:95,get:t=>Ose[t]||-1}],tokenPrec:15201}),Vb=[Cn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Cn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Cn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Cn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Cn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Cn(`try {
142
+ \${}
143
+ } catch (\${error}) {
144
+ \${}
145
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),Cn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Cn(`if (\${}) {
146
+ \${}
147
+ } else {
148
+ \${}
149
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),Cn(`class \${name} {
150
+ constructor(\${params}) {
151
+ \${}
152
+ }
153
+ }`,{label:"class",detail:"definition",type:"keyword"}),Cn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Cn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],DR=Vb.concat([Cn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Cn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Cn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),q_=new J9,VR=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Ka(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const yse=["FunctionDeclaration"],bse={FunctionDeclaration:Ka("function"),ClassDeclaration:Ka("class"),ClassExpression:()=>!0,EnumDeclaration:Ka("constant"),TypeAliasDeclaration:Ka("type"),NamespaceDeclaration:Ka("namespace"),VariableDefinition(t,e){t.matchContext(yse)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function FR(t,e){let n=q_.get(e);if(n)return n;let r=[],i=!0;function s(o,l){let a=t.sliceString(o.from,o.to);r.push({label:a,type:l})}return e.cursor(et.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let l=bse[o.name];if(l&&l(o,s)||VR.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of FR(t,o.node))r.push(l);return!1}}),q_.set(e,r),r}const Bd=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Fb=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function BR(t){let e=ot(t.state).resolveInner(t.pos,-1);if(Fb.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Bd.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)VR.has(i.name)&&(r=r.concat(FR(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:Bd}}function Lm(t,e,n){var r;let i=[];for(;;){let s=e.firstChild,o;if((s==null?void 0:s.name)=="VariableName")return i.push(t(s)),{path:i.reverse(),name:n};if((s==null?void 0:s.name)=="MemberExpression"&&((r=o=s.lastChild)===null||r===void 0?void 0:r.name)=="PropertyName")i.push(t(o)),e=s;else return null}}function ZR(t){let e=r=>t.state.doc.sliceString(r.from,r.to),n=ot(t.state).resolveInner(t.pos,-1);return n.name=="PropertyName"?Lm(e,n.parent,e(n)):(n.name=="."||n.name=="?.")&&n.parent.name=="MemberExpression"?Lm(e,n.parent,""):Fb.indexOf(n.name)>-1?null:n.name=="VariableName"||n.to-n.from<20&&Bd.test(e(n))?{path:[],name:e(n)}:n.name=="MemberExpression"?Lm(e,n,""):t.explicit?{path:[],name:""}:null}function vse(t,e){let n=[],r=new Set;for(let i=0;;i++){for(let o of(Object.getOwnPropertyNames||Object.keys)(t)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(o)||r.has(o))continue;r.add(o);let l;try{l=t[o]}catch{continue}n.push({label:o,type:typeof l=="function"?/^[A-Z]/.test(o)?"class":e?"function":"method":e?"variable":"property",boost:-i})}let s=Object.getPrototypeOf(t);if(!s)return n;t=s}}function Sse(t){let e=new Map;return n=>{let r=ZR(n);if(!r)return null;let i=t;for(let o of r.path)if(i=i[o],!i)return null;let s=e.get(i);return s||e.set(i,s=vse(i,!r.path.length)),{from:n.pos-r.name.length,options:s,validFor:Bd}}}const ur=ia.define({name:"javascript",parser:xse.configure({props:[Ra.add({IfStatement:_h({except:/^\s*({|else\b)/}),TryStatement:_h({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:_ee,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:Cee({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":_h({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),La.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":lM,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),zR={test:t=>/^JSX/.test(t.name),facet:eg({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Bb=ur.configure({dialect:"ts"},"typescript"),Zb=ur.configure({dialect:"jsx",props:[xb.add(t=>t.isTop?[zR]:void 0)]}),zb=ur.configure({dialect:"jsx ts",props:[xb.add(t=>t.isTop?[zR]:void 0)]},"typescript");let XR=t=>({label:t,type:"keyword"});const WR="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(XR),wse=WR.concat(["declare","implements","private","protected","public"].map(XR));function jR(t={}){let e=t.jsx?t.typescript?zb:Zb:t.typescript?Bb:ur,n=t.typescript?DR.concat(wse):Vb.concat(WR);return new oa(e,[ur.data.of({autocomplete:ate(Fb,TM(n))}),ur.data.of({autocomplete:BR}),t.jsx?HR:[]])}function kse(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function Y_(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const Cse=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),HR=he.inputHandler.of((t,e,n,r,i)=>{if((Cse?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!ur.isActiveAt(t.state,e,-1))return!1;let s=i(),{state:o}=s,l=o.changeByRange(a=>{var c;let{head:u}=a,f=ot(o).resolveInner(u-1,-1),h;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(u-1,u)!=r||f.name=="JSXAttributeValue"&&f.to>u)){if(r==">"&&f.name=="JSXFragmentTag")return{range:a,changes:{from:u,insert:"</>"}};if(r=="/"&&f.name=="JSXStartCloseTag"){let d=f.parent,p=d.parent;if(p&&d.from==u-2&&((h=Y_(o.doc,p.firstChild,u))||((c=p.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let g=`${h}>`;return{range:H.cursor(u+g.length,-1),changes:{from:u,insert:g}}}}else if(r==">"){let d=kse(f);if(d&&d.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(h=Y_(o.doc,d,u)))return{range:a,changes:{from:u,insert:`</${h}>`}}}}return{range:a}});return l.changes.empty?!1:(t.dispatch([s,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function _se(t,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},t.getRules().forEach((n,r)=>{var i;!((i=n.meta.docs)===null||i===void 0)&&i.recommended&&(e.rules[r]=2)})),n=>{let{state:r}=n,i=[];for(let{from:s,to:o}of ur.findRegions(r)){let l=r.doc.lineAt(s),a={line:l.number-1,col:s-l.from,pos:s};for(let c of t.verify(r.sliceDoc(s,o),e))i.push(Tse(c,r.doc,a))}return i}}function U_(t,e,n,r){return n.line(t+r.line).from+e+(t==1?r.col-1:-1)}function Tse(t,e,n){let r=U_(t.line,t.column,e,n),i={from:r,to:t.endLine!=null&&t.endColumn!=1?U_(t.endLine,t.endColumn,e,n):r,message:t.message,source:t.ruleId?"eslint:"+t.ruleId:"eslint",severity:t.severity==1?"warning":"error"};if(t.fix){let{range:s,text:o}=t.fix,l=s[0]+n.pos-r,a=s[1]+n.pos-r;i.actions=[{name:"fix",apply(c,u){c.dispatch({changes:{from:u+l,to:u+a,insert:o},scrollIntoView:!0})}}]}return i}const Hf=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:HR,completionPath:ZR,esLint:_se,javascript:jR,javascriptLanguage:ur,jsxLanguage:Zb,localCompletionSource:BR,scopeCompletionSource:Sse,snippets:Vb,tsxLanguage:zb,typescriptLanguage:Bb,typescriptSnippets:DR},Symbol.toStringTag,{value:"Module"})),Ja=["_blank","_self","_top","_parent"],Im=["ascii","utf-8","utf-16","latin1","latin1"],Nm=["get","post","put","delete"],Dm=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Vn=["true","false"],_e={},Ese={a:{attrs:{href:null,ping:null,type:null,media:null,target:Ja,hreflang:null}},abbr:_e,address:_e,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:_e,aside:_e,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:_e,base:{attrs:{href:null,target:Ja}},bdi:_e,bdo:_e,blockquote:{attrs:{cite:null}},body:_e,br:_e,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Dm,formmethod:Nm,formnovalidate:["novalidate"],formtarget:Ja,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:_e,center:_e,cite:_e,code:_e,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:_e,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:_e,div:_e,dl:_e,dt:_e,em:_e,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:_e,figure:_e,footer:_e,form:{attrs:{action:null,name:null,"accept-charset":Im,autocomplete:["on","off"],enctype:Dm,method:Nm,novalidate:["novalidate"],target:Ja}},h1:_e,h2:_e,h3:_e,h4:_e,h5:_e,h6:_e,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:_e,hgroup:_e,hr:_e,html:{attrs:{manifest:null}},i:_e,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Dm,formmethod:Nm,formnovalidate:["novalidate"],formtarget:Ja,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:_e,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:_e,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:_e,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Im,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:_e,noscript:_e,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:_e,param:{attrs:{name:null,value:null}},pre:_e,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:_e,rt:_e,ruby:_e,samp:_e,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Im}},section:_e,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:_e,source:{attrs:{src:null,type:null,media:null}},span:_e,strong:_e,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:_e,summary:_e,sup:_e,table:_e,tbody:_e,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:_e,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:_e,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:_e,time:{attrs:{datetime:null}},title:_e,tr:_e,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:_e,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:_e},qR={accesskey:null,class:null,contenteditable:Vn,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Vn,autocorrect:Vn,autocapitalize:Vn,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Vn,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Vn,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Vn,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Vn,"aria-hidden":Vn,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Vn,"aria-multiselectable":Vn,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Vn,"aria-relevant":null,"aria-required":Vn,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},YR="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of YR)qR[t]=null;class Ou{constructor(e,n){this.tags={...Ese,...e},this.globalAttrs={...qR,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Ou.default=new Ou;function aa(t,e,n=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,n)):""}function ca(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function UR(t,e,n){let r=n.tags[aa(t,ca(e))];return(r==null?void 0:r.children)||n.allTags}function Xb(t,e){let n=[];for(let r=ca(e);r&&!r.type.isTop;r=ca(r.parent)){let i=aa(t,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&n.push(i)}return n}const GR=/^[:\-\.\w\u00b7-\uffff]*$/;function G_(t,e,n,r,i){let s=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",o=ca(n,n.name=="StartTag"||n.name=="TagName");return{from:r,to:i,options:UR(t.doc,o,e).map(l=>({label:l,type:"type"})).concat(Xb(t.doc,n).map((l,a)=>({label:"/"+l,apply:"/"+l+s,type:"type",boost:99-a}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function K_(t,e,n,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:Xb(t.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:GR}}function Pse(t,e,n,r){let i=[],s=0;for(let o of UR(t.doc,n,e))i.push({label:"<"+o,type:"type"});for(let o of Xb(t.doc,n))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Ase(t,e,n,r,i){let s=ca(n),o=s?e.tags[aa(t.doc,s)]:null,l=o&&o.attrs?Object.keys(o.attrs):[],a=o&&o.globalAttrs===!1?l:l.length?l.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:a.map(c=>({label:c,type:"property"})),validFor:GR}}function $se(t,e,n,r,i){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),l=[],a;if(o){let c=t.sliceDoc(o.from,o.to),u=e.globalAttrs[c];if(!u){let f=ca(n),h=f?e.tags[aa(t.doc,f)]:null;u=(h==null?void 0:h.attrs)&&h.attrs[c]}if(u){let f=t.sliceDoc(r,i).toLowerCase(),h='"',d='"';/^['"]/.test(f)?(a=f[0]=='"'?/^[^"]*$/:/^[^']*$/,h="",d=t.sliceDoc(i,i+1)==f[0]?"":f[0],f=f.slice(1),r++):a=/^[^\s<>='"]*$/;for(let p of u)l.push({label:p,apply:h+p+d,type:"constant"})}}return{from:r,to:i,options:l,validFor:a}}function KR(t,e){let{state:n,pos:r}=e,i=ot(n).resolveInner(r,-1),s=i.resolve(r);for(let o=r,l;s==i&&(l=i.childBefore(o));){let a=l.lastChild;if(!a||!a.type.isError||a.from<a.to)break;s=i=l,o=a.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?K_(n,i,i.from,r):G_(n,t,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?G_(n,t,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?K_(n,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?Ase(n,t,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?$se(n,t,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?Pse(n,t,i,r):null}function JR(t){return KR(Ou.default,t)}function e7(t){let{extraTags:e,extraGlobalAttributes:n}=t,r=n||e?new Ou(e,n):Ou.default;return i=>KR(r,i)}const Qse=ur.parser.configure({top:"SingleExpression"}),t7=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:Bb.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:Zb.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:zb.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:Qse},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:ur.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:mu.parser}],n7=[{name:"style",parser:mu.parser.configure({top:"Styles"})}].concat(YR.map(t=>({name:t,parser:ur.parser}))),r7=ia.define({name:"html",parser:Bie.configure({props:[Ra.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let r=t.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),La.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),bM.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Ac=r7.configure({wrap:IR(t7,n7)});function i7(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=IR((t.nestedLanguages||[]).concat(t7),(t.nestedAttributes||[]).concat(n7)));let r=n?r7.configure({wrap:n,dialect:e}):e?Ac.configure({dialect:e}):Ac;return new oa(r,[Ac.data.of({autocomplete:e7(t)}),t.autoCloseTags!==!1?s7:[],jR().support,_R().support])}const J_=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),s7=he.inputHandler.of((t,e,n,r,i)=>{if(t.composing||t.state.readOnly||e!=n||r!=">"&&r!="/"||!Ac.isActiveAt(t.state,e,-1))return!1;let s=i(),{state:o}=s,l=o.changeByRange(a=>{var c,u,f;let h=o.doc.sliceString(a.from-1,a.to)==r,{head:d}=a,p=ot(o).resolveInner(d,-1),g;if(h&&r==">"&&p.name=="EndTag"){let O=p.parent;if(((u=(c=O.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(g=aa(o.doc,O.parent,d))&&!J_.has(g)){let x=d+(o.doc.sliceString(d,d+1)===">"?1:0),m=`</${g}>`;return{range:a,changes:{from:d,to:x,insert:m}}}}else if(h&&r=="/"&&p.name=="IncompleteCloseTag"){let O=p.parent;if(p.from==d-2&&((f=O.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(g=aa(o.doc,O,d))&&!J_.has(g)){let x=d+(o.doc.sliceString(d,d+1)===">"?1:0),m=`${g}>`;return{range:H.cursor(d+m.length,-1),changes:{from:d,to:x,insert:m}}}}return{range:a}});return l.changes.empty?!1:(t.dispatch([s,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Mse=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:s7,html:i7,htmlCompletionSource:JR,htmlCompletionSourceWith:e7,htmlLanguage:Ac},Symbol.toStringTag,{value:"Module"}));function Rse(t,e,n,r){const i=hi(bt),s=Hn(t3),o=k.useRef(null),{lexicalNode:l}=T1(),a=k.useRef(!1),c=k.useRef(!1),u=k.useCallback(()=>{s({editorType:e,rootNode:l,editorRef:o.current})},[e,l,s]),f=k.useCallback(h=>{var d,p,g,O,x,m;if(h.key==="ArrowDown"){const y=(p=(d=o.current)==null?void 0:d.getCodemirror())==null?void 0:p.state;if(y){const b=y.doc.length,S=y.selection.ranges[0].to;b===S&&(a.current?(i==null||i.update(()=>{var v,w;const _=ci(t);_.getNextSibling()?((w=(v=o.current)==null?void 0:v.getCodemirror())==null||w.contentDOM.blur(),_.selectNext()):_.insertAfter(St())}),a.current=!1):a.current=!0)}}else if(h.key==="ArrowUp"){const y=(O=(g=o.current)==null?void 0:g.getCodemirror())==null?void 0:O.state;y&&y.selection.ranges[0].from===0&&(c.current?(i==null||i.update(()=>{var S,v;const w=ci(t);w.getPreviousSibling()&&((v=(S=o.current)==null?void 0:S.getCodemirror())==null||v.contentDOM.blur(),w.selectPrevious())}),c.current=!1):c.current=!0)}else if(h.key==="Enter")h.stopPropagation();else if(h.key==="Backspace"||h.key==="Delete"){const y=(m=(x=o.current)==null?void 0:x.getCodemirror())==null?void 0:m.state;(y==null?void 0:y.doc.length)===0&&(i==null||i.update(()=>{ci(t).remove()}))}},[i,t]);return k.useEffect(()=>{const h=o.current;return setTimeout(()=>{var d,p;(d=h==null?void 0:h.getCodemirror())==null||d.contentDOM.addEventListener("focus",u),(p=h==null?void 0:h.getCodemirror())==null||p.contentDOM.addEventListener("keydown",f)},300),()=>{var d,p;(d=h==null?void 0:h.getCodemirror())==null||d.contentDOM.removeEventListener("focus",u),(p=h==null?void 0:h.getCodemirror())==null||p.contentDOM.removeEventListener("keydown",f)}},[o,u,f,n]),k.useEffect(()=>{r.subscribe(()=>{var h,d;(d=(h=o.current)==null?void 0:h.getCodemirror())==null||d.focus(),u()})},[r,o,t,u]),o}function G(t){return new oa(vb.define(t))}function Ss(t){return W(()=>import("./index-Ce_rFd0H.js"),__vite__mapDeps([0,1,2])).then(e=>e.sql({dialect:e[t]}))}const Lse=[z.of({name:"C",extensions:["c","h","ino"],load(){return W(()=>import("./index-BZnHexpx.js"),__vite__mapDeps([3,1,2])).then(t=>t.cpp())}}),z.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return W(()=>import("./index-BZnHexpx.js"),__vite__mapDeps([3,1,2])).then(t=>t.cpp())}}),z.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Ss("Cassandra")}}),z.of({name:"CSS",extensions:["css"],load(){return W(()=>Promise.resolve().then(()=>rie),void 0).then(t=>t.css())}}),z.of({name:"Go",extensions:["go"],load(){return W(()=>import("./index-D5wnSweq.js"),__vite__mapDeps([4,1,2])).then(t=>t.go())}}),z.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return W(()=>Promise.resolve().then(()=>Mse),void 0).then(t=>t.html())}}),z.of({name:"Java",extensions:["java"],load(){return W(()=>import("./index-BiQcZBBL.js"),__vite__mapDeps([5,1,2])).then(t=>t.java())}}),z.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return W(()=>Promise.resolve().then(()=>Hf),void 0).then(t=>t.javascript())}}),z.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return W(()=>import("./index-BSW5JwaH.js"),__vite__mapDeps([6,1,2])).then(t=>t.jinja())}}),z.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return W(()=>import("./index-DbELJA96.js"),__vite__mapDeps([7,1,2])).then(t=>t.json())}}),z.of({name:"JSX",extensions:["jsx"],load(){return W(()=>Promise.resolve().then(()=>Hf),void 0).then(t=>t.javascript({jsx:!0}))}}),z.of({name:"LESS",extensions:["less"],load(){return W(()=>import("./index-vmBmu2hn.js"),__vite__mapDeps([8,1,2])).then(t=>t.less())}}),z.of({name:"Liquid",extensions:["liquid"],load(){return W(()=>import("./index-BpFmY7hp.js"),__vite__mapDeps([9,1,2])).then(t=>t.liquid())}}),z.of({name:"MariaDB SQL",load(){return Ss("MariaSQL")}}),z.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return W(()=>Promise.resolve().then(()=>Tle),void 0).then(t=>t.markdown())}}),z.of({name:"MS SQL",load(){return Ss("MSSQL")}}),z.of({name:"MySQL",load(){return Ss("MySQL")}}),z.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return W(()=>import("./index-C8TA_OLZ.js"),__vite__mapDeps([10,1,2])).then(t=>t.php())}}),z.of({name:"PLSQL",extensions:["pls"],load(){return Ss("PLSQL")}}),z.of({name:"PostgreSQL",load(){return Ss("PostgreSQL")}}),z.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return W(()=>import("./index-B7hacZaa.js"),__vite__mapDeps([11,1,2])).then(t=>t.python())}}),z.of({name:"Rust",extensions:["rs"],load(){return W(()=>import("./index-kLee7BdF.js"),__vite__mapDeps([12,1,2])).then(t=>t.rust())}}),z.of({name:"Sass",extensions:["sass"],load(){return W(()=>import("./index-1uTJjl8a.js"),__vite__mapDeps([13,1,2])).then(t=>t.sass({indented:!0}))}}),z.of({name:"SCSS",extensions:["scss"],load(){return W(()=>import("./index-1uTJjl8a.js"),__vite__mapDeps([13,1,2])).then(t=>t.sass())}}),z.of({name:"SQL",extensions:["sql"],load(){return Ss("StandardSQL")}}),z.of({name:"SQLite",load(){return Ss("SQLite")}}),z.of({name:"TSX",extensions:["tsx"],load(){return W(()=>Promise.resolve().then(()=>Hf),void 0).then(t=>t.javascript({jsx:!0,typescript:!0}))}}),z.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return W(()=>Promise.resolve().then(()=>Hf),void 0).then(t=>t.javascript({typescript:!0}))}}),z.of({name:"WebAssembly",extensions:["wat","wast"],load(){return W(()=>import("./index-CMWIT5Av.js"),__vite__mapDeps([14,1,2])).then(t=>t.wast())}}),z.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return W(()=>import("./index-Cq0h5Zql.js"),__vite__mapDeps([15,1,2])).then(t=>t.xml())}}),z.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return W(()=>import("./index-IzLA2Fcd.js"),__vite__mapDeps([16,1,2])).then(t=>t.yaml())}}),z.of({name:"APL",extensions:["dyalog","apl"],load(){return W(()=>import("./apl-B4CMkyY2.js"),[]).then(t=>G(t.apl))}}),z.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return W(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(t=>G(t.asciiArmor))}}),z.of({name:"ASN.1",extensions:["asn","asn1"],load(){return W(()=>import("./asn1-EdZsLKOL.js"),[]).then(t=>G(t.asn1({})))}}),z.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return W(()=>import("./asterisk-B-8jnY81.js"),[]).then(t=>G(t.asterisk))}}),z.of({name:"Brainfuck",extensions:["b","bf"],load(){return W(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(t=>G(t.brainfuck))}}),z.of({name:"Cobol",extensions:["cob","cpy"],load(){return W(()=>import("./cobol-CWcv1MsR.js"),[]).then(t=>G(t.cobol))}}),z.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return W(()=>import("./clike-B9uivgTg.js"),[]).then(t=>G(t.csharp))}}),z.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return W(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>G(t.clojure))}}),z.of({name:"ClojureScript",extensions:["cljs"],load(){return W(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>G(t.clojure))}}),z.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return W(()=>import("./css-BnMrqG3P.js"),[]).then(t=>G(t.gss))}}),z.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return W(()=>import("./cmake-BQqOBYOt.js"),[]).then(t=>G(t.cmake))}}),z.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return W(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(t=>G(t.coffeeScript))}}),z.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return W(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(t=>G(t.commonLisp))}}),z.of({name:"Cypher",extensions:["cyp","cypher"],load(){return W(()=>import("./cypher-C_CwsFkJ.js"),[]).then(t=>G(t.cypher))}}),z.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return W(()=>import("./python-BuPzkPfP.js"),[]).then(t=>G(t.cython))}}),z.of({name:"Crystal",extensions:["cr"],load(){return W(()=>import("./crystal-SjHAIU92.js"),[]).then(t=>G(t.crystal))}}),z.of({name:"D",extensions:["d"],load(){return W(()=>import("./d-pRatUO7H.js"),[]).then(t=>G(t.d))}}),z.of({name:"Dart",extensions:["dart"],load(){return W(()=>import("./clike-B9uivgTg.js"),[]).then(t=>G(t.dart))}}),z.of({name:"diff",extensions:["diff","patch"],load(){return W(()=>import("./diff-DbItnlRl.js"),[]).then(t=>G(t.diff))}}),z.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return W(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([17,18])).then(t=>G(t.dockerFile))}}),z.of({name:"DTD",extensions:["dtd"],load(){return W(()=>import("./dtd-DF_7sFjM.js"),[]).then(t=>G(t.dtd))}}),z.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return W(()=>import("./dylan-DwRh75JA.js"),[]).then(t=>G(t.dylan))}}),z.of({name:"EBNF",load(){return W(()=>import("./ebnf-CDyGwa7X.js"),[]).then(t=>G(t.ebnf))}}),z.of({name:"ECL",extensions:["ecl"],load(){return W(()=>import("./ecl-Cabwm37j.js"),[]).then(t=>G(t.ecl))}}),z.of({name:"edn",extensions:["edn"],load(){return W(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>G(t.clojure))}}),z.of({name:"Eiffel",extensions:["e"],load(){return W(()=>import("./eiffel-CnydiIhH.js"),[]).then(t=>G(t.eiffel))}}),z.of({name:"Elm",extensions:["elm"],load(){return W(()=>import("./elm-vLlmbW-K.js"),[]).then(t=>G(t.elm))}}),z.of({name:"Erlang",extensions:["erl"],load(){return W(()=>import("./erlang-BNw1qcRV.js"),[]).then(t=>G(t.erlang))}}),z.of({name:"Esper",load(){return W(()=>import("./sql-D0XecflT.js"),[]).then(t=>G(t.esper))}}),z.of({name:"Factor",extensions:["factor"],load(){return W(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([19,18])).then(t=>G(t.factor))}}),z.of({name:"FCL",load(){return W(()=>import("./fcl-Kvtd6kyn.js"),[]).then(t=>G(t.fcl))}}),z.of({name:"Forth",extensions:["forth","fth","4th"],load(){return W(()=>import("./forth-Ffai-XNe.js"),[]).then(t=>G(t.forth))}}),z.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return W(()=>import("./fortran-DYz_wnZ1.js"),[]).then(t=>G(t.fortran))}}),z.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return W(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>G(t.fSharp))}}),z.of({name:"Gas",extensions:["s"],load(){return W(()=>import("./gas-Bneqetm1.js"),[]).then(t=>G(t.gas))}}),z.of({name:"Gherkin",extensions:["feature"],load(){return W(()=>import("./gherkin-heZmZLOM.js"),[]).then(t=>G(t.gherkin))}}),z.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return W(()=>import("./groovy-D9Dt4D0W.js"),[]).then(t=>G(t.groovy))}}),z.of({name:"Haskell",extensions:["hs"],load(){return W(()=>import("./haskell-Cw1EW3IL.js"),[]).then(t=>G(t.haskell))}}),z.of({name:"Haxe",extensions:["hx"],load(){return W(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>G(t.haxe))}}),z.of({name:"HXML",extensions:["hxml"],load(){return W(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>G(t.hxml))}}),z.of({name:"HTTP",load(){return W(()=>import("./http-DBlCnlav.js"),[]).then(t=>G(t.http))}}),z.of({name:"IDL",extensions:["pro"],load(){return W(()=>import("./idl-BEugSyMb.js"),[]).then(t=>G(t.idl))}}),z.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return W(()=>import("./javascript-iXu5QeM3.js"),[]).then(t=>G(t.jsonld))}}),z.of({name:"Julia",extensions:["jl"],load(){return W(()=>import("./julia-DuME0IfC.js"),[]).then(t=>G(t.julia))}}),z.of({name:"Kotlin",extensions:["kt","kts"],load(){return W(()=>import("./clike-B9uivgTg.js"),[]).then(t=>G(t.kotlin))}}),z.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return W(()=>import("./livescript-BwQOo05w.js"),[]).then(t=>G(t.liveScript))}}),z.of({name:"Lua",extensions:["lua"],load(){return W(()=>import("./lua-BgMRiT3U.js"),[]).then(t=>G(t.lua))}}),z.of({name:"mIRC",extensions:["mrc"],load(){return W(()=>import("./mirc-CjQqDB4T.js"),[]).then(t=>G(t.mirc))}}),z.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return W(()=>import("./mathematica-DTrFuWx2.js"),[]).then(t=>G(t.mathematica))}}),z.of({name:"Modelica",extensions:["mo"],load(){return W(()=>import("./modelica-Dc1JOy9r.js"),[]).then(t=>G(t.modelica))}}),z.of({name:"MUMPS",extensions:["mps"],load(){return W(()=>import("./mumps-BT43cFF4.js"),[]).then(t=>G(t.mumps))}}),z.of({name:"Mbox",extensions:["mbox"],load(){return W(()=>import("./mbox-CNhZ1qSd.js"),[]).then(t=>G(t.mbox))}}),z.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return W(()=>import("./nginx-DdIZxoE0.js"),[]).then(t=>G(t.nginx))}}),z.of({name:"NSIS",extensions:["nsh","nsi"],load(){return W(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([20,18])).then(t=>G(t.nsis))}}),z.of({name:"NTriples",extensions:["nt","nq"],load(){return W(()=>import("./ntriples-BfvgReVJ.js"),[]).then(t=>G(t.ntriples))}}),z.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return W(()=>import("./clike-B9uivgTg.js"),[]).then(t=>G(t.objectiveC))}}),z.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return W(()=>import("./clike-B9uivgTg.js"),[]).then(t=>G(t.objectiveCpp))}}),z.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return W(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>G(t.oCaml))}}),z.of({name:"Octave",extensions:["m"],load(){return W(()=>import("./octave-Ck1zUtKM.js"),[]).then(t=>G(t.octave))}}),z.of({name:"Oz",extensions:["oz"],load(){return W(()=>import("./oz-BzwKVEFT.js"),[]).then(t=>G(t.oz))}}),z.of({name:"Pascal",extensions:["p","pas"],load(){return W(()=>import("./pascal--L3eBynH.js"),[]).then(t=>G(t.pascal))}}),z.of({name:"Perl",extensions:["pl","pm"],load(){return W(()=>import("./perl-CdXCOZ3F.js"),[]).then(t=>G(t.perl))}}),z.of({name:"Pig",extensions:["pig"],load(){return W(()=>import("./pig-CevX1Tat.js"),[]).then(t=>G(t.pig))}}),z.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return W(()=>import("./powershell-CFHJl5sT.js"),[]).then(t=>G(t.powerShell))}}),z.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return W(()=>import("./properties-C78fOPTZ.js"),[]).then(t=>G(t.properties))}}),z.of({name:"ProtoBuf",extensions:["proto"],load(){return W(()=>import("./protobuf-ChK-085T.js"),[]).then(t=>G(t.protobuf))}}),z.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return W(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([21,22])).then(t=>G(t.pug))}}),z.of({name:"Puppet",extensions:["pp"],load(){return W(()=>import("./puppet-DMA9R1ak.js"),[]).then(t=>G(t.puppet))}}),z.of({name:"Q",extensions:["q"],load(){return W(()=>import("./q-pXgVlZs6.js"),[]).then(t=>G(t.q))}}),z.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return W(()=>import("./r-B6wPVr8A.js"),[]).then(t=>G(t.r))}}),z.of({name:"RPM Changes",load(){return W(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>G(t.rpmChanges))}}),z.of({name:"RPM Spec",extensions:["spec"],load(){return W(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>G(t.rpmSpec))}}),z.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return W(()=>import("./ruby-B2Rjki9n.js"),[]).then(t=>G(t.ruby))}}),z.of({name:"SAS",extensions:["sas"],load(){return W(()=>import("./sas-B4kiWyti.js"),[]).then(t=>G(t.sas))}}),z.of({name:"Scala",extensions:["scala"],load(){return W(()=>import("./clike-B9uivgTg.js"),[]).then(t=>G(t.scala))}}),z.of({name:"Scheme",extensions:["scm","ss"],load(){return W(()=>import("./scheme-C41bIUwD.js"),[]).then(t=>G(t.scheme))}}),z.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return W(()=>import("./shell-CjFT_Tl9.js"),[]).then(t=>G(t.shell))}}),z.of({name:"Sieve",extensions:["siv","sieve"],load(){return W(()=>import("./sieve-C3Gn_uJK.js"),[]).then(t=>G(t.sieve))}}),z.of({name:"Smalltalk",extensions:["st"],load(){return W(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(t=>G(t.smalltalk))}}),z.of({name:"Solr",load(){return W(()=>import("./solr-DehyRSwq.js"),[]).then(t=>G(t.solr))}}),z.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return W(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>G(t.sml))}}),z.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return W(()=>import("./sparql-DkYu6x3z.js"),[]).then(t=>G(t.sparql))}}),z.of({name:"Spreadsheet",alias:["excel","formula"],load(){return W(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(t=>G(t.spreadsheet))}}),z.of({name:"Squirrel",extensions:["nut"],load(){return W(()=>import("./clike-B9uivgTg.js"),[]).then(t=>G(t.squirrel))}}),z.of({name:"Stylus",extensions:["styl"],load(){return W(()=>import("./stylus-B533Al4x.js"),[]).then(t=>G(t.stylus))}}),z.of({name:"Swift",extensions:["swift"],load(){return W(()=>import("./swift-BzpIVaGY.js"),[]).then(t=>G(t.swift))}}),z.of({name:"sTeX",load(){return W(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>G(t.stex))}}),z.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return W(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>G(t.stex))}}),z.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return W(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>G(t.verilog))}}),z.of({name:"Tcl",extensions:["tcl"],load(){return W(()=>import("./tcl-DVfN8rqt.js"),[]).then(t=>G(t.tcl))}}),z.of({name:"Textile",extensions:["textile"],load(){return W(()=>import("./textile-CnDTJFAw.js"),[]).then(t=>G(t.textile))}}),z.of({name:"TiddlyWiki",load(){return W(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(t=>G(t.tiddlyWiki))}}),z.of({name:"Tiki wiki",load(){return W(()=>import("./tiki-DGYXhP31.js"),[]).then(t=>G(t.tiki))}}),z.of({name:"TOML",extensions:["toml"],load(){return W(()=>import("./toml-Bm5Em-hy.js"),[]).then(t=>G(t.toml))}}),z.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return W(()=>import("./troff-wAsdV37c.js"),[]).then(t=>G(t.troff))}}),z.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return W(()=>import("./ttcn-CfJYG6tj.js"),[]).then(t=>G(t.ttcn))}}),z.of({name:"TTCN_CFG",extensions:["cfg"],load(){return W(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(t=>G(t.ttcnCfg))}}),z.of({name:"Turtle",extensions:["ttl"],load(){return W(()=>import("./turtle-B1tBg_DP.js"),[]).then(t=>G(t.turtle))}}),z.of({name:"Web IDL",extensions:["webidl"],load(){return W(()=>import("./webidl-ZXfAyPTL.js"),[]).then(t=>G(t.webIDL))}}),z.of({name:"VB.NET",extensions:["vb"],load(){return W(()=>import("./vb-CmGdzxic.js"),[]).then(t=>G(t.vb))}}),z.of({name:"VBScript",extensions:["vbs"],load(){return W(()=>import("./vbscript-BuJXcnF6.js"),[]).then(t=>G(t.vbScript))}}),z.of({name:"Velocity",extensions:["vtl"],load(){return W(()=>import("./velocity-D8B20fx6.js"),[]).then(t=>G(t.velocity))}}),z.of({name:"Verilog",extensions:["v"],load(){return W(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>G(t.verilog))}}),z.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return W(()=>import("./vhdl-lSbBsy5d.js"),[]).then(t=>G(t.vhdl))}}),z.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return W(()=>import("./xquery-DzFWVndE.js"),[]).then(t=>G(t.xQuery))}}),z.of({name:"Yacas",extensions:["ys"],load(){return W(()=>import("./yacas-BJ4BC0dw.js"),[]).then(t=>G(t.yacas))}}),z.of({name:"Z80",extensions:["z80"],load(){return W(()=>import("./z80-Hz9HOZM7.js"),[]).then(t=>G(t.z80))}}),z.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return W(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>G(t.mscgen))}}),z.of({name:"Xù",extensions:["xu"],load(){return W(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>G(t.xu))}}),z.of({name:"MsGenny",extensions:["msgenny"],load(){return W(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>G(t.msgenny))}}),z.of({name:"Vue",extensions:["vue"],load(){return W(()=>import("./index-CVMKjtie.js"),__vite__mapDeps([23,1,2])).then(t=>t.vue())}}),z.of({name:"Angular Template",load(){return W(()=>import("./index-DRpI4zkj.js"),__vite__mapDeps([24,1,2])).then(t=>t.angular())}})],e2="#2e3440",Wb="#3b4252",t2="#434c5e",qf="#4c566a",n2="#e5e9f0",w0="#eceff4",Vm="#8fbcbb",r2="#88c0d0",Ise="#81a1c1",yr="#5e81ac",Nse="#bf616a",dl="#d08770",Fm="#ebcb8b",i2="#a3be8c",Dse="#b48ead",s2="#d30102",jb=w0,Bm=jb,Vse="#ffffff",Zm=Wb,Fse=jb,o2=Wb,Bse=he.theme({"&":{color:e2,backgroundColor:Vse},".cm-content":{caretColor:o2},".cm-cursor, .cm-dropCursor":{borderLeftColor:o2},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Fse},".cm-panels":{backgroundColor:jb,color:qf},".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 ${qf}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:n2},".cm-activeLine":{backgroundColor:Bm},".cm-selectionMatch":{backgroundColor:n2},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{outline:`1px solid ${qf}`},"&.cm-focused .cm-matchingBracket":{backgroundColor:w0},".cm-gutters":{backgroundColor:w0,color:e2,border:"none"},".cm-activeLineGutter":{backgroundColor:Bm},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Zm},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Zm,borderBottomColor:Zm},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Bm,color:qf}}},{dark:!1}),Zse=Ku.define([{tag:A.keyword,color:yr},{tag:[A.name,A.deleted,A.character,A.propertyName,A.macroName],color:dl},{tag:[A.variableName],color:dl},{tag:[A.function(A.variableName)],color:yr},{tag:[A.labelName],color:Ise},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:yr},{tag:[A.definition(A.name),A.separator],color:i2},{tag:[A.brace],color:Vm},{tag:[A.annotation],color:s2},{tag:[A.number,A.changed,A.annotation,A.modifier,A.self,A.namespace],color:r2},{tag:[A.typeName,A.className],color:Fm},{tag:[A.operator,A.operatorKeyword],color:i2},{tag:[A.tagName],color:Dse},{tag:[A.squareBracket],color:Nse},{tag:[A.angleBracket],color:dl},{tag:[A.attributeName],color:Fm},{tag:[A.regexp],color:yr},{tag:[A.quote],color:Wb},{tag:[A.string],color:dl},{tag:A.link,color:Vm,textDecoration:"underline",textUnderlinePosition:"under"},{tag:[A.url,A.escape,A.special(A.string)],color:dl},{tag:[A.meta],color:r2},{tag:[A.comment],color:t2,fontStyle:"italic"},{tag:A.strong,fontWeight:"bold",color:yr},{tag:A.emphasis,fontStyle:"italic",color:yr},{tag:A.strikethrough,textDecoration:"line-through"},{tag:A.heading,fontWeight:"bold",color:yr},{tag:A.special(A.heading1),fontWeight:"bold",color:yr},{tag:A.heading1,fontWeight:"bold",color:yr},{tag:[A.heading2,A.heading3,A.heading4],fontWeight:"bold",color:yr},{tag:[A.heading5,A.heading6],color:yr},{tag:[A.atom,A.bool,A.special(A.variableName)],color:dl},{tag:[A.processingInstruction,A.inserted],color:Vm},{tag:[A.contentSeparator],color:Fm},{tag:A.invalid,color:t2,borderBottom:`1px dotted ${s2}`}]),zse=[Bse,mM(Zse)],l2=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class ua{constructor(e,n,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?l=>s(l2(l)):l2,this.query=this.normalize(n)}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 En(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 n=Uy(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=ei(e);let i=this.normalize(n);if(i.length)for(let s=0,o=r;;s++){let l=i.charCodeAt(s),a=this.match(l,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(a)return this.value=a,this;break}o==r&&s<n.length&&n.charCodeAt(s)==l&&o++}}}match(e,n,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],l=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,l=!0)),l||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(ua.prototype[Symbol.iterator]=function(){return this});const o7={from:-1,to:-1,match:/.*/.exec("")},Hb="gm"+(/x/.unicode==null?"":"u");class l7{constructor(e,n,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=o7,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new a7(e,n,r,i,s);this.re=new RegExp(n,Hb+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=Zd(e,i),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 n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=Zd(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},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}}}const zm=new WeakMap;class Fl{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=zm.get(e);if(!i||i.from>=r||i.to<=n){let l=new Fl(n,e.sliceString(n,r));return zm.set(e,l),l}if(i.from==n&&i.to==r)return i;let{text:s,from:o}=i;return o>n&&(s=e.sliceString(n,o)+s,o=n),i.to<r&&(s+=e.sliceString(i.to,r)),zm.set(e,new Fl(o,s)),new Fl(n,s.slice(n-o,r-o))}}class a7{constructor(e,n,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=o7,this.matchPos=Zd(e,i),this.re=new RegExp(n,Hb+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=Fl.get(e,i,this.chunkEnd(i+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,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=Zd(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Fl.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(l7.prototype[Symbol.iterator]=a7.prototype[Symbol.iterator]=function(){return this});function Xse(t){try{return new RegExp(t,Hb),!0}catch{return!1}}function Zd(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}const Wse=t=>{let{state:e}=t,n=String(e.doc.lineAt(t.state.selection.main.head).number),{close:r,result:i}=LJ(t,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:e.phrase("go")});return i.then(s=>{let o=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!o){t.dispatch({effects:r});return}let l=e.doc.lineAt(e.selection.main.head),[,a,c,u,f]=o,h=u?+u.slice(1):0,d=c?+c:l.number;if(c&&f){let O=d/100;a&&(O=O*(a=="-"?-1:1)+l.number/e.doc.lines),d=Math.round(e.doc.lines*O)}else c&&a&&(d=d*(a=="-"?-1:1)+l.number);let p=e.doc.line(Math.max(1,Math.min(e.doc.lines,d))),g=H.cursor(p.from+Math.max(0,Math.min(h,p.length)));t.dispatch({effects:[r,he.scrollIntoView(g.from,{y:"center"})],selection:g})}),!0},jse={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Hse=ge.define({combine(t){return vi(t,jse,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function qse(t){return[Jse,Kse]}const Yse=Pe.mark({class:"cm-selectionMatch"}),Use=Pe.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function a2(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=vt.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=vt.Word)}function Gse(t,e,n,r){return t(e.sliceDoc(n,n+1))==vt.Word&&t(e.sliceDoc(r-1,r))==vt.Word}const Kse=It.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Hse),{state:n}=t,r=n.selection;if(r.ranges.length>1)return Pe.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return Pe.none;let a=n.wordAt(i.head);if(!a)return Pe.none;o=n.charCategorizer(i.head),s=n.sliceDoc(a.from,a.to)}else{let a=i.to-i.from;if(a<e.minSelectionLength||a>200)return Pe.none;if(e.wholeWords){if(s=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(a2(o,n,i.from,i.to)&&Gse(o,n,i.from,i.to)))return Pe.none}else if(s=n.sliceDoc(i.from,i.to),!s)return Pe.none}let l=[];for(let a of t.visibleRanges){let c=new ua(n.doc,s,a.from,a.to);for(;!c.next().done;){let{from:u,to:f}=c.value;if((!o||a2(o,n,u,f))&&(i.empty&&u<=i.from&&f>=i.to?l.push(Use.range(u,f)):(u>=i.to||f<=i.from)&&l.push(Yse.range(u,f)),l.length>e.maxMatches))return Pe.none}}return Pe.set(l)}},{decorations:t=>t.decorations}),Jse=he.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),eoe=({state:t,dispatch:e})=>{let{selection:n}=t,r=H.create(n.ranges.map(i=>t.wordAt(i.head)||H.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function toe(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),s=i&&i.from==n.from&&i.to==n.to;for(let o=!1,l=new ua(t.doc,e,r[r.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new ua(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(a=>a.from==l.value.from))continue;if(s){let a=t.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const noe=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return eoe({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=r))return!1;let i=toe(t,r);return i?(e(t.update({selection:t.selection.addRange(H.range(i.from,i.to),!1),effects:he.scrollIntoView(i.to)})),!0):!1},Da=ge.define({combine(t){return vi(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new moe(e),scrollToMatch:e=>he.scrollIntoView(e)})}});class c7{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||Xse(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,(n,r)=>r=="n"?`
154
+ `:r=="r"?"\r":r=="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 aoe(this):new soe(this)}getCursor(e,n=0,r){let i=e.doc?e:je.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?yl(this,i,n,r):xl(this,i,n,r)}}class u7{constructor(e){this.spec=e}}function roe(t,e,n){return(r,i,s,o)=>{if(n&&!n(r,i,s,o))return!1;let l=r>=o&&i<=o+s.length?s.slice(r-o,i-o):e.doc.sliceString(r,i);return t(l,e,r,i)}}function xl(t,e,n,r){let i;return t.wholeWord&&(i=ioe(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(i=roe(t.test,e,i)),new ua(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:s=>s.toLowerCase(),i)}function ioe(t,e){return(n,r,i,s)=>((s>n||s+i.length<r)&&(s=Math.max(0,n-2),i=t.sliceString(s,Math.min(t.length,r+2))),(e(zd(i,n-s))!=vt.Word||e(Xd(i,n-s))!=vt.Word)&&(e(Xd(i,r-s))!=vt.Word||e(zd(i,r-s))!=vt.Word))}class soe extends u7{constructor(e){super(e)}nextMatch(e,n,r){let i=xl(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,n+this.spec.unquoted.length);i=xl(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let s=Math.max(n,i-1e4-this.spec.unquoted.length),o=xl(this.spec,e,s,i),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(s==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=xl(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=xl(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function ooe(t,e,n){return(r,i,s)=>(!n||n(r,i,s))&&t(s[0],e,r,i)}function yl(t,e,n,r){let i;return t.wholeWord&&(i=loe(e.charCategorizer(e.selection.main.head))),t.test&&(i=ooe(t.test,e,i)),new l7(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:i},n,r)}function zd(t,e){return t.slice(qt(t,e,!1),e)}function Xd(t,e){return t.slice(e,qt(t,e))}function loe(t){return(e,n,r)=>!r[0].length||(t(zd(r.input,r.index))!=vt.Word||t(Xd(r.input,r.index))!=vt.Word)&&(t(Xd(r.input,r.index+r[0].length))!=vt.Word||t(zd(r.input,r.index+r[0].length))!=vt.Word)}class aoe extends u7{nextMatch(e,n,r){let i=yl(this.spec,e,r,e.doc.length).next();return i.done&&(i=yl(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let s=Math.max(n,r-i*1e4),o=yl(this.spec,e,s,r),l=null;for(;!o.next().done;)l=o.value;if(l&&(s==n||l.from>s+10))return l;if(s==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let s=+r.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+r.slice(i)}return n})}matchAll(e,n){let r=yl(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=yl(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const xu=Ie.define(),qb=Ie.define(),Ds=Ut.define({create(t){return new Xm(k0(t).create(),null)},update(t,e){for(let n of e.effects)n.is(xu)?t=new Xm(n.value.create(),t.panel):n.is(qb)&&(t=new Xm(t.query,n.value?Yb:null));return t},provide:t=>lu.from(t,e=>e.panel)});class Xm{constructor(e,n){this.query=e,this.panel=n}}const coe=Pe.mark({class:"cm-searchMatch"}),uoe=Pe.mark({class:"cm-searchMatch cm-searchMatch-selected"}),foe=It.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Ds))}update(t){let e=t.state.field(Ds);(e!=t.startState.field(Ds)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Pe.none;let{view:n}=this,r=new is;for(let i=0,s=n.visibleRanges,o=s.length;i<o;i++){let{from:l,to:a}=s[i];for(;i<o-1&&a>s[i+1].from-500;)a=s[++i].to;t.highlight(n.state,l,a,(c,u)=>{let f=n.state.selection.ranges.some(h=>h.from==c&&h.to==u);r.add(c,u,f?uoe:coe)})}return r.finish()}},{decorations:t=>t.decorations});function tf(t){return e=>{let n=e.state.field(Ds,!1);return n&&n.query.spec.valid?t(e,n):d7(e)}}const Wd=tf((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=H.single(r.from,r.to),s=t.state.facet(Da);return t.dispatch({selection:i,effects:[Ub(t,r),s.scrollToMatch(i.main,t)],userEvent:"select.search"}),h7(t),!0}),jd=tf((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let s=H.single(i.from,i.to),o=t.state.facet(Da);return t.dispatch({selection:s,effects:[Ub(t,i),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),h7(t),!0}),hoe=tf((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:H.create(n.map(r=>H.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),doe=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,s=[],o=0;for(let l=new ua(t.doc,t.sliceDoc(r,i));!l.next().done;){if(s.length>1e3)return!1;l.value.from==r&&(o=s.length),s.push(H.range(l.value.from,l.value.to))}return e(t.update({selection:H.create(s,o),userEvent:"select.search.matches"})),!0},c2=tf((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,r,r);if(!s)return!1;let o=s,l=[],a,c,u=[];o.from==r&&o.to==i&&(c=n.toText(e.getReplacement(o)),l.push({from:o.from,to:o.to,insert:c}),o=e.nextMatch(n,o.from,o.to),u.push(he.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let f=t.state.changes(l);return o&&(a=H.single(o.from,o.to).map(f),u.push(Ub(t,o)),u.push(n.facet(Da).scrollToMatch(a.main,t))),t.dispatch({changes:f,selection:a,effects:u,userEvent:"input.replace"}),!0}),poe=tf((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:s,to:o}=i;return{from:s,to:o,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:he.announce.of(r),userEvent:"input.replace.all"}),!0});function Yb(t){return t.state.facet(Da).createPanel(t)}function k0(t,e){var n,r,i,s,o;let l=t.selection.main,a=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!a)return e;let c=t.facet(Da);return new c7({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:c.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:c.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:c.wholeWord})}function f7(t){let e=pb(t,Yb);return e&&e.dom.querySelector("[main-field]")}function h7(t){let e=f7(t);e&&e==t.root.activeElement&&e.select()}const d7=t=>{let e=t.state.field(Ds,!1);if(e&&e.panel){let n=f7(t);if(n&&n!=t.root.activeElement){let r=k0(t.state,e.query.spec);r.valid&&t.dispatch({effects:xu.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[qb.of(!0),e?xu.of(k0(t.state,e.query.spec)):Ie.appendConfig.of(xoe)]});return!0},p7=t=>{let e=t.state.field(Ds,!1);if(!e||!e.panel)return!1;let n=pb(t,Yb);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:qb.of(!1)}),!0},goe=[{key:"Mod-f",run:d7,scope:"editor search-panel"},{key:"F3",run:Wd,shift:jd,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Wd,shift:jd,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:p7,scope:"editor search-panel"},{key:"Mod-Shift-l",run:doe},{key:"Mod-Alt-g",run:Wse},{key:"Mod-d",run:noe,preventDefault:!0}];class moe{constructor(e){this.view=e;let n=this.query=e.state.field(Ds).query.spec;this.commit=this.commit.bind(this),this.searchField=rt("input",{value:n.search,placeholder:Fn(e,"Find"),"aria-label":Fn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=rt("input",{value:n.replace,placeholder:Fn(e,"Replace"),"aria-label":Fn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=rt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=rt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=rt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,s,o){return rt("button",{class:"cm-button",name:i,onclick:s,type:"button"},o)}this.dom=rt("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Wd(e),[Fn(e,"next")]),r("prev",()=>jd(e),[Fn(e,"previous")]),r("select",()=>hoe(e),[Fn(e,"all")]),rt("label",null,[this.caseField,Fn(e,"match case")]),rt("label",null,[this.reField,Fn(e,"regexp")]),rt("label",null,[this.wordField,Fn(e,"by word")]),...e.state.readOnly?[]:[rt("br"),this.replaceField,r("replace",()=>c2(e),[Fn(e,"replace")]),r("replaceAll",()=>poe(e),[Fn(e,"replace all")])],rt("button",{name:"close",onclick:()=>p7(e),"aria-label":Fn(e,"close"),type:"button"},["×"])])}commit(){let e=new c7({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:xu.of(e)}))}keydown(e){HK(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?jd:Wd)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),c2(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(xu)&&!r.value.eq(this.query)&&this.setQuery(r.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(Da).top}}function Fn(t,e){return t.state.phrase(e)}const Yf=30,Uf=/[\s\.,:;?!]/;function Ub(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,s=Math.max(r.from,e-Yf),o=Math.min(i,n+Yf),l=t.state.sliceDoc(s,o);if(s!=r.from){for(let a=0;a<Yf;a++)if(!Uf.test(l[a+1])&&Uf.test(l[a])){l=l.slice(a);break}}if(o!=i){for(let a=l.length-1;a>l.length-Yf;a--)if(!Uf.test(l[a-1])&&Uf.test(l[a])){l=l.slice(0,a);break}}return he.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${r.number}.`)}const Ooe=he.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"}}),xoe=[Ds,xs.low(foe),Ooe];class u2{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class vo{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(yu).markerFilter;i&&(e=i(e,r));let s=e.slice().sort((d,p)=>d.from-p.from||d.to-p.to),o=new is,l=[],a=0,c=r.doc.iter(),u=0,f=r.doc.length;for(let d=0;;){let p=d==s.length?null:s[d];if(!p&&!l.length)break;let g,O;if(l.length)g=a,O=l.reduce((y,b)=>Math.min(y,b.to),p&&p.from>g?p.from:1e8);else{if(g=p.from,g>f)break;O=p.to,l.push(p),d++}for(;d<s.length;){let y=s[d];if(y.from==g&&(y.to>y.from||y.to==g))l.push(y),d++,O=Math.min(y.to,O);else{O=Math.min(y.from,O);break}}O=Math.min(O,f);let x=!1;if(l.some(y=>y.from==g&&(y.to==O||O==f))&&(x=g==O,!x&&O-g<10)){let y=g-(u+c.value.length);y>0&&(c.next(y),u=g);for(let b=g;;){if(b>=O){x=!0;break}if(!c.lineBreak&&u+c.value.length>b)break;b=u+c.value.length,u+=c.value.length,c.next()}}let m=$oe(l);if(x)o.add(g,g,Pe.widget({widget:new Toe(m),diagnostics:l.slice()}));else{let y=l.reduce((b,S)=>S.markClass?b+" "+S.markClass:b,"");o.add(g,O,Pe.mark({class:"cm-lintRange cm-lintRange-"+m+y,diagnostics:l.slice(),inclusiveEnd:l.some(b=>b.to>O)}))}if(a=O,a==f)break;for(let y=0;y<l.length;y++)l[y].to<=a&&l.splice(y--,1)}let h=o.finish();return new vo(h,n,no(h))}}function no(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,s,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!r)r=new u2(i,s,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new u2(r.from,s,r.diagnostic)}}),r}function yoe(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(yu).hideOn(t,n,r);if(i!=null)return i;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(g7))||t.changes.touchesRange(s.from,Math.max(s.to,r)))}function boe(t,e){return t.field(Gn,!1)?e:e.concat(Ie.appendConfig.of(Qoe))}const g7=Ie.define(),Gb=Ie.define(),m7=Ie.define(),Gn=Ut.define({create(){return new vo(Pe.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);r=no(n,t.selected.diagnostic,s)||no(n,null,s)}!n.size&&i&&e.state.facet(yu).autoPanel&&(i=null),t=new vo(n,i,r)}for(let n of e.effects)if(n.is(g7)){let r=e.state.facet(yu).autoPanel?n.value.length?bu.open:null:t.panel;t=vo.init(n.value,r,e.state)}else n.is(Gb)?t=new vo(t.diagnostics,n.value?bu.open:null,t.selected):n.is(m7)&&(t=new vo(t.diagnostics,t.panel,n.value));return t},provide:t=>[lu.from(t,e=>e.panel),he.decorations.from(t,e=>e.diagnostics)]}),voe=Pe.mark({class:"cm-lintRange cm-lintRange-active"});function Soe(t,e,n){let{diagnostics:r}=t.state.field(Gn),i,s=-1,o=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(a,c,{spec:u})=>{if(e>=a&&e<=c&&(a==c||(e>a||n>0)&&(e<c||n<0)))return i=u.diagnostics,s=a,o=c,!1});let l=t.state.facet(yu).tooltipFilter;return i&&l&&(i=l(i,t.state)),i?{pos:s,end:o,above:t.state.doc.lineAt(s).to<o,create(){return{dom:woe(t,i)}}}:null}function woe(t,e){return rt("ul",{class:"cm-tooltip-lint"},e.map(n=>x7(t,n,!1)))}const koe=t=>{let e=t.state.field(Gn,!1);(!e||!e.panel)&&t.dispatch({effects:boe(t.state,[Gb.of(!0)])});let n=pb(t,bu.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},f2=t=>{let e=t.state.field(Gn,!1);return!e||!e.panel?!1:(t.dispatch({effects:Gb.of(!1)}),!0)},Coe=t=>{let e=t.state.field(Gn,!1);if(!e)return!1;let n=t.state.selection.main,r=no(e.diagnostics,null,n.to+1);return!r&&(r=no(e.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},_oe=[{key:"Mod-Shift-m",run:koe,preventDefault:!0},{key:"F8",run:Coe}],yu=ge.define({combine(t){return{sources:t.map(e=>e.source).filter(e=>e!=null),...vi(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:h2,tooltipFilter:h2,needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n,hideOn:(e,n)=>e?n?(r,i,s)=>e(r,i,s)||n(r,i,s):e:n,autoPanel:(e,n)=>e||n})}}});function h2(t,e){return t?e?(n,r)=>e(t(n,r),r):t:e}function O7(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(s=>s.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function x7(t,e,n){var r;let i=n?O7(e.actions):[];return rt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},rt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((s,o)=>{let l=!1,a=d=>{if(d.preventDefault(),l)return;l=!0;let p=no(t.state.field(Gn).diagnostics,e);p&&s.apply(t,p.from,p.to)},{name:c}=s,u=i[o]?c.indexOf(i[o]):-1,f=u<0?c:[c.slice(0,u),rt("u",c.slice(u,u+1)),c.slice(u+1)],h=s.markClass?" "+s.markClass:"";return rt("button",{type:"button",class:"cm-diagnosticAction"+h,onclick:a,onmousedown:a,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[o]})"`}.`},f)}),e.source&&rt("div",{class:"cm-diagnosticSource"},e.source))}class Toe extends Si{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return rt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class d2{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=x7(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class bu{constructor(e){this.view=e,this.items=[];let n=i=>{if(!(i.ctrlKey||i.altKey||i.metaKey)){if(i.keyCode==27)f2(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:s}=this.items[this.selectedIndex],o=O7(s.actions);for(let l=0;l<o.length;l++)if(o[l].toUpperCase().charCodeAt(0)==i.keyCode){let a=no(this.view.state.field(Gn).diagnostics,s);a&&s.actions[l].apply(e,a.from,a.to)}}else return;i.preventDefault()}},r=i=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(i.target)&&this.moveSelection(s)};this.list=rt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=rt("div",{class:"cm-panel-lint"},this.list,rt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>f2(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Gn).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Gn),r=0,i=!1,s=null,o=new Set;for(e.between(0,this.view.state.doc.length,(l,a,{spec:c})=>{for(let u of c.diagnostics){if(o.has(u))continue;o.add(u);let f=-1,h;for(let d=r;d<this.items.length;d++)if(this.items[d].diagnostic==u){f=d;break}f<0?(h=new d2(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"),s=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 d2(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:a})=>{let c=a.height/this.list.offsetHeight;l.top<a.top?this.list.scrollTop-=(a.top-l.top)/c:l.bottom>a.bottom&&(this.list.scrollTop+=(l.bottom-a.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Gn),r=no(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:m7.of(r)})}static open(e){return new bu(e)}}function Eoe(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function Gf(t){return Eoe(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const Poe=he.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:Gf("#d11")},".cm-lintRange-warning":{backgroundImage:Gf("orange")},".cm-lintRange-info":{backgroundImage:Gf("#999")},".cm-lintRange-hint":{backgroundImage:Gf("#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 Aoe(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function $oe(t){let e="hint",n=1;for(let r of t){let i=Aoe(r.severity);i>n&&(n=i,e=r.severity)}return e}const Qoe=[Gn,he.decorations.compute([Gn],t=>{let{selected:e,panel:n}=t.field(Gn);return!e||!n||e.from==e.to?Pe.none:Pe.set([voe.range(e.from,e.to)])}),MJ(Soe,{hideOn:yoe}),Poe],Moe=[q9(),qJ(),uJ(),hne(),Fee(),JK(),iJ(),je.allowMultipleSelections.of(!0),Eee(),mM(Xee,{fallback:!0}),Gee(),Xte(),tne(),SJ(),CJ(),mJ(),qse(),$a.of([...qte,...pre,...goe,...vne,...Iee,...NM,..._oe])],Roe=k.forwardRef(({title:t,children:e},n)=>{const r=hi(rl);return k.createElement(fE,{delayDuration:100},k.createElement(hE,null,k.createElement(dE,{ref:n,asChild:!0},k.createElement("span",{className:re.tooltipTrigger},e)),k.createElement(pE,{container:r==null?void 0:r.current},k.createElement(gE,{className:it(re.tooltipContent),sideOffset:10},t))))}),Loe=k.forwardRef(({children:t,className:e,...n},r)=>k.createElement($6,{...n,ref:r,className:it(e,re.selectItem)},k.createElement(Q6,null,t))),Ioe=({title:t,placeholder:e,className:n})=>{const[r,i]=Fr(Ir,ds);return k.createElement(Roe,{title:t},k.createElement(C6,{"aria-label":e,className:it(re.selectTrigger,n),"data-toolbar-item":!0,disabled:r},k.createElement(_6,{placeholder:e}),k.createElement(T6,{className:re.selectDropdownArrow},i("arrow_drop_down"))))},Noe=({children:t,className:e=re.selectContainer})=>{const n=hi(rl);return k.createElement(E6,{container:n==null?void 0:n.current},k.createElement(P6,{className:it(e,"mdxeditor-select-content"),onCloseAutoFocus:r=>{r.preventDefault()},position:"popper"},k.createElement(A6,{"data-editor-dropdown":!0},t)))},Doe=t=>k.createElement(k6,{value:t.value||"",onValueChange:t.onChange,disabled:t.disabled},k.createElement(Ioe,{title:t.triggerTitle,placeholder:t.placeholder}),k.createElement(Noe,null,t.items.map((e,n)=>e==="separator"?k.createElement(M6,{key:n}):k.createElement(Loe,{key:n,value:e.value},e.label)))),p2="__EMPTY_VALUE__",Voe=({language:t,nodeKey:e,code:n,focusEmitter:r})=>{const i=ps(),{parentEditor:s,lexicalNode:o}=T1(),[l,a,c,u,f]=Fr(Ir,_0,T0,ds,C0),h=Rse(e,"codeblock",t,r),{setCode:d}=T1(),p=k.useRef(null),g=k.useRef(null),O=k.useRef(d);return O.current=d,h.current={getCodemirror:()=>p.current},k.useEffect(()=>{const x=g.current;return(async()=>{const m=[...a,Moe,zse,q9(),$a.of([gre]),he.lineWrapping,he.updateListener.of(({state:y})=>{O.current(y.doc.toString())}),he.domEventHandlers({focus:()=>{s.update(()=>{yi(null)})}})];if(l&&m.push(je.readOnly.of(!0)),t!==""&&c){const y=Lse.find(b=>b.name===t||b.alias.includes(t)||b.extensions.includes(t));if(y)try{const b=await y.load();m.push(b.extension)}catch{console.warn("failed to load language support for",t)}}x.innerHTML="",p.current=new he({parent:x,state:je.create({doc:n,extensions:m})}),x.addEventListener("keydown",g2)})(),()=>{var m;(m=p.current)==null||m.destroy(),p.current=null,x.removeEventListener("keydown",g2)}},[l,t,...a]),k.createElement("div",{className:re.codeMirrorWrapper},k.createElement("div",{className:re.codeMirrorToolbar},k.createElement(Doe,{disabled:l,value:t,onChange:x=>{s.update(()=>{o.setLanguage(x===p2?"":x),setTimeout(()=>{s.update(()=>{o.getLatest().select()})})})},triggerTitle:i("codeBlock.selectLanguage","Select code block language"),placeholder:i("codeBlock.inlineLanguage","Language"),items:Object.entries(f).map(([x,m])=>({value:x||p2,label:m}))}),k.createElement("button",{className:re.iconButton,type:"button",disabled:l,title:i("codeblock.delete","Delete code block"),onClick:x=>{x.preventDefault(),s.update(()=>{o.remove()})}},u("delete_small"))),k.createElement("div",{ref:g}))};function g2(t){t.stopPropagation()}const C0=ye({js:"JavaScript",ts:"TypeScript",tsx:"TypeScript (React)",jsx:"JavaScript (React)",css:"CSS"}),Foe=Pt(t=>{t.link(t.pipe(Foe,Zs(({language:e,code:n})=>({code:n,language:e,meta:""}))),wQ)}),_0=ye([]),T0=ye(!0),zae=dr({update(t,e){t.pubIn({[C0]:e==null?void 0:e.codeBlockLanguages,[_0]:(e==null?void 0:e.codeMirrorExtensions)??[],[T0]:(e==null?void 0:e.autoLoadLanguageSupport)??!0})},init(t,e){t.pubIn({[C0]:e==null?void 0:e.codeBlockLanguages,[_0]:(e==null?void 0:e.codeMirrorExtensions)??[],[VU]:Boe((e==null?void 0:e.codeBlockLanguages)??{}),[T0]:(e==null?void 0:e.autoLoadLanguageSupport)??!0})}});function Boe(t){return{match(e,n){return Object.hasOwn(t,e??"")&&!n},priority:1,Editor:Voe}}function Zoe({url:t,title:e,text:n,onSubmit:r,onCancel:i,linkAutocompleteSuggestions:s,showLinkTitleField:o,showAnchorTextField:l}){const{register:a,handleSubmit:c,control:u,setValue:f,reset:h}=K3({values:{url:t,title:e,text:n}}),d=ps();return k.createElement("form",{onSubmit:p=>{c(r)(p),p.stopPropagation(),p.preventDefault()},onReset:p=>{p.stopPropagation(),i()},onKeyDown:p=>{p.key==="Escape"&&(p.stopPropagation(),i())},className:it(re.multiFieldForm,re.linkDialogEditForm)},k.createElement("div",{className:re.formField},k.createElement("label",{htmlFor:"link-url"},d("createLink.url","URL")),k.createElement(mQ,{register:a,initialInputValue:t,inputName:"url",suggestions:s,setValue:f,control:u,placeholder:d("createLink.urlPlaceholder","Select or paste an URL"),autofocus:!0})),l?k.createElement("div",{className:re.formField},k.createElement("label",{htmlFor:"link-text",title:d("createLink.textTooltip","The text to be displayed for the link")},d("createLink.text","Anchor text")),k.createElement("input",{id:"link-text",className:re.textInput,size:40,...a("text")})):null,o?k.createElement("div",{className:re.formField},k.createElement("label",{htmlFor:"link-title",title:d("createLink.titleTooltip","The link's title attribute, shown on hover")},d("createLink.title","Link title")),k.createElement("input",{id:"link-title",className:re.textInput,size:40,...a("title")})):null,k.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},k.createElement("button",{type:"submit",title:d("createLink.saveTooltip","Set URL"),"aria-label":d("createLink.saveTooltip","Set URL"),className:it(re.primaryButton)},d("dialogControls.save","Save")),k.createElement("button",{type:"reset",title:d("createLink.cancelTooltip","Cancel change"),"aria-label":d("createLink.cancelTooltip","Cancel change"),className:it(re.secondaryButton)},d("dialogControls.cancel","Cancel"))))}const zoe=()=>{const[t,e,n,r,i,s,o]=Fr(rl,bt,ds,kn,C7,_7,E7),l=Hn(y7),a=Hn(b7),c=Hn(v7),u=Hn(S7),f=Hn(w7);k.useEffect(()=>{const x=()=>{e==null||e.getEditorState().read(()=>{l(!0)})};return window.addEventListener("resize",x),window.addEventListener("scroll",x),()=>{window.removeEventListener("resize",x),window.removeEventListener("scroll",x)}},[e,l]);const[h,d]=k.useState(!1),p=ps();if(r.type==="inactive")return null;const g=r.rectangle,O=r.type==="preview"&&r.url.startsWith("http");return k.createElement(J0,{open:!0},k.createElement(e6,{"data-visible":r.type==="edit",className:re.linkDialogAnchor,style:{top:`${g.top}px`,left:`${g.left}px`,width:`${g.width}px`,height:`${g.height}px`}}),k.createElement(ex,{container:t==null?void 0:t.current},k.createElement(t6,{className:it(re.linkDialogPopoverContent),sideOffset:5,onOpenAutoFocus:x=>{x.preventDefault()},key:r.linkNodeKey},r.type==="edit"&&k.createElement(Zoe,{url:r.url,title:r.title,text:r.text,onSubmit:a,onCancel:c.bind(null),linkAutocompleteSuggestions:i,showLinkTitleField:o,showAnchorTextField:r.withAnchorText}),r.type==="preview"&&k.createElement(k.Fragment,null,k.createElement("a",{className:re.linkDialogPreviewAnchor,href:r.url,...O?{target:"_blank",rel:"noreferrer"}:{},onClick:x=>{s!==null&&(x.preventDefault(),s(r.url))},title:O?p("linkPreview.open","Open {{url}} in new window",{url:r.url}):r.url},k.createElement("span",null,r.url),O&&n("open_in_new")),k.createElement(Wm,{onClick:()=>{u()},title:p("linkPreview.edit","Edit link URL"),"aria-label":p("linkPreview.edit","Edit link URL")},n("edit")),k.createElement(fE,null,k.createElement(hE,{open:h},k.createElement(dE,{asChild:!0},k.createElement(Wm,{title:p("linkPreview.copyToClipboard","Copy to clipboard"),"aria-label":p("linkPreview.copyToClipboard","Copy to clipboard"),onClick:()=>{window.navigator.clipboard.writeText(r.url).then(()=>{d(!0),setTimeout(()=>{d(!1)},1e3)})}},n(h?"check":"content_copy"))),k.createElement(pE,{container:t==null?void 0:t.current},k.createElement(gE,{className:it(re.tooltipContent),sideOffset:5},p("linkPreview.copied","Copied!"),k.createElement(dN,null))))),k.createElement(Wm,{title:p("linkPreview.remove","Remove link"),"aria-label":p("linkPreview.remove","Remove link"),onClick:()=>{f()}},n("link_off"))),k.createElement(tx,{className:re.popoverArrow}))))},Wm=k.forwardRef(({className:t,...e},n)=>k.createElement("button",{className:it(re.actionButton,t),ref:n,...e}));function E0(t){if(!t)return null;const e=pH(t);if(e===null)return null;const n=e.getParent();return Tn(n)?n:Tn(e)?e:null}const y7=Pt(),kn=ye({type:"inactive"},t=>{t.pub(qc,e=>e.registerCommand(Qp,()=>t.getValue(kn).type==="preview"?(t.pub(kn,{type:"inactive"}),!0):!1,dt)),t.sub(t.pipe(Yc),e=>{e!=="rich-text"&&t.pub(kn,{type:"inactive"})}),t.pub(qc,e=>e.registerCommand(wA,n=>{if(n.key==="k"&&(P3?n.metaKey:n.ctrlKey)&&!t.getValue(Ir)){const r=be();return Se(r)?(t.pub(k7),n.stopPropagation(),n.preventDefault(),!0):!1}return!1},NO)),t.sub(t.pipe(S7,Ct(kn,bt)),([,e,n])=>{if(e.type==="preview")setTimeout(()=>{n==null||n.getEditorState().read(()=>{const r=ci(e.linkNodeKey),i=Tn(r)?r.getTextContent().length>0&&r.getChildrenSize()<=1:!1,s=i&&r?r.getTextContent():"";t.pub(kn,{type:"edit",initialUrl:e.url,url:e.url,title:e.title,text:s,withAnchorText:i,linkNodeKey:e.linkNodeKey,rectangle:e.rectangle})})});else throw new Error("Cannot switch to edit mode when not in preview mode")}),t.sub(t.pipe(b7,Ct(bt,kn,Gl)),([e,n,r,i])=>{var s,o,l;const a=((s=e.text)==null?void 0:s.trim())??"",c=((o=e.url)==null?void 0:o.trim())??"",u=((l=e.title)==null?void 0:l.trim())??"";if(c!==""){if(i!=null&&i.isCollapsed()){const f=a||u||c;n==null||n.update(()=>{const h=E0(i);if(h)if(Sr(h)){const d=rs(c,{title:u});d.append(pi(a)),h.replace(d),d.select()}else h.setURL(c),h.setTitle(u),m2(h.getFirstChild(),a);else{const d=rs(c,{title:u});d.append(pi(f)),Ca([d]),d.select()}},{discrete:!0})}else n==null||n.update(()=>{m2(i==null?void 0:i.anchor.getNode(),a)}),n==null||n.dispatchCommand(Kl,{url:c,title:u});t.pub(kn,{type:"preview",linkNodeKey:r.linkNodeKey,rectangle:r.rectangle,title:u,url:c})}else r.type==="edit"&&r.initialUrl!==""&&(n==null||n.dispatchCommand(Kl,null)),t.pub(kn,{type:"inactive"})}),t.link(t.pipe(v7,Ct(kn,bt),Zs(([,e,n])=>{if(e.type==="edit")return n==null||n.focus(),e.initialUrl===""?{type:"inactive"}:{type:"preview",url:e.initialUrl,linkNodeKey:e.linkNodeKey,rectangle:e.rectangle};throw new Error("Cannot cancel edit when not in edit mode")})),kn),t.link(t.pipe(t.combine(Gl,y7),Ct(bt,kn,Ir),Zs(([[e],n,r,i])=>{if(Se(e)&&n&&!i){const s=E0(e);if(!e.isCollapsed())return{type:"inactive"};if(s){const o=_3(n);return o?{type:"preview",url:s.getURL(),linkNodeKey:s.getKey(),title:s.getTitle(),rectangle:o}:{type:"inactive"}}else return{type:"inactive"}}else return{type:"inactive"}})),kn)}),b7=Pt(),v7=ao();ao();const S7=ao(),w7=ao(t=>{t.sub(t.pipe(w7,Ct(bt)),([,e])=>{e==null||e.dispatchCommand(Kl,null)})}),k7=ao(t=>{t.sub(t.pipe(k7,Ct(Gl,bt),Au(([,e])=>Se(e))),([,e,n])=>{n==null||n.focus(()=>{setTimeout(()=>{n.getEditorState().read(()=>{const r=E0(e),i=_3(n),s=(r==null?void 0:r.getURL())??"",o=(r==null?void 0:r.getURL())??"",l=(r==null?void 0:r.getTitle())??"",a=(r==null?void 0:r.getKey())??"",c=r?r.getTextContent().length>0&&r.getChildrenSize()<=1:!!(e!=null&&e.isCollapsed()),u=c&&r?r.getTextContent():"";t.pub(kn,{type:"edit",initialUrl:s,url:o,title:l,text:u,withAnchorText:c,linkNodeKey:a,rectangle:i})})})})})}),C7=ye([]),_7=ye(null),T7=ye(null,t=>{t.pub(qc,e=>{function n(r){const[i,s]=t.getValues([Ir,T7]);!i||s===null||e.update(()=>{const o=Wo(r.target);if(o!==null){const l=$r(o,a=>a instanceof gs);l!==null&&s(r,l,l.getURL())}})}return e.registerRootListener((r,i)=>{r&&r.addEventListener("click",n),i&&i.removeEventListener("click",n)})})});function m2(t,e){tt(t)&&e&&(t.setTextContent(e),t.selectStart())}const E7=ye(!0),Xae=dr({init(t,e){t.pub(il,(e==null?void 0:e.LinkDialog)??zoe),t.pub(_7,(e==null?void 0:e.onClickLinkCallback)??null),t.pub(T7,(e==null?void 0:e.onReadOnlyClickLinkCallback)??null),t.pub(E7,(e==null?void 0:e.showLinkTitleField)??!0)},update(t,e={}){t.pub(C7,e.linkAutocompleteSuggestions??[])}});class Hd{static create(e,n,r,i,s){let o=i+(i<<8)+e+(n<<4)|0;return new Hd(e,n,r,o,s,[],[])}constructor(e,n,r,i,s,o,l){this.type=e,this.value=n,this.from=r,this.hash=i,this.end=s,this.children=o,this.positions=l,this.hashProp=[[Re.contextHash,i]]}addChild(e,n){e.prop(Re.contextHash)!=this.hash&&(e=new Ze(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new Ze(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(i,s,o)=>new Ze(Nt.none,i,s,o,this.hashProp)})}}var oe;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(oe||(oe={}));class Xoe{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class Woe{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return $c(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,r=0){for(let i=n;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let n=0;for(let r=0;n<this.text.length&&r<e;n++)r+=this.text.charCodeAt(n)==9?4-r%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let e="";for(let n=0;n<this.basePos;n++)e+=" ";return e+this.text.slice(this.basePos)}}function O2(t,e,n){if(n.pos==n.text.length||t!=e.block&&n.indent>=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(t.type==oe.OrderedList?ev:Jb)(n,e,!1);return r>0&&(t.type!=oe.BulletList||Kb(n,e,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==t.value}const P7={[oe.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(Ue(oe.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(gr(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[oe.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[oe.OrderedList]:O2,[oe.BulletList]:O2,[oe.Document](){return!0}};function gr(t){return t==32||t==9||t==10||t==13}function $c(t,e=0){for(;e<t.length&&gr(t.charCodeAt(e));)e++;return e}function x2(t,e,n){for(;e>n&&gr(t.charCodeAt(e-1));)e--;return e}function A7(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let n=e;n<t.text.length;n++)if(t.text.charCodeAt(n)==96)return-1}return e}function $7(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function Kb(t,e,n){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let r=1;for(let i=t.pos+1;i<t.text.length;i++){let s=t.text.charCodeAt(i);if(s==t.next)r++;else if(!gr(s))return-1}return n&&t.next==45&&R7(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(D7.SetextHeading)>-1||r<3?-1:1}function Q7(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function Jb(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||gr(t.text.charCodeAt(t.pos+1)))&&(!n||Q7(e,oe.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function ev(t,e,n){let r=t.pos,i=t.next;for(;i>=48&&i<=57;){r++;if(r==t.text.length)return-1;i=t.text.charCodeAt(r)}return r==t.pos||r>t.pos+9||i!=46&&i!=41||r<t.text.length-1&&!gr(t.text.charCodeAt(r+1))||n&&!Q7(e,oe.OrderedList)&&(t.skipSpace(r+1)==t.text.length||r>t.pos+1||t.next!=49)?-1:r+1-t.pos}function M7(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let n=e-t.pos;return n>6?-1:n}function R7(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let n=e;for(;e<t.text.length&&gr(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const P0=/^[ \t]*$/,L7=/-->/,I7=/\?>/,A0=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,L7],[/^\s*<\?/,I7],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,P0],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,P0]];function N7(t,e,n){if(t.next!=60)return-1;let r=t.text.slice(t.pos);for(let i=0,s=A0.length-(n?1:0);i<s;i++)if(A0[i][0].test(r))return i;return-1}function y2(t,e){let n=t.countIndent(e,t.pos,t.indent),r=t.countIndent(t.skipSpace(e),e,n);return r>=n+5?n+1:r}function ws(t,e,n){let r=t.length-1;r>=0&&t[r].to==e&&t[r].type==oe.CodeText?t[r].to=n:t.push(Ue(oe.CodeText,e,n))}const Kf={LinkReference:void 0,IndentedCode(t,e){let n=e.baseIndent+4;if(e.indent<n)return!1;let r=e.findColumn(n),i=t.lineStart+r,s=t.lineStart+e.text.length,o=[],l=[];for(ws(o,i,s);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){ws(l,t.lineStart-1,t.lineStart);for(let a of e.markers)l.push(a)}else{if(e.indent<n)break;{if(l.length){for(let c of l)c.type==oe.CodeText?ws(o,c.from,c.to):o.push(c);l=[]}ws(o,t.lineStart-1,t.lineStart);for(let c of e.markers)o.push(c);s=t.lineStart+e.text.length;let a=t.lineStart+e.findColumn(e.baseIndent+4);a<s&&ws(o,a,s)}}return l.length&&(l=l.filter(a=>a.type!=oe.CodeText),l.length&&(e.markers=l.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-i).finish(oe.CodeBlock,s-i),i),!0},FencedCode(t,e){let n=A7(e);if(n<0)return!1;let r=t.lineStart+e.pos,i=e.next,s=n-e.pos,o=e.skipSpace(n),l=x2(e.text,e.text.length,o),a=[Ue(oe.CodeMark,r,r+s)];o<l&&a.push(Ue(oe.CodeInfo,t.lineStart+o,t.lineStart+l));for(let c=!0,u=!0,f=!1;t.nextLine()&&e.depth>=t.stack.length;c=!1){let h=e.pos;if(e.indent-e.baseIndent<4)for(;h<e.text.length&&e.text.charCodeAt(h)==i;)h++;if(h-e.pos>=s&&e.skipSpace(h)==e.text.length){for(let d of e.markers)a.push(d);u&&f&&ws(a,t.lineStart-1,t.lineStart),a.push(Ue(oe.CodeMark,t.lineStart+e.pos,t.lineStart+h)),t.nextLine();break}else{f=!0,c||(ws(a,t.lineStart-1,t.lineStart),u=!1);for(let g of e.markers)a.push(g);let d=t.lineStart+e.basePos,p=t.lineStart+e.text.length;d<p&&(ws(a,d,p),u=!1)}}return t.addNode(t.buffer.writeElements(a,-r).finish(oe.FencedCode,t.prevLineEnd()-r),r),!0},Blockquote(t,e){let n=$7(e);return n<0?!1:(t.startContext(oe.Blockquote,e.pos),t.addNode(oe.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(Kb(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(oe.HorizontalRule,n),!0},BulletList(t,e){let n=Jb(e,t,!1);if(n<0)return!1;t.block.type!=oe.BulletList&&t.startContext(oe.BulletList,e.basePos,e.next);let r=y2(e,e.pos+1);return t.startContext(oe.ListItem,e.basePos,r-e.baseIndent),t.addNode(oe.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},OrderedList(t,e){let n=ev(e,t,!1);if(n<0)return!1;t.block.type!=oe.OrderedList&&t.startContext(oe.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let r=y2(e,e.pos+n);return t.startContext(oe.ListItem,e.basePos,r-e.baseIndent),t.addNode(oe.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},ATXHeading(t,e){let n=M7(e);if(n<0)return!1;let r=e.pos,i=t.lineStart+r,s=x2(e.text,e.text.length,r),o=s;for(;o>r&&e.text.charCodeAt(o-1)==e.next;)o--;(o==s||o==r||!gr(e.text.charCodeAt(o-1)))&&(o=e.text.length);let l=t.buffer.write(oe.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(r+n+1,o),i+n+1),-i);o<e.text.length&&l.write(oe.HeaderMark,o-r,s-r);let a=l.finish(oe.ATXHeading1-1+n,e.text.length-r);return t.nextLine(),t.addNode(a,i),!0},HTMLBlock(t,e){let n=N7(e,t,!1);if(n<0)return!1;let r=t.lineStart+e.pos,i=A0[n][1],s=[],o=i!=P0;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let c of e.markers)s.push(c)}o&&t.nextLine();let l=i==L7?oe.CommentBlock:i==I7?oe.ProcessingInstructionBlock:oe.HTMLBlock,a=t.prevLineEnd();return t.addNode(t.buffer.writeElements(s,-r).finish(l,a-r),r),!0},SetextHeading:void 0};class joe{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,n,r){if(this.stage==-1)return!1;let i=r.content+`
155
+ `+n.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,r,s):!1}finish(e,n){return(this.stage==2||this.stage==3)&&$c(n.content,this.pos)==n.content.length?this.complete(e,n,n.content.length):!1}complete(e,n,r){return e.addLeafElement(n,Ue(oe.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(H7(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Ue(oe.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(W7(e,$c(e,this.pos),this.start)))return-1}else if(this.stage==2){let n=$c(e,this.pos),r=0;if(n>this.pos){let i=j7(e,n,this.start);if(i){let s=jm(e,i.to-this.start);s>0&&(this.nextStage(i),r=s)}}return r||(r=jm(e,this.pos)),r>0&&r<e.length?r:-1}else return jm(e,this.pos)}}}function jm(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(n==10)break;if(!gr(n))return-1}return e}class Hoe{nextLine(e,n,r){let i=n.depth<e.stack.length?-1:R7(n),s=n.next;if(i<0)return!1;let o=Ue(oe.HeaderMark,e.lineStart+n.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,Ue(s==61?oe.SetextHeading1:oe.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),o])),!0}finish(){return!1}}const D7={LinkReference(t,e){return e.content.charCodeAt(0)==91?new joe(e):null},SetextHeading(){return new Hoe}},qoe=[(t,e)=>M7(e)>=0,(t,e)=>A7(e)>=0,(t,e)=>$7(e)>=0,(t,e)=>Jb(e,t,!0)>=0,(t,e)=>ev(e,t,!0)>=0,(t,e)=>Kb(e,t,!0)>=0,(t,e)=>N7(e,t,!0)>=0],Yoe={text:"",end:0};class Uoe{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.line=new Woe,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=Hd.create(oe.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new Joe(r,n):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let r=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<e.markers.length&&(!i||e.markers[r].from<i.end);){let s=e.markers[r++];this.addNode(s.type,s.from,s.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let i=r(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let n=new Xoe(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,n);i&&n.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,e,n))break e}for(let r of n.parsers)if(r.nextLine(this,e,n))return null;n.content+=`
156
+ `+e.scrub();for(let r of e.markers)n.marks.push(r)}return this.finishLeaf(n),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let n=this.fragments.takeNodes(this);return n?(this.absoluteLineStart+=n,this.lineStart=q7(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let n=Yoe;if(n.end=e,e>=this.to)n.text="";else if(n.text=this.lineChunkAt(e),n.end+=n.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<n.end;){i++;let s=this.ranges[i].from,o=this.lineChunkAt(s);n.end=s+o.length,n.text=n.text.slice(0,this.ranges[i-1].to-r)+o,r=n.end-n.text.length}}return n}readLine(){let{line:e}=this,{text:n,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(n);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],s=this.parser.skipContextMarkup[i.type];if(!s)throw new Error("Unhandled block context "+oe[i.type]);let o=this.line.markers.length;if(!s(i,this,e)){this.line.markers.length>o&&(i.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let n=this.input.chunk(e),r;if(this.input.lineChunks)r=n==`
157
+ `?"":n;else{let i=n.indexOf(`
158
+ `);r=i<0?n:n.slice(0,i)}return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,n,r=0){this.block=Hd.create(e,r,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,n,r=0){this.startContext(this.parser.getNodeType(e),n,r)}addNode(e,n,r){typeof e=="number"&&(e=new Ze(this.parser.nodeSet.types[e],fa,fa,(r??this.prevLineEnd())-n)),this.block.addChild(e,n-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,n){this.addNode(this.buffer.writeElements(Q0(n.children,e.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let e=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(e.toTree(this.parser.nodeSet),e.from-n.from),this.block=n}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?V7(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let n=Q0(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(oe.Paragraph,e.content.length),e.start)}elt(e,n,r,i){return typeof e=="string"?Ue(this.parser.getNodeType(e),n,r,i):new Z7(e,n)}get buffer(){return new B7(this.parser.nodeSet)}}function V7(t,e,n,r,i){let s=t[e].to,o=[],l=[],a=n.from+r;function c(u,f){for(;f?u>=s:u>s;){let h=t[e+1].from-s;r+=h,u+=h,e++,s=t[e].to}}for(let u=n.firstChild;u;u=u.nextSibling){c(u.from+r,!0);let f=u.from+r,h,d=i.get(u.tree);d?h=d:u.to+r>s?(h=V7(t,e,u,r,i),c(u.to+r,!1)):h=u.toTree(),o.push(h),l.push(f-a)}return c(n.to+r,!1),new Ze(n.type,o,l,n.to+r-a,n.tree?n.tree.propValues:void 0)}class ag extends Jp{constructor(e,n,r,i,s,o,l,a,c){super(),this.nodeSet=e,this.blockParsers=n,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=l,this.inlineNames=a,this.wrappers=c,this.nodeTypes=Object.create(null);for(let u of e.types)this.nodeTypes[u.name]=u.id}createParse(e,n,r){let i=new Uoe(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}configure(e){let n=$0(e);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),l=this.blockNames.slice(),a=this.inlineParsers.slice(),c=this.inlineNames.slice(),u=this.endLeafBlock.slice(),f=this.wrappers;if(ec(n.defineNodes)){i=Object.assign({},i);let h=r.types.slice(),d;for(let p of n.defineNodes){let{name:g,block:O,composite:x,style:m}=typeof p=="string"?{name:p}:p;if(h.some(S=>S.name==g))continue;x&&(i[h.length]=(S,v,w)=>x(v,w,S.value));let y=h.length,b=x?["Block","BlockContext"]:O?y>=oe.ATXHeading1&&y<=oe.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;h.push(Nt.define({id:y,name:g,props:b&&[[Re.group,b]]})),m&&(d||(d={}),Array.isArray(m)||m instanceof jn?d[g]=m:Object.assign(d,m))}r=new Qa(h),d&&(r=r.extend(Ma(d)))}if(ec(n.props)&&(r=r.extend(...n.props)),ec(n.remove))for(let h of n.remove){let d=this.blockNames.indexOf(h),p=this.inlineNames.indexOf(h);d>-1&&(s[d]=o[d]=void 0),p>-1&&(a[p]=void 0)}if(ec(n.parseBlock))for(let h of n.parseBlock){let d=l.indexOf(h.name);if(d>-1)s[d]=h.parse,o[d]=h.leaf;else{let p=h.before?Jf(l,h.before):h.after?Jf(l,h.after)+1:l.length-1;s.splice(p,0,h.parse),o.splice(p,0,h.leaf),l.splice(p,0,h.name)}h.endLeaf&&u.push(h.endLeaf)}if(ec(n.parseInline))for(let h of n.parseInline){let d=c.indexOf(h.name);if(d>-1)a[d]=h.parse;else{let p=h.before?Jf(c,h.before):h.after?Jf(c,h.after)+1:c.length-1;a.splice(p,0,h.parse),c.splice(p,0,h.name)}}return n.wrap&&(f=f.concat(n.wrap)),new ag(r,s,o,l,u,i,a,c,f)}getNodeType(e){let n=this.nodeTypes[e];if(n==null)throw new RangeError(`Unknown node type '${e}'`);return n}parseInline(e,n){let r=new tv(this,e,n);e:for(let i=n;i<r.end;){let s=r.char(i);for(let o of this.inlineParsers)if(o){let l=o(r,s,i);if(l>=0){i=l;continue e}}i++}return r.resolveMarkers(0)}}function ec(t){return t!=null&&t.length>0}function $0(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=$0(t[0]);if(t.length==1)return e;let n=$0(t.slice(1));if(!n||!e)return e||n;let r=(o,l)=>(o||fa).concat(l||fa),i=e.wrap,s=n.wrap;return{props:r(e.props,n.props),defineNodes:r(e.defineNodes,n.defineNodes),parseBlock:r(e.parseBlock,n.parseBlock),parseInline:r(e.parseInline,n.parseInline),remove:r(e.remove,n.remove),wrap:i?s?(o,l,a,c)=>i(s(o,l,a,c),l,a,c):i:s}}function Jf(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let F7=[Nt.none];for(let t=1,e;e=oe[t];t++)F7[t]=Nt.define({id:t,name:e,props:t>=oe.Escape?[]:[[Re.group,t in P7?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const fa=[];class B7{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,n,r,i=0){return this.content.push(e,n,r,4+i*4),this}writeElements(e,n=0){for(let r of e)r.writeTo(this,n);return this}finish(e,n){return Ze.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}}let vu=class{constructor(e,n,r,i=fa){this.type=e,this.from=n,this.to=r,this.children=i}writeTo(e,n){let r=e.content.length;e.writeElements(this.children,n),e.content.push(this.type,this.from+n,this.to+n,e.content.length+4-r)}toTree(e){return new B7(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class Z7{constructor(e,n){this.tree=e,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return fa}writeTo(e,n){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function Ue(t,e,n,r){return new vu(t,e,n,r)}const z7={resolve:"Emphasis",mark:"EmphasisMark"},X7={resolve:"Emphasis",mark:"EmphasisMark"},So={},qd={};class Zn{constructor(e,n,r,i){this.type=e,this.from=n,this.to=r,this.side=i}}const b2="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let Su=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Su=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const Hm={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let r=t.char(n+1);for(let i=0;i<b2.length;i++)if(b2.charCodeAt(i)==r)return t.append(Ue(oe.Escape,n,n+2));return-1},Entity(t,e,n){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(n+1,n+31));return r?t.append(Ue(oe.Entity,n,n+1+r[0].length)):-1},InlineCode(t,e,n){if(e!=96||n&&t.char(n-1)==96)return-1;let r=n+1;for(;r<t.end&&t.char(r)==96;)r++;let i=r-n,s=0;for(;r<t.end;r++)if(t.char(r)==96){if(s++,s==i&&t.char(r+1)!=96)return t.append(Ue(oe.InlineCode,n,r+1,[Ue(oe.CodeMark,n,n+i),Ue(oe.CodeMark,r+1-i,r+1)]))}else s=0;return-1},HTMLTag(t,e,n){if(e!=60||n==t.end-1)return-1;let r=t.slice(n+1,t.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return t.append(Ue(oe.Autolink,n,n+1+i[0].length,[Ue(oe.LinkMark,n,n+1),Ue(oe.URL,n+1,n+i[0].length),Ue(oe.LinkMark,n+i[0].length,n+1+i[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(s)return t.append(Ue(oe.Comment,n,n+1+s[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return t.append(Ue(oe.ProcessingInstruction,n,n+1+o[0].length));let l=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return l?t.append(Ue(oe.HTMLTag,n,n+1+l[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let r=n+1;for(;t.char(r)==e;)r++;let i=t.slice(n-1,n),s=t.slice(r,r+1),o=Su.test(i),l=Su.test(s),a=/\s|^$/.test(i),c=/\s|^$/.test(s),u=!c&&(!l||a||o),f=!a&&(!o||c||l),h=u&&(e==42||!f||o),d=f&&(e==42||!u||l);return t.append(new Zn(e==95?z7:X7,n,r,(h?1:0)|(d?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(Ue(oe.HardBreak,n,n+2));if(e==32){let r=n+1;for(;t.char(r)==32;)r++;if(t.char(r)==10&&r>=n+2)return t.append(Ue(oe.HardBreak,n,r+1))}return-1},Link(t,e,n){return e==91?t.append(new Zn(So,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new Zn(qd,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let r=t.parts.length-1;r>=0;r--){let i=t.parts[r];if(i instanceof Zn&&(i.type==So||i.type==qd)){if(!i.side||t.skipSpace(i.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[r]=null,-1;let s=t.takeContent(r),o=t.parts[r]=Goe(t,s,i.type==So?oe.Link:oe.Image,i.from,n+1);if(i.type==So)for(let l=0;l<r;l++){let a=t.parts[l];a instanceof Zn&&a.type==So&&(a.side=0)}return o.to}}return-1}};function Goe(t,e,n,r,i){let{text:s}=t,o=t.char(i),l=i;if(e.unshift(Ue(oe.LinkMark,r,r+(n==oe.Image?2:1))),e.push(Ue(oe.LinkMark,i-1,i)),o==40){let a=t.skipSpace(i+1),c=W7(s,a-t.offset,t.offset),u;c&&(a=t.skipSpace(c.to),a!=c.to&&(u=j7(s,a-t.offset,t.offset),u&&(a=t.skipSpace(u.to)))),t.char(a)==41&&(e.push(Ue(oe.LinkMark,i,i+1)),l=a+1,c&&e.push(c),u&&e.push(u),e.push(Ue(oe.LinkMark,a,l)))}else if(o==91){let a=H7(s,i-t.offset,t.offset,!1);a&&(e.push(a),l=a.to)}return Ue(n,r,l,e)}function W7(t,e,n){if(t.charCodeAt(e)==60){for(let i=e+1;i<t.length;i++){let s=t.charCodeAt(i);if(s==62)return Ue(oe.URL,e+n,i+1+n);if(s==60||s==10)return!1}return null}else{let i=0,s=e;for(let o=!1;s<t.length;s++){let l=t.charCodeAt(s);if(gr(l))break;if(o)o=!1;else if(l==40)i++;else if(l==41){if(!i)break;i--}else l==92&&(o=!0)}return s>e?Ue(oe.URL,e+n,s+n):s==t.length?null:!1}}function j7(t,e,n){let r=t.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let s=e+1,o=!1;s<t.length;s++){let l=t.charCodeAt(s);if(o)o=!1;else{if(l==i)return Ue(oe.LinkTitle,e+n,s+1+n);l==92&&(o=!0)}}return null}function H7(t,e,n,r){for(let i=!1,s=e+1,o=Math.min(t.length,s+999);s<o;s++){let l=t.charCodeAt(s);if(i)i=!1;else{if(l==93)return r?!1:Ue(oe.LinkLabel,e+n,s+1+n);if(r&&!gr(l)&&(r=!1),l==91)return!1;l==92&&(i=!0)}}return null}class tv{constructor(e,n,r){this.parser=e,this.text=n,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,r,i,s){return this.append(new Zn(e,n,r,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof Zn&&(n.type==So||n.type==qd))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r<this.parts.length;r++){let i=this.parts[r];if(!(i instanceof Zn&&i.type.resolve&&i.side&2))continue;let s=i.type==z7||i.type==X7,o=i.to-i.from,l,a=r-1;for(;a>=e;a--){let g=this.parts[a];if(g instanceof Zn&&g.side&1&&g.type==i.type&&!(s&&(i.side&1||g.side&2)&&(g.to-g.from+o)%3==0&&((g.to-g.from)%3||o%3))){l=g;break}}if(!l)continue;let c=i.type.resolve,u=[],f=l.from,h=i.to;if(s){let g=Math.min(2,l.to-l.from,o);f=l.to-g,h=i.from+g,c=g==1?"Emphasis":"StrongEmphasis"}l.type.mark&&u.push(this.elt(l.type.mark,f,l.to));for(let g=a+1;g<r;g++)this.parts[g]instanceof vu&&u.push(this.parts[g]),this.parts[g]=null;i.type.mark&&u.push(this.elt(i.type.mark,i.from,h));let d=this.elt(c,f,h,u);this.parts[a]=s&&l.from!=f?new Zn(l.type,l.from,f,l.side):null,(this.parts[r]=s&&i.to!=h?new Zn(i.type,h,i.to,i.side):null)?this.parts.splice(r,0,d):this.parts[r]=d}let n=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof vu&&n.push(i)}return n}findOpeningDelimiter(e){for(let n=this.parts.length-1;n>=0;n--){let r=this.parts[n];if(r instanceof Zn&&r.type==e&&r.side&1)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}getDelimiterAt(e){let n=this.parts[e];return n instanceof Zn?n:null}skipSpace(e){return $c(this.text,e-this.offset)+this.offset}elt(e,n,r,i){return typeof e=="string"?Ue(this.parser.getNodeType(e),n,r,i):new Z7(e,n)}}tv.linkStart=So;tv.imageStart=qd;function Q0(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),r=0;for(let i of e){for(;r<n.length&&n[r].to<i.to;)r++;if(r<n.length&&n[r].from<i.from){let s=n[r];s instanceof vu&&(n[r]=new vu(s.type,s.from,s.to,Q0(s.children,[i])))}else n.splice(r++,0,i)}return n}const Koe=[oe.CodeBlock,oe.ListItem,oe.OrderedList,oe.BulletList];class Joe{constructor(e,n){this.fragments=e,this.input=n,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,n){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
159
+ `;)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=e+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=n;if(!r.childAfter(i))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(Re.contextHash)==e}takeNodes(e){let n=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,l=e.block.children.length,a=o,c=l;for(;;){if(n.to-r>i){if(n.type.isAnonymous&&n.firstChild())continue;break}let u=q7(n.from-r,e.ranges);if(n.to-r<=e.ranges[e.rangeI].to)e.addNode(n.tree,u);else{let f=new Ze(e.parser.nodeSet.types[oe.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,n.tree),e.addNode(f,u)}if(n.type.is("Block")&&(Koe.indexOf(n.type.id)<0?(o=n.to-r,l=e.block.children.length):(o=a,l=c),a=n.to-r,c=e.block.children.length),!n.nextSibling())break}for(;e.block.children.length>l;)e.block.children.pop(),e.block.positions.pop();return o-s}}function q7(t,e){let n=t;for(let r=1;r<e.length;r++){let i=e[r-1].to,s=e[r].from;i<t&&(n-=s-i)}return n}const ele=Ma({"Blockquote/...":A.quote,HorizontalRule:A.contentSeparator,"ATXHeading1/... SetextHeading1/...":A.heading1,"ATXHeading2/... SetextHeading2/...":A.heading2,"ATXHeading3/...":A.heading3,"ATXHeading4/...":A.heading4,"ATXHeading5/...":A.heading5,"ATXHeading6/...":A.heading6,"Comment CommentBlock":A.comment,Escape:A.escape,Entity:A.character,"Emphasis/...":A.emphasis,"StrongEmphasis/...":A.strong,"Link/... Image/...":A.link,"OrderedList/... BulletList/...":A.list,"BlockQuote/...":A.quote,"InlineCode CodeText":A.monospace,"URL Autolink":A.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":A.processingInstruction,"CodeInfo LinkLabel":A.labelName,LinkTitle:A.string,Paragraph:A.content}),tle=new ag(new Qa(F7).extend(ele),Object.keys(Kf).map(t=>Kf[t]),Object.keys(Kf).map(t=>D7[t]),Object.keys(Kf),qoe,P7,Object.keys(Hm).map(t=>Hm[t]),Object.keys(Hm),[]);function nle(t,e,n){let r=[];for(let i=t.firstChild,s=e;;i=i.nextSibling){let o=i?i.from:n;if(o>s&&r.push({from:s,to:o}),!i)break;s=i.to}return r}function rle(t){let{codeParser:e,htmlParser:n}=t;return{wrap:eM((i,s)=>{let o=i.type.id;if(e&&(o==oe.CodeBlock||o==oe.FencedCode)){let l="";if(o==oe.FencedCode){let c=i.node.getChild(oe.CodeInfo);c&&(l=s.read(c.from,c.to))}let a=e(l);if(a)return{parser:a,overlay:c=>c.type.id==oe.CodeText,bracketed:o==oe.FencedCode}}else if(n&&(o==oe.HTMLBlock||o==oe.HTMLTag||o==oe.CommentBlock))return{parser:n,overlay:nle(i.node,i.from,i.to)};return null})}}const ile={resolve:"Strikethrough",mark:"StrikethroughMark"},sle={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":A.strikethrough}},{name:"StrikethroughMark",style:A.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let r=t.slice(n-1,n),i=t.slice(n+2,n+3),s=/\s|^$/.test(r),o=/\s|^$/.test(i),l=Su.test(r),a=Su.test(i);return t.addDelimiter(ile,n,n+2,!o&&(!a||s||l),!s&&(!l||o||a))},after:"Emphasis"}]};function Qc(t,e,n=0,r,i=0){let s=0,o=!0,l=-1,a=-1,c=!1,u=()=>{r.push(t.elt("TableCell",i+l,i+a,t.parser.parseInline(e.slice(l,a),i+l)))};for(let f=n;f<e.length;f++){let h=e.charCodeAt(f);h==124&&!c?((!o||l>-1)&&s++,o=!1,r&&(l>-1&&u(),r.push(t.elt("TableDelimiter",f+i,f+i+1))),l=a=-1):(c||h!=32&&h!=9)&&(l<0&&(l=f),a=f+1),c=!c&&h==92}return l>-1&&(s++,r&&u()),s}function v2(t,e){for(let n=e;n<t.length;n++){let r=t.charCodeAt(n);if(r==124)return!0;r==92&&n++}return!1}const Y7=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class S2{constructor(){this.rows=null}nextLine(e,n,r){if(this.rows==null){this.rows=!1;let i;if((n.next==45||n.next==58||n.next==124)&&Y7.test(i=n.text.slice(n.pos))){let s=[];Qc(e,r.content,0,s,r.start)==Qc(e,i,n.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+n.pos,e.lineStart+n.text.length)])}}else if(this.rows){let i=[];Qc(e,n.text,n.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+n.pos,e.lineStart+n.text.length,i))}return!1}finish(e,n){return this.rows?(e.addLeafElement(n,e.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const ole={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":A.heading}},"TableRow",{name:"TableCell",style:A.content},{name:"TableDelimiter",style:A.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return v2(e.content,0)?new S2:null},endLeaf(t,e,n){if(n.parsers.some(i=>i instanceof S2)||!v2(e.text,e.basePos))return!1;let r=t.peekLine();return Y7.test(r)&&Qc(t,e.text,e.basePos)==Qc(t,r,e.basePos)},before:"SetextHeading"}]};class lle{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const ale={defineNodes:[{name:"Task",block:!0,style:A.list},{name:"TaskMarker",style:A.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new lle:null},after:"SetextHeading"}]},w2=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,k2=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,cle=/[\w-]+\.[\w-]+($|\/)/,C2=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,_2=/\/[a-zA-Z\d@.]+/gy;function T2(t,e,n,r){let i=0;for(let s=e;s<n;s++)t[s]==r&&i++;return i}function ule(t,e){k2.lastIndex=e;let n=k2.exec(t);if(!n||cle.exec(n[0])[0].indexOf("_")>-1)return-1;let r=e+n[0].length;for(;;){let i=t[r-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&T2(t,e,r,")")>T2(t,e,r,"("))r--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,r))))r=e+s.index;else break}return r}function E2(t,e){C2.lastIndex=e;let n=C2.exec(t);if(!n)return-1;let r=n[0][n[0].length-1];return r=="_"||r=="-"?-1:e+n[0].length-(r=="."?1:0)}const fle={parseInline:[{name:"Autolink",parse(t,e,n){let r=n-t.offset;if(r&&/\w/.test(t.text[r-1]))return-1;w2.lastIndex=r;let i=w2.exec(t.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=ule(t.text,r+i[0].length),s>-1&&t.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(r,s));s=r+o[0].length}}else i[3]?s=E2(t.text,r):(s=E2(t.text,r+i[0].length),s>-1&&i[0]=="xmpp:"&&(_2.lastIndex=s,i=_2.exec(t.text),i&&(s=i.index+i[0].length)));return s<0?-1:(t.addElement(t.elt("URL",n,s+t.offset)),s+t.offset)}}]},hle=[ole,ale,sle,fle];function U7(t,e,n){return(r,i,s)=>{if(i!=t||r.char(s+1)==t)return-1;let o=[r.elt(n,s,s+1)];for(let l=s+1;l<r.end;l++){let a=r.char(l);if(a==t)return r.addElement(r.elt(e,s,l+1,o.concat(r.elt(n,l,l+1))));if(a==92&&o.push(r.elt("Escape",l,l+++2)),gr(a))break}return-1}}const dle={defineNodes:[{name:"Superscript",style:A.special(A.content)},{name:"SuperscriptMark",style:A.processingInstruction}],parseInline:[{name:"Superscript",parse:U7(94,"Superscript","SuperscriptMark")}]},ple={defineNodes:[{name:"Subscript",style:A.special(A.content)},{name:"SubscriptMark",style:A.processingInstruction}],parseInline:[{name:"Subscript",parse:U7(126,"Subscript","SubscriptMark")}]},gle={defineNodes:[{name:"Emoji",style:A.character}],parseInline:[{name:"Emoji",parse(t,e,n){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(t.slice(n+1,t.end)))?-1:t.addElement(t.elt("Emoji",n,n+1+r[0].length))}}]},G7=eg({commentTokens:{block:{open:"<!--",close:"-->"}}}),K7=new Re,J7=tle.configure({props:[La.add(t=>!t.is("Block")||t.is("Document")||M0(t)!=null||mle(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),K7.add(M0),Ra.add({Document:()=>null}),Rs.add({Document:G7})]});function M0(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function mle(t){return t.name=="OrderedList"||t.name=="BulletList"}function Ole(t,e){let n=t;for(;;){let r=n.nextSibling,i;if(!r||(i=M0(r.type))!=null&&i<=e)break;n=r}return n.to}const xle=oM.of((t,e,n)=>{for(let r=ot(t).resolveInner(n,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop(K7);if(i==null)continue;let s=Ole(r,i);if(s>n)return{from:n,to:s}}return null});function nv(t){return new Un(G7,t,[],"markdown")}const e4=nv(J7),yle=J7.configure([hle,ple,dle,gle,{props:[La.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),wu=nv(yle);function ble(t,e){return n=>{if(n&&t){let r=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?r=t(n):r=z.matchLanguageName(t,n,!0),r instanceof z)return r.support?r.support.language.parser:Go.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}class qm{constructor(e,n,r,i,s,o,l){this.node=e,this.from=n,this.to=r,this.spaceBefore=i,this.spaceAfter=s,this.type=o,this.item=l}blank(e,n=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;r.length<e;)r+=" ";return r}else{for(let i=this.to-this.from-r.length-this.spaceAfter.length;i>0;i--)r+=" ";return r+(n?this.spaceAfter:"")}}marker(e,n){let r=this.node.name=="OrderedList"?String(+n4(this.item,e)[2]+n):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function t4(t,e){let n=[],r=[];for(let i=t;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&n.push(i)}for(let i=n.length-1;i>=0;i--){let s=n[i],o,l=e.lineAt(s.from),a=s.from-l.from;if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(l.text.slice(a))))r.push(new qm(s,a,a+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(l.text.slice(a)))){let c=o[3],u=o[0].length;c.length>=4&&(c=c.slice(0,c.length-4),u-=4),r.push(new qm(s.parent,a,a+u,o[1],c,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(a)))){let c=o[4],u=o[0].length;c.length>4&&(c=c.slice(0,c.length-4),u-=4);let f=o[2];o[3]&&(f+=o[3].replace(/[xX]/," ")),r.push(new qm(s.parent,a,a+u,o[1],c,f,s))}}return r}function n4(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function Ym(t,e,n,r=0){for(let i=-1,s=t;;){if(s.name=="ListItem"){let l=n4(s,e),a=+l[2];if(i>=0){if(a!=i+1)return;n.push({from:s.from+l[1].length,to:s.from+l[0].length,insert:String(i+2+r)})}i=a}let o=s.nextSibling;if(!o)break;s=o}}function rv(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(Uu)!=" ")return t;let r=Nr(t,4,n),i="";for(let s=r;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+t.slice(n)}const r4=(t={})=>({state:e,dispatch:n})=>{let r=ot(e),{doc:i}=e,s=null,o=e.changeByRange(l=>{if(!l.empty||!wu.isActiveAt(e,l.from,-1)&&!wu.isActiveAt(e,l.from,1))return s={range:l};let a=l.from,c=i.lineAt(a),u=t4(r.resolveInner(a,-1),i);for(;u.length&&u[u.length-1].from>a-c.from;)u.pop();if(!u.length)return s={range:l};let f=u[u.length-1];if(f.to-f.spaceAfter.length>a-c.from)return s={range:l};let h=a>=f.to-f.spaceAfter.length&&!/\S/.test(c.text.slice(f.to));if(f.item&&h){let x=f.node.firstChild,m=f.node.getChild("ListItem","ListItem");if(x.to>=a||m&&m.to<a||c.from>0&&!/[^\s>]/.test(i.lineAt(c.from-1).text)||t.nonTightLists===!1){let y=u.length>1?u[u.length-2]:null,b,S="";y&&y.item?(b=c.from+y.from,S=y.marker(i,1)):b=c.from+(y?y.to:0);let v=[{from:b,to:a,insert:S}];return f.node.name=="OrderedList"&&Ym(f.item,i,v,-2),y&&y.node.name=="OrderedList"&&Ym(y.item,i,v),{range:H.cursor(b+S.length),changes:v}}else{let y=A2(u,e,c);return{range:H.cursor(a+y.length+1),changes:{from:c.from,insert:y+e.lineBreak}}}}if(f.node.name=="Blockquote"&&h&&c.from){let x=i.lineAt(c.from-1),m=/>\s*$/.exec(x.text);if(m&&m.index==f.from){let y=e.changes([{from:x.from+m.index,to:x.to},{from:c.from+f.from,to:c.to}]);return{range:l.map(y),changes:y}}}let d=[];f.node.name=="OrderedList"&&Ym(f.item,i,d);let p=f.item&&f.item.from<c.from,g="";if(!p||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=f.to)for(let x=0,m=u.length-1;x<=m;x++)g+=x==m&&!p?u[x].marker(i,1):u[x].blank(x<m?Nr(c.text,4,u[x+1].from)-g.length:null);let O=a;for(;O>c.from&&/\s/.test(c.text.charAt(O-c.from-1));)O--;return g=rv(g,e),vle(f.node,e.doc)&&(g=A2(u,e,c)+e.lineBreak+g),d.push({from:O,to:a,insert:e.lineBreak+g}),{range:H.cursor(O+g.length+1),changes:d}});return s?!1:(n(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},i4=r4();function P2(t){return t.name=="QuoteMark"||t.name=="ListMark"}function vle(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,r=t.getChild("ListItem","ListItem");if(!r)return!1;let i=e.lineAt(n.to),s=e.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<s.number}function A2(t,e,n){let r="";for(let i=0,s=t.length-2;i<=s;i++)r+=t[i].blank(i<s?Nr(n.text,4,t[i+1].from)-r.length:null,i<s);return rv(r,e)}function Sle(t,e){let n=t.resolveInner(e,-1),r=e;P2(n)&&(r=n.from,n=n.parent);for(let i;i=n.childBefore(r);)if(P2(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")n=i.lastChild,r=n.to;else break;return n}const s4=({state:t,dispatch:e})=>{let n=ot(t),r=null,i=t.changeByRange(s=>{let o=s.from,{doc:l}=t;if(s.empty&&wu.isActiveAt(t,s.from)){let a=l.lineAt(o),c=t4(Sle(n,o),l);if(c.length){let u=c[c.length-1],f=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(o-a.from>f&&!/\S/.test(a.text.slice(f,o-a.from)))return{range:H.cursor(a.from+f),changes:{from:a.from+f,to:o}};if(o-a.from==f&&(!u.item||a.from<=u.item.from||!/\S/.test(a.text.slice(0,u.to)))){let h=a.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(a.text.slice(u.from,u.to))){let d=u.blank(Nr(a.text,4,u.to)-Nr(a.text,4,u.from));return h==a.from&&(d=rv(d,t)),{range:H.cursor(h+d.length),changes:{from:h,to:a.from+u.to,insert:d}}}if(h<o)return{range:H.cursor(h),changes:{from:h,to:o}}}}}return r={range:s}});return r?!1:(e(t.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},o4=[{key:"Enter",run:i4},{key:"Backspace",run:s4}],l4=i7({matchClosingTags:!1});function wle(t={}){let{codeLanguages:e,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=e4,completeHTMLTags:s=!0,pasteURLAsLink:o=!0,htmlTagLanguage:l=l4}=t;if(!(i instanceof ag))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let a=t.extensions?[t.extensions]:[],c=[l.support,xle],u;o&&c.push(a4),n instanceof oa?(c.push(n.support),u=n.language):n&&(u=n);let f=e||u?ble(e,u):void 0;a.push(rle({codeParser:f,htmlParser:l.language.parser})),r&&c.push(xs.high($a.of(o4)));let h=nv(i.configure(a));return s&&c.push(h.data.of({autocomplete:kle})),new oa(h,c)}function kle(t){let{state:e,pos:n}=t,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(n-25,n));if(!r)return null;let i=ot(e).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:n-r[0].length,to:n,options:Cle(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Um=null;function Cle(){if(Um)return Um;let t=JR(new kb(je.create({extensions:l4}),0,!0));return Um=t?t.options:[]}const _le=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,a4=he.domEventHandlers({paste:(t,e)=>{var n;let{main:r}=e.state.selection;if(r.empty)return!1;let i=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!wu.isActiveAt(e.state,r.from,1)))return!1;let s=ot(e.state),o=!1;return s.iterate({from:r.from,to:r.to,enter:l=>{(l.from>r.from||_le.test(l.name))&&(o=!0)},leave:l=>{l.to<r.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),Tle=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:e4,deleteMarkupBackward:s4,insertNewlineContinueMarkup:i4,insertNewlineContinueMarkupCommand:r4,markdown:wle,markdownKeymap:o4,markdownLanguage:wu,pasteURLAsLink:a4},Symbol.toStringTag,{value:"Module"}));var Gm={exports:{}},$2;function Ele(){return $2||($2=1,(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
160
+ * Prism: Lightweight, robust, elegant syntax highlighting
161
+ *
162
+ * @license MIT <https://opensource.org/licenses/MIT>
163
+ * @author Lea Verou <https://lea.verou.me>
164
+ * @namespace
165
+ * @public
166
+ */var n=(function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,o={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function m(y){return y instanceof a?new a(y.type,m(y.content),y.alias):Array.isArray(y)?y.map(m):y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(m){return Object.prototype.toString.call(m).slice(8,-1)},objId:function(m){return m.__id||Object.defineProperty(m,"__id",{value:++s}),m.__id},clone:function m(y,b){b=b||{};var S,v;switch(l.util.type(y)){case"Object":if(v=l.util.objId(y),b[v])return b[v];S={},b[v]=S;for(var w in y)y.hasOwnProperty(w)&&(S[w]=m(y[w],b));return S;case"Array":return v=l.util.objId(y),b[v]?b[v]:(S=[],b[v]=S,y.forEach(function(_,T){S[T]=m(_,b)}),S);default:return y}},getLanguage:function(m){for(;m;){var y=i.exec(m.className);if(y)return y[1].toLowerCase();m=m.parentElement}return"none"},setLanguage:function(m,y){m.className=m.className.replace(RegExp(i,"gi"),""),m.classList.add("language-"+y)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(S){var m=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(S.stack)||[])[1];if(m){var y=document.getElementsByTagName("script");for(var b in y)if(y[b].src==m)return y[b]}return null}},isActive:function(m,y,b){for(var S="no-"+y;m;){var v=m.classList;if(v.contains(y))return!0;if(v.contains(S))return!1;m=m.parentElement}return!!b}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(m,y){var b=l.util.clone(l.languages[m]);for(var S in y)b[S]=y[S];return b},insertBefore:function(m,y,b,S){S=S||l.languages;var v=S[m],w={};for(var _ in v)if(v.hasOwnProperty(_)){if(_==y)for(var T in b)b.hasOwnProperty(T)&&(w[T]=b[T]);b.hasOwnProperty(_)||(w[_]=v[_])}var E=S[m];return S[m]=w,l.languages.DFS(l.languages,function(L,M){M===E&&L!=m&&(this[L]=w)}),w},DFS:function m(y,b,S,v){v=v||{};var w=l.util.objId;for(var _ in y)if(y.hasOwnProperty(_)){b.call(y,_,y[_],S||_);var T=y[_],E=l.util.type(T);E==="Object"&&!v[w(T)]?(v[w(T)]=!0,m(T,b,null,v)):E==="Array"&&!v[w(T)]&&(v[w(T)]=!0,m(T,b,_,v))}}},plugins:{},highlightAll:function(m,y){l.highlightAllUnder(document,m,y)},highlightAllUnder:function(m,y,b){var S={callback:b,container:m,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",S),S.elements=Array.prototype.slice.apply(S.container.querySelectorAll(S.selector)),l.hooks.run("before-all-elements-highlight",S);for(var v=0,w;w=S.elements[v++];)l.highlightElement(w,y===!0,S.callback)},highlightElement:function(m,y,b){var S=l.util.getLanguage(m),v=l.languages[S];l.util.setLanguage(m,S);var w=m.parentElement;w&&w.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(w,S);var _=m.textContent,T={element:m,language:S,grammar:v,code:_};function E(M){T.highlightedCode=M,l.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,l.hooks.run("after-highlight",T),l.hooks.run("complete",T),b&&b.call(T.element)}if(l.hooks.run("before-sanity-check",T),w=T.element.parentElement,w&&w.nodeName.toLowerCase()==="pre"&&!w.hasAttribute("tabindex")&&w.setAttribute("tabindex","0"),!T.code){l.hooks.run("complete",T),b&&b.call(T.element);return}if(l.hooks.run("before-highlight",T),!T.grammar){E(l.util.encode(T.code));return}if(y&&r.Worker){var L=new Worker(l.filename);L.onmessage=function(M){E(M.data)},L.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else E(l.highlight(T.code,T.grammar,T.language))},highlight:function(m,y,b){var S={code:m,grammar:y,language:b};if(l.hooks.run("before-tokenize",S),!S.grammar)throw new Error('The language "'+S.language+'" has no grammar.');return S.tokens=l.tokenize(S.code,S.grammar),l.hooks.run("after-tokenize",S),a.stringify(l.util.encode(S.tokens),S.language)},tokenize:function(m,y){var b=y.rest;if(b){for(var S in b)y[S]=b[S];delete y.rest}var v=new f;return h(v,v.head,m),u(m,v,y,v.head,0),p(v)},hooks:{all:{},add:function(m,y){var b=l.hooks.all;b[m]=b[m]||[],b[m].push(y)},run:function(m,y){var b=l.hooks.all[m];if(!(!b||!b.length))for(var S=0,v;v=b[S++];)v(y)}},Token:a};r.Prism=l;function a(m,y,b,S){this.type=m,this.content=y,this.alias=b,this.length=(S||"").length|0}a.stringify=function m(y,b){if(typeof y=="string")return y;if(Array.isArray(y)){var S="";return y.forEach(function(E){S+=m(E,b)}),S}var v={type:y.type,content:m(y.content,b),tag:"span",classes:["token",y.type],attributes:{},language:b},w=y.alias;w&&(Array.isArray(w)?Array.prototype.push.apply(v.classes,w):v.classes.push(w)),l.hooks.run("wrap",v);var _="";for(var T in v.attributes)_+=" "+T+'="'+(v.attributes[T]||"").replace(/"/g,"&quot;")+'"';return"<"+v.tag+' class="'+v.classes.join(" ")+'"'+_+">"+v.content+"</"+v.tag+">"};function c(m,y,b,S){m.lastIndex=y;var v=m.exec(b);if(v&&S&&v[1]){var w=v[1].length;v.index+=w,v[0]=v[0].slice(w)}return v}function u(m,y,b,S,v,w){for(var _ in b)if(!(!b.hasOwnProperty(_)||!b[_])){var T=b[_];T=Array.isArray(T)?T:[T];for(var E=0;E<T.length;++E){if(w&&w.cause==_+","+E)return;var L=T[E],M=L.inside,$=!!L.lookbehind,V=!!L.greedy,Z=L.alias;if(V&&!L.pattern.global){var Y=L.pattern.toString().match(/[imsuy]*$/)[0];L.pattern=RegExp(L.pattern.source,Y+"g")}for(var j=L.pattern||L,U=S.next,se=v;U!==y.tail&&!(w&&se>=w.reach);se+=U.value.length,U=U.next){var Q=U.value;if(y.length>m.length)return;if(!(Q instanceof a)){var me=1,de;if(V){if(de=c(j,se,m,$),!de||de.index>=m.length)break;var ke=de.index,R=de.index+de[0].length,$e=se;for($e+=U.value.length;ke>=$e;)U=U.next,$e+=U.value.length;if($e-=U.value.length,se=$e,U.value instanceof a)continue;for(var Qe=U;Qe!==y.tail&&($e<R||typeof Qe.value=="string");Qe=Qe.next)me++,$e+=Qe.value.length;me--,Q=m.slice(se,$e),de.index-=se}else if(de=c(j,0,Q,$),!de)continue;var ke=de.index,K=de[0],ne=Q.slice(0,ke),ae=Q.slice(ke+K.length),fe=se+Q.length;w&&fe>w.reach&&(w.reach=fe);var ve=U.prev;ne&&(ve=h(y,ve,ne),se+=ne.length),d(y,ve,me);var Me=new a(_,M?l.tokenize(K,M):K,Z,K);if(U=h(y,ve,Me),ae&&h(y,U,ae),me>1){var qe={cause:_+","+E,reach:fe};u(m,y,b,U.prev,se,qe),w&&qe.reach>w.reach&&(w.reach=qe.reach)}}}}}}function f(){var m={value:null,prev:null,next:null},y={value:null,prev:m,next:null};m.next=y,this.head=m,this.tail=y,this.length=0}function h(m,y,b){var S=y.next,v={value:b,prev:y,next:S};return y.next=v,S.prev=v,m.length++,v}function d(m,y,b){for(var S=y.next,v=0;v<b&&S!==m.tail;v++)S=S.next;y.next=S,S.prev=y,m.length-=v}function p(m){for(var y=[],b=m.head.next;b!==m.tail;)y.push(b.value),b=b.next;return y}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(m){var y=JSON.parse(m.data),b=y.language,S=y.code,v=y.immediateClose;r.postMessage(l.highlight(S,l.languages[b],b)),v&&r.close()},!1)),l;var g=l.util.currentScript();g&&(l.filename=g.src,g.hasAttribute("data-manual")&&(l.manual=!0));function O(){l.manual||l.highlightAll()}if(!l.manual){var x=document.readyState;x==="loading"||x==="interactive"&&g&&g.defer?document.addEventListener("DOMContentLoaded",O):window.requestAnimationFrame?window.requestAnimationFrame(O):window.setTimeout(O,16)}return l})(e);t.exports&&(t.exports=n),typeof cv<"u"&&(cv.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,s){var o={};o["language-"+s]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[s]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var l={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};l["language-"+s]={pattern:/[\s\S]+/,inside:n.languages[s]};var a={};a[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:l},n.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var s=r.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,(function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(g,O){return"✖ Error "+g+" while fetching file: "+O},s="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",a="loading",c="loaded",u="failed",f="pre[data-src]:not(["+l+'="'+c+'"]):not(['+l+'="'+a+'"])';function h(g,O,x){var m=new XMLHttpRequest;m.open("GET",g,!0),m.onreadystatechange=function(){m.readyState==4&&(m.status<400&&m.responseText?O(m.responseText):m.status>=400?x(i(m.status,m.statusText)):x(s))},m.send(null)}function d(g){var O=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(O){var x=Number(O[1]),m=O[2],y=O[3];return m?y?[x,Number(y)]:[x,void 0]:[x,x]}}n.hooks.add("before-highlightall",function(g){g.selector+=", "+f}),n.hooks.add("before-sanity-check",function(g){var O=g.element;if(O.matches(f)){g.code="",O.setAttribute(l,a);var x=O.appendChild(document.createElement("CODE"));x.textContent=r;var m=O.getAttribute("data-src"),y=g.language;if(y==="none"){var b=(/\.(\w+)$/.exec(m)||[,"none"])[1];y=o[b]||b}n.util.setLanguage(x,y),n.util.setLanguage(O,y);var S=n.plugins.autoloader;S&&S.loadLanguages(y),h(m,function(v){O.setAttribute(l,c);var w=d(O.getAttribute("data-range"));if(w){var _=v.split(/\r\n?|\n/g),T=w[0],E=w[1]==null?_.length:w[1];T<0&&(T+=_.length),T=Math.max(0,Math.min(T-1,_.length)),E<0&&(E+=_.length),E=Math.max(0,Math.min(E,_.length)),v=_.slice(T,E).join(`
167
+ `),O.hasAttribute("data-start")||O.setAttribute("data-start",String(T+1))}x.textContent=v,n.highlightElement(x)},function(v){O.setAttribute(l,u),x.textContent=v})}}),n.plugins.fileHighlight={highlight:function(O){for(var x=(O||document).querySelectorAll(f),m=0,y;y=x[m++];)n.highlightElement(y)}};var p=!1;n.fileHighlight=function(){p||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),p=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(Gm)),Gm.exports}Ele();Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&amp;/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var s={};s[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(u){return u=u.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+u+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(u){["url","bold","italic","strike","code-snippet"].forEach(function(f){u!==f&&(t.languages.markdown[u].inside.content.inside[f]=t.languages.markdown[f])})}),t.hooks.add("after-tokenize",function(u){if(u.language!=="markdown"&&u.language!=="md")return;function f(h){if(!(!h||typeof h=="string"))for(var d=0,p=h.length;d<p;d++){var g=h[d];if(g.type!=="code"){f(g.content);continue}var O=g.content[1],x=g.content[3];if(O&&x&&O.type==="code-language"&&x.type==="code-block"&&typeof O.content=="string"){var m=O.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase();var y="language-"+m;x.alias?typeof x.alias=="string"?x.alias=[x.alias,y]:x.alias.push(y):x.alias=[y]}}}f(u.tokens)}),t.hooks.add("wrap",function(u){if(u.type==="code-block"){for(var f="",h=0,d=u.classes.length;h<d;h++){var p=u.classes[h],g=/language-(.+)/.exec(p);if(g){f=g[1];break}}var O=t.languages[f];if(O)u.content=t.highlight(c(u.content),O,f);else if(f&&f!=="none"&&t.plugins.autoloader){var x="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);u.attributes.id=x,t.plugins.autoloader.loadLanguages(f,function(){var m=document.getElementById(x);m&&(m.innerHTML=t.highlight(m.textContent,t.languages[f],f))})}}});var o=RegExp(t.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},a=String.fromCodePoint||String.fromCharCode;function c(u){var f=u.replace(o,"");return f=f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(h,d){if(d=d.toLowerCase(),d[0]==="#"){var p;return d[1]==="x"?p=parseInt(d.slice(2),16):p=Number(d.slice(1)),a(p)}else{var g=l[d];return g||h}}),f}t.languages.md=t.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(t){var e=t.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}})(Prism);var Q2={},M2;function Ple(){return M2||(M2=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),Q2}Ple();var R2={},L2;function Ale(){return L2||(L2=1,(function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Prism)),R2}Ale();Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=Prism.languages.swift});var I2={},N2;function $le(){return N2||(N2=1,(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript})(Prism)),I2}$le();var D2={},V2;function Qle(){return V2||(V2=1,(function(t){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),D2}Qle();var F2={},B2;function Mle(){return B2||(B2=1,(function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])})(Prism)),F2}Mle();function c4(t,e){for(const n of t.childNodes){if(gi(n)&&n.tagName===e)return!0;c4(n,e)}return!1}const uc="data-language",tc="data-highlight-language",eh="data-theme";class nf extends ts{static getType(){return"code"}static clone(e){return new nf(e.__language,e.__key)}constructor(e,n){super(n),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){const n=document.createElement("code");Lr(n,e.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(uc,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(tc,r));const i=this.getTheme();i&&n.setAttribute(eh,i);const s=this.getStyle();return s&&n.setAttribute("style",s),n}updateDOM(e,n,r){const i=this.__language,s=e.__language;i?i!==s&&n.setAttribute(uc,i):s&&n.removeAttribute(uc);const o=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&s?o&&i?i!==s&&n.setAttribute(tc,i):n.removeAttribute(tc):o&&i&&n.setAttribute(tc,i);const l=this.__theme,a=e.__theme;l?l!==a&&n.setAttribute(eh,l):a&&n.removeAttribute(eh);const c=this.__style,u=e.__style;return c?c!==u&&n.setAttribute("style",c):u&&n.removeAttribute("style"),!1}exportDOM(e){const n=document.createElement("pre");Lr(n,e._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(uc,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(tc,r));const i=this.getTheme();i&&n.setAttribute(eh,i);const s=this.getStyle();return s&&n.setAttribute("style",s),{element:n}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||c4(e,"BR"))?{conversion:Z2,priority:1}:null,div:()=>({conversion:Rle,priority:1}),pre:()=>({conversion:Z2,priority:0}),table:e=>Km(e)?{conversion:Lle,priority:3}:null,td:e=>{const n=e,r=n.closest("table");return n.classList.contains("js-file-line")||r&&Km(r)?{conversion:z2,priority:3}:null},tr:e=>{const n=e.closest("table");return n&&Km(n)?{conversion:z2,priority:3}:null}}}static importJSON(e){return zi().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,n=!0){const r=this.getChildren(),i=r.length;if(i>=2&&r[i-1].getTextContent()===`
168
+ `&&r[i-2].getTextContent()===`
169
+ `&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===i){r[i-1].remove(),r[i-2].remove();const a=St();return this.insertAfter(a,n),a}const{anchor:s,focus:o}=e,l=(s.isBefore(o)?s:o).getNode();if(tt(l)){let a=Nle(l);const c=[];for(;;)if(aA(a))c.push(Gx()),a=a.getNextSibling();else{if(!d4(a))break;{let O=0;const x=a.getTextContent(),m=a.getTextContentSize();for(;O<m&&x[O]===" ";)O++;if(O!==0&&c.push(h4(" ".repeat(O))),O!==m)break;a=a.getNextSibling()}}const u=l.splitText(s.offset)[0],f=s.offset===0?0:1,h=u.getIndexWithinParent()+f,d=l.getParentOrThrow(),p=[Yl(),...c];d.splice(h,0,p);const g=c[c.length-1];g?g.select():s.offset===0?u.selectPrevious():u.getNextSibling().selectNext(0,0)}if(iv(l)){const{offset:a}=e.anchor;l.splice(a,0,[Yl()]),l.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const e=St();return this.getChildren().forEach((n=>e.append(n))),this.replace(e),!0}setLanguage(e){const n=this.getWritable();return n.__language=e||void 0,n}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){const n=this.getWritable();return n.__isSyntaxHighlightSupported=e,n}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){const n=this.getWritable();return n.__theme=e||void 0,n}getTheme(){return this.getLatest().__theme}}function zi(t,e){return FD(nf).setLanguage(t).setTheme(e)}function iv(t){return t instanceof nf}function Z2(t){return{node:zi(t.getAttribute(uc))}}function Rle(t){const e=t,n=X2(e);return n||(function(r){let i=r.parentElement;for(;i!==null;){if(X2(i))return!0;i=i.parentElement}return!1})(e)?{node:n?zi():null}:{node:null}}function Lle(){return{node:zi()}}function z2(){return{node:null}}function X2(t){return t.style.fontFamily.match("monospace")!==null}function Km(t){return t.classList.contains("js-file-line-container")}let u4=class f4 extends Mp{constructor(e="",n,r){super(e,r),this.__highlightType=n}static getType(){return"code-highlight"}static clone(e){return new f4(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){const n=this.getWritable();return n.__highlightType=e||void 0,n}canHaveFormat(){return!1}createDOM(e){const n=super.createDOM(e),r=Jm(e.theme,this.__highlightType);return Lr(n,r),n}updateDOM(e,n,r){const i=super.updateDOM(e,n,r),s=Jm(r.theme,e.__highlightType),o=Jm(r.theme,this.__highlightType);return s!==o&&(s&&Lp(n,s),o&&Lr(n,o)),i}static importJSON(e){return h4().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return zi()}};function Jm(t,e){return e&&t&&t.codeHighlight&&t.codeHighlight[e]}function h4(t="",e){return cs(new u4(t,e))}function d4(t){return t instanceof u4}function Ile(t,e){let n=t;for(let r=Kx(t,e);r&&(d4(r.origin)||aA(r.origin));r=QV(r))n=r.origin;return n}function Nle(t){return Ile(t,"previous")}(function(t){t.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var e={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(e).forEach((function(n){var r=e[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),n==="diff"&&i.push("bold"),t.languages.diff[n]={pattern:RegExp("^(?:["+r+`].*(?:\r
170
+ ?|
171
+ |(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(t.languages.diff,"PREFIXES",{value:e})})(Prism);function R0(t,e){const n={};for(const r of t){const i=e(r);i&&(n[i]?n[i].push(r):n[i]=[r])}return n}function Dle(t){const e=R0(t,(n=>n.type));return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const W2=/[!-/:-@[-`{-~\s]/;function Vle(t){return tt(t)&&!t.hasFormat("code")}function Fle(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function j2(t,e,n){const r=n.length;for(let i=e;i>=r;i--){const s=i-r;if(p4(t,s,n,0,r)&&t[s+r]!==" ")return s}return-1}function p4(t,e,n,r,i){for(let s=0;s<i;s++)if(t[e+s]!==n[r+s])return!1;return!0}function Ble(t,e=T4){const n=Dle(e),r=R0(n.textFormat,(({tag:o})=>o[o.length-1])),i=R0(n.textMatch,(({trigger:o})=>o));for(const o of e){const l=o.type;if(l==="element"||l==="text-match"||l==="multiline-element"){const a=o.dependencies;for(const c of a)t.hasNode(c)||Fle(173,c.getType())}}const s=(o,l,a)=>{(function(c,u,f,h){const d=c.getParent();if(!ar(d)||c.getFirstChild()!==u)return!1;const p=u.getTextContent();if(p[f-1]!==" ")return!1;for(const{regExp:g,replace:O}of h){const x=p.match(g);if(x&&x[0].length===(x[0].endsWith(" ")?f:f-1)){const m=u.getNextSiblings(),[y,b]=u.splitText(f);if(O(c,b?[b,...m]:m,x,!1)!==!1)return y.remove(),!0}}return!1})(o,l,a,n.element)||(function(c,u,f,h){const d=c.getParent();if(!ar(d)||c.getFirstChild()!==u)return!1;const p=u.getTextContent();if(p[f-1]!==" ")return!1;for(const{regExpStart:g,replace:O,regExpEnd:x}of h){if(x&&!("optional"in x)||x&&"optional"in x&&!x.optional)continue;const m=p.match(g);if(m&&m[0].length===(m[0].endsWith(" ")?f:f-1)){const y=u.getNextSiblings(),[b,S]=u.splitText(f);if(O(c,S?[S,...y]:y,m,null,null,!1)!==!1)return b.remove(),!0}}return!1})(o,l,a,n.multilineElement)||(function(c,u,f){let h=c.getTextContent();const d=f[h[u-1]];if(d==null)return!1;u<h.length&&(h=h.slice(0,u));for(const p of d){if(!p.replace||!p.regExp)continue;const g=h.match(p.regExp);if(g===null)continue;const O=g.index||0,x=O+g[0].length;let m;return O===0?[m]=c.splitText(x):[,m]=c.splitText(O,x),m.selectNext(0,0),p.replace(m,g),!0}return!1})(l,a,i)||(function(c,u,f){const h=c.getTextContent(),d=u-1,p=h[d],g=f[p];if(!g)return!1;for(const O of g){const{tag:x}=O,m=x.length,y=d-m+1;if(m>1&&!p4(h,y,x,0,m)||h[y-1]===" ")continue;const b=h[d+1];if(O.intraword===!1&&b&&!W2.test(b))continue;const S=c;let v=S,w=j2(h,y,x),_=v;for(;w<0&&(_=_.getPreviousSibling())&&!Iu(_);)if(tt(_)){if(_.hasFormat("code"))continue;const j=_.getTextContent();v=_,w=j2(j,j.length,x)}if(w<0||v===S&&w+m===y)continue;const T=v.getTextContent();if(w>0&&T[w-1]===p)continue;const E=T[w-1];if(O.intraword===!1&&E&&!W2.test(E))continue;const L=S.getTextContent(),M=L.slice(0,y)+L.slice(d+1);S.setTextContent(M);const $=v===S?M:T;v.setTextContent($.slice(0,w)+$.slice(w+m));const V=be(),Z=Lu();yi(Z);const Y=d-m*(v===S?2:1)+1;Z.anchor.set(v.__key,w,"text"),Z.focus.set(S.__key,Y,"text");for(const j of O.format)Z.hasFormat(j)||Z.formatText(j);Z.anchor.set(Z.focus.key,Z.focus.offset,Z.focus.type);for(const j of O.format)Z.hasFormat(j)&&Z.toggleFormat(j);return Se(V)&&(Z.format=V.format),!0}})(l,a,r)};return t.registerUpdateListener((({tags:o,dirtyLeaves:l,editorState:a,prevEditorState:c})=>{if(o.has(nV)||o.has(ed)||t.isComposing())return;const u=a.read(be),f=c.read(be);if(!Se(f)||!Se(u)||!u.isCollapsed()||u.is(f))return;const h=u.anchor.key,d=u.anchor.offset,p=a._nodeMap.get(h);!tt(p)||!l.has(h)||d!==1&&d>f.anchor.offset+1||t.update((()=>{if(!Vle(p))return;const g=p.getParent();g===null||iv(g)||s(g,p,u.anchor.offset)}))}))}const Zle=/^(\s*)(\d{1,})\.\s/,zle=/^(\s*)[-*+]\s/,Xle=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,Wle=/^(#{1,6})\s/,jle=/^>\s/,Hle=/^[ \t]*```([\w-]+)?/,qle=/[ \t]*```$/,g4=t=>(e,n,r,i)=>{const s=t(r);s.append(...n),e.replace(s),i||s.select(0,0)},sv=t=>(e,n,r,i)=>{const s=e.getPreviousSibling(),o=e.getNextSibling(),l=Sn(t==="check"?r[3]==="x":void 0);if(Ee(o)&&o.getListType()===t){const c=o.getFirstChild();c!==null?c.insertBefore(l):o.append(l),e.remove()}else if(Ee(s)&&s.getListType()===t)s.append(l),e.remove();else{const c=yn(t,t==="number"?Number(r[2]):void 0);c.append(l),e.replace(c)}l.append(...n),i||l.select(0,0);const a=(function(c){const u=c.match(/\t/g),f=c.match(/ /g);let h=0;return u&&(h+=u.length),f&&(h+=Math.floor(f.length/4)),h})(r[1]);a&&l.setIndent(a)},cg=(t,e,n)=>{const r=[],i=t.getChildren();let s=0;for(const o of i)if(De(o)){if(o.getChildrenSize()===1){const u=o.getFirstChild();if(Ee(u)){r.push(cg(u,e,n+1));continue}}const l=" ".repeat(4*n),a=t.getListType(),c=a==="number"?`${t.getStart()+s}. `:a==="check"?`- [${o.getChecked()?"x":" "}] `:"- ";r.push(l+c+e(o)),s++}return r.join(`
172
+ `)},Yle={dependencies:[Du],export:(t,e)=>{if(!Ul(t))return null;const n=Number(t.getTag().slice(1));return"#".repeat(n)+" "+e(t)},regExp:Wle,replace:g4((t=>{const e="h"+t[1].length;return Bi(e)})),type:"element"},m4={dependencies:[Ip],export:(t,e)=>{if(!XO(t))return null;const n=e(t).split(`
173
+ `),r=[];for(const i of n)r.push("> "+i);return r.join(`
174
+ `)},regExp:jle,replace:(t,e,n,r)=>{if(r){const s=t.getPreviousSibling();if(XO(s))return s.splice(s.getChildrenSize(),0,[Yl(),...e]),void t.remove()}const i=Np();i.append(...e),t.replace(i),r||i.select(0,0)},type:"element"},O4={dependencies:[nf],export:t=>{if(!iv(t))return null;const e=t.getTextContent();return"```"+(t.getLanguage()||"")+(e?`
175
+ `+e:"")+"\n```"},regExpEnd:{optional:!0,regExp:qle},regExpStart:Hle,replace:(t,e,n,r,i,s)=>{let o,l;if(!e&&i){if(i.length===1)r?(o=zi(),l=n[1]+i[0]):(o=zi(n[1]),l=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{if(o=zi(n[1]),i[0].trim().length===0)for(;i.length>0&&!i[0].length;)i.shift();else i[0]=i[0].startsWith(" ")?i[0].slice(1):i[0];for(;i.length>0&&!i[i.length-1].length;)i.pop();l=i.join(`
176
+ `)}const a=pi(l);o.append(a),t.append(o)}else e&&g4((a=>zi(a?a[1]:void 0)))(t,e,n,s)},type:"multiline-element"},ov={dependencies:[Os,ms],export:(t,e)=>Ee(t)?cg(t,e,0):null,regExp:zle,replace:sv("bullet"),type:"element"},x4={dependencies:[Os,ms],export:(t,e)=>Ee(t)?cg(t,e,0):null,regExp:Xle,replace:sv("check"),type:"element"},lv={dependencies:[Os,ms],export:(t,e)=>Ee(t)?cg(t,e,0):null,regExp:Zle,replace:sv("number"),type:"element"},y4={format:["code"],tag:"`",type:"text-format"},Ule={format:["highlight"],tag:"==",type:"text-format"},b4={format:["bold","italic"],tag:"***",type:"text-format"},v4={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},S4={format:["bold"],tag:"**",type:"text-format"},w4={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Gle={format:["strikethrough"],tag:"~~",type:"text-format"},k4={format:["italic"],tag:"*",type:"text-format"},C4={format:["italic"],intraword:!1,tag:"_",type:"text-format"},_4={dependencies:[gs],export:(t,e,n)=>{if(!Tn(t)||Sr(t))return null;const r=t.getTitle(),i=e(t);return r?`[${i}](${t.getURL()} "${r}")`:`[${i}](${t.getURL()})`},importRegExp:/(?:\[(.*?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[(.*?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,e)=>{const[,n,r,i]=e,s=rs(r,{title:i}),o=n.split("[").length-1,l=n.split("]").length-1;let a=n,c="";if(o<l)return;if(o>l){const f=n.split("[");c="["+f[0],a=f.slice(1).join("[")}const u=pi(a);return u.setFormat(t.getFormat()),s.append(u),t.replace(s),c&&s.insertBefore(pi(c)),u},trigger:")",type:"text-match"},Kle=[Yle,m4,ov,lv],Jle=[O4],eae=[y4,b4,v4,S4,w4,Ule,k4,C4,Gle],tae=[_4],T4=[...Kle,...Jle,...eae,...tae],nae=[{dependencies:[Zu],export:t=>ky(t)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(t,e,n,r)=>{const i=Ea();r||t.getNextSibling()!=null?t.replace(i):t.insertBefore(i),i.selectNext()},type:"element"},...T4];function eO({transformers:t=nae}){const[e]=hn();return C.useEffect((()=>Ble(e,t)),[e,t]),null}const jae=dr({init(t){const e=t.getValue(u3),n=e.includes("headings")?t.getValue(wy):[],r=oae(e,n),i=r.filter(s=>!sae.has(s));t.pubIn({[il]:()=>k.createElement(eO,{transformers:r}),[by]:()=>k.createElement(eO,{transformers:r}),[c3]:()=>k.createElement(eO,{transformers:i})})}}),rae=t=>(e,n,r)=>{const i=t(r);i.append(...n),e.replace(i),i.select(0,0)},iae={dependencies:[Zu],export:t=>ky(t)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(t,e,n,r)=>{const i=Ea();r||t.getNextSibling()!=null?t.replace(i):t.insertBefore(i),i.selectNext()},type:"element"},sae=new Set([lv,ov,x4]);function oae(t,e){const n=[b4,v4,S4,w4,y4,k4,C4];if(t.includes("headings")){const r=Math.min(...e),i=Math.max(...e),s=new RegExp(`^(#{${r},${i}})\\s`),o={dependencies:[Du],export:(l,a)=>{if(!Ul(l))return null;const c=Number(l.getTag().slice(1));return"#".repeat(c)+" "+a(l)},regExp:s,replace:rae(l=>{const a=`h${l[1].length}`;return Bi(a)}),type:"element"};n.push(o)}if(t.includes("thematicBreak")&&n.push(iae),t.includes("quote")&&n.push(m4),t.includes("link")&&n.push(_4),t.includes("lists")&&n.push(lv,ov,x4),t.includes("codeblock")){const r={...O4,dependencies:[Aa],replace:(i,s,o)=>{const l=Wu({code:"",language:o[1]??"",meta:""});i.selectPrevious(),i.replace(l),setTimeout(()=>{l.select()},80)}};n.push(r)}return n}export{ku as $,ro as A,gt as B,xR as C,fn as D,Jn as E,ls as F,Vs as G,gI as H,et as I,mI as J,Yd as K,ia as L,ip as M,J9 as N,Cu as O,ze as P,pa as Q,q0 as R,sp as S,J2 as T,I0 as U,G0 as V,V4 as W,L0 as X,Kd as Y,Ud as Z,xt as _,oa as a,Ql as a$,J5 as a0,Y0 as a1,$o as a2,U0 as a3,Y2 as a4,Lv as a5,uae as a6,hE as a7,dE as a8,pE as a9,Tn as aA,Qae as aB,_ae as aC,Tae as aD,Pae as aE,Rae as aF,Aae as aG,$ae as aH,Xae as aI,Eae as aJ,Lae as aK,Voe as aL,zae as aM,jae as aN,bae as aO,Sae as aP,st as aQ,$X as aR,wae as aS,XB as aT,vae as aU,ly as aV,ZB as aW,Mae as aX,nw as aY,Mi as aZ,aF as a_,gE as aa,dN as ab,fE as ac,J0 as ad,pae as ae,t6 as af,ex as ag,cI as ah,uI as ai,fI as aj,hI as ak,pI as al,dI as am,dae as an,hae as ao,gs as ap,dr as aq,r3 as ar,vA as as,NO as at,SA as au,be as av,Qt as aw,Se as ax,Be as ay,tt as az,ate as b,fF as b0,rq as b1,jH as b2,hF as b3,cq as b4,HH as b5,Yn as b6,Gr as b7,yt as b8,WO as b9,Vp as ba,He as bb,FZ as bc,cF as bd,dq as be,zH as bf,N6 as bg,k6 as bh,C6 as bi,T6 as bj,_6 as bk,E6 as bl,P6 as bm,A6 as bn,$6 as bo,gae as bp,Q6 as bq,mae as br,Oae as bs,_h as c,TM as d,la as e,La as f,ot as g,he as h,Ra as i,H as j,i7 as k,Cee as l,Vd as m,kR as n,lM as o,eM as p,ur as q,_ee as r,Ma as s,A as t,Cn as u,bM as v,W as w,Yi as x,Xi as y,Ne as z};