@decocms/mesh 1.4.0 → 1.4.1

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 (115) hide show
  1. package/dist/client/assets/{AlertCircle-D6b9Ralv.js → AlertCircle-D8Ig6VmI.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-CmZRAub5.js → ArrowLeft-Dh26Pdy9.js} +1 -1
  3. package/dist/client/assets/{ChevronDown-xjFrqe8j.js → ChevronDown-ePEWgGNp.js} +1 -1
  4. package/dist/client/assets/{Clock-Bqlp1mni.js → Clock-D62M1TNS.js} +1 -1
  5. package/dist/client/assets/{Code01-B3S249hz.js → Code01-CEpWMfIN.js} +1 -1
  6. package/dist/client/assets/{Copy01-D0tR5TRJ.js → Copy01-Do_2DOpc.js} +1 -1
  7. package/dist/client/assets/{CpuChip02-BJZ8c2R6.js → CpuChip02-MwRKuQCg.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-0Pg6f15X.js → DotsVertical-DEHJGPWq.js} +1 -1
  9. package/dist/client/assets/{File06-BzST8Ux5.js → File06-C6gmiM2R.js} +1 -1
  10. package/dist/client/assets/{FlipBackward-J5E6LFga.js → FlipBackward-C_yTzrjj.js} +1 -1
  11. package/dist/client/assets/{GitBranch01-C9tViAi-.js → GitBranch01-BytyqHyB.js} +1 -1
  12. package/dist/client/assets/{Grid01-DETN8WPx.js → Grid01-C9Qy-QMm.js} +1 -1
  13. package/dist/client/assets/{Inbox01-DxqBKn7H.js → Inbox01-D6ujw7pC.js} +1 -1
  14. package/dist/client/assets/{Key01-B-GFSqTW.js → Key01-DyKOY05D.js} +1 -1
  15. package/dist/client/assets/{LinkExternal01-D-pWR4LA.js → LinkExternal01-R8UsBwpd.js} +1 -1
  16. package/dist/client/assets/{Loading01-CpvGD3vr.js → Loading01-CYe6KHQ_.js} +1 -1
  17. package/dist/client/assets/{Lock01-DbWcWM_K.js → Lock01-V21nJrKX.js} +1 -1
  18. package/dist/client/assets/{Play-D0iqjftf.js → Play-BbVWnniF.js} +1 -1
  19. package/dist/client/assets/{Plus-Df5PHguC.js → Plus-B_341Z-m.js} +1 -1
  20. package/dist/client/assets/{SearchMd-BSF-Glwf.js → SearchMd-CTe41Otq.js} +1 -1
  21. package/dist/client/assets/{Terminal-Cw0wmZeh.js → Terminal-D1uJm4u2.js} +1 -1
  22. package/dist/client/assets/{Trash01-DPFHmwKr.js → Trash01-nRDGqZAh.js} +1 -1
  23. package/dist/client/assets/{X-D8XIiJvQ.js → X-SbhTNlq-.js} +1 -1
  24. package/dist/client/assets/{XClose-B_hUkeVk.js → XClose-UocnKXyW.js} +1 -1
  25. package/dist/client/assets/{alert-dialog-CbCWAnT3.js → alert-dialog-BU4z5vIU.js} +1 -1
  26. package/dist/client/assets/{auth-PKeXnxbM.js → auth-DrOI2Q5h.js} +1 -1
  27. package/dist/client/assets/{auth-catchall-Wppyfaii.js → auth-catchall-hi9HLq14.js} +1 -1
  28. package/dist/client/assets/{avatar-g2HizpCv.js → avatar-DYifUjuR.js} +1 -1
  29. package/dist/client/assets/{badge-DpuZDXUE.js → badge-0sGir89N.js} +1 -1
  30. package/dist/client/assets/{button-hWHuMvle.js → button-DekBQWZX.js} +1 -1
  31. package/dist/client/assets/{card-Cdw91ud0.js → card-CjPFi-mt.js} +1 -1
  32. package/dist/client/assets/{checkbox-C8hkq1Ob.js → checkbox-DWBjIr3c.js} +1 -1
  33. package/dist/client/assets/{collection-detail-BhlzVbA_.js → collection-detail-CFyCCxRq.js} +1 -1
  34. package/dist/client/assets/{collection-display-button-DJTB2EUg.js → collection-display-button-CcmMGuN1.js} +1 -1
  35. package/dist/client/assets/{collection-header-BxKOSRWd.js → collection-header-BzcsMkVk.js} +1 -1
  36. package/dist/client/assets/{collection-page-BDy0PpkC.js → collection-page-JhE-nlZe.js} +1 -1
  37. package/dist/client/assets/{collection-search-BoabZo7c.js → collection-search-D31FObj2.js} +1 -1
  38. package/dist/client/assets/{collection-tab-y3dKzpme.js → collection-tab-CislJm1o.js} +1 -1
  39. package/dist/client/assets/{collection-table-wrapper-BERroKt9.js → collection-table-wrapper-DttYG93Q.js} +1 -1
  40. package/dist/client/assets/{connection-card-si8Xv84Q.js → connection-card-Po1O1myw.js} +1 -1
  41. package/dist/client/assets/{connection-detail-D8qvOGFn.js → connection-detail-CCe4qpmo.js} +1 -1
  42. package/dist/client/assets/{connections-D7K8Q8og.js → connections-CAn295jL.js} +1 -1
  43. package/dist/client/assets/constants-BP-f87DW.js +1 -0
  44. package/dist/client/assets/{core-BAd4uKi4.js → core-CQOpJFuu.js} +1 -1
  45. package/dist/client/assets/{create-organization-dialog-D4tz0eZI.js → create-organization-dialog-BHcS-HWr.js} +1 -1
  46. package/dist/client/assets/{dialog-HUu8pjnY.js → dialog-B48I0mf9.js} +1 -1
  47. package/dist/client/assets/{dropdown-menu-DG5cxUDL.js → dropdown-menu-DEOghZY2.js} +1 -1
  48. package/dist/client/assets/{empty-state-m_IydCcr.js → empty-state-DPKHlkpV.js} +1 -1
  49. package/dist/client/assets/{env-vars-editor-kSmLn72b.js → env-vars-editor-siosgJYU.js} +1 -1
  50. package/dist/client/assets/{error-boundary-B-QcFATa.js → error-boundary-BU7ytqKh.js} +1 -1
  51. package/dist/client/assets/{extract-connection-data-CjCzbgf3.js → extract-connection-data-CNwfi3Bj.js} +1 -1
  52. package/dist/client/assets/{form-B-xqHHYa.js → form-idjG_l3J.js} +1 -1
  53. package/dist/client/assets/{formatDistanceToNow-B3w53gnj.js → formatDistanceToNow-BvbEbggm.js} +1 -1
  54. package/dist/client/assets/gateway-detail-CojPNuj0.js +1 -0
  55. package/dist/client/assets/{gateways-Bfk7wW4H.js → gateways-BMARnVs9.js} +1 -1
  56. package/dist/client/assets/{home-B2CMLWdT.js → home-C44O4JPT.js} +1 -1
  57. package/dist/client/assets/{index-Bs52vOb7.js → index-DRz67w4F.js} +1 -1
  58. package/dist/client/assets/{index-CXiBzYKD.js → index-DajdRBtQ.js} +5 -5
  59. package/dist/client/assets/{index-BI-brnHc.js → index-IR-O--2-.js} +1 -1
  60. package/dist/client/assets/{index-B9HSZhdB.js → index-Wt1f1puE.js} +3 -3
  61. package/dist/client/assets/{input-DcZE4UoL.js → input-BKIlqldN.js} +1 -1
  62. package/dist/client/assets/json-DJFsnV6J.js +1 -0
  63. package/dist/client/assets/{json-syntax-highlighter-Czp62O9j.js → json-syntax-highlighter-iaFBJPMB.js} +2 -2
  64. package/dist/client/assets/{layout-B5ADxfcB.js → layout-DZ2ngf-d.js} +1 -1
  65. package/dist/client/assets/{lazy-highlighter-Z2qArbl8.js → lazy-highlighter-DzPyG_7U.js} +1 -1
  66. package/dist/client/assets/{localstorage-keys-DZPXAcMr.js → localstorage-keys-DywUtnFx.js} +1 -1
  67. package/dist/client/assets/{login-BX781KlF.js → login-DV7ZXMS3.js} +1 -1
  68. package/dist/client/assets/{mcp-oauth-PzyAfNM8.js → mcp-oauth-CoHdTRs8.js} +1 -1
  69. package/dist/client/assets/{members-D9riafGS.js → members-BSXMpEiy.js} +1 -1
  70. package/dist/client/assets/{monitoring-Bz-yKjJ1.js → monitoring-jd56r5aO.js} +1 -1
  71. package/dist/client/assets/{oauth-callback-CTNcTDd4.js → oauth-callback-DWPZPLpo.js} +1 -1
  72. package/dist/client/assets/{page-DF6IrrZD.js → page-8jW60JQy.js} +1 -1
  73. package/dist/client/assets/{pin-to-sidebar-button-CJEwje2A.js → pin-to-sidebar-button-kBAZ-5ye.js} +1 -1
  74. package/dist/client/assets/{popover-DOwrFuly.js → popover-BOM-Ldjy.js} +1 -1
  75. package/dist/client/assets/prism-light-uO9D9BzO.js +1 -0
  76. package/dist/client/assets/{resizable-C0OMnsnz.js → resizable-CJZIf7G0.js} +1 -1
  77. package/dist/client/assets/{resource-tabs-BBkx9rqd.js → resource-tabs-Ce7H16gk.js} +1 -1
  78. package/dist/client/assets/{responsive-select-Bl1ZcUtI.js → responsive-select-BwKgIRfG.js} +1 -1
  79. package/dist/client/assets/{select-l2DSo1hq.js → select-BfMeJf3G.js} +1 -1
  80. package/dist/client/assets/{settings-CWXxNDHw.js → settings-3-JCtPNJ.js} +1 -1
  81. package/dist/client/assets/shell-layout-CdWK4rD-.js +19 -0
  82. package/dist/client/assets/{spinner-BtMKC1U7.js → spinner-DRqaN8gi.js} +1 -1
  83. package/dist/client/assets/{store-_81OANVP.js → store-Do1Cu7xx.js} +1 -1
  84. package/dist/client/assets/{store-app-detail-CuCWq6-w.js → store-app-detail-CTTgc-e9.js} +1 -1
  85. package/dist/client/assets/{switch-BOFMRhtg.js → switch-Dw1RG-3y.js} +1 -1
  86. package/dist/client/assets/{textarea-BoUne3Q6.js → textarea-Bft7ABhA.js} +1 -1
  87. package/dist/client/assets/thread-history-popover-Bi9mj2yY.js +98 -0
  88. package/dist/client/assets/{tools-list-D5n3plgQ.js → tools-list-Ce6AdOzS.js} +1 -1
  89. package/dist/client/assets/{tooltip-DxQ-KPX4.js → tooltip-TfGvrkSe.js} +1 -1
  90. package/dist/client/assets/{types-8dJFzoWN.js → types-Cnps3aja.js} +1 -1
  91. package/dist/client/assets/{use-binding-Ccb4SpbZ.js → use-binding-C0D0SiIL.js} +1 -1
  92. package/dist/client/assets/{use-connection-BfQqOvPU.js → use-connection-Bw5VjMDS.js} +1 -1
  93. package/dist/client/assets/{use-connection-resources-BuPCYNbb.js → use-connection-resources-G46B63hU.js} +1 -1
  94. package/dist/client/assets/{use-gateway-BWSXRpvE.js → use-gateway-Bcu8DfzG.js} +1 -1
  95. package/dist/client/assets/{use-list-state-qFWsDnqD.js → use-list-state-BFqdzcLT.js} +1 -1
  96. package/dist/client/assets/{use-mcp-40LwnzhO.js → use-mcp-BQdB6WDZ.js} +1 -1
  97. package/dist/client/assets/{use-members-BorgQnCE.js → use-members-Du1Rfr_g.js} +1 -1
  98. package/dist/client/assets/{use-mobile-v3aq_7jb.js → use-mobile-DxFWm-MR.js} +1 -1
  99. package/dist/client/assets/{use-organization-settings-QpyD7U2T.js → use-organization-settings-DNW7rc_y.js} +1 -1
  100. package/dist/client/assets/{use-tool-call-CLKWIhEj.js → use-tool-call-D3fXWIz8.js} +1 -1
  101. package/dist/client/assets/useQuery-xVxOaLKm.js +1 -0
  102. package/dist/client/assets/{useSuspenseInfiniteQuery-DUZsUnhN.js → useSuspenseInfiniteQuery-BUiIWXaf.js} +1 -1
  103. package/dist/client/assets/{view-mode-toggle-C9GLUxuG.js → view-mode-toggle-CP1Lj0do.js} +1 -1
  104. package/dist/client/assets/{workflow-DJAFzntg.js → workflow-IxqE_uwj.js} +1 -1
  105. package/dist/client/index.html +1 -1
  106. package/dist/server/cli.js +1 -1
  107. package/dist/server/server.js +1 -1
  108. package/package.json +1 -1
  109. package/dist/client/assets/constants-CxHW24vL.js +0 -1
  110. package/dist/client/assets/gateway-detail-Dz5K97Qu.js +0 -1
  111. package/dist/client/assets/index-7USdUZHF.js +0 -98
  112. package/dist/client/assets/json-RSU7hrk4.js +0 -1
  113. package/dist/client/assets/prism-light-xse74Nms.js +0 -1
  114. package/dist/client/assets/shell-layout-CWj_6Hth.js +0 -19
  115. package/dist/client/assets/useQuery-DE63pAfU.js +0 -1
@@ -1,98 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lazy-highlighter-Z2qArbl8.js","assets/index-B9HSZhdB.js","assets/index-BcDKMyjy.css","assets/core-BAd4uKi4.js","assets/json-BESjz4hO.js"])))=>i.map(i=>d[i]);
2
- import{r as V,c as X,e as du,K as ze,q as Pi,b0 as gc,aS as Ec,aP as $e,w as Y,b1 as dr,b2 as fu,b3 as bc,b4 as Tc,b5 as xc,Y as Be,X as vn,W as zn,v as ge,b6 as G,aO as Tt,b7 as _c,b8 as Ae,_ as Ac,a3 as Mi,j as g,ax as yc,f as kc,t as Hr}from"./index-B9HSZhdB.js";import{E as Cc,u as Ic}from"./use-binding-Ccb4SpbZ.js";import{u as St,i as Jt,d as hu,c as Bi,b as Fi,T as Ui}from"./tooltip-DxQ-KPX4.js";import{u as vt,c as he,B as it}from"./button-hWHuMvle.js";import{i as pu}from"./AlertCircle-D6b9Ralv.js";import{i as Sc}from"./error-boundary-B-QcFATa.js";import{i as Nc}from"./X-D8XIiJvQ.js";import{i as Rc,c as wc}from"./Grid01-DETN8WPx.js";import{i as Oc,R as Lc,e as Dc,f as vc,g as Pc}from"./responsive-select-Bl1ZcUtI.js";import{T as Mc}from"./textarea-BoUne3Q6.js";import{u as Bc,L as Fc}from"./localstorage-keys-DZPXAcMr.js";import{a as Ar}from"./Copy01-D0tR5TRJ.js";import{i as Uc}from"./Terminal-Cw0wmZeh.js";import{C as Hc}from"./connection-card-si8Xv84Q.js";import{b as jc,U as zc,e as $c,c as Yc,u as qc}from"./use-connection-BfQqOvPU.js";import{n as Vc,i as Wc}from"./LinkExternal01-D-pWR4LA.js";import{J as ir}from"./json-syntax-highlighter-Czp62O9j.js";import{b as Qc,c as Gc,d as Xc,A as Zc,a as Kc,e as Jc,g as ed,f as td}from"./alert-dialog-CbCWAnT3.js";import{i as nd}from"./File06-BzST8Ux5.js";import{i as rd}from"./SearchMd-BSF-Glwf.js";const mu=({size:e=24,color:t="currentColor",...n})=>V.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},V.createElement("path",{d:"M15.938 15.938A7.001 7.001 0 0 0 15 2a7.001 7.001 0 0 0-6.938 6.062M16 15a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));mu.displayName="Coins01";const gu=({size:e=24,color:t="currentColor",...n})=>V.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},V.createElement("path",{d:"M9 14 4 9m0 0 5-5M4 9h6.4c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C20 13.56 20 15.24 20 18.6V20"}));gu.displayName="CornerUpLeft";const Eu=({size:e=24,color:t="currentColor",...n})=>V.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},V.createElement("path",{d:"M6 16a4 4 0 0 0 4 4h4a4 4 0 0 0 0-8h-4a4 4 0 0 1 0-8h4a4 4 0 0 1 4 4m-6-6v20"}));Eu.displayName="CurrencyDollar";const bu=({size:e=24,color:t="currentColor",...n})=>V.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},V.createElement("path",{d:"m18 10-4-4M2.5 21.5l3.384-.376c.414-.046.62-.069.814-.131a2 2 0 0 0 .485-.234c.17-.111.317-.259.61-.553L21 7a2.828 2.828 0 1 0-4-4L3.794 16.206c-.294.294-.442.442-.553.611a2 2 0 0 0-.234.485c-.062.193-.085.4-.131.814L2.5 21.5Z"}));bu.displayName="Edit02";const Tu=({size:e=24,color:t="currentColor",...n})=>V.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},V.createElement("path",{d:"M16.2 21H6.931c-.605 0-.908 0-1.049-.12a.5.5 0 0 1-.173-.42c.014-.183.228-.397.657-.826l8.503-8.503c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668L21 15v1.2M16.2 21c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2M16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4M10.5 8.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"}));Tu.displayName="Image01";const xu=({size:e=24,color:t="currentColor",...n})=>V.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},V.createElement("path",{d:"M15 16.5V19c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C13.398 22 12.932 22 12 22c-.932 0-1.398 0-1.765-.152a2 2 0 0 1-1.083-1.083C9 20.398 9 19.932 9 19v-2.5m6 0c2.649-1.157 4.5-3.925 4.5-7a7.5 7.5 0 0 0-15 0c0 3.075 1.851 5.843 4.5 7m6 0H9"}));xu.displayName="Lightbulb01";const _u=({size:e=24,color:t="currentColor",...n})=>V.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},V.createElement("path",{d:"m18 8 4 4m0 0-4 4m4-4H9m6-7.796A8.383 8.383 0 0 0 10.667 3C5.88 3 2 7.03 2 12s3.88 9 8.667 9A8.384 8.384 0 0 0 15 19.796"}));_u.displayName="LogOut04";const Au=({size:e=24,color:t="currentColor",...n})=>V.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},V.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));Au.displayName="MessageChatSquare";const yr=({size:e=24,color:t="currentColor",...n})=>V.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},V.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));yr.displayName="Stars01";const yu=({size:e=24,color:t="currentColor",...n})=>V.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},V.createElement("path",{d:"M16 8V5l3-3 1 2 2 1-3 3h-3Zm0 0-4 4m10 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m5 10a5 5 0 1 1-5-5"}));yu.displayName="Target04";var Pn;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const s of i)a[s]=s;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(u=>typeof i[i[u]]!="number"),s={};for(const u of a)s[u]=i[u];return e.objectValues(s)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.push(s);return a},e.find=(i,a)=>{for(const s of i)if(a(s))return s},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(Pn||(Pn={}));var Ia;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Ia||(Ia={}));Pn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);Pn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class fr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let u=r,o=0;for(;o<s.path.length;){const l=s.path[o];o===s.path.length-1?(u[l]=u[l]||{_errors:[]},u[l]._errors.push(n(s))):u[l]=u[l]||{_errors:[]},u=u[l],o++}}};return i(this),r}static assert(t){if(!(t instanceof fr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n=Object.create(null),r=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];n[a]=n[a]||[],n[a].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}fr.create=e=>new fr(e);var Sa;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Sa||(Sa={}));var J;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(J||(J={}));function Bt(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function id(e,t){let n;const r=()=>{if(n)return n;const i=indexedDB.open(e);return i.onupgradeneeded=()=>i.result.createObjectStore(t),n=Bt(i),n.then(a=>{a.onclose=()=>n=void 0},()=>{}),n};return(i,a)=>r().then(s=>a(s.transaction(t,i).objectStore(t)))}let jr;function kr(){return jr||(jr=id("keyval-store","keyval")),jr}function Hi(e,t=kr()){return t("readonly",n=>Bt(n.get(e)))}function kn(e,t,n=kr()){return n("readwrite",r=>(r.put(t,e),Bt(r.transaction)))}function ku(e,t=kr()){return t("readwrite",n=>(n.delete(e),Bt(n.transaction)))}function ad(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},Bt(e.transaction)}function Cu(e=kr()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([Bt(t.getAllKeys()),Bt(t.getAll())]).then(([r,i])=>r.map((a,s)=>[a,i[s]]));const n=[];return e("readonly",r=>ad(r,i=>n.push([i.key,i.value])).then(()=>n))})}async function sd(e,t){const n=`${e}:threads:${t}`;return await Hi(n)??null}async function ud(e){const t=`${e}:threads:`;return(await Cu()).filter(([i])=>typeof i=="string"&&i.startsWith(t)).map(([,i])=>i).filter(i=>!i.hidden).sort((i,a)=>String(a.updated_at).localeCompare(String(i.updated_at)))}function Iu(e,t){const n=`${e}:messages:`;return Cu().then(r=>r.filter(([a])=>typeof a=="string"&&a.startsWith(n)).map(([,a])=>a).filter(a=>a.metadata?.thread_id===t||a.threadId===t).sort((a,s)=>{const u=a.metadata?.created_at||a.createdAt||"",o=s.metadata?.created_at||s.createdAt||"";return String(u).localeCompare(String(o))}))}function j3(){const e=X.c(12),{locator:t}=St();let n;e[0]!==t?(n=ze.threads(t),e[0]=t,e[1]=n):n=e[1];let r;e[2]!==t?(r=()=>ud(t),e[2]=t,e[3]=r):r=e[3];let i;e[4]!==n||e[5]!==r?(i={queryKey:n,queryFn:r,staleTime:3e4},e[4]=n,e[5]=r,e[6]=i):i=e[6];const{data:a,refetch:s}=Pi(i);let u;e[7]!==a?(u=a??[],e[7]=a,e[8]=u):u=e[8];let o;return e[9]!==s||e[10]!==u?(o={threads:u,refetch:s},e[9]=s,e[10]=u,e[11]=o):o=e[11],o}function od(e){const t=X.c(11),{locator:n}=St();let r;t[0]!==n||t[1]!==e?(r=ze.threadMessages(n,e),t[0]=n,t[1]=e,t[2]=r):r=t[2];let i;t[3]!==n||t[4]!==e?(i=()=>Iu(n,e),t[3]=n,t[4]=e,t[5]=i):i=t[5];let a;t[6]!==r||t[7]!==i?(a={queryKey:r,queryFn:i,staleTime:3e4},t[6]=r,t[7]=i,t[8]=a):a=t[8];const{data:s}=Pi(a);let u;return t[9]!==s?(u=s??[],t[9]=s,t[10]=u):u=t[10],u}function ji(){const e=X.c(28),{locator:t}=St(),n=du();let r;e[0]!==t?(r=async y=>{const T=`${t}:threads:${y.id}`;return await kn(T,y),y},e[0]=t,e[1]=r):r=e[1];let i;e[2]!==t||e[3]!==n?(i=()=>{n.invalidateQueries({queryKey:ze.threads(t)})},e[2]=t,e[3]=n,e[4]=i):i=e[4];let a;e[5]!==r||e[6]!==i?(a={mutationFn:r,onSuccess:i},e[5]=r,e[6]=i,e[7]=a):a=e[7];const s=vt(a);let u;e[8]!==t?(u=async y=>{const{id:T,updates:S}=y,b=`${t}:threads:${T}`,w=await Hi(b);if(!w)throw new Error(`Thread ${T} not found`);const O={...w,...S};return await kn(b,O),O},e[8]=t,e[9]=u):u=e[9];let o;e[10]!==t||e[11]!==n?(o=y=>{n.invalidateQueries({queryKey:ze.threads(t)}),n.invalidateQueries({queryKey:ze.thread(t,y.id)})},e[10]=t,e[11]=n,e[12]=o):o=e[12];let l;e[13]!==u||e[14]!==o?(l={mutationFn:u,onSuccess:o},e[13]=u,e[14]=o,e[15]=l):l=e[15];const d=vt(l);let f;e[16]!==t?(f=async y=>{const T=`${t}:threads:${y}`;return await ku(T),y},e[16]=t,e[17]=f):f=e[17];let p;e[18]!==t||e[19]!==n?(p=()=>{n.invalidateQueries({queryKey:ze.threads(t)})},e[18]=t,e[19]=n,e[20]=p):p=e[20];let h;e[21]!==f||e[22]!==p?(h={mutationFn:f,onSuccess:p},e[21]=f,e[22]=p,e[23]=h):h=e[23];const m=vt(h);let _;return e[24]!==m||e[25]!==s||e[26]!==d?(_={insert:s,update:d,delete:m},e[24]=m,e[25]=s,e[26]=d,e[27]=_):_=e[27],_}function Su(){const e=X.c(37),{locator:t}=St(),n=du();let r;e[0]!==t?(r=async w=>{const O=`${t}:messages:${w.id}`;return await kn(O,w),w},e[0]=t,e[1]=r):r=e[1];let i;e[2]!==t||e[3]!==n?(i=w=>{const O=w.metadata?.thread_id||w.threadId;O&&n.invalidateQueries({queryKey:ze.threadMessages(t,O)}),n.invalidateQueries({queryKey:ze.messages(t)})},e[2]=t,e[3]=n,e[4]=i):i=e[4];let a;e[5]!==r||e[6]!==i?(a={mutationFn:r,onSuccess:i},e[5]=r,e[6]=i,e[7]=a):a=e[7];const s=vt(a);let u;e[8]!==t?(u=async w=>(await Promise.all(w.map(O=>{const I=`${t}:messages:${O.id}`;return kn(I,O)})),w),e[8]=t,e[9]=u):u=e[9];let o;e[10]!==t||e[11]!==n?(o=w=>{const O=new Set;for(const I of w){const P=I.metadata?.thread_id||I.threadId;P&&O.add(P)}for(const I of O)n.invalidateQueries({queryKey:ze.threadMessages(t,I)});n.invalidateQueries({queryKey:ze.messages(t)})},e[10]=t,e[11]=n,e[12]=o):o=e[12];let l;e[13]!==u||e[14]!==o?(l={mutationFn:u,onSuccess:o},e[13]=u,e[14]=o,e[15]=l):l=e[15];const d=vt(l);let f;e[16]!==t?(f=async w=>{const{id:O,updates:I}=w,P=`${t}:messages:${O}`,H=await Hi(P);if(!H)throw new Error(`Message ${O} not found`);const q={...H,...I};return await kn(P,q),q},e[16]=t,e[17]=f):f=e[17];let p;e[18]!==t||e[19]!==n?(p=w=>{const O=w.metadata?.thread_id||w.threadId;O&&n.invalidateQueries({queryKey:ze.threadMessages(t,O)}),n.invalidateQueries({queryKey:ze.messages(t)})},e[18]=t,e[19]=n,e[20]=p):p=e[20];let h;e[21]!==f||e[22]!==p?(h={mutationFn:f,onSuccess:p},e[21]=f,e[22]=p,e[23]=h):h=e[23];const m=vt(h);let _;e[24]!==t?(_=async w=>{const O=`${t}:messages:${w}`;return await ku(O),w},e[24]=t,e[25]=_):_=e[25];let y;e[26]!==t||e[27]!==n?(y=()=>{n.invalidateQueries({queryKey:ze.messages(t)})},e[26]=t,e[27]=n,e[28]=y):y=e[28];let T;e[29]!==y||e[30]!==_?(T={mutationFn:_,onSuccess:y},e[29]=y,e[30]=_,e[31]=T):T=e[31];const S=vt(T);let b;return e[32]!==S||e[33]!==s||e[34]!==d||e[35]!==m?(b={insert:s,insertMany:d,update:m,delete:S},e[32]=S,e[33]=s,e[34]=d,e[35]=m,e[36]=b):b=e[36],b}async function ld(e){const t=`/mcp/gateway/${e}`,n={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const r=await fetch(t,{method:"POST",headers:n,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-chat",version:"1.0.0"}}})});if(!r.ok)return[];if((await r.json()).error)return[];const a=await fetch(t,{method:"POST",headers:n,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"prompts/list",params:{}})});if(!a.ok)return[];const s=await a.json();return s.error?[]:s.result?.prompts||[]}catch{return[]}}function z3(e){const t=X.c(7);let n;t[0]!==e?(n=ze.gatewayPrompts(e),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==e?(r=()=>ld(e),t[2]=e,t[3]=r):r=t[3];let i;return t[4]!==n||t[5]!==r?(i={queryKey:n,queryFn:r,staleTime:6e4,retry:!1},t[4]=n,t[5]=r,t[6]=i):i=t[6],Pi(i)}var Nu="vercel.ai.error",cd=Symbol.for(Nu),Na,Ra,It=class Ru extends(Ra=Error,Na=cd,Ra){constructor({name:t,message:n,cause:r}){super(n),this[Na]=!0,this.name=t,this.cause=r}static isInstance(t){return Ru.hasMarker(t,Nu)}static hasMarker(t,n){const r=Symbol.for(n);return t!=null&&typeof t=="object"&&r in t&&typeof t[r]=="boolean"&&t[r]===!0}};function wu(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var Ou="AI_InvalidArgumentError",Lu=`vercel.ai.error.${Ou}`,dd=Symbol.for(Lu),wa,Oa,fd=class extends(Oa=It,wa=dd,Oa){constructor({message:e,cause:t,argument:n}){super({name:Ou,message:e,cause:t}),this[wa]=!0,this.argument=n}static isInstance(e){return It.hasMarker(e,Lu)}},Du="AI_JSONParseError",vu=`vercel.ai.error.${Du}`,hd=Symbol.for(vu),La,Da,va=class extends(Da=It,La=hd,Da){constructor({text:e,cause:t}){super({name:Du,message:`JSON parsing failed: Text: ${e}.
3
- Error message: ${wu(t)}`,cause:t}),this[La]=!0,this.text=e}static isInstance(e){return It.hasMarker(e,vu)}},Pu="AI_TypeValidationError",Mu=`vercel.ai.error.${Pu}`,pd=Symbol.for(Mu),Pa,Ma,en=class ci extends(Ma=It,Pa=pd,Ma){constructor({value:t,cause:n}){super({name:Pu,message:`Type validation failed: Value: ${JSON.stringify(t)}.
4
- Error message: ${wu(n)}`,cause:n}),this[Pa]=!0,this.value=t}static isInstance(t){return It.hasMarker(t,Mu)}static wrap({value:t,cause:n}){return ci.isInstance(n)&&n.value===t?n:new ci({value:t,cause:n})}},$n=({prefix:e,size:t=16,alphabet:n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const i=()=>{const a=n.length,s=new Array(t);for(let u=0;u<t;u++)s[u]=n[Math.random()*a|0];return s.join("")};if(e==null)return i;if(n.includes(r))throw new fd({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${e}${r}${i()}`},md=$n();function Ba(e=globalThis){var t,n,r;return e.window?"runtime/browser":(t=e.navigator)!=null&&t.userAgent?`runtime/${e.navigator.userAgent.toLowerCase()}`:(r=(n=e.process)==null?void 0:n.versions)!=null&&r.node?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function Dt(e){if(e==null)return{};const t={};if(e instanceof Headers)e.forEach((n,r)=>{t[r.toLowerCase()]=n});else{Array.isArray(e)||(e=Object.entries(e));for(const[n,r]of e)r!=null&&(t[n.toLowerCase()]=r)}return t}function Fa(e,...t){const n=new Headers(Dt(e)),r=n.get("user-agent")||"";return n.set("user-agent",[r,...t].filter(Boolean).join(" ")),Object.fromEntries(n.entries())}var gd=/"__proto__"\s*:/,Ed=/"constructor"\s*:/;function Ua(e){const t=JSON.parse(e);return t===null||typeof t!="object"||gd.test(e)===!1&&Ed.test(e)===!1?t:bd(t)}function bd(e){let t=[e];for(;t.length;){const n=t;t=[];for(const r of n){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const i in r){const a=r[i];a&&typeof a=="object"&&t.push(a)}}}return e}function Td(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return Ua(e)}try{return Ua(e)}finally{Error.stackTraceLimit=t}}function Bu(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:n}=e;if(n!=null)for(const r of Object.keys(n))n[r]=Ot(n[r])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(Ot):Ot(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(Ot)),e.allOf!=null&&(e.allOf=e.allOf.map(Ot)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(Ot));const{definitions:t}=e;if(t!=null)for(const n of Object.keys(t))t[n]=Ot(t[n]);return e}function Ot(e){return typeof e=="boolean"?e:Bu(e)}var xd=Symbol("Let zodToJsonSchema decide on which parser to use"),Ha={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},_d=e=>typeof e=="string"?{...Ha,name:e}:{...Ha,...e};function Ge(){return{}}function Ad(e,t){var n,r,i;const a={type:"array"};return(n=e.type)!=null&&n._def&&((i=(r=e.type)==null?void 0:r._def)==null?void 0:i.typeName)!==J.ZodAny&&(a.items=pe(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(a.minItems=e.minLength.value),e.maxLength&&(a.maxItems=e.maxLength.value),e.exactLength&&(a.minItems=e.exactLength.value,a.maxItems=e.exactLength.value),a}function yd(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value;break}return t}function kd(){return{type:"boolean"}}function Fu(e,t){return pe(e.type._def,t)}var Cd=(e,t)=>pe(e.innerType._def,t);function Uu(e,t,n){const r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((i,a)=>Uu(e,t,i))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Id(e)}}var Id=e=>{const t={type:"integer",format:"unix-time"};for(const n of e.checks)switch(n.kind){case"min":t.minimum=n.value;break;case"max":t.maximum=n.value;break}return t};function Sd(e,t){return{...pe(e.innerType._def,t),default:e.defaultValue()}}function Nd(e,t){return t.effectStrategy==="input"?pe(e.schema._def,t):Ge()}function Rd(e){return{type:"string",enum:Array.from(e.values)}}var wd=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function Od(e,t){const n=[pe(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),pe(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),r=[];return n.forEach(i=>{if(wd(i))r.push(...i.allOf);else{let a=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:s,...u}=i;a=u}r.push(a)}}),r.length?{allOf:r}:void 0}function Ld(e){const t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var zr=void 0,tt={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(zr===void 0&&(zr=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),zr),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Hu(e,t){const n={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value;break;case"max":n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":nt(n,"email",r.message,t);break;case"format:idn-email":nt(n,"idn-email",r.message,t);break;case"pattern:zod":Me(n,tt.email,r.message,t);break}break;case"url":nt(n,"uri",r.message,t);break;case"uuid":nt(n,"uuid",r.message,t);break;case"regex":Me(n,r.regex,r.message,t);break;case"cuid":Me(n,tt.cuid,r.message,t);break;case"cuid2":Me(n,tt.cuid2,r.message,t);break;case"startsWith":Me(n,RegExp(`^${$r(r.value,t)}`),r.message,t);break;case"endsWith":Me(n,RegExp(`${$r(r.value,t)}$`),r.message,t);break;case"datetime":nt(n,"date-time",r.message,t);break;case"date":nt(n,"date",r.message,t);break;case"time":nt(n,"time",r.message,t);break;case"duration":nt(n,"duration",r.message,t);break;case"length":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value;break;case"includes":{Me(n,RegExp($r(r.value,t)),r.message,t);break}case"ip":{r.version!=="v6"&&nt(n,"ipv4",r.message,t),r.version!=="v4"&&nt(n,"ipv6",r.message,t);break}case"base64url":Me(n,tt.base64url,r.message,t);break;case"jwt":Me(n,tt.jwt,r.message,t);break;case"cidr":{r.version!=="v6"&&Me(n,tt.ipv4Cidr,r.message,t),r.version!=="v4"&&Me(n,tt.ipv6Cidr,r.message,t);break}case"emoji":Me(n,tt.emoji(),r.message,t);break;case"ulid":{Me(n,tt.ulid,r.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{nt(n,"binary",r.message,t);break}case"contentEncoding:base64":{n.contentEncoding="base64";break}case"pattern:zod":{Me(n,tt.base64,r.message,t);break}}break}case"nanoid":Me(n,tt.nanoid,r.message,t)}return n}function $r(e,t){return t.patternStrategy==="escape"?vd(e):e}var Dd=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function vd(e){let t="";for(let n=0;n<e.length;n++)Dd.has(e[n])||(t+="\\"),t+=e[n];return t}function nt(e,t,n,r){var i;e.format||(i=e.anyOf)!=null&&i.some(a=>a.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function Me(e,t,n,r){var i;e.pattern||(i=e.allOf)!=null&&i.some(a=>a.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:ja(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=ja(t,r)}function ja(e,t){var n;if(!t.applyRegexFlags||!e.flags)return e.source;const r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},i=r.i?e.source.toLowerCase():e.source;let a="",s=!1,u=!1,o=!1;for(let l=0;l<i.length;l++){if(s){a+=i[l],s=!1;continue}if(r.i){if(u){if(i[l].match(/[a-z]/)){o?(a+=i[l],a+=`${i[l-2]}-${i[l]}`.toUpperCase(),o=!1):i[l+1]==="-"&&((n=i[l+2])!=null&&n.match(/[a-z]/))?(a+=i[l],o=!0):a+=`${i[l]}${i[l].toUpperCase()}`;continue}}else if(i[l].match(/[a-z]/)){a+=`[${i[l]}${i[l].toUpperCase()}]`;continue}}if(r.m){if(i[l]==="^"){a+=`(^|(?<=[\r
5
- ]))`;continue}else if(i[l]==="$"){a+=`($|(?=[\r
6
- ]))`;continue}}if(r.s&&i[l]==="."){a+=u?`${i[l]}\r
7
- `:`[${i[l]}\r
8
- ]`;continue}a+=i[l],i[l]==="\\"?s=!0:u&&i[l]==="]"?u=!1:!u&&i[l]==="["&&(u=!0)}try{new RegExp(a)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return a}function ju(e,t){var n,r,i,a,s,u;const o={type:"object",additionalProperties:(n=pe(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?n:t.allowedAdditionalProperties};if(((r=e.keyType)==null?void 0:r._def.typeName)===J.ZodString&&((i=e.keyType._def.checks)!=null&&i.length)){const{type:l,...d}=Hu(e.keyType._def,t);return{...o,propertyNames:d}}else{if(((a=e.keyType)==null?void 0:a._def.typeName)===J.ZodEnum)return{...o,propertyNames:{enum:e.keyType._def.values}};if(((s=e.keyType)==null?void 0:s._def.typeName)===J.ZodBranded&&e.keyType._def.type._def.typeName===J.ZodString&&((u=e.keyType._def.type._def.checks)!=null&&u.length)){const{type:l,...d}=Fu(e.keyType._def,t);return{...o,propertyNames:d}}}return o}function Pd(e,t){if(t.mapStrategy==="record")return ju(e,t);const n=pe(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Ge(),r=pe(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Ge();return{type:"array",maxItems:125,items:{type:"array",items:[n,r],minItems:2,maxItems:2}}}function Md(e){const t=e.values,r=Object.keys(e.values).filter(a=>typeof t[t[a]]!="number").map(a=>t[a]),i=Array.from(new Set(r.map(a=>typeof a)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:r}}function Bd(){return{not:Ge()}}function Fd(){return{type:"null"}}var di={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Ud(e,t){const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(r=>r._def.typeName in di&&(!r._def.checks||!r._def.checks.length))){const r=n.reduce((i,a)=>{const s=di[a._def.typeName];return s&&!i.includes(s)?[...i,s]:i},[]);return{type:r.length>1?r:r[0]}}else if(n.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){const r=n.reduce((i,a)=>{const s=typeof a._def.value;switch(s){case"string":case"number":case"boolean":return[...i,s];case"bigint":return[...i,"integer"];case"object":if(a._def.value===null)return[...i,"null"];default:return i}},[]);if(r.length===n.length){const i=r.filter((a,s,u)=>u.indexOf(a)===s);return{type:i.length>1?i:i[0],enum:n.reduce((a,s)=>a.includes(s._def.value)?a:[...a,s._def.value],[])}}}else if(n.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((r,i)=>[...r,...i._def.values.filter(a=>!r.includes(a))],[])};return Hd(e,t)}var Hd=(e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((r,i)=>pe(r._def,{...t,currentPath:[...t.currentPath,"anyOf",`${i}`]})).filter(r=>!!r&&(!t.strictUnions||typeof r=="object"&&Object.keys(r).length>0));return n.length?{anyOf:n}:void 0};function jd(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[di[e.innerType._def.typeName],"null"]};const n=pe(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function zd(e){const t={type:"number"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"int":t.type="integer";break;case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value;break}return t}function $d(e,t){const n={type:"object",properties:{}},r=[],i=e.shape();for(const s in i){let u=i[s];if(u===void 0||u._def===void 0)continue;const o=qd(u),l=pe(u._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});l!==void 0&&(n.properties[s]=l,o||r.push(s))}r.length&&(n.required=r);const a=Yd(e,t);return a!==void 0&&(n.additionalProperties=a),n}function Yd(e,t){if(e.catchall._def.typeName!=="ZodNever")return pe(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function qd(e){try{return e.isOptional()}catch{return!0}}var Vd=(e,t)=>{var n;if(t.currentPath.toString()===((n=t.propertyPath)==null?void 0:n.toString()))return pe(e.innerType._def,t);const r=pe(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Ge()},r]}:Ge()},Wd=(e,t)=>{if(t.pipeStrategy==="input")return pe(e.in._def,t);if(t.pipeStrategy==="output")return pe(e.out._def,t);const n=pe(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),r=pe(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,r].filter(i=>i!==void 0)}};function Qd(e,t){return pe(e.type._def,t)}function Gd(e,t){const r={type:"array",uniqueItems:!0,items:pe(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(r.minItems=e.minSize.value),e.maxSize&&(r.maxItems=e.maxSize.value),r}function Xd(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,r)=>pe(n._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[]),additionalItems:pe(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,r)=>pe(n._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[])}}function Zd(){return{not:Ge()}}function Kd(){return Ge()}var Jd=(e,t)=>pe(e.innerType._def,t),ef=(e,t,n)=>{switch(t){case J.ZodString:return Hu(e,n);case J.ZodNumber:return zd(e);case J.ZodObject:return $d(e,n);case J.ZodBigInt:return yd(e);case J.ZodBoolean:return kd();case J.ZodDate:return Uu(e,n);case J.ZodUndefined:return Zd();case J.ZodNull:return Fd();case J.ZodArray:return Ad(e,n);case J.ZodUnion:case J.ZodDiscriminatedUnion:return Ud(e,n);case J.ZodIntersection:return Od(e,n);case J.ZodTuple:return Xd(e,n);case J.ZodRecord:return ju(e,n);case J.ZodLiteral:return Ld(e);case J.ZodEnum:return Rd(e);case J.ZodNativeEnum:return Md(e);case J.ZodNullable:return jd(e,n);case J.ZodOptional:return Vd(e,n);case J.ZodMap:return Pd(e,n);case J.ZodSet:return Gd(e,n);case J.ZodLazy:return()=>e.getter()._def;case J.ZodPromise:return Qd(e,n);case J.ZodNaN:case J.ZodNever:return Bd();case J.ZodEffects:return Nd(e,n);case J.ZodAny:return Ge();case J.ZodUnknown:return Kd();case J.ZodDefault:return Sd(e,n);case J.ZodBranded:return Fu(e,n);case J.ZodReadonly:return Jd(e,n);case J.ZodCatch:return Cd(e,n);case J.ZodPipeline:return Wd(e,n);case J.ZodFunction:case J.ZodVoid:case J.ZodSymbol:return;default:return(r=>{})()}},tf=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")};function pe(e,t,n=!1){var r;const i=t.seen.get(e);if(t.override){const o=(r=t.override)==null?void 0:r.call(t,e,t,i,n);if(o!==xd)return o}if(i&&!n){const o=nf(i,t);if(o!==void 0)return o}const a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);const s=ef(e,e.typeName,t),u=typeof s=="function"?pe(s(),t):s;if(u&&rf(e,t,u),t.postProcess){const o=t.postProcess(u,e,t);return a.jsonSchema=u,o}return a.jsonSchema=u,u}var nf=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:tf(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((n,r)=>t.currentPath[r]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Ge()):t.$refStrategy==="seen"?Ge():void 0}},rf=(e,t,n)=>(e.description&&(n.description=e.description),n),af=e=>{const t=_d(e),n=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([r,i])=>[i._def,{def:i._def,path:[...t.basePath,t.definitionPath,r],jsonSchema:void 0}]))}},sf=(e,t)=>{var n;const r=af(t);let i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((l,[d,f])=>{var p;return{...l,[d]:(p=pe(f._def,{...r,currentPath:[...r.basePath,r.definitionPath,d]},!0))!=null?p:Ge()}},{}):void 0;const a=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,s=(n=pe(e._def,a===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,a]},!1))!=null?n:Ge(),u=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;u!==void 0&&(s.title=u);const o=a===void 0?i?{...s,[r.definitionPath]:i}:s:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,a].join("/"),[r.definitionPath]:{...i,[a]:s}};return o.$schema="http://json-schema.org/draft-07/schema#",o},fi=Symbol.for("vercel.ai.schema");function uf(e){let t;return()=>(t==null&&(t=e()),t)}function Cr(e,{validate:t}={}){return{[fi]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function of(e){return typeof e=="object"&&e!==null&&fi in e&&e[fi]===!0&&"jsonSchema"in e&&"validate"in e}function zi(e){return e==null?Cr({properties:{},additionalProperties:!1}):of(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?zu(e):lf(e):e()}function lf(e){return Cr(()=>e["~standard"].jsonSchema.input({target:"draft-07"}),{validate:async t=>{const n=await e["~standard"].validate(t);return"value"in n?{success:!0,value:n.value}:{success:!1,error:new en({value:t,cause:n.issues})}}})}function cf(e,t){var n;const r=(n=void 0)!=null?n:!1;return Cr(()=>sf(e,{$refStrategy:r?"root":"none"}),{validate:async i=>{const a=await e.safeParseAsync(i);return a.success?{success:!0,value:a.data}:{success:!1,error:a.error}}})}function df(e,t){var n;const r=(n=void 0)!=null?n:!1;return Cr(()=>Bu(Ec(e,{target:"draft-7",io:"input",reused:r?"ref":"inline"})),{validate:async i=>{const a=await gc(e,i);return a.success?{success:!0,value:a.data}:{success:!1,error:a.error}}})}function ff(e){return"_zod"in e}function zu(e,t){return ff(e)?df(e):cf(e)}async function za({value:e,schema:t}){const n=await Mn({value:e,schema:t});if(!n.success)throw en.wrap({value:e,cause:n.error});return n.value}async function Mn({value:e,schema:t}){const n=zi(t);try{if(n.validate==null)return{success:!0,value:e,rawValue:e};const r=await n.validate(e);return r.success?{success:!0,value:r.value,rawValue:e}:{success:!1,error:en.wrap({value:e,cause:r.error}),rawValue:e}}catch(r){return{success:!1,error:en.wrap({value:e,cause:r}),rawValue:e}}}async function Ft({text:e,schema:t}){try{const n=Td(e);return t==null?{success:!0,value:n,rawValue:n}:await Mn({value:n,schema:t})}catch(n){return{success:!1,error:va.isInstance(n)?n:new va({text:e,cause:n}),rawValue:void 0}}}function hf({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new Cc).pipeThrough(new TransformStream({async transform({data:n},r){n!=="[DONE]"&&r.enqueue(await Ft({text:n,schema:t}))}}))}async function yt(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var pf=Object.defineProperty,mf=(e,t)=>{for(var n in t)pf(e,n,{get:t[n],enumerable:!0})},$u="AI_NoObjectGeneratedError",Yu=`vercel.ai.error.${$u}`,gf=Symbol.for(Yu),qu,Ct=class extends It{constructor({message:e="No object generated.",cause:t,text:n,response:r,usage:i,finishReason:a}){super({name:$u,message:e,cause:t}),this[qu]=!0,this.text=n,this.response=r,this.usage=i,this.finishReason=a}static isInstance(e){return It.hasMarker(e,Yu)}};qu=gf;var $a="6.0.17",Vu=$e([Y(),dr(Uint8Array),dr(ArrayBuffer),fu(e=>{var t,n;return(n=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?n:!1},{message:"Must be a Buffer"})]),Bn=bc(()=>$e([Tc(),Y(),xc(),Be(),vn(Y(),Bn.optional()),zn(Bn)])),ae=vn(Y(),vn(Y(),Bn.optional())),Wu=ge({type:G("text"),text:Y(),providerOptions:ae.optional()}),Ef=ge({type:G("image"),image:$e([Vu,dr(URL)]),mediaType:Y().optional(),providerOptions:ae.optional()}),Qu=ge({type:G("file"),data:$e([Vu,dr(URL)]),filename:Y().optional(),mediaType:Y(),providerOptions:ae.optional()}),bf=ge({type:G("reasoning"),text:Y(),providerOptions:ae.optional()}),Tf=ge({type:G("tool-call"),toolCallId:Y(),toolName:Y(),input:Tt(),providerOptions:ae.optional(),providerExecuted:Be().optional()}),xf=_c("type",[ge({type:G("text"),value:Y(),providerOptions:ae.optional()}),ge({type:G("json"),value:Bn,providerOptions:ae.optional()}),ge({type:G("execution-denied"),reason:Y().optional(),providerOptions:ae.optional()}),ge({type:G("error-text"),value:Y(),providerOptions:ae.optional()}),ge({type:G("error-json"),value:Bn,providerOptions:ae.optional()}),ge({type:G("content"),value:zn($e([ge({type:G("text"),text:Y(),providerOptions:ae.optional()}),ge({type:G("media"),data:Y(),mediaType:Y()}),ge({type:G("file-data"),data:Y(),mediaType:Y(),filename:Y().optional(),providerOptions:ae.optional()}),ge({type:G("file-url"),url:Y(),providerOptions:ae.optional()}),ge({type:G("file-id"),fileId:$e([Y(),vn(Y(),Y())]),providerOptions:ae.optional()}),ge({type:G("image-data"),data:Y(),mediaType:Y(),providerOptions:ae.optional()}),ge({type:G("image-url"),url:Y(),providerOptions:ae.optional()}),ge({type:G("image-file-id"),fileId:$e([Y(),vn(Y(),Y())]),providerOptions:ae.optional()}),ge({type:G("custom"),providerOptions:ae.optional()})]))})]),Gu=ge({type:G("tool-result"),toolCallId:Y(),toolName:Y(),output:xf,providerOptions:ae.optional()}),_f=ge({type:G("tool-approval-request"),approvalId:Y(),toolCallId:Y()}),Af=ge({type:G("tool-approval-response"),approvalId:Y(),approved:Be(),reason:Y().optional()}),yf=ge({role:G("system"),content:Y(),providerOptions:ae.optional()}),kf=ge({role:G("user"),content:$e([Y(),zn($e([Wu,Ef,Qu]))]),providerOptions:ae.optional()}),Cf=ge({role:G("assistant"),content:$e([Y(),zn($e([Wu,Qu,bf,Tf,Gu,_f]))]),providerOptions:ae.optional()}),If=ge({role:G("tool"),content:zn($e([Gu,Af])),providerOptions:ae.optional()});$e([yf,kf,Cf,If]);function Xu(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const i=t[r];if(i===void 0)continue;const a=r in e?e[r]:void 0,s=i!==null&&typeof i=="object"&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp),u=a!=null&&typeof a=="object"&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof RegExp);s&&u?n[r]=Xu(a,i):n[r]=i}return n}var Sf={};mf(Sf,{array:()=>Of,choice:()=>Lf,json:()=>Df,object:()=>wf,text:()=>Rf});function Nf(e){const t=["ROOT"];let n=-1,r=null;function i(o,l,d){switch(o){case'"':{n=l,t.pop(),t.push(d),t.push("INSIDE_STRING");break}case"f":case"t":case"n":{n=l,r=l,t.pop(),t.push(d),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(d),t.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{n=l,t.pop(),t.push(d),t.push("INSIDE_NUMBER");break}case"{":{n=l,t.pop(),t.push(d),t.push("INSIDE_OBJECT_START");break}case"[":{n=l,t.pop(),t.push(d),t.push("INSIDE_ARRAY_START");break}}}function a(o,l){switch(o){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{n=l,t.pop();break}}}function s(o,l){switch(o){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{n=l,t.pop();break}}}for(let o=0;o<e.length;o++){const l=e[o];switch(t[t.length-1]){case"ROOT":i(l,o,"FINISH");break;case"INSIDE_OBJECT_START":{switch(l){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}case"}":{n=o,t.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{l==='"'&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break}case"INSIDE_OBJECT_KEY":{l==='"'&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break}case"INSIDE_OBJECT_AFTER_KEY":{l===":"&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break}case"INSIDE_OBJECT_BEFORE_VALUE":{i(l,o,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{a(l,o);break}case"INSIDE_STRING":{switch(l){case'"':{t.pop(),n=o;break}case"\\":{t.push("INSIDE_STRING_ESCAPE");break}default:n=o}break}case"INSIDE_ARRAY_START":{l==="]"?(n=o,t.pop()):(n=o,i(l,o,"INSIDE_ARRAY_AFTER_VALUE"));break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(l){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{n=o,t.pop();break}default:{n=o;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{i(l,o,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{t.pop(),n=o;break}case"INSIDE_NUMBER":{switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{n=o;break}case"e":case"E":case"-":case".":break;case",":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&s(l,o),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&a(l,o);break}case"}":{t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&a(l,o);break}case"]":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&s(l,o);break}default:{t.pop();break}}break}case"INSIDE_LITERAL":{const f=e.substring(r,o+1);!"false".startsWith(f)&&!"true".startsWith(f)&&!"null".startsWith(f)?(t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?a(l,o):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&s(l,o)):n=o;break}}}let u=e.slice(0,n+1);for(let o=t.length-1;o>=0;o--)switch(t[o]){case"INSIDE_STRING":{u+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{u+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{u+="]";break}case"INSIDE_LITERAL":{const d=e.substring(r,e.length);"true".startsWith(d)?u+="true".slice(d.length):"false".startsWith(d)?u+="false".slice(d.length):"null".startsWith(d)&&(u+="null".slice(d.length))}}return u}async function Yn(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await Ft({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await Ft({text:Nf(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var Rf=()=>({responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}}}),wf=({schema:e,name:t,description:n})=>{const r=zi(e);return{responseFormat:yt(r.jsonSchema).then(i=>({type:"json",schema:i,...t!=null&&{name:t},...n!=null&&{description:n}})),async parseCompleteOutput({text:i},a){const s=await Ft({text:i});if(!s.success)throw new Ct({message:"No object generated: could not parse the response.",cause:s.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});const u=await Mn({value:s.value,schema:r});if(!u.success)throw new Ct({message:"No object generated: response did not match schema.",cause:u.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});return u.value},async parsePartialOutput({text:i}){const a=await Yn(i);switch(a.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:a.value}}}}},Of=({element:e,name:t,description:n})=>{const r=zi(e);return{responseFormat:yt(r.jsonSchema).then(i=>{const{$schema:a,...s}=i;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:s}},required:["elements"],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}}),async parseCompleteOutput({text:i},a){const s=await Ft({text:i});if(!s.success)throw new Ct({message:"No object generated: could not parse the response.",cause:s.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});const u=s.value;if(u==null||typeof u!="object"||!("elements"in u)||!Array.isArray(u.elements))throw new Ct({message:"No object generated: response did not match schema.",cause:new en({value:u,cause:"response must be an object with an elements array"}),text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});for(const o of u.elements){const l=await Mn({value:o,schema:r});if(!l.success)throw new Ct({message:"No object generated: response did not match schema.",cause:l.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason})}return u.elements},async parsePartialOutput({text:i}){const a=await Yn(i);switch(a.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const s=a.value;if(s==null||typeof s!="object"||!("elements"in s)||!Array.isArray(s.elements))return;const u=a.state==="repaired-parse"&&s.elements.length>0?s.elements.slice(0,-1):s.elements,o=[];for(const l of u){const d=await Mn({value:l,schema:r});d.success&&o.push(d.value)}return{partial:o}}}}}},Lf=({options:e,name:t,description:n})=>({responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}),async parseCompleteOutput({text:r},i){const a=await Ft({text:r});if(!a.success)throw new Ct({message:"No object generated: could not parse the response.",cause:a.error,text:r,response:i.response,usage:i.usage,finishReason:i.finishReason});const s=a.value;if(s==null||typeof s!="object"||!("result"in s)||typeof s.result!="string"||!e.includes(s.result))throw new Ct({message:"No object generated: response did not match schema.",cause:new en({value:s,cause:"response must be an object that contains a choice value."}),text:r,response:i.response,usage:i.usage,finishReason:i.finishReason});return s.result},async parsePartialOutput({text:r}){const i=await Yn(r);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const a=i.value;if(a==null||typeof a!="object"||!("result"in a)||typeof a.result!="string")return;const s=e.filter(u=>u.startsWith(a.result));return i.state==="successful-parse"?s.includes(a.result)?{partial:a.result}:void 0:s.length===1?{partial:s[0]}:void 0}}}}),Df=({name:e,description:t}={})=>({responseFormat:Promise.resolve({type:"json",...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:n},r){const i=await Ft({text:n});if(!i.success)throw new Ct({message:"No object generated: could not parse the response.",cause:i.error,text:n,response:r.response,usage:r.usage,finishReason:r.finishReason});return i.value},async parsePartialOutput({text:n}){const r=await Yn(n);switch(r.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return r.value===void 0?void 0:{partial:r.value}}}});$n({prefix:"aitxt",size:24});(class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}
9
-
10
- `)},flush(e){e.enqueue(`data: [DONE]
11
-
12
- `)}})}});var vf=uf(()=>zu($e([Ae({type:G("text-start"),id:Y(),providerMetadata:ae.optional()}),Ae({type:G("text-delta"),id:Y(),delta:Y(),providerMetadata:ae.optional()}),Ae({type:G("text-end"),id:Y(),providerMetadata:ae.optional()}),Ae({type:G("error"),errorText:Y()}),Ae({type:G("tool-input-start"),toolCallId:Y(),toolName:Y(),providerExecuted:Be().optional(),dynamic:Be().optional(),title:Y().optional()}),Ae({type:G("tool-input-delta"),toolCallId:Y(),inputTextDelta:Y()}),Ae({type:G("tool-input-available"),toolCallId:Y(),toolName:Y(),input:Tt(),providerExecuted:Be().optional(),providerMetadata:ae.optional(),dynamic:Be().optional(),title:Y().optional()}),Ae({type:G("tool-input-error"),toolCallId:Y(),toolName:Y(),input:Tt(),providerExecuted:Be().optional(),providerMetadata:ae.optional(),dynamic:Be().optional(),errorText:Y(),title:Y().optional()}),Ae({type:G("tool-approval-request"),approvalId:Y(),toolCallId:Y()}),Ae({type:G("tool-output-available"),toolCallId:Y(),output:Tt(),providerExecuted:Be().optional(),dynamic:Be().optional(),preliminary:Be().optional()}),Ae({type:G("tool-output-error"),toolCallId:Y(),errorText:Y(),providerExecuted:Be().optional(),dynamic:Be().optional()}),Ae({type:G("tool-output-denied"),toolCallId:Y()}),Ae({type:G("reasoning-start"),id:Y(),providerMetadata:ae.optional()}),Ae({type:G("reasoning-delta"),id:Y(),delta:Y(),providerMetadata:ae.optional()}),Ae({type:G("reasoning-end"),id:Y(),providerMetadata:ae.optional()}),Ae({type:G("source-url"),sourceId:Y(),url:Y(),title:Y().optional(),providerMetadata:ae.optional()}),Ae({type:G("source-document"),sourceId:Y(),mediaType:Y(),title:Y(),filename:Y().optional(),providerMetadata:ae.optional()}),Ae({type:G("file"),url:Y(),mediaType:Y(),providerMetadata:ae.optional()}),Ae({type:fu(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:Y().optional(),data:Tt(),transient:Be().optional()}),Ae({type:G("start-step")}),Ae({type:G("finish-step")}),Ae({type:G("start"),messageId:Y().optional(),messageMetadata:Tt().optional()}),Ae({type:G("finish"),finishReason:Ac(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:Tt().optional()}),Ae({type:G("abort"),reason:Y().optional()}),Ae({type:G("message-metadata"),messageMetadata:Tt()})])));function Pf(e){return e.type.startsWith("data-")}function hi(e){return e.type.startsWith("tool-")}function Mf(e){return e.type==="dynamic-tool"}function pi(e){return hi(e)||Mf(e)}function Ya(e){return e.type.split("-").slice(1).join("-")}function Bf({lastMessage:e,messageId:t}){return{message:e?.role==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function Ff({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:i,onToolCall:a,onData:s}){return e.pipeThrough(new TransformStream({async transform(u,o){await r(async({state:l,write:d})=>{var f,p,h,m;function _(b){const O=l.message.parts.filter(pi).find(I=>I.toolCallId===b);if(O==null)throw new Error(`no tool invocation found for tool call ${b}`);return O}function y(b){var w;const O=l.message.parts.find(H=>hi(H)&&H.toolCallId===b.toolCallId),I=b,P=O;O!=null?(O.state=b.state,P.input=I.input,P.output=I.output,P.errorText=I.errorText,P.rawInput=I.rawInput,P.preliminary=I.preliminary,b.title!==void 0&&(P.title=b.title),P.providerExecuted=(w=I.providerExecuted)!=null?w:O.providerExecuted,I.providerMetadata!=null&&O.state==="input-available"&&(O.callProviderMetadata=I.providerMetadata)):l.message.parts.push({type:`tool-${b.toolName}`,toolCallId:b.toolCallId,state:b.state,title:b.title,input:I.input,output:I.output,rawInput:I.rawInput,errorText:I.errorText,providerExecuted:I.providerExecuted,preliminary:I.preliminary,...I.providerMetadata!=null?{callProviderMetadata:I.providerMetadata}:{}})}function T(b){var w,O;const I=l.message.parts.find(q=>q.type==="dynamic-tool"&&q.toolCallId===b.toolCallId),P=b,H=I;I!=null?(I.state=b.state,H.toolName=b.toolName,H.input=P.input,H.output=P.output,H.errorText=P.errorText,H.rawInput=(w=P.rawInput)!=null?w:H.rawInput,H.preliminary=P.preliminary,b.title!==void 0&&(H.title=b.title),H.providerExecuted=(O=P.providerExecuted)!=null?O:I.providerExecuted,P.providerMetadata!=null&&I.state==="input-available"&&(I.callProviderMetadata=P.providerMetadata)):l.message.parts.push({type:"dynamic-tool",toolName:b.toolName,toolCallId:b.toolCallId,state:b.state,input:P.input,output:P.output,errorText:P.errorText,preliminary:P.preliminary,providerExecuted:P.providerExecuted,title:b.title,...P.providerMetadata!=null?{callProviderMetadata:P.providerMetadata}:{}})}async function S(b){if(b!=null){const w=l.message.metadata!=null?Xu(l.message.metadata,b):b;t!=null&&await za({value:w,schema:t}),l.message.metadata=w}}switch(u.type){case"text-start":{const b={type:"text",text:"",providerMetadata:u.providerMetadata,state:"streaming"};l.activeTextParts[u.id]=b,l.message.parts.push(b),d();break}case"text-delta":{const b=l.activeTextParts[u.id];b.text+=u.delta,b.providerMetadata=(f=u.providerMetadata)!=null?f:b.providerMetadata,d();break}case"text-end":{const b=l.activeTextParts[u.id];b.state="done",b.providerMetadata=(p=u.providerMetadata)!=null?p:b.providerMetadata,delete l.activeTextParts[u.id],d();break}case"reasoning-start":{const b={type:"reasoning",text:"",providerMetadata:u.providerMetadata,state:"streaming"};l.activeReasoningParts[u.id]=b,l.message.parts.push(b),d();break}case"reasoning-delta":{const b=l.activeReasoningParts[u.id];b.text+=u.delta,b.providerMetadata=(h=u.providerMetadata)!=null?h:b.providerMetadata,d();break}case"reasoning-end":{const b=l.activeReasoningParts[u.id];b.providerMetadata=(m=u.providerMetadata)!=null?m:b.providerMetadata,b.state="done",delete l.activeReasoningParts[u.id],d();break}case"file":{l.message.parts.push({type:"file",mediaType:u.mediaType,url:u.url}),d();break}case"source-url":{l.message.parts.push({type:"source-url",sourceId:u.sourceId,url:u.url,title:u.title,providerMetadata:u.providerMetadata}),d();break}case"source-document":{l.message.parts.push({type:"source-document",sourceId:u.sourceId,mediaType:u.mediaType,title:u.title,filename:u.filename,providerMetadata:u.providerMetadata}),d();break}case"tool-input-start":{const b=l.message.parts.filter(hi);l.partialToolCalls[u.toolCallId]={text:"",toolName:u.toolName,index:b.length,dynamic:u.dynamic,title:u.title},u.dynamic?T({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-streaming",input:void 0,providerExecuted:u.providerExecuted,title:u.title}):y({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-streaming",input:void 0,providerExecuted:u.providerExecuted,title:u.title}),d();break}case"tool-input-delta":{const b=l.partialToolCalls[u.toolCallId];b.text+=u.inputTextDelta;const{value:w}=await Yn(b.text);b.dynamic?T({toolCallId:u.toolCallId,toolName:b.toolName,state:"input-streaming",input:w,title:b.title}):y({toolCallId:u.toolCallId,toolName:b.toolName,state:"input-streaming",input:w,title:b.title}),d();break}case"tool-input-available":{u.dynamic?T({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-available",input:u.input,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:u.title}):y({toolCallId:u.toolCallId,toolName:u.toolName,state:"input-available",input:u.input,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata,title:u.title}),d(),a&&!u.providerExecuted&&await a({toolCall:u});break}case"tool-input-error":{u.dynamic?T({toolCallId:u.toolCallId,toolName:u.toolName,state:"output-error",input:u.input,errorText:u.errorText,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata}):y({toolCallId:u.toolCallId,toolName:u.toolName,state:"output-error",input:void 0,rawInput:u.input,errorText:u.errorText,providerExecuted:u.providerExecuted,providerMetadata:u.providerMetadata}),d();break}case"tool-approval-request":{const b=_(u.toolCallId);b.state="approval-requested",b.approval={id:u.approvalId},d();break}case"tool-output-denied":{const b=_(u.toolCallId);b.state="output-denied",d();break}case"tool-output-available":{const b=_(u.toolCallId);b.type==="dynamic-tool"?T({toolCallId:u.toolCallId,toolName:b.toolName,state:"output-available",input:b.input,output:u.output,preliminary:u.preliminary,providerExecuted:u.providerExecuted,title:b.title}):y({toolCallId:u.toolCallId,toolName:Ya(b),state:"output-available",input:b.input,output:u.output,providerExecuted:u.providerExecuted,preliminary:u.preliminary,title:b.title}),d();break}case"tool-output-error":{const b=_(u.toolCallId);b.type==="dynamic-tool"?T({toolCallId:u.toolCallId,toolName:b.toolName,state:"output-error",input:b.input,errorText:u.errorText,providerExecuted:u.providerExecuted,title:b.title}):y({toolCallId:u.toolCallId,toolName:Ya(b),state:"output-error",input:b.input,rawInput:b.rawInput,errorText:u.errorText,providerExecuted:u.providerExecuted,title:b.title}),d();break}case"start-step":{l.message.parts.push({type:"step-start"});break}case"finish-step":{l.activeTextParts={},l.activeReasoningParts={};break}case"start":{u.messageId!=null&&(l.message.id=u.messageId),await S(u.messageMetadata),(u.messageId!=null||u.messageMetadata!=null)&&d();break}case"finish":{u.finishReason!=null&&(l.finishReason=u.finishReason),await S(u.messageMetadata),u.messageMetadata!=null&&d();break}case"message-metadata":{await S(u.messageMetadata),u.messageMetadata!=null&&d();break}case"error":{i?.(new Error(u.errorText));break}default:if(Pf(u)){n?.[u.type]!=null&&await za({value:u.data,schema:n[u.type]});const b=u;if(b.transient){s?.(b);break}const w=b.id!=null?l.message.parts.find(O=>b.type===O.type&&b.id===O.id):void 0;w!=null?w.data=b.data:l.message.parts.push(b),s?.(b),d()}}o.enqueue(u)})}}))}async function Uf({stream:e,onError:t}){const n=e.getReader();try{for(;;){const{done:r}=await n.read();if(r)break}}catch(r){t?.(r)}finally{n.releaseLock()}}$n({prefix:"aitxt",size:24});$n({prefix:"aiobj",size:24});var Hf=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,n)=>{this.queue.push(async()=>{try{await e(),t()}catch(r){n(r)}}),this.processQueue()})}};$n({prefix:"aiobj",size:24});async function jf(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async t=>{const{name:n,type:r}=t,i=await new Promise((a,s)=>{const u=new FileReader;u.onload=o=>{var l;a((l=o.target)==null?void 0:l.result)},u.onerror=o=>s(o),u.readAsDataURL(t)});return{type:"file",mediaType:r,filename:n,url:i}}))}var zf=class{constructor({api:e="/api/chat",credentials:t,headers:n,body:r,fetch:i,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:s}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=i,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=s}async sendMessages({abortSignal:e,...t}){var n,r,i,a,s;const u=await yt(this.body),o=await yt(this.headers),l=await yt(this.credentials),d={...Dt(o),...Dt(t.headers)},f=await((n=this.prepareSendMessagesRequest)==null?void 0:n.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...u,...t.body},headers:d,credentials:l,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),p=(r=f?.api)!=null?r:this.api,h=f?.headers!==void 0?Dt(f.headers):d,m=f?.body!==void 0?f.body:{...u,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},_=(i=f?.credentials)!=null?i:l,T=await((a=this.fetch)!=null?a:globalThis.fetch)(p,{method:"POST",headers:Fa({"Content-Type":"application/json",...h},`ai-sdk/${$a}`,Ba()),body:JSON.stringify(m),credentials:_,signal:e});if(!T.ok)throw new Error((s=await T.text())!=null?s:"Failed to fetch the chat response.");if(!T.body)throw new Error("The response body is empty.");return this.processResponseStream(T.body)}async reconnectToStream(e){var t,n,r,i,a;const s=await yt(this.body),u=await yt(this.headers),o=await yt(this.credentials),l={...Dt(u),...Dt(e.headers)},d=await((t=this.prepareReconnectToStreamRequest)==null?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...s,...e.body},headers:l,credentials:o,requestMetadata:e.metadata})),f=(n=d?.api)!=null?n:`${this.api}/${e.chatId}/stream`,p=d?.headers!==void 0?Dt(d.headers):l,h=(r=d?.credentials)!=null?r:o,_=await((i=this.fetch)!=null?i:globalThis.fetch)(f,{method:"GET",headers:Fa(p,`ai-sdk/${$a}`,Ba()),credentials:h});if(_.status===204)return null;if(!_.ok)throw new Error((a=await _.text())!=null?a:"Failed to fetch the chat response.");if(!_.body)throw new Error("The response body is empty.");return this.processResponseStream(_.body)}},Zu=class extends zf{constructor(e={}){super(e)}processResponseStream(e){return hf({stream:e,schema:vf}).pipeThrough(new TransformStream({async transform(t,n){if(!t.success)throw t.error;n.enqueue(t.value)}}))}},$f=class{constructor({generateId:e=md,id:t=e(),transport:n=new Zu,messageMetadataSchema:r,dataPartSchemas:i,state:a,onError:s,onToolCall:u,onFinish:o,onData:l,sendAutomaticallyWhen:d}){this.activeResponse=void 0,this.jobExecutor=new Hf,this.sendMessage=async(f,p)=>{var h,m,_,y;if(f==null){await this.makeRequest({trigger:"submit-message",messageId:(h=this.lastMessage)==null?void 0:h.id,...p});return}let T;if("text"in f||"files"in f?T={parts:[...Array.isArray(f.files)?f.files:await jf(f.files),..."text"in f&&f.text!=null?[{type:"text",text:f.text}]:[]]}:T=f,f.messageId!=null){const S=this.state.messages.findIndex(b=>b.id===f.messageId);if(S===-1)throw new Error(`message with id ${f.messageId} not found`);if(this.state.messages[S].role!=="user")throw new Error(`message with id ${f.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,S+1),this.state.replaceMessage(S,{...T,id:f.messageId,role:(m=T.role)!=null?m:"user",metadata:f.metadata})}else this.state.pushMessage({...T,id:(_=T.id)!=null?_:this.generateId(),role:(y=T.role)!=null?y:"user",metadata:f.metadata});await this.makeRequest({trigger:"submit-message",messageId:f.messageId,...p})},this.regenerate=async({messageId:f,...p}={})=>{const h=f==null?this.state.messages.length-1:this.state.messages.findIndex(m=>m.id===f);if(h===-1)throw new Error(`message ${f} not found`);this.state.messages=this.state.messages.slice(0,this.messages[h].role==="assistant"?h:h+1),await this.makeRequest({trigger:"regenerate-message",messageId:f,...p})},this.resumeStream=async(f={})=>{await this.makeRequest({trigger:"resume-stream",...f})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:f,approved:p,reason:h})=>this.jobExecutor.run(async()=>{var m,_;const y=this.state.messages,T=y[y.length-1],S=b=>pi(b)&&b.state==="approval-requested"&&b.approval.id===f?{...b,state:"approval-responded",approval:{id:f,approved:p,reason:h}}:b;this.state.replaceMessage(y.length-1,{...T,parts:T.parts.map(S)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(S)),this.status!=="streaming"&&this.status!=="submitted"&&((m=this.sendAutomaticallyWhen)!=null&&m.call(this,{messages:this.state.messages}))&&this.makeRequest({trigger:"submit-message",messageId:(_=this.lastMessage)==null?void 0:_.id})}),this.addToolOutput=async({state:f="output-available",tool:p,toolCallId:h,output:m,errorText:_})=>this.jobExecutor.run(async()=>{var y,T;const S=this.state.messages,b=S[S.length-1],w=O=>pi(O)&&O.toolCallId===h?{...O,state:f,output:m,errorText:_}:O;this.state.replaceMessage(S.length-1,{...b,parts:b.parts.map(w)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(w)),this.status!=="streaming"&&this.status!=="submitted"&&((y=this.sendAutomaticallyWhen)!=null&&y.call(this,{messages:this.state.messages}))&&this.makeRequest({trigger:"submit-message",messageId:(T=this.lastMessage)==null?void 0:T.id})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var f;this.status!=="streaming"&&this.status!=="submitted"||(f=this.activeResponse)!=null&&f.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=i,this.state=a,this.onError=s,this.onToolCall=u,this.onFinish=o,this.onData=l,this.sendAutomaticallyWhen=d}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async makeRequest({trigger:e,metadata:t,headers:n,body:r,messageId:i}){var a,s,u,o;this.setStatus({status:"submitted",error:void 0});const l=this.lastMessage;let d=!1,f=!1,p=!1;try{const h={state:Bf({lastMessage:this.state.snapshot(l),messageId:this.generateId()}),abortController:new AbortController};h.abortController.signal.addEventListener("abort",()=>{d=!0}),this.activeResponse=h;let m;if(e==="resume-stream"){const y=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:n,body:r});if(y==null){this.setStatus({status:"ready"});return}m=y}else m=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:h.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:i});const _=y=>this.jobExecutor.run(()=>y({state:h.state,write:()=>{var T;this.setStatus({status:"streaming"}),h.state.message.id===((T=this.lastMessage)==null?void 0:T.id)?this.state.replaceMessage(this.state.messages.length-1,h.state.message):this.state.pushMessage(h.state.message)}}));await Uf({stream:Ff({stream:m,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:_,onError:y=>{throw y}}),onError:y=>{throw y}}),this.setStatus({status:"ready"})}catch(h){if(d||h.name==="AbortError")return d=!0,this.setStatus({status:"ready"}),null;p=!0,h instanceof TypeError&&(h.message.toLowerCase().includes("fetch")||h.message.toLowerCase().includes("network"))&&(f=!0),this.onError&&h instanceof Error&&this.onError(h),this.setStatus({status:"error",error:h})}finally{try{(s=this.onFinish)==null||s.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:d,isDisconnect:f,isError:p,finishReason:(a=this.activeResponse)==null?void 0:a.state.finishReason})}catch(h){console.error(h)}this.activeResponse=void 0}(u=this.sendAutomaticallyWhen)!=null&&u.call(this,{messages:this.state.messages})&&!p&&await this.makeRequest({trigger:"submit-message",messageId:(o=this.lastMessage)==null?void 0:o.id,metadata:t,headers:n,body:r})}},Yr,qa;function Yf(){if(qa)return Yr;qa=1;function e(t,n){if(typeof t!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof t}\`.`);let r,i=0;return function(...s){clearTimeout(r);const u=Date.now(),o=u-i,l=n-o;l<=0?(i=u,t.apply(this,s)):r=setTimeout(()=>{i=Date.now(),t.apply(this,s)},l)}}return Yr=e,Yr}var qf=Yf();const Vf=Mi(qf);var Ku=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ye=(e,t,n)=>(Ku(e,t,"read from private field"),n?n.call(e):t.get(e)),st=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},xt=(e,t,n,r)=>(Ku(e,t,"write to private field"),t.set(e,n),n);function Wf(e,t){return t!=null?Vf(e,t):e}var Ze,ar,sr,xn,_n,An,Qt,mi,gi,Qf=class{constructor(e=[]){st(this,Ze,void 0),st(this,ar,"ready"),st(this,sr,void 0),st(this,xn,new Set),st(this,_n,new Set),st(this,An,new Set),this.pushMessage=t=>{xt(this,Ze,ye(this,Ze).concat(t)),ye(this,Qt).call(this)},this.popMessage=()=>{xt(this,Ze,ye(this,Ze).slice(0,-1)),ye(this,Qt).call(this)},this.replaceMessage=(t,n)=>{xt(this,Ze,[...ye(this,Ze).slice(0,t),this.snapshot(n),...ye(this,Ze).slice(t+1)]),ye(this,Qt).call(this)},this.snapshot=t=>structuredClone(t),this["~registerMessagesCallback"]=(t,n)=>{const r=n?Wf(t,n):t;return ye(this,xn).add(r),()=>{ye(this,xn).delete(r)}},this["~registerStatusCallback"]=t=>(ye(this,_n).add(t),()=>{ye(this,_n).delete(t)}),this["~registerErrorCallback"]=t=>(ye(this,An).add(t),()=>{ye(this,An).delete(t)}),st(this,Qt,()=>{ye(this,xn).forEach(t=>t())}),st(this,mi,()=>{ye(this,_n).forEach(t=>t())}),st(this,gi,()=>{ye(this,An).forEach(t=>t())}),xt(this,Ze,e)}get status(){return ye(this,ar)}set status(e){xt(this,ar,e),ye(this,mi).call(this)}get error(){return ye(this,sr)}set error(e){xt(this,sr,e),ye(this,gi).call(this)}get messages(){return ye(this,Ze)}set messages(e){xt(this,Ze,[...e]),ye(this,Qt).call(this)}};Ze=new WeakMap;ar=new WeakMap;sr=new WeakMap;xn=new WeakMap;_n=new WeakMap;An=new WeakMap;Qt=new WeakMap;mi=new WeakMap;gi=new WeakMap;var Gt,Va=class extends $f{constructor({messages:t,...n}){const r=new Qf(t);super({...n,state:r}),st(this,Gt,void 0),this["~registerMessagesCallback"]=(i,a)=>ye(this,Gt)["~registerMessagesCallback"](i,a),this["~registerStatusCallback"]=i=>ye(this,Gt)["~registerStatusCallback"](i),this["~registerErrorCallback"]=i=>ye(this,Gt)["~registerErrorCallback"](i),xt(this,Gt,r)}};Gt=new WeakMap;function Gf({experimental_throttle:e,resume:t=!1,...n}={}){const r=V.useRef("chat"in n?n.chat:new Va(n));("chat"in n&&n.chat!==r.current||"id"in n&&r.current.id!==n.id)&&(r.current="chat"in n?n.chat:new Va(n));const a=V.useCallback(d=>r.current["~registerMessagesCallback"](d,e),[e,r.current.id]),s=V.useSyncExternalStore(a,()=>r.current.messages,()=>r.current.messages),u=V.useSyncExternalStore(r.current["~registerStatusCallback"],()=>r.current.status,()=>r.current.status),o=V.useSyncExternalStore(r.current["~registerErrorCallback"],()=>r.current.error,()=>r.current.error),l=V.useCallback(d=>{typeof d=="function"&&(d=d(r.current.messages)),r.current.messages=d},[r]);return V.useEffect(()=>{t&&r.current.resumeStream()},[t,r]),{id:r.current.id,messages:s,setMessages:l,sendMessage:r.current.sendMessage,regenerate:r.current.regenerate,clearError:r.current.clearError,stop:r.current.stop,error:o,resumeStream:r.current.resumeStream,status:u,addToolResult:r.current.addToolOutput,addToolOutput:r.current.addToolOutput,addToolApprovalResponse:r.current.addToolApprovalResponse}}const Xf="You are a helpful assistant.",Zf=e=>new Zu({api:`/api/${e}/models/stream`,credentials:"include",prepareSendMessagesRequest:({messages:t,requestMetadata:n})=>({body:{messages:t,stream:!0,...n}})});function Y3(e){const t=X.c(37),{threadId:n,systemPrompt:r,onCreateThread:i,onError:a,onToolCall:s}=e,{org:u,locator:o}=St(),{slug:l}=u,d=ji(),f=Su(),[p,h]=V.useState(null),m=od(n),_=r||Xf;let y;t[0]!==_?(y={id:"system",role:"system",parts:[{type:"text",text:_}]},t[0]=_,t[1]=y):y=t[1];const S=y;let b;t[2]!==m||t[3]!==S?(b=[S,...m],t[2]=m,t[3]=S,t[4]=b):b=t[4];const w=b,O=`${n}:${_}`;let I;t[5]!==l?(I=Zf(l),t[5]=l,t[6]=I):I=t[6];const P=I;let H;t[7]!==o||t[8]!==f||t[9]!==i||t[10]!==d||t[11]!==n?(H=async ue=>{const{finishReason:be,messages:C,isAbort:le,isDisconnect:ce,isError:_e}=ue;if(h(be??null),be!=="stop"||le||ce||_e)return;const we=C.slice(-2).filter(Boolean);if(we.length!==2){console.warn("[chat] Expected 2 messages, got",we.length);return}f.insertMany.mutate(we);const Se=we.find(Jf)?.parts?.find(Kf)?.text.slice(0,100)||"",Oe=await sd(o,n);if(!Oe){if(i)i({id:n,title:Se});else{const Le=new Date().toISOString(),qe={id:n,title:Se,created_at:Le,updated_at:Le,hidden:!1};d.insert.mutate(qe)}return}d.update.mutate({id:n,updates:{title:Oe.title||Se,updated_at:new Date().toISOString()}})},t[7]=o,t[8]=f,t[9]=i,t[10]=d,t[11]=n,t[12]=H):H=t[12];const q=H;let N;t[13]!==a?(N=ue=>{console.error("[chat] Chat error:",ue),a?.(ue)},t[13]=a,t[14]=N):N=t[14];let F;t[15]!==w||t[16]!==O||t[17]!==q||t[18]!==s||t[19]!==N||t[20]!==P?(F={id:O,messages:w,transport:P,onFinish:q,onToolCall:s,onError:N},t[15]=w,t[16]=O,t[17]=q,t[18]=s,t[19]=N,t[20]=P,t[21]=F):F=t[21];const v=Gf(F);let W;t[22]!==v?(W=async(ue,be)=>{!ue?.trim()||v.status==="submitted"||v.status==="streaming"||(h(null),await v.sendMessage({id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:ue}],metadata:be},{metadata:be}))},t[22]=v,t[23]=W):W=t[23];const z=W,U=v.messages[0]?.role==="system"?v.messages.length===1:v.messages.length===0,Z=v.messages,ne=v.status;let oe;t[24]!==v?(oe=v.stop.bind(v),t[24]=v,t[25]=oe):oe=t[25];let xe;t[26]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>h(null),t[26]=xe):xe=t[26];let k;return t[27]!==v.clearError||t[28]!==v.error||t[29]!==v.messages||t[30]!==v.setMessages||t[31]!==v.status||t[32]!==p||t[33]!==U||t[34]!==z||t[35]!==oe?(k={messages:Z,status:ne,sendMessage:z,stop:oe,setMessages:v.setMessages,isEmpty:U,error:v.error,clearError:v.clearError,finishReason:p,clearFinishReason:xe},t[27]=v.clearError,t[28]=v.error,t[29]=v.messages,t[30]=v.setMessages,t[31]=v.status,t[32]=p,t[33]=U,t[34]=z,t[35]=oe,t[36]=k):k=t[36],k}function Kf(e){return e.type==="text"}function Jf(e){return e.parts?.find(eh)}function eh(e){return e.type==="text"}const Ju={inputValue:"",branchContext:null};function th(e,t){switch(t.type){case"SET_INPUT":return{...e,inputValue:t.payload};case"START_BRANCH":return{...e,branchContext:t.payload};case"CLEAR_BRANCH":return{...e,branchContext:null};case"RESET":return Ju;default:return e}}const eo=V.createContext(null),to=()=>crypto.randomUUID();function nh(e){const t=X.c(16),{children:n}=e,{locator:r}=St(),[i,a]=V.useReducer(th,Ju),s=ji(),[u,o]=Bc(Fc.threadManagerState(r)+":active-id",rh);let l;t[0]!==o||t[1]!==s?(l=y=>{const T=y?.id||crypto.randomUUID(),S=new Date().toISOString(),b={id:T,title:y?.title||"",created_at:y?.created_at||S,updated_at:y?.updated_at||S,hidden:y?.hidden??!1};return s.insert.mutate(b),o(T),b},t[0]=o,t[1]=s,t[2]=l):l=t[2];const d=l;let f;t[3]!==u||t[4]!==o||t[5]!==s?(f=y=>{s.update.mutate({id:y,updates:{hidden:!0,updated_at:new Date().toISOString()}}),u===y&&o(to())},t[3]=u,t[4]=o,t[5]=s,t[6]=f):f=t[6];const p=f;let h;t[7]!==u||t[8]!==d||t[9]!==p||t[10]!==i||t[11]!==o?(h={interactionState:i,interactionDispatch:a,activeThreadId:u,createThread:d,setActiveThreadId:o,hideThread:p},t[7]=u,t[8]=d,t[9]=p,t[10]=i,t[11]=o,t[12]=h):h=t[12];const m=h;let _;return t[13]!==n||t[14]!==m?(_=g.jsx(eo.Provider,{value:m,children:n}),t[13]=n,t[14]=m,t[15]=_):_=t[15],_}function rh(e){return e||to()}function ih(){const e=X.c(16),t=V.useContext(eo);if(!t)throw new Error("useChat must be used within a ChatProvider");const{interactionState:n,interactionDispatch:r}=t;let i,a,s,u;e[0]!==r?(i=l=>r({type:"SET_INPUT",payload:l}),a=l=>r({type:"START_BRANCH",payload:l}),s=()=>r({type:"CLEAR_BRANCH"}),u=()=>r({type:"RESET"}),e[0]=r,e[1]=i,e[2]=a,e[3]=s,e[4]=u):(i=e[1],a=e[2],s=e[3],u=e[4]);let o;return e[5]!==t.activeThreadId||e[6]!==t.createThread||e[7]!==t.hideThread||e[8]!==t.setActiveThreadId||e[9]!==n.branchContext||e[10]!==n.inputValue||e[11]!==i||e[12]!==a||e[13]!==s||e[14]!==u?(o={inputValue:n.inputValue,branchContext:n.branchContext,setInputValue:i,startBranch:a,clearBranch:s,reset:u,activeThreadId:t.activeThreadId,createThread:t.createThread,setActiveThreadId:t.setActiveThreadId,hideThread:t.hideThread},e[5]=t.activeThreadId,e[6]=t.createThread,e[7]=t.hideThread,e[8]=t.setActiveThreadId,e[9]=n.branchContext,e[10]=n.inputValue,e[11]=i,e[12]=a,e[13]=s,e[14]=u,e[15]=o):o=e[15],o}function q3(e){const t=X.c(19),{prompts:n,onSelect:r,className:i}=e;if(n.length===0)return null;let a,s,u,o;if(t[0]!==i||t[1]!==r||t[2]!==n){const f=n.slice(0,4);t[7]!==i?(u=he("flex flex-col gap-3 flex-1",i),t[7]=i,t[8]=u):u=t[8],t[9]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Try asking"}),t[9]=o):o=t[9],a="grid grid-cols-1 sm:grid-cols-2 gap-2";let p;t[10]!==r?(p=h=>g.jsxs("button",{type:"button",onClick:()=>r(h),className:he("flex items-start gap-3 p-3 rounded-xl","bg-muted/50 hover:bg-muted transition-colors","text-left cursor-pointer group","border border-transparent hover:border-border"),children:[g.jsx("div",{className:"shrink-0 mt-0.5",children:g.jsx(Au,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),g.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0 flex-1",children:[g.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:(h.title??h.name).replace(/_/g," ")}),h.description&&g.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:h.description})]})]},h.name),t[10]=r,t[11]=p):p=t[11],s=f.map(p),t[0]=i,t[1]=r,t[2]=n,t[3]=a,t[4]=s,t[5]=u,t[6]=o}else a=t[3],s=t[4],u=t[5],o=t[6];let l;t[12]!==a||t[13]!==s?(l=g.jsx("div",{className:a,children:s}),t[12]=a,t[13]=s,t[14]=l):l=t[14];let d;return t[15]!==u||t[16]!==o||t[17]!==l?(d=g.jsxs("div",{className:u,children:[o,l]}),t[15]=u,t[16]=o,t[17]=l,t[18]=d):d=t[18],d}function ah(e){const t=X.c(66),{value:n,onChange:r,onSubmit:i,onStop:a,disabled:s,isStreaming:u,placeholder:o,className:l,centered:d,contextContent:f,leftActions:p,rightActions:h,maxTextHeight:m,children:_}=e,y=o===void 0?"Ask anything or @ for context":o,T=m===void 0?"164px":m;let S;t[0]!==s||t[1]!==u||t[2]!==n?(S=!s&&!u&&n.trim().length>0,t[0]=s,t[1]=u,t[2]=n,t[3]=S):S=t[3];const b=S;let w;t[4]!==b||t[5]!==u||t[6]!==a||t[7]!==i?(w=Xe=>{Xe.preventDefault(),u&&a?a():b&&i()},t[4]=b,t[5]=u,t[6]=a,t[7]=i,t[8]=w):w=t[8];const O=w;let I;t[9]!==b||t[10]!==i?(I=Xe=>{Xe.key==="Enter"&&!Xe.shiftKey&&(Xe.preventDefault(),b&&i())},t[9]=b,t[10]=i,t[11]=I):I=t[11];const P=I;let H;t[12]!==l?(H=he("w-full",l),t[12]=l,t[13]=H):H=t[13];let q;t[14]===Symbol.for("react.memo_cache_sentinel")?(q=he("relative rounded-xl border border-border bg-background w-full min-h-[130px] flex flex-col"),t[14]=q):q=t[14];let N;t[15]!==f?(N=f&&g.jsx("div",{className:"mb-1",children:f}),t[15]=f,t[16]=N):N=t[16];let F;t[17]!==T?(F={maxHeight:T},t[17]=T,t[18]=F):F=t[18];let v;t[19]!==r?(v=Xe=>r(Xe.target.value),t[19]=r,t[20]=v):v=t[20];const W=s||u;let z;t[21]===Symbol.for("react.memo_cache_sentinel")?(z=he("placeholder:text-muted-foreground resize-none focus-visible:ring-0 border-0 p-2 text-sm min-h-[20px] w-full","rounded-none shadow-none"),t[21]=z):z=t[21];let U;t[22]===Symbol.for("react.memo_cache_sentinel")?(U={minHeight:"20px",height:"auto",overflow:"hidden"},t[22]=U):U=t[22];let Z;t[23]!==P||t[24]!==y||t[25]!==v||t[26]!==W||t[27]!==n?(Z=g.jsx(Mc,{value:n,onChange:v,onKeyDown:P,placeholder:y,disabled:W,className:z,rows:1,style:U}),t[23]=P,t[24]=y,t[25]=v,t[26]=W,t[27]=n,t[28]=Z):Z=t[28];let ne;t[29]!==F||t[30]!==Z?(ne=g.jsx("div",{className:"overflow-y-auto relative flex-1",style:F,children:Z}),t[29]=F,t[30]=Z,t[31]=ne):ne=t[31];let oe;t[32]!==ne||t[33]!==N?(oe=g.jsxs("div",{className:"relative flex flex-col gap-2 p-2.5 flex-1",children:[N,ne]}),t[32]=ne,t[33]=N,t[34]=oe):oe=t[34];let xe;t[35]!==_||t[36]!==p?(xe=g.jsxs("div",{className:"flex items-center overflow-hidden gap-2 min-w-0",children:[p,_]}),t[35]=_,t[36]=p,t[37]=xe):xe=t[37];const k=u?"button":"submit";let ue;t[38]!==u||t[39]!==a?(ue=Xe=>{u&&(Xe.preventDefault(),Xe.stopPropagation(),a?.())},t[38]=u,t[39]=a,t[40]=ue):ue=t[40];const be=b||u?"default":"ghost",C=!b&&!u,le=!b&&!u&&"bg-muted text-muted-foreground hover:bg-muted hover:text-muted-foreground cursor-not-allowed";let ce;t[41]!==le?(ce=he("size-8 rounded-full transition-all",le),t[41]=le,t[42]=ce):ce=t[42];const _e=u?"Stop generating":"Send message (Enter)";let we;t[43]!==u?(we=u?g.jsx(Oc,{size:20}):g.jsx(Rc,{size:20}),t[43]=u,t[44]=we):we=t[44];let Se;t[45]!==k||t[46]!==ue||t[47]!==be||t[48]!==C||t[49]!==ce||t[50]!==_e||t[51]!==we?(Se=g.jsx(it,{type:k,onClick:ue,variant:be,size:"icon",disabled:C,className:ce,title:_e,children:we}),t[45]=k,t[46]=ue,t[47]=be,t[48]=C,t[49]=ce,t[50]=_e,t[51]=we,t[52]=Se):Se=t[52];let Oe;t[53]!==h||t[54]!==Se?(Oe=g.jsxs("div",{className:"flex items-center gap-1",children:[h,Se]}),t[53]=h,t[54]=Se,t[55]=Oe):Oe=t[55];let Le;t[56]!==xe||t[57]!==Oe?(Le=g.jsxs("div",{className:"flex items-center justify-between p-2.5",children:[xe,Oe]}),t[56]=xe,t[57]=Oe,t[58]=Le):Le=t[58];let qe;t[59]!==oe||t[60]!==Le?(qe=g.jsxs("div",{className:q,children:[oe,Le]}),t[59]=oe,t[60]=Le,t[61]=qe):qe=t[61];let Yt;return t[62]!==O||t[63]!==qe||t[64]!==H?(Yt=g.jsx("form",{onSubmit:O,className:H,children:qe}),t[62]=O,t[63]=qe,t[64]=H,t[65]=Yt):Yt=t[65],Yt}function sh(){const e=X.c(3),[t,n]=V.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=async s=>{await navigator.clipboard.writeText(s),n(!0),setTimeout(()=>n(!1),2e3)},e[0]=r):r=e[0];const i=r;let a;return e[1]!==t?(a={handleCopy:i,copied:t},e[1]=t,e[2]=a):a=e[2],a}function $i(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var jt=$i();function no(e){jt=e}var Cn={exec:()=>null};function de(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Ue.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var Ue={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},uh=/^(?:[ \t]*(?:\n|$))+/,oh=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lh=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,qn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ch=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yi=/(?:[*+-]|\d{1,9}[.)])/,ro=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,io=de(ro).replace(/bull/g,Yi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),dh=de(ro).replace(/bull/g,Yi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),qi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,fh=/^[^\n]+/,Vi=/(?!\s*\])(?:\\.|[^\[\]\\])+/,hh=de(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Vi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ph=de(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yi).getRegex(),Ir="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Wi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mh=de("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Wi).replace("tag",Ir).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ao=de(qi).replace("hr",qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ir).getRegex(),gh=de(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ao).getRegex(),Qi={blockquote:gh,code:oh,def:hh,fences:lh,heading:ch,hr:qn,html:mh,lheading:io,list:ph,newline:uh,paragraph:ao,table:Cn,text:fh},Wa=de("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ir).getRegex(),Eh={...Qi,lheading:dh,table:Wa,paragraph:de(qi).replace("hr",qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Wa).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ir).getRegex()},bh={...Qi,html:de(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Wi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Cn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:de(qi).replace("hr",qn).replace("heading",` *#{1,6} *[^
13
- ]`).replace("lheading",io).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Th=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xh=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,so=/^( {2,}|\\)\n(?!\s*$)/,_h=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Sr=/[\p{P}\p{S}]/u,Gi=/[\s\p{P}\p{S}]/u,uo=/[^\s\p{P}\p{S}]/u,Ah=de(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Gi).getRegex(),oo=/(?!~)[\p{P}\p{S}]/u,yh=/(?!~)[\s\p{P}\p{S}]/u,kh=/(?:[^\s\p{P}\p{S}]|~)/u,Ch=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,lo=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ih=de(lo,"u").replace(/punct/g,Sr).getRegex(),Sh=de(lo,"u").replace(/punct/g,oo).getRegex(),co="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Nh=de(co,"gu").replace(/notPunctSpace/g,uo).replace(/punctSpace/g,Gi).replace(/punct/g,Sr).getRegex(),Rh=de(co,"gu").replace(/notPunctSpace/g,kh).replace(/punctSpace/g,yh).replace(/punct/g,oo).getRegex(),wh=de("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,uo).replace(/punctSpace/g,Gi).replace(/punct/g,Sr).getRegex(),Oh=de(/\\(punct)/,"gu").replace(/punct/g,Sr).getRegex(),Lh=de(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Dh=de(Wi).replace("(?:-->|$)","-->").getRegex(),vh=de("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Dh).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),hr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ph=de(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",hr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fo=de(/^!?\[(label)\]\[(ref)\]/).replace("label",hr).replace("ref",Vi).getRegex(),ho=de(/^!?\[(ref)\](?:\[\])?/).replace("ref",Vi).getRegex(),Mh=de("reflink|nolink(?!\\()","g").replace("reflink",fo).replace("nolink",ho).getRegex(),Xi={_backpedal:Cn,anyPunctuation:Oh,autolink:Lh,blockSkip:Ch,br:so,code:xh,del:Cn,emStrongLDelim:Ih,emStrongRDelimAst:Nh,emStrongRDelimUnd:wh,escape:Th,link:Ph,nolink:ho,punctuation:Ah,reflink:fo,reflinkSearch:Mh,tag:vh,text:_h,url:Cn},Bh={...Xi,link:de(/^!?\[(label)\]\((.*?)\)/).replace("label",hr).getRegex(),reflink:de(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",hr).getRegex()},Ei={...Xi,emStrongRDelimAst:Rh,emStrongLDelim:Sh,url:de(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Fh={...Ei,br:de(so).replace("{2,}","*").getRegex(),text:de(Ei.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Kn={normal:Qi,gfm:Eh,pedantic:bh},fn={normal:Xi,gfm:Ei,breaks:Fh,pedantic:Bh},Uh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Qa=e=>Uh[e];function ut(e,t){if(t){if(Ue.escapeTest.test(e))return e.replace(Ue.escapeReplace,Qa)}else if(Ue.escapeTestNoEncode.test(e))return e.replace(Ue.escapeReplaceNoEncode,Qa);return e}function Ga(e){try{e=encodeURI(e).replace(Ue.percentDecode,"%")}catch{return null}return e}function Xa(e,t){const n=e.replace(Ue.findPipe,(a,s,u)=>{let o=!1,l=s;for(;--l>=0&&u[l]==="\\";)o=!o;return o?"|":" |"}),r=n.split(Ue.splitPipe);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(Ue.slashPipe,"|");return r}function hn(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function Hh(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Za(e,t,n,r,i){const a=t.href,s=t.title||null,u=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;const o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,o}function jh(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const i=r[1];return t.split(`
14
- `).map(a=>{const s=a.match(n.other.beginningSpace);if(s===null)return a;const[u]=s;return u.length>=i.length?a.slice(i.length):a}).join(`
15
- `)}var pr=class{options;rules;lexer;constructor(e){this.options=e||jt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:hn(n,`
16
- `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],r=jh(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){const r=hn(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:hn(t[0],`
17
- `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=hn(t[0],`
18
- `).split(`
19
- `),r="",i="";const a=[];for(;n.length>0;){let s=!1;const u=[];let o;for(o=0;o<n.length;o++)if(this.rules.other.blockquoteStart.test(n[o]))u.push(n[o]),s=!0;else if(!s)u.push(n[o]);else break;n=n.slice(o);const l=u.join(`
20
- `),d=l.replace(this.rules.other.blockquoteSetextReplace,`
21
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
22
- ${l}`:l,i=i?`${i}
23
- ${d}`:d;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=f,n.length===0)break;const p=a.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){const h=p,m=h.raw+`
24
- `+n.join(`
25
- `),_=this.blockquote(m);a[a.length-1]=_,r=r.substring(0,r.length-h.raw.length)+_.raw,i=i.substring(0,i.length-h.text.length)+_.text;break}else if(p?.type==="list"){const h=p,m=h.raw+`
26
- `+n.join(`
27
- `),_=this.list(m);a[a.length-1]=_,r=r.substring(0,r.length-p.raw.length)+_.raw,i=i.substring(0,i.length-h.raw.length)+_.raw,n=m.substring(a.at(-1).raw.length).split(`
28
- `);continue}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const a=this.rules.other.listItemRegex(n);let s=!1;for(;e;){let o=!1,l="",d="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;l=t[0],e=e.substring(l.length);let f=t[2].split(`
29
- `,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),p=e.split(`
30
- `,1)[0],h=!f.trim(),m=0;if(this.options.pedantic?(m=2,d=f.trimStart()):h?m=t[1].length+1:(m=t[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=f.slice(m),m+=t[1].length),h&&this.rules.other.blankLine.test(p)&&(l+=p+`
31
- `,e=e.substring(p.length+1),o=!0),!o){const T=this.rules.other.nextBulletRegex(m),S=this.rules.other.hrRegex(m),b=this.rules.other.fencesBeginRegex(m),w=this.rules.other.headingBeginRegex(m),O=this.rules.other.htmlBeginRegex(m);for(;e;){const I=e.split(`
32
- `,1)[0];let P;if(p=I,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),P=p):P=p.replace(this.rules.other.tabCharGlobal," "),b.test(p)||w.test(p)||O.test(p)||T.test(p)||S.test(p))break;if(P.search(this.rules.other.nonSpaceChar)>=m||!p.trim())d+=`
33
- `+P.slice(m);else{if(h||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(f)||w.test(f)||S.test(f))break;d+=`
34
- `+p}!h&&!p.trim()&&(h=!0),l+=I+`
35
- `,e=e.substring(I.length+1),f=P.slice(m)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(s=!0));let _=null,y;this.options.gfm&&(_=this.rules.other.listIsTask.exec(d),_&&(y=_[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:l,task:!!_,checked:y,loose:!1,text:d,tokens:[]}),i.raw+=l}const u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o=0;o<i.items.length;o++)if(this.lexer.state.top=!1,i.items[o].tokens=this.lexer.blockTokens(i.items[o].text,[]),!i.loose){const l=i.items[o].tokens.filter(f=>f.type==="space"),d=l.length>0&&l.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=d}if(i.loose)for(let o=0;o<i.items.length;o++)i.items[o].loose=!0;return i}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const n=Xa(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
36
- `):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const s of r)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<n.length;s++)a.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:a.align[s]});for(const s of i)a.rows.push(Xa(s,a.header.length).map((u,o)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[o]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
37
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const a=hn(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{const a=Hh(t[2],"()");if(a===-2)return;if(a>-1){const u=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,u).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Za(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){const a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return Za(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const a=[...r[0]].length-1;let s,u,o=a,l=0;const d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+a);(r=d.exec(t))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(u=[...s].length,r[3]||r[4]){o+=u;continue}else if((r[5]||r[6])&&a%3&&!((a+u)%3)){l+=u;continue}if(o-=u,o>0)continue;u=Math.min(u,u+o+l);const f=[...r[0]][0].length,p=e.slice(0,a+r.index+f+u);if(Math.min(a,u)%2){const m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}const h=p.slice(2,-2);return{type:"strong",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},mt=class bi{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||jt,this.options.tokenizer=this.options.tokenizer||new pr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:Ue,block:Kn.normal,inline:fn.normal};this.options.pedantic?(n.block=Kn.pedantic,n.inline=fn.pedantic):this.options.gfm&&(n.block=Kn.gfm,this.options.breaks?n.inline=fn.breaks:n.inline=fn.gfm),this.tokenizer.rules=n}static get rules(){return{block:Kn,inline:fn}}static lex(t,n){return new bi(n).lex(t)}static lexInline(t,n){return new bi(n).inlineTokens(t)}lex(t){t=t.replace(Ue.carriageReturn,`
38
- `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.options.pedantic&&(t=t.replace(Ue.tabCharGlobal," ").replace(Ue.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(s=>(i=s.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);const s=n.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
39
- `:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);const s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
40
- `+i.raw,s.text+=`
41
- `+i.text,this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);const s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
42
- `+i.raw,s.text+=`
43
- `+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0;const u=t.slice(1);let o;this.options.extensions.startBlock.forEach(l=>{o=l.call({lexer:this},u),typeof o=="number"&&o>=0&&(s=Math.min(s,o))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){const s=n.at(-1);r&&s?.type==="paragraph"?(s.raw+=`
44
- `+i.raw,s.text+=`
45
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i),r=a.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);const s=n.at(-1);s?.type==="text"?(s.raw+=`
46
- `+i.raw,s.text+=`
47
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r=t,i=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,s="";for(;t;){a||(s=""),a=!1;let u;if(this.options.extensions?.inline?.some(l=>(u=l.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);const l=n.at(-1);u.type==="text"&&l?.type==="text"?(l.raw+=u.raw,l.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,r,s)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let o=t;if(this.options.extensions?.startInline){let l=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(l=Math.min(l,f))}),l<1/0&&l>=0&&(o=t.substring(0,l+1))}if(u=this.tokenizer.inlineText(o)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(s=u.raw.slice(-1)),a=!0;const l=n.at(-1);l?.type==="text"?(l.raw+=u.raw,l.text+=u.text):n.push(u);continue}if(t){const l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return n}},mr=class{options;parser;constructor(e){this.options=e||jt}space(e){return""}code({text:e,lang:t,escaped:n}){const r=(t||"").match(Ue.notSpaceStart)?.[0],i=e.replace(Ue.endingNewline,"")+`
48
- `;return r?'<pre><code class="language-'+ut(r)+'">'+(n?i:ut(i,!0))+`</code></pre>
49
- `:"<pre><code>"+(n?i:ut(i,!0))+`</code></pre>
50
- `}blockquote({tokens:e}){return`<blockquote>
51
- ${this.parser.parse(e)}</blockquote>
52
- `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
53
- `}hr(e){return`<hr>
54
- `}list(e){const t=e.ordered,n=e.start;let r="";for(let s=0;s<e.items.length;s++){const u=e.items[s];r+=this.listitem(u)}const i=t?"ol":"ul",a=t&&n!==1?' start="'+n+'"':"";return"<"+i+a+`>
55
- `+r+"</"+i+`>
56
- `}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+ut(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
57
- `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
58
- `}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){const a=e.rows[i];n="";for(let s=0;s<a.length;s++)n+=this.tablecell(a[s]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
59
- <thead>
60
- `+t+`</thead>
61
- `+r+`</table>
62
- `}tablerow({text:e}){return`<tr>
63
- ${e}</tr>
64
- `}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
65
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ut(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),i=Ga(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+ut(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));const i=Ga(e);if(i===null)return ut(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${ut(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ut(e.text)}},Zi=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},gt=class Ti{options;renderer;textRenderer;constructor(t){this.options=t||jt,this.options.renderer=this.options.renderer||new mr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Zi}static parse(t,n){return new Ti(n).parse(t)}static parseInline(t,n){return new Ti(n).parseInline(t)}parse(t,n=!0){let r="";for(let i=0;i<t.length;i++){const a=t[i];if(this.options.extensions?.renderers?.[a.type]){const u=a,o=this.options.extensions.renderers[u.type].call({parser:this},u);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)){r+=o||"";continue}}const s=a;switch(s.type){case"space":{r+=this.renderer.space(s);continue}case"hr":{r+=this.renderer.hr(s);continue}case"heading":{r+=this.renderer.heading(s);continue}case"code":{r+=this.renderer.code(s);continue}case"table":{r+=this.renderer.table(s);continue}case"blockquote":{r+=this.renderer.blockquote(s);continue}case"list":{r+=this.renderer.list(s);continue}case"html":{r+=this.renderer.html(s);continue}case"paragraph":{r+=this.renderer.paragraph(s);continue}case"text":{let u=s,o=this.renderer.text(u);for(;i+1<t.length&&t[i+1].type==="text";)u=t[++i],o+=`
66
- `+this.renderer.text(u);n?r+=this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):r+=o;continue}default:{const u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}parseInline(t,n=this.renderer){let r="";for(let i=0;i<t.length;i++){const a=t[i];if(this.options.extensions?.renderers?.[a.type]){const u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=u||"";continue}}const s=a;switch(s.type){case"escape":{r+=n.text(s);break}case"html":{r+=n.html(s);break}case"link":{r+=n.link(s);break}case"image":{r+=n.image(s);break}case"strong":{r+=n.strong(s);break}case"em":{r+=n.em(s);break}case"codespan":{r+=n.codespan(s);break}case"br":{r+=n.br(s);break}case"del":{r+=n.del(s);break}case"text":{r+=n.text(s);break}default:{const u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},ur=class{options;block;constructor(e){this.options=e||jt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?mt.lex:mt.lexInline}provideParser(){return this.block?gt.parse:gt.parseInline}},zh=class{defaults=$i();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=gt;Renderer=mr;TextRenderer=Zi;Lexer=mt;Tokenizer=pr;Hooks=ur;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const i=r;for(const a of i.header)n=n.concat(this.walkTokens(a.tokens,t));for(const a of i.rows)for(const s of a)n=n.concat(this.walkTokens(s.tokens,t));break}case"list":{const i=r;n=n.concat(this.walkTokens(i.items,t));break}default:{const i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{const s=i[a].flat(1/0);n=n.concat(this.walkTokens(s,t))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const a=t.renderers[i.name];a?t.renderers[i.name]=function(...s){let u=i.renderer.apply(this,s);return u===!1&&(u=a.apply(this,s)),u}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=t[i.level];a?a.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){const i=this.defaults.renderer||new mr(this.defaults);for(const a in n.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const s=a,u=n.renderer[s],o=i[s];i[s]=(...l)=>{let d=u.apply(i,l);return d===!1&&(d=o.apply(i,l)),d||""}}r.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new pr(this.defaults);for(const a in n.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const s=a,u=n.tokenizer[s],o=i[s];i[s]=(...l)=>{let d=u.apply(i,l);return d===!1&&(d=o.apply(i,l)),d}}r.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new ur;for(const a in n.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const s=a,u=n.hooks[s],o=i[s];ur.passThroughHooks.has(a)?i[s]=l=>{if(this.defaults.async)return Promise.resolve(u.call(i,l)).then(f=>o.call(i,f));const d=u.call(i,l);return o.call(i,d)}:i[s]=(...l)=>{let d=u.apply(i,l);return d===!1&&(d=o.apply(i,l)),d}}r.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,a=n.walkTokens;r.walkTokens=function(s){let u=[];return u.push(a.call(this,s)),i&&(u=u.concat(i.call(this,s))),u}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return mt.lex(e,t??this.defaults)}parser(e,t){return gt.parse(e,t??this.defaults)}parseMarkdown(e){return(n,r)=>{const i={...r},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const u=a.hooks?a.hooks.provideLexer():e?mt.lex:mt.lexInline,o=a.hooks?a.hooks.provideParser():e?gt.parse:gt.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(n):n).then(l=>u(l,a)).then(l=>a.hooks?a.hooks.processAllTokens(l):l).then(l=>a.walkTokens?Promise.all(this.walkTokens(l,a.walkTokens)).then(()=>l):l).then(l=>o(l,a)).then(l=>a.hooks?a.hooks.postprocess(l):l).catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let l=u(n,a);a.hooks&&(l=a.hooks.processAllTokens(l)),a.walkTokens&&this.walkTokens(l,a.walkTokens);let d=o(l,a);return a.hooks&&(d=a.hooks.postprocess(d)),d}catch(l){return s(l)}}}onError(e,t){return n=>{if(n.message+=`
67
- Please report this to https://github.com/markedjs/marked.`,e){const r="<p>An error occurred:</p><pre>"+ut(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},Ut=new zh;function fe(e,t){return Ut.parse(e,t)}fe.options=fe.setOptions=function(e){return Ut.setOptions(e),fe.defaults=Ut.defaults,no(fe.defaults),fe};fe.getDefaults=$i;fe.defaults=jt;fe.use=function(...e){return Ut.use(...e),fe.defaults=Ut.defaults,no(fe.defaults),fe};fe.walkTokens=function(e,t){return Ut.walkTokens(e,t)};fe.parseInline=Ut.parseInline;fe.Parser=gt;fe.parser=gt.parse;fe.Renderer=mr;fe.TextRenderer=Zi;fe.Lexer=mt;fe.lexer=mt.lex;fe.Tokenizer=pr;fe.Hooks=ur;fe.parse=fe;fe.options;fe.setOptions;fe.use;fe.walkTokens;fe.parseInline;gt.parse;mt.lex;function Ka(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function po(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $h=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qh={};function Ja(e,t){return(qh.jsx?Yh:$h).test(e)}const Vh=/[ \t\n\f\r]/g;function Wh(e){return typeof e=="object"?e.type==="text"?es(e.value):!1:es(e)}function es(e){return e.replace(Vh,"")===""}class Vn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Vn.prototype.normal={};Vn.prototype.property={};Vn.prototype.space=void 0;function mo(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Vn(n,r,t)}function Fn(e){return e.toLowerCase()}class Ye{constructor(t,n){this.attribute=n,this.property=t}}Ye.prototype.attribute="";Ye.prototype.booleanish=!1;Ye.prototype.boolean=!1;Ye.prototype.commaOrSpaceSeparated=!1;Ye.prototype.commaSeparated=!1;Ye.prototype.defined=!1;Ye.prototype.mustUseProperty=!1;Ye.prototype.number=!1;Ye.prototype.overloadedBoolean=!1;Ye.prototype.property="";Ye.prototype.spaceSeparated=!1;Ye.prototype.space=void 0;let Qh=0;const ee=zt(),Ie=zt(),xi=zt(),j=zt(),Te=zt(),Kt=zt(),We=zt();function zt(){return 2**++Qh}const _i=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:Ie,commaOrSpaceSeparated:We,commaSeparated:Kt,number:j,overloadedBoolean:xi,spaceSeparated:Te},Symbol.toStringTag,{value:"Module"})),qr=Object.keys(_i);class Ki extends Ye{constructor(t,n,r,i){let a=-1;if(super(t,n),ts(this,"space",i),typeof r=="number")for(;++a<qr.length;){const s=qr[a];ts(this,qr[a],(r&_i[s])===_i[s])}}}Ki.prototype.defined=!0;function ts(e,t,n){n&&(e[t]=n)}function an(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Ki(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Fn(r)]=r,n[Fn(a.attribute)]=r}return new Vn(t,n,e.space)}const go=an({properties:{ariaActiveDescendant:null,ariaAtomic:Ie,ariaAutoComplete:null,ariaBusy:Ie,ariaChecked:Ie,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:Te,ariaCurrent:null,ariaDescribedBy:Te,ariaDetails:null,ariaDisabled:Ie,ariaDropEffect:Te,ariaErrorMessage:null,ariaExpanded:Ie,ariaFlowTo:Te,ariaGrabbed:Ie,ariaHasPopup:null,ariaHidden:Ie,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Te,ariaLevel:j,ariaLive:null,ariaModal:Ie,ariaMultiLine:Ie,ariaMultiSelectable:Ie,ariaOrientation:null,ariaOwns:Te,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:Ie,ariaReadOnly:Ie,ariaRelevant:null,ariaRequired:Ie,ariaRoleDescription:Te,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:Ie,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Eo(e,t){return t in e?e[t]:t}function bo(e,t){return Eo(e,t.toLowerCase())}const Gh=an({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Kt,acceptCharset:Te,accessKey:Te,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:Te,autoFocus:ee,autoPlay:ee,blocking:Te,capture:null,charSet:null,checked:ee,cite:null,className:Te,cols:j,colSpan:null,content:null,contentEditable:Ie,controls:ee,controlsList:Te,coords:j|Kt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:xi,draggable:Ie,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:Te,height:j,hidden:xi,high:j,href:null,hrefLang:null,htmlFor:Te,httpEquiv:Te,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:Te,itemRef:Te,itemScope:ee,itemType:Te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ee,optimum:j,pattern:null,ping:Te,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:Te,required:ee,reversed:ee,rows:j,rowSpan:j,sandbox:Te,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:Ie,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:Ie,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Te,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:Ie,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ee,disableRemotePlayback:ee,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:bo}),Xh=an({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:We,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:Te,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Kt,g2:Kt,glyphName:Kt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:We,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:j,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:We,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:We,rev:We,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:We,requiredFeatures:We,requiredFonts:We,requiredFormats:We,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:We,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:We,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:We,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Eo}),To=an({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),xo=an({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bo}),_o=an({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Zh={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Kh=/[A-Z]/g,ns=/-[a-z]/g,Jh=/^data[-\w.:]+$/i;function Nr(e,t){const n=Fn(t);let r=t,i=Ye;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Jh.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ns,t0);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ns.test(a)){let s=a.replace(Kh,e0);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Ki}return new i(r,t)}function e0(e){return"-"+e.toLowerCase()}function t0(e){return e.charAt(1).toUpperCase()}const Wn=mo([go,Gh,To,xo,_o],"html"),Nt=mo([go,Xh,To,xo,_o],"svg");function rs(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ao(e){return e.join(" ").trim()}var Vt={},Vr,is;function n0(){if(is)return Vr;is=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
68
- `,l="/",d="*",f="",p="comment",h="declaration";function m(y,T){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];T=T||{};var S=1,b=1;function w(z){var U=z.match(t);U&&(S+=U.length);var Z=z.lastIndexOf(o);b=~Z?z.length-Z:b+z.length}function O(){var z={line:S,column:b};return function(U){return U.position=new I(z),q(),U}}function I(z){this.start=z,this.end={line:S,column:b},this.source=T.source}I.prototype.content=y;function P(z){var U=new Error(T.source+":"+S+":"+b+": "+z);if(U.reason=z,U.filename=T.source,U.line=S,U.column=b,U.source=y,!T.silent)throw U}function H(z){var U=z.exec(y);if(U){var Z=U[0];return w(Z),y=y.slice(Z.length),U}}function q(){H(n)}function N(z){var U;for(z=z||[];U=F();)U!==!1&&z.push(U);return z}function F(){var z=O();if(!(l!=y.charAt(0)||d!=y.charAt(1))){for(var U=2;f!=y.charAt(U)&&(d!=y.charAt(U)||l!=y.charAt(U+1));)++U;if(U+=2,f===y.charAt(U-1))return P("End of comment missing");var Z=y.slice(2,U-2);return b+=2,w(Z),y=y.slice(U),b+=2,z({type:p,comment:Z})}}function v(){var z=O(),U=H(r);if(U){if(F(),!H(i))return P("property missing ':'");var Z=H(a),ne=z({type:h,property:_(U[0].replace(e,f)),value:Z?_(Z[0].replace(e,f)):f});return H(s),ne}}function W(){var z=[];N(z);for(var U;U=v();)U!==!1&&(z.push(U),N(z));return z}return q(),W()}function _(y){return y?y.replace(u,f):f}return Vr=m,Vr}var as;function r0(){if(as)return Vt;as=1;var e=Vt&&Vt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.default=n;const t=e(n0());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,t.default)(r),u=typeof i=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:d}=o;u?i(l,d,o):d&&(a=a||{},a[l]=d)}),a}return Vt}var pn={},ss;function i0(){if(ss)return pn;ss=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(l){return!l||n.test(l)||e.test(l)},s=function(l,d){return d.toUpperCase()},u=function(l,d){return"".concat(d,"-")},o=function(l,d){return d===void 0&&(d={}),a(l)?l:(l=l.toLowerCase(),d.reactCompat?l=l.replace(i,u):l=l.replace(r,u),l.replace(t,s))};return pn.camelCase=o,pn}var mn,us;function a0(){if(us)return mn;us=1;var e=mn&&mn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(r0()),n=i0();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(u,o){u&&o&&(s[(0,n.camelCase)(u,a)]=o)}),s}return r.default=r,mn=r,mn}var s0=a0();const u0=Mi(s0),Rr=yo("end"),ct=yo("start");function yo(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function o0(e){const t=ct(e),n=Rr(e);if(t&&n)return{start:t,end:n}}function In(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?os(e.position):"start"in e||"end"in e?os(e):"line"in e||"column"in e?Ai(e):""}function Ai(e){return ls(e&&e.line)+":"+ls(e&&e.column)}function os(e){return Ai(e&&e.start)+"-"+Ai(e&&e.end)}function ls(e){return e&&typeof e=="number"?e:1}class ve extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=In(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ve.prototype.file="";ve.prototype.name="";ve.prototype.reason="";ve.prototype.message="";ve.prototype.stack="";ve.prototype.column=void 0;ve.prototype.line=void 0;ve.prototype.ancestors=void 0;ve.prototype.cause=void 0;ve.prototype.fatal=void 0;ve.prototype.place=void 0;ve.prototype.ruleId=void 0;ve.prototype.source=void 0;const Ji={}.hasOwnProperty,l0=new Map,c0=/[A-Z]/g,d0=new Set(["table","tbody","thead","tfoot","tr"]),f0=new Set(["td","th"]),ko="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function h0(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=_0(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=x0(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Nt:Wn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Co(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Co(e,t,n){if(t.type==="element")return p0(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return m0(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return E0(e,t,n);if(t.type==="mdxjsEsm")return g0(e,t);if(t.type==="root")return b0(e,t,n);if(t.type==="text")return T0(e,t)}function p0(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Nt,e.schema=i),e.ancestors.push(t);const a=So(e,t.tagName,!1),s=A0(e,t);let u=ta(e,t);return d0.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!Wh(o):!0})),Io(e,s,a,t),ea(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function m0(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Un(e,t.position)}function g0(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Un(e,t.position)}function E0(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Nt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:So(e,t.name,!0),s=y0(e,t),u=ta(e,t);return Io(e,s,a,t),ea(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function b0(e,t,n){const r={};return ea(r,ta(e,t)),e.create(t,e.Fragment,r,n)}function T0(e,t){return t.value}function Io(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ea(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function x0(e,t,n){return r;function r(i,a,s,u){const l=Array.isArray(s.children)?n:t;return u?l(a,s,u):l(a,s)}}function _0(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),o=ct(r);return t(i,a,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function A0(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ji.call(t.properties,i)){const a=k0(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&f0.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function y0(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Un(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else Un(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function ta(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:l0;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const l=i.get(o)||0;s=o+"-"+l,i.set(o,l+1)}}const u=Co(e,a,s);u!==void 0&&n.push(u)}return n}function k0(e,t,n){const r=Nr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?po(n):Ao(n)),r.property==="style"){let i=typeof n=="object"?n:C0(e,String(n));return e.stylePropertyNameCase==="css"&&(i=I0(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Zh[r.property]||r.property:r.attribute,n]}}function C0(e,t){try{return u0(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ve("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=ko+"#cannot-parse-style-attribute",i}}function So(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const u=Ja(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=Ja(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ji.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Un(e)}function Un(e,t){const n=new ve("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ko+"#cannot-handle-mdx-estrees-without-createevaluater",n}function I0(e){const t={};let n;for(n in e)Ji.call(e,n)&&(t[S0(n)]=e[n]);return t}function S0(e){let t=e.replace(c0,N0);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function N0(e){return"-"+e.toLowerCase()}const Wr={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},R0={};function na(e,t){const n=R0,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return No(e,r,i)}function No(e,t,n){if(w0(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return cs(e.children,t,n)}return Array.isArray(e)?cs(e,t,n):""}function cs(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=No(e[i],t,n);return r.join("")}function w0(e){return!!(e&&typeof e=="object")}const ds=document.createElement("i");function ra(e){const t="&"+e+";";ds.innerHTML=t;const n=ds.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Qe(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Ke(e,t){return e.length>0?(Qe(e,e.length,0,t),e):t}const fs={}.hasOwnProperty;function Ro(e){const t={};let n=-1;for(;++n<e.length;)O0(t,e[n]);return t}function O0(e,t){let n;for(n in t){const i=(fs.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){fs.call(i,s)||(i[s]=[]);const u=a[s];L0(i[s],Array.isArray(u)?u:u?[u]:[])}}}function L0(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Qe(e,0,0,r)}function wo(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function rt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Fe=Rt(/[A-Za-z]/),De=Rt(/[\dA-Za-z]/),D0=Rt(/[#-'*+\--9=?A-Z^-~]/);function gr(e){return e!==null&&(e<32||e===127)}const yi=Rt(/\d/),v0=Rt(/[\dA-Fa-f]/),P0=Rt(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function Ee(e){return e!==null&&(e<0||e===32)}function re(e){return e===-2||e===-1||e===32}const wr=Rt(new RegExp("\\p{P}|\\p{S}","u")),Ht=Rt(/\s/);function Rt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function sn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&De(e.charCodeAt(n+1))&&De(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function se(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return re(o)?(e.enter(n),u(o)):t(o)}function u(o){return re(o)&&a++<i?(e.consume(o),u):(e.exit(n),t(o))}}const M0={tokenize:B0};function B0(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),se(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Q(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const F0={tokenize:U0},hs={tokenize:H0};function U0(e){const t=this,n=[];let r=0,i,a,s;return u;function u(b){if(r<n.length){const w=n[r];return t.containerState=w[1],e.attempt(w[0].continuation,o,l)(b)}return l(b)}function o(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&S();const w=t.events.length;let O=w,I;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){I=t.events[O][1].end;break}T(r);let P=w;for(;P<t.events.length;)t.events[P][1].end={...I},P++;return Qe(t.events,O+1,0,t.events.slice(w)),t.events.length=P,l(b)}return u(b)}function l(b){if(r===n.length){if(!i)return p(b);if(i.currentConstruct&&i.currentConstruct.concrete)return m(b);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(hs,d,f)(b)}function d(b){return i&&S(),T(r),p(b)}function f(b){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(b)}function p(b){return t.containerState={},e.attempt(hs,h,m)(b)}function h(b){return r++,n.push([t.currentConstruct,t.containerState]),p(b)}function m(b){if(b===null){i&&S(),T(0),e.consume(b);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),_(b)}function _(b){if(b===null){y(e.exit("chunkFlow"),!0),T(0),e.consume(b);return}return Q(b)?(e.consume(b),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(b),_)}function y(b,w){const O=t.sliceStream(b);if(w&&O.push(null),b.previous=a,a&&(a.next=b),a=b,i.defineSkip(b.start),i.write(O),t.parser.lazy[b.start.line]){let I=i.events.length;for(;I--;)if(i.events[I][1].start.offset<s&&(!i.events[I][1].end||i.events[I][1].end.offset>s))return;const P=t.events.length;let H=P,q,N;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){if(q){N=t.events[H][1].end;break}q=!0}for(T(r),I=P;I<t.events.length;)t.events[I][1].end={...N},I++;Qe(t.events,H+1,0,t.events.slice(P)),t.events.length=I}}function T(b){let w=n.length;for(;w-- >b;){const O=n[w];t.containerState=O[1],O[0].exit.call(t,e)}n.length=b}function S(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function H0(e,t,n){return se(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function tn(e){if(e===null||Ee(e)||Ht(e))return 1;if(wr(e))return 2}function Or(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const ki={name:"attention",resolveAll:j0,tokenize:z0};function j0(e,t){let n=-1,r,i,a,s,u,o,l,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},p={...e[n][1].start};ps(f,-o),ps(p,o),s={type:o>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Ke(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Ke(l,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),l=Ke(l,Or(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Ke(l,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,l=Ke(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Qe(e,r-1,n-r+3,l),n=r+l.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function z0(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=tn(r);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===a)return e.consume(o),u;const l=e.exit("attentionSequence"),d=tn(o),f=!d||d===2&&i||n.includes(o),p=!i||i===2&&d||n.includes(r);return l._open=!!(a===42?f:f&&(i||!p)),l._close=!!(a===42?p:p&&(d||!f)),t(o)}}function ps(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const $0={name:"autolink",tokenize:Y0};function Y0(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return Fe(h)?(e.consume(h),s):h===64?n(h):l(h)}function s(h){return h===43||h===45||h===46||De(h)?(r=1,u(h)):l(h)}function u(h){return h===58?(e.consume(h),r=0,o):(h===43||h===45||h===46||De(h))&&r++<32?(e.consume(h),u):(r=0,l(h))}function o(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||gr(h)?n(h):(e.consume(h),o)}function l(h){return h===64?(e.consume(h),d):D0(h)?(e.consume(h),l):n(h)}function d(h){return De(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||De(h))&&r++<63){const m=h===45?p:f;return e.consume(h),m}return n(h)}}const Qn={partial:!0,tokenize:q0};function q0(e,t,n){return r;function r(a){return re(a)?se(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Q(a)?t(a):n(a)}}const Oo={continuation:{tokenize:W0},exit:Q0,name:"blockQuote",tokenize:V0};function V0(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return re(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function W0(e,t,n){const r=this;return i;function i(s){return re(s)?se(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Oo,t,n)(s)}}function Q0(e){e.exit("blockQuote")}const Lo={name:"characterEscape",tokenize:G0};function G0(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return P0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Do={name:"characterReference",tokenize:X0};function X0(e,t,n){const r=this;let i=0,a,s;return u;function u(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),o}function o(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,s=De,d(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=v0,d):(e.enter("characterReferenceValue"),a=7,s=yi,d(f))}function d(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return s===De&&!ra(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<a?(e.consume(f),d):n(f)}}const ms={partial:!0,tokenize:K0},gs={concrete:!0,name:"codeFenced",tokenize:Z0};function Z0(e,t,n){const r=this,i={partial:!0,tokenize:O};let a=0,s=0,u;return o;function o(I){return l(I)}function l(I){const P=r.events[r.events.length-1];return a=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,u=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(I)}function d(I){return I===u?(s++,e.consume(I),d):s<3?n(I):(e.exit("codeFencedFenceSequence"),re(I)?se(e,f,"whitespace")(I):f(I))}function f(I){return I===null||Q(I)?(e.exit("codeFencedFence"),r.interrupt?t(I):e.check(ms,_,w)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(I))}function p(I){return I===null||Q(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(I)):re(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),se(e,h,"whitespace")(I)):I===96&&I===u?n(I):(e.consume(I),p)}function h(I){return I===null||Q(I)?f(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(I))}function m(I){return I===null||Q(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(I)):I===96&&I===u?n(I):(e.consume(I),m)}function _(I){return e.attempt(i,w,y)(I)}function y(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),T}function T(I){return a>0&&re(I)?se(e,S,"linePrefix",a+1)(I):S(I)}function S(I){return I===null||Q(I)?e.check(ms,_,w)(I):(e.enter("codeFlowValue"),b(I))}function b(I){return I===null||Q(I)?(e.exit("codeFlowValue"),S(I)):(e.consume(I),b)}function w(I){return e.exit("codeFenced"),t(I)}function O(I,P,H){let q=0;return N;function N(U){return I.enter("lineEnding"),I.consume(U),I.exit("lineEnding"),F}function F(U){return I.enter("codeFencedFence"),re(U)?se(I,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):v(U)}function v(U){return U===u?(I.enter("codeFencedFenceSequence"),W(U)):H(U)}function W(U){return U===u?(q++,I.consume(U),W):q>=s?(I.exit("codeFencedFenceSequence"),re(U)?se(I,z,"whitespace")(U):z(U)):H(U)}function z(U){return U===null||Q(U)?(I.exit("codeFencedFence"),P(U)):H(U)}}}function K0(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Qr={name:"codeIndented",tokenize:ep},J0={partial:!0,tokenize:tp};function ep(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),se(e,a,"linePrefix",5)(l)}function a(l){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?o(l):Q(l)?e.attempt(J0,s,o)(l):(e.enter("codeFlowValue"),u(l))}function u(l){return l===null||Q(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),u)}function o(l){return e.exit("codeIndented"),t(l)}}function tp(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Q(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):se(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Q(s)?i(s):n(s)}}const np={name:"codeText",previous:ip,resolve:rp,tokenize:ap};function rp(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ip(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ap(e,t,n){let r=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),u(f)}function u(f){return f===96?(e.consume(f),r++,u):(e.exit("codeTextSequence"),o(f))}function o(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),o):f===96?(a=e.enter("codeTextSequence"),i=0,d(f)):Q(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),o):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||Q(f)?(e.exit("codeTextData"),o(f)):(e.consume(f),l)}function d(f){return f===96?(e.consume(f),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class sp{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&gn(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),gn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),gn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);gn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);gn(this.left,n.reverse())}}}function gn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function vo(e){const t={};let n=-1,r,i,a,s,u,o,l;const d=new sp(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,up(d,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=d.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},u=d.slice(i,n),u.unshift(r),d.splice(i,n-i+1,u))}}return Qe(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}function up(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,o=[],l={};let d,f,p=-1,h=n,m=0,_=0;const y=[_];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),f&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++p<u.length;)u[p][0]==="exit"&&u[p-1][0]==="enter"&&u[p][1].type===u[p-1][1].type&&u[p][1].start.line!==u[p][1].end.line&&(_=p+1,y.push(_),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):y.pop(),p=y.length;p--;){const T=u.slice(y[p],y[p+1]),S=a.pop();o.push([S,S+T.length-1]),e.splice(S,2,T)}for(o.reverse(),p=-1;++p<o.length;)l[m+o[p][0]]=m+o[p][1],m+=o[p][1]-o[p][0]-1;return l}const op={resolve:cp,tokenize:dp},lp={partial:!0,tokenize:fp};function cp(e){return vo(e),e}function dp(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):Q(u)?e.check(lp,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function fp(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),se(e,a,"linePrefix")}function a(s){if(s===null||Q(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Po(e,t,n,r,i,a,s,u,o){const l=o||Number.POSITIVE_INFINITY;let d=0;return f;function f(T){return T===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(T),e.exit(a),p):T===null||T===32||T===41||gr(T)?n(T):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),_(T))}function p(T){return T===62?(e.enter(a),e.consume(T),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),h(T))}function h(T){return T===62?(e.exit("chunkString"),e.exit(u),p(T)):T===null||T===60||Q(T)?n(T):(e.consume(T),T===92?m:h)}function m(T){return T===60||T===62||T===92?(e.consume(T),h):h(T)}function _(T){return!d&&(T===null||T===41||Ee(T))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(T)):d<l&&T===40?(e.consume(T),d++,_):T===41?(e.consume(T),d--,_):T===null||T===32||T===40||gr(T)?n(T):(e.consume(T),T===92?y:_)}function y(T){return T===40||T===41||T===92?(e.consume(T),_):_(T)}}function Mo(e,t,n,r,i,a){const s=this;let u=0,o;return l;function l(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),d}function d(h){return u>999||h===null||h===91||h===93&&!o||h===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):Q(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||Q(h)||u++>999?(e.exit("chunkString"),d(h)):(e.consume(h),o||(o=!re(h)),h===92?p:f)}function p(h){return h===91||h===92||h===93?(e.consume(h),u++,f):f(h)}}function Bo(e,t,n,r,i,a){let s;return u;function u(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,o):n(p)}function o(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),l(p))}function l(p){return p===s?(e.exit(a),o(s)):p===null?n(p):Q(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),se(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===s||p===null||Q(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:d)}function f(p){return p===s||p===92?(e.consume(p),d):d(p)}}function Sn(e,t){let n;return r;function r(i){return Q(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):re(i)?se(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const hp={name:"definition",tokenize:mp},pp={partial:!0,tokenize:gp};function mp(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return Mo.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function u(h){return i=rt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o):n(h)}function o(h){return Ee(h)?Sn(e,l)(h):l(h)}function l(h){return Po(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(pp,f,f)(h)}function f(h){return re(h)?se(e,p,"whitespace")(h):p(h)}function p(h){return h===null||Q(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function gp(e,t,n){return r;function r(u){return Ee(u)?Sn(e,i)(u):n(u)}function i(u){return Bo(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return re(u)?se(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Q(u)?t(u):n(u)}}const Ep={name:"hardBreakEscape",tokenize:bp};function bp(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Q(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Tp={name:"headingAtx",resolve:xp,tokenize:_p};function xp(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Qe(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function _p(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||Ee(d)?(e.exit("atxHeadingSequence"),u(d)):n(d)}function u(d){return d===35?(e.enter("atxHeadingSequence"),o(d)):d===null||Q(d)?(e.exit("atxHeading"),t(d)):re(d)?se(e,u,"whitespace")(d):(e.enter("atxHeadingText"),l(d))}function o(d){return d===35?(e.consume(d),o):(e.exit("atxHeadingSequence"),u(d))}function l(d){return d===null||d===35||Ee(d)?(e.exit("atxHeadingText"),u(d)):(e.consume(d),l)}}const Ap=["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"],Es=["pre","script","style","textarea"],yp={concrete:!0,name:"htmlFlow",resolveTo:Ip,tokenize:Sp},kp={partial:!0,tokenize:Rp},Cp={partial:!0,tokenize:Np};function Ip(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Sp(e,t,n){const r=this;let i,a,s,u,o;return l;function l(C){return d(C)}function d(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),f}function f(C){return C===33?(e.consume(C),p):C===47?(e.consume(C),a=!0,_):C===63?(e.consume(C),i=3,r.interrupt?t:k):Fe(C)?(e.consume(C),s=String.fromCharCode(C),y):n(C)}function p(C){return C===45?(e.consume(C),i=2,h):C===91?(e.consume(C),i=5,u=0,m):Fe(C)?(e.consume(C),i=4,r.interrupt?t:k):n(C)}function h(C){return C===45?(e.consume(C),r.interrupt?t:k):n(C)}function m(C){const le="CDATA[";return C===le.charCodeAt(u++)?(e.consume(C),u===le.length?r.interrupt?t:v:m):n(C)}function _(C){return Fe(C)?(e.consume(C),s=String.fromCharCode(C),y):n(C)}function y(C){if(C===null||C===47||C===62||Ee(C)){const le=C===47,ce=s.toLowerCase();return!le&&!a&&Es.includes(ce)?(i=1,r.interrupt?t(C):v(C)):Ap.includes(s.toLowerCase())?(i=6,le?(e.consume(C),T):r.interrupt?t(C):v(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):a?S(C):b(C))}return C===45||De(C)?(e.consume(C),s+=String.fromCharCode(C),y):n(C)}function T(C){return C===62?(e.consume(C),r.interrupt?t:v):n(C)}function S(C){return re(C)?(e.consume(C),S):N(C)}function b(C){return C===47?(e.consume(C),N):C===58||C===95||Fe(C)?(e.consume(C),w):re(C)?(e.consume(C),b):N(C)}function w(C){return C===45||C===46||C===58||C===95||De(C)?(e.consume(C),w):O(C)}function O(C){return C===61?(e.consume(C),I):re(C)?(e.consume(C),O):b(C)}function I(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),o=C,P):re(C)?(e.consume(C),I):H(C)}function P(C){return C===o?(e.consume(C),o=null,q):C===null||Q(C)?n(C):(e.consume(C),P)}function H(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Ee(C)?O(C):(e.consume(C),H)}function q(C){return C===47||C===62||re(C)?b(C):n(C)}function N(C){return C===62?(e.consume(C),F):n(C)}function F(C){return C===null||Q(C)?v(C):re(C)?(e.consume(C),F):n(C)}function v(C){return C===45&&i===2?(e.consume(C),Z):C===60&&i===1?(e.consume(C),ne):C===62&&i===4?(e.consume(C),ue):C===63&&i===3?(e.consume(C),k):C===93&&i===5?(e.consume(C),xe):Q(C)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(kp,be,W)(C)):C===null||Q(C)?(e.exit("htmlFlowData"),W(C)):(e.consume(C),v)}function W(C){return e.check(Cp,z,be)(C)}function z(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),U}function U(C){return C===null||Q(C)?W(C):(e.enter("htmlFlowData"),v(C))}function Z(C){return C===45?(e.consume(C),k):v(C)}function ne(C){return C===47?(e.consume(C),s="",oe):v(C)}function oe(C){if(C===62){const le=s.toLowerCase();return Es.includes(le)?(e.consume(C),ue):v(C)}return Fe(C)&&s.length<8?(e.consume(C),s+=String.fromCharCode(C),oe):v(C)}function xe(C){return C===93?(e.consume(C),k):v(C)}function k(C){return C===62?(e.consume(C),ue):C===45&&i===2?(e.consume(C),k):v(C)}function ue(C){return C===null||Q(C)?(e.exit("htmlFlowData"),be(C)):(e.consume(C),ue)}function be(C){return e.exit("htmlFlow"),t(C)}}function Np(e,t,n){const r=this;return i;function i(s){return Q(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Rp(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qn,t,n)}}const wp={name:"htmlText",tokenize:Op};function Op(e,t,n){const r=this;let i,a,s;return u;function u(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),o}function o(k){return k===33?(e.consume(k),l):k===47?(e.consume(k),O):k===63?(e.consume(k),b):Fe(k)?(e.consume(k),H):n(k)}function l(k){return k===45?(e.consume(k),d):k===91?(e.consume(k),a=0,m):Fe(k)?(e.consume(k),S):n(k)}function d(k){return k===45?(e.consume(k),h):n(k)}function f(k){return k===null?n(k):k===45?(e.consume(k),p):Q(k)?(s=f,ne(k)):(e.consume(k),f)}function p(k){return k===45?(e.consume(k),h):f(k)}function h(k){return k===62?Z(k):k===45?p(k):f(k)}function m(k){const ue="CDATA[";return k===ue.charCodeAt(a++)?(e.consume(k),a===ue.length?_:m):n(k)}function _(k){return k===null?n(k):k===93?(e.consume(k),y):Q(k)?(s=_,ne(k)):(e.consume(k),_)}function y(k){return k===93?(e.consume(k),T):_(k)}function T(k){return k===62?Z(k):k===93?(e.consume(k),T):_(k)}function S(k){return k===null||k===62?Z(k):Q(k)?(s=S,ne(k)):(e.consume(k),S)}function b(k){return k===null?n(k):k===63?(e.consume(k),w):Q(k)?(s=b,ne(k)):(e.consume(k),b)}function w(k){return k===62?Z(k):b(k)}function O(k){return Fe(k)?(e.consume(k),I):n(k)}function I(k){return k===45||De(k)?(e.consume(k),I):P(k)}function P(k){return Q(k)?(s=P,ne(k)):re(k)?(e.consume(k),P):Z(k)}function H(k){return k===45||De(k)?(e.consume(k),H):k===47||k===62||Ee(k)?q(k):n(k)}function q(k){return k===47?(e.consume(k),Z):k===58||k===95||Fe(k)?(e.consume(k),N):Q(k)?(s=q,ne(k)):re(k)?(e.consume(k),q):Z(k)}function N(k){return k===45||k===46||k===58||k===95||De(k)?(e.consume(k),N):F(k)}function F(k){return k===61?(e.consume(k),v):Q(k)?(s=F,ne(k)):re(k)?(e.consume(k),F):q(k)}function v(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,W):Q(k)?(s=v,ne(k)):re(k)?(e.consume(k),v):(e.consume(k),z)}function W(k){return k===i?(e.consume(k),i=void 0,U):k===null?n(k):Q(k)?(s=W,ne(k)):(e.consume(k),W)}function z(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||Ee(k)?q(k):(e.consume(k),z)}function U(k){return k===47||k===62||Ee(k)?q(k):n(k)}function Z(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function ne(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),oe}function oe(k){return re(k)?se(e,xe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):xe(k)}function xe(k){return e.enter("htmlTextData"),s(k)}}const ia={name:"labelEnd",resolveAll:Pp,resolveTo:Mp,tokenize:Bp},Lp={tokenize:Fp},Dp={tokenize:Up},vp={tokenize:Hp};function Pp(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Qe(e,0,e.length,n),e}function Mp(e,t){let n=e.length,r=0,i,a,s,u;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",l,t]],u=Ke(u,e.slice(a+1,a+r+3)),u=Ke(u,[["enter",d,t]]),u=Ke(u,Or(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=Ke(u,[["exit",d,t],e[s-2],e[s-1],["exit",l,t]]),u=Ke(u,e.slice(s+1)),u=Ke(u,[["exit",o,t]]),Qe(e,a,e.length,u),e}function Bp(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(p){return a?a._inactive?f(p):(s=r.parser.defined.includes(rt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),o):n(p)}function o(p){return p===40?e.attempt(Lp,d,s?d:f)(p):p===91?e.attempt(Dp,d,s?l:f)(p):s?d(p):f(p)}function l(p){return e.attempt(vp,d,f)(p)}function d(p){return t(p)}function f(p){return a._balanced=!0,n(p)}}function Fp(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Ee(f)?Sn(e,a)(f):a(f)}function a(f){return f===41?d(f):Po(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Ee(f)?Sn(e,o)(f):d(f)}function u(f){return n(f)}function o(f){return f===34||f===39||f===40?Bo(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function l(f){return Ee(f)?Sn(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function Up(e,t,n){const r=this;return i;function i(u){return Mo.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(rt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function Hp(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const jp={name:"labelStartImage",resolveAll:ia.resolveAll,tokenize:zp};function zp(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const $p={name:"labelStartLink",resolveAll:ia.resolveAll,tokenize:Yp};function Yp(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Gr={name:"lineEnding",tokenize:qp};function qp(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),se(e,t,"linePrefix")}}const or={name:"thematicBreak",tokenize:Vp};function Vp(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),s(l)}function s(l){return i=l,u(l)}function u(l){return l===i?(e.enter("thematicBreakSequence"),o(l)):r>=3&&(l===null||Q(l))?(e.exit("thematicBreak"),t(l)):n(l)}function o(l){return l===i?(e.consume(l),r++,o):(e.exit("thematicBreakSequence"),re(l)?se(e,u,"whitespace")(l):u(l))}}const je={continuation:{tokenize:Xp},exit:Kp,name:"list",tokenize:Gp},Wp={partial:!0,tokenize:Jp},Qp={partial:!0,tokenize:Zp};function Gp(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return u;function u(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:yi(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(or,n,l)(h):l(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(h)}return n(h)}function o(h){return yi(h)&&++s<10?(e.consume(h),o):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),l(h)):n(h)}function l(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Qn,r.interrupt?n:d,e.attempt(Wp,p,f))}function d(h){return r.containerState.initialBlankLine=!0,a++,p(h)}function f(h){return re(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Xp(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Qn,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,se(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!re(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Qp,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,se(e,e.attempt(je,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Zp(e,t,n){const r=this;return se(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function Kp(e){e.exit(this.containerState.type)}function Jp(e,t,n){const r=this;return se(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!re(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const bs={name:"setextUnderline",resolveTo:em,tokenize:tm};function em(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function tm(e,t,n){const r=this;let i;return a;function a(l){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),u(l)}function u(l){return l===i?(e.consume(l),u):(e.exit("setextHeadingLineSequence"),re(l)?se(e,o,"lineSuffix")(l):o(l))}function o(l){return l===null||Q(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const nm={tokenize:rm};function rm(e){const t=this,n=e.attempt(Qn,r,e.attempt(this.parser.constructs.flowInitial,i,se(e,e.attempt(this.parser.constructs.flow,i,e.attempt(op,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const im={resolveAll:Uo()},am=Fo("string"),sm=Fo("text");function Fo(e){return{resolveAll:Uo(e==="text"?um:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(d){return l(d)?a(d):u(d)}function u(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),o}function o(d){return l(d)?(n.exit("data"),a(d)):(n.consume(d),o)}function l(d){if(d===null)return!0;const f=i[d];let p=-1;if(f)for(;++p<f.length;){const h=f[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Uo(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function um(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,u=0,o;for(;a--;){const l=i[a];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(l===-2)o=!0,u++;else if(l!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const l={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const om={42:je,43:je,45:je,48:je,49:je,50:je,51:je,52:je,53:je,54:je,55:je,56:je,57:je,62:Oo},lm={91:hp},cm={[-2]:Qr,[-1]:Qr,32:Qr},dm={35:Tp,42:or,45:[bs,or],60:yp,61:bs,95:or,96:gs,126:gs},fm={38:Do,92:Lo},hm={[-5]:Gr,[-4]:Gr,[-3]:Gr,33:jp,38:Do,42:ki,60:[$0,wp],91:$p,92:[Ep,Lo],93:ia,95:ki,96:np},pm={null:[ki,im]},mm={null:[42,95]},gm={null:[]},Em=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:mm,contentInitial:lm,disable:gm,document:om,flow:dm,flowInitial:cm,insideSpan:pm,string:fm,text:hm},Symbol.toStringTag,{value:"Module"}));function bm(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],u=[];const o={attempt:P(O),check:P(I),consume:S,enter:b,exit:w,interrupt:P(I,{interrupt:!0})},l={code:null,containerState:{},defineSkip:_,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:f};let d=t.tokenize.call(l,o);return t.resolveAll&&a.push(t),l;function f(F){return s=Ke(s,F),y(),s[s.length-1]!==null?[]:(H(t,0),l.events=Or(a,l.events,l),l.events)}function p(F,v){return xm(h(F),v)}function h(F){return Tm(s,F)}function m(){const{_bufferIndex:F,_index:v,line:W,column:z,offset:U}=r;return{_bufferIndex:F,_index:v,line:W,column:z,offset:U}}function _(F){i[F.line]=F.column,N()}function y(){let F;for(;r._index<s.length;){const v=s[r._index];if(typeof v=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<v.length;)T(v.charCodeAt(r._bufferIndex));else T(v)}}function T(F){d=d(F)}function S(F){Q(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,N()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=F}function b(F,v){const W=v||{};return W.type=F,W.start=m(),l.events.push(["enter",W,l]),u.push(W),W}function w(F){const v=u.pop();return v.end=m(),l.events.push(["exit",v,l]),v}function O(F,v){H(F,v.from)}function I(F,v){v.restore()}function P(F,v){return W;function W(z,U,Z){let ne,oe,xe,k;return Array.isArray(z)?be(z):"tokenize"in z?be([z]):ue(z);function ue(_e){return we;function we(Se){const Oe=Se!==null&&_e[Se],Le=Se!==null&&_e.null,qe=[...Array.isArray(Oe)?Oe:Oe?[Oe]:[],...Array.isArray(Le)?Le:Le?[Le]:[]];return be(qe)(Se)}}function be(_e){return ne=_e,oe=0,_e.length===0?Z:C(_e[oe])}function C(_e){return we;function we(Se){return k=q(),xe=_e,_e.partial||(l.currentConstruct=_e),_e.name&&l.parser.constructs.disable.null.includes(_e.name)?ce():_e.tokenize.call(v?Object.assign(Object.create(l),v):l,o,le,ce)(Se)}}function le(_e){return F(xe,k),U}function ce(_e){return k.restore(),++oe<ne.length?C(ne[oe]):Z}}}function H(F,v){F.resolveAll&&!a.includes(F)&&a.push(F),F.resolve&&Qe(l.events,v,l.events.length-v,F.resolve(l.events.slice(v),l)),F.resolveTo&&(l.events=F.resolveTo(l.events,l))}function q(){const F=m(),v=l.previous,W=l.currentConstruct,z=l.events.length,U=Array.from(u);return{from:z,restore:Z};function Z(){r=F,l.previous=v,l.currentConstruct=W,l.events.length=z,u=U,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Tm(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function xm(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
69
- `;break}case-3:{s=`\r
70
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function _m(e){const r={constructs:Ro([Em,...(e||{}).extensions||[]]),content:i(M0),defined:[],document:i(F0),flow:i(nm),lazy:{},string:i(am),text:i(sm)};return r;function i(a){return s;function s(u){return bm(r,a,u)}}}function Am(e){for(;!vo(e););return e}const Ts=/[\0\t\n\r]/g;function ym(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const o=[];let l,d,f,p,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Ts.lastIndex=f,l=Ts.exec(a),p=l&&l.index!==void 0?l.index:a.length,h=a.charCodeAt(p),!l){t=a.slice(f);break}if(h===10&&f===p&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),f<p&&(o.push(a.slice(f,p)),e+=p-f),h){case 0:{o.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,o.push(-2);e++<d;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const km=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Cm(e){return e.replace(km,Im)}function Im(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return wo(n.slice(a?2:1),a?16:10)}return ra(n)||e}const Ho={}.hasOwnProperty;function Sm(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Nm(n)(Am(_m(n).document().write(ym()(e,t,!0))))}function Nm(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ka),autolinkProtocol:q,autolinkEmail:q,atxHeading:a(_a),blockQuote:a(Le),characterEscape:q,characterReference:q,codeFenced:a(qe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(qe,s),codeText:a(Yt,s),codeTextData:q,data:q,codeFlowValue:q,definition:a(Xe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(lc),hardBreakEscape:a(Aa),hardBreakTrailing:a(Aa),htmlFlow:a(ya,s),htmlFlowData:q,htmlText:a(ya,s),htmlTextData:q,image:a(cc),label:s,link:a(ka),listItem:a(dc),listItemValue:p,listOrdered:a(Ca,f),listUnordered:a(Ca),paragraph:a(fc),reference:C,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(_a),strong:a(hc),thematicBreak:a(mc)},exit:{atxHeading:o(),atxHeadingSequence:O,autolink:o(),autolinkEmail:Oe,autolinkProtocol:Se,blockQuote:o(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:_e,characterReference:we,codeFenced:o(y),codeFencedFence:_,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:N,codeIndented:o(T),codeText:o(U),codeTextData:N,data:N,definition:o(),definitionDestinationString:w,definitionLabelString:S,definitionTitleString:b,emphasis:o(),hardBreakEscape:o(v),hardBreakTrailing:o(v),htmlFlow:o(W),htmlFlowData:N,htmlText:o(z),htmlTextData:N,image:o(ne),label:xe,labelText:oe,lineEnding:F,link:o(Z),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:le,resourceDestinationString:k,resourceTitleString:ue,resource:be,setextHeading:o(H),setextHeadingLineSequence:P,setextHeadingText:I,strong:o(),thematicBreak:o()}};jo(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(D){let $={type:"root",children:[]};const K={stack:[$],tokenStack:[],config:t,enter:u,exit:l,buffer:s,resume:d,data:n},ie=[];let me=-1;for(;++me<D.length;)if(D[me][1].type==="listOrdered"||D[me][1].type==="listUnordered")if(D[me][0]==="enter")ie.push(me);else{const et=ie.pop();me=i(D,et,me)}for(me=-1;++me<D.length;){const et=t[D[me][0]];Ho.call(et,D[me][1].type)&&et[D[me][1].type].call(Object.assign({sliceSerialize:D[me][2].sliceSerialize},K),D[me][1])}if(K.tokenStack.length>0){const et=K.tokenStack[K.tokenStack.length-1];(et[1]||xs).call(K,void 0,et[0])}for($.position={start:bt(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:bt(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},me=-1;++me<t.transforms.length;)$=t.transforms[me]($)||$;return $}function i(D,$,K){let ie=$-1,me=-1,et=!1,wt,ft,cn,dn;for(;++ie<=K;){const Ve=D[ie];switch(Ve[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ve[0]==="enter"?me++:me--,dn=void 0;break}case"lineEndingBlank":{Ve[0]==="enter"&&(wt&&!dn&&!me&&!cn&&(cn=ie),dn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:dn=void 0}if(!me&&Ve[0]==="enter"&&Ve[1].type==="listItemPrefix"||me===-1&&Ve[0]==="exit"&&(Ve[1].type==="listUnordered"||Ve[1].type==="listOrdered")){if(wt){let qt=ie;for(ft=void 0;qt--;){const ht=D[qt];if(ht[1].type==="lineEnding"||ht[1].type==="lineEndingBlank"){if(ht[0]==="exit")continue;ft&&(D[ft][1].type="lineEndingBlank",et=!0),ht[1].type="lineEnding",ft=qt}else if(!(ht[1].type==="linePrefix"||ht[1].type==="blockQuotePrefix"||ht[1].type==="blockQuotePrefixWhitespace"||ht[1].type==="blockQuoteMarker"||ht[1].type==="listItemIndent"))break}cn&&(!ft||cn<ft)&&(wt._spread=!0),wt.end=Object.assign({},ft?D[ft][1].start:Ve[1].end),D.splice(ft||ie,0,["exit",wt,Ve[2]]),ie++,K++}if(Ve[1].type==="listItemPrefix"){const qt={type:"listItem",_spread:!1,start:Object.assign({},Ve[1].start),end:void 0};wt=qt,D.splice(ie,0,["enter",qt,Ve[2]]),ie++,K++,cn=void 0,dn=!0}}}return D[$][1]._spread=et,K}function a(D,$){return K;function K(ie){u.call(this,D(ie),ie),$&&$.call(this,ie)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(D,$,K){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([$,K||void 0]),D.position={start:bt($.start),end:void 0}}function o(D){return $;function $(K){D&&D.call(this,K),l.call(this,K)}}function l(D,$){const K=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==D.type&&($?$.call(this,D,ie[0]):(ie[1]||xs).call(this,D,ie[0]));else throw new Error("Cannot close `"+D.type+"` ("+In({start:D.start,end:D.end})+"): it’s not open");K.position.end=bt(D.end)}function d(){return na(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(D){if(this.data.expectingFirstListItemValue){const $=this.stack[this.stack.length-2];$.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function h(){const D=this.resume(),$=this.stack[this.stack.length-1];$.lang=D}function m(){const D=this.resume(),$=this.stack[this.stack.length-1];$.meta=D}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D.replace(/(\r?\n|\r)$/g,"")}function S(D){const $=this.resume(),K=this.stack[this.stack.length-1];K.label=$,K.identifier=rt(this.sliceSerialize(D)).toLowerCase()}function b(){const D=this.resume(),$=this.stack[this.stack.length-1];$.title=D}function w(){const D=this.resume(),$=this.stack[this.stack.length-1];$.url=D}function O(D){const $=this.stack[this.stack.length-1];if(!$.depth){const K=this.sliceSerialize(D).length;$.depth=K}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function P(D){const $=this.stack[this.stack.length-1];$.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function q(D){const K=this.stack[this.stack.length-1].children;let ie=K[K.length-1];(!ie||ie.type!=="text")&&(ie=pc(),ie.position={start:bt(D.start),end:void 0},K.push(ie)),this.stack.push(ie)}function N(D){const $=this.stack.pop();$.value+=this.sliceSerialize(D),$.position.end=bt(D.end)}function F(D){const $=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=$.children[$.children.length-1];K.position.end=bt(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes($.type)&&(q.call(this,D),N.call(this,D))}function v(){this.data.atHardBreak=!0}function W(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D}function z(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D}function U(){const D=this.resume(),$=this.stack[this.stack.length-1];$.value=D}function Z(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=$,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function ne(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=$,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function oe(D){const $=this.sliceSerialize(D),K=this.stack[this.stack.length-2];K.label=Cm($),K.identifier=rt($).toLowerCase()}function xe(){const D=this.stack[this.stack.length-1],$=this.resume(),K=this.stack[this.stack.length-1];if(this.data.inReference=!0,K.type==="link"){const ie=D.children;K.children=ie}else K.alt=$}function k(){const D=this.resume(),$=this.stack[this.stack.length-1];$.url=D}function ue(){const D=this.resume(),$=this.stack[this.stack.length-1];$.title=D}function be(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function le(D){const $=this.resume(),K=this.stack[this.stack.length-1];K.label=$,K.identifier=rt(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function ce(D){this.data.characterReferenceType=D.type}function _e(D){const $=this.sliceSerialize(D),K=this.data.characterReferenceType;let ie;K?(ie=wo($,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=ra($);const me=this.stack[this.stack.length-1];me.value+=ie}function we(D){const $=this.stack.pop();$.position.end=bt(D.end)}function Se(D){N.call(this,D);const $=this.stack[this.stack.length-1];$.url=this.sliceSerialize(D)}function Oe(D){N.call(this,D);const $=this.stack[this.stack.length-1];$.url="mailto:"+this.sliceSerialize(D)}function Le(){return{type:"blockquote",children:[]}}function qe(){return{type:"code",lang:null,meta:null,value:""}}function Yt(){return{type:"inlineCode",value:""}}function Xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function lc(){return{type:"emphasis",children:[]}}function _a(){return{type:"heading",depth:0,children:[]}}function Aa(){return{type:"break"}}function ya(){return{type:"html",value:""}}function cc(){return{type:"image",title:null,url:"",alt:null}}function ka(){return{type:"link",title:null,url:"",children:[]}}function Ca(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function dc(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function fc(){return{type:"paragraph",children:[]}}function hc(){return{type:"strong",children:[]}}function pc(){return{type:"text",value:""}}function mc(){return{type:"thematicBreak"}}}function bt(e){return{line:e.line,column:e.column,offset:e.offset}}function jo(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jo(e,r):Rm(e,r)}}function Rm(e,t){let n;for(n in t)if(Ho.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function xs(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+In({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+In({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+In({start:t.start,end:t.end})+") is still open")}function wm(e){const t=this;t.parser=n;function n(r){return Sm(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Om(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Lm(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
71
- `}]}function Dm(e,t){const n=t.value?t.value+`
72
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function vm(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pm(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mm(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=sn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const l={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,l),e.applyData(t,l)}function Bm(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fm(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function zo(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function Um(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zo(e,t);const i={src:sn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Hm(e,t){const n={src:sn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function jm(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function zm(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zo(e,t);const i={href:sn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function $m(e,t){const n={href:sn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ym(e,t,n){const r=e.all(t),i=n?qm(n):$o(t),a={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const d=r[u];(i||u!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
73
- `}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
74
- `});const l={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,l),e.applyData(t,l)}function qm(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=$o(n[r])}return t}function $o(e){const t=e.spread;return t??e.children.length>1}function Vm(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Wm(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qm(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Gm(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xm(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=ct(t.children[1]),o=Rr(t.children[t.children.length-1]);u&&o&&(s.position={start:u,end:o}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Zm(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let o=-1;const l=[];for(;++o<u;){const f=t.children[o],p={},h=s?s[o]:void 0;h&&(p.align=h);let m={type:"element",tagName:a,properties:p,children:[]};f&&(m.children=e.all(f),e.patch(f,m),m=e.applyData(f,m)),l.push(m)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,d),e.applyData(t,d)}function Km(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const _s=9,As=32;function Jm(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(ys(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(ys(t.slice(i),i>0,!1)),a.join("")}function ys(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===_s||a===As;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===_s||a===As;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function e1(e,t){const n={type:"text",value:Jm(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function t1(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const n1={blockquote:Om,break:Lm,code:Dm,delete:vm,emphasis:Pm,footnoteReference:Mm,heading:Bm,html:Fm,imageReference:Um,image:Hm,inlineCode:jm,linkReference:zm,link:$m,listItem:Ym,list:Vm,paragraph:Wm,root:Qm,strong:Gm,table:Xm,tableCell:Km,tableRow:Zm,text:e1,thematicBreak:t1,toml:Jn,yaml:Jn,definition:Jn,footnoteDefinition:Jn};function Jn(){}const Yo=-1,Lr=0,Nn=1,Er=2,aa=3,sa=4,ua=5,oa=6,qo=7,Vo=8,ks=typeof self=="object"?self:globalThis,r1=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case Lr:case Yo:return n(s,i);case Nn:{const u=n([],i);for(const o of s)u.push(r(o));return u}case Er:{const u=n({},i);for(const[o,l]of s)u[r(o)]=r(l);return u}case aa:return n(new Date(s),i);case sa:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case ua:{const u=n(new Map,i);for(const[o,l]of s)u.set(r(o),r(l));return u}case oa:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case qo:{const{name:u,message:o}=s;return n(new ks[u](o),i)}case Vo:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new ks[a](s),i)};return r},Cs=e=>r1(new Map,e)(0),Wt="",{toString:i1}={},{keys:a1}=Object,En=e=>{const t=typeof e;if(t!=="object"||!e)return[Lr,t];const n=i1.call(e).slice(8,-1);switch(n){case"Array":return[Nn,Wt];case"Object":return[Er,Wt];case"Date":return[aa,Wt];case"RegExp":return[sa,Wt];case"Map":return[ua,Wt];case"Set":return[oa,Wt];case"DataView":return[Nn,n]}return n.includes("Array")?[Nn,n]:n.includes("Error")?[qo,n]:[Er,n]},er=([e,t])=>e===Lr&&(t==="function"||t==="symbol"),s1=(e,t,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=En(s);switch(u){case Lr:{let d=s;switch(o){case"bigint":u=Vo,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);d=null;break;case"undefined":return i([Yo],s)}return i([u,d],s)}case Nn:{if(o){let p=s;return o==="DataView"?p=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(p=new Uint8Array(s)),i([o,[...p]],s)}const d=[],f=i([u,d],s);for(const p of s)d.push(a(p));return f}case Er:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],f=i([u,d],s);for(const p of a1(s))(e||!er(En(s[p])))&&d.push([a(p),a(s[p])]);return f}case aa:return i([u,s.toISOString()],s);case sa:{const{source:d,flags:f}=s;return i([u,{source:d,flags:f}],s)}case ua:{const d=[],f=i([u,d],s);for(const[p,h]of s)(e||!(er(En(p))||er(En(h))))&&d.push([a(p),a(h)]);return f}case oa:{const d=[],f=i([u,d],s);for(const p of s)(e||!er(En(p)))&&d.push(a(p));return f}}const{message:l}=s;return i([u,{name:o,message:l}],s)};return a},Is=(e,{json:t,lossy:n}={})=>{const r=[];return s1(!(t||n),!!t,new Map,r)(e),r},nn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Cs(Is(e,t)):structuredClone(e):(e,t)=>Cs(Is(e,t));function u1(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function o1(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function l1(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||u1,r=e.options.footnoteBackLabel||o1,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[o]);if(!l)continue;const d=e.all(l),f=String(l.identifier).toUpperCase(),p=sn(f.toLowerCase());let h=0;const m=[],_=e.footnoteCounts.get(f);for(;_!==void 0&&++h<=_;){m.length>0&&m.push({type:"text",value:" "});let S=typeof n=="string"?n:n(o,h);typeof S=="string"&&(S={type:"text",value:S}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,h),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const y=d[d.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const S=y.children[y.children.length-1];S&&S.type==="text"?S.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else d.push(...m);const T={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(l,T),u.push(T)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...nn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
75
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
76
- `}]}}const Dr=(function(e){if(e==null)return h1;if(typeof e=="function")return vr(e);if(typeof e=="object")return Array.isArray(e)?c1(e):d1(e);if(typeof e=="string")return f1(e);throw new Error("Expected function, string, or object as test")});function c1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Dr(e[n]);return vr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function d1(e){const t=e;return vr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function f1(e){return vr(t);function t(n){return n&&n.type===e}}function vr(e){return t;function t(n,r,i){return!!(p1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function h1(){return!0}function p1(e){return e!==null&&typeof e=="object"&&"type"in e}const Wo=[],m1=!0,Ci=!1,g1="skip";function Qo(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Dr(i),s=r?-1:1;u(e,void 0,[])();function u(o,l,d){const f=o&&typeof o=="object"?o:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(o.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=Wo,m,_,y;if((!t||a(o,l,d[d.length-1]||void 0))&&(h=E1(n(o,d)),h[0]===Ci))return h;if("children"in o&&o.children){const T=o;if(T.children&&h[0]!==g1)for(_=(r?T.children.length:-1)+s,y=d.concat(T);_>-1&&_<T.children.length;){const S=T.children[_];if(m=u(S,_,y)(),m[0]===Ci)return m;_=typeof m[1]=="number"?m[1]:_+s}}return h}}}function E1(e){return Array.isArray(e)?e:typeof e=="number"?[m1,e]:e==null?Wo:[e]}function Pr(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Qo(e,a,u,i);function u(o,l){const d=l[l.length-1],f=d?d.children.indexOf(o):void 0;return s(o,f,d)}}const Ii={}.hasOwnProperty,b1={};function T1(e,t){const n=t||b1,r=new Map,i=new Map,a=new Map,s={...n1,...n.handlers},u={all:l,applyData:_1,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:o,options:n,patch:x1,wrap:y1};return Pr(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:i,p=String(d.identifier).toUpperCase();f.has(p)||f.set(p,d)}}),u;function o(d,f){const p=d.type,h=u.handlers[p];if(Ii.call(u.handlers,p)&&h)return h(u,d,f);if(u.options.passThrough&&u.options.passThrough.includes(p)){if("children"in d){const{children:_,...y}=d,T=nn(y);return T.children=u.all(d),T}return nn(d)}return(u.options.unknownHandler||A1)(u,d,f)}function l(d){const f=[];if("children"in d){const p=d.children;let h=-1;for(;++h<p.length;){const m=u.one(p[h],d);if(m){if(h&&p[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Ss(m.value)),!Array.isArray(m)&&m.type==="element")){const _=m.children[0];_&&_.type==="text"&&(_.value=Ss(_.value))}Array.isArray(m)?f.push(...m):f.push(m)}}}return f}}function x1(e,t){e.position&&(t.position=o0(e))}function _1(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,nn(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function A1(e,t){const n=t.data||{},r="value"in t&&!(Ii.call(n,"hProperties")||Ii.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function y1(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
77
- `});++r<e.length;)r&&n.push({type:"text",value:`
78
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
79
- `}),n}function Ss(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ns(e,t){const n=T1(e,t),r=n.one(e,void 0),i=l1(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
80
- `},i),a}function k1(e,t){return e&&"run"in e?async function(n,r){const i=Ns(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ns(n,{file:r,...e||t})}}function Rs(e){if(e)throw e}var Xr,ws;function C1(){if(ws)return Xr;ws=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},a=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var d=e.call(l,"constructor"),f=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!d&&!f)return!1;var p;for(p in l);return typeof p>"u"||e.call(l,p)},s=function(l,d){n&&d.name==="__proto__"?n(l,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):l[d.name]=d.newValue},u=function(l,d){if(d==="__proto__")if(e.call(l,d)){if(r)return r(l,d).value}else return;return l[d]};return Xr=function o(){var l,d,f,p,h,m,_=arguments[0],y=1,T=arguments.length,S=!1;for(typeof _=="boolean"&&(S=_,_=arguments[1]||{},y=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});y<T;++y)if(l=arguments[y],l!=null)for(d in l)f=u(_,d),p=u(l,d),_!==p&&(S&&p&&(a(p)||(h=i(p)))?(h?(h=!1,m=f&&i(f)?f:[]):m=f&&a(f)?f:{},s(_,{name:d,newValue:o(S,m,p)})):typeof p<"u"&&s(_,{name:d,newValue:p}));return _},Xr}var I1=C1();const Zr=Mi(I1);function Si(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function S1(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...i);function u(o,...l){const d=e[++a];let f=-1;if(o){s(o);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,d?N1(d,u)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function N1(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(i);try{o=e.apply(this,s)}catch(l){const d=l;if(u&&n)throw d;return i(d)}u||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const ot={basename:R1,dirname:w1,extname:O1,join:L1,sep:"/"};function R1(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Gn(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function w1(e){if(Gn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function O1(e){Gn(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function L1(...e){let t=-1,n;for(;++t<e.length;)Gn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":D1(n)}function D1(e){Gn(e);const t=e.codePointAt(0)===47;let n=v1(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function v1(e,t){let n="",r=0,i=-1,a=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else u===46&&a>-1?a++:a=-1}return n}function Gn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const P1={cwd:M1};function M1(){return"/"}function Ni(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function B1(e){if(typeof e=="string")e=new URL(e);else if(!Ni(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return F1(e)}function F1(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Kr=["history","path","basename","stem","extname","dirname"];class Go{constructor(t){let n;t?Ni(t)?n={path:t}:typeof t=="string"||U1(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":P1.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Kr.length;){const a=Kr[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Kr.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ot.basename(this.path):void 0}set basename(t){ei(t,"basename"),Jr(t,"basename"),this.path=ot.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ot.dirname(this.path):void 0}set dirname(t){Os(this.basename,"dirname"),this.path=ot.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ot.extname(this.path):void 0}set extname(t){if(Jr(t,"extname"),Os(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ot.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ni(t)&&(t=B1(t)),ei(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ot.basename(this.path,this.extname):void 0}set stem(t){ei(t,"stem"),Jr(t,"stem"),this.path=ot.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ve(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Jr(e,t){if(e&&e.includes(ot.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ot.sep+"`")}function ei(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Os(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function U1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const H1=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),j1={}.hasOwnProperty;class la extends H1{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=S1()}copy(){const t=new la;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Zr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ri("data",this.frozen),this.namespace[t]=n,this):j1.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ri("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=tr(t),r=this.parser||this.Parser;return ti("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ti("process",this.parser||this.Parser),ni("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=tr(t),o=r.parse(u);r.run(o,u,function(d,f,p){if(d||!f||!p)return l(d);const h=f,m=r.stringify(h,p);Y1(m)?p.value=m:p.result=m,l(d,p)});function l(d,f){d||!f?s(d):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),ti("processSync",this.parser||this.Parser),ni("processSync",this.compiler||this.Compiler),this.process(t,i),Ds("processSync","process",n),r;function i(a,s){n=!0,Rs(a),r=s}}run(t,n,r){Ls(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,u){const o=tr(n);i.run(t,o,l);function l(d,f,p){const h=f||t;d?u(d):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Ds("runSync","run",r),i;function a(s,u){Rs(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=tr(n),i=this.compiler||this.Compiler;return ni("stringify",i),Ls(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ri("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[d,...f]=l;o(d,f)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(l.plugins),l.settings&&(i.settings=Zr(!0,i.settings,l.settings))}function u(l){let d=-1;if(l!=null)if(Array.isArray(l))for(;++d<l.length;){const f=l[d];a(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,d){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===l){p=f;break}if(p===-1)r.push([l,...d]);else if(d.length>0){let[h,...m]=d;const _=r[p][1];Si(_)&&Si(h)&&(h=Zr(!0,_,h)),r[p]=[l,h,...m]}}}}const z1=new la().freeze();function ti(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ni(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ri(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ls(e){if(!Si(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ds(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function tr(e){return $1(e)?e:new Go(e)}function $1(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Y1(e){return typeof e=="string"||q1(e)}function q1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const V1="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",vs=[],Ps={allowDangerousHtml:!0},W1=/^(https?|ircs?|mailto|xmpp)$/i,Q1=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function G1(e){const t=X1(e),n=Z1(e);return K1(t.runSync(t.parse(n),n),e)}function X1(e){const t=e.rehypePlugins||vs,n=e.remarkPlugins||vs,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ps}:Ps;return z1().use(wm).use(n).use(k1,r).use(t)}function Z1(e){const t=e.children||"",n=new Go;return typeof t=="string"&&(n.value=t),n}function K1(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,s=t.skipHtml,u=t.unwrapDisallowed,o=t.urlTransform||J1;for(const d of Q1)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+V1+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Pr(e,l),h0(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function l(d,f,p){if(d.type==="raw"&&p&&typeof f=="number")return s?p.children.splice(f,1):p.children[f]={type:"text",value:d.value},f;if(d.type==="element"){let h;for(h in Wr)if(Object.hasOwn(Wr,h)&&Object.hasOwn(d.properties,h)){const m=d.properties[h],_=Wr[h];(_===null||_.includes(d.tagName))&&(d.properties[h]=o(String(m||""),h,d))}}if(d.type==="element"){let h=n?!n.includes(d.tagName):a?a.includes(d.tagName):!1;if(!h&&r&&typeof f=="number"&&(h=!r(d,f,p)),h&&p&&typeof f=="number")return u&&d.children?p.children.splice(f,1,...d.children):p.children.splice(f,1),f}}}function J1(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||W1.test(e.slice(0,t))?e:""}const Ms=/[#.]/g;function eg(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Ms.lastIndex=i;const u=Ms.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Xo(e,t,n){const r=n?ig(n):void 0;function i(a,s,...u){let o;if(a==null){o={type:"root",children:[]};const l=s;u.unshift(l)}else{o=eg(a,t);const l=o.tagName.toLowerCase(),d=r?r.get(l):void 0;if(o.tagName=d||l,tg(s))u.unshift(s);else for(const[f,p]of Object.entries(s))ng(e,o.properties,f,p)}for(const l of u)Ri(o.children,l);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function tg(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function ng(e,t,n,r){const i=Nr(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=rs(r):i.commaSeparated?a=Ka(r):i.commaOrSpaceSeparated?a=rs(Ka(r).join(" ")):a=Bs(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?rg(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(Bs(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Ri(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Ri(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ri(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Bs(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Fn(n)===Fn(t)))return!0}return n}function rg(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function ig(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const ag=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],sg=Xo(Wn,"div"),ug=Xo(Nt,"g",ag);function og(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const o=Fs(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const u=n[n.length-1],o=Fs(t,u),l=o===-1?t.length+1:o+1;if(u===l)break;n.push(l)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Fs(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
81
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Pt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Zo={}.hasOwnProperty,lg=Object.prototype;function cg(e,t){const n=t||{};return ca({file:n.file||void 0,location:!1,schema:n.space==="svg"?Nt:Wn,verbose:n.verbose||!1},e)}function ca(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},lr(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Ko(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=og(a),u=s.toPoint(0),o=s.toPoint(a.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},lr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},lr(e,r,n),n}default:return n=dg(e,t),n}}function Ko(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=ca(e,t[n]);r.push(i)}return r}function dg(e,t){const n=e.schema;e.schema=t.namespaceURI===Pt.svg?Nt:Wn;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;Zo.call(lg,o)||(i[o]=u.value)}const s=(e.schema.space==="svg"?ug:sg)(t.tagName,i,Ko(e,t.childNodes));if(lr(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,l=o&&o.startTag&&Zt(o.startTag),d=o&&o.endTag&&Zt(o.endTag),f=ca(e,u.content);l&&d&&e.file&&(f.position={start:l.end,end:d.start}),s.content=f}return e.schema=n,s}function lr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=fg(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function fg(e,t,n){const r=Zt(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)Zo.call(n.attrs,s)&&(a[Nr(e.schema,s).property]=Zt(n.attrs[s]));n.startTag;const u=Zt(n.startTag),o=n.endTag?Zt(n.endTag):void 0,l={opening:u};o&&(l.closing=o),l.properties=a,t.data={position:l}}}return r}function Zt(e){const t=Us({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Us({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Us(e){return e.line&&e.column?e:void 0}const Hs={}.hasOwnProperty;function Jo(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&Hs.call(i,e)){const o=String(i[e]);s=Hs.call(u,o)?u[o]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const hg={},pg={}.hasOwnProperty,el=Jo("type",{handlers:{root:gg,element:_g,text:Tg,comment:xg,doctype:bg}});function mg(e,t){const r=(t||hg).space;return el(e,r==="svg"?Nt:Wn)}function gg(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=da(e.children,n,t),un(e,n),n}function Eg(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=da(e.children,n,t),un(e,n),n}function bg(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return un(e,t),t}function Tg(e){const t={nodeName:"#text",value:e.value,parentNode:null};return un(e,t),t}function xg(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return un(e,t),t}function _g(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Nt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&pg.call(e.properties,a)){const o=Ag(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Pt[s],childNodes:[],parentNode:null};return u.childNodes=da(e.children,u,r),un(e,u),e.tagName==="template"&&e.content&&(u.content=Eg(e.content,r)),u}function Ag(e,t,n){const r=Nr(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?po(n):Ao(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Pt[r.space]}return i}function da(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=el(e[r],n);a.parentNode=t,i.push(a)}return i}function un(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const yg=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],kg=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),ke="�";var E;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(E||(E={}));const He={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function tl(e){return e>=55296&&e<=57343}function Cg(e){return e>=56320&&e<=57343}function Ig(e,t){return(e-55296)*1024+9216+t}function nl(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function rl(e){return e>=64976&&e<=65007||kg.has(e)}var L;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(L||(L={}));const Sg=65536;class Ng{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Sg,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,s=i+n,u=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Cg(n))return this.pos++,this._addGap(),Ig(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,E.EOF;return this._err(L.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;const r=this.html.charCodeAt(n);return r===E.CARRIAGE_RETURN?E.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;let t=this.html.charCodeAt(this.pos);return t===E.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,E.LINE_FEED):t===E.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,tl(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===E.LINE_FEED||t===E.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){nl(t)?this._err(L.controlCharacterInInputStream):rl(t)&&this._err(L.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var te;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(te||(te={}));function il(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Rg=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),wg=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Og(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=wg.get(e))!==null&&t!==void 0?t:e}var Re;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Re||(Re={}));const Lg=32;var kt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(kt||(kt={}));function wi(e){return e>=Re.ZERO&&e<=Re.NINE}function Dg(e){return e>=Re.UPPER_A&&e<=Re.UPPER_F||e>=Re.LOWER_A&&e<=Re.LOWER_F}function vg(e){return e>=Re.UPPER_A&&e<=Re.UPPER_Z||e>=Re.LOWER_A&&e<=Re.LOWER_Z||wi(e)}function Pg(e){return e===Re.EQUALS||vg(e)}var Ne;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ne||(Ne={}));var pt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(pt||(pt={}));class Mg{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ne.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=pt.Strict}startEntity(t){this.decodeMode=t,this.state=Ne.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ne.EntityStart:return t.charCodeAt(n)===Re.NUM?(this.state=Ne.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ne.NamedEntity,this.stateNamedEntity(t,n));case Ne.NumericStart:return this.stateNumericStart(t,n);case Ne.NumericDecimal:return this.stateNumericDecimal(t,n);case Ne.NumericHex:return this.stateNumericHex(t,n);case Ne.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Lg)===Re.LOWER_X?(this.state=Ne.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ne.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(wi(i)||Dg(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(wi(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Re.SEMI)this.consumed+=1;else if(this.decodeMode===pt.Strict)return 0;return this.emitCodePoint(Og(this.result),this.consumed),this.errors&&(t!==Re.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&kt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Bg(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===pt.Attribute&&(a===0||Pg(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&kt.VALUE_LENGTH)>>14,a!==0){if(s===Re.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==pt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&kt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~kt.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Ne.NamedEntity:return this.result!==0&&(this.decodeMode!==pt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ne.NumericDecimal:return this.emitNumericEntity(0,2);case Ne.NumericHex:return this.emitNumericEntity(0,3);case Ne.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ne.EntityStart:return 0}}}function Bg(e,t,n,r){const i=(t&kt.BRANCH_LENGTH)>>7,a=t&kt.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:e[n+o]-1}let s=n,u=s+i-1;for(;s<=u;){const o=s+u>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)u=o-1;else return e[o+i]}return-1}var M;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(M||(M={}));var Mt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Mt||(Mt={}));var Je;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Je||(Je={}));var R;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(R||(R={}));var c;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(c||(c={}));const Fg=new Map([[R.A,c.A],[R.ADDRESS,c.ADDRESS],[R.ANNOTATION_XML,c.ANNOTATION_XML],[R.APPLET,c.APPLET],[R.AREA,c.AREA],[R.ARTICLE,c.ARTICLE],[R.ASIDE,c.ASIDE],[R.B,c.B],[R.BASE,c.BASE],[R.BASEFONT,c.BASEFONT],[R.BGSOUND,c.BGSOUND],[R.BIG,c.BIG],[R.BLOCKQUOTE,c.BLOCKQUOTE],[R.BODY,c.BODY],[R.BR,c.BR],[R.BUTTON,c.BUTTON],[R.CAPTION,c.CAPTION],[R.CENTER,c.CENTER],[R.CODE,c.CODE],[R.COL,c.COL],[R.COLGROUP,c.COLGROUP],[R.DD,c.DD],[R.DESC,c.DESC],[R.DETAILS,c.DETAILS],[R.DIALOG,c.DIALOG],[R.DIR,c.DIR],[R.DIV,c.DIV],[R.DL,c.DL],[R.DT,c.DT],[R.EM,c.EM],[R.EMBED,c.EMBED],[R.FIELDSET,c.FIELDSET],[R.FIGCAPTION,c.FIGCAPTION],[R.FIGURE,c.FIGURE],[R.FONT,c.FONT],[R.FOOTER,c.FOOTER],[R.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[R.FORM,c.FORM],[R.FRAME,c.FRAME],[R.FRAMESET,c.FRAMESET],[R.H1,c.H1],[R.H2,c.H2],[R.H3,c.H3],[R.H4,c.H4],[R.H5,c.H5],[R.H6,c.H6],[R.HEAD,c.HEAD],[R.HEADER,c.HEADER],[R.HGROUP,c.HGROUP],[R.HR,c.HR],[R.HTML,c.HTML],[R.I,c.I],[R.IMG,c.IMG],[R.IMAGE,c.IMAGE],[R.INPUT,c.INPUT],[R.IFRAME,c.IFRAME],[R.KEYGEN,c.KEYGEN],[R.LABEL,c.LABEL],[R.LI,c.LI],[R.LINK,c.LINK],[R.LISTING,c.LISTING],[R.MAIN,c.MAIN],[R.MALIGNMARK,c.MALIGNMARK],[R.MARQUEE,c.MARQUEE],[R.MATH,c.MATH],[R.MENU,c.MENU],[R.META,c.META],[R.MGLYPH,c.MGLYPH],[R.MI,c.MI],[R.MO,c.MO],[R.MN,c.MN],[R.MS,c.MS],[R.MTEXT,c.MTEXT],[R.NAV,c.NAV],[R.NOBR,c.NOBR],[R.NOFRAMES,c.NOFRAMES],[R.NOEMBED,c.NOEMBED],[R.NOSCRIPT,c.NOSCRIPT],[R.OBJECT,c.OBJECT],[R.OL,c.OL],[R.OPTGROUP,c.OPTGROUP],[R.OPTION,c.OPTION],[R.P,c.P],[R.PARAM,c.PARAM],[R.PLAINTEXT,c.PLAINTEXT],[R.PRE,c.PRE],[R.RB,c.RB],[R.RP,c.RP],[R.RT,c.RT],[R.RTC,c.RTC],[R.RUBY,c.RUBY],[R.S,c.S],[R.SCRIPT,c.SCRIPT],[R.SEARCH,c.SEARCH],[R.SECTION,c.SECTION],[R.SELECT,c.SELECT],[R.SOURCE,c.SOURCE],[R.SMALL,c.SMALL],[R.SPAN,c.SPAN],[R.STRIKE,c.STRIKE],[R.STRONG,c.STRONG],[R.STYLE,c.STYLE],[R.SUB,c.SUB],[R.SUMMARY,c.SUMMARY],[R.SUP,c.SUP],[R.TABLE,c.TABLE],[R.TBODY,c.TBODY],[R.TEMPLATE,c.TEMPLATE],[R.TEXTAREA,c.TEXTAREA],[R.TFOOT,c.TFOOT],[R.TD,c.TD],[R.TH,c.TH],[R.THEAD,c.THEAD],[R.TITLE,c.TITLE],[R.TR,c.TR],[R.TRACK,c.TRACK],[R.TT,c.TT],[R.U,c.U],[R.UL,c.UL],[R.SVG,c.SVG],[R.VAR,c.VAR],[R.WBR,c.WBR],[R.XMP,c.XMP]]);function on(e){var t;return(t=Fg.get(e))!==null&&t!==void 0?t:c.UNKNOWN}const B=c,Ug={[M.HTML]:new Set([B.ADDRESS,B.APPLET,B.AREA,B.ARTICLE,B.ASIDE,B.BASE,B.BASEFONT,B.BGSOUND,B.BLOCKQUOTE,B.BODY,B.BR,B.BUTTON,B.CAPTION,B.CENTER,B.COL,B.COLGROUP,B.DD,B.DETAILS,B.DIR,B.DIV,B.DL,B.DT,B.EMBED,B.FIELDSET,B.FIGCAPTION,B.FIGURE,B.FOOTER,B.FORM,B.FRAME,B.FRAMESET,B.H1,B.H2,B.H3,B.H4,B.H5,B.H6,B.HEAD,B.HEADER,B.HGROUP,B.HR,B.HTML,B.IFRAME,B.IMG,B.INPUT,B.LI,B.LINK,B.LISTING,B.MAIN,B.MARQUEE,B.MENU,B.META,B.NAV,B.NOEMBED,B.NOFRAMES,B.NOSCRIPT,B.OBJECT,B.OL,B.P,B.PARAM,B.PLAINTEXT,B.PRE,B.SCRIPT,B.SECTION,B.SELECT,B.SOURCE,B.STYLE,B.SUMMARY,B.TABLE,B.TBODY,B.TD,B.TEMPLATE,B.TEXTAREA,B.TFOOT,B.TH,B.THEAD,B.TITLE,B.TR,B.TRACK,B.UL,B.WBR,B.XMP]),[M.MATHML]:new Set([B.MI,B.MO,B.MN,B.MS,B.MTEXT,B.ANNOTATION_XML]),[M.SVG]:new Set([B.TITLE,B.FOREIGN_OBJECT,B.DESC]),[M.XLINK]:new Set,[M.XML]:new Set,[M.XMLNS]:new Set},Oi=new Set([B.H1,B.H2,B.H3,B.H4,B.H5,B.H6]);R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT;var x;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(x||(x={}));const Ce={DATA:x.DATA,RCDATA:x.RCDATA,RAWTEXT:x.RAWTEXT,SCRIPT_DATA:x.SCRIPT_DATA,PLAINTEXT:x.PLAINTEXT,CDATA_SECTION:x.CDATA_SECTION};function Hg(e){return e>=E.DIGIT_0&&e<=E.DIGIT_9}function yn(e){return e>=E.LATIN_CAPITAL_A&&e<=E.LATIN_CAPITAL_Z}function jg(e){return e>=E.LATIN_SMALL_A&&e<=E.LATIN_SMALL_Z}function _t(e){return jg(e)||yn(e)}function js(e){return _t(e)||Hg(e)}function nr(e){return e+32}function al(e){return e===E.SPACE||e===E.LINE_FEED||e===E.TABULATION||e===E.FORM_FEED}function zs(e){return al(e)||e===E.SOLIDUS||e===E.GREATER_THAN_SIGN}function zg(e){return e===E.NULL?L.nullCharacterReference:e>1114111?L.characterReferenceOutsideUnicodeRange:tl(e)?L.surrogateCharacterReference:rl(e)?L.noncharacterCharacterReference:nl(e)||e===E.CARRIAGE_RETURN?L.controlCharacterReference:null}class $g{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=x.DATA,this.returnState=x.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Ng(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Mg(Rg,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(L.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(L.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=zg(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:te.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:te.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:te.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:te.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(il(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(L.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=on(t.tagName),t.type===te.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(L.endTagWithAttributes),t.selfClosing&&this._err(L.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case te.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case te.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case te.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:te.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=al(t)?te.WHITESPACE_CHARACTER:t===E.NULL?te.NULL_CHARACTER:te.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(te.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=x.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?pt.Attribute:pt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===x.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case x.DATA:{this._stateData(t);break}case x.RCDATA:{this._stateRcdata(t);break}case x.RAWTEXT:{this._stateRawtext(t);break}case x.SCRIPT_DATA:{this._stateScriptData(t);break}case x.PLAINTEXT:{this._statePlaintext(t);break}case x.TAG_OPEN:{this._stateTagOpen(t);break}case x.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case x.TAG_NAME:{this._stateTagName(t);break}case x.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case x.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case x.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case x.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case x.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case x.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case x.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case x.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case x.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case x.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case x.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case x.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case x.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case x.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case x.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case x.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case x.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case x.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case x.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case x.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case x.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case x.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case x.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case x.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case x.BOGUS_COMMENT:{this._stateBogusComment(t);break}case x.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case x.COMMENT_START:{this._stateCommentStart(t);break}case x.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case x.COMMENT:{this._stateComment(t);break}case x.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case x.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case x.COMMENT_END:{this._stateCommentEnd(t);break}case x.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case x.DOCTYPE:{this._stateDoctype(t);break}case x.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case x.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case x.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case x.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case x.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case x.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case x.CDATA_SECTION:{this._stateCdataSection(t);break}case x.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case x.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case x.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case x.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case E.LESS_THAN_SIGN:{this.state=x.TAG_OPEN;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(L.unexpectedNullCharacter),this._emitCodePoint(t);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case E.AMPERSAND:{this._startCharacterReference();break}case E.LESS_THAN_SIGN:{this.state=x.RCDATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(ke);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case E.LESS_THAN_SIGN:{this.state=x.RAWTEXT_LESS_THAN_SIGN;break}case E.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(ke);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(ke);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case E.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(ke);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(_t(t))this._createStartTagToken(),this.state=x.TAG_NAME,this._stateTagName(t);else switch(t){case E.EXCLAMATION_MARK:{this.state=x.MARKUP_DECLARATION_OPEN;break}case E.SOLIDUS:{this.state=x.END_TAG_OPEN;break}case E.QUESTION_MARK:{this._err(L.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t);break}case E.EOF:{this._err(L.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(L.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=x.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(_t(t))this._createEndTagToken(),this.state=x.TAG_NAME,this._stateTagName(t);else switch(t){case E.GREATER_THAN_SIGN:{this._err(L.missingEndTagName),this.state=x.DATA;break}case E.EOF:{this._err(L.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(L.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=x.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this.state=x.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(L.unexpectedNullCharacter),n.tagName+=ke;break}case E.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(yn(t)?nr(t):t)}}_stateRcdataLessThanSign(t){t===E.SOLIDUS?this.state=x.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){_t(t)?(this.state=x.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=x.BEFORE_ATTRIBUTE_NAME,!1;case E.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=x.SELF_CLOSING_START_TAG,!1;case E.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=x.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===E.SOLIDUS?this.state=x.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){_t(t)?(this.state=x.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case E.SOLIDUS:{this.state=x.SCRIPT_DATA_END_TAG_OPEN;break}case E.EXCLAMATION_MARK:{this.state=x.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=x.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){_t(t)?(this.state=x.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===E.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===E.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case E.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(ke);break}case E.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case E.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(L.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars(ke);break}case E.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.GREATER_THAN_SIGN:{this.state=x.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(L.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars(ke);break}case E.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===E.SOLIDUS?this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:_t(t)?(this._emitChars("<"),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){_t(t)?(this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(He.SCRIPT,!1)&&zs(this.preprocessor.peek(He.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<He.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case E.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(ke);break}case E.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case E.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(L.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ke);break}case E.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.GREATER_THAN_SIGN:{this.state=x.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(L.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ke);break}case E.EOF:{this._err(L.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===E.SOLIDUS?(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(He.SCRIPT,!1)&&zs(this.preprocessor.peek(He.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<He.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case E.EQUALS_SIGN:{this._err(L.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=x.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this._leaveAttrName(),this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case E.EQUALS_SIGN:{this._leaveAttrName(),this.state=x.BEFORE_ATTRIBUTE_VALUE;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:{this._err(L.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case E.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.name+=ke;break}default:this.currentAttr.name+=String.fromCodePoint(yn(t)?nr(t):t)}}_stateAfterAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:{this.state=x.SELF_CLOSING_START_TAG;break}case E.EQUALS_SIGN:{this.state=x.BEFORE_ATTRIBUTE_VALUE;break}case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{this.state=x.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this.state=x.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(L.missingAttributeValue),this.state=x.DATA,this.emitCurrentTagToken();break}default:this.state=x.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case E.QUOTATION_MARK:{this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.value+=ke;break}case E.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case E.APOSTROPHE:{this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.value+=ke;break}case E.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.value+=ke;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:case E.EQUALS_SIGN:case E.GRAVE_ACCENT:{this._err(L.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case E.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this._leaveAttrValue(),this.state=x.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this._err(L.missingWhitespaceBetweenAttributes),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case E.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=x.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:this._err(L.unexpectedSolidusInTag),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentComment(n);break}case E.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case E.NULL:{this._err(L.unexpectedNullCharacter),n.data+=ke;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(He.DASH_DASH,!0)?(this._createCommentToken(He.DASH_DASH.length+1),this.state=x.COMMENT_START):this._consumeSequenceIfMatch(He.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(He.DOCTYPE.length+1),this.state=x.DOCTYPE):this._consumeSequenceIfMatch(He.CDATA_START,!0)?this.inForeignNode?this.state=x.CDATA_SECTION:(this._err(L.cdataInHtmlContent),this._createCommentToken(He.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=x.BOGUS_COMMENT):this._ensureHibernation()||(this._err(L.incorrectlyOpenedComment),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case E.HYPHEN_MINUS:{this.state=x.COMMENT_START_DASH;break}case E.GREATER_THAN_SIGN:{this._err(L.abruptClosingOfEmptyComment),this.state=x.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=x.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=x.COMMENT_END;break}case E.GREATER_THAN_SIGN:{this._err(L.abruptClosingOfEmptyComment),this.state=x.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=x.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=x.COMMENT_END_DASH;break}case E.LESS_THAN_SIGN:{n.data+="<",this.state=x.COMMENT_LESS_THAN_SIGN;break}case E.NULL:{this._err(L.unexpectedNullCharacter),n.data+=ke;break}case E.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case E.EXCLAMATION_MARK:{n.data+="!",this.state=x.COMMENT_LESS_THAN_SIGN_BANG;break}case E.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=x.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===E.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=x.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===E.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=x.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==E.GREATER_THAN_SIGN&&t!==E.EOF&&this._err(L.nestedComment),this.state=x.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=x.COMMENT_END;break}case E.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=x.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentComment(n);break}case E.EXCLAMATION_MARK:{this.state=x.COMMENT_END_BANG;break}case E.HYPHEN_MINUS:{n.data+="-";break}case E.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=x.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{n.data+="--!",this.state=x.COMMENT_END_DASH;break}case E.GREATER_THAN_SIGN:{this._err(L.incorrectlyClosedComment),this.state=x.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(L.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=x.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case E.EOF:{this._err(L.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingWhitespaceBeforeDoctypeName),this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(yn(t))this._createDoctypeToken(String.fromCharCode(nr(t))),this.state=x.DOCTYPE_NAME;else switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.NULL:{this._err(L.unexpectedNullCharacter),this._createDoctypeToken(ke),this.state=x.DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this._err(L.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.EOF:{this._err(L.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=x.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=x.AFTER_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.NULL:{this._err(L.unexpectedNullCharacter),n.name+=ke;break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(yn(t)?nr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(He.PUBLIC,!1)?this.state=x.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(He.SYSTEM,!1)?this.state=x.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(L.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(L.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(L.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(L.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(L.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case E.QUOTATION_MARK:{this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(L.unexpectedNullCharacter),n.publicId+=ke;break}case E.GREATER_THAN_SIGN:{this._err(L.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case E.APOSTROPHE:{this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(L.unexpectedNullCharacter),n.publicId+=ke;break}case E.GREATER_THAN_SIGN:{this._err(L.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.QUOTATION_MARK:{this._err(L.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(L.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.QUOTATION_MARK:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(L.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(L.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(L.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(L.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case E.QUOTATION_MARK:{this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(L.unexpectedNullCharacter),n.systemId+=ke;break}case E.GREATER_THAN_SIGN:{this._err(L.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case E.APOSTROPHE:{this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(L.unexpectedNullCharacter),n.systemId+=ke;break}case E.GREATER_THAN_SIGN:{this._err(L.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.NULL:{this._err(L.unexpectedNullCharacter);break}case E.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case E.RIGHT_SQUARE_BRACKET:{this.state=x.CDATA_SECTION_BRACKET;break}case E.EOF:{this._err(L.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===E.RIGHT_SQUARE_BRACKET?this.state=x.CDATA_SECTION_END:(this._emitChars("]"),this.state=x.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case E.GREATER_THAN_SIGN:{this.state=x.DATA;break}case E.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=x.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(E.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&js(this.preprocessor.peek(1))?x.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){js(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===E.SEMICOLON&&this._err(L.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const sl=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),$s=new Set([...sl,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),br=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),Yg=new Set([...br,c.OL,c.UL]),qg=new Set([...br,c.BUTTON]),Ys=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),qs=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),Vg=new Set([c.TR,c.TEMPLATE,c.HTML]),Wg=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),Qg=new Set([c.TABLE,c.TEMPLATE,c.HTML]),Gg=new Set([c.TD,c.TH]);class Xg{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=c.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===c.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===M.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==M.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Oi,M.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Gg,M.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Qg,M.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Wg,M.HTML)}clearBackToTableRowContext(){this.clearBackTo(Vg,M.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===c.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case M.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case M.SVG:{if(qs.has(i))return!1;break}case M.MATHML:{if(Ys.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,br)}hasInListItemScope(t){return this.hasInDynamicScope(t,Yg)}hasInButtonScope(t){return this.hasInDynamicScope(t,qg)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case M.HTML:{if(Oi.has(n))return!0;if(br.has(n))return!1;break}case M.SVG:{if(qs.has(n))return!1;break}case M.MATHML:{if(Ys.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&sl.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&$s.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&$s.has(this.currentTagId);)this.pop()}}const ii=3;var lt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(lt||(lt={}));const Vs={type:lt.Marker};class Zg{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===lt.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===s){const d=this.treeAdapter.getAttrList(l);d.length===i&&r.push({idx:u,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ii)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ii)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>i.get(o.name)===o.value)&&(a+=1,a>=ii&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(Vs)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:lt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:lt.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Vs);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===lt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===lt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===lt.Element&&n.element===t)}}const At={createDocument(){return{nodeName:"#document",mode:Je.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};At.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(At.isTextNode(n)){n.value+=t;return}}At.appendChild(e,At.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&At.isTextNode(r)?r.value+=t:At.insertBefore(e,At.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},ul="html",Kg="about:legacy-compat",Jg="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ol=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],eE=[...ol,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],tE=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ll=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],nE=[...ll,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ws(e,t){return t.some(n=>e.startsWith(n))}function rE(e){return e.name===ul&&e.publicId===null&&(e.systemId===null||e.systemId===Kg)}function iE(e){if(e.name!==ul)return Je.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Jg)return Je.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),tE.has(n))return Je.QUIRKS;let r=t===null?eE:ol;if(Ws(n,r))return Je.QUIRKS;if(r=t===null?ll:nE,Ws(n,r))return Je.LIMITED_QUIRKS}return Je.NO_QUIRKS}const Qs={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},aE="definitionurl",sE="definitionURL",uE=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),oE=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:M.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:M.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:M.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:M.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:M.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:M.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:M.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:M.XML}],["xml:space",{prefix:"xml",name:"space",namespace:M.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:M.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:M.XMLNS}]]),lE=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),cE=new Set([c.B,c.BIG,c.BLOCKQUOTE,c.BODY,c.BR,c.CENTER,c.CODE,c.DD,c.DIV,c.DL,c.DT,c.EM,c.EMBED,c.H1,c.H2,c.H3,c.H4,c.H5,c.H6,c.HEAD,c.HR,c.I,c.IMG,c.LI,c.LISTING,c.MENU,c.META,c.NOBR,c.OL,c.P,c.PRE,c.RUBY,c.S,c.SMALL,c.SPAN,c.STRONG,c.STRIKE,c.SUB,c.SUP,c.TABLE,c.TT,c.U,c.UL,c.VAR]);function dE(e){const t=e.tagID;return t===c.FONT&&e.attrs.some(({name:r})=>r===Mt.COLOR||r===Mt.SIZE||r===Mt.FACE)||cE.has(t)}function cl(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===aE){e.attrs[t].name=sE;break}}function dl(e){for(let t=0;t<e.attrs.length;t++){const n=uE.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function fa(e){for(let t=0;t<e.attrs.length;t++){const n=oE.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function fE(e){const t=lE.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=on(e.tagName))}function hE(e,t){return t===M.MATHML&&(e===c.MI||e===c.MO||e===c.MN||e===c.MS||e===c.MTEXT)}function pE(e,t,n){if(t===M.MATHML&&e===c.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Mt.ENCODING){const i=n[r].value.toLowerCase();return i===Qs.TEXT_HTML||i===Qs.APPLICATION_XML}}return t===M.SVG&&(e===c.FOREIGN_OBJECT||e===c.DESC||e===c.TITLE)}function mE(e,t,n,r){return(!r||r===M.HTML)&&pE(e,t,n)||(!r||r===M.MATHML)&&hE(e,t)}const gE="hidden",EE=8,bE=3;var A;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(A||(A={}));const TE={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},fl=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),Gs={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:At,onParseError:null};class Xs{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=A.INITIAL,this.originalInsertionMode=A.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Gs,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new $g(this.options,this),this.activeFormattingElements=new Zg(this.treeAdapter),this.fragmentContextID=r?on(this.treeAdapter.getTagName(r)):c.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Xg(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Gs,...n};t??(t=r.treeAdapter.createElement(R.TEMPLATE,M.HTML,[]));const i=r.treeAdapter.createElement("documentmock",M.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===c.TEMPLATE&&a.tmplInsertionModeStack.unshift(A.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:TE,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===M.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,M.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=A.TEXT}switchToPlaintextParsing(){this.insertionMode=A.TEXT,this.originalInsertionMode=A.IN_BODY,this.tokenizer.state=Ce.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===R.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==M.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:{this.tokenizer.state=Ce.RCDATA;break}case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:{this.tokenizer.state=Ce.RAWTEXT;break}case c.SCRIPT:{this.tokenizer.state=Ce.SCRIPT_DATA;break}case c.PLAINTEXT:{this.tokenizer.state=Ce.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,M.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,M.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(R.HTML,M.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,c.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:l,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:l,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===te.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===c.SVG&&this.treeAdapter.getTagName(n)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===M.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===c.MGLYPH||t.tagID===c.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,M.HTML)}_processToken(t){switch(t.type){case te.CHARACTER:{this.onCharacter(t);break}case te.NULL_CHARACTER:{this.onNullCharacter(t);break}case te.COMMENT:{this.onComment(t);break}case te.DOCTYPE:{this.onDoctype(t);break}case te.START_TAG:{this._processStartTag(t);break}case te.END_TAG:{this.onEndTag(t);break}case te.EOF:{this.onEof(t);break}case te.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return mE(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===lt.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=A.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case c.TR:{this.insertionMode=A.IN_ROW;return}case c.TBODY:case c.THEAD:case c.TFOOT:{this.insertionMode=A.IN_TABLE_BODY;return}case c.CAPTION:{this.insertionMode=A.IN_CAPTION;return}case c.COLGROUP:{this.insertionMode=A.IN_COLUMN_GROUP;return}case c.TABLE:{this.insertionMode=A.IN_TABLE;return}case c.BODY:{this.insertionMode=A.IN_BODY;return}case c.FRAMESET:{this.insertionMode=A.IN_FRAMESET;return}case c.SELECT:{this._resetInsertionModeForSelect(t);return}case c.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case c.HTML:{this.insertionMode=this.headElement?A.AFTER_HEAD:A.BEFORE_HEAD;return}case c.TD:case c.TH:{if(t>0){this.insertionMode=A.IN_CELL;return}break}case c.HEAD:{if(t>0){this.insertionMode=A.IN_HEAD;return}break}}this.insertionMode=A.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===c.TEMPLATE)break;if(r===c.TABLE){this.insertionMode=A.IN_SELECT_IN_TABLE;return}}this.insertionMode=A.IN_SELECT}_isElementCausesFosterParenting(t){return fl.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case c.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===M.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case c.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return Ug[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Gb(this,t);return}switch(this.insertionMode){case A.INITIAL:{bn(this,t);break}case A.BEFORE_HTML:{Rn(this,t);break}case A.BEFORE_HEAD:{wn(this,t);break}case A.IN_HEAD:{On(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Ln(this,t);break}case A.AFTER_HEAD:{Dn(this,t);break}case A.IN_BODY:case A.IN_CAPTION:case A.IN_CELL:case A.IN_TEMPLATE:{pl(this,t);break}case A.TEXT:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{ai(this,t);break}case A.IN_TABLE_TEXT:{xl(this,t);break}case A.IN_COLUMN_GROUP:{Tr(this,t);break}case A.AFTER_BODY:{xr(this,t);break}case A.AFTER_AFTER_BODY:{cr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Qb(this,t);return}switch(this.insertionMode){case A.INITIAL:{bn(this,t);break}case A.BEFORE_HTML:{Rn(this,t);break}case A.BEFORE_HEAD:{wn(this,t);break}case A.IN_HEAD:{On(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Ln(this,t);break}case A.AFTER_HEAD:{Dn(this,t);break}case A.TEXT:{this._insertCharacters(t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{ai(this,t);break}case A.IN_COLUMN_GROUP:{Tr(this,t);break}case A.AFTER_BODY:{xr(this,t);break}case A.AFTER_AFTER_BODY:{cr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Li(this,t);return}switch(this.insertionMode){case A.INITIAL:case A.BEFORE_HTML:case A.BEFORE_HEAD:case A.IN_HEAD:case A.IN_HEAD_NO_SCRIPT:case A.AFTER_HEAD:case A.IN_BODY:case A.IN_TABLE:case A.IN_CAPTION:case A.IN_COLUMN_GROUP:case A.IN_TABLE_BODY:case A.IN_ROW:case A.IN_CELL:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:case A.IN_TEMPLATE:case A.IN_FRAMESET:case A.AFTER_FRAMESET:{Li(this,t);break}case A.IN_TABLE_TEXT:{Tn(this,t);break}case A.AFTER_BODY:{IE(this,t);break}case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{SE(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case A.INITIAL:{NE(this,t);break}case A.BEFORE_HEAD:case A.IN_HEAD:case A.IN_HEAD_NO_SCRIPT:case A.AFTER_HEAD:{this._err(t,L.misplacedDoctype);break}case A.IN_TABLE_TEXT:{Tn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,L.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Xb(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case A.INITIAL:{bn(this,t);break}case A.BEFORE_HTML:{RE(this,t);break}case A.BEFORE_HEAD:{OE(this,t);break}case A.IN_HEAD:{at(this,t);break}case A.IN_HEAD_NO_SCRIPT:{vE(this,t);break}case A.AFTER_HEAD:{ME(this,t);break}case A.IN_BODY:{Pe(this,t);break}case A.IN_TABLE:{rn(this,t);break}case A.IN_TABLE_TEXT:{Tn(this,t);break}case A.IN_CAPTION:{Lb(this,t);break}case A.IN_COLUMN_GROUP:{ma(this,t);break}case A.IN_TABLE_BODY:{Fr(this,t);break}case A.IN_ROW:{Ur(this,t);break}case A.IN_CELL:{Pb(this,t);break}case A.IN_SELECT:{yl(this,t);break}case A.IN_SELECT_IN_TABLE:{Bb(this,t);break}case A.IN_TEMPLATE:{Ub(this,t);break}case A.AFTER_BODY:{jb(this,t);break}case A.IN_FRAMESET:{zb(this,t);break}case A.AFTER_FRAMESET:{Yb(this,t);break}case A.AFTER_AFTER_BODY:{Vb(this,t);break}case A.AFTER_AFTER_FRAMESET:{Wb(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Zb(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case A.INITIAL:{bn(this,t);break}case A.BEFORE_HTML:{wE(this,t);break}case A.BEFORE_HEAD:{LE(this,t);break}case A.IN_HEAD:{DE(this,t);break}case A.IN_HEAD_NO_SCRIPT:{PE(this,t);break}case A.AFTER_HEAD:{BE(this,t);break}case A.IN_BODY:{Br(this,t);break}case A.TEXT:{Ab(this,t);break}case A.IN_TABLE:{Hn(this,t);break}case A.IN_TABLE_TEXT:{Tn(this,t);break}case A.IN_CAPTION:{Db(this,t);break}case A.IN_COLUMN_GROUP:{vb(this,t);break}case A.IN_TABLE_BODY:{Di(this,t);break}case A.IN_ROW:{Al(this,t);break}case A.IN_CELL:{Mb(this,t);break}case A.IN_SELECT:{kl(this,t);break}case A.IN_SELECT_IN_TABLE:{Fb(this,t);break}case A.IN_TEMPLATE:{Hb(this,t);break}case A.AFTER_BODY:{Il(this,t);break}case A.IN_FRAMESET:{$b(this,t);break}case A.AFTER_FRAMESET:{qb(this,t);break}case A.AFTER_AFTER_BODY:{cr(this,t);break}}}onEof(t){switch(this.insertionMode){case A.INITIAL:{bn(this,t);break}case A.BEFORE_HTML:{Rn(this,t);break}case A.BEFORE_HEAD:{wn(this,t);break}case A.IN_HEAD:{On(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Ln(this,t);break}case A.AFTER_HEAD:{Dn(this,t);break}case A.IN_BODY:case A.IN_TABLE:case A.IN_CAPTION:case A.IN_COLUMN_GROUP:case A.IN_TABLE_BODY:case A.IN_ROW:case A.IN_CELL:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:{bl(this,t);break}case A.TEXT:{yb(this,t);break}case A.IN_TABLE_TEXT:{Tn(this,t);break}case A.IN_TEMPLATE:{Cl(this,t);break}case A.AFTER_BODY:case A.IN_FRAMESET:case A.AFTER_FRAMESET:case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{pa(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===E.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case A.IN_HEAD:case A.IN_HEAD_NO_SCRIPT:case A.AFTER_HEAD:case A.TEXT:case A.IN_COLUMN_GROUP:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:case A.IN_FRAMESET:case A.AFTER_FRAMESET:{this._insertCharacters(t);break}case A.IN_BODY:case A.IN_CAPTION:case A.IN_CELL:case A.IN_TEMPLATE:case A.AFTER_BODY:case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{hl(this,t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{ai(this,t);break}case A.IN_TABLE_TEXT:{Tl(this,t);break}}}}function xE(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):El(e,t),n}function _E(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function AE(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const u=e.activeFormattingElements.getElementEntry(s),o=u&&a>=bE;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=yE(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function yE(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function kE(e,t,n){const r=e.treeAdapter.getTagName(t),i=on(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&a===M.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function CE(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function ha(e,t){for(let n=0;n<EE;n++){const r=xE(e,t);if(!r)break;const i=_E(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=AE(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&kE(e,s,a),CE(e,i,r)}}function Li(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function IE(e,t){e._appendCommentNode(t,e.openElements.items[0])}function SE(e,t){e._appendCommentNode(t,e.document)}function pa(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function NE(e,t){e._setDocumentType(t);const n=t.forceQuirks?Je.QUIRKS:iE(t);rE(t)||e._err(t,L.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=A.BEFORE_HTML}function bn(e,t){e._err(t,L.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Je.QUIRKS),e.insertionMode=A.BEFORE_HTML,e._processToken(t)}function RE(e,t){t.tagID===c.HTML?(e._insertElement(t,M.HTML),e.insertionMode=A.BEFORE_HEAD):Rn(e,t)}function wE(e,t){const n=t.tagID;(n===c.HTML||n===c.HEAD||n===c.BODY||n===c.BR)&&Rn(e,t)}function Rn(e,t){e._insertFakeRootElement(),e.insertionMode=A.BEFORE_HEAD,e._processToken(t)}function OE(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.HEAD:{e._insertElement(t,M.HTML),e.headElement=e.openElements.current,e.insertionMode=A.IN_HEAD;break}default:wn(e,t)}}function LE(e,t){const n=t.tagID;n===c.HEAD||n===c.BODY||n===c.HTML||n===c.BR?wn(e,t):e._err(t,L.endTagWithoutMatchingOpenElement)}function wn(e,t){e._insertFakeElement(R.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=A.IN_HEAD,e._processToken(t)}function at(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case c.TITLE:{e._switchToTextParsing(t,Ce.RCDATA);break}case c.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ce.RAWTEXT):(e._insertElement(t,M.HTML),e.insertionMode=A.IN_HEAD_NO_SCRIPT);break}case c.NOFRAMES:case c.STYLE:{e._switchToTextParsing(t,Ce.RAWTEXT);break}case c.SCRIPT:{e._switchToTextParsing(t,Ce.SCRIPT_DATA);break}case c.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=A.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(A.IN_TEMPLATE);break}case c.HEAD:{e._err(t,L.misplacedStartTagForHeadElement);break}default:On(e,t)}}function DE(e,t){switch(t.tagID){case c.HEAD:{e.openElements.pop(),e.insertionMode=A.AFTER_HEAD;break}case c.BODY:case c.BR:case c.HTML:{On(e,t);break}case c.TEMPLATE:{$t(e,t);break}default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function $t(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,L.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,L.endTagWithoutMatchingOpenElement)}function On(e,t){e.openElements.pop(),e.insertionMode=A.AFTER_HEAD,e._processToken(t)}function vE(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:{at(e,t);break}case c.NOSCRIPT:{e._err(t,L.nestedNoscriptInHead);break}default:Ln(e,t)}}function PE(e,t){switch(t.tagID){case c.NOSCRIPT:{e.openElements.pop(),e.insertionMode=A.IN_HEAD;break}case c.BR:{Ln(e,t);break}default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function Ln(e,t){const n=t.type===te.EOF?L.openElementsLeftAfterEof:L.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=A.IN_HEAD,e._processToken(t)}function ME(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.BODY:{e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=A.IN_BODY;break}case c.FRAMESET:{e._insertElement(t,M.HTML),e.insertionMode=A.IN_FRAMESET;break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:{e._err(t,L.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),at(e,t),e.openElements.remove(e.headElement);break}case c.HEAD:{e._err(t,L.misplacedStartTagForHeadElement);break}default:Dn(e,t)}}function BE(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:{Dn(e,t);break}case c.TEMPLATE:{$t(e,t);break}default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function Dn(e,t){e._insertFakeElement(R.BODY,c.BODY),e.insertionMode=A.IN_BODY,Mr(e,t)}function Mr(e,t){switch(t.type){case te.CHARACTER:{pl(e,t);break}case te.WHITESPACE_CHARACTER:{hl(e,t);break}case te.COMMENT:{Li(e,t);break}case te.START_TAG:{Pe(e,t);break}case te.END_TAG:{Br(e,t);break}case te.EOF:{bl(e,t);break}}}function hl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function pl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function FE(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function UE(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function HE(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,M.HTML),e.insertionMode=A.IN_FRAMESET)}function jE(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function zE(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Oi.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,M.HTML)}function $E(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function YE(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),n||(e.formElement=e.openElements.current))}function qE(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===c.LI&&i===c.LI||(n===c.DD||n===c.DT)&&(i===c.DD||i===c.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function VE(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.tokenizer.state=Ce.PLAINTEXT}function WE(e,t){e.openElements.hasInScope(c.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1}function QE(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(ha(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function GE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function XE(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&(ha(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ZE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function KE(e,t){e.treeAdapter.getDocumentMode(e.document)!==Je.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=A.IN_TABLE}function ml(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function gl(e){const t=il(e,Mt.TYPE);return t!=null&&t.toLowerCase()===gE}function JE(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),gl(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function eb(e,t){e._appendElement(t,M.HTML),t.ackSelfClosing=!0}function tb(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function nb(e,t){t.tagName=R.IMG,t.tagID=c.IMG,ml(e,t)}function rb(e,t){e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ce.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=A.TEXT}function ib(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ce.RAWTEXT)}function ab(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ce.RAWTEXT)}function Zs(e,t){e._switchToTextParsing(t,Ce.RAWTEXT)}function sb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===A.IN_TABLE||e.insertionMode===A.IN_CAPTION||e.insertionMode===A.IN_TABLE_BODY||e.insertionMode===A.IN_ROW||e.insertionMode===A.IN_CELL?A.IN_SELECT_IN_TABLE:A.IN_SELECT}function ub(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function ob(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,M.HTML)}function lb(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,M.HTML)}function cb(e,t){e._reconstructActiveFormattingElements(),cl(t),fa(t),t.selfClosing?e._appendElement(t,M.MATHML):e._insertElement(t,M.MATHML),t.ackSelfClosing=!0}function db(e,t){e._reconstructActiveFormattingElements(),dl(t),fa(t),t.selfClosing?e._appendElement(t,M.SVG):e._insertElement(t,M.SVG),t.ackSelfClosing=!0}function Ks(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function Pe(e,t){switch(t.tagID){case c.I:case c.S:case c.B:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.SMALL:case c.STRIKE:case c.STRONG:{GE(e,t);break}case c.A:{QE(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{zE(e,t);break}case c.P:case c.DL:case c.OL:case c.UL:case c.DIV:case c.DIR:case c.NAV:case c.MAIN:case c.MENU:case c.ASIDE:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.DETAILS:case c.ADDRESS:case c.ARTICLE:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:{jE(e,t);break}case c.LI:case c.DD:case c.DT:{qE(e,t);break}case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:{ml(e,t);break}case c.HR:{tb(e,t);break}case c.RB:case c.RTC:{ob(e,t);break}case c.RT:case c.RP:{lb(e,t);break}case c.PRE:case c.LISTING:{$E(e,t);break}case c.XMP:{ib(e,t);break}case c.SVG:{db(e,t);break}case c.HTML:{FE(e,t);break}case c.BASE:case c.LINK:case c.META:case c.STYLE:case c.TITLE:case c.SCRIPT:case c.BGSOUND:case c.BASEFONT:case c.TEMPLATE:{at(e,t);break}case c.BODY:{UE(e,t);break}case c.FORM:{YE(e,t);break}case c.NOBR:{XE(e,t);break}case c.MATH:{cb(e,t);break}case c.TABLE:{KE(e,t);break}case c.INPUT:{JE(e,t);break}case c.PARAM:case c.TRACK:case c.SOURCE:{eb(e,t);break}case c.IMAGE:{nb(e,t);break}case c.BUTTON:{WE(e,t);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{ZE(e,t);break}case c.IFRAME:{ab(e,t);break}case c.SELECT:{sb(e,t);break}case c.OPTION:case c.OPTGROUP:{ub(e,t);break}case c.NOEMBED:case c.NOFRAMES:{Zs(e,t);break}case c.FRAMESET:{HE(e,t);break}case c.TEXTAREA:{rb(e,t);break}case c.NOSCRIPT:{e.options.scriptingEnabled?Zs(e,t):Ks(e,t);break}case c.PLAINTEXT:{VE(e,t);break}case c.COL:case c.TH:case c.TD:case c.TR:case c.HEAD:case c.FRAME:case c.TBODY:case c.TFOOT:case c.THEAD:case c.CAPTION:case c.COLGROUP:break;default:Ks(e,t)}}function fb(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=A.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function hb(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=A.AFTER_BODY,Il(e,t))}function pb(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function mb(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):n&&e.openElements.remove(n))}function gb(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(R.P,c.P),e._closePElement()}function Eb(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function bb(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Tb(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function xb(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function _b(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function El(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==c.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function Br(e,t){switch(t.tagID){case c.A:case c.B:case c.I:case c.S:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.NOBR:case c.SMALL:case c.STRIKE:case c.STRONG:{ha(e,t);break}case c.P:{gb(e);break}case c.DL:case c.UL:case c.OL:case c.DIR:case c.DIV:case c.NAV:case c.PRE:case c.MAIN:case c.MENU:case c.ASIDE:case c.BUTTON:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.ADDRESS:case c.ARTICLE:case c.DETAILS:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.LISTING:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:{pb(e,t);break}case c.LI:{Eb(e);break}case c.DD:case c.DT:{bb(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{Tb(e);break}case c.BR:{_b(e);break}case c.BODY:{fb(e,t);break}case c.HTML:{hb(e,t);break}case c.FORM:{mb(e);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{xb(e,t);break}case c.TEMPLATE:{$t(e,t);break}default:El(e,t)}}function bl(e,t){e.tmplInsertionModeStack.length>0?Cl(e,t):pa(e,t)}function Ab(e,t){var n;t.tagID===c.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function yb(e,t){e._err(t,L.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ai(e,t){if(e.openElements.currentTagId!==void 0&&fl.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=A.IN_TABLE_TEXT,t.type){case te.CHARACTER:{xl(e,t);break}case te.WHITESPACE_CHARACTER:{Tl(e,t);break}}else Xn(e,t)}function kb(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,M.HTML),e.insertionMode=A.IN_CAPTION}function Cb(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=A.IN_COLUMN_GROUP}function Ib(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,c.COLGROUP),e.insertionMode=A.IN_COLUMN_GROUP,ma(e,t)}function Sb(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=A.IN_TABLE_BODY}function Nb(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,c.TBODY),e.insertionMode=A.IN_TABLE_BODY,Fr(e,t)}function Rb(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function wb(e,t){gl(t)?e._appendElement(t,M.HTML):Xn(e,t),t.ackSelfClosing=!0}function Ob(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,M.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function rn(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:{Nb(e,t);break}case c.STYLE:case c.SCRIPT:case c.TEMPLATE:{at(e,t);break}case c.COL:{Ib(e,t);break}case c.FORM:{Ob(e,t);break}case c.TABLE:{Rb(e,t);break}case c.TBODY:case c.TFOOT:case c.THEAD:{Sb(e,t);break}case c.INPUT:{wb(e,t);break}case c.CAPTION:{kb(e,t);break}case c.COLGROUP:{Cb(e,t);break}default:Xn(e,t)}}function Hn(e,t){switch(t.tagID){case c.TABLE:{e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break}case c.TEMPLATE:{$t(e,t);break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:Xn(e,t)}}function Xn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Mr(e,t),e.fosterParentingEnabled=n}function Tl(e,t){e.pendingCharacterTokens.push(t)}function xl(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Tn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Xn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const _l=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function Lb(e,t){const n=t.tagID;_l.has(n)?e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_TABLE,rn(e,t)):Pe(e,t)}function Db(e,t){const n=t.tagID;switch(n){case c.CAPTION:case c.TABLE:{e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_TABLE,n===c.TABLE&&Hn(e,t));break}case c.BODY:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:Br(e,t)}}function ma(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.COL:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case c.TEMPLATE:{at(e,t);break}default:Tr(e,t)}}function vb(e,t){switch(t.tagID){case c.COLGROUP:{e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=A.IN_TABLE);break}case c.TEMPLATE:{$t(e,t);break}case c.COL:break;default:Tr(e,t)}}function Tr(e,t){e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=A.IN_TABLE,e._processToken(t))}function Fr(e,t){switch(t.tagID){case c.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,M.HTML),e.insertionMode=A.IN_ROW;break}case c.TH:case c.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(R.TR,c.TR),e.insertionMode=A.IN_ROW,Ur(e,t);break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE,rn(e,t));break}default:rn(e,t)}}function Di(e,t){const n=t.tagID;switch(t.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE);break}case c.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE,Hn(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:case c.TR:break;default:Hn(e,t)}}function Ur(e,t){switch(t.tagID){case c.TH:case c.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,M.HTML),e.insertionMode=A.IN_CELL,e.activeFormattingElements.insertMarker();break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,Fr(e,t));break}default:rn(e,t)}}function Al(e,t){switch(t.tagID){case c.TR:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY);break}case c.TABLE:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,Di(e,t));break}case c.TBODY:case c.TFOOT:case c.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(c.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,Di(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:Hn(e,t)}}function Pb(e,t){const n=t.tagID;_l.has(n)?(e.openElements.hasInTableScope(c.TD)||e.openElements.hasInTableScope(c.TH))&&(e._closeTableCell(),Ur(e,t)):Pe(e,t)}function Mb(e,t){const n=t.tagID;switch(n){case c.TD:case c.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_ROW);break}case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Al(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:Br(e,t)}}function yl(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.OPTION:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._insertElement(t,M.HTML);break}case c.OPTGROUP:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._insertElement(t,M.HTML);break}case c.HR:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:{e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),t.tagID!==c.SELECT&&e._processStartTag(t));break}case c.SCRIPT:case c.TEMPLATE:{at(e,t);break}}}function kl(e,t){switch(t.tagID){case c.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===c.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===c.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop();break}case c.OPTION:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop();break}case c.SELECT:{e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode());break}case c.TEMPLATE:{$t(e,t);break}}}function Bb(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):yl(e,t)}function Fb(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):kl(e,t)}function Ub(e,t){switch(t.tagID){case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:{at(e,t);break}case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{e.tmplInsertionModeStack[0]=A.IN_TABLE,e.insertionMode=A.IN_TABLE,rn(e,t);break}case c.COL:{e.tmplInsertionModeStack[0]=A.IN_COLUMN_GROUP,e.insertionMode=A.IN_COLUMN_GROUP,ma(e,t);break}case c.TR:{e.tmplInsertionModeStack[0]=A.IN_TABLE_BODY,e.insertionMode=A.IN_TABLE_BODY,Fr(e,t);break}case c.TD:case c.TH:{e.tmplInsertionModeStack[0]=A.IN_ROW,e.insertionMode=A.IN_ROW,Ur(e,t);break}default:e.tmplInsertionModeStack[0]=A.IN_BODY,e.insertionMode=A.IN_BODY,Pe(e,t)}}function Hb(e,t){t.tagID===c.TEMPLATE&&$t(e,t)}function Cl(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):pa(e,t)}function jb(e,t){t.tagID===c.HTML?Pe(e,t):xr(e,t)}function Il(e,t){var n;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=A.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else xr(e,t)}function xr(e,t){e.insertionMode=A.IN_BODY,Mr(e,t)}function zb(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.FRAMESET:{e._insertElement(t,M.HTML);break}case c.FRAME:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case c.NOFRAMES:{at(e,t);break}}}function $b(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=A.AFTER_FRAMESET))}function Yb(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.NOFRAMES:{at(e,t);break}}}function qb(e,t){t.tagID===c.HTML&&(e.insertionMode=A.AFTER_AFTER_FRAMESET)}function Vb(e,t){t.tagID===c.HTML?Pe(e,t):cr(e,t)}function cr(e,t){e.insertionMode=A.IN_BODY,Mr(e,t)}function Wb(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.NOFRAMES:{at(e,t);break}}}function Qb(e,t){t.chars=ke,e._insertCharacters(t)}function Gb(e,t){e._insertCharacters(t),e.framesetOk=!1}function Sl(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==M.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Xb(e,t){if(dE(t))Sl(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===M.MATHML?cl(t):r===M.SVG&&(fE(t),dl(t)),fa(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Zb(e,t){if(t.tagID===c.P||t.tagID===c.BR){Sl(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===M.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR;const Kb=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Jb=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Js={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Nl(e,t){const n=l2(e),r=Jo("type",{handlers:{root:e2,element:t2,text:n2,comment:wl,doctype:r2,raw:a2},unknown:s2}),i={parser:n?new Xs(Js):Xs.getFragmentParser(void 0,Js),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),ln(i,ct());const a=n?i.parser.document:i.parser.getFragment(),s=cg(a,{file:i.options.file});return i.stitches&&Pr(s,"comment",function(u,o,l){const d=u;if(d.value.stitch&&l&&o!==void 0){const f=l.children;return f[o]=d.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Rl(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function e2(e,t){Rl(e.children,t)}function t2(e,t){u2(e,t),Rl(e.children,t),o2(e,t)}function n2(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:te.CHARACTER,chars:e.value,location:Zn(e)};ln(t,ct(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function r2(e,t){const n={type:te.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Zn(e)};ln(t,ct(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function i2(e,t){t.stitches=!0;const n=c2(e);if("children"in e&&"children"in n){const r=Nl({type:"root",children:e.children},t.options);n.children=r.children}wl({type:"comment",value:{stitch:n}},t)}function wl(e,t){const n=e.value,r={type:te.COMMENT,data:n,location:Zn(e)};ln(t,ct(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function a2(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Ol(t,ct(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Kb,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function s2(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))i2(n,t);else{let r="";throw Jb.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function ln(e,t){Ol(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ce.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Ol(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function u2(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ce.PLAINTEXT)return;ln(t,ct(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Pt.html;i===Pt.html&&n==="svg"&&(i=Pt.svg);const a=mg({...e,children:[]},{space:i===Pt.svg?"svg":"html"}),s={type:te.START_TAG,tagName:n,tagID:on(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Zn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function o2(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&yg.includes(n)||t.parser.tokenizer.state===Ce.PLAINTEXT)return;ln(t,Rr(e));const r={type:te.END_TAG,tagName:n,tagID:on(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Zn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ce.RCDATA||t.parser.tokenizer.state===Ce.RAWTEXT||t.parser.tokenizer.state===Ce.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ce.DATA)}function l2(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Zn(e){const t=ct(e)||{line:void 0,column:void 0,offset:void 0},n=Rr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function c2(e){return"children"in e?nn({...e,children:[]}):nn(e)}function d2(e){return function(t,n){return Nl(t,{...e,file:n})}}function eu(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function f2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function h2(e,t,n){const i=Dr((n||{}).ignore||[]),a=p2(t);let s=-1;for(;++s<a.length;)Qo(e,"text",u);function u(l,d){let f=-1,p;for(;++f<d.length;){const h=d[f],m=p?p.children:void 0;if(i(h,m?m.indexOf(h):void 0,p))return;p=h}if(p)return o(l,d)}function o(l,d){const f=d[d.length-1],p=a[s][0],h=a[s][1];let m=0;const y=f.children.indexOf(l);let T=!1,S=[];p.lastIndex=0;let b=p.exec(l.value);for(;b;){const w=b.index,O={index:b.index,input:b.input,stack:[...d,l]};let I=h(...b,O);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?p.lastIndex=w+1:(m!==w&&S.push({type:"text",value:l.value.slice(m,w)}),Array.isArray(I)?S.push(...I):I&&S.push(I),m=w+b[0].length,T=!0),!p.global)break;b=p.exec(l.value)}return T?(m<l.value.length&&S.push({type:"text",value:l.value.slice(m)}),f.children.splice(y,1,...S)):S=[l],y+S.length}}function p2(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([m2(i[0]),g2(i[1])])}return t}function m2(e){return typeof e=="string"?new RegExp(f2(e),"g"):e}function g2(e){return typeof e=="function"?e:function(){return e}}const si="phrasing",ui=["autolink","link","image","label"];function E2(){return{transforms:[k2],enter:{literalAutolink:T2,literalAutolinkEmail:oi,literalAutolinkHttp:oi,literalAutolinkWww:oi},exit:{literalAutolink:y2,literalAutolinkEmail:A2,literalAutolinkHttp:x2,literalAutolinkWww:_2}}}function b2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:si,notInConstruct:ui},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:si,notInConstruct:ui},{character:":",before:"[ps]",after:"\\/",inConstruct:si,notInConstruct:ui}]}}function T2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function oi(e){this.config.enter.autolinkProtocol.call(this,e)}function x2(e){this.config.exit.autolinkProtocol.call(this,e)}function _2(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function A2(e){this.config.exit.autolinkEmail.call(this,e)}function y2(e){this.exit(e)}function k2(e){h2(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,C2],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),I2]],{ignore:["link","linkReference"]})}function C2(e,t,n,r,i){let a="";if(!Ll(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!S2(n)))return!1;const s=N2(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function I2(e,t,n,r){return!Ll(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function S2(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function N2(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=eu(e,"(");let a=eu(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Ll(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ht(n)||wr(n))&&(!t||n!==47)}Dl.peek=B2;function R2(){this.buffer()}function w2(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function O2(){this.buffer()}function L2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function D2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=rt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function v2(e){this.exit(e)}function P2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=rt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function M2(e){this.exit(e)}function B2(){return"["}function Dl(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function F2(){return{enter:{gfmFootnoteCallString:R2,gfmFootnoteCall:w2,gfmFootnoteDefinitionLabelString:O2,gfmFootnoteDefinition:L2},exit:{gfmFootnoteCallString:D2,gfmFootnoteCall:v2,gfmFootnoteDefinitionLabelString:P2,gfmFootnoteDefinition:M2}}}function U2(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Dl},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let o=u.move("[^");const l=a.enter("footnoteDefinition"),d=a.enter("label");return o+=u.move(a.safe(a.associationId(r),{before:o,after:"]"})),d(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
82
- `:" ")+a.indentLines(a.containerFlow(r,u.current()),t?vl:H2))),l(),o}}function H2(e,t,n){return t===0?e:vl(e,t,n)}function vl(e,t,n){return(n?"":" ")+e}const j2=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Pl.peek=V2;function z2(){return{canContainEols:["delete"],enter:{strikethrough:Y2},exit:{strikethrough:q2}}}function $2(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:j2}],handlers:{delete:Pl}}}function Y2(e){this.enter({type:"delete",children:[]},e)}function q2(e){this.exit(e)}function Pl(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function V2(){return"~"}function W2(e){return e.length}function Q2(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||W2,a=[],s=[],u=[],o=[];let l=0,d=-1;for(;++d<e.length;){const _=[],y=[];let T=-1;for(e[d].length>l&&(l=e[d].length);++T<e[d].length;){const S=G2(e[d][T]);if(n.alignDelimiters!==!1){const b=i(S);y[T]=b,(o[T]===void 0||b>o[T])&&(o[T]=b)}_.push(S)}s[d]=_,u[d]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)a[f]=tu(r[f]);else{const _=tu(r);for(;++f<l;)a[f]=_}f=-1;const p=[],h=[];for(;++f<l;){const _=a[f];let y="",T="";_===99?(y=":",T=":"):_===108?y=":":_===114&&(T=":");let S=n.alignDelimiters===!1?1:Math.max(1,o[f]-y.length-T.length);const b=y+"-".repeat(S)+T;n.alignDelimiters!==!1&&(S=y.length+S+T.length,S>o[f]&&(o[f]=S),h[f]=S),p[f]=b}s.splice(1,0,p),u.splice(1,0,h),d=-1;const m=[];for(;++d<s.length;){const _=s[d],y=u[d];f=-1;const T=[];for(;++f<l;){const S=_[f]||"";let b="",w="";if(n.alignDelimiters!==!1){const O=o[f]-(y[f]||0),I=a[f];I===114?b=" ".repeat(O):I===99?O%2?(b=" ".repeat(O/2+.5),w=" ".repeat(O/2-.5)):(b=" ".repeat(O/2),w=b):w=" ".repeat(O)}n.delimiterStart!==!1&&!f&&T.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&S==="")&&(n.delimiterStart!==!1||f)&&T.push(" "),n.alignDelimiters!==!1&&T.push(b),T.push(S),n.alignDelimiters!==!1&&T.push(w),n.padding!==!1&&T.push(" "),(n.delimiterEnd!==!1||f!==l-1)&&T.push("|")}m.push(n.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return m.join(`
83
- `)}function G2(e){return e==null?"":String(e)}function tu(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function X2(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),Z2);return i(),s}function Z2(e,t,n){return">"+(n?"":" ")+e}function K2(e,t){return nu(e,t.inConstruct,!0)&&!nu(e,t.notInConstruct,!1)}function nu(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ru(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
84
- `&&K2(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
85
- `}function J2(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function eT(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function tT(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function nT(e,t,n,r){const i=tT(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(eT(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(a,rT);return f(),p}const u=n.createTracker(r),o=i.repeat(Math.max(J2(a,i)+1,3)),l=n.enter("codeFenced");let d=u.move(o);if(e.lang){const f=n.enter(`codeFencedLang${s}`);d+=u.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...u.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);d+=u.move(" "),d+=u.move(n.safe(e.meta,{before:d,after:`
86
- `,encode:["`"],...u.current()})),f()}return d+=u.move(`
87
- `),a&&(d+=u.move(a+`
88
- `)),d+=u.move(o),l(),d}function rT(e,t,n){return(n?"":" ")+e}function ga(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function iT(e,t,n,r){const i=ga(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const o=n.createTracker(r);let l=o.move("[");return l+=o.move(n.safe(n.associationId(e),{before:l,after:"]",...o.current()})),l+=o.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":`
89
- `,...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),s(),l}function aT(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function jn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function _r(e,t,n){const r=tn(e),i=tn(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ml.peek=sT;function Ml(e,t,n,r){const i=aT(n),a=n.enter("emphasis"),s=n.createTracker(r),u=s.move(i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const l=o.charCodeAt(0),d=_r(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(o=jn(l)+o.slice(1));const f=o.charCodeAt(o.length-1),p=_r(r.after.charCodeAt(0),f,i);p.inside&&(o=o.slice(0,-1)+jn(f));const h=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},u+o+h}function sT(e,t,n){return n.options.emphasis||"*"}function uT(e,t){let n=!1;return Pr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ci}),!!((!e.depth||e.depth<3)&&na(e)&&(t.options.setext||n))}function oT(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(uT(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
90
- `,after:`
91
- `});return f(),d(),p+`
92
- `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
93
- `))+1))}const s="#".repeat(i),u=n.enter("headingAtx"),o=n.enter("phrasing");a.move(s+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
94
- `,...a.current()});return/^[\t ]/.test(l)&&(l=jn(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),o(),u(),l}Bl.peek=lT;function Bl(e){return e.value||""}function lT(){return"<"}Fl.peek=cT;function Fl(e,t,n,r){const i=ga(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const o=n.createTracker(r);let l=o.move("![");return l+=o.move(n.safe(e.alt,{before:l,after:"]",...o.current()})),l+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),l+=o.move(")"),s(),l}function cT(){return"!"}Ul.peek=dT;function Ul(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("![");const l=n.safe(e.alt,{before:o,after:"]",...u.current()});o+=u.move(l+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=d,a(),i==="full"||!l||l!==f?o+=u.move(f+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function dT(){return"!"}Hl.peek=fT;function Hl(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],u=n.compilePattern(s);let o;if(s.atBreak)for(;o=u.exec(r);){let l=o.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(o.index+1)}}return i+r+i}function fT(){return"`"}function jl(e,t){const n=na(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}zl.peek=hT;function zl(e,t,n,r){const i=ga(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,o;if(jl(e,n)){const d=n.stack;n.stack=[],u=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),u(),n.stack=d,f}u=n.enter("link"),o=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(o=n.enter("destinationRaw"),l+=s.move(n.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=s.move(" "+i),l+=s.move(n.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),o()),l+=s.move(")"),u(),l}function hT(e,t,n){return jl(e,n)?"<":"["}$l.peek=pT;function $l(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("[");const l=n.containerPhrasing(e,{before:o,after:"]",...u.current()});o+=u.move(l+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=d,a(),i==="full"||!l||l!==f?o+=u.move(f+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function pT(){return"["}function Ea(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function mT(e){const t=Ea(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function gT(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Yl(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function ET(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?gT(n):Ea(n);const u=e.ordered?s==="."?")":".":mT(n);let o=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.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&&(o=!0),Yl(n)===s&&d){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=u),n.bulletCurrent=s;const l=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),l}function bT(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function TT(e,t,n,r){const i=bT(n);let a=n.bulletCurrent||Ea(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const o=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,u.current()),d);return o(),l;function d(f,p,h){return p?(h?"":" ".repeat(s))+f:(h?a:a+" ".repeat(s-a.length))+f}}function xT(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const _T=Dr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function AT(e,t,n,r){return(e.children.some(function(s){return _T(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function yT(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ql.peek=kT;function ql(e,t,n,r){const i=yT(n),a=n.enter("strong"),s=n.createTracker(r),u=s.move(i+i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const l=o.charCodeAt(0),d=_r(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(o=jn(l)+o.slice(1));const f=o.charCodeAt(o.length-1),p=_r(r.after.charCodeAt(0),f,i);p.inside&&(o=o.slice(0,-1)+jn(f));const h=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},u+o+h}function kT(e,t,n){return n.options.strong||"*"}function CT(e,t,n,r){return n.safe(e.value,r)}function IT(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ST(e,t,n){const r=(Yl(n)+(n.options.ruleSpaces?" ":"")).repeat(IT(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Vl={blockquote:X2,break:ru,code:nT,definition:iT,emphasis:Ml,hardBreak:ru,heading:oT,html:Bl,image:Fl,imageReference:Ul,inlineCode:Hl,link:zl,linkReference:$l,list:ET,listItem:TT,paragraph:xT,root:AT,strong:ql,text:CT,thematicBreak:ST};function NT(){return{enter:{table:RT,tableData:iu,tableHeader:iu,tableRow:OT},exit:{codeText:LT,table:wT,tableData:li,tableHeader:li,tableRow:li}}}function RT(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function wT(e){this.exit(e),this.data.inTable=void 0}function OT(e){this.enter({type:"tableRow",children:[]},e)}function li(e){this.exit(e)}function iu(e){this.enter({type:"tableCell",children:[]},e)}function LT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,DT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function DT(e,t){return t==="|"?t:e}function vT(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
95
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:o,tableRow:u}};function s(h,m,_,y){return l(d(h,_,y),h.align)}function u(h,m,_,y){const T=f(h,_,y),S=l([T]);return S.slice(0,S.indexOf(`
96
- `))}function o(h,m,_,y){const T=_.enter("tableCell"),S=_.enter("phrasing"),b=_.containerPhrasing(h,{...y,before:a,after:a});return S(),T(),b}function l(h,m){return Q2(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function d(h,m,_){const y=h.children;let T=-1;const S=[],b=m.enter("table");for(;++T<y.length;)S[T]=f(y[T],m,_);return b(),S}function f(h,m,_){const y=h.children;let T=-1;const S=[],b=m.enter("tableRow");for(;++T<y.length;)S[T]=o(y[T],h,m,_);return b(),S}function p(h,m,_){let y=Vl.inlineCode(h,m,_);return _.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function PT(){return{exit:{taskListCheckValueChecked:au,taskListCheckValueUnchecked:au,paragraph:BT}}}function MT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:FT}}}function au(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function BT(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){s=u;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function FT(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let o=Vl.listItem(e,t,n,{...r,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),o;function l(d){return d+s}}function UT(){return[E2(),F2(),z2(),NT(),PT()]}function HT(e){return{extensions:[b2(),U2(e),$2(),vT(e),MT()]}}const jT={tokenize:WT,partial:!0},Wl={tokenize:QT,partial:!0},Ql={tokenize:GT,partial:!0},Gl={tokenize:XT,partial:!0},zT={tokenize:ZT,partial:!0},Xl={name:"wwwAutolink",tokenize:qT,previous:Kl},Zl={name:"protocolAutolink",tokenize:VT,previous:Jl},Et={name:"emailAutolink",tokenize:YT,previous:ec},dt={};function $T(){return{text:dt}}let Lt=48;for(;Lt<123;)dt[Lt]=Et,Lt++,Lt===58?Lt=65:Lt===91&&(Lt=97);dt[43]=Et;dt[45]=Et;dt[46]=Et;dt[95]=Et;dt[72]=[Et,Zl];dt[104]=[Et,Zl];dt[87]=[Et,Xl];dt[119]=[Et,Xl];function YT(e,t,n){const r=this;let i,a;return s;function s(f){return!vi(f)||!ec.call(r,r.previous)||ba(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(f))}function u(f){return vi(f)?(e.consume(f),u):f===64?(e.consume(f),o):n(f)}function o(f){return f===46?e.check(zT,d,l)(f):f===45||f===95||De(f)?(a=!0,e.consume(f),o):d(f)}function l(f){return e.consume(f),i=!0,o}function d(f){return a&&i&&Fe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function qT(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Kl.call(r,r.previous)||ba(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(jT,e.attempt(Wl,e.attempt(Ql,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function VT(e,t,n){const r=this;let i="",a=!1;return s;function s(f){return(f===72||f===104)&&Jl.call(r,r.previous)&&!ba(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),u):n(f)}function u(f){if(Fe(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),u;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),o}return n(f)}function o(f){return f===47?(e.consume(f),a?l:(a=!0,o)):n(f)}function l(f){return f===null||gr(f)||Ee(f)||Ht(f)||wr(f)?n(f):e.attempt(Wl,e.attempt(Ql,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function WT(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function QT(e,t,n){let r,i,a;return s;function s(l){return l===46||l===95?e.check(Gl,o,u)(l):l===null||Ee(l)||Ht(l)||l!==45&&wr(l)?o(l):(a=!0,e.consume(l),s)}function u(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),s}function o(l){return i||r||!a?n(l):t(l)}}function GT(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Gl,t,a)(s):s===null||Ee(s)||Ht(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function XT(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||Ee(u)||Ht(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Ee(u)||Ht(u)?t(u):r(u)}function a(u){return Fe(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Fe(u)?(e.consume(u),s):n(u)}}function ZT(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return De(a)?n(a):t(a)}}function Kl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ee(e)}function Jl(e){return!Fe(e)}function ec(e){return!(e===47||vi(e))}function vi(e){return e===43||e===45||e===46||e===95||De(e)}function ba(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const KT={tokenize:sx,partial:!0};function JT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:rx,continuation:{tokenize:ix},exit:ax}},text:{91:{name:"gfmFootnoteCall",tokenize:nx},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ex,resolveTo:tx}}}}function ex(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!s||!s._balanced)return n(o);const l=rt(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function tx(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function nx(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),o}function o(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!s||f===null||f===91||Ee(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(rt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Ee(f)||(s=!0),a++,e.consume(f),f===92?d:l}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,l):l(f)}}function rx(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return o;function o(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(m)}function d(m){if(s>999||m===93&&!u||m===null||m===91||Ee(m))return n(m);if(m===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return a=rt(r.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ee(m)||(u=!0),s++,e.consume(m),m===92?f:d}function f(m){return m===91||m===92||m===93?(e.consume(m),s++,d):d(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),se(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function ix(e,t,n){return e.check(Qn,t,e.attempt(KT,t,n))}function ax(e){e.exit("gfmFootnoteDefinition")}function sx(e,t,n){const r=this;return se(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function ux(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,u){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let l=o;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[o][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[o][1].end)},f={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[o][1].start)},p=[["enter",d,u],["enter",s[l][1],u],["exit",s[l][1],u],["enter",f,u]],h=u.parser.constructs.insideSpan.null;h&&Qe(p,p.length,0,Or(h,s.slice(l+1,o),u)),Qe(p,p.length,0,[["exit",f,u],["enter",s[o][1],u],["exit",s[o][1],u],["exit",d,u]]),Qe(s,l-1,o-l+3,p),o=l+p.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function a(s,u,o){const l=this.previous,d=this.events;let f=0;return p;function p(m){return l===126&&d[d.length-1][1].type!=="characterEscape"?o(m):(s.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const _=tn(l);if(m===126)return f>1?o(m):(s.consume(m),f++,h);if(f<2&&!n)return o(m);const y=s.exit("strikethroughSequenceTemporary"),T=tn(m);return y._open=!T||T===2&&!!_,y._close=!_||_===2&&!!T,u(m)}}}class ox{constructor(){this.map=[]}add(t,n,r){lx(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function lx(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function cx(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function dx(){return{flow:{null:{name:"table",tokenize:fx,resolveAll:hx}}}}function fx(e,t,n){const r=this;let i=0,a=0,s;return u;function u(N){let F=r.events.length-1;for(;F>-1;){const z=r.events[F][1].type;if(z==="lineEnding"||z==="linePrefix")F--;else break}const v=F>-1?r.events[F][1].type:null,W=v==="tableHead"||v==="tableRow"?I:o;return W===I&&r.parser.lazy[r.now().line]?n(N):W(N)}function o(N){return e.enter("tableHead"),e.enter("tableRow"),l(N)}function l(N){return N===124||(s=!0,a+=1),d(N)}function d(N){return N===null?n(N):Q(N)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),h):n(N):re(N)?se(e,d,"whitespace")(N):(a+=1,s&&(s=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),f(N)))}function f(N){return N===null||N===124||Ee(N)?(e.exit("data"),d(N)):(e.consume(N),N===92?p:f)}function p(N){return N===92||N===124?(e.consume(N),f):f(N)}function h(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),s=!1,re(N)?se(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):m(N))}function m(N){return N===45||N===58?y(N):N===124?(s=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),_):O(N)}function _(N){return re(N)?se(e,y,"whitespace")(N):y(N)}function y(N){return N===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),T):N===45?(a+=1,T(N)):N===null||Q(N)?w(N):O(N)}function T(N){return N===45?(e.enter("tableDelimiterFiller"),S(N)):O(N)}function S(N){return N===45?(e.consume(N),S):N===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(N))}function b(N){return re(N)?se(e,w,"whitespace")(N):w(N)}function w(N){return N===124?m(N):N===null||Q(N)?!s||i!==a?O(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):O(N)}function O(N){return n(N)}function I(N){return e.enter("tableRow"),P(N)}function P(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),P):N===null||Q(N)?(e.exit("tableRow"),t(N)):re(N)?se(e,P,"whitespace")(N):(e.enter("data"),H(N))}function H(N){return N===null||N===124||Ee(N)?(e.exit("data"),P(N)):(e.consume(N),N===92?q:H)}function q(N){return N===92||N===124?(e.consume(N),H):H(N)}}function hx(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,o=0,l,d,f;const p=new ox;for(;++n<e.length;){const h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(u=!1,o!==0&&(su(p,t,o,l,d),d=void 0,o=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",d,t]])),i=m.type==="tableDelimiterRow"?2:d?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],f=rr(p,t,a,i,void 0,f),a=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],f=rr(p,t,a,i,void 0,f)),a=s,s=[a[1],n,0,0])):m.type==="tableHead"?(u=!0,o=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=n,a[1]!==0?(s[0]=s[1],f=rr(p,t,a,i,n,f)):s[1]!==0&&(f=rr(p,t,s,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&su(p,t,o,l,d),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=cx(t.events,n))}return e}function rr(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Xt(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=Xt(t.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=Xt(t.events,n[2]),d=Xt(t.events,n[3]),f={type:u,start:Object.assign({},l),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,_=n[3]-n[2]-1;e.add(m,_,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},Xt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function su(e,t,n,r,i){const a=[],s=Xt(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function Xt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const px={name:"tasklistCheck",tokenize:gx};function mx(){return{text:{91:px}}}function gx(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return Ee(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return Q(o)?t(o):re(o)?e.check({tokenize:Ex},t,n)(o):n(o)}}function Ex(e,t,n){return se(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function bx(e){return Ro([$T(),JT(),ux(e),dx(),mx()])}const Tx={};function xx(e){const t=this,n=e||Tx,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(bx(n)),a.push(UT()),s.push(HT(n))}const _x=V.lazy(()=>yc(()=>import("./lazy-highlighter-Z2qArbl8.js"),__vite__mapDeps([0,1,2,3,4])));function tc(){const e=X.c(3),[t,n]=V.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=async s=>{await navigator.clipboard.writeText(s),n(!0),setTimeout(()=>n(!1),2e3)},e[0]=r):r=e[0];const i=r;let a;return e[1]!==t?(a={handleCopy:i,copied:t},e[1]=t,e[2]=a):a=e[2],a}function Ax(){const e=X.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=[85,70],e[0]=t):t=e[0];const n=t;let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=g.jsx("div",{className:"p-4 font-mono text-sm",style:{background:"#2d2d2d",borderRadius:"0 0 0.5rem 0.5rem",overflow:"auto",minHeight:"4rem"},children:n.map(yx)}),e[1]=r):r=e[1],r}function yx(e,t){return g.jsxs("div",{className:"flex gap-2 items-center my-1",children:[t>2&&t<7&&g.jsx("div",{className:"w-4 h-4 rounded-sm opacity-40 animate-pulse",style:{background:"rgba(128, 128, 128, 0.3)",animationDelay:`${t*.1}s`}}),t%4===0&&g.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"3rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${t*.12}s`}}),t%3===1&&g.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"2.5rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${t*.14}s`}}),g.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:`${e}%`,background:"rgba(255, 255, 255, 0.1)",animationDelay:`${t*.1}s`}}),t%5===2&&g.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"4rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${t*.16}s`}})]},t)}function kx(e){const t=X.c(12),n=V.useRef(null),{handleCopy:r,copied:i}=tc(),a=Cx;let s;t[0]!==r?(s=async()=>{const p=a(n.current);await r(p)},t[0]=r,t[1]=s):s=t[1];const u=s;let o;t[2]!==i?(o=i?g.jsx(Jt,{size:12}):g.jsx(Ar,{size:12}),t[2]=i,t[3]=o):o=t[3];let l;t[4]!==u||t[5]!==o?(l=g.jsx("div",{className:"flex justify-end items-center",children:g.jsxs(it,{variant:"ghost",onClick:u,"aria-label":"Copy as CSV",className:"text-muted-foreground hover:text-foreground h-6 text-[10px]",type:"button",children:["Copy as CSV",o]})}),t[4]=u,t[5]=o,t[6]=l):l=t[6];let d;t[7]!==e?(d=g.jsx("div",{className:"overflow-x-auto mb-4 rounded-lg border border-border",children:g.jsx("table",{ref:n,...e,className:"min-w-full border-collapse text-sm",children:e.children})}),t[7]=e,t[8]=d):d=t[8];let f;return t[9]!==l||t[10]!==d?(f=g.jsxs(g.Fragment,{children:[l,d]}),t[9]=l,t[10]=d,t[11]=f):f=t[11],f}function Cx(e){return e?Array.from(e.querySelectorAll("tr")).map(Ix).join(`
97
- `):""}function Ix(e){return Array.from(e.querySelectorAll("th,td")).map(Sx).join(",")}function Sx(e){let t=e.textContent||"";return t=t.replace(/"/g,'""'),t.search(/([",\n])/g)>=0&&(t=`"${t}"`),t}const Nx=[xx],Rx=[d2],wx={p:e=>g.jsx("p",{...e,className:"leading-relaxed text-sm mb-2 last:mb-0"}),strong:e=>g.jsx("strong",{...e,className:"font-bold"}),em:e=>g.jsx("em",{...e,className:"italic"}),a:e=>g.jsx("a",{...e,target:"_blank",rel:"noopener noreferrer",className:"text-primary-dark hover:underline break-all font-medium"}),ul:e=>g.jsx("ul",{...e,className:"list-disc ml-6 my-4 space-y-2"}),ol:e=>g.jsx("ol",{...e,className:"list-decimal ml-6 my-4 space-y-2"}),li:e=>g.jsx("li",{...e,className:"leading-relaxed text-sm"}),code:e=>g.jsx("code",{...e,className:"px-1 py-0.5 bg-muted rounded text-sm font-mono break-all"}),pre:e=>g.jsx("pre",{...e,className:"flex w-full min-w-0 my-4 bg-muted rounded overflow-hidden",children:g.jsx("code",{className:"flex-1 min-w-0 p-4 text-sm font-mono whitespace-pre overflow-x-auto",children:e.children})}),table:e=>g.jsx(kx,{...e}),thead:e=>g.jsx("thead",{...e,className:"bg-muted",children:e.children}),tr:e=>g.jsx("tr",{...e,className:"even:bg-muted/50 border-b border-border last:border-0"}),th:e=>g.jsx("th",{...e,className:"px-4 py-2 text-left font-semibold text-muted-foreground border-b border-border"}),td:e=>g.jsx("td",{...e,className:"px-4 py-2 border-b border-border"})},nc=V.memo(e=>{const t=X.c(2),{content:n}=e;let r;return t[0]!==n?(r=g.jsx(G1,{remarkPlugins:Nx,rehypePlugins:Rx,components:wx,children:n}),t[0]=n,t[1]=r):r=t[1],r},(e,t)=>e.content===t.content);function Ox(e){const t=X.c(20),{language:n,content:r}=e,{handleCopy:i,copied:a}=tc(),s=n||"text";let u;t[0]!==s?(u=g.jsx("span",{className:"text-xs font-mono uppercase text-muted-foreground tracking-widest select-none",children:s}),t[0]=s,t[1]=u):u=t[1];let o;t[2]!==r||t[3]!==i?(o=()=>i(r),t[2]=r,t[3]=i,t[4]=o):o=t[4];let l;t[5]!==a?(l=a?g.jsx(Jt,{size:14}):g.jsx(Ar,{size:14}),t[5]=a,t[6]=l):l=t[6];let d;t[7]!==o||t[8]!==l?(d=g.jsx(it,{size:"icon",variant:"ghost",onClick:o,"aria-label":"Copy code",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:l}),t[7]=o,t[8]=l,t[9]=d):d=t[9];let f;t[10]!==u||t[11]!==d?(f=g.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 bg-muted border-b border-border",children:[u,d]}),t[10]=u,t[11]=d,t[12]=f):f=t[12];let p;t[13]===Symbol.for("react.memo_cache_sentinel")?(p=g.jsx(Ax,{}),t[13]=p):p=t[13];let h;t[14]!==r||t[15]!==n?(h=g.jsx(V.Suspense,{fallback:p,children:g.jsx(_x,{language:n,content:r})}),t[14]=r,t[15]=n,t[16]=h):h=t[16];let m;return t[17]!==f||t[18]!==h?(m=g.jsxs("div",{className:"my-4 rounded-lg bg-muted overflow-hidden border border-border grid min-w-0",children:[f,h]}),t[17]=f,t[18]=h,t[19]=m):m=t[19],m}nc.displayName="MemoizedMarkdownBlock";const Ta=e=>{const t=X.c(7),{id:n,text:r}=e;let i;t[0]!==r?(i=fe.lexer(r),t[0]=r,t[1]=i):i=t[1];const a=i;let s;if(t[2]!==a||t[3]!==n){let u;t[5]!==n?(u=(o,l)=>o.type==="code"?g.jsx(Ox,{language:o.lang,content:o.text},`${n}-block_${l}`):g.jsx(nc,{content:o.raw},`${n}-block_${l}`),t[5]=n,t[6]=u):u=t[6],s=a.map(u),t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s};Ta.displayName="MemoizedMarkdown";function rc(e){const t=X.c(18),{id:n,part:r,copyable:i,extraActions:a,hasToolCallAfter:s}=e,u=i===void 0?!1:i,o=s===void 0?!1:s,{handleCopy:l}=sh(),[d,f]=V.useState(!1);let p;t[0]!==l||t[1]!==r.text?(p=async()=>{await l(r.text),f(!0),setTimeout(()=>f(!1),2e3)},t[0]=l,t[1]=r.text,t[2]=p):p=t[2];const h=p,m=u&&a,_=m||a,y=!o&&"mb-2";let T;t[3]!==y?(T=he("group/part relative",y),t[3]=y,t[4]=T):T=t[4];let S;t[5]!==n||t[6]!==r.text?(S=g.jsx(Ta,{id:n,text:r.text}),t[5]=n,t[6]=r.text,t[7]=S):S=t[7];let b;t[8]!==a||t[9]!==h||t[10]!==d||t[11]!==_||t[12]!==m?(b=_&&g.jsx("div",{className:"flex w-full items-center text-xs text-muted-foreground opacity-0 pointer-events-none transition-all duration-200 group-hover/part:opacity-100 group-hover/part:pointer-events-auto mt-2",children:g.jsxs("div",{className:"flex items-center gap-1",children:[m&&g.jsx(it,{onClick:h,variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground size-6 whitespace-nowrap",children:d?g.jsx(Jt,{size:12}):g.jsx(Ar,{size:12})}),a]})}),t[8]=a,t[9]=h,t[10]=d,t[11]=_,t[12]=m,t[13]=b):b=t[13];let w;return t[14]!==T||t[15]!==S||t[16]!==b?(w=g.jsxs("div",{className:T,children:[S,b]}),t[14]=T,t[15]=S,t[16]=b,t[17]=w):w=t[17],w}function Lx(e){const t=X.c(27),{toolName:n,input:r,output:i}=e;let a;if(t[0]!==i){const o=JSON.stringify(i,null,2);a=o.length>2e3?o.slice(0,2e3)+"...[TRUNCATED]":o,t[0]=i,t[1]=a}else a=t[1];const s=a;if(n==="READ_MCP_TOOLS"){const o=r?.id;if(o){let l;return t[2]!==o?(l=g.jsx(uu,{connectionId:o}),t[2]=o,t[3]=l):l=t[3],l}}if(n==="CALL_MCP_TOOL"){const o=r?.connectionId;let l;t[4]!==o?(l=o&&g.jsx(uu,{connectionId:o,compact:!0}),t[4]=o,t[5]=l):l=t[5];let d;t[6]!==i?(d=JSON.stringify(i,null,2),t[6]=i,t[7]=d):d=t[7];let f;t[8]!==d?(f=g.jsx("div",{className:"absolute top-1 right-1 z-10",children:g.jsx(Dx,{text:d})}),t[8]=d,t[9]=f):f=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=g.jsx("div",{className:"font-semibold text-muted-foreground mb-0.5 text-[10px] uppercase tracking-wider px-2 pt-2",children:"Input"}),t[10]=p):p=t[10];let h;t[11]!==r?(h=JSON.stringify(r,null,2),t[11]=r,t[12]=h):h=t[12];let m;t[13]!==h?(m=g.jsx("div",{className:"mb-2",children:g.jsx(ir,{jsonString:h,padding:"0.5rem"})}),t[13]=h,t[14]=m):m=t[14];let _;t[15]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx("div",{className:"font-semibold text-muted-foreground mb-0.5 text-[10px] uppercase tracking-wider px-2",children:"Output"}),t[15]=_):_=t[15];let y;t[16]!==s?(y=g.jsx("div",{children:g.jsx(ir,{jsonString:s,padding:"0.5rem"})}),t[16]=s,t[17]=y):y=t[17];let T;t[18]!==f||t[19]!==m||t[20]!==y?(T=g.jsxs("div",{className:"relative bg-muted rounded-md overflow-auto max-h-[200px]",children:[f,p,m,_,y]}),t[18]=f,t[19]=m,t[20]=y,t[21]=T):T=t[21];let S;return t[22]!==T||t[23]!==l?(S=g.jsxs("div",{className:"flex flex-col gap-2",children:[l,T]}),t[22]=T,t[23]=l,t[24]=S):S=t[24],S}let u;return t[25]!==s?(u=g.jsx(ir,{jsonString:s,padding:"0"}),t[25]=s,t[26]=u):u=t[26],u}function uu(e){const t=X.c(15),{connectionId:n,compact:r}=e,i=jc(n),{org:a}=St(),{slug:s}=a,u=kc();if(!i)return null;let o;t[0]!==i.id||t[1]!==u||t[2]!==s?(o=()=>{u({to:"/$org/mcps/$connectionId",params:{org:s,connectionId:i.id}})},t[0]=i.id,t[1]=u,t[2]=s,t[3]=o):o=t[3];const l=o;if(r){let f;t[4]!==i.title?(f=g.jsx("span",{className:"font-medium text-foreground",children:i.title}),t[4]=i.title,t[5]=f):f=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=g.jsx(Vc,{size:12}),t[6]=p):p=t[6];let h;t[7]!==l?(h=g.jsx("button",{type:"button",onClick:l,className:"hover:text-foreground transition-colors",title:"Open connection",children:p}),t[7]=l,t[8]=h):h=t[8];let m;return t[9]!==f||t[10]!==h?(m=g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-muted/50 px-2 py-1 rounded-md w-fit",children:[f,h]}),t[9]=f,t[10]=h,t[11]=m):m=t[11],m}let d;return t[12]!==i||t[13]!==l?(d=g.jsx(Hc,{connection:i,onClick:l}),t[12]=i,t[13]=l,t[14]=d):d=t[14],d}function Dx({text:e}){const t=async()=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(e),Hr.success("Copied to clipboard");else throw new Error("Clipboard API unavailable")}catch(n){try{const r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.left="-9999px",r.style.top="0",document.body.appendChild(r),r.focus(),r.select();const i=document.execCommand("copy");if(document.body.removeChild(r),i)Hr.success("Copied to clipboard");else throw new Error("Fallback copy failed")}catch(r){console.error("Copy failed",n,r),Hr.error("Failed to copy to clipboard")}}};return g.jsx(it,{size:"icon",variant:"ghost",className:"h-5 w-5 hover:bg-background/50",onClick:t,children:g.jsx(Ar,{size:12})})}function ou(e){const t=X.c(50),{part:n}=e,{state:r}=n;let i;t[0]!==n?(i="toolName"in n?n.toolName:n.type.replace("tool-",""),t[0]=n,t[1]=i):i=t[1];const a=i,[s,u]=V.useState(!1);let o;t[2]!==s?(o=()=>u(!s),t[2]=s,t[3]=o):o=t[3];let l;t[4]!==r?(l=r==="output-error"?g.jsx(pu,{className:"size-4 text-destructive shrink-0"}):g.jsx(Uc,{className:he("size-4 text-muted-foreground shrink-0",(r==="input-streaming"||r==="input-available")&&"shimmer")}),t[4]=r,t[5]=l):l=t[5];const d=r==="output-error"&&"text-destructive/90",f=(r==="input-streaming"||r==="input-available")&&"shimmer";let p;t[6]!==d||t[7]!==f?(p=he("text-xs font-medium text-muted-foreground truncate",d,f),t[6]=d,t[7]=f,t[8]=p):p=t[8];const h=r==="input-streaming"&&`Streaming ${a} arguments`,m=r==="input-available"&&`Calling ${a}`,_=r==="output-available"&&`Called ${a}`,y=r==="output-error"&&`Error calling ${a}`;let T;t[9]!==y||t[10]!==p||t[11]!==h||t[12]!==m||t[13]!==_?(T=g.jsxs("span",{className:p,children:[h,m,_,y]}),t[9]=y,t[10]=p,t[11]=h,t[12]=m,t[13]=_,t[14]=T):T=t[14];let S;t[15]!==T||t[16]!==l?(S=g.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[l,T]}),t[15]=T,t[16]=l,t[17]=S):S=t[17];const b=s&&"rotate-90";let w;t[18]!==b?(w=he("size-4 text-muted-foreground transition-transform",b),t[18]=b,t[19]=w):w=t[19];let O;t[20]!==w?(O=g.jsx("div",{className:"flex items-center gap-2 shrink-0",children:g.jsx(hu,{className:w})}),t[20]=w,t[21]=O):O=t[21];let I;t[22]!==S||t[23]!==O||t[24]!==o?(I=g.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-2 w-full cursor-pointer p-3",children:[S,O]}),t[22]=S,t[23]=O,t[24]=o,t[25]=I):I=t[25];const P=s?"max-h-[1000px] opacity-100":"max-h-0 opacity-0";let H;t[26]!==P?(H=he("transition-all duration-200 ease-in-out overflow-hidden",P),t[26]=P,t[27]=H):H=t[27];let q;t[28]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx("div",{className:"w-4 relative shrink-0",children:g.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.25 bg-border"})}),t[28]=q):q=t[28];let N;t[29]!==n.input||t[30]!==r?(N=(r==="input-streaming"||r==="input-available"||r==="output-available")&&!!n.input&&g.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.jsx("div",{className:"px-1 h-5 flex items-center",children:g.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Input"})}),g.jsx("div",{className:"border border-border rounded-lg max-h-[200px] overflow-auto p-2",children:g.jsx(ir,{jsonString:JSON.stringify(n.input,null,2),padding:"0"})})]}),t[29]=n.input,t[30]=r,t[31]=N):N=t[31];let F;t[32]!==n.input||t[33]!==n.output||t[34]!==r||t[35]!==a?(F=r==="output-available"&&g.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.jsx("div",{className:"px-1 h-5 flex items-center",children:g.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Output"})}),g.jsx("div",{className:"border border-border rounded-lg max-h-[200px] overflow-auto p-2",children:g.jsx(Lx,{toolName:a,input:n.input,output:n.output})})]}),t[32]=n.input,t[33]=n.output,t[34]=r,t[35]=a,t[36]=F):F=t[36];let v;t[37]!==n||t[38]!==r?(v=r==="output-error"&&g.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.jsx("div",{className:"px-1 h-5 flex items-center",children:g.jsx("span",{className:"text-xs font-medium text-destructive/90",children:"Error"})}),g.jsx("div",{className:"border border-destructive/20 rounded-lg max-h-[200px] overflow-auto p-2 bg-destructive/10",children:g.jsx("pre",{className:"text-xs font-mono text-destructive whitespace-pre-wrap wrap-break-word",children:"errorText"in n&&typeof n.errorText=="string"?n.errorText:"An unknown error occurred"})})]}),t[37]=n,t[38]=r,t[39]=v):v=t[39];let W;t[40]!==N||t[41]!==F||t[42]!==v?(W=g.jsxs("div",{className:"flex ml-[7px] px-3 pb-3",children:[q,g.jsxs("div",{className:"flex flex-col gap-4 flex-1 min-w-0 pt-2",children:[N,F,v]})]}),t[40]=N,t[41]=F,t[42]=v,t[43]=W):W=t[43];let z;t[44]!==H||t[45]!==W?(z=g.jsx("div",{className:H,children:W}),t[44]=H,t[45]=W,t[46]=z):z=t[46];let U;return t[47]!==I||t[48]!==z?(U=g.jsx("div",{className:"flex flex-col my-4 w-full min-w-0",children:g.jsxs("div",{className:"border border-border/75 rounded-lg flex flex-col bg-background w-full min-w-0 overflow-hidden",children:[I,z]})}),t[47]=I,t[48]=z,t[49]=U):U=t[49],U}const vx={openrouter:e=>{const t=e?.openrouter;return typeof t=="object"&&t!==null&&"usage"in t&&typeof t.usage=="object"&&t.usage!==null&&"cost"in t.usage&&typeof t.usage.cost=="number"?t.usage.cost:null}};function Px(e){if(!e?.providerMetadata)return null;for(const t of Object.values(vx)){const n=t(e.providerMetadata);if(n!==null)return n}return null}function Mx(e){return e.reduce((t,n)=>{const r=n.metadata?.usage;return r?{inputTokens:t.inputTokens+(r.inputTokens??0),outputTokens:t.outputTokens+(r.outputTokens??0),totalTokens:t.totalTokens+(r.totalTokens??0),cost:t.cost+(Px(r)??0)}:t},{inputTokens:0,outputTokens:0,totalTokens:0,cost:0})}function Bx(e){const t=X.c(38),{messages:n}=e;let r,i,a,s,u,o,l,d,f,p,h,m;if(t[0]!==n){m=Symbol.for("react.early_return_sentinel");e:{const w=Mx(n);if(!w){m=null;break e}const{totalTokens:O,inputTokens:I,outputTokens:P,cost:H}=w;if(a=H,!O&&!I&&!P){m=null;break e}i=Bi;let q;t[13]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx(mu,{size:12}),t[13]=q):q=t[13];const N=g.jsxs(it,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground pl-1! h-6 gap-1 whitespace-nowrap",children:[q,g.jsx("span",{className:"text-[10px] font-mono tabular-nums",children:O.toLocaleString()})]});t[14]!==N?(h=g.jsx(Fi,{asChild:!0,children:N}),t[14]=N,t[15]=h):h=t[15],r=Ui,f="top",p="font-mono text-[11px]",u="grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",t[16]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx("span",{className:"text-muted",children:"in"}),t[16]=o):o=t[16],l=g.jsx("span",{children:I.toLocaleString()}),t[17]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx("span",{className:"text-muted",children:"out"}),t[17]=d):d=t[17],s=P.toLocaleString()}t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=s,t[5]=u,t[6]=o,t[7]=l,t[8]=d,t[9]=f,t[10]=p,t[11]=h,t[12]=m}else r=t[1],i=t[2],a=t[3],s=t[4],u=t[5],o=t[6],l=t[7],d=t[8],f=t[9],p=t[10],h=t[11],m=t[12];if(m!==Symbol.for("react.early_return_sentinel"))return m;let _;t[18]!==s?(_=g.jsx("span",{children:s}),t[18]=s,t[19]=_):_=t[19];let y;t[20]!==a?(y=a>0&&g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-muted",children:"cost"}),g.jsxs("span",{children:["$",a.toFixed(4)]})]}),t[20]=a,t[21]=y):y=t[21];let T;t[22]!==_||t[23]!==y||t[24]!==u||t[25]!==o||t[26]!==l||t[27]!==d?(T=g.jsxs("div",{className:u,children:[o,l,d,_,y]}),t[22]=_,t[23]=y,t[24]=u,t[25]=o,t[26]=l,t[27]=d,t[28]=T):T=t[28];let S;t[29]!==r||t[30]!==T||t[31]!==f||t[32]!==p?(S=g.jsx(r,{side:f,className:p,children:T}),t[29]=r,t[30]=T,t[31]=f,t[32]=p,t[33]=S):S=t[33];let b;return t[34]!==i||t[35]!==S||t[36]!==h?(b=g.jsxs(i,{children:[h,S]}),t[34]=i,t[35]=S,t[36]=h,t[37]=b):b=t[37],b}const Fx={planning:{icon:g.jsx(yu,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:"Planning next moves"},thinking:{icon:g.jsx(yr,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:"Thinking"}},Ux=1200;function Hx(){const e=X.c(7),[t,n]=V.useState("planning");let r,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const o=setTimeout(()=>{n("thinking")},Ux);return()=>{clearTimeout(o)}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),V.useEffect(r,i);const a=Fx[t];let s;e[2]!==a.label?(s=g.jsxs("span",{className:"text-xs text-muted-foreground shimmer",children:[a.label,"..."]}),e[2]=a.label,e[3]=s):s=e[3];let u;return e[4]!==a.icon||e[5]!==s?(u=g.jsx("div",{className:"flex items-center gap-1.5 py-2 opacity-60",children:g.jsxs("span",{className:"flex items-center gap-1.5",children:[a.icon,s]})}),e[4]=a.icon,e[5]=s,e[6]=u):u=e[6],u}function jx(e){const t=X.c(10),{duration:n,parts:r,id:i}=e,a=n/1e3;let s;t[0]!==a?(s=a.toFixed(1),t[0]=a,t[1]=s):s=t[1];const u=s,[o,l]=V.useState(!1),[d,f]=V.useState(!1);let p;if(t[2]!==i||t[3]!==d||t[4]!==o||t[5]!==r||t[6]!==u){const h=r.filter($x),m=h.some(zx),_=m||d;let y,T;t[8]===Symbol.for("react.memo_cache_sentinel")?(y=()=>l(!0),T=()=>l(!1),t[8]=y,t[9]=T):(y=t[8],T=t[9]),p=g.jsxs("div",{className:"flex flex-col mb-2",children:[g.jsx("button",{type:"button",onClick:()=>!m&&f(!d),onMouseEnter:y,onMouseLeave:T,className:he("flex items-center gap-1.5 py-2 opacity-60 transition-opacity",!m&&"cursor-pointer hover:opacity-100",m&&"cursor-default"),children:g.jsxs("span",{className:"flex items-center gap-1.5",children:[m?g.jsx(yr,{className:"text-muted-foreground shrink-0 shimmer",size:14}):o?g.jsx(hu,{className:he("text-muted-foreground transition-transform shrink-0",d&&"rotate-90"),size:14}):g.jsx(xu,{className:"text-muted-foreground shrink-0",size:14}),g.jsx("span",{className:he("text-xs text-muted-foreground",m&&"shimmer"),children:m?"Thinking...":`Thought for ${u}s`})]})}),_&&g.jsx("div",{className:"ml-[6px] border-l-2 pl-4 mt-1 mb-2 max-h-[300px] overflow-y-auto",children:h.map((S,b)=>g.jsx("div",{className:"text-muted-foreground markdown-sm pb-2",children:g.jsx(Ta,{id:`${i}-reasoning-${b}`,text:S.text})},`${i}-reasoning-${b}`))})]}),t[2]=i,t[3]=d,t[4]=o,t[5]=r,t[6]=u,t[7]=p}else p=t[7];return p}function zx(e){return e.state==="streaming"}function $x(e){return e.type==="reasoning"}function Yx(e){const t=X.c(11),{part:n,id:r,usageStats:i,isFollowedByToolCall:a}=e;switch(n.type){case"dynamic-tool":{let s;return t[0]!==r||t[1]!==n?(s=g.jsx(ou,{part:n,id:r}),t[0]=r,t[1]=n,t[2]=s):s=t[2],s}case"text":{let s;return t[3]!==r||t[4]!==a||t[5]!==n||t[6]!==i?(s=g.jsx(rc,{id:r,part:n,extraActions:i,copyable:!0,hasToolCallAfter:a}),t[3]=r,t[4]=a,t[5]=n,t[6]=i,t[7]=s):s=t[7],s}case"reasoning":return null;case"step-start":case"file":case"source-url":case"source-document":return null;default:if(n.type.startsWith("tool-")){const s=n;let u;return t[8]!==r||t[9]!==s?(u=g.jsx(ou,{part:s,id:r}),t[8]=r,t[9]=s,t[10]=u):u=t[10],u}}throw new Error(`Unknown part type: ${n.type}`)}function qx(e){const t=X.c(32),{message:n,status:r,className:i}=e,{id:a,parts:s}=n,l=r==="streaming"||r==="submitted",d=V.useRef(null);let f;t[0]!==a?(f=()=>{const z=localStorage.getItem(`msg-duration-${a}`);return z?Number(z):null},t[0]=a,t[1]=f):f=t[1];const[p,h]=V.useState(f);let m,_;t[2]!==l?(m=()=>{l&&d.current===null&&(d.current=Date.now())},_=[l],t[2]=l,t[3]=m,t[4]=_):(m=t[3],_=t[4]),V.useEffect(m,_);let y,T;t[5]!==p||t[6]!==a||t[7]!==s.length?(y=()=>{if(s.length>0&&p===null&&d.current!==null){const z=Date.now()-d.current;h(z),localStorage.setItem(`msg-duration-${a}`,z.toString())}},T=[s.length,p,a],t[5]=p,t[6]=a,t[7]=s.length,t[8]=y,t[9]=T):(y=t[8],T=t[9]),V.useEffect(y,T);const S=s.length>0;let b;t[10]!==s?(b=s.some(Wx),t[10]=s,t[11]=b):b=t[11];const w=b;let O;t[12]!==l||t[13]!==s?(O=l&&s.some(Vx),t[12]=l,t[13]=s,t[14]=O):O=t[14];const P=S&&(w||O)&&p!==null;let H;t[15]!==n?(H=g.jsx(Bx,{messages:[n]}),t[15]=n,t[16]=H):H=t[16];const q=H;let N;t[17]!==i?(N=he("w-full min-w-0 group relative flex items-start gap-4 px-4 z-20 text-foreground flex-row",i),t[17]=i,t[18]=N):N=t[18];let F;t[19]!==p||t[20]!==S||t[21]!==a||t[22]!==l||t[23]!==s||t[24]!==P||t[25]!==q?(F=S?g.jsxs(g.Fragment,{children:[P&&g.jsx(jx,{duration:p,parts:s,id:a}),s.map((z,U)=>{const Z=s[U+1],ne=Z&&(Z.type==="dynamic-tool"||Z.type.startsWith("tool-"));return g.jsx(Yx,{part:z,id:a,usageStats:U===s.length-1?q:void 0,isFollowedByToolCall:ne},`${a}-${U}`)})]}):l?g.jsx(Hx,{}):null,t[19]=p,t[20]=S,t[21]=a,t[22]=l,t[23]=s,t[24]=P,t[25]=q,t[26]=F):F=t[26];let v;t[27]!==F?(v=g.jsx("div",{className:"flex flex-col min-w-0 w-full items-start",children:g.jsx("div",{className:"w-full min-w-0 not-only:rounded-2xl text-sm wrap-break-word overflow-wrap-anywhere bg-transparent",children:F})}),t[27]=F,t[28]=v):v=t[28];let W;return t[29]!==v||t[30]!==N?(W=g.jsx("div",{className:N,children:v}),t[29]=v,t[30]=N,t[31]=W):W=t[31],W}function Vx(e){return e.type==="reasoning"&&e.state==="streaming"}function Wx(e){return e.type==="reasoning"}const ic=V.createContext(null);function ac(e){const t=X.c(2),{children:n}=e;let r;return t[0]!==n?(r=g.jsx(g.Fragment,{children:n}),t[0]=n,t[1]=r):r=t[1],r}function Qx(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(!V.isValidElement(r))continue;if(r.props?.message?.role==="assistant"){const a=e[n-1],s=V.isValidElement(a)&&a.props?.message?.role,u=a&&V.isValidElement(a)&&s==="user"?a:null;t.push({user:u,assistant:r})}}return t}function Gx(e){const t=X.c(27),{children:n,className:r,minHeightOffset:i}=e,a=V.useRef(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=[],t[0]=s):s=t[0];const u=V.useRef(s);let o,l,d,f,p,h,m;if(t[1]!==n||t[2]!==r||t[3]!==i){const S=V.Children.toArray(n),b=S[S.length-1];l=b&&V.isValidElement(b)&&b.type===ac?b:null;const w=l?S.slice(0,-1):S,O=Qx(w);let I;t[11]===Symbol.for("react.memo_cache_sentinel")?(I=H=>{const q=u.current[H];if(q&&a.current){const N=a.current.offsetTop,F=q.offsetTop;a.current.scrollTo({top:F-N,behavior:"smooth"})}},t[11]=I):I=t[11];const P=I;o=ic.Provider,t[12]===Symbol.for("react.memo_cache_sentinel")?(m={scrollToPair:P},t[12]=m):m=t[12],p=a,t[13]!==r?(h=he("w-full min-w-0 max-w-full overflow-y-auto h-full overflow-x-hidden",r),t[13]=r,t[14]=h):h=t[14],d="flex flex-col min-w-0 max-w-2xl mx-auto w-full",f=O.map((H,q)=>{const N=q===O.length-1;return g.jsxs("div",{ref:F=>{u.current[q]=F},className:"flex flex-col pb-2",style:N&&i?{minHeight:`calc(100vh - ${i}px)`}:void 0,children:[g.jsx("div",{className:"sticky top-0 z-50 bg-background w-full h-4"}),g.jsx("div",{className:"sticky mb-3 top-4 z-50",children:H.user&&V.isValidElement(H.user)?V.cloneElement(H.user,{pairIndex:q}):H.user}),H.assistant]},q)}),t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=l,t[6]=d,t[7]=f,t[8]=p,t[9]=h,t[10]=m}else o=t[4],l=t[5],d=t[6],f=t[7],p=t[8],h=t[9],m=t[10];let _;t[15]!==l||t[16]!==d||t[17]!==f?(_=g.jsxs("div",{className:d,children:[f,l]}),t[15]=l,t[16]=d,t[17]=f,t[18]=_):_=t[18];let y;t[19]!==p||t[20]!==h||t[21]!==_?(y=g.jsx("div",{ref:p,className:h,children:_}),t[19]=p,t[20]=h,t[21]=_,t[22]=y):y=t[22];let T;return t[23]!==o||t[24]!==m||t[25]!==y?(T=g.jsx(o,{value:m,children:y}),t[23]=o,t[24]=m,t[25]=y,t[26]=T):T=t[26],T}function Xx(e){const t=X.c(5),{locator:n}=St(),r=Su(),i=ji();let a;return t[0]!==n||t[1]!==r||t[2]!==e||t[3]!==i?(a=async(u,o,l)=>{const d=await Iu(n,l),f=d.findIndex(y=>y.id===u);if(f===-1){console.warn(`[branch] Message ${u} not found in thread ${l}`);return}const p=d.slice(0,f).filter(Zx),h=crypto.randomUUID(),m=new Date().toISOString(),_={id:h,title:"",created_at:m,updated_at:m,hidden:!1};if(await i.insert.mutateAsync(_),p.length>0){const y=p.map(T=>({...T,id:crypto.randomUUID(),metadata:{...T.metadata,thread_id:h,created_at:T.metadata?.created_at||m}}));await r.insertMany.mutateAsync(y)}e(h)},t[0]=n,t[1]=r,t[2]=e,t[3]=i,t[4]=a):a=t[4],a}function Zx(e){return e.role!=="system"}function Kx(e){const t=X.c(18),{messageId:n,parts:r}=e,[i,a]=V.useState(!1),{setInputValue:s,startBranch:u,setActiveThreadId:o,activeThreadId:l}=ih(),d=Xx(o);let f;t[0]!==r?(f=r.filter(e3).map(Jx).join(`
98
- `),t[0]=r,t[1]=f):f=t[1];const p=f;let h;t[2]===Symbol.for("react.memo_cache_sentinel")?(h=I=>{I.stopPropagation(),a(!0)},t[2]=h):h=t[2];const m=h;let _;t[3]!==l||t[4]!==d||t[5]!==n||t[6]!==p||t[7]!==s||t[8]!==u?(_=async()=>{await d(n,p,l),s(p),u({originalThreadId:l,originalMessageId:n,originalMessageText:p}),a(!1)},t[3]=l,t[4]=d,t[5]=n,t[6]=p,t[7]=s,t[8]=u,t[9]=_):_=t[9];const y=_;let T;t[10]===Symbol.for("react.memo_cache_sentinel")?(T=g.jsx("div",{className:"flex justify-center items-end px-2 pb-1",children:g.jsxs(Bi,{children:[g.jsx(Fi,{asChild:!0,children:g.jsx(it,{onClick:m,variant:"ghost",size:"xs",className:"opacity-0 group-hover:opacity-100 hover:bg-gray-200/70 rounded-md transition-opacity text-muted-foreground hover:text-foreground aspect-square w-6 h-6 p-0",children:g.jsx(bu,{size:16,className:"p-0.5"})})}),g.jsx(Ui,{side:"bottom",children:"Edit message"})]})}),t[10]=T):T=t[10];let S;t[11]===Symbol.for("react.memo_cache_sentinel")?(S=g.jsxs(Qc,{children:[g.jsx(Gc,{children:"Edit message?"}),g.jsx(Xc,{children:"This will create a new conversation branch from this point. The original conversation will remain unchanged."})]}),t[11]=S):S=t[11];let b;t[12]===Symbol.for("react.memo_cache_sentinel")?(b=g.jsx(Zc,{children:"Cancel"}),t[12]=b):b=t[12];let w;t[13]!==y?(w=g.jsxs(Kc,{children:[S,g.jsxs(Jc,{children:[b,g.jsx(ed,{onClick:y,children:"Confirm"})]})]}),t[13]=y,t[14]=w):w=t[14];let O;return t[15]!==i||t[16]!==w?(O=g.jsxs(g.Fragment,{children:[T,g.jsx(td,{open:i,onOpenChange:a,children:w})]}),t[15]=i,t[16]=w,t[17]=O):O=t[17],O}function Jx(e){return e.text}function e3(e){return e.type==="text"}function t3(e){const t=X.c(29),{message:n,className:r,pairIndex:i}=e,{id:a,parts:s}=n,u=V.useContext(ic),[o,l]=V.useState(!1);if(!s||s.length===0)return null;let d;t[0]!==u||t[1]!==i?(d=()=>{l(!0),i!==void 0&&u?.scrollToPair(i)},t[0]=u,t[1]=i,t[2]=d):d=t[2];const f=d;let p;t[3]!==r?(p=he("message-block w-full min-w-0 group relative flex items-start gap-4 px-2.5 text-foreground flex-row-reverse",r),t[3]=r,t[4]=p):p=t[4];let h,m;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>l(!0),m=()=>l(!1),t[5]=h,t[6]=m):(h=t[5],m=t[6]);const _=o?"overflow-auto opacity-100":"overflow-hidden opacity-99 mask-b-from-1%";let y;t[7]!==_?(y=he("z-10 px-4 py-2 transition-opacity max-h-[120px] flex-1",_),t[7]=_,t[8]=y):y=t[8];let T;if(t[9]!==a||t[10]!==s){let P;t[12]!==a?(P=(H,q)=>H.type==="text"?g.jsx(rc,{id:a,part:H},`${a}-${q}`):null,t[12]=a,t[13]=P):P=t[13],T=s.map(P),t[9]=a,t[10]=s,t[11]=T}else T=t[11];let S;t[14]!==T?(S=g.jsx("div",{children:T}),t[14]=T,t[15]=S):S=t[15];let b;t[16]!==y||t[17]!==S?(b=g.jsx("div",{className:y,children:S}),t[16]=y,t[17]=S,t[18]=b):b=t[18];let w;t[19]!==a||t[20]!==s?(w=g.jsx(Kx,{messageId:a,parts:s}),t[19]=a,t[20]=s,t[21]=w):w=t[21];let O;t[22]!==f||t[23]!==w||t[24]!==b?(O=g.jsxs("div",{tabIndex:0,onClick:f,onFocus:h,onBlur:m,className:"w-full border min-w-0 shadow-xs rounded-lg text-[0.9375rem] wrap-break-word overflow-wrap-anywhere bg-background cursor-pointer transition-colors relative flex outline-none",children:[b,w]}),t[22]=f,t[23]=w,t[24]=b,t[25]=O):O=t[25];let I;return t[26]!==O||t[27]!==p?(I=g.jsx(g.Fragment,{children:g.jsx("div",{className:p,children:O})}),t[26]=O,t[27]=p,t[28]=I):I=t[28],I}function n3(e,t){const n=X.c(4);let r;n[0]!==t?(r={},n[0]=t,n[1]=r):r=n[1];const i=r,a=e??zc;let s;return n[2]!==a?(s=Yc(a),n[2]=a,n[3]=s):s=n[3],$c(a,"LLM",s,i)}function r3(){const e=X.c(8),t=qc();let n;e[0]!==t?(n={connections:t,binding:"LLMS"},e[0]=t,e[1]=n):n=e[1];const[r]=Ic(n),i=n3(r?.id);if(!i||!r){let s;return e[2]===Symbol.for("react.memo_cache_sentinel")?(s=[],e[2]=s):s=e[2],s}let a;if(e[3]!==r||e[4]!==i){let s;e[6]!==r?(s=u=>({...u,name:u.title,contextWindow:u.limits?.contextWindow,outputLimit:u.limits?.maxOutputTokens,inputCost:u.costs?.input,outputCost:u.costs?.output,provider:u.provider,connectionId:r.id,connectionName:r.title}),e[6]=r,e[7]=s):s=e[7],a=i.map(s).sort(i3),e[3]=r,e[4]=i,e[5]=a}else a=e[5];return a}function i3(e,t){return e.name.localeCompare(t.name)}const a3={reasoning:{icon:g.jsx(yr,{className:"size-4"}),bg:"bg-purple-100",text:"text-purple-700",label:"Reasoning"},"image-upload":{icon:g.jsx(Tu,{className:"size-4"}),bg:"bg-teal-100",text:"text-teal-700",label:"Can analyze images"},"file-upload":{icon:g.jsx(nd,{className:"size-4"}),bg:"bg-blue-100",text:"text-blue-700",label:"Can analyze files"},"web-search":{icon:g.jsx(rd,{className:"size-4"}),bg:"bg-amber-100",text:"text-amber-700",label:"Can search the web to answer questions"}},sc=V.memo(function(t){const n=X.c(11),{capability:r}=t,i=a3[r];let a;n[0]!==r||n[1]!==i?(a=i||{icon:g.jsx(Jt,{className:"size-4"}),bg:"bg-slate-200",text:"text-slate-700",label:r},n[0]=r,n[1]=i,n[2]=a):a=n[2];const s=a,u=`flex items-center justify-center h-6 w-6 rounded-sm ${s.bg} ${s.text}`;let o;n[3]!==s.icon||n[4]!==u?(o=g.jsx(Fi,{asChild:!0,children:g.jsx("div",{className:u,children:s.icon})}),n[3]=s.icon,n[4]=u,n[5]=o):o=n[5];let l;n[6]!==s.label?(l=g.jsx(Ui,{children:g.jsx("p",{children:s.label})}),n[6]=s.label,n[7]=l):l=n[7];let d;return n[8]!==o||n[9]!==l?(d=g.jsxs(Bi,{children:[o,l]}),n[8]=o,n[9]=l,n[10]=d):d=n[10],d}),lu=V.memo(function(t){const n=X.c(54),{model:r,compact:i}=t,a=i===void 0?!1:i;if(!r){let T;return n[0]===Symbol.for("react.memo_cache_sentinel")?(T=g.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Hover to preview"}),n[0]=T):T=n[0],T}const s=r.contextWindow||r.inputCost||r.outputCost||r.outputLimit;if(!s&&!a){let T;n[1]!==r.logo||n[2]!==r.name?(T=r.logo&&g.jsx("img",{src:r.logo,className:"w-6 h-6",alt:r.name}),n[1]=r.logo,n[2]=r.name,n[3]=T):T=n[3];let S;n[4]!==r.name?(S=g.jsx("p",{className:"text-lg font-medium leading-7",children:r.name}),n[4]=r.name,n[5]=S):S=n[5];let b;n[6]!==T||n[7]!==S?(b=g.jsxs("div",{className:"flex items-center gap-3 py-2 px-0",children:[T,S]}),n[6]=T,n[7]=S,n[8]=b):b=n[8];let w;n[9]!==r.description?(w=r.description&&g.jsx("p",{className:"text-sm text-muted-foreground",children:r.description}),n[9]=r.description,n[10]=w):w=n[10];let O;return n[11]!==b||n[12]!==w?(O=g.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[b,w]}),n[11]=b,n[12]=w,n[13]=O):O=n[13],O}if(!s&&a)return null;if(a){let T;n[14]!==r.contextWindow?(T=r.contextWindow&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-muted-foreground",children:"Context"}),g.jsxs("span",{className:"text-foreground font-medium",children:[r.contextWindow.toLocaleString()," tokens"]})]}),n[14]=r.contextWindow,n[15]=T):T=n[15];let S;n[16]!==r.inputCost?(S=r.inputCost&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-muted-foreground",children:"Input cost"}),g.jsxs("span",{className:"text-foreground font-medium",children:["$",r.inputCost.toFixed(2)," / 1M"]})]}),n[16]=r.inputCost,n[17]=S):S=n[17];let b;n[18]!==r.outputCost?(b=r.outputCost&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-muted-foreground",children:"Output cost"}),g.jsxs("span",{className:"text-foreground font-medium",children:["$",r.outputCost.toFixed(2)," / 1M"]})]}),n[18]=r.outputCost,n[19]=b):b=n[19];let w;n[20]!==r.outputLimit?(w=r.outputLimit&&g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-muted-foreground",children:"Output limit"}),g.jsxs("span",{className:"text-foreground font-medium",children:[r.outputLimit.toLocaleString()," tokens"]})]}),n[20]=r.outputLimit,n[21]=w):w=n[21];let O;return n[22]!==T||n[23]!==S||n[24]!==b||n[25]!==w?(O=g.jsxs("div",{className:"flex flex-col gap-2.5 pt-3 pb-3 px-3 rounded-b-lg text-xs",children:[T,S,b,w]}),n[22]=T,n[23]=S,n[24]=b,n[25]=w,n[26]=O):O=n[26],O}let u;n[27]!==r.logo||n[28]!==r.name?(u=r.logo&&g.jsx("img",{src:r.logo,className:"w-6 h-6",alt:r.name}),n[27]=r.logo,n[28]=r.name,n[29]=u):u=n[29];let o;n[30]!==r.name?(o=g.jsx("p",{className:"text-lg font-medium leading-7",children:r.name}),n[30]=r.name,n[31]=o):o=n[31];let l;n[32]!==u||n[33]!==o?(l=g.jsxs("div",{className:"flex items-center gap-3",children:[u,o]}),n[32]=u,n[33]=o,n[34]=l):l=n[34];let d;n[35]!==r.capabilities?(d=r.capabilities&&r.capabilities.length>0&&g.jsx("div",{className:"flex items-center gap-2",children:r.capabilities.map(o3)}),n[35]=r.capabilities,n[36]=d):d=n[36];let f;n[37]!==l||n[38]!==d?(f=g.jsxs("div",{className:"flex flex-col gap-3 py-2 px-0",children:[l,d]}),n[37]=l,n[38]=d,n[39]=f):f=n[39];let p;n[40]!==r.contextWindow?(p=r.contextWindow&&g.jsxs("div",{className:"flex flex-col gap-1.5",children:[g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(wc,{className:"w-3.5 h-3.5 text-muted-foreground"}),g.jsx("p",{className:"text-sm text-foreground",children:"Context window"})]}),g.jsxs("p",{className:"text-sm text-muted-foreground",children:[r.contextWindow.toLocaleString()," tokens"]})]}),n[40]=r.contextWindow,n[41]=p):p=n[41];let h;n[42]!==r.inputCost||n[43]!==r.outputCost?(h=(r.inputCost||r.outputCost)&&g.jsxs("div",{className:"flex flex-col gap-1.5",children:[g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(Eu,{className:"w-3.5 h-3.5 text-muted-foreground"}),g.jsx("p",{className:"text-sm text-foreground",children:"Costs"})]}),g.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.inputCost!==null&&r.inputCost!==void 0&&g.jsxs("p",{className:"text-sm text-muted-foreground",children:["$",r.inputCost.toFixed(2)," / 1M tokens (input)"]}),r.outputCost!==null&&r.outputCost!==void 0&&g.jsxs("p",{className:"text-sm text-muted-foreground",children:["$",r.outputCost.toFixed(2)," / 1M tokens (output)"]})]})]}),n[42]=r.inputCost,n[43]=r.outputCost,n[44]=h):h=n[44];let m;n[45]!==r.outputLimit?(m=r.outputLimit&&g.jsxs("div",{className:"flex flex-col gap-1.5",children:[g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(_u,{className:"w-4.5 h-4.5 text-muted-foreground/70"}),g.jsx("p",{className:"text-sm text-foreground",children:"Output limit"})]}),g.jsxs("p",{className:"text-sm text-muted-foreground",children:[r.outputLimit.toLocaleString()," token limit"]})]}),n[45]=r.outputLimit,n[46]=m):m=n[46];let _;n[47]!==p||n[48]!==h||n[49]!==m?(_=g.jsxs("div",{className:"flex flex-col gap-4",children:[p,h,m]}),n[47]=p,n[48]=h,n[49]=m,n[50]=_):_=n[50];let y;return n[51]!==_||n[52]!==f?(y=g.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[f,_]}),n[51]=_,n[52]=f,n[53]=y):y=n[53],y}),s3=V.memo(function(t){const n=X.c(27),{model:r,onHover:i,isSelected:a,hasExpandedInfo:s}=t,u=s?"rounded-t-lg":"rounded-lg";let o;n[0]!==u?(o=he("flex items-center gap-2 h-10 py-4 px-3 hover:bg-accent cursor-pointer",u),n[0]=u,n[1]=o):o=n[1];let l;n[2]!==r||n[3]!==i?(l=()=>i(r),n[2]=r,n[3]=i,n[4]=l):l=n[4];let d;n[5]!==r.logo||n[6]!==r.name?(d=r.logo&&g.jsx("img",{src:r.logo,className:"w-5 h-5 shrink-0",alt:r.name}),n[5]=r.logo,n[6]=r.name,n[7]=d):d=n[7];let f;n[8]!==r.name?(f=g.jsx("span",{className:"text-sm text-foreground",children:r.name}),n[8]=r.name,n[9]=f):f=n[9];let p;n[10]!==s||n[11]!==r.capabilities?(p=s&&r.capabilities&&r.capabilities.length>0&&g.jsx("div",{className:"md:hidden flex items-center gap-1.5 ml-auto",children:r.capabilities.map(l3)}),n[10]=s,n[11]=r.capabilities,n[12]=p):p=n[12];let h;n[13]!==s||n[14]!==a?(h=a&&!s&&g.jsx(Jt,{className:"w-4 h-4 text-foreground ml-auto"}),n[13]=s,n[14]=a,n[15]=h):h=n[15];let m;n[16]!==s||n[17]!==a?(m=a&&s&&g.jsx(Jt,{className:"w-4 h-4 text-foreground ml-2 shrink-0"}),n[16]=s,n[17]=a,n[18]=m):m=n[18];let _;return n[19]!==o||n[20]!==l||n[21]!==d||n[22]!==f||n[23]!==p||n[24]!==h||n[25]!==m?(_=g.jsxs("div",{className:o,onMouseEnter:l,children:[d,f,p,h,m]}),n[19]=o,n[20]=l,n[21]=d,n[22]=f,n[23]=p,n[24]=h,n[25]=m,n[26]=_):_=n[26],_});function u3(e){const t=X.c(9),{model:n}=e;if(!n){let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=g.jsx("span",{className:"text-sm text-muted-foreground",children:"Select model"}),t[0]=s):s=t[0],s}let r;t[1]!==n.logo||t[2]!==n.name?(r=n.logo&&g.jsx("img",{src:n.logo,className:"w-5 h-5 shrink-0 rounded-sm",alt:n.name}),t[1]=n.logo,t[2]=n.name,t[3]=r):r=t[3];let i;t[4]!==n.name?(i=g.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground transition-colors truncate min-w-0 max-w-[200px] hidden sm:inline-block",children:n.name}),t[4]=n.name,t[5]=i):i=t[5];let a;return t[6]!==r||t[7]!==i?(a=g.jsxs("div",{className:"flex items-center gap-2 min-w-0 max-w-full",children:[r,i]}),t[6]=r,t[7]=i,t[8]=a):a=t[8],a}function V3(e){const t=X.c(57),{selectedModel:n,onModelChange:r,variant:i,className:a,placeholder:s}=e,u=i===void 0?"borderless":i,o=s===void 0?"Select model":s,[l,d]=V.useState(!1),[f,p]=V.useState(null),[h,m]=V.useState(!1),_=r3();let y;t[0]!==_||t[1]!==n?(y=n?_.find(le=>le.id===n.id&&le.connectionId===n.connectionId)?.id:void 0,t[0]=_,t[1]=n,t[2]=y):y=t[2];const T=y;let S;if(t[3]!==_||t[4]!==T){let le;t[6]!==T?(le=ce=>ce.id===T,t[6]=T,t[7]=le):le=t[7],S=_.find(le),t[3]=_,t[4]=T,t[5]=S}else S=t[5];const b=S;let w;t[8]!==_||t[9]!==r?(w=le=>{const ce=_.find(_e=>_e.id===le);ce&&(r({id:ce.id,connectionId:ce.connectionId,provider:ce.provider??void 0}),d(!1))},t[8]=_,t[9]=r,t[10]=w):w=t[10];const O=w;if(_.length===0)return null;const I=T||"",P=u==="borderless"&&"md:border-none";let H;t[11]!==a||t[12]!==P?(H=he("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 max-w-full",P,a),t[11]=a,t[12]=P,t[13]=H):H=t[13];let q;t[14]!==b?(q=g.jsx(u3,{model:b}),t[14]=b,t[15]=q):q=t[15];let N;t[16]!==o||t[17]!==q?(N=g.jsx(Lc,{placeholder:o,className:"min-w-0 max-w-full",children:q}),t[16]=o,t[17]=q,t[18]=N):N=t[18];let F;t[19]!==N||t[20]!==H?(F=g.jsx(Dc,{size:"sm",className:H,children:N}),t[19]=N,t[20]=H,t[21]=F):F=t[21];let v;t[22]!==h?(v=()=>m(!h),t[22]=h,t[23]=v):v=t[23];const W=h?"text-foreground":"text-muted-foreground";let z;t[24]!==W?(z=he("w-5 h-5 transition-colors",W),t[24]=W,t[25]=z):z=t[25];let U;t[26]!==z?(U=g.jsx(Wc,{className:z}),t[26]=z,t[27]=U):U=t[27];let Z;t[28]!==v||t[29]!==U?(Z=g.jsx("button",{type:"button",onClick:v,className:"md:hidden flex items-center justify-center h-8 w-8 rounded-lg hover:bg-accent transition-colors","aria-label":"Toggle model info",children:U}),t[28]=v,t[29]=U,t[30]=Z):Z=t[30];let ne;if(t[31]!==O||t[32]!==_||t[33]!==T||t[34]!==h){let le;t[36]!==O||t[37]!==T||t[38]!==h?(le=ce=>g.jsxs("div",{onClick:()=>O(ce.id),className:he("rounded-lg mb-1",ce.id===T&&"bg-accent"),children:[g.jsx(s3,{model:ce,onHover:p,isSelected:ce.id===T,hasExpandedInfo:h}),h&&g.jsx("div",{className:"md:hidden",children:g.jsx(lu,{model:ce,compact:!0})})]},ce.id),t[36]=O,t[37]=T,t[38]=h,t[39]=le):le=t[39],ne=_.map(le),t[31]=O,t[32]=_,t[33]=T,t[34]=h,t[35]=ne}else ne=t[35];let oe;t[40]!==ne?(oe=g.jsx("div",{className:"flex-1 overflow-y-auto px-0.5 md:border-r",children:ne}),t[40]=ne,t[41]=oe):oe=t[41];const xe=f||b||null;let k;t[42]!==xe?(k=g.jsx("div",{className:"hidden md:block md:w-[300px] p-3",children:g.jsx(lu,{model:xe})}),t[42]=xe,t[43]=k):k=t[43];let ue;t[44]!==oe||t[45]!==k?(ue=g.jsxs("div",{className:"flex flex-col md:flex-row h-[350px]",children:[oe,k]}),t[44]=oe,t[45]=k,t[46]=ue):ue=t[46];let be;t[47]!==o||t[48]!==Z||t[49]!==ue?(be=g.jsx(vc,{title:o,className:"w-full md:w-auto md:min-w-[600px] [&_button[aria-label='Scroll down']]:!hidden [&_button[aria-label='Scroll up']]:!hidden",headerActions:Z,children:ue}),t[47]=o,t[48]=Z,t[49]=ue,t[50]=be):be=t[50];let C;return t[51]!==O||t[52]!==l||t[53]!==F||t[54]!==be||t[55]!==I?(C=g.jsxs(Pc,{open:l,onOpenChange:d,value:I,onValueChange:O,children:[F,be]}),t[51]=O,t[52]=l,t[53]=F,t[54]=be,t[55]=I,t[56]=C):C=t[56],C}function o3(e){return g.jsx(sc,{capability:e},e)}function l3(e){return g.jsx(sc,{capability:e},e)}function c3({messageCount:e,sentinelRef:t}){const n=V.useRef(e),r=V.useRef(0);e>n.current&&r.current!==e&&queueMicrotask(()=>{t.current?.scrollIntoView({behavior:"smooth",block:"start"}),r.current=e}),n.current=e}function cu(e,t){const n=V.Children.toArray(e);for(const r of n)if(V.isValidElement(r)&&r.type===t)return r;return null}function d3(e){const t=X.c(5),{className:n,children:r}=e;let i;t[0]!==n?(i=he("flex flex-col h-full w-full bg-sidebar transform-[translateZ(0)]",n),t[0]=n,t[1]=i):i=t[1];let a;return t[2]!==r||t[3]!==i?(a=g.jsx("div",{className:i,children:r}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function f3(e){const t=X.c(11),{children:n}=e;let r;t[0]!==n?(r=cu(n,uc),t[0]=n,t[1]=r):r=t[1];const i=r;let a;t[2]!==n?(a=cu(n,oc),t[2]=n,t[3]=a):a=t[3];const s=a,u=i?.props.children;let o;t[4]!==u?(o=g.jsx("div",{className:"flex items-center gap-2",children:u}),t[4]=u,t[5]=o):o=t[5];const l=s?.props.children;let d;t[6]!==l?(d=g.jsx("div",{className:"flex items-center gap-1",children:l}),t[6]=l,t[7]=d):d=t[7];let f;return t[8]!==o||t[9]!==d?(f=g.jsxs("div",{className:"flex h-12 items-center justify-between border-b border-border px-4 flex-none",children:[o,d]}),t[8]=o,t[9]=d,t[10]=f):f=t[10],f}function uc(e){const t=X.c(2),{children:n}=e;let r;return t[0]!==n?(r=g.jsx(g.Fragment,{children:n}),t[0]=n,t[1]=r):r=t[1],r}function oc(e){const t=X.c(2),{children:n}=e;let r;return t[0]!==n?(r=g.jsx(g.Fragment,{children:n}),t[0]=n,t[1]=r):r=t[1],r}function h3(e){const t=X.c(5),{children:n,className:r}=e;let i;t[0]!==r?(i=he("flex-1 min-h-0 overflow-y-auto",r),t[0]=r,t[1]=i):i=t[1];let a;return t[2]!==n||t[3]!==i?(a=g.jsx("div",{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function p3(e){const t=X.c(2),{children:n}=e;let r;return t[0]!==n?(r=g.jsx("div",{className:"h-full w-full flex items-center justify-center max-w-2xl mx-auto",children:n}),t[0]=n,t[1]=r):r=t[1],r}function m3(e){const t=X.c(12),{messages:n,status:r,minHeightOffset:i}=e,a=i===void 0?240:i,s=V.useRef(null);let u;t[0]!==n.length?(u={messageCount:n.length,sentinelRef:s},t[0]=n.length,t[1]=u):u=t[1],c3(u);let o;if(t[2]!==n||t[3]!==r){let f;t[5]!==n.length||t[6]!==r?(f=(p,h)=>p.role==="user"?g.jsx(t3,{message:p},p.id):p.role==="assistant"?g.jsx(qx,{message:p,status:h===n.length-1?r:void 0},p.id):null,t[5]=n.length,t[6]=r,t[7]=f):f=t[7],o=n.map(f),t[2]=n,t[3]=r,t[4]=o}else o=t[4];let l;t[8]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsx(ac,{children:g.jsx("div",{ref:s,className:"h-0"})}),t[8]=l):l=t[8];let d;return t[9]!==a||t[10]!==o?(d=g.jsxs(Gx,{minHeightOffset:a,children:[o,l]}),t[9]=a,t[10]=o,t[11]=d):d=t[11],d}function g3(e){const t=X.c(3),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=he("flex-none w-full mx-auto p-2","max-w-2xl min-w-0"),t[0]=r):r=t[0];let i;return t[1]!==n?(i=g.jsx("div",{className:r,children:n}),t[1]=n,t[2]=i):i=t[2],i}function xa(e){const t=X.c(24),{title:n,description:r,icon:i,variant:a,onDismiss:s,children:u}=e,o=a===void 0?"default":a;let l,d,f,p,h;if(t[0]!==u||t[1]!==r||t[2]!==i||t[3]!==n||t[4]!==o){const b={default:{container:"border-muted-foreground/30 bg-muted/50 hover:bg-muted transition-colors",icon:"text-muted-foreground",title:"text-muted-foreground",description:"text-muted-foreground/70"},danger:{container:"border-destructive/30 bg-destructive/5",icon:"text-destructive",title:"text-destructive font-medium",description:"text-muted-foreground"},warning:{container:"border-amber-500/30 bg-amber-500/5",icon:"text-amber-600 dark:text-amber-500",title:"text-amber-600 dark:text-amber-500 font-medium",description:"text-muted-foreground"}}[o];p=he("flex items-start gap-2 px-3 py-2.5 rounded-lg border border-dashed text-sm w-full",b.container),h=i&&g.jsx("div",{className:he("mt-0.5 shrink-0",b.icon),children:i}),l="flex-1 min-w-0",d=n&&g.jsx("div",{className:he("text-xs mb-1",b.title),children:n}),f=r&&g.jsx("div",{className:he("text-xs line-clamp-2",b.description,u?"mb-2":""),children:r}),t[0]=u,t[1]=r,t[2]=i,t[3]=n,t[4]=o,t[5]=l,t[6]=d,t[7]=f,t[8]=p,t[9]=h}else l=t[5],d=t[6],f=t[7],p=t[8],h=t[9];let m;t[10]!==u?(m=u&&g.jsx("div",{className:"flex gap-2",children:u}),t[10]=u,t[11]=m):m=t[11];let _;t[12]!==l||t[13]!==d||t[14]!==f||t[15]!==m?(_=g.jsxs("div",{className:l,children:[d,f,m]}),t[12]=l,t[13]=d,t[14]=f,t[15]=m,t[16]=_):_=t[16];let y;t[17]!==s?(y=s&&g.jsx("button",{type:"button",onClick:s,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0",title:"Dismiss",children:g.jsx(Nc,{size:14})}),t[17]=s,t[18]=y):y=t[18];let T;return t[19]!==p||t[20]!==h||t[21]!==_||t[22]!==y?(T=g.jsxs("div",{className:p,children:[h,_,y]}),t[19]=p,t[20]=h,t[21]=_,t[22]=y,t[23]=T):T=t[23],T}function E3(e){const t=X.c(10),{branchContext:n,clearBranchContext:r,onGoToOriginalMessage:i,setInputValue:a}=e;if(!n)return null;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=g.jsx(gu,{size:14}),t[0]=s):s=t[0];let u;t[1]!==r||t[2]!==a?(u=()=>{r(),a("")},t[1]=r,t[2]=a,t[3]=u):u=t[3];let o;t[4]!==i?(o=g.jsx(it,{size:"sm",variant:"outline",onClick:i,className:"h-7 text-xs",children:"View original"}),t[4]=i,t[5]=o):o=t[5];let l;return t[6]!==n.originalMessageText||t[7]!==u||t[8]!==o?(l=g.jsx(xa,{variant:"default",title:"Editing message (click to view original)",description:n.originalMessageText,icon:s,onDismiss:u,children:o}),t[6]=n.originalMessageText,t[7]=u,t[8]=o,t[9]=l):l=t[9],l}function b3(e){const t=X.c(8),{error:n,onFixInChat:r,onDismiss:i}=e;if(!n)return null;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(pu,{size:16}),t[0]=a):a=t[0];let s;t[1]!==r?(s=g.jsx(it,{size:"sm",variant:"outline",onClick:r,className:"h-7 text-xs",children:"Fix in chat"}),t[1]=r,t[2]=s):s=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(it,{size:"sm",variant:"outline",disabled:!0,className:"h-7 text-xs",children:"Report"}),t[3]=u):u=t[3];let o;return t[4]!==n.message||t[5]!==i||t[6]!==s?(o=g.jsxs(xa,{variant:"danger",title:"Error occurred",description:n.message,icon:a,onDismiss:i,children:[s,u]}),t[4]=n.message,t[5]=i,t[6]=s,t[7]=o):o=t[7],o}function T3(e){const t=X.c(7),{finishReason:n,onContinue:r,onDismiss:i}=e;if(!n||n==="stop")return null;const s=x3(n);let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(Sc,{size:16}),t[0]=u):u=t[0];let o;t[1]!==r?(o=g.jsx(it,{size:"sm",variant:"outline",onClick:r,className:"h-7 text-xs",children:"Continue"}),t[1]=r,t[2]=o):o=t[2];let l;return t[3]!==i||t[4]!==s||t[5]!==o?(l=g.jsx(xa,{variant:"warning",title:"Response incomplete",description:s,icon:u,onDismiss:i,children:o}),t[3]=i,t[4]=s,t[5]=o,t[6]=l):l=t[6],l}function x3(e){switch(e){case"length":return"Response reached the model's output limit. Different models have different limits. Try switching models or asking it to continue.";case"content-filter":return"Response was filtered due to content policy.";case"tool-calls":return"Response paused after tool execution to prevent infinite loops and save costs. Click continue to keep working.";default:return`Response stopped unexpectedly: ${e}`}}const W3=Object.assign(d3,{Header:Object.assign(f3,{Left:uc,Right:oc}),Main:h3,Messages:m3,EmptyState:p3,Footer:g3,Input:ah,BranchPreview:E3,ErrorBanner:b3,FinishReasonWarning:T3,Provider:nh});export{W3 as C,q3 as I,V3 as M,Bx as U,j3 as a,r3 as b,Y3 as c,z3 as d,ih as u};