@phosart/devtool 0.3.25 → 0.3.26

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 (172) hide show
  1. package/build/client/editor/_app/immutable/assets/{0.DaZGHOkp.css → 0.C9VggiS5.css} +1 -1
  2. package/build/client/editor/_app/immutable/assets/0.C9VggiS5.css.br +0 -0
  3. package/build/client/editor/_app/immutable/assets/{0.DaZGHOkp.css.gz → 0.C9VggiS5.css.gz} +0 -0
  4. package/build/client/editor/_app/immutable/chunks/{qIUi1isg.js → BFhDcAmE.js} +1 -1
  5. package/build/client/editor/_app/immutable/chunks/BFhDcAmE.js.br +0 -0
  6. package/build/client/editor/_app/immutable/chunks/BFhDcAmE.js.gz +0 -0
  7. package/build/client/editor/_app/immutable/chunks/{3JClJGUz.js → BIeGoGN3.js} +1 -1
  8. package/build/client/editor/_app/immutable/chunks/BIeGoGN3.js.br +0 -0
  9. package/build/client/editor/_app/immutable/chunks/BIeGoGN3.js.gz +0 -0
  10. package/build/client/editor/_app/immutable/chunks/{DQ4ugLD6.js → Bqaaz7vq.js} +1 -1
  11. package/build/client/editor/_app/immutable/chunks/Bqaaz7vq.js.br +0 -0
  12. package/build/client/editor/_app/immutable/chunks/Bqaaz7vq.js.gz +0 -0
  13. package/build/client/editor/_app/immutable/chunks/{DjFnIVPp.js → BsAlPP13.js} +1 -1
  14. package/build/client/editor/_app/immutable/chunks/BsAlPP13.js.br +0 -0
  15. package/build/client/editor/_app/immutable/chunks/BsAlPP13.js.gz +0 -0
  16. package/build/client/editor/_app/immutable/chunks/{hekZe9JU.js → Bv0tjW4d.js} +1 -1
  17. package/build/client/editor/_app/immutable/chunks/Bv0tjW4d.js.br +0 -0
  18. package/build/client/editor/_app/immutable/chunks/Bv0tjW4d.js.gz +0 -0
  19. package/build/client/editor/_app/immutable/chunks/{Ch3GTA_p.js → C-KDNPDm.js} +2 -2
  20. package/build/client/editor/_app/immutable/chunks/C-KDNPDm.js.br +0 -0
  21. package/build/client/editor/_app/immutable/chunks/C-KDNPDm.js.gz +0 -0
  22. package/build/client/editor/_app/immutable/chunks/{CoU8N9A0.js → C1ByJA7V.js} +1 -1
  23. package/build/client/editor/_app/immutable/chunks/C1ByJA7V.js.br +0 -0
  24. package/build/client/editor/_app/immutable/chunks/C1ByJA7V.js.gz +0 -0
  25. package/build/client/editor/_app/immutable/chunks/{gmKqw07u.js → C5QJkHpj.js} +1 -1
  26. package/build/client/editor/_app/immutable/chunks/C5QJkHpj.js.br +0 -0
  27. package/build/client/editor/_app/immutable/chunks/C5QJkHpj.js.gz +0 -0
  28. package/build/client/editor/_app/immutable/chunks/{CyMb4fBe.js → CrEaMP_S.js} +1 -1
  29. package/build/client/editor/_app/immutable/chunks/CrEaMP_S.js.br +0 -0
  30. package/build/client/editor/_app/immutable/chunks/CrEaMP_S.js.gz +0 -0
  31. package/build/client/editor/_app/immutable/chunks/{BgHCMG0A.js → D3beoBgN.js} +1 -1
  32. package/build/client/editor/_app/immutable/chunks/D3beoBgN.js.br +0 -0
  33. package/build/client/editor/_app/immutable/chunks/D3beoBgN.js.gz +0 -0
  34. package/build/client/editor/_app/immutable/chunks/{Dh0COuiE.js → DAwIjc0G.js} +1 -1
  35. package/build/client/editor/_app/immutable/chunks/DAwIjc0G.js.br +0 -0
  36. package/build/client/editor/_app/immutable/chunks/DAwIjc0G.js.gz +0 -0
  37. package/build/client/editor/_app/immutable/chunks/{BmHxz2Ar.js → DFiNRRx4.js} +1 -1
  38. package/build/client/editor/_app/immutable/chunks/DFiNRRx4.js.br +0 -0
  39. package/build/client/editor/_app/immutable/chunks/DFiNRRx4.js.gz +0 -0
  40. package/build/client/editor/_app/immutable/chunks/{Wgnlm9u_.js → DJV3rGyD.js} +1 -1
  41. package/build/client/editor/_app/immutable/chunks/DJV3rGyD.js.br +0 -0
  42. package/build/client/editor/_app/immutable/chunks/DJV3rGyD.js.gz +0 -0
  43. package/build/client/editor/_app/immutable/chunks/DU96-whN.js +3 -0
  44. package/build/client/editor/_app/immutable/chunks/DU96-whN.js.br +0 -0
  45. package/build/client/editor/_app/immutable/chunks/DU96-whN.js.gz +0 -0
  46. package/build/client/editor/_app/immutable/chunks/{Bha_IRQA.js → DmfCqOHO.js} +1 -1
  47. package/build/client/editor/_app/immutable/chunks/DmfCqOHO.js.br +0 -0
  48. package/build/client/editor/_app/immutable/chunks/DmfCqOHO.js.gz +0 -0
  49. package/build/client/editor/_app/immutable/chunks/{B0Gppwyp.js → VJxQahu8.js} +1 -1
  50. package/build/client/editor/_app/immutable/chunks/VJxQahu8.js.br +0 -0
  51. package/build/client/editor/_app/immutable/chunks/{B0Gppwyp.js.gz → VJxQahu8.js.gz} +0 -0
  52. package/build/client/editor/_app/immutable/chunks/{Cg8PdHAC.js → YI4sMSJr.js} +1 -1
  53. package/build/client/editor/_app/immutable/chunks/YI4sMSJr.js.br +0 -0
  54. package/build/client/editor/_app/immutable/chunks/YI4sMSJr.js.gz +0 -0
  55. package/build/client/editor/_app/immutable/chunks/{DhnqYYBh.js → lVsnUgwN.js} +1 -1
  56. package/build/client/editor/_app/immutable/chunks/lVsnUgwN.js.br +0 -0
  57. package/build/client/editor/_app/immutable/chunks/lVsnUgwN.js.gz +0 -0
  58. package/build/client/editor/_app/immutable/entry/{app.Dy72BapU.js → app.sZHQL12j.js} +2 -2
  59. package/build/client/editor/_app/immutable/entry/app.sZHQL12j.js.br +0 -0
  60. package/build/client/editor/_app/immutable/entry/app.sZHQL12j.js.gz +0 -0
  61. package/build/client/editor/_app/immutable/entry/start.VkGOCpjk.js +1 -0
  62. package/build/client/editor/_app/immutable/entry/start.VkGOCpjk.js.br +2 -0
  63. package/build/client/editor/_app/immutable/entry/start.VkGOCpjk.js.gz +0 -0
  64. package/build/client/editor/_app/immutable/nodes/{0.DmLj5nSl.js → 0.CjvxqX0r.js} +3 -3
  65. package/build/client/editor/_app/immutable/nodes/0.CjvxqX0r.js.br +0 -0
  66. package/build/client/editor/_app/immutable/nodes/0.CjvxqX0r.js.gz +0 -0
  67. package/build/client/editor/_app/immutable/nodes/{1.BUbMZCej.js → 1.DiyLLiug.js} +1 -1
  68. package/build/client/editor/_app/immutable/nodes/1.DiyLLiug.js.br +2 -0
  69. package/build/client/editor/_app/immutable/nodes/1.DiyLLiug.js.gz +0 -0
  70. package/build/client/editor/_app/immutable/nodes/{2.Bv5U8AsI.js → 2.dMWQiePn.js} +1 -1
  71. package/build/client/editor/_app/immutable/nodes/2.dMWQiePn.js.br +0 -0
  72. package/build/client/editor/_app/immutable/nodes/2.dMWQiePn.js.gz +0 -0
  73. package/build/client/editor/_app/immutable/nodes/{3.a2wl3Kq5.js → 3.DycTxUNC.js} +1 -1
  74. package/build/client/editor/_app/immutable/nodes/3.DycTxUNC.js.br +0 -0
  75. package/build/client/editor/_app/immutable/nodes/3.DycTxUNC.js.gz +0 -0
  76. package/build/client/editor/_app/immutable/nodes/{4.Js_PqtPF.js → 4.DH_Eaa-P.js} +1 -1
  77. package/build/client/editor/_app/immutable/nodes/4.DH_Eaa-P.js.br +0 -0
  78. package/build/client/editor/_app/immutable/nodes/4.DH_Eaa-P.js.gz +0 -0
  79. package/build/client/editor/_app/immutable/nodes/{5.BcaUQB_y.js → 5.BJLZNc9H.js} +1 -1
  80. package/build/client/editor/_app/immutable/nodes/5.BJLZNc9H.js.br +0 -0
  81. package/build/client/editor/_app/immutable/nodes/5.BJLZNc9H.js.gz +0 -0
  82. package/build/client/editor/_app/immutable/nodes/6.CieQ7hA_.js +1 -0
  83. package/build/client/editor/_app/immutable/nodes/6.CieQ7hA_.js.br +0 -0
  84. package/build/client/editor/_app/immutable/nodes/6.CieQ7hA_.js.gz +0 -0
  85. package/build/client/editor/_app/immutable/nodes/{7.Cqg-ZJCo.js → 7.BWrer629.js} +1 -1
  86. package/build/client/editor/_app/immutable/nodes/7.BWrer629.js.br +0 -0
  87. package/build/client/editor/_app/immutable/nodes/7.BWrer629.js.gz +0 -0
  88. package/build/client/editor/_app/version.json +1 -1
  89. package/build/client/editor/_app/version.json.br +0 -0
  90. package/build/client/editor/_app/version.json.gz +0 -0
  91. package/build/server/chunks/{0-BTaGHmb0.js → 0-_lQ7K7E-.js} +4 -4
  92. package/build/server/chunks/{0-BTaGHmb0.js.map → 0-_lQ7K7E-.js.map} +1 -1
  93. package/build/server/chunks/{1-u32T-zwr.js → 1-CYiL-KnA.js} +2 -2
  94. package/build/server/chunks/{1-u32T-zwr.js.map → 1-CYiL-KnA.js.map} +1 -1
  95. package/build/server/chunks/{2-Da_zM3XW.js → 2-BWzCcRzj.js} +2 -2
  96. package/build/server/chunks/{2-Da_zM3XW.js.map → 2-BWzCcRzj.js.map} +1 -1
  97. package/build/server/chunks/{3-bm9jnFd7.js → 3-FP8ZLNzY.js} +2 -2
  98. package/build/server/chunks/{3-bm9jnFd7.js.map → 3-FP8ZLNzY.js.map} +1 -1
  99. package/build/server/chunks/{4-BgouY8Ub.js → 4-BxYlvl82.js} +2 -2
  100. package/build/server/chunks/{4-BgouY8Ub.js.map → 4-BxYlvl82.js.map} +1 -1
  101. package/build/server/chunks/{5-CdcURfj2.js → 5-ZEJlxG3H.js} +2 -2
  102. package/build/server/chunks/{5-CdcURfj2.js.map → 5-ZEJlxG3H.js.map} +1 -1
  103. package/build/server/chunks/{6-CNiKvZEp.js → 6-CuyQrCXm.js} +2 -2
  104. package/build/server/chunks/{6-CNiKvZEp.js.map → 6-CuyQrCXm.js.map} +1 -1
  105. package/build/server/chunks/{7-DckbEPBx.js → 7-BMPZ-uQS.js} +2 -2
  106. package/build/server/chunks/{7-DckbEPBx.js.map → 7-BMPZ-uQS.js.map} +1 -1
  107. package/build/server/chunks/{_layout.svelte-Bn3lP2wt.js → _layout.svelte-DseJo1ON.js} +2 -2
  108. package/build/server/chunks/{_layout.svelte-Bn3lP2wt.js.map → _layout.svelte-DseJo1ON.js.map} +1 -1
  109. package/build/server/index.js +1 -1
  110. package/build/server/index.js.map +1 -1
  111. package/build/server/manifest.js +9 -9
  112. package/build/server/manifest.js.map +1 -1
  113. package/package.json +2 -2
  114. package/build/client/editor/_app/immutable/assets/0.DaZGHOkp.css.br +0 -0
  115. package/build/client/editor/_app/immutable/chunks/3JClJGUz.js.br +0 -0
  116. package/build/client/editor/_app/immutable/chunks/3JClJGUz.js.gz +0 -0
  117. package/build/client/editor/_app/immutable/chunks/B0Gppwyp.js.br +0 -0
  118. package/build/client/editor/_app/immutable/chunks/BgHCMG0A.js.br +0 -0
  119. package/build/client/editor/_app/immutable/chunks/BgHCMG0A.js.gz +0 -0
  120. package/build/client/editor/_app/immutable/chunks/Bha_IRQA.js.br +0 -0
  121. package/build/client/editor/_app/immutable/chunks/Bha_IRQA.js.gz +0 -0
  122. package/build/client/editor/_app/immutable/chunks/BmHxz2Ar.js.br +0 -0
  123. package/build/client/editor/_app/immutable/chunks/BmHxz2Ar.js.gz +0 -0
  124. package/build/client/editor/_app/immutable/chunks/CRTGkQGy.js +0 -3
  125. package/build/client/editor/_app/immutable/chunks/CRTGkQGy.js.br +0 -0
  126. package/build/client/editor/_app/immutable/chunks/CRTGkQGy.js.gz +0 -0
  127. package/build/client/editor/_app/immutable/chunks/Cg8PdHAC.js.br +0 -0
  128. package/build/client/editor/_app/immutable/chunks/Cg8PdHAC.js.gz +0 -0
  129. package/build/client/editor/_app/immutable/chunks/Ch3GTA_p.js.br +0 -0
  130. package/build/client/editor/_app/immutable/chunks/Ch3GTA_p.js.gz +0 -0
  131. package/build/client/editor/_app/immutable/chunks/CoU8N9A0.js.br +0 -2
  132. package/build/client/editor/_app/immutable/chunks/CoU8N9A0.js.gz +0 -0
  133. package/build/client/editor/_app/immutable/chunks/CyMb4fBe.js.br +0 -0
  134. package/build/client/editor/_app/immutable/chunks/CyMb4fBe.js.gz +0 -0
  135. package/build/client/editor/_app/immutable/chunks/DQ4ugLD6.js.br +0 -0
  136. package/build/client/editor/_app/immutable/chunks/DQ4ugLD6.js.gz +0 -0
  137. package/build/client/editor/_app/immutable/chunks/Dh0COuiE.js.br +0 -0
  138. package/build/client/editor/_app/immutable/chunks/Dh0COuiE.js.gz +0 -0
  139. package/build/client/editor/_app/immutable/chunks/DhnqYYBh.js.br +0 -0
  140. package/build/client/editor/_app/immutable/chunks/DhnqYYBh.js.gz +0 -0
  141. package/build/client/editor/_app/immutable/chunks/DjFnIVPp.js.br +0 -0
  142. package/build/client/editor/_app/immutable/chunks/DjFnIVPp.js.gz +0 -0
  143. package/build/client/editor/_app/immutable/chunks/Wgnlm9u_.js.br +0 -0
  144. package/build/client/editor/_app/immutable/chunks/Wgnlm9u_.js.gz +0 -0
  145. package/build/client/editor/_app/immutable/chunks/gmKqw07u.js.br +0 -0
  146. package/build/client/editor/_app/immutable/chunks/gmKqw07u.js.gz +0 -0
  147. package/build/client/editor/_app/immutable/chunks/hekZe9JU.js.br +0 -0
  148. package/build/client/editor/_app/immutable/chunks/hekZe9JU.js.gz +0 -0
  149. package/build/client/editor/_app/immutable/chunks/qIUi1isg.js.br +0 -0
  150. package/build/client/editor/_app/immutable/chunks/qIUi1isg.js.gz +0 -0
  151. package/build/client/editor/_app/immutable/entry/app.Dy72BapU.js.br +0 -0
  152. package/build/client/editor/_app/immutable/entry/app.Dy72BapU.js.gz +0 -0
  153. package/build/client/editor/_app/immutable/entry/start.CD61dcil.js +0 -1
  154. package/build/client/editor/_app/immutable/entry/start.CD61dcil.js.br +0 -2
  155. package/build/client/editor/_app/immutable/entry/start.CD61dcil.js.gz +0 -0
  156. package/build/client/editor/_app/immutable/nodes/0.DmLj5nSl.js.br +0 -0
  157. package/build/client/editor/_app/immutable/nodes/0.DmLj5nSl.js.gz +0 -0
  158. package/build/client/editor/_app/immutable/nodes/1.BUbMZCej.js.br +0 -0
  159. package/build/client/editor/_app/immutable/nodes/1.BUbMZCej.js.gz +0 -0
  160. package/build/client/editor/_app/immutable/nodes/2.Bv5U8AsI.js.br +0 -0
  161. package/build/client/editor/_app/immutable/nodes/2.Bv5U8AsI.js.gz +0 -0
  162. package/build/client/editor/_app/immutable/nodes/3.a2wl3Kq5.js.br +0 -0
  163. package/build/client/editor/_app/immutable/nodes/3.a2wl3Kq5.js.gz +0 -0
  164. package/build/client/editor/_app/immutable/nodes/4.Js_PqtPF.js.br +0 -0
  165. package/build/client/editor/_app/immutable/nodes/4.Js_PqtPF.js.gz +0 -0
  166. package/build/client/editor/_app/immutable/nodes/5.BcaUQB_y.js.br +0 -0
  167. package/build/client/editor/_app/immutable/nodes/5.BcaUQB_y.js.gz +0 -0
  168. package/build/client/editor/_app/immutable/nodes/6.ovCRsMj6.js +0 -1
  169. package/build/client/editor/_app/immutable/nodes/6.ovCRsMj6.js.br +0 -0
  170. package/build/client/editor/_app/immutable/nodes/6.ovCRsMj6.js.gz +0 -0
  171. package/build/client/editor/_app/immutable/nodes/7.Cqg-ZJCo.js.br +0 -0
  172. package/build/client/editor/_app/immutable/nodes/7.Cqg-ZJCo.js.gz +0 -0
@@ -1 +1 @@
1
- import{c as R,a as o,d as _e,b as oe,f as N,t as Q,s as W,p as be}from"../chunks/CpBqNZvJ.js";import{p as H,f as G,n as L,a as Z,c as f,r as u,t as I,s as z,g as e,u as v,b as xe,i as le,y as Pe,e as $e,$ as ke,d as q,h as J,x as ve}from"../chunks/BY45LdLb.js";import{s as Y,r as ee,i as V,p as Ee}from"../chunks/C54SSc0V.js";import{I as te,s as D,d as X,f as F,a as U,p as je,e as se,r as B,h as Se,g as Oe,i as Me,T as ie}from"../chunks/B0Gppwyp.js";import{g as ue,i as ge}from"../chunks/CRTGkQGy.js";import{C as ze}from"../chunks/Cg8PdHAC.js";import{C as Ne}from"../chunks/qIUi1isg.js";import{M as fe}from"../chunks/3JClJGUz.js";import{A as he}from"../chunks/BgHCMG0A.js";import{L as Ce,S as Ae,u as Te}from"../chunks/Bha_IRQA.js";import{O as K,i as me,c as Ge}from"../chunks/DhnqYYBh.js";import{E as Ie}from"../chunks/Dh0COuiE.js";import{E as Ve}from"../chunks/DjFnIVPp.js";const Re=!0;var qe=new Set(["$$slots","$$events","$$legacy"]);function Le(l,t){H(t,!0);let a=ee(t,qe);const s=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z"}],["path",{d:"M17 21v-2"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10"}],["path",{d:"M21 21v-2"}],["path",{d:"M3 5V3"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z"}],["path",{d:"M7 5V3"}]];te(l,Y({name:"cable"},()=>a,{get iconNode(){return s},children:(i,m)=>{var h=R(),E=G(h);D(E,()=>t.children??L),o(i,h)},$$slots:{default:!0}})),Z()}var Fe=new Set(["$$slots","$$events","$$legacy"]);function Be(l,t){H(t,!0);let a=ee(t,Fe);const s=[["path",{d:"M12 10v6"}],["path",{d:"M9 13h6"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}]];te(l,Y({name:"folder-plus"},()=>a,{get iconNode(){return s},children:(i,m)=>{var h=R(),E=G(h);D(E,()=>t.children??L),o(i,h)},$$slots:{default:!0}})),Z()}var He=new Set(["$$slots","$$events","$$legacy"]);function Ze(l,t){H(t,!0);let a=ee(t,He);const s=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}]];te(l,Y({name:"folder"},()=>a,{get iconNode(){return s},children:(i,m)=>{var h=R(),E=G(h);D(E,()=>t.children??L),o(i,h)},$$slots:{default:!0}})),Z()}var De=new Set(["$$slots","$$events","$$legacy"]);function Je(l,t){H(t,!0);let a=ee(t,De);const s=[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2"}]];te(l,Y({name:"images"},()=>a,{get iconNode(){return s},children:(i,m)=>{var h=R(),E=G(h);D(E,()=>t.children??L),o(i,h)},$$slots:{default:!0}})),Z()}function Ue(l){return l}function Ke(l,t,a){const s={};for(const i of l){const m=t(i);m in s?s[m]=Ue(s[m],i):s[m]=i}return s}var Qe=N('<div><!></div> <div class="nametag svelte-1s33icu"><span><!></span></div>',1),We=N('<a class="tile svelte-1s33icu"><!></a>'),Xe=N('<button class="tile svelte-1s33icu"><!></button>'),Ye=N('<span class="tile svelte-1s33icu"><!></span>');function et(l,t){const a=b=>{var r=Qe(),c=G(r),$=f(c);D($,()=>t.children),u(c);var g=z(c,2),_=f(g),P=f(_);{var j=w=>{var y=Q();I(()=>W(y,t.title)),o(w,y)},O=w=>{var y=R(),p=G(y);D(p,()=>t.title),o(w,y)};V(P,w=>{typeof t.title=="string"?w(j):w(O,-1)})}u(_),u(g),I(()=>F(c,1,`flex h-64 w-64 flex-wrap overflow-hidden rounded-2xl ${t.class??""??""}`,"svelte-1s33icu")),o(b,r)};var s=R(),i=G(s);{var m=b=>{var r=We(),c=f(r);a(c),u(r),I(()=>X(r,"href",t.href)),oe("click",r,function(...$){t.onclick?.apply(this,$)}),o(b,r)},h=b=>{var r=Xe(),c=f(r);a(c),u(r),oe("click",r,function(...$){t.onclick?.apply(this,$)}),o(b,r)},E=b=>{var r=Ye(),c=f(r);a(c),u(r),o(b,r)};V(i,b=>{t.href?b(m):t.onclick?b(h,1):b(E,-1)})}o(l,s)}_e(["click"]);function tt(l,t){if(!Array.isArray(l))throw new TypeError(`Expected an array, got ${typeof l}`);const{randomNumberGenerator:a=Math.random}={};if(typeof a!="function")throw new TypeError(`Expected randomNumberGenerator to be a function, got ${typeof a}`);for(let s=l.length-1;s>0;s--){const i=Math.floor(a()*(s+1));[l[s],l[i]]=[l[i],l[s]]}return l}function rt(l,t){if(!Array.isArray(l))throw new TypeError(`Expected an array, got ${typeof l}`);return tt([...l])}var ne=N('<div><div class="svelte-1iw7rpk"><!></div></div>'),at=N('<div class="preview svelte-1iw7rpk"><div><div class="svelte-1iw7rpk"><!></div></div> <!> <!> <!></div>');function lt(l,t){H(t,!0);const a=v(()=>rt(t.gallery.pieces).slice(0,4));var s=R(),i=G(s);{var m=h=>{const E=v(()=>e(a)[1]?"calc(var(--preview-size) / 2)":"var(--preview-size)"),b=v(()=>e(a)[2]?"calc(var(--preview-size) / 2)":"var(--preview-size)"),r=v(()=>e(a)[3]?"calc(var(--preview-size) / 2)":"var(--preview-size)"),c=v(()=>"calc(var(--preview-size) / 2)");var $=at(),g=f($);let _;var P=f(g),j=f(P);{let d=v(()=>e(a)[0].nsfw?"duration-300ms blur-sm transition-[filter] hover:blur-none hover:duration-[3s]":""),n=v(()=>({gallery:t.galleryPath,piece:e(a)[0].slug}));K(j,{get class(){return e(d)},get galleryPath(){return e(n)}})}u(P),u(g);var O=z(g,2);{var w=d=>{var n=ne();let S;var x=f(n),C=f(x);{let A=v(()=>e(a)[1].nsfw?"duration-300ms blur-sm transition-[filter] hover:blur-none hover:duration-[3s]":""),k=v(()=>({gallery:t.galleryPath,piece:e(a)[1].slug}));K(C,{get class(){return e(A)},get galleryPath(){return e(k)}})}u(x),u(n),I(()=>{U(n,`height: ${e(b)??""}; width: ${e(E)??""}`),S=F(n,1,"imgcontainer svelte-1iw7rpk",null,S,{square:e(E)===e(b)})}),o(d,n)};V(O,d=>{e(a)[1]&&d(w)})}var y=z(O,2);{var p=d=>{var n=ne();let S;var x=f(n),C=f(x);{let A=v(()=>e(a)[2].nsfw?"duration-300ms blur-sm transition-[filter] hover:blur-none hover:duration-[3s]":""),k=v(()=>({gallery:t.galleryPath,piece:e(a)[2].slug}));K(C,{get class(){return e(A)},get galleryPath(){return e(k)}})}u(x),u(n),I(()=>{U(n,`height: ${e(c)??""}; width: ${e(r)??""}`),S=F(n,1,"imgcontainer svelte-1iw7rpk",null,S,{square:e(r)===e(c)})}),o(d,n)};V(y,d=>{e(a)[2]&&d(p)})}var T=z(y,2);{var M=d=>{var n=ne();let S;var x=f(n),C=f(x);{let A=v(()=>e(a)[3].nsfw?"duration-300ms blur-sm transition-[filter] hover:blur-none hover:duration-[3s]":""),k=v(()=>({gallery:t.galleryPath,piece:e(a)[3].slug}));K(C,{get class(){return e(A)},get galleryPath(){return e(k)}})}u(x),u(n),I(()=>{U(n,`height: ${e(c)??""}; width: ${e(r)??""}`),S=F(n,1,"imgcontainer svelte-1iw7rpk",null,S,{square:e(r)===e(c)})}),o(d,n)};V(T,d=>{e(a)[3]&&d(M)})}u($),I(()=>{U($,`--preview-size: ${t.cssSize??""}`),U(g,`height: ${e(b)??""}; width: ${e(E)??""}`),_=F(g,1,"imgcontainer svelte-1iw7rpk",null,_,{square:e(E)===e(b)})}),o(h,$)};V(i,h=>{e(a)[0]&&h(m)})}o(l,s),Z()}var st=N('<div class="flex justify-center"><!></div>');function it(l,t){const a=Ee(t,"px",3,256);var s=st(),i=f(s);et(i,{get href(){return t.href},get title(){return t.name},children:(m,h)=>{lt(m,{get cssSize(){return`${a()??""}px`},get gallery(){return t.gallery},get galleryPath(){return t.galleryPath}})}}),u(s),o(l,s)}xe({query:""});function nt(l,t,...a){return l?je.go(l,t,{keys:a,threshold:.3}).map(s=>s.obj):t}function ye(l,t,...a){return l?Object.fromEntries(nt(l,Object.entries(t),...a.map(s=>([i,m])=>s(m,i)))):t}var ot=N("<a><!> <!></a>"),dt=N('<a class="btn flex items-center preset-outlined-surface-950-50 p-2"><!> </a>'),ct=N('<div><div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"><!> <!></div> <div class="mt-8 grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"></div></div>');function vt(l,t){H(t,!0);const a=v(()=>ye(t.search,Object.fromEntries(Object.entries(t.tree.structure).filter(r=>r[1].$type==="folder")),(r,c)=>c)),s=v(()=>ye(t.search,Object.fromEntries(Object.entries(t.tree.structure).filter(r=>r[1].$type==="gallery")),(r,c)=>c));var i=ct(),m=f(i),h=f(m);se(h,17,()=>Object.entries(e(a)),([r,c])=>r,(r,c)=>{var $=v(()=>le(e(c),2));let g=()=>e($)[0],_=()=>e($)[1];const P=v(()=>Object.keys(_().structure).length==0);var j=R(),O=G(j);{var w=y=>{var p=ot();let T;var M=f(p);Ze(M,{});var d=z(M),n=z(d);{var S=x=>{var C=Q(" (empty)");o(x,C)};V(n,x=>{e(P)&&x(S)})}u(p),I(x=>{T=F(p,1,"btn flex items-center preset-outlined-surface-950-50 p-2 whitespace-normal",null,T,{"font-extralight":e(P),"text-gray-500":e(P)}),X(p,"href",x),W(d,` ${g()??""}`)},[()=>B("/")+"?"+String(new URLSearchParams({path:[...t.path,g()].join("/")}))]),o(y,p)};V(O,y=>{(!e(P)||t.showEmpty)&&y(w)})}o(r,j)});var E=z(h,2);se(E,17,()=>Object.entries(e(s)),([r,c])=>r,(r,c)=>{var $=v(()=>le(e(c),2));let g=()=>e($)[0],_=()=>e($)[1];var P=R(),j=G(P);{var O=w=>{var y=dt(),p=f(y);Le(p,{});var T=z(p);u(y),I(M=>{X(y,"href",M),W(T,` ${g()??""}`)},[()=>B("/gallery/[...gallerypath]",{gallerypath:[...t.path,g()].join("/")})]),o(w,y)};V(j,w=>{_().$type==="gallery"&&!_().isBase&&w(O)})}o(r,P)}),u(m);var b=z(m,2);se(b,21,()=>Object.entries(e(s)),([r,c])=>r,(r,c)=>{var $=v(()=>le(e(c),2));let g=()=>e($)[0],_=()=>e($)[1];const P=v(()=>g().replace(/\.gallery$/,""));var j=R(),O=G(j);{var w=y=>{{let p=v(()=>[...t.path,g()].join("/")),T=v(()=>B("/gallery/[...gallerypath]",{gallerypath:[...t.path,g()].join("/")}));it(y,{get name(){return e(P)},get galleryPath(){return e(p)},get gallery(){return _().data},get href(){return e(T)}})}};V(O,y=>{_().$type==="gallery"&&_().isBase&&y(w)})}o(r,j)}),u(b),u(i),o(l,i),Z()}var ut=N('<div class="m-4"><!> <!></div>'),gt=N('<!> <div class="my-4"></div> <div class="flex items-center gap-x-3"><!> </div>',1),ft=N('<div class="m-4"><!> <!> <!></div>'),ht=N('<div class="mb-4 flex gap-x-1"><!> <!></div>'),mt=N("<button><!></button>"),yt=N('<div class="flex items-center gap-2"><div class="my-4 flex w-64 grow items-center gap-x-2 pr-4"><label><i class="fa-solid fa-search"></i></label> <div class="relative flex grow overflow-visible"><!></div> <!></div></div>'),_t=N('<!> <div class="absolute right-3 bottom-0"><!></div>',1);function Nt(l,t){const a=be();H(t,!0);const s=(g,_=L)=>{var P=ht(),j=f(P);fe(j,{title:"New Folder",onClose:()=>{q(i,"")},class:"preset-outlined-primary-50-950 bg-surface-300-700",icon:p=>{Be(p,{size:"8pt"})},children:(p,T=L)=>{var M=ut(),d=f(M);ie(d,{label:"Folder name",get value(){return e(i)},set value(S){q(i,S,!0)}});var n=z(d,2);{let S=v(()=>!e(i));he(n,{get disabled(){return e(S)},action:async()=>{await fetch(B("/api/folder/[...folderpath]",{folderpath:[..._(),e(i)].join("/")}),{method:"PATCH"}),await ge(),T()()},unstyled:!0,class:"btn w-full preset-filled-primary-500",children:(x,C)=>{ve();var A=Q("Create");o(x,A)},$$slots:{default:!0}})}u(M),o(p,M)},$$slots:{icon:!0,default:!0}});var O=z(j,2);fe(O,{title:"New Gallery",onClose:()=>{q(i,""),q(m,!1)},class:"preset-filled-primary-50-950",icon:p=>{Je(p,{size:"8pt"})},children:(p,T=L)=>{var M=ft(),d=f(M);ie(d,{label:"Gallery Name",get value(){return e(i)},set value(x){q(i,x,!0)}});var n=z(d,2);{let x=v(()=>!e(i));he(n,{get disabled(){return e(x)},action:async()=>{const C=[..._(),e(i)+".gallery"].join("/");let A=[];const k=t.data.galleries[e(r)];!e(m)&&k&&me(k)&&(A=await Ge(k.pieces,e(r),C)),await fetch(B("/api/gallery/[...gallerypath]/save",{gallerypath:C}),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e(m)?{$extends:[]}:{pieces:A})}),await ge(),T()()},unstyled:!0,class:"btn w-full preset-filled-primary-500",children:(C,A)=>{ve();var k=Q("Create");o(C,k)},$$slots:{default:!0}})}var S=z(n,2);ze(S,{title:"Advanced",class:"mt-4",children:(x,C)=>{var A=gt(),k=G(A);Ne(k,{label:"Is extended gallery",get checked(){return e(m)},set checked(re){q(m,re,!0)}});var de=z(k,4),ce=f(de);{let re=v(()=>Object.keys(t.data.galleries).filter(ae=>me(t.data.galleries[ae]))),we=v(()=>e(r)!==""&&!t.data.galleries[e(r)]?"Select a valid path":void 0);ie(ce,{label:"Copy From...",get disabled(){return e(m)},get options(){return e(re)},noReportValidation:!0,get validationError(){return e(we)},get value(){return e(r)},set value(ae){q(r,ae,!0)}})}var pe=z(ce);u(de),I(()=>W(pe,` ${t.data.galleries[e(r)]?"✅":"❌"}`)),o(x,A)},$$slots:{default:!0}}),u(M),o(p,M)},$$slots:{icon:!0,default:!0}}),u(P),o(g,P)};let i=J(""),m=J(!1),h=J(!1);const E=v(Te);Pe(()=>{t.data.redirectGallery&&Re&&window.location.hash!=="#stay"&&!window.localStorage.getItem("prefers-multigallery")&&ue(B(`/gallery/${t.data.redirectGallery}`))});let b=J(""),r=J("");function c(g){if(g.$type!=="folder")throw new Error("RIP");return g}function $(g,_){for(;_.length>0;)g=c(g.structure[_[0]]),_=_.slice(1);return g}Se("1uha8ag",g=>{$e(()=>{ke.title="Art Site Editor"})}),Ce(l,{title:"Galleries",breadcrumbs:!0,navRight:_=>{var P=yt(),j=f(P),O=f(j),w=z(O,2),y=f(w);{let T=v(()=>e(b)!==""&&!t.data.galleryPaths.includes(e(b))?"invalid path":void 0),M=v(()=>Ke(t.data.galleryPaths??[],d=>d));Ae(y,{get id(){return`${a}-search-box`},autoFocus:!0,class:"input h-8 w-0 grow",noReportValidation:!0,acceptSuggestionOnEnter:!0,get validationError(){return e(T)},get options(){return e(M)},onSelect:d=>{t.data.galleryPaths.includes(d)&&ue(B("/gallery/[...gallerypath]",{gallerypath:d}))},get search(){return e(b)},set search(d){q(b,d,!0)}})}u(w);var p=z(w,2);Oe(p,{tooltip:"show/hide empty folders",placement:"bottom",children:(M,d=L)=>{var n=mt();let S;var x=f(n);{var C=k=>{Ie(k,{})},A=k=>{Ve(k,{})};V(x,k=>{e(h)?k(C):k(A,-1)})}u(n),Me(n,d),I(()=>S=F(n,1,"btn-icon btn",null,S,{"preset-filled":e(h),"preset-tonal":!e(h)})),oe("click",n,()=>{q(h,!e(h))}),o(M,n)},$$slots:{default:!0}}),u(j),u(P),I(()=>X(O,"for",`${a}-search-box`)),o(_,P)},children:(_,P)=>{var j=_t(),O=G(j);{let p=v(()=>$(t.data.tree,e(E)));vt(O,{get path(){return e(E)},get tree(){return e(p)},get showEmpty(){return e(h)}})}var w=z(O,2),y=f(w);s(y,()=>e(E)),u(w),o(_,j)},$$slots:{navRight:!0,default:!0}}),Z()}_e(["click"]);export{Nt as component};
1
+ import{c as R,a as o,d as _e,b as oe,f as N,t as Q,s as W,p as be}from"../chunks/CpBqNZvJ.js";import{p as H,f as G,n as L,a as Z,c as f,r as u,t as I,s as z,g as e,u as v,b as xe,i as le,y as Pe,e as $e,$ as ke,d as q,h as J,x as ve}from"../chunks/BY45LdLb.js";import{s as Y,r as ee,i as V,p as Ee}from"../chunks/C54SSc0V.js";import{I as te,s as D,d as X,f as F,a as U,p as je,e as se,r as B,h as Se,g as Oe,i as Me,T as ie}from"../chunks/VJxQahu8.js";import{g as ue,i as ge}from"../chunks/DU96-whN.js";import{C as ze}from"../chunks/YI4sMSJr.js";import{C as Ne}from"../chunks/BFhDcAmE.js";import{M as fe}from"../chunks/BIeGoGN3.js";import{A as he}from"../chunks/D3beoBgN.js";import{L as Ce,S as Ae,u as Te}from"../chunks/DmfCqOHO.js";import{O as K,i as me,c as Ge}from"../chunks/lVsnUgwN.js";import{E as Ie}from"../chunks/DAwIjc0G.js";import{E as Ve}from"../chunks/BsAlPP13.js";const Re=!0;var qe=new Set(["$$slots","$$events","$$legacy"]);function Le(l,t){H(t,!0);let a=ee(t,qe);const s=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z"}],["path",{d:"M17 21v-2"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10"}],["path",{d:"M21 21v-2"}],["path",{d:"M3 5V3"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z"}],["path",{d:"M7 5V3"}]];te(l,Y({name:"cable"},()=>a,{get iconNode(){return s},children:(i,m)=>{var h=R(),E=G(h);D(E,()=>t.children??L),o(i,h)},$$slots:{default:!0}})),Z()}var Fe=new Set(["$$slots","$$events","$$legacy"]);function Be(l,t){H(t,!0);let a=ee(t,Fe);const s=[["path",{d:"M12 10v6"}],["path",{d:"M9 13h6"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}]];te(l,Y({name:"folder-plus"},()=>a,{get iconNode(){return s},children:(i,m)=>{var h=R(),E=G(h);D(E,()=>t.children??L),o(i,h)},$$slots:{default:!0}})),Z()}var He=new Set(["$$slots","$$events","$$legacy"]);function Ze(l,t){H(t,!0);let a=ee(t,He);const s=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}]];te(l,Y({name:"folder"},()=>a,{get iconNode(){return s},children:(i,m)=>{var h=R(),E=G(h);D(E,()=>t.children??L),o(i,h)},$$slots:{default:!0}})),Z()}var De=new Set(["$$slots","$$events","$$legacy"]);function Je(l,t){H(t,!0);let a=ee(t,De);const s=[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2"}]];te(l,Y({name:"images"},()=>a,{get iconNode(){return s},children:(i,m)=>{var h=R(),E=G(h);D(E,()=>t.children??L),o(i,h)},$$slots:{default:!0}})),Z()}function Ue(l){return l}function Ke(l,t,a){const s={};for(const i of l){const m=t(i);m in s?s[m]=Ue(s[m],i):s[m]=i}return s}var Qe=N('<div><!></div> <div class="nametag svelte-1s33icu"><span><!></span></div>',1),We=N('<a class="tile svelte-1s33icu"><!></a>'),Xe=N('<button class="tile svelte-1s33icu"><!></button>'),Ye=N('<span class="tile svelte-1s33icu"><!></span>');function et(l,t){const a=b=>{var r=Qe(),c=G(r),$=f(c);D($,()=>t.children),u(c);var g=z(c,2),_=f(g),P=f(_);{var j=w=>{var y=Q();I(()=>W(y,t.title)),o(w,y)},O=w=>{var y=R(),p=G(y);D(p,()=>t.title),o(w,y)};V(P,w=>{typeof t.title=="string"?w(j):w(O,-1)})}u(_),u(g),I(()=>F(c,1,`flex h-64 w-64 flex-wrap overflow-hidden rounded-2xl ${t.class??""??""}`,"svelte-1s33icu")),o(b,r)};var s=R(),i=G(s);{var m=b=>{var r=We(),c=f(r);a(c),u(r),I(()=>X(r,"href",t.href)),oe("click",r,function(...$){t.onclick?.apply(this,$)}),o(b,r)},h=b=>{var r=Xe(),c=f(r);a(c),u(r),oe("click",r,function(...$){t.onclick?.apply(this,$)}),o(b,r)},E=b=>{var r=Ye(),c=f(r);a(c),u(r),o(b,r)};V(i,b=>{t.href?b(m):t.onclick?b(h,1):b(E,-1)})}o(l,s)}_e(["click"]);function tt(l,t){if(!Array.isArray(l))throw new TypeError(`Expected an array, got ${typeof l}`);const{randomNumberGenerator:a=Math.random}={};if(typeof a!="function")throw new TypeError(`Expected randomNumberGenerator to be a function, got ${typeof a}`);for(let s=l.length-1;s>0;s--){const i=Math.floor(a()*(s+1));[l[s],l[i]]=[l[i],l[s]]}return l}function rt(l,t){if(!Array.isArray(l))throw new TypeError(`Expected an array, got ${typeof l}`);return tt([...l])}var ne=N('<div><div class="svelte-1iw7rpk"><!></div></div>'),at=N('<div class="preview svelte-1iw7rpk"><div><div class="svelte-1iw7rpk"><!></div></div> <!> <!> <!></div>');function lt(l,t){H(t,!0);const a=v(()=>rt(t.gallery.pieces).slice(0,4));var s=R(),i=G(s);{var m=h=>{const E=v(()=>e(a)[1]?"calc(var(--preview-size) / 2)":"var(--preview-size)"),b=v(()=>e(a)[2]?"calc(var(--preview-size) / 2)":"var(--preview-size)"),r=v(()=>e(a)[3]?"calc(var(--preview-size) / 2)":"var(--preview-size)"),c=v(()=>"calc(var(--preview-size) / 2)");var $=at(),g=f($);let _;var P=f(g),j=f(P);{let d=v(()=>e(a)[0].nsfw?"duration-300ms blur-sm transition-[filter] hover:blur-none hover:duration-[3s]":""),n=v(()=>({gallery:t.galleryPath,piece:e(a)[0].slug}));K(j,{get class(){return e(d)},get galleryPath(){return e(n)}})}u(P),u(g);var O=z(g,2);{var w=d=>{var n=ne();let S;var x=f(n),C=f(x);{let A=v(()=>e(a)[1].nsfw?"duration-300ms blur-sm transition-[filter] hover:blur-none hover:duration-[3s]":""),k=v(()=>({gallery:t.galleryPath,piece:e(a)[1].slug}));K(C,{get class(){return e(A)},get galleryPath(){return e(k)}})}u(x),u(n),I(()=>{U(n,`height: ${e(b)??""}; width: ${e(E)??""}`),S=F(n,1,"imgcontainer svelte-1iw7rpk",null,S,{square:e(E)===e(b)})}),o(d,n)};V(O,d=>{e(a)[1]&&d(w)})}var y=z(O,2);{var p=d=>{var n=ne();let S;var x=f(n),C=f(x);{let A=v(()=>e(a)[2].nsfw?"duration-300ms blur-sm transition-[filter] hover:blur-none hover:duration-[3s]":""),k=v(()=>({gallery:t.galleryPath,piece:e(a)[2].slug}));K(C,{get class(){return e(A)},get galleryPath(){return e(k)}})}u(x),u(n),I(()=>{U(n,`height: ${e(c)??""}; width: ${e(r)??""}`),S=F(n,1,"imgcontainer svelte-1iw7rpk",null,S,{square:e(r)===e(c)})}),o(d,n)};V(y,d=>{e(a)[2]&&d(p)})}var T=z(y,2);{var M=d=>{var n=ne();let S;var x=f(n),C=f(x);{let A=v(()=>e(a)[3].nsfw?"duration-300ms blur-sm transition-[filter] hover:blur-none hover:duration-[3s]":""),k=v(()=>({gallery:t.galleryPath,piece:e(a)[3].slug}));K(C,{get class(){return e(A)},get galleryPath(){return e(k)}})}u(x),u(n),I(()=>{U(n,`height: ${e(c)??""}; width: ${e(r)??""}`),S=F(n,1,"imgcontainer svelte-1iw7rpk",null,S,{square:e(r)===e(c)})}),o(d,n)};V(T,d=>{e(a)[3]&&d(M)})}u($),I(()=>{U($,`--preview-size: ${t.cssSize??""}`),U(g,`height: ${e(b)??""}; width: ${e(E)??""}`),_=F(g,1,"imgcontainer svelte-1iw7rpk",null,_,{square:e(E)===e(b)})}),o(h,$)};V(i,h=>{e(a)[0]&&h(m)})}o(l,s),Z()}var st=N('<div class="flex justify-center"><!></div>');function it(l,t){const a=Ee(t,"px",3,256);var s=st(),i=f(s);et(i,{get href(){return t.href},get title(){return t.name},children:(m,h)=>{lt(m,{get cssSize(){return`${a()??""}px`},get gallery(){return t.gallery},get galleryPath(){return t.galleryPath}})}}),u(s),o(l,s)}xe({query:""});function nt(l,t,...a){return l?je.go(l,t,{keys:a,threshold:.3}).map(s=>s.obj):t}function ye(l,t,...a){return l?Object.fromEntries(nt(l,Object.entries(t),...a.map(s=>([i,m])=>s(m,i)))):t}var ot=N("<a><!> <!></a>"),dt=N('<a class="btn flex items-center preset-outlined-surface-950-50 p-2"><!> </a>'),ct=N('<div><div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"><!> <!></div> <div class="mt-8 grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"></div></div>');function vt(l,t){H(t,!0);const a=v(()=>ye(t.search,Object.fromEntries(Object.entries(t.tree.structure).filter(r=>r[1].$type==="folder")),(r,c)=>c)),s=v(()=>ye(t.search,Object.fromEntries(Object.entries(t.tree.structure).filter(r=>r[1].$type==="gallery")),(r,c)=>c));var i=ct(),m=f(i),h=f(m);se(h,17,()=>Object.entries(e(a)),([r,c])=>r,(r,c)=>{var $=v(()=>le(e(c),2));let g=()=>e($)[0],_=()=>e($)[1];const P=v(()=>Object.keys(_().structure).length==0);var j=R(),O=G(j);{var w=y=>{var p=ot();let T;var M=f(p);Ze(M,{});var d=z(M),n=z(d);{var S=x=>{var C=Q(" (empty)");o(x,C)};V(n,x=>{e(P)&&x(S)})}u(p),I(x=>{T=F(p,1,"btn flex items-center preset-outlined-surface-950-50 p-2 whitespace-normal",null,T,{"font-extralight":e(P),"text-gray-500":e(P)}),X(p,"href",x),W(d,` ${g()??""}`)},[()=>B("/")+"?"+String(new URLSearchParams({path:[...t.path,g()].join("/")}))]),o(y,p)};V(O,y=>{(!e(P)||t.showEmpty)&&y(w)})}o(r,j)});var E=z(h,2);se(E,17,()=>Object.entries(e(s)),([r,c])=>r,(r,c)=>{var $=v(()=>le(e(c),2));let g=()=>e($)[0],_=()=>e($)[1];var P=R(),j=G(P);{var O=w=>{var y=dt(),p=f(y);Le(p,{});var T=z(p);u(y),I(M=>{X(y,"href",M),W(T,` ${g()??""}`)},[()=>B("/gallery/[...gallerypath]",{gallerypath:[...t.path,g()].join("/")})]),o(w,y)};V(j,w=>{_().$type==="gallery"&&!_().isBase&&w(O)})}o(r,P)}),u(m);var b=z(m,2);se(b,21,()=>Object.entries(e(s)),([r,c])=>r,(r,c)=>{var $=v(()=>le(e(c),2));let g=()=>e($)[0],_=()=>e($)[1];const P=v(()=>g().replace(/\.gallery$/,""));var j=R(),O=G(j);{var w=y=>{{let p=v(()=>[...t.path,g()].join("/")),T=v(()=>B("/gallery/[...gallerypath]",{gallerypath:[...t.path,g()].join("/")}));it(y,{get name(){return e(P)},get galleryPath(){return e(p)},get gallery(){return _().data},get href(){return e(T)}})}};V(O,y=>{_().$type==="gallery"&&_().isBase&&y(w)})}o(r,j)}),u(b),u(i),o(l,i),Z()}var ut=N('<div class="m-4"><!> <!></div>'),gt=N('<!> <div class="my-4"></div> <div class="flex items-center gap-x-3"><!> </div>',1),ft=N('<div class="m-4"><!> <!> <!></div>'),ht=N('<div class="mb-4 flex gap-x-1"><!> <!></div>'),mt=N("<button><!></button>"),yt=N('<div class="flex items-center gap-2"><div class="my-4 flex w-64 grow items-center gap-x-2 pr-4"><label><i class="fa-solid fa-search"></i></label> <div class="relative flex grow overflow-visible"><!></div> <!></div></div>'),_t=N('<!> <div class="absolute right-3 bottom-0"><!></div>',1);function Nt(l,t){const a=be();H(t,!0);const s=(g,_=L)=>{var P=ht(),j=f(P);fe(j,{title:"New Folder",onClose:()=>{q(i,"")},class:"preset-outlined-primary-50-950 bg-surface-300-700",icon:p=>{Be(p,{size:"8pt"})},children:(p,T=L)=>{var M=ut(),d=f(M);ie(d,{label:"Folder name",get value(){return e(i)},set value(S){q(i,S,!0)}});var n=z(d,2);{let S=v(()=>!e(i));he(n,{get disabled(){return e(S)},action:async()=>{await fetch(B("/api/folder/[...folderpath]",{folderpath:[..._(),e(i)].join("/")}),{method:"PATCH"}),await ge(),T()()},unstyled:!0,class:"btn w-full preset-filled-primary-500",children:(x,C)=>{ve();var A=Q("Create");o(x,A)},$$slots:{default:!0}})}u(M),o(p,M)},$$slots:{icon:!0,default:!0}});var O=z(j,2);fe(O,{title:"New Gallery",onClose:()=>{q(i,""),q(m,!1)},class:"preset-filled-primary-50-950",icon:p=>{Je(p,{size:"8pt"})},children:(p,T=L)=>{var M=ft(),d=f(M);ie(d,{label:"Gallery Name",get value(){return e(i)},set value(x){q(i,x,!0)}});var n=z(d,2);{let x=v(()=>!e(i));he(n,{get disabled(){return e(x)},action:async()=>{const C=[..._(),e(i)+".gallery"].join("/");let A=[];const k=t.data.galleries[e(r)];!e(m)&&k&&me(k)&&(A=await Ge(k.pieces,e(r),C)),await fetch(B("/api/gallery/[...gallerypath]/save",{gallerypath:C}),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e(m)?{$extends:[]}:{pieces:A})}),await ge(),T()()},unstyled:!0,class:"btn w-full preset-filled-primary-500",children:(C,A)=>{ve();var k=Q("Create");o(C,k)},$$slots:{default:!0}})}var S=z(n,2);ze(S,{title:"Advanced",class:"mt-4",children:(x,C)=>{var A=gt(),k=G(A);Ne(k,{label:"Is extended gallery",get checked(){return e(m)},set checked(re){q(m,re,!0)}});var de=z(k,4),ce=f(de);{let re=v(()=>Object.keys(t.data.galleries).filter(ae=>me(t.data.galleries[ae]))),we=v(()=>e(r)!==""&&!t.data.galleries[e(r)]?"Select a valid path":void 0);ie(ce,{label:"Copy From...",get disabled(){return e(m)},get options(){return e(re)},noReportValidation:!0,get validationError(){return e(we)},get value(){return e(r)},set value(ae){q(r,ae,!0)}})}var pe=z(ce);u(de),I(()=>W(pe,` ${t.data.galleries[e(r)]?"✅":"❌"}`)),o(x,A)},$$slots:{default:!0}}),u(M),o(p,M)},$$slots:{icon:!0,default:!0}}),u(P),o(g,P)};let i=J(""),m=J(!1),h=J(!1);const E=v(Te);Pe(()=>{t.data.redirectGallery&&Re&&window.location.hash!=="#stay"&&!window.localStorage.getItem("prefers-multigallery")&&ue(B(`/gallery/${t.data.redirectGallery}`))});let b=J(""),r=J("");function c(g){if(g.$type!=="folder")throw new Error("RIP");return g}function $(g,_){for(;_.length>0;)g=c(g.structure[_[0]]),_=_.slice(1);return g}Se("1uha8ag",g=>{$e(()=>{ke.title="Art Site Editor"})}),Ce(l,{title:"Galleries",breadcrumbs:!0,navRight:_=>{var P=yt(),j=f(P),O=f(j),w=z(O,2),y=f(w);{let T=v(()=>e(b)!==""&&!t.data.galleryPaths.includes(e(b))?"invalid path":void 0),M=v(()=>Ke(t.data.galleryPaths??[],d=>d));Ae(y,{get id(){return`${a}-search-box`},autoFocus:!0,class:"input h-8 w-0 grow",noReportValidation:!0,acceptSuggestionOnEnter:!0,get validationError(){return e(T)},get options(){return e(M)},onSelect:d=>{t.data.galleryPaths.includes(d)&&ue(B("/gallery/[...gallerypath]",{gallerypath:d}))},get search(){return e(b)},set search(d){q(b,d,!0)}})}u(w);var p=z(w,2);Oe(p,{tooltip:"show/hide empty folders",placement:"bottom",children:(M,d=L)=>{var n=mt();let S;var x=f(n);{var C=k=>{Ie(k,{})},A=k=>{Ve(k,{})};V(x,k=>{e(h)?k(C):k(A,-1)})}u(n),Me(n,d),I(()=>S=F(n,1,"btn-icon btn",null,S,{"preset-filled":e(h),"preset-tonal":!e(h)})),oe("click",n,()=>{q(h,!e(h))}),o(M,n)},$$slots:{default:!0}}),u(j),u(P),I(()=>X(O,"for",`${a}-search-box`)),o(_,P)},children:(_,P)=>{var j=_t(),O=G(j);{let p=v(()=>$(t.data.tree,e(E)));vt(O,{get path(){return e(E)},get tree(){return e(p)},get showEmpty(){return e(h)}})}var w=z(O,2),y=f(w);s(y,()=>e(E)),u(w),o(_,j)},$$slots:{navRight:!0,default:!0}}),Z()}_e(["click"]);export{Nt as component};
@@ -1 +1 @@
1
- import{c as te,a as p,d as Ee,p as Le,b as P,f as S,s as Me}from"../chunks/CpBqNZvJ.js";import{p as q,f as T,n as re,a as F,h as R,b as Pe,z as Re,e as Ce,g as e,d as f,s as c,t as me,u as C,c as s,$ as Te,r as a,i as Ie,x as Z,G as Ke}from"../chunks/BY45LdLb.js";import{s as ae,r as se,i as be,b as He}from"../chunks/C54SSc0V.js";import{I as ne,s as le,h as De,e as $e,m as Je,n as Ve,d as qe,T as ee,o as Fe,p as Ge,f as Be,r as Qe}from"../chunks/B0Gppwyp.js";import{i as Ue}from"../chunks/CRTGkQGy.js";import{C as ye}from"../chunks/Cg8PdHAC.js";import{L as We,S as Xe}from"../chunks/Bha_IRQA.js";import{M as xe}from"../chunks/3JClJGUz.js";import{C as Ye}from"../chunks/gmKqw07u.js";import{n as Ze}from"../chunks/B1mSMgO9.js";import{T as et,S as tt}from"../chunks/hekZe9JU.js";var rt=new Set(["$$slots","$$events","$$legacy"]);function at(_,n){q(n,!0);let m=se(n,rt);const r=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05"}],["circle",{cx:"12",cy:"12",r:"10"}]];ne(_,ae({name:"earth"},()=>m,{get iconNode(){return r},children:(i,j)=>{var o=te(),b=T(o);le(b,()=>n.children??re),p(i,o)},$$slots:{default:!0}})),F()}var st=new Set(["$$slots","$$events","$$legacy"]);function nt(_,n){q(n,!0);let m=se(n,st);const r=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]];ne(_,ae({name:"link"},()=>m,{get iconNode(){return r},children:(i,j)=>{var o=te(),b=T(o);le(b,()=>n.children??re),p(i,o)},$$slots:{default:!0}})),F()}var lt=new Set(["$$slots","$$events","$$legacy"]);function it(_,n){q(n,!0);let m=se(n,lt);const r=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];ne(_,ae({name:"plus"},()=>m,{get iconNode(){return r},children:(i,j)=>{var o=te(),b=T(o);le(b,()=>n.children??re),p(i,o)},$$slots:{default:!0}})),F()}var ot=new Set(["$$slots","$$events","$$legacy"]);function dt(_,n){q(n,!0);let m=se(n,ot);const r=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"}]];ne(_,ae({name:"star"},()=>m,{get iconNode(){return r},children:(i,j)=>{var o=te(),b=T(o);le(b,()=>n.children??re),p(i,o)},$$slots:{default:!0}})),F()}var ct=S('<div class="flex items-center gap-2"><div class="my-4 flex w-64 grow items-center gap-x-2 pr-4"><label><i class="fa-solid fa-search"></i></label> <div class="relative flex grow overflow-visible"><!></div></div></div>'),vt=S('<button class="btn preset-filled-primary-50-950 p-3"><!> <span>Save</span></button>'),ut=S('<div class="h-full cursor-pointer rounded-2xl border p-3">Saving...</div>'),ft=S('<div class="mr-4 flex items-stretch gap-x-3 py-1"><div><button style="line-height: 1;"><div class="flex items-center"><!> <span class="font-normal">Delete</span></div> <div class="text-[8pt]">(requires shift-click)</div></button></div> <div><!> <!></div></div>'),pt=S('<div class="flex w-full items-center"><!></div> <div class="flex w-full items-end"><!></div> <button class="mx-2 btn-icon btn preset-tonal" title="Promote"><!></button> <button class="mx-2 btn-icon btn preset-tonal-warning" title="Delete"><!></button>',1),mt=S('<pre class="text-gray-900"> </pre>'),bt=S('<div class="min-w-[50vw] p-4"><!> <!> <div><div class="flex items-center"><div class="grow border-b border-b-surface-600-400"></div> <div class="mx-2">Links</div> <div class="grow border-b border-b-surface-600-400"></div></div> <div class="grid items-center" style="grid-template-columns: 1fr 1fr auto auto;"><!> <button class="col-span-4 btn w-full preset-tonal"><!> <span>Add Link</span></button></div></div> <div><!></div></div>'),gt=S('<button class="absolute right-3 bottom-3 z-10 btn preset-filled-primary-200-800 btn-sm"><i class="fa-solid fa-plus"></i> <span>Add Artist</span></button> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4"></div> <!>',1);function At(_,n){const m=Le();q(n,!0);let r=R(Pe(n.data.artists)),i=R(!1),j=R(!1),o=R(null);function b(t,v,h,z=!1){return h in t&&!z?Object.assign({},t):Object.fromEntries(Object.entries(t).map(([x,$])=>x===v?[h,$]:[x,$]))}function we(t,v){return v in t?Object.fromEntries([[v,t[v]],...Object.entries(t).filter(([h])=>h!==v)]):Object.assign({},t)}Re(()=>{const t=v=>{f(i,v.shiftKey,!0)};return window.addEventListener("keydown",t),window.addEventListener("keyup",t),()=>{window.removeEventListener("keydown",t),window.removeEventListener("keyup",t)}});async function ge(){f(j,!0);try{await fetch(Qe("/api/artists/save"),{method:"POST",body:JSON.stringify(e(r)),headers:{"Content-Type":"application/json"}})}finally{f(j,!1),Ue()}}let I=R(""),g=R(null);const _e=C(()=>e(I)?Ge.go(e(I),Object.entries(e(r)),{key:([,t])=>t.name}).map(t=>t.obj):Object.entries(e(r))),ke=C(()=>Ze(Object.keys(e(r)),e(r))),Oe=C(()=>Je(Ve(e(ke),t=>`@${t.info.handle} (${t.info.name})`),t=>t.info.handle));De("1qfpjcv",t=>{Ce(()=>{Te.title="Artist Editor | Art Site Editor"})}),We(_,{title:"Artists",navRight:v=>{var h=ct(),z=s(h),x=s(z),$=c(x,2),ie=s($);Xe(ie,{get id(){return`${m}-search-box`},autoFocus:!0,class:"input h-8 w-0 grow",noReportValidation:!0,acceptSuggestionOnEnter:!0,get options(){return e(Oe)},onSelect:(K,w)=>{w&&f(g,K,!0)},get search(){return e(I)},set search(K){f(I,K,!0)}}),a($),a(z),a(h),me(()=>qe(x,"for",`${m}-search-box`)),p(v,h)},children:(v,h)=>{var z=gt(),x=T(z),$=c(x,2);$e($,23,()=>e(_e),([w],k)=>`${k}-${e(_e).length}`,(w,k)=>{var l=C(()=>Ie(e(k),1));let G=()=>e(l)[0];xe(w,{get title(){return`@${G()??""}`},class:"m-2 rounded-2xl border",overrideOnClick:()=>{f(g,G(),!0)}})}),a($);var ie=c($,2);{var K=w=>{const k=C(()=>e(g)),l=C(()=>e(r)[e(g)]);var G=()=>!0,Se=he=>{he||(f(g,null),f(I,""))};xe(w,{headless:!0,get title(){return`@${e(k)??""}`},class:"m-2 rounded-2xl border",get open(){return G()},set open(H){Se(H)},modalRight:H=>{var B=ft(),A=s(B),N=s(A);let Q;var U=s(N),W=s(U);et(W,{size:16}),Z(2),a(U),Z(2),a(N),a(A);var M=c(A,2),D=s(M);{var X=u=>{var O=vt(),d=s(O);tt(d,{size:16}),Z(2),a(O),P("click",O,()=>{ge()}),p(u,O)},J=u=>{var O=ut();p(u,O)};be(D,u=>{e(j)?u(J,-1):u(X)})}var oe=c(D,2);be(oe,u=>{}),a(M),a(B),me(()=>Q=Be(N,1,"btn flex flex-col items-center preset-filled-error-50-950 p-3",null,Q,{"hover:bg-gray-300":e(i),"active:bg-gray-500":e(i),"cursor-pointer":e(i),"hover:font-bold":!e(i),"cursor-not-allowed":!e(i)})),P("click",N,u=>{u.shiftKey&&(delete e(r)[e(k)],ge())}),p(H,B)},children:(H,B)=>{var A=bt(),N=s(A),Q=()=>e(k),U=d=>{d in e(r)||(f(r,b(e(r),e(k),d),!0),f(g,d,!0))};ee(N,{label:"Handle",get value(){return Q()},set value(d){U(d)}});var W=c(N,2);ee(W,{label:"Name",get value(){return e(l).name},set value(d){e(l).name=d}});var M=c(W,2),D=c(s(M),2),X=s(D);$e(X,17,()=>Object.keys(e(l).links),Fe,(d,E,Y)=>{var de=pt(),L=T(de),ce=s(L),ve=()=>e(E),je=pe=>{e(l).links=b(e(l).links,e(E),pe,!1)};He(ee(ce,{placeholder:"site",get value(){return ve()},set value(y){je(y)},label:"",icon:y=>{at(y,{size:16})},$$slots:{icon:!0}}),y=>{Object.keys(e(l).links).length-1===Y&&f(o,y,!0)},()=>null),a(L);var ue=c(L,2),ze=s(ue);ee(ze,{placeholder:"url",label:"",get value(){return e(l).links[e(E)]},set value(y){e(l).links[e(E)]=y},icon:y=>{nt(y,{size:16})},$$slots:{icon:!0}}),a(ue);var V=c(ue,2);V.disabled=Y===0;var Ae=s(V);dt(Ae,{size:16}),a(V);var fe=c(V,2),Ne=s(fe);Ye(Ne,{size:16}),a(fe),P("click",V,()=>{e(l).links=we(e(l).links,e(E))}),P("click",fe,()=>{delete e(l).links[e(E)]}),p(d,de)});var J=c(X,2),oe=s(J);it(oe,{}),Z(2),a(J),a(D),a(M);var u=c(M,2),O=s(u);ye(O,{title:"Advanced",class:"my-3",children:(d,E)=>{ye(d,{title:"JSON",initial:!1,class:"mt-2 no-scrollbar overflow-scroll border-t border-gray-300 text-gray-400",children:(Y,de)=>{var L=mt(),ce=s(L,!0);a(L),me(ve=>Me(ce,ve),[()=>JSON.stringify(e(l),null,4)]),p(Y,L)},$$slots:{default:!0}})},$$slots:{default:!0}}),a(u),a(A),P("click",J,()=>{e(l).links=Object.fromEntries([...Object.entries(e(l).links),["",""]]),Ke().then(()=>{e(o)?.focus()})}),p(H,A)},$$slots:{modalRight:!0,default:!0}})};be(ie,w=>{e(g)!==void 0&&e(g)!==null&&e(r)[e(g)]&&w(K)})}P("click",x,()=>{e(r)[""]={name:"",links:{},type:"Artist"},f(g,"")}),p(v,z)},$$slots:{navRight:!0,default:!0}}),F()}Ee(["click"]);export{At as component};
1
+ import{c as te,a as p,d as Ee,p as Le,b as P,f as S,s as Me}from"../chunks/CpBqNZvJ.js";import{p as q,f as T,n as re,a as F,h as R,b as Pe,z as Re,e as Ce,g as e,d as f,s as c,t as me,u as C,c as s,$ as Te,r as a,i as Ie,x as Z,G as Ke}from"../chunks/BY45LdLb.js";import{s as ae,r as se,i as be,b as He}from"../chunks/C54SSc0V.js";import{I as ne,s as le,h as De,e as $e,m as Je,n as Ve,d as qe,T as ee,o as Fe,p as Ge,f as Be,r as Qe}from"../chunks/VJxQahu8.js";import{i as Ue}from"../chunks/DU96-whN.js";import{C as ye}from"../chunks/YI4sMSJr.js";import{L as We,S as Xe}from"../chunks/DmfCqOHO.js";import{M as xe}from"../chunks/BIeGoGN3.js";import{C as Ye}from"../chunks/C5QJkHpj.js";import{n as Ze}from"../chunks/B1mSMgO9.js";import{T as et,S as tt}from"../chunks/Bv0tjW4d.js";var rt=new Set(["$$slots","$$events","$$legacy"]);function at(_,n){q(n,!0);let m=se(n,rt);const r=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05"}],["circle",{cx:"12",cy:"12",r:"10"}]];ne(_,ae({name:"earth"},()=>m,{get iconNode(){return r},children:(i,j)=>{var o=te(),b=T(o);le(b,()=>n.children??re),p(i,o)},$$slots:{default:!0}})),F()}var st=new Set(["$$slots","$$events","$$legacy"]);function nt(_,n){q(n,!0);let m=se(n,st);const r=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]];ne(_,ae({name:"link"},()=>m,{get iconNode(){return r},children:(i,j)=>{var o=te(),b=T(o);le(b,()=>n.children??re),p(i,o)},$$slots:{default:!0}})),F()}var lt=new Set(["$$slots","$$events","$$legacy"]);function it(_,n){q(n,!0);let m=se(n,lt);const r=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];ne(_,ae({name:"plus"},()=>m,{get iconNode(){return r},children:(i,j)=>{var o=te(),b=T(o);le(b,()=>n.children??re),p(i,o)},$$slots:{default:!0}})),F()}var ot=new Set(["$$slots","$$events","$$legacy"]);function dt(_,n){q(n,!0);let m=se(n,ot);const r=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"}]];ne(_,ae({name:"star"},()=>m,{get iconNode(){return r},children:(i,j)=>{var o=te(),b=T(o);le(b,()=>n.children??re),p(i,o)},$$slots:{default:!0}})),F()}var ct=S('<div class="flex items-center gap-2"><div class="my-4 flex w-64 grow items-center gap-x-2 pr-4"><label><i class="fa-solid fa-search"></i></label> <div class="relative flex grow overflow-visible"><!></div></div></div>'),vt=S('<button class="btn preset-filled-primary-50-950 p-3"><!> <span>Save</span></button>'),ut=S('<div class="h-full cursor-pointer rounded-2xl border p-3">Saving...</div>'),ft=S('<div class="mr-4 flex items-stretch gap-x-3 py-1"><div><button style="line-height: 1;"><div class="flex items-center"><!> <span class="font-normal">Delete</span></div> <div class="text-[8pt]">(requires shift-click)</div></button></div> <div><!> <!></div></div>'),pt=S('<div class="flex w-full items-center"><!></div> <div class="flex w-full items-end"><!></div> <button class="mx-2 btn-icon btn preset-tonal" title="Promote"><!></button> <button class="mx-2 btn-icon btn preset-tonal-warning" title="Delete"><!></button>',1),mt=S('<pre class="text-gray-900"> </pre>'),bt=S('<div class="min-w-[50vw] p-4"><!> <!> <div><div class="flex items-center"><div class="grow border-b border-b-surface-600-400"></div> <div class="mx-2">Links</div> <div class="grow border-b border-b-surface-600-400"></div></div> <div class="grid items-center" style="grid-template-columns: 1fr 1fr auto auto;"><!> <button class="col-span-4 btn w-full preset-tonal"><!> <span>Add Link</span></button></div></div> <div><!></div></div>'),gt=S('<button class="absolute right-3 bottom-3 z-10 btn preset-filled-primary-200-800 btn-sm"><i class="fa-solid fa-plus"></i> <span>Add Artist</span></button> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4"></div> <!>',1);function At(_,n){const m=Le();q(n,!0);let r=R(Pe(n.data.artists)),i=R(!1),j=R(!1),o=R(null);function b(t,v,h,z=!1){return h in t&&!z?Object.assign({},t):Object.fromEntries(Object.entries(t).map(([x,$])=>x===v?[h,$]:[x,$]))}function we(t,v){return v in t?Object.fromEntries([[v,t[v]],...Object.entries(t).filter(([h])=>h!==v)]):Object.assign({},t)}Re(()=>{const t=v=>{f(i,v.shiftKey,!0)};return window.addEventListener("keydown",t),window.addEventListener("keyup",t),()=>{window.removeEventListener("keydown",t),window.removeEventListener("keyup",t)}});async function ge(){f(j,!0);try{await fetch(Qe("/api/artists/save"),{method:"POST",body:JSON.stringify(e(r)),headers:{"Content-Type":"application/json"}})}finally{f(j,!1),Ue()}}let I=R(""),g=R(null);const _e=C(()=>e(I)?Ge.go(e(I),Object.entries(e(r)),{key:([,t])=>t.name}).map(t=>t.obj):Object.entries(e(r))),ke=C(()=>Ze(Object.keys(e(r)),e(r))),Oe=C(()=>Je(Ve(e(ke),t=>`@${t.info.handle} (${t.info.name})`),t=>t.info.handle));De("1qfpjcv",t=>{Ce(()=>{Te.title="Artist Editor | Art Site Editor"})}),We(_,{title:"Artists",navRight:v=>{var h=ct(),z=s(h),x=s(z),$=c(x,2),ie=s($);Xe(ie,{get id(){return`${m}-search-box`},autoFocus:!0,class:"input h-8 w-0 grow",noReportValidation:!0,acceptSuggestionOnEnter:!0,get options(){return e(Oe)},onSelect:(K,w)=>{w&&f(g,K,!0)},get search(){return e(I)},set search(K){f(I,K,!0)}}),a($),a(z),a(h),me(()=>qe(x,"for",`${m}-search-box`)),p(v,h)},children:(v,h)=>{var z=gt(),x=T(z),$=c(x,2);$e($,23,()=>e(_e),([w],k)=>`${k}-${e(_e).length}`,(w,k)=>{var l=C(()=>Ie(e(k),1));let G=()=>e(l)[0];xe(w,{get title(){return`@${G()??""}`},class:"m-2 rounded-2xl border",overrideOnClick:()=>{f(g,G(),!0)}})}),a($);var ie=c($,2);{var K=w=>{const k=C(()=>e(g)),l=C(()=>e(r)[e(g)]);var G=()=>!0,Se=he=>{he||(f(g,null),f(I,""))};xe(w,{headless:!0,get title(){return`@${e(k)??""}`},class:"m-2 rounded-2xl border",get open(){return G()},set open(H){Se(H)},modalRight:H=>{var B=ft(),A=s(B),N=s(A);let Q;var U=s(N),W=s(U);et(W,{size:16}),Z(2),a(U),Z(2),a(N),a(A);var M=c(A,2),D=s(M);{var X=u=>{var O=vt(),d=s(O);tt(d,{size:16}),Z(2),a(O),P("click",O,()=>{ge()}),p(u,O)},J=u=>{var O=ut();p(u,O)};be(D,u=>{e(j)?u(J,-1):u(X)})}var oe=c(D,2);be(oe,u=>{}),a(M),a(B),me(()=>Q=Be(N,1,"btn flex flex-col items-center preset-filled-error-50-950 p-3",null,Q,{"hover:bg-gray-300":e(i),"active:bg-gray-500":e(i),"cursor-pointer":e(i),"hover:font-bold":!e(i),"cursor-not-allowed":!e(i)})),P("click",N,u=>{u.shiftKey&&(delete e(r)[e(k)],ge())}),p(H,B)},children:(H,B)=>{var A=bt(),N=s(A),Q=()=>e(k),U=d=>{d in e(r)||(f(r,b(e(r),e(k),d),!0),f(g,d,!0))};ee(N,{label:"Handle",get value(){return Q()},set value(d){U(d)}});var W=c(N,2);ee(W,{label:"Name",get value(){return e(l).name},set value(d){e(l).name=d}});var M=c(W,2),D=c(s(M),2),X=s(D);$e(X,17,()=>Object.keys(e(l).links),Fe,(d,E,Y)=>{var de=pt(),L=T(de),ce=s(L),ve=()=>e(E),je=pe=>{e(l).links=b(e(l).links,e(E),pe,!1)};He(ee(ce,{placeholder:"site",get value(){return ve()},set value(y){je(y)},label:"",icon:y=>{at(y,{size:16})},$$slots:{icon:!0}}),y=>{Object.keys(e(l).links).length-1===Y&&f(o,y,!0)},()=>null),a(L);var ue=c(L,2),ze=s(ue);ee(ze,{placeholder:"url",label:"",get value(){return e(l).links[e(E)]},set value(y){e(l).links[e(E)]=y},icon:y=>{nt(y,{size:16})},$$slots:{icon:!0}}),a(ue);var V=c(ue,2);V.disabled=Y===0;var Ae=s(V);dt(Ae,{size:16}),a(V);var fe=c(V,2),Ne=s(fe);Ye(Ne,{size:16}),a(fe),P("click",V,()=>{e(l).links=we(e(l).links,e(E))}),P("click",fe,()=>{delete e(l).links[e(E)]}),p(d,de)});var J=c(X,2),oe=s(J);it(oe,{}),Z(2),a(J),a(D),a(M);var u=c(M,2),O=s(u);ye(O,{title:"Advanced",class:"my-3",children:(d,E)=>{ye(d,{title:"JSON",initial:!1,class:"mt-2 no-scrollbar overflow-scroll border-t border-gray-300 text-gray-400",children:(Y,de)=>{var L=mt(),ce=s(L,!0);a(L),me(ve=>Me(ce,ve),[()=>JSON.stringify(e(l),null,4)]),p(Y,L)},$$slots:{default:!0}})},$$slots:{default:!0}}),a(u),a(A),P("click",J,()=>{e(l).links=Object.fromEntries([...Object.entries(e(l).links),["",""]]),Ke().then(()=>{e(o)?.focus()})}),p(H,A)},$$slots:{modalRight:!0,default:!0}})};be(ie,w=>{e(g)!==void 0&&e(g)!==null&&e(r)[e(g)]&&w(K)})}P("click",x,()=>{e(r)[""]={name:"",links:{},type:"Artist"},f(g,"")}),p(v,z)},$$slots:{navRight:!0,default:!0}}),F()}Ee(["click"]);export{At as component};
@@ -1,4 +1,4 @@
1
- import{g as Zt,c as ft,a as ne,d as sl,p as cl,f as pe,b as qe,s as Jt}from"../chunks/CpBqNZvJ.js";import{j as Ft,q as Vn,av as vt,t as Ve,k as Wn,U as fl,bs as hl,w as Qn,aC as pl,aE as ml,aL as dl,aF as gl,au as yl,a$ as xl,bt as kl,p as rt,f as Qe,n as Oe,a as it,h as He,b as Yn,g as A,y as bl,z as wl,e as vl,d as he,c as j,s as oe,r as M,$ as Sl,x as Ze,u as Ce,i as Cl}from"../chunks/BY45LdLb.js";import{s as ht,r as pt,i as Fe}from"../chunks/C54SSc0V.js";import{I as mt,s as dt,y as Al,h as Il,e as El,T as en,g as Kn,i as Gn,f as Nt,d as _l,r as Tl,p as Pl}from"../chunks/B0Gppwyp.js";import{i as zl}from"../chunks/CRTGkQGy.js";import{C as Xn}from"../chunks/Cg8PdHAC.js";import{a as Dl,g as Ll}from"../chunks/Dh0COuiE.js";import{A as Zn,I as Jn}from"../chunks/Wgnlm9u_.js";import{O as er}from"../chunks/DhnqYYBh.js";import{L as Fl,S as Nl}from"../chunks/Bha_IRQA.js";import{T as tr}from"../chunks/BmHxz2Ar.js";import{M as nr}from"../chunks/3JClJGUz.js";import{T as rr,S as Ol}from"../chunks/hekZe9JU.js";function ir(e,n,t=!1,r=!1,i=!1,o=!1){var l=e,a="";if(t){var u=e;Ft&&(l=Vn(vt(u)))}Ve(()=>{var s=fl;if(a===(a=n()??"")){Ft&&Wn();return}if(t&&!Ft){s.nodes=null,u.innerHTML=a,a!==""&&Zt(vt(u),u.lastChild);return}if(s.nodes!==null&&(hl(s.nodes.start,s.nodes.end),s.nodes=null),a!==""){if(Ft){Qn.data;for(var f=Wn(),c=f;f!==null&&(f.nodeType!==pl||f.data!=="");)c=f,f=ml(f);if(f===null)throw dl(),gl;Zt(Qn,c),l=Vn(f);return}var p=r?xl:i?kl:void 0,h=yl(r?"svg":i?"math":"template",p);h.innerHTML=a;var g=r||i?h:h.content;if(Zt(vt(g),g.lastChild),r||i)for(;vt(g);)l.before(vt(g));else l.before(g)}})}var Rl=new Set(["$$slots","$$events","$$legacy"]);function Ml(e,n){rt(n,!0);let t=pt(n,Rl);const r=[["path",{d:"m6 9 6 6 6-6"}]];mt(e,ht({name:"chevron-down"},()=>t,{get iconNode(){return r},children:(i,o)=>{var l=ft(),a=Qe(l);dt(a,()=>n.children??Oe),ne(i,l)},$$slots:{default:!0}})),it()}var Bl=new Set(["$$slots","$$events","$$legacy"]);function $l(e,n){rt(n,!0);let t=pt(n,Bl);const r=[["path",{d:"m18 15-6-6-6 6"}]];mt(e,ht({name:"chevron-up"},()=>t,{get iconNode(){return r},children:(i,o)=>{var l=ft(),a=Qe(l);dt(a,()=>n.children??Oe),ne(i,l)},$$slots:{default:!0}})),it()}var jl=new Set(["$$slots","$$events","$$legacy"]);function ql(e,n){rt(n,!0);let t=pt(n,jl);const r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M8 12h8"}],["path",{d:"M12 8v8"}]];mt(e,ht({name:"circle-plus"},()=>t,{get iconNode(){return r},children:(i,o)=>{var l=ft(),a=Qe(l);dt(a,()=>n.children??Oe),ne(i,l)},$$slots:{default:!0}})),it()}var Hl=new Set(["$$slots","$$events","$$legacy"]);function lr(e,n){rt(n,!0);let t=pt(n,Hl);const r=[["line",{x1:"2",x2:"22",y1:"2",y2:"22"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9"}]];mt(e,ht({name:"image-off"},()=>t,{get iconNode(){return r},children:(i,o)=>{var l=ft(),a=Qe(l);dt(a,()=>n.children??Oe),ne(i,l)},$$slots:{default:!0}})),it()}var Ul=new Set(["$$slots","$$events","$$legacy"]);function Vl(e,n){rt(n,!0);let t=pt(n,Ul);const r=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];mt(e,ht({name:"image"},()=>t,{get iconNode(){return r},children:(i,o)=>{var l=ft(),a=Qe(l);dt(a,()=>n.children??Oe),ne(i,l)},$$slots:{default:!0}})),it()}var Wl=new Set(["$$slots","$$events","$$legacy"]);function Ql(e,n){rt(n,!0);let t=pt(n,Wl);const r=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];mt(e,ht({name:"pencil"},()=>t,{get iconNode(){return r},children:(i,o)=>{var l=ft(),a=Qe(l);dt(a,()=>n.children??Oe),ne(i,l)},$$slots:{default:!0}})),it()}function or(e){if(e)throw e}var tn,ar;function Yl(){if(ar)return tn;ar=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(s){return typeof Array.isArray=="function"?Array.isArray(s):n.call(s)==="[object Array]"},o=function(s){if(!s||n.call(s)!=="[object Object]")return!1;var f=e.call(s,"constructor"),c=s.constructor&&s.constructor.prototype&&e.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!f&&!c)return!1;var p;for(p in s);return typeof p>"u"||e.call(s,p)},l=function(s,f){t&&f.name==="__proto__"?t(s,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):s[f.name]=f.newValue},a=function(s,f){if(f==="__proto__")if(e.call(s,f)){if(r)return r(s,f).value}else return;return s[f]};return tn=function u(){var s,f,c,p,h,g,w=arguments[0],v=1,x=arguments.length,I=!1;for(typeof w=="boolean"&&(I=w,w=arguments[1]||{},v=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});v<x;++v)if(s=arguments[v],s!=null)for(f in s)c=a(w,f),p=a(s,f),w!==p&&(I&&p&&(o(p)||(h=i(p)))?(h?(h=!1,g=c&&i(c)?c:[]):g=c&&o(c)?c:{},l(w,{name:f,newValue:u(I,g,p)})):typeof p<"u"&&l(w,{name:f,newValue:p}));return w},tn}var Kl=Yl();const nn=Al(Kl);function kn(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Gl(){const e=[],n={run:t,use:r};return n;function t(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(u,...s){const f=e[++o];let c=-1;if(u){l(u);return}for(;++c<i.length;)(s[c]===null||s[c]===void 0)&&(s[c]=i[c]);i=s,f?Xl(f,a)(...s):l(null,...s)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Xl(e,n){let t;return r;function r(...l){const a=e.length>l.length;let u;a&&l.push(i);try{u=e.apply(this,l)}catch(s){const f=s;if(a&&t)throw f;return i(f)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...a){t||(t=!0,n(l,...a))}function o(l){i(null,l)}}function At(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ur(e.position):"start"in e||"end"in e?ur(e):"line"in e||"column"in e?bn(e):""}function bn(e){return sr(e&&e.line)+":"+sr(e&&e.column)}function ur(e){return bn(e&&e.start)+"-"+bn(e&&e.end)}function sr(e){return e&&typeof e=="number"?e:1}class ke extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},l=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=At(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ke.prototype.file="";ke.prototype.name="";ke.prototype.reason="";ke.prototype.message="";ke.prototype.stack="";ke.prototype.column=void 0;ke.prototype.line=void 0;ke.prototype.ancestors=void 0;ke.prototype.cause=void 0;ke.prototype.fatal=void 0;ke.prototype.place=void 0;ke.prototype.ruleId=void 0;ke.prototype.source=void 0;const Ne={basename:Zl,dirname:Jl,extname:eo,join:to,sep:"/"};function Zl(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Pt(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function Jl(e){if(Pt(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function eo(e){Pt(e);let n=e.length,t=-1,r=0,i=-1,o=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function to(...e){let n=-1,t;for(;++n<e.length;)Pt(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":no(t)}function no(e){Pt(e);const n=e.codePointAt(0)===47;let t=ro(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function ro(e,n){let t="",r=0,i=-1,o=0,l=-1,a,u;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(u=t.lastIndexOf("/"),u!==t.length-1){u<0?(t="",r=0):(t=t.slice(0,u),r=t.length-1-t.lastIndexOf("/")),i=l,o=0;continue}}else if(t.length>0){t="",r=0,i=l,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return t}function Pt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const io={cwd:lo};function lo(){return"/"}function wn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function oo(e){if(typeof e=="string")e=new URL(e);else if(!wn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return ao(e)}function ao(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 n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+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(n)}const rn=["history","path","basename","stem","extname","dirname"];class uo{constructor(n){let t;n?wn(n)?t={path:n}:typeof n=="string"||so(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":io.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<rn.length;){const o=rn[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)rn.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?Ne.basename(this.path):void 0}set basename(n){on(n,"basename"),ln(n,"basename"),this.path=Ne.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Ne.dirname(this.path):void 0}set dirname(n){cr(this.basename,"dirname"),this.path=Ne.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Ne.extname(this.path):void 0}set extname(n){if(ln(n,"extname"),cr(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ne.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){wn(n)&&(n=oo(n)),on(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Ne.basename(this.path,this.extname):void 0}set stem(n){on(n,"stem"),ln(n,"stem"),this.path=Ne.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new ke(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function ln(e,n){if(e&&e.includes(Ne.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Ne.sep+"`")}function on(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function cr(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function so(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const co=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),fo={}.hasOwnProperty;class zn extends co{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=Gl()}copy(){const n=new zn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(nn(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(sn("data",this.frozen),this.namespace[n]=t,this):fo.call(this.namespace,n)&&this.namespace[n]||void 0:n?(sn("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=Ot(n),r=this.parser||this.Parser;return an("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),an("process",this.parser||this.Parser),un("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,l){const a=Ot(n),u=r.parse(a);r.run(u,a,function(f,c,p){if(f||!c||!p)return s(f);const h=c,g=r.stringify(h,p);mo(g)?p.value=g:p.result=g,s(f,p)});function s(f,c){f||!c?l(f):o?o(c):t(void 0,c)}}}processSync(n){let t=!1,r;return this.freeze(),an("processSync",this.parser||this.Parser),un("processSync",this.compiler||this.Compiler),this.process(n,i),hr("processSync","process",t),r;function i(o,l){t=!0,or(o),r=l}}run(n,t,r){fr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const u=Ot(t);i.run(n,u,s);function s(f,c,p){const h=c||n;f?a(f):l?l(h):r(void 0,h,p)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),hr("runSync","run",r),i;function o(l,a){or(l),i=a,r=!0}}stringify(n,t){this.freeze();const r=Ot(t),i=this.compiler||this.Compiler;return un("stringify",i),fr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(sn("use",this.frozen),n!=null)if(typeof n=="function")u(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(s){if(typeof s=="function")u(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[f,...c]=s;u(f,c)}else l(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function l(s){if(!("plugins"in s)&&!("settings"in s))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");a(s.plugins),s.settings&&(i.settings=nn(!0,i.settings,s.settings))}function a(s){let f=-1;if(s!=null)if(Array.isArray(s))for(;++f<s.length;){const c=s[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function u(s,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===s){p=c;break}if(p===-1)r.push([s,...f]);else if(f.length>0){let[h,...g]=f;const w=r[p][1];kn(w)&&kn(h)&&(h=nn(!0,w,h)),r[p]=[s,h,...g]}}}}const ho=new zn().freeze();function an(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function un(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fr(e){if(!kn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function hr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ot(e){return po(e)?e:new uo(e)}function po(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mo(e){return typeof e=="string"||go(e)}function go(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yo={};function Dn(e,n){const t=yo,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Gr(e,r,i)}function Gr(e,n,t){if(xo(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return pr(e.children,n,t)}return Array.isArray(e)?pr(e,n,t):""}function pr(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Gr(e[i],n,t);return r.join("")}function xo(e){return!!(e&&typeof e=="object")}const mr=document.createElement("i");function Ln(e){const n="&"+e+";";mr.innerHTML=n;const t=mr.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function Ie(e,n,t,r){const i=e.length;let o=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);o<r.length;)l=r.slice(o,o+1e4),l.unshift(n,0),e.splice(...l),o+=1e4,n+=1e4}function _e(e,n){return e.length>0?(Ie(e,e.length,0,n),e):n}const dr={}.hasOwnProperty;function Xr(e){const n={};let t=-1;for(;++t<e.length;)ko(n,e[t]);return n}function ko(e,n){let t;for(t in n){const i=(dr.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let l;if(o)for(l in o){dr.call(i,l)||(i[l]=[]);const a=o[l];bo(i[l],Array.isArray(a)?a:a?[a]:[])}}}function bo(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);Ie(e,0,0,r)}function Zr(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Le(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ye=Ye(/[A-Za-z]/),ge=Ye(/[\dA-Za-z]/),wo=Ye(/[#-'*+\--9=?A-Z^-~]/);function Ht(e){return e!==null&&(e<32||e===127)}const vn=Ye(/\d/),vo=Ye(/[\dA-Fa-f]/),So=Ye(/[!-/:-@[-`{-~]/);function z(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function q(e){return e===-2||e===-1||e===32}const Qt=Ye(new RegExp("\\p{P}|\\p{S}","u")),nt=Ye(/\s/);function Ye(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function gt(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const o=e.charCodeAt(t);let l="";if(o===37&&ge(e.charCodeAt(t+1))&&ge(e.charCodeAt(t+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function U(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return q(u)?(e.enter(t),a(u)):n(u)}function a(u){return q(u)&&o++<i?(e.consume(u),a):(e.exit(t),n(u))}}const Co={tokenize:Ao};function Ao(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),U(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return z(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Io={tokenize:Eo},gr={tokenize:_o};function Eo(e){const n=this,t=[];let r=0,i,o,l;return a;function a(C){if(r<t.length){const L=t[r];return n.containerState=L[1],e.attempt(L[0].continuation,u,s)(C)}return s(C)}function u(C){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&I();const L=n.events.length;let N=L,k;for(;N--;)if(n.events[N][0]==="exit"&&n.events[N][1].type==="chunkFlow"){k=n.events[N][1].end;break}x(r);let $=L;for(;$<n.events.length;)n.events[$][1].end={...k},$++;return Ie(n.events,N+1,0,n.events.slice(L)),n.events.length=$,s(C)}return a(C)}function s(C){if(r===t.length){if(!i)return p(C);if(i.currentConstruct&&i.currentConstruct.concrete)return g(C);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(gr,f,c)(C)}function f(C){return i&&I(),x(r),p(C)}function c(C){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,g(C)}function p(C){return n.containerState={},e.attempt(gr,h,g)(C)}function h(C){return r++,t.push([n.currentConstruct,n.containerState]),p(C)}function g(C){if(C===null){i&&I(),x(0),e.consume(C);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),w(C)}function w(C){if(C===null){v(e.exit("chunkFlow"),!0),x(0),e.consume(C);return}return z(C)?(e.consume(C),v(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(C),w)}function v(C,L){const N=n.sliceStream(C);if(L&&N.push(null),C.previous=o,o&&(o.next=C),o=C,i.defineSkip(C.start),i.write(N),n.parser.lazy[C.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<l&&(!i.events[k][1].end||i.events[k][1].end.offset>l))return;const $=n.events.length;let W=$,B,y;for(;W--;)if(n.events[W][0]==="exit"&&n.events[W][1].type==="chunkFlow"){if(B){y=n.events[W][1].end;break}B=!0}for(x(r),k=$;k<n.events.length;)n.events[k][1].end={...y},k++;Ie(n.events,W+1,0,n.events.slice($)),n.events.length=k}}function x(C){let L=t.length;for(;L-- >C;){const N=t[L];n.containerState=N[1],N[0].exit.call(n,e)}t.length=C}function I(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function _o(e,n,t){return U(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ct(e){if(e===null||Z(e)||nt(e))return 1;if(Qt(e))return 2}function Yt(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const Sn={name:"attention",resolveAll:To,tokenize:Po};function To(e,n){let t=-1,r,i,o,l,a,u,s,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[t][1].start};yr(c,-u),yr(p,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[t][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=_e(s,[["enter",e[r][1],n],["exit",e[r][1],n]])),s=_e(s,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",o,n]]),s=_e(s,Yt(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),s=_e(s,[["exit",o,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,s=_e(s,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,Ie(e,r-1,t-r+3,s),t=r+s.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Po(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ct(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const s=e.exit("attentionSequence"),f=ct(u),c=!f||f===2&&i||t.includes(u),p=!i||i===2&&f||t.includes(r);return s._open=!!(o===42?c:c&&(i||!p)),s._close=!!(o===42?p:p&&(f||!c)),n(u)}}function yr(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const zo={name:"autolink",tokenize:Do};function Do(e,n,t){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return ye(h)?(e.consume(h),l):h===64?t(h):s(h)}function l(h){return h===43||h===45||h===46||ge(h)?(r=1,a(h)):s(h)}function a(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||ge(h))&&r++<32?(e.consume(h),a):(r=0,s(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):h===null||h===32||h===60||Ht(h)?t(h):(e.consume(h),u)}function s(h){return h===64?(e.consume(h),f):wo(h)?(e.consume(h),s):t(h)}function f(h){return ge(h)?c(h):t(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):p(h)}function p(h){if((h===45||ge(h))&&r++<63){const g=h===45?p:c;return e.consume(h),g}return t(h)}}const zt={partial:!0,tokenize:Lo};function Lo(e,n,t){return r;function r(o){return q(o)?U(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||z(o)?n(o):t(o)}}const Jr={continuation:{tokenize:No},exit:Oo,name:"blockQuote",tokenize:Fo};function Fo(e,n,t){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return t(l)}function o(l){return q(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function No(e,n,t){const r=this;return i;function i(l){return q(l)?U(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Jr,n,t)(l)}}function Oo(e){e.exit("blockQuote")}const ei={name:"characterEscape",tokenize:Ro};function Ro(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return So(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}const ti={name:"characterReference",tokenize:Mo};function Mo(e,n,t){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,l=ge,f(c))}function s(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=vo,f):(e.enter("characterReferenceValue"),o=7,l=vn,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===ge&&!Ln(r.sliceSerialize(p))?t(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(c)&&i++<o?(e.consume(c),f):t(c)}}const xr={partial:!0,tokenize:$o},kr={concrete:!0,name:"codeFenced",tokenize:Bo};function Bo(e,n,t){const r=this,i={partial:!0,tokenize:N};let o=0,l=0,a;return u;function u(k){return s(k)}function s(k){const $=r.events[r.events.length-1];return o=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,a=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(k)}function f(k){return k===a?(l++,e.consume(k),f):l<3?t(k):(e.exit("codeFencedFenceSequence"),q(k)?U(e,c,"whitespace")(k):c(k))}function c(k){return k===null||z(k)?(e.exit("codeFencedFence"),r.interrupt?n(k):e.check(xr,w,L)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||z(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(k)):q(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,h,"whitespace")(k)):k===96&&k===a?t(k):(e.consume(k),p)}function h(k){return k===null||z(k)?c(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===null||z(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(k)):k===96&&k===a?t(k):(e.consume(k),g)}function w(k){return e.attempt(i,L,v)(k)}function v(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),x}function x(k){return o>0&&q(k)?U(e,I,"linePrefix",o+1)(k):I(k)}function I(k){return k===null||z(k)?e.check(xr,w,L)(k):(e.enter("codeFlowValue"),C(k))}function C(k){return k===null||z(k)?(e.exit("codeFlowValue"),I(k)):(e.consume(k),C)}function L(k){return e.exit("codeFenced"),n(k)}function N(k,$,W){let B=0;return y;function y(D){return k.enter("lineEnding"),k.consume(D),k.exit("lineEnding"),T}function T(D){return k.enter("codeFencedFence"),q(D)?U(k,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):_(D)}function _(D){return D===a?(k.enter("codeFencedFenceSequence"),P(D)):W(D)}function P(D){return D===a?(B++,k.consume(D),P):B>=l?(k.exit("codeFencedFenceSequence"),q(D)?U(k,R,"whitespace")(D):R(D)):W(D)}function R(D){return D===null||z(D)?(k.exit("codeFencedFence"),$(D)):W(D)}}}function $o(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const cn={name:"codeIndented",tokenize:qo},jo={partial:!0,tokenize:Ho};function qo(e,n,t){const r=this;return i;function i(s){return e.enter("codeIndented"),U(e,o,"linePrefix",5)(s)}function o(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(s):t(s)}function l(s){return s===null?u(s):z(s)?e.attempt(jo,l,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||z(s)?(e.exit("codeFlowValue"),l(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),n(s)}}function Ho(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):z(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):U(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):z(l)?i(l):t(l)}}const Uo={name:"codeText",previous:Wo,resolve:Vo,tokenize:Qo};function Vo(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function Wo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Qo(e,n,t){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?t(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):z(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),s(c))}function s(c){return c===null||c===32||c===96||z(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),s)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(c)):(o.type="codeTextData",s(c))}}class Yo{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&St(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),St(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),St(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);St(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);St(this.left,t.reverse())}}}function St(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function ni(e){const n={};let t=-1,r,i,o,l,a,u,s;const f=new Yo(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Ko(f,t)),t=n[t],s=!0);else if(r[1]._container){for(o=t,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,t),a.unshift(r),f.splice(i,t-i+1,a))}}return Ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!s}function Ko(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,u=[],s={};let f,c,p=-1,h=t,g=0,w=0;const v=[w];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=t;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(w=p+1,v.push(w),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):v.pop(),p=v.length;p--;){const x=a.slice(v[p],v[p+1]),I=o.pop();u.push([I,I+x.length-1]),e.splice(I,2,x)}for(u.reverse(),p=-1;++p<u.length;)s[g+u[p][0]]=g+u[p][1],g+=u[p][1]-u[p][0]-1;return s}const Go={resolve:Zo,tokenize:Jo},Xo={partial:!0,tokenize:ea};function Zo(e){return ni(e),e}function Jo(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):z(a)?e.check(Xo,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function ea(e,n,t){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),U(e,o,"linePrefix")}function o(l){if(l===null||z(l))return t(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function ri(e,n,t,r,i,o,l,a,u){const s=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||Ht(x)?t(x):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),w(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(a),p(x)):x===null||x===60||z(x)?t(x):(e.consume(x),x===92?g:h)}function g(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function w(x){return!f&&(x===null||x===41||Z(x))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(x)):f<s&&x===40?(e.consume(x),f++,w):x===41?(e.consume(x),f--,w):x===null||x===32||x===40||Ht(x)?t(x):(e.consume(x),x===92?v:w)}function v(x){return x===40||x===41||x===92?(e.consume(x),w):w(x)}}function ii(e,n,t,r,i,o){const l=this;let a=0,u;return s;function s(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||z(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!q(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function li(e,n,t,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,u):t(p)}function u(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):(e.enter(o),s(p))}function s(p){return p===l?(e.exit(o),u(l)):p===null?t(p):z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),U(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||z(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function It(e,n){let t;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):q(i)?U(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const ta={name:"definition",tokenize:ra},na={partial:!0,tokenize:ia};function ra(e,n,t){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return ii.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=Le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):t(h)}function u(h){return Z(h)?It(e,s)(h):s(h)}function s(h){return ri(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(na,c,c)(h)}function c(h){return q(h)?U(e,p,"whitespace")(h):p(h)}function p(h){return h===null||z(h)?(e.exit("definition"),r.parser.defined.push(i),n(h)):t(h)}}function ia(e,n,t){return r;function r(a){return Z(a)?It(e,i)(a):t(a)}function i(a){return li(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return q(a)?U(e,l,"whitespace")(a):l(a)}function l(a){return a===null||z(a)?n(a):t(a)}}const la={name:"hardBreakEscape",tokenize:oa};function oa(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return z(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const aa={name:"headingAtx",resolve:ua,tokenize:sa};function ua(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},Ie(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function sa(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||Z(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||z(f)?(e.exit("atxHeading"),n(f)):q(f)?U(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||Z(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const ca=["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"],br=["pre","script","style","textarea"],fa={concrete:!0,name:"htmlFlow",resolveTo:ma,tokenize:da},ha={partial:!0,tokenize:ya},pa={partial:!0,tokenize:ga};function ma(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function da(e,n,t){const r=this;let i,o,l,a,u;return s;function s(d){return f(d)}function f(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),c}function c(d){return d===33?(e.consume(d),p):d===47?(e.consume(d),o=!0,w):d===63?(e.consume(d),i=3,r.interrupt?n:m):ye(d)?(e.consume(d),l=String.fromCharCode(d),v):t(d)}function p(d){return d===45?(e.consume(d),i=2,h):d===91?(e.consume(d),i=5,a=0,g):ye(d)?(e.consume(d),i=4,r.interrupt?n:m):t(d)}function h(d){return d===45?(e.consume(d),r.interrupt?n:m):t(d)}function g(d){const ae="CDATA[";return d===ae.charCodeAt(a++)?(e.consume(d),a===ae.length?r.interrupt?n:_:g):t(d)}function w(d){return ye(d)?(e.consume(d),l=String.fromCharCode(d),v):t(d)}function v(d){if(d===null||d===47||d===62||Z(d)){const ae=d===47,me=l.toLowerCase();return!ae&&!o&&br.includes(me)?(i=1,r.interrupt?n(d):_(d)):ca.includes(l.toLowerCase())?(i=6,ae?(e.consume(d),x):r.interrupt?n(d):_(d)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(d):o?I(d):C(d))}return d===45||ge(d)?(e.consume(d),l+=String.fromCharCode(d),v):t(d)}function x(d){return d===62?(e.consume(d),r.interrupt?n:_):t(d)}function I(d){return q(d)?(e.consume(d),I):y(d)}function C(d){return d===47?(e.consume(d),y):d===58||d===95||ye(d)?(e.consume(d),L):q(d)?(e.consume(d),C):y(d)}function L(d){return d===45||d===46||d===58||d===95||ge(d)?(e.consume(d),L):N(d)}function N(d){return d===61?(e.consume(d),k):q(d)?(e.consume(d),N):C(d)}function k(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),u=d,$):q(d)?(e.consume(d),k):W(d)}function $(d){return d===u?(e.consume(d),u=null,B):d===null||z(d)?t(d):(e.consume(d),$)}function W(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||Z(d)?N(d):(e.consume(d),W)}function B(d){return d===47||d===62||q(d)?C(d):t(d)}function y(d){return d===62?(e.consume(d),T):t(d)}function T(d){return d===null||z(d)?_(d):q(d)?(e.consume(d),T):t(d)}function _(d){return d===45&&i===2?(e.consume(d),re):d===60&&i===1?(e.consume(d),Q):d===62&&i===4?(e.consume(d),J):d===63&&i===3?(e.consume(d),m):d===93&&i===5?(e.consume(d),ee):z(d)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ha,fe,P)(d)):d===null||z(d)?(e.exit("htmlFlowData"),P(d)):(e.consume(d),_)}function P(d){return e.check(pa,R,fe)(d)}function R(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),D}function D(d){return d===null||z(d)?P(d):(e.enter("htmlFlowData"),_(d))}function re(d){return d===45?(e.consume(d),m):_(d)}function Q(d){return d===47?(e.consume(d),l="",ie):_(d)}function ie(d){if(d===62){const ae=l.toLowerCase();return br.includes(ae)?(e.consume(d),J):_(d)}return ye(d)&&l.length<8?(e.consume(d),l+=String.fromCharCode(d),ie):_(d)}function ee(d){return d===93?(e.consume(d),m):_(d)}function m(d){return d===62?(e.consume(d),J):d===45&&i===2?(e.consume(d),m):_(d)}function J(d){return d===null||z(d)?(e.exit("htmlFlowData"),fe(d)):(e.consume(d),J)}function fe(d){return e.exit("htmlFlow"),n(d)}}function ga(e,n,t){const r=this;return i;function i(l){return z(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):t(l)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function ya(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(zt,n,t)}}const xa={name:"htmlText",tokenize:ka};function ka(e,n,t){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),s):m===47?(e.consume(m),N):m===63?(e.consume(m),C):ye(m)?(e.consume(m),W):t(m)}function s(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,g):ye(m)?(e.consume(m),I):t(m)}function f(m){return m===45?(e.consume(m),h):t(m)}function c(m){return m===null?t(m):m===45?(e.consume(m),p):z(m)?(l=c,Q(m)):(e.consume(m),c)}function p(m){return m===45?(e.consume(m),h):c(m)}function h(m){return m===62?re(m):m===45?p(m):c(m)}function g(m){const J="CDATA[";return m===J.charCodeAt(o++)?(e.consume(m),o===J.length?w:g):t(m)}function w(m){return m===null?t(m):m===93?(e.consume(m),v):z(m)?(l=w,Q(m)):(e.consume(m),w)}function v(m){return m===93?(e.consume(m),x):w(m)}function x(m){return m===62?re(m):m===93?(e.consume(m),x):w(m)}function I(m){return m===null||m===62?re(m):z(m)?(l=I,Q(m)):(e.consume(m),I)}function C(m){return m===null?t(m):m===63?(e.consume(m),L):z(m)?(l=C,Q(m)):(e.consume(m),C)}function L(m){return m===62?re(m):C(m)}function N(m){return ye(m)?(e.consume(m),k):t(m)}function k(m){return m===45||ge(m)?(e.consume(m),k):$(m)}function $(m){return z(m)?(l=$,Q(m)):q(m)?(e.consume(m),$):re(m)}function W(m){return m===45||ge(m)?(e.consume(m),W):m===47||m===62||Z(m)?B(m):t(m)}function B(m){return m===47?(e.consume(m),re):m===58||m===95||ye(m)?(e.consume(m),y):z(m)?(l=B,Q(m)):q(m)?(e.consume(m),B):re(m)}function y(m){return m===45||m===46||m===58||m===95||ge(m)?(e.consume(m),y):T(m)}function T(m){return m===61?(e.consume(m),_):z(m)?(l=T,Q(m)):q(m)?(e.consume(m),T):B(m)}function _(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),i=m,P):z(m)?(l=_,Q(m)):q(m)?(e.consume(m),_):(e.consume(m),R)}function P(m){return m===i?(e.consume(m),i=void 0,D):m===null?t(m):z(m)?(l=P,Q(m)):(e.consume(m),P)}function R(m){return m===null||m===34||m===39||m===60||m===61||m===96?t(m):m===47||m===62||Z(m)?B(m):(e.consume(m),R)}function D(m){return m===47||m===62||Z(m)?B(m):t(m)}function re(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),n):t(m)}function Q(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),ie}function ie(m){return q(m)?U(e,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):ee(m)}function ee(m){return e.enter("htmlTextData"),l(m)}}const Fn={name:"labelEnd",resolveAll:Sa,resolveTo:Ca,tokenize:Aa},ba={tokenize:Ia},wa={tokenize:Ea},va={tokenize:_a};function Sa(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&Ie(e,0,e.length,t),e}function Ca(e,n){let t=e.length,r=0,i,o,l,a;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",u,n],["enter",s,n]],a=_e(a,e.slice(o+1,o+r+3)),a=_e(a,[["enter",f,n]]),a=_e(a,Yt(n.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),n)),a=_e(a,[["exit",f,n],e[l-2],e[l-1],["exit",s,n]]),a=_e(a,e.slice(l+1)),a=_e(a,[["exit",u,n]]),Ie(e,o,e.length,a),e}function Aa(e,n,t){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(Le(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):t(p)}function u(p){return p===40?e.attempt(ba,f,l?f:c)(p):p===91?e.attempt(wa,f,l?s:c)(p):l?f(p):c(p)}function s(p){return e.attempt(va,f,c)(p)}function f(p){return n(p)}function c(p){return o._balanced=!0,t(p)}}function Ia(e,n,t){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Z(c)?It(e,o)(c):o(c)}function o(c){return c===41?f(c):ri(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return Z(c)?It(e,u)(c):f(c)}function a(c){return t(c)}function u(c){return c===34||c===39||c===40?li(e,s,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function s(c){return Z(c)?It(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),n):t(c)}}function Ea(e,n,t){const r=this;return i;function i(a){return ii.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(Le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function l(a){return t(a)}}function _a(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}const Ta={name:"labelStartImage",resolveAll:Fn.resolveAll,tokenize:Pa};function Pa(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const za={name:"labelStartLink",resolveAll:Fn.resolveAll,tokenize:Da};function Da(e,n,t){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const fn={name:"lineEnding",tokenize:La};function La(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),U(e,n,"linePrefix")}}const qt={name:"thematicBreak",tokenize:Fa};function Fa(e,n,t){let r=0,i;return o;function o(s){return e.enter("thematicBreak"),l(s)}function l(s){return i=s,a(s)}function a(s){return s===i?(e.enter("thematicBreakSequence"),u(s)):r>=3&&(s===null||z(s))?(e.exit("thematicBreak"),n(s)):t(s)}function u(s){return s===i?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),q(s)?U(e,a,"whitespace")(s):a(s))}}const xe={continuation:{tokenize:Ma},exit:$a,name:"list",tokenize:Ra},Na={partial:!0,tokenize:ja},Oa={partial:!0,tokenize:Ba};function Ra(e,n,t){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:vn(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(qt,t,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return t(h)}function u(h){return vn(h)&&++l<10?(e.consume(h),u):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):t(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(zt,r.interrupt?t:f,e.attempt(Na,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return q(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):t(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(h)}}function Ma(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(zt,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,n,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!q(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Oa,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(xe,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Ba(e,n,t){const r=this;return U(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(o):t(o)}}function $a(e){e.exit(this.containerState.type)}function ja(e,n,t){const r=this;return U(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!q(o)&&l&&l[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}const wr={name:"setextUnderline",resolveTo:qa,tokenize:Ha};function qa(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function Ha(e,n,t){const r=this;let i;return o;function o(s){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=s,l(s)):t(s)}function l(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),q(s)?U(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||z(s)?(e.exit("setextHeadingLine"),n(s)):t(s)}}const Ua={tokenize:Va};function Va(e){const n=this,t=e.attempt(zt,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Go,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Wa={resolveAll:ai()},Qa=oi("string"),Ya=oi("text");function oi(e){return{resolveAll:ai(e==="text"?Ka:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,l,a);return l;function l(f){return s(f)?o(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),u}function u(f){return s(f)?(t.exit("data"),o(f)):(t.consume(f),u)}function s(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ai(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function Ka(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let o=i.length,l=-1,a=0,u;for(;o--;){const s=i[o];if(typeof s=="string"){for(l=s.length;s.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(s===-2)u=!0,a++;else if(s!==-1){o++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const s={type:t===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...s.start},r.start.offset===r.end.offset?Object.assign(r,s):(e.splice(t,0,["enter",s,n],["exit",s,n]),t+=2)}t++}return e}const Ga={42:xe,43:xe,45:xe,48:xe,49:xe,50:xe,51:xe,52:xe,53:xe,54:xe,55:xe,56:xe,57:xe,62:Jr},Xa={91:ta},Za={[-2]:cn,[-1]:cn,32:cn},Ja={35:aa,42:qt,45:[wr,qt],60:fa,61:wr,95:qt,96:kr,126:kr},eu={38:ti,92:ei},tu={[-5]:fn,[-4]:fn,[-3]:fn,33:Ta,38:ti,42:Sn,60:[zo,xa],91:za,92:[la,ei],93:Fn,95:Sn,96:Uo},nu={null:[Sn,Wa]},ru={null:[42,95]},iu={null:[]},lu=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ru,contentInitial:Xa,disable:iu,document:Ga,flow:Ja,flowInitial:Za,insideSpan:nu,string:eu,text:tu},Symbol.toStringTag,{value:"Module"}));function ou(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},o=[];let l=[],a=[];const u={attempt:$(N),check:$(k),consume:I,enter:C,exit:L,interrupt:$(k,{interrupt:!0})},s={code:null,containerState:{},defineSkip:w,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=n.tokenize.call(s,u);return n.resolveAll&&o.push(n),s;function c(T){return l=_e(l,T),v(),l[l.length-1]!==null?[]:(W(n,0),s.events=Yt(o,s.events,s),s.events)}function p(T,_){return uu(h(T),_)}function h(T){return au(l,T)}function g(){const{_bufferIndex:T,_index:_,line:P,column:R,offset:D}=r;return{_bufferIndex:T,_index:_,line:P,column:R,offset:D}}function w(T){i[T.line]=T.column,y()}function v(){let T;for(;r._index<l.length;){const _=l[r._index];if(typeof _=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<_.length;)x(_.charCodeAt(r._bufferIndex));else x(_)}}function x(T){f=f(T)}function I(T){z(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,y()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=T}function C(T,_){const P=_||{};return P.type=T,P.start=g(),s.events.push(["enter",P,s]),a.push(P),P}function L(T){const _=a.pop();return _.end=g(),s.events.push(["exit",_,s]),_}function N(T,_){W(T,_.from)}function k(T,_){_.restore()}function $(T,_){return P;function P(R,D,re){let Q,ie,ee,m;return Array.isArray(R)?fe(R):"tokenize"in R?fe([R]):J(R);function J(Y){return we;function we(le){const se=le!==null&&Y[le],Ee=le!==null&&Y.null,je=[...Array.isArray(se)?se:se?[se]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return fe(je)(le)}}function fe(Y){return Q=Y,ie=0,Y.length===0?re:d(Y[ie])}function d(Y){return we;function we(le){return m=B(),ee=Y,Y.partial||(s.currentConstruct=Y),Y.name&&s.parser.constructs.disable.null.includes(Y.name)?me():Y.tokenize.call(_?Object.assign(Object.create(s),_):s,u,ae,me)(le)}}function ae(Y){return T(ee,m),D}function me(Y){return m.restore(),++ie<Q.length?d(Q[ie]):re}}}function W(T,_){T.resolveAll&&!o.includes(T)&&o.push(T),T.resolve&&Ie(s.events,_,s.events.length-_,T.resolve(s.events.slice(_),s)),T.resolveTo&&(s.events=T.resolveTo(s.events,s))}function B(){const T=g(),_=s.previous,P=s.currentConstruct,R=s.events.length,D=Array.from(a);return{from:R,restore:re};function re(){r=T,s.previous=_,s.currentConstruct=P,s.events.length=R,a=D,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function au(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,o)];else{if(l=e.slice(t,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function uu(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
1
+ import{g as Zt,c as ft,a as ne,d as sl,p as cl,f as pe,b as qe,s as Jt}from"../chunks/CpBqNZvJ.js";import{j as Ft,q as Vn,av as vt,t as Ve,k as Wn,U as fl,bs as hl,w as Qn,aC as pl,aE as ml,aL as dl,aF as gl,au as yl,a$ as xl,bt as kl,p as rt,f as Qe,n as Oe,a as it,h as He,b as Yn,g as A,y as bl,z as wl,e as vl,d as he,c as j,s as oe,r as M,$ as Sl,x as Ze,u as Ce,i as Cl}from"../chunks/BY45LdLb.js";import{s as ht,r as pt,i as Fe}from"../chunks/C54SSc0V.js";import{I as mt,s as dt,y as Al,h as Il,e as El,T as en,g as Kn,i as Gn,f as Nt,d as _l,r as Tl,p as Pl}from"../chunks/VJxQahu8.js";import{i as zl}from"../chunks/DU96-whN.js";import{C as Xn}from"../chunks/YI4sMSJr.js";import{a as Dl,g as Ll}from"../chunks/DAwIjc0G.js";import{A as Zn,I as Jn}from"../chunks/DJV3rGyD.js";import{O as er}from"../chunks/lVsnUgwN.js";import{L as Fl,S as Nl}from"../chunks/DmfCqOHO.js";import{T as tr}from"../chunks/DFiNRRx4.js";import{M as nr}from"../chunks/BIeGoGN3.js";import{T as rr,S as Ol}from"../chunks/Bv0tjW4d.js";function ir(e,n,t=!1,r=!1,i=!1,o=!1){var l=e,a="";if(t){var u=e;Ft&&(l=Vn(vt(u)))}Ve(()=>{var s=fl;if(a===(a=n()??"")){Ft&&Wn();return}if(t&&!Ft){s.nodes=null,u.innerHTML=a,a!==""&&Zt(vt(u),u.lastChild);return}if(s.nodes!==null&&(hl(s.nodes.start,s.nodes.end),s.nodes=null),a!==""){if(Ft){Qn.data;for(var f=Wn(),c=f;f!==null&&(f.nodeType!==pl||f.data!=="");)c=f,f=ml(f);if(f===null)throw dl(),gl;Zt(Qn,c),l=Vn(f);return}var p=r?xl:i?kl:void 0,h=yl(r?"svg":i?"math":"template",p);h.innerHTML=a;var g=r||i?h:h.content;if(Zt(vt(g),g.lastChild),r||i)for(;vt(g);)l.before(vt(g));else l.before(g)}})}var Rl=new Set(["$$slots","$$events","$$legacy"]);function Ml(e,n){rt(n,!0);let t=pt(n,Rl);const r=[["path",{d:"m6 9 6 6 6-6"}]];mt(e,ht({name:"chevron-down"},()=>t,{get iconNode(){return r},children:(i,o)=>{var l=ft(),a=Qe(l);dt(a,()=>n.children??Oe),ne(i,l)},$$slots:{default:!0}})),it()}var Bl=new Set(["$$slots","$$events","$$legacy"]);function $l(e,n){rt(n,!0);let t=pt(n,Bl);const r=[["path",{d:"m18 15-6-6-6 6"}]];mt(e,ht({name:"chevron-up"},()=>t,{get iconNode(){return r},children:(i,o)=>{var l=ft(),a=Qe(l);dt(a,()=>n.children??Oe),ne(i,l)},$$slots:{default:!0}})),it()}var jl=new Set(["$$slots","$$events","$$legacy"]);function ql(e,n){rt(n,!0);let t=pt(n,jl);const r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M8 12h8"}],["path",{d:"M12 8v8"}]];mt(e,ht({name:"circle-plus"},()=>t,{get iconNode(){return r},children:(i,o)=>{var l=ft(),a=Qe(l);dt(a,()=>n.children??Oe),ne(i,l)},$$slots:{default:!0}})),it()}var Hl=new Set(["$$slots","$$events","$$legacy"]);function lr(e,n){rt(n,!0);let t=pt(n,Hl);const r=[["line",{x1:"2",x2:"22",y1:"2",y2:"22"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9"}]];mt(e,ht({name:"image-off"},()=>t,{get iconNode(){return r},children:(i,o)=>{var l=ft(),a=Qe(l);dt(a,()=>n.children??Oe),ne(i,l)},$$slots:{default:!0}})),it()}var Ul=new Set(["$$slots","$$events","$$legacy"]);function Vl(e,n){rt(n,!0);let t=pt(n,Ul);const r=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];mt(e,ht({name:"image"},()=>t,{get iconNode(){return r},children:(i,o)=>{var l=ft(),a=Qe(l);dt(a,()=>n.children??Oe),ne(i,l)},$$slots:{default:!0}})),it()}var Wl=new Set(["$$slots","$$events","$$legacy"]);function Ql(e,n){rt(n,!0);let t=pt(n,Wl);const r=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];mt(e,ht({name:"pencil"},()=>t,{get iconNode(){return r},children:(i,o)=>{var l=ft(),a=Qe(l);dt(a,()=>n.children??Oe),ne(i,l)},$$slots:{default:!0}})),it()}function or(e){if(e)throw e}var tn,ar;function Yl(){if(ar)return tn;ar=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(s){return typeof Array.isArray=="function"?Array.isArray(s):n.call(s)==="[object Array]"},o=function(s){if(!s||n.call(s)!=="[object Object]")return!1;var f=e.call(s,"constructor"),c=s.constructor&&s.constructor.prototype&&e.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!f&&!c)return!1;var p;for(p in s);return typeof p>"u"||e.call(s,p)},l=function(s,f){t&&f.name==="__proto__"?t(s,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):s[f.name]=f.newValue},a=function(s,f){if(f==="__proto__")if(e.call(s,f)){if(r)return r(s,f).value}else return;return s[f]};return tn=function u(){var s,f,c,p,h,g,w=arguments[0],v=1,x=arguments.length,I=!1;for(typeof w=="boolean"&&(I=w,w=arguments[1]||{},v=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});v<x;++v)if(s=arguments[v],s!=null)for(f in s)c=a(w,f),p=a(s,f),w!==p&&(I&&p&&(o(p)||(h=i(p)))?(h?(h=!1,g=c&&i(c)?c:[]):g=c&&o(c)?c:{},l(w,{name:f,newValue:u(I,g,p)})):typeof p<"u"&&l(w,{name:f,newValue:p}));return w},tn}var Kl=Yl();const nn=Al(Kl);function kn(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Gl(){const e=[],n={run:t,use:r};return n;function t(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(u,...s){const f=e[++o];let c=-1;if(u){l(u);return}for(;++c<i.length;)(s[c]===null||s[c]===void 0)&&(s[c]=i[c]);i=s,f?Xl(f,a)(...s):l(null,...s)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Xl(e,n){let t;return r;function r(...l){const a=e.length>l.length;let u;a&&l.push(i);try{u=e.apply(this,l)}catch(s){const f=s;if(a&&t)throw f;return i(f)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...a){t||(t=!0,n(l,...a))}function o(l){i(null,l)}}function At(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ur(e.position):"start"in e||"end"in e?ur(e):"line"in e||"column"in e?bn(e):""}function bn(e){return sr(e&&e.line)+":"+sr(e&&e.column)}function ur(e){return bn(e&&e.start)+"-"+bn(e&&e.end)}function sr(e){return e&&typeof e=="number"?e:1}class ke extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},l=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=At(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ke.prototype.file="";ke.prototype.name="";ke.prototype.reason="";ke.prototype.message="";ke.prototype.stack="";ke.prototype.column=void 0;ke.prototype.line=void 0;ke.prototype.ancestors=void 0;ke.prototype.cause=void 0;ke.prototype.fatal=void 0;ke.prototype.place=void 0;ke.prototype.ruleId=void 0;ke.prototype.source=void 0;const Ne={basename:Zl,dirname:Jl,extname:eo,join:to,sep:"/"};function Zl(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Pt(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function Jl(e){if(Pt(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function eo(e){Pt(e);let n=e.length,t=-1,r=0,i=-1,o=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function to(...e){let n=-1,t;for(;++n<e.length;)Pt(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":no(t)}function no(e){Pt(e);const n=e.codePointAt(0)===47;let t=ro(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function ro(e,n){let t="",r=0,i=-1,o=0,l=-1,a,u;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(u=t.lastIndexOf("/"),u!==t.length-1){u<0?(t="",r=0):(t=t.slice(0,u),r=t.length-1-t.lastIndexOf("/")),i=l,o=0;continue}}else if(t.length>0){t="",r=0,i=l,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return t}function Pt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const io={cwd:lo};function lo(){return"/"}function wn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function oo(e){if(typeof e=="string")e=new URL(e);else if(!wn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return ao(e)}function ao(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 n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+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(n)}const rn=["history","path","basename","stem","extname","dirname"];class uo{constructor(n){let t;n?wn(n)?t={path:n}:typeof n=="string"||so(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":io.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<rn.length;){const o=rn[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)rn.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?Ne.basename(this.path):void 0}set basename(n){on(n,"basename"),ln(n,"basename"),this.path=Ne.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Ne.dirname(this.path):void 0}set dirname(n){cr(this.basename,"dirname"),this.path=Ne.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Ne.extname(this.path):void 0}set extname(n){if(ln(n,"extname"),cr(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ne.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){wn(n)&&(n=oo(n)),on(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Ne.basename(this.path,this.extname):void 0}set stem(n){on(n,"stem"),ln(n,"stem"),this.path=Ne.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new ke(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function ln(e,n){if(e&&e.includes(Ne.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Ne.sep+"`")}function on(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function cr(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function so(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const co=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),fo={}.hasOwnProperty;class zn extends co{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=Gl()}copy(){const n=new zn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(nn(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(sn("data",this.frozen),this.namespace[n]=t,this):fo.call(this.namespace,n)&&this.namespace[n]||void 0:n?(sn("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=Ot(n),r=this.parser||this.Parser;return an("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),an("process",this.parser||this.Parser),un("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,l){const a=Ot(n),u=r.parse(a);r.run(u,a,function(f,c,p){if(f||!c||!p)return s(f);const h=c,g=r.stringify(h,p);mo(g)?p.value=g:p.result=g,s(f,p)});function s(f,c){f||!c?l(f):o?o(c):t(void 0,c)}}}processSync(n){let t=!1,r;return this.freeze(),an("processSync",this.parser||this.Parser),un("processSync",this.compiler||this.Compiler),this.process(n,i),hr("processSync","process",t),r;function i(o,l){t=!0,or(o),r=l}}run(n,t,r){fr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const u=Ot(t);i.run(n,u,s);function s(f,c,p){const h=c||n;f?a(f):l?l(h):r(void 0,h,p)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),hr("runSync","run",r),i;function o(l,a){or(l),i=a,r=!0}}stringify(n,t){this.freeze();const r=Ot(t),i=this.compiler||this.Compiler;return un("stringify",i),fr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(sn("use",this.frozen),n!=null)if(typeof n=="function")u(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(s){if(typeof s=="function")u(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[f,...c]=s;u(f,c)}else l(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function l(s){if(!("plugins"in s)&&!("settings"in s))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");a(s.plugins),s.settings&&(i.settings=nn(!0,i.settings,s.settings))}function a(s){let f=-1;if(s!=null)if(Array.isArray(s))for(;++f<s.length;){const c=s[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function u(s,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===s){p=c;break}if(p===-1)r.push([s,...f]);else if(f.length>0){let[h,...g]=f;const w=r[p][1];kn(w)&&kn(h)&&(h=nn(!0,w,h)),r[p]=[s,h,...g]}}}}const ho=new zn().freeze();function an(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function un(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fr(e){if(!kn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function hr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ot(e){return po(e)?e:new uo(e)}function po(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mo(e){return typeof e=="string"||go(e)}function go(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yo={};function Dn(e,n){const t=yo,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Gr(e,r,i)}function Gr(e,n,t){if(xo(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return pr(e.children,n,t)}return Array.isArray(e)?pr(e,n,t):""}function pr(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Gr(e[i],n,t);return r.join("")}function xo(e){return!!(e&&typeof e=="object")}const mr=document.createElement("i");function Ln(e){const n="&"+e+";";mr.innerHTML=n;const t=mr.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function Ie(e,n,t,r){const i=e.length;let o=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);o<r.length;)l=r.slice(o,o+1e4),l.unshift(n,0),e.splice(...l),o+=1e4,n+=1e4}function _e(e,n){return e.length>0?(Ie(e,e.length,0,n),e):n}const dr={}.hasOwnProperty;function Xr(e){const n={};let t=-1;for(;++t<e.length;)ko(n,e[t]);return n}function ko(e,n){let t;for(t in n){const i=(dr.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let l;if(o)for(l in o){dr.call(i,l)||(i[l]=[]);const a=o[l];bo(i[l],Array.isArray(a)?a:a?[a]:[])}}}function bo(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);Ie(e,0,0,r)}function Zr(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Le(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ye=Ye(/[A-Za-z]/),ge=Ye(/[\dA-Za-z]/),wo=Ye(/[#-'*+\--9=?A-Z^-~]/);function Ht(e){return e!==null&&(e<32||e===127)}const vn=Ye(/\d/),vo=Ye(/[\dA-Fa-f]/),So=Ye(/[!-/:-@[-`{-~]/);function z(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function q(e){return e===-2||e===-1||e===32}const Qt=Ye(new RegExp("\\p{P}|\\p{S}","u")),nt=Ye(/\s/);function Ye(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function gt(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const o=e.charCodeAt(t);let l="";if(o===37&&ge(e.charCodeAt(t+1))&&ge(e.charCodeAt(t+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function U(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return q(u)?(e.enter(t),a(u)):n(u)}function a(u){return q(u)&&o++<i?(e.consume(u),a):(e.exit(t),n(u))}}const Co={tokenize:Ao};function Ao(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),U(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return z(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Io={tokenize:Eo},gr={tokenize:_o};function Eo(e){const n=this,t=[];let r=0,i,o,l;return a;function a(C){if(r<t.length){const L=t[r];return n.containerState=L[1],e.attempt(L[0].continuation,u,s)(C)}return s(C)}function u(C){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&I();const L=n.events.length;let N=L,k;for(;N--;)if(n.events[N][0]==="exit"&&n.events[N][1].type==="chunkFlow"){k=n.events[N][1].end;break}x(r);let $=L;for(;$<n.events.length;)n.events[$][1].end={...k},$++;return Ie(n.events,N+1,0,n.events.slice(L)),n.events.length=$,s(C)}return a(C)}function s(C){if(r===t.length){if(!i)return p(C);if(i.currentConstruct&&i.currentConstruct.concrete)return g(C);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(gr,f,c)(C)}function f(C){return i&&I(),x(r),p(C)}function c(C){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,g(C)}function p(C){return n.containerState={},e.attempt(gr,h,g)(C)}function h(C){return r++,t.push([n.currentConstruct,n.containerState]),p(C)}function g(C){if(C===null){i&&I(),x(0),e.consume(C);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),w(C)}function w(C){if(C===null){v(e.exit("chunkFlow"),!0),x(0),e.consume(C);return}return z(C)?(e.consume(C),v(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(C),w)}function v(C,L){const N=n.sliceStream(C);if(L&&N.push(null),C.previous=o,o&&(o.next=C),o=C,i.defineSkip(C.start),i.write(N),n.parser.lazy[C.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<l&&(!i.events[k][1].end||i.events[k][1].end.offset>l))return;const $=n.events.length;let W=$,B,y;for(;W--;)if(n.events[W][0]==="exit"&&n.events[W][1].type==="chunkFlow"){if(B){y=n.events[W][1].end;break}B=!0}for(x(r),k=$;k<n.events.length;)n.events[k][1].end={...y},k++;Ie(n.events,W+1,0,n.events.slice($)),n.events.length=k}}function x(C){let L=t.length;for(;L-- >C;){const N=t[L];n.containerState=N[1],N[0].exit.call(n,e)}t.length=C}function I(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function _o(e,n,t){return U(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ct(e){if(e===null||Z(e)||nt(e))return 1;if(Qt(e))return 2}function Yt(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const Sn={name:"attention",resolveAll:To,tokenize:Po};function To(e,n){let t=-1,r,i,o,l,a,u,s,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[t][1].start};yr(c,-u),yr(p,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[t][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=_e(s,[["enter",e[r][1],n],["exit",e[r][1],n]])),s=_e(s,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",o,n]]),s=_e(s,Yt(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),s=_e(s,[["exit",o,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,s=_e(s,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,Ie(e,r-1,t-r+3,s),t=r+s.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Po(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ct(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const s=e.exit("attentionSequence"),f=ct(u),c=!f||f===2&&i||t.includes(u),p=!i||i===2&&f||t.includes(r);return s._open=!!(o===42?c:c&&(i||!p)),s._close=!!(o===42?p:p&&(f||!c)),n(u)}}function yr(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const zo={name:"autolink",tokenize:Do};function Do(e,n,t){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return ye(h)?(e.consume(h),l):h===64?t(h):s(h)}function l(h){return h===43||h===45||h===46||ge(h)?(r=1,a(h)):s(h)}function a(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||ge(h))&&r++<32?(e.consume(h),a):(r=0,s(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):h===null||h===32||h===60||Ht(h)?t(h):(e.consume(h),u)}function s(h){return h===64?(e.consume(h),f):wo(h)?(e.consume(h),s):t(h)}function f(h){return ge(h)?c(h):t(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):p(h)}function p(h){if((h===45||ge(h))&&r++<63){const g=h===45?p:c;return e.consume(h),g}return t(h)}}const zt={partial:!0,tokenize:Lo};function Lo(e,n,t){return r;function r(o){return q(o)?U(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||z(o)?n(o):t(o)}}const Jr={continuation:{tokenize:No},exit:Oo,name:"blockQuote",tokenize:Fo};function Fo(e,n,t){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return t(l)}function o(l){return q(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function No(e,n,t){const r=this;return i;function i(l){return q(l)?U(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Jr,n,t)(l)}}function Oo(e){e.exit("blockQuote")}const ei={name:"characterEscape",tokenize:Ro};function Ro(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return So(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}const ti={name:"characterReference",tokenize:Mo};function Mo(e,n,t){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,l=ge,f(c))}function s(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=vo,f):(e.enter("characterReferenceValue"),o=7,l=vn,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===ge&&!Ln(r.sliceSerialize(p))?t(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(c)&&i++<o?(e.consume(c),f):t(c)}}const xr={partial:!0,tokenize:$o},kr={concrete:!0,name:"codeFenced",tokenize:Bo};function Bo(e,n,t){const r=this,i={partial:!0,tokenize:N};let o=0,l=0,a;return u;function u(k){return s(k)}function s(k){const $=r.events[r.events.length-1];return o=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,a=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(k)}function f(k){return k===a?(l++,e.consume(k),f):l<3?t(k):(e.exit("codeFencedFenceSequence"),q(k)?U(e,c,"whitespace")(k):c(k))}function c(k){return k===null||z(k)?(e.exit("codeFencedFence"),r.interrupt?n(k):e.check(xr,w,L)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||z(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(k)):q(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,h,"whitespace")(k)):k===96&&k===a?t(k):(e.consume(k),p)}function h(k){return k===null||z(k)?c(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===null||z(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(k)):k===96&&k===a?t(k):(e.consume(k),g)}function w(k){return e.attempt(i,L,v)(k)}function v(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),x}function x(k){return o>0&&q(k)?U(e,I,"linePrefix",o+1)(k):I(k)}function I(k){return k===null||z(k)?e.check(xr,w,L)(k):(e.enter("codeFlowValue"),C(k))}function C(k){return k===null||z(k)?(e.exit("codeFlowValue"),I(k)):(e.consume(k),C)}function L(k){return e.exit("codeFenced"),n(k)}function N(k,$,W){let B=0;return y;function y(D){return k.enter("lineEnding"),k.consume(D),k.exit("lineEnding"),T}function T(D){return k.enter("codeFencedFence"),q(D)?U(k,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):_(D)}function _(D){return D===a?(k.enter("codeFencedFenceSequence"),P(D)):W(D)}function P(D){return D===a?(B++,k.consume(D),P):B>=l?(k.exit("codeFencedFenceSequence"),q(D)?U(k,R,"whitespace")(D):R(D)):W(D)}function R(D){return D===null||z(D)?(k.exit("codeFencedFence"),$(D)):W(D)}}}function $o(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const cn={name:"codeIndented",tokenize:qo},jo={partial:!0,tokenize:Ho};function qo(e,n,t){const r=this;return i;function i(s){return e.enter("codeIndented"),U(e,o,"linePrefix",5)(s)}function o(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(s):t(s)}function l(s){return s===null?u(s):z(s)?e.attempt(jo,l,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||z(s)?(e.exit("codeFlowValue"),l(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),n(s)}}function Ho(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):z(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):U(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):z(l)?i(l):t(l)}}const Uo={name:"codeText",previous:Wo,resolve:Vo,tokenize:Qo};function Vo(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function Wo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Qo(e,n,t){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?t(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):z(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),s(c))}function s(c){return c===null||c===32||c===96||z(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),s)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(c)):(o.type="codeTextData",s(c))}}class Yo{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&St(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),St(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),St(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);St(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);St(this.left,t.reverse())}}}function St(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function ni(e){const n={};let t=-1,r,i,o,l,a,u,s;const f=new Yo(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Ko(f,t)),t=n[t],s=!0);else if(r[1]._container){for(o=t,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,t),a.unshift(r),f.splice(i,t-i+1,a))}}return Ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!s}function Ko(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,u=[],s={};let f,c,p=-1,h=t,g=0,w=0;const v=[w];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=t;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(w=p+1,v.push(w),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):v.pop(),p=v.length;p--;){const x=a.slice(v[p],v[p+1]),I=o.pop();u.push([I,I+x.length-1]),e.splice(I,2,x)}for(u.reverse(),p=-1;++p<u.length;)s[g+u[p][0]]=g+u[p][1],g+=u[p][1]-u[p][0]-1;return s}const Go={resolve:Zo,tokenize:Jo},Xo={partial:!0,tokenize:ea};function Zo(e){return ni(e),e}function Jo(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):z(a)?e.check(Xo,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function ea(e,n,t){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),U(e,o,"linePrefix")}function o(l){if(l===null||z(l))return t(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function ri(e,n,t,r,i,o,l,a,u){const s=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||Ht(x)?t(x):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),w(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(a),p(x)):x===null||x===60||z(x)?t(x):(e.consume(x),x===92?g:h)}function g(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function w(x){return!f&&(x===null||x===41||Z(x))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(x)):f<s&&x===40?(e.consume(x),f++,w):x===41?(e.consume(x),f--,w):x===null||x===32||x===40||Ht(x)?t(x):(e.consume(x),x===92?v:w)}function v(x){return x===40||x===41||x===92?(e.consume(x),w):w(x)}}function ii(e,n,t,r,i,o){const l=this;let a=0,u;return s;function s(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||z(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!q(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function li(e,n,t,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,u):t(p)}function u(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):(e.enter(o),s(p))}function s(p){return p===l?(e.exit(o),u(l)):p===null?t(p):z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),U(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||z(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function It(e,n){let t;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):q(i)?U(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const ta={name:"definition",tokenize:ra},na={partial:!0,tokenize:ia};function ra(e,n,t){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return ii.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=Le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):t(h)}function u(h){return Z(h)?It(e,s)(h):s(h)}function s(h){return ri(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(na,c,c)(h)}function c(h){return q(h)?U(e,p,"whitespace")(h):p(h)}function p(h){return h===null||z(h)?(e.exit("definition"),r.parser.defined.push(i),n(h)):t(h)}}function ia(e,n,t){return r;function r(a){return Z(a)?It(e,i)(a):t(a)}function i(a){return li(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return q(a)?U(e,l,"whitespace")(a):l(a)}function l(a){return a===null||z(a)?n(a):t(a)}}const la={name:"hardBreakEscape",tokenize:oa};function oa(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return z(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const aa={name:"headingAtx",resolve:ua,tokenize:sa};function ua(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},Ie(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function sa(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||Z(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||z(f)?(e.exit("atxHeading"),n(f)):q(f)?U(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||Z(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const ca=["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"],br=["pre","script","style","textarea"],fa={concrete:!0,name:"htmlFlow",resolveTo:ma,tokenize:da},ha={partial:!0,tokenize:ya},pa={partial:!0,tokenize:ga};function ma(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function da(e,n,t){const r=this;let i,o,l,a,u;return s;function s(d){return f(d)}function f(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),c}function c(d){return d===33?(e.consume(d),p):d===47?(e.consume(d),o=!0,w):d===63?(e.consume(d),i=3,r.interrupt?n:m):ye(d)?(e.consume(d),l=String.fromCharCode(d),v):t(d)}function p(d){return d===45?(e.consume(d),i=2,h):d===91?(e.consume(d),i=5,a=0,g):ye(d)?(e.consume(d),i=4,r.interrupt?n:m):t(d)}function h(d){return d===45?(e.consume(d),r.interrupt?n:m):t(d)}function g(d){const ae="CDATA[";return d===ae.charCodeAt(a++)?(e.consume(d),a===ae.length?r.interrupt?n:_:g):t(d)}function w(d){return ye(d)?(e.consume(d),l=String.fromCharCode(d),v):t(d)}function v(d){if(d===null||d===47||d===62||Z(d)){const ae=d===47,me=l.toLowerCase();return!ae&&!o&&br.includes(me)?(i=1,r.interrupt?n(d):_(d)):ca.includes(l.toLowerCase())?(i=6,ae?(e.consume(d),x):r.interrupt?n(d):_(d)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(d):o?I(d):C(d))}return d===45||ge(d)?(e.consume(d),l+=String.fromCharCode(d),v):t(d)}function x(d){return d===62?(e.consume(d),r.interrupt?n:_):t(d)}function I(d){return q(d)?(e.consume(d),I):y(d)}function C(d){return d===47?(e.consume(d),y):d===58||d===95||ye(d)?(e.consume(d),L):q(d)?(e.consume(d),C):y(d)}function L(d){return d===45||d===46||d===58||d===95||ge(d)?(e.consume(d),L):N(d)}function N(d){return d===61?(e.consume(d),k):q(d)?(e.consume(d),N):C(d)}function k(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),u=d,$):q(d)?(e.consume(d),k):W(d)}function $(d){return d===u?(e.consume(d),u=null,B):d===null||z(d)?t(d):(e.consume(d),$)}function W(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||Z(d)?N(d):(e.consume(d),W)}function B(d){return d===47||d===62||q(d)?C(d):t(d)}function y(d){return d===62?(e.consume(d),T):t(d)}function T(d){return d===null||z(d)?_(d):q(d)?(e.consume(d),T):t(d)}function _(d){return d===45&&i===2?(e.consume(d),re):d===60&&i===1?(e.consume(d),Q):d===62&&i===4?(e.consume(d),J):d===63&&i===3?(e.consume(d),m):d===93&&i===5?(e.consume(d),ee):z(d)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ha,fe,P)(d)):d===null||z(d)?(e.exit("htmlFlowData"),P(d)):(e.consume(d),_)}function P(d){return e.check(pa,R,fe)(d)}function R(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),D}function D(d){return d===null||z(d)?P(d):(e.enter("htmlFlowData"),_(d))}function re(d){return d===45?(e.consume(d),m):_(d)}function Q(d){return d===47?(e.consume(d),l="",ie):_(d)}function ie(d){if(d===62){const ae=l.toLowerCase();return br.includes(ae)?(e.consume(d),J):_(d)}return ye(d)&&l.length<8?(e.consume(d),l+=String.fromCharCode(d),ie):_(d)}function ee(d){return d===93?(e.consume(d),m):_(d)}function m(d){return d===62?(e.consume(d),J):d===45&&i===2?(e.consume(d),m):_(d)}function J(d){return d===null||z(d)?(e.exit("htmlFlowData"),fe(d)):(e.consume(d),J)}function fe(d){return e.exit("htmlFlow"),n(d)}}function ga(e,n,t){const r=this;return i;function i(l){return z(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):t(l)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function ya(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(zt,n,t)}}const xa={name:"htmlText",tokenize:ka};function ka(e,n,t){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),s):m===47?(e.consume(m),N):m===63?(e.consume(m),C):ye(m)?(e.consume(m),W):t(m)}function s(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,g):ye(m)?(e.consume(m),I):t(m)}function f(m){return m===45?(e.consume(m),h):t(m)}function c(m){return m===null?t(m):m===45?(e.consume(m),p):z(m)?(l=c,Q(m)):(e.consume(m),c)}function p(m){return m===45?(e.consume(m),h):c(m)}function h(m){return m===62?re(m):m===45?p(m):c(m)}function g(m){const J="CDATA[";return m===J.charCodeAt(o++)?(e.consume(m),o===J.length?w:g):t(m)}function w(m){return m===null?t(m):m===93?(e.consume(m),v):z(m)?(l=w,Q(m)):(e.consume(m),w)}function v(m){return m===93?(e.consume(m),x):w(m)}function x(m){return m===62?re(m):m===93?(e.consume(m),x):w(m)}function I(m){return m===null||m===62?re(m):z(m)?(l=I,Q(m)):(e.consume(m),I)}function C(m){return m===null?t(m):m===63?(e.consume(m),L):z(m)?(l=C,Q(m)):(e.consume(m),C)}function L(m){return m===62?re(m):C(m)}function N(m){return ye(m)?(e.consume(m),k):t(m)}function k(m){return m===45||ge(m)?(e.consume(m),k):$(m)}function $(m){return z(m)?(l=$,Q(m)):q(m)?(e.consume(m),$):re(m)}function W(m){return m===45||ge(m)?(e.consume(m),W):m===47||m===62||Z(m)?B(m):t(m)}function B(m){return m===47?(e.consume(m),re):m===58||m===95||ye(m)?(e.consume(m),y):z(m)?(l=B,Q(m)):q(m)?(e.consume(m),B):re(m)}function y(m){return m===45||m===46||m===58||m===95||ge(m)?(e.consume(m),y):T(m)}function T(m){return m===61?(e.consume(m),_):z(m)?(l=T,Q(m)):q(m)?(e.consume(m),T):B(m)}function _(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),i=m,P):z(m)?(l=_,Q(m)):q(m)?(e.consume(m),_):(e.consume(m),R)}function P(m){return m===i?(e.consume(m),i=void 0,D):m===null?t(m):z(m)?(l=P,Q(m)):(e.consume(m),P)}function R(m){return m===null||m===34||m===39||m===60||m===61||m===96?t(m):m===47||m===62||Z(m)?B(m):(e.consume(m),R)}function D(m){return m===47||m===62||Z(m)?B(m):t(m)}function re(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),n):t(m)}function Q(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),ie}function ie(m){return q(m)?U(e,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):ee(m)}function ee(m){return e.enter("htmlTextData"),l(m)}}const Fn={name:"labelEnd",resolveAll:Sa,resolveTo:Ca,tokenize:Aa},ba={tokenize:Ia},wa={tokenize:Ea},va={tokenize:_a};function Sa(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&Ie(e,0,e.length,t),e}function Ca(e,n){let t=e.length,r=0,i,o,l,a;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",u,n],["enter",s,n]],a=_e(a,e.slice(o+1,o+r+3)),a=_e(a,[["enter",f,n]]),a=_e(a,Yt(n.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),n)),a=_e(a,[["exit",f,n],e[l-2],e[l-1],["exit",s,n]]),a=_e(a,e.slice(l+1)),a=_e(a,[["exit",u,n]]),Ie(e,o,e.length,a),e}function Aa(e,n,t){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(Le(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):t(p)}function u(p){return p===40?e.attempt(ba,f,l?f:c)(p):p===91?e.attempt(wa,f,l?s:c)(p):l?f(p):c(p)}function s(p){return e.attempt(va,f,c)(p)}function f(p){return n(p)}function c(p){return o._balanced=!0,t(p)}}function Ia(e,n,t){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Z(c)?It(e,o)(c):o(c)}function o(c){return c===41?f(c):ri(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return Z(c)?It(e,u)(c):f(c)}function a(c){return t(c)}function u(c){return c===34||c===39||c===40?li(e,s,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function s(c){return Z(c)?It(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),n):t(c)}}function Ea(e,n,t){const r=this;return i;function i(a){return ii.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(Le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function l(a){return t(a)}}function _a(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}const Ta={name:"labelStartImage",resolveAll:Fn.resolveAll,tokenize:Pa};function Pa(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const za={name:"labelStartLink",resolveAll:Fn.resolveAll,tokenize:Da};function Da(e,n,t){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const fn={name:"lineEnding",tokenize:La};function La(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),U(e,n,"linePrefix")}}const qt={name:"thematicBreak",tokenize:Fa};function Fa(e,n,t){let r=0,i;return o;function o(s){return e.enter("thematicBreak"),l(s)}function l(s){return i=s,a(s)}function a(s){return s===i?(e.enter("thematicBreakSequence"),u(s)):r>=3&&(s===null||z(s))?(e.exit("thematicBreak"),n(s)):t(s)}function u(s){return s===i?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),q(s)?U(e,a,"whitespace")(s):a(s))}}const xe={continuation:{tokenize:Ma},exit:$a,name:"list",tokenize:Ra},Na={partial:!0,tokenize:ja},Oa={partial:!0,tokenize:Ba};function Ra(e,n,t){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:vn(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(qt,t,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return t(h)}function u(h){return vn(h)&&++l<10?(e.consume(h),u):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):t(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(zt,r.interrupt?t:f,e.attempt(Na,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return q(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):t(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(h)}}function Ma(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(zt,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,n,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!q(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Oa,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(xe,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Ba(e,n,t){const r=this;return U(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(o):t(o)}}function $a(e){e.exit(this.containerState.type)}function ja(e,n,t){const r=this;return U(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!q(o)&&l&&l[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}const wr={name:"setextUnderline",resolveTo:qa,tokenize:Ha};function qa(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function Ha(e,n,t){const r=this;let i;return o;function o(s){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=s,l(s)):t(s)}function l(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),q(s)?U(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||z(s)?(e.exit("setextHeadingLine"),n(s)):t(s)}}const Ua={tokenize:Va};function Va(e){const n=this,t=e.attempt(zt,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Go,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Wa={resolveAll:ai()},Qa=oi("string"),Ya=oi("text");function oi(e){return{resolveAll:ai(e==="text"?Ka:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,l,a);return l;function l(f){return s(f)?o(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),u}function u(f){return s(f)?(t.exit("data"),o(f)):(t.consume(f),u)}function s(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ai(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function Ka(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let o=i.length,l=-1,a=0,u;for(;o--;){const s=i[o];if(typeof s=="string"){for(l=s.length;s.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(s===-2)u=!0,a++;else if(s!==-1){o++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const s={type:t===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...s.start},r.start.offset===r.end.offset?Object.assign(r,s):(e.splice(t,0,["enter",s,n],["exit",s,n]),t+=2)}t++}return e}const Ga={42:xe,43:xe,45:xe,48:xe,49:xe,50:xe,51:xe,52:xe,53:xe,54:xe,55:xe,56:xe,57:xe,62:Jr},Xa={91:ta},Za={[-2]:cn,[-1]:cn,32:cn},Ja={35:aa,42:qt,45:[wr,qt],60:fa,61:wr,95:qt,96:kr,126:kr},eu={38:ti,92:ei},tu={[-5]:fn,[-4]:fn,[-3]:fn,33:Ta,38:ti,42:Sn,60:[zo,xa],91:za,92:[la,ei],93:Fn,95:Sn,96:Uo},nu={null:[Sn,Wa]},ru={null:[42,95]},iu={null:[]},lu=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ru,contentInitial:Xa,disable:iu,document:Ga,flow:Ja,flowInitial:Za,insideSpan:nu,string:eu,text:tu},Symbol.toStringTag,{value:"Module"}));function ou(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},o=[];let l=[],a=[];const u={attempt:$(N),check:$(k),consume:I,enter:C,exit:L,interrupt:$(k,{interrupt:!0})},s={code:null,containerState:{},defineSkip:w,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=n.tokenize.call(s,u);return n.resolveAll&&o.push(n),s;function c(T){return l=_e(l,T),v(),l[l.length-1]!==null?[]:(W(n,0),s.events=Yt(o,s.events,s),s.events)}function p(T,_){return uu(h(T),_)}function h(T){return au(l,T)}function g(){const{_bufferIndex:T,_index:_,line:P,column:R,offset:D}=r;return{_bufferIndex:T,_index:_,line:P,column:R,offset:D}}function w(T){i[T.line]=T.column,y()}function v(){let T;for(;r._index<l.length;){const _=l[r._index];if(typeof _=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<_.length;)x(_.charCodeAt(r._bufferIndex));else x(_)}}function x(T){f=f(T)}function I(T){z(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,y()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=T}function C(T,_){const P=_||{};return P.type=T,P.start=g(),s.events.push(["enter",P,s]),a.push(P),P}function L(T){const _=a.pop();return _.end=g(),s.events.push(["exit",_,s]),_}function N(T,_){W(T,_.from)}function k(T,_){_.restore()}function $(T,_){return P;function P(R,D,re){let Q,ie,ee,m;return Array.isArray(R)?fe(R):"tokenize"in R?fe([R]):J(R);function J(Y){return we;function we(le){const se=le!==null&&Y[le],Ee=le!==null&&Y.null,je=[...Array.isArray(se)?se:se?[se]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return fe(je)(le)}}function fe(Y){return Q=Y,ie=0,Y.length===0?re:d(Y[ie])}function d(Y){return we;function we(le){return m=B(),ee=Y,Y.partial||(s.currentConstruct=Y),Y.name&&s.parser.constructs.disable.null.includes(Y.name)?me():Y.tokenize.call(_?Object.assign(Object.create(s),_):s,u,ae,me)(le)}}function ae(Y){return T(ee,m),D}function me(Y){return m.restore(),++ie<Q.length?d(Q[ie]):re}}}function W(T,_){T.resolveAll&&!o.includes(T)&&o.push(T),T.resolve&&Ie(s.events,_,s.events.length-_,T.resolve(s.events.slice(_),s)),T.resolveTo&&(s.events=T.resolveTo(s.events,s))}function B(){const T=g(),_=s.previous,P=s.currentConstruct,R=s.events.length,D=Array.from(a);return{from:R,restore:re};function re(){r=T,s.previous=_,s.currentConstruct=P,s.events.length=R,a=D,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function au(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,o)];else{if(l=e.slice(t,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function uu(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
2
2
  `;break}case-3:{l=`\r
3
3
  `;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function su(e){const r={constructs:Xr([lu,...(e||{}).extensions||[]]),content:i(Co),defined:[],document:i(Io),flow:i(Ua),lazy:{},string:i(Qa),text:i(Ya)};return r;function i(o){return l;function l(a){return ou(r,o,a)}}}function cu(e){for(;!ni(e););return e}const vr=/[\0\t\n\r]/g;function fu(){let e=1,n="",t=!0,r;return i;function i(o,l,a){const u=[];let s,f,c,p,h;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,n="",t&&(o.charCodeAt(0)===65279&&c++,t=void 0);c<o.length;){if(vr.lastIndex=c,s=vr.exec(o),p=s&&s.index!==void 0?s.index:o.length,h=o.charCodeAt(p),!s){n=o.slice(c);break}if(h===10&&c===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<p&&(u.push(o.slice(c,p)),e+=p-c),h){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}const hu=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function pu(e){return e.replace(hu,mu)}function mu(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return Zr(t.slice(o?2:1),o?16:10)}return Ln(t)||e}const ui={}.hasOwnProperty;function du(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),gu(t)(cu(su(t).document().write(fu()(e,n,!0))))}function gu(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(V),autolinkProtocol:B,autolinkEmail:B,atxHeading:o(te),blockQuote:o(Ee),characterEscape:B,characterReference:B,codeFenced:o(je),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(je,l),codeText:o(xt,l),codeTextData:B,data:B,codeFlowValue:B,definition:o(Ke),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Ge),hardBreakEscape:o(de),hardBreakTrailing:o(de),htmlFlow:o(Te,l),htmlFlowData:B,htmlText:o(Te,l),htmlTextData:B,image:o(Pe),label:l,link:o(V),listItem:o(ze),listItemValue:p,listOrdered:o(K,c),listUnordered:o(K),paragraph:o(ve),reference:d,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(te),strong:o(kt),thematicBreak:o(ul)},exit:{atxHeading:u(),atxHeadingSequence:N,autolink:u(),autolinkEmail:se,autolinkProtocol:le,blockQuote:u(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:Y,characterReference:we,codeFenced:u(v),codeFencedFence:w,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:y,codeIndented:u(x),codeText:u(D),codeTextData:y,data:y,definition:u(),definitionDestinationString:L,definitionLabelString:I,definitionTitleString:C,emphasis:u(),hardBreakEscape:u(_),hardBreakTrailing:u(_),htmlFlow:u(P),htmlFlowData:y,htmlText:u(R),htmlTextData:y,image:u(Q),label:ee,labelText:ie,lineEnding:T,link:u(re),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ae,resourceDestinationString:m,resourceTitleString:J,resource:fe,setextHeading:u(W),setextHeadingLineSequence:$,setextHeadingText:k,strong:u(),thematicBreak:u()}};si(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(b){let E={type:"root",children:[]};const O={stack:[E],tokenStack:[],config:n,enter:a,exit:s,buffer:l,resume:f,data:t},H=[];let G=-1;for(;++G<b.length;)if(b[G][1].type==="listOrdered"||b[G][1].type==="listUnordered")if(b[G][0]==="enter")H.push(G);else{const De=H.pop();G=i(b,De,G)}for(G=-1;++G<b.length;){const De=n[b[G][0]];ui.call(De,b[G][1].type)&&De[b[G][1].type].call(Object.assign({sliceSerialize:b[G][2].sliceSerialize},O),b[G][1])}if(O.tokenStack.length>0){const De=O.tokenStack[O.tokenStack.length-1];(De[1]||Sr).call(O,void 0,De[0])}for(E.position={start:Ue(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:Ue(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},G=-1;++G<n.transforms.length;)E=n.transforms[G](E)||E;return E}function i(b,E,O){let H=E-1,G=-1,De=!1,Xe,Me,bt,wt;for(;++H<=O;){const Se=b[H];switch(Se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Se[0]==="enter"?G++:G--,wt=void 0;break}case"lineEndingBlank":{Se[0]==="enter"&&(Xe&&!wt&&!G&&!bt&&(bt=H),wt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:wt=void 0}if(!G&&Se[0]==="enter"&&Se[1].type==="listItemPrefix"||G===-1&&Se[0]==="exit"&&(Se[1].type==="listUnordered"||Se[1].type==="listOrdered")){if(Xe){let ot=H;for(Me=void 0;ot--;){const Be=b[ot];if(Be[1].type==="lineEnding"||Be[1].type==="lineEndingBlank"){if(Be[0]==="exit")continue;Me&&(b[Me][1].type="lineEndingBlank",De=!0),Be[1].type="lineEnding",Me=ot}else if(!(Be[1].type==="linePrefix"||Be[1].type==="blockQuotePrefix"||Be[1].type==="blockQuotePrefixWhitespace"||Be[1].type==="blockQuoteMarker"||Be[1].type==="listItemIndent"))break}bt&&(!Me||bt<Me)&&(Xe._spread=!0),Xe.end=Object.assign({},Me?b[Me][1].start:Se[1].end),b.splice(Me||H,0,["exit",Xe,Se[2]]),H++,O++}if(Se[1].type==="listItemPrefix"){const ot={type:"listItem",_spread:!1,start:Object.assign({},Se[1].start),end:void 0};Xe=ot,b.splice(H,0,["enter",ot,Se[2]]),H++,O++,bt=void 0,wt=!0}}}return b[E][1]._spread=De,O}function o(b,E){return O;function O(H){a.call(this,b(H),H),E&&E.call(this,H)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(b,E,O){this.stack[this.stack.length-1].children.push(b),this.stack.push(b),this.tokenStack.push([E,O||void 0]),b.position={start:Ue(E.start),end:void 0}}function u(b){return E;function E(O){b&&b.call(this,O),s.call(this,O)}}function s(b,E){const O=this.stack.pop(),H=this.tokenStack.pop();if(H)H[0].type!==b.type&&(E?E.call(this,b,H[0]):(H[1]||Sr).call(this,b,H[0]));else throw new Error("Cannot close `"+b.type+"` ("+At({start:b.start,end:b.end})+"): it’s not open");O.position.end=Ue(b.end)}function f(){return Dn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(b){if(this.data.expectingFirstListItemValue){const E=this.stack[this.stack.length-2];E.start=Number.parseInt(this.sliceSerialize(b),10),this.data.expectingFirstListItemValue=void 0}}function h(){const b=this.resume(),E=this.stack[this.stack.length-1];E.lang=b}function g(){const b=this.resume(),E=this.stack[this.stack.length-1];E.meta=b}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const b=this.resume(),E=this.stack[this.stack.length-1];E.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const b=this.resume(),E=this.stack[this.stack.length-1];E.value=b.replace(/(\r?\n|\r)$/g,"")}function I(b){const E=this.resume(),O=this.stack[this.stack.length-1];O.label=E,O.identifier=Le(this.sliceSerialize(b)).toLowerCase()}function C(){const b=this.resume(),E=this.stack[this.stack.length-1];E.title=b}function L(){const b=this.resume(),E=this.stack[this.stack.length-1];E.url=b}function N(b){const E=this.stack[this.stack.length-1];if(!E.depth){const O=this.sliceSerialize(b).length;E.depth=O}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function $(b){const E=this.stack[this.stack.length-1];E.depth=this.sliceSerialize(b).codePointAt(0)===61?1:2}function W(){this.data.setextHeadingSlurpLineEnding=void 0}function B(b){const O=this.stack[this.stack.length-1].children;let H=O[O.length-1];(!H||H.type!=="text")&&(H=al(),H.position={start:Ue(b.start),end:void 0},O.push(H)),this.stack.push(H)}function y(b){const E=this.stack.pop();E.value+=this.sliceSerialize(b),E.position.end=Ue(b.end)}function T(b){const E=this.stack[this.stack.length-1];if(this.data.atHardBreak){const O=E.children[E.children.length-1];O.position.end=Ue(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(E.type)&&(B.call(this,b),y.call(this,b))}function _(){this.data.atHardBreak=!0}function P(){const b=this.resume(),E=this.stack[this.stack.length-1];E.value=b}function R(){const b=this.resume(),E=this.stack[this.stack.length-1];E.value=b}function D(){const b=this.resume(),E=this.stack[this.stack.length-1];E.value=b}function re(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const E=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=E,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function Q(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const E=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=E,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function ie(b){const E=this.sliceSerialize(b),O=this.stack[this.stack.length-2];O.label=pu(E),O.identifier=Le(E).toLowerCase()}function ee(){const b=this.stack[this.stack.length-1],E=this.resume(),O=this.stack[this.stack.length-1];if(this.data.inReference=!0,O.type==="link"){const H=b.children;O.children=H}else O.alt=E}function m(){const b=this.resume(),E=this.stack[this.stack.length-1];E.url=b}function J(){const b=this.resume(),E=this.stack[this.stack.length-1];E.title=b}function fe(){this.data.inReference=void 0}function d(){this.data.referenceType="collapsed"}function ae(b){const E=this.resume(),O=this.stack[this.stack.length-1];O.label=E,O.identifier=Le(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function me(b){this.data.characterReferenceType=b.type}function Y(b){const E=this.sliceSerialize(b),O=this.data.characterReferenceType;let H;O?(H=Zr(E,O==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):H=Ln(E);const G=this.stack[this.stack.length-1];G.value+=H}function we(b){const E=this.stack.pop();E.position.end=Ue(b.end)}function le(b){y.call(this,b);const E=this.stack[this.stack.length-1];E.url=this.sliceSerialize(b)}function se(b){y.call(this,b);const E=this.stack[this.stack.length-1];E.url="mailto:"+this.sliceSerialize(b)}function Ee(){return{type:"blockquote",children:[]}}function je(){return{type:"code",lang:null,meta:null,value:""}}function xt(){return{type:"inlineCode",value:""}}function Ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ge(){return{type:"emphasis",children:[]}}function te(){return{type:"heading",depth:0,children:[]}}function de(){return{type:"break"}}function Te(){return{type:"html",value:""}}function Pe(){return{type:"image",title:null,url:"",alt:null}}function V(){return{type:"link",title:null,url:"",children:[]}}function K(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function ze(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function ve(){return{type:"paragraph",children:[]}}function kt(){return{type:"strong",children:[]}}function al(){return{type:"text",value:""}}function ul(){return{type:"thematicBreak"}}}function Ue(e){return{line:e.line,column:e.column,offset:e.offset}}function si(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?si(e,r):yu(e,r)}}function yu(e,n){let t;for(t in n)if(ui.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function Sr(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+At({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+At({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+At({start:n.start,end:n.end})+") is still open")}function xu(e){const n=this;n.parser=t;function t(r){return du(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Ut(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}function ku(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Kt=(function(e){if(e==null)return Su;if(typeof e=="function")return Gt(e);if(typeof e=="object")return Array.isArray(e)?bu(e):wu(e);if(typeof e=="string")return vu(e);throw new Error("Expected function, string, or object as test")});function bu(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Kt(e[t]);return Gt(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function wu(e){const n=e;return Gt(t);function t(r){const i=r;let o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function vu(e){return Gt(n);function n(t){return t&&t.type===e}}function Gt(e){return n;function n(t,r,i){return!!(Cu(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Su(){return!0}function Cu(e){return e!==null&&typeof e=="object"&&"type"in e}const ci=[],Au=!0,Cn=!1,Iu="skip";function fi(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const o=Kt(i),l=r?-1:1;a(e,void 0,[])();function a(u,s,f){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=ci,g,w,v;if((!n||o(u,s,f[f.length-1]||void 0))&&(h=Eu(t(u,f)),h[0]===Cn))return h;if("children"in u&&u.children){const x=u;if(x.children&&h[0]!==Iu)for(w=(r?x.children.length:-1)+l,v=f.concat(x);w>-1&&w<x.children.length;){const I=x.children[w];if(g=a(I,w,v)(),g[0]===Cn)return g;w=typeof g[1]=="number"?g[1]:w+l}}return h}}}function Eu(e){return Array.isArray(e)?e:typeof e=="number"?[Au,e]:e==null?ci:[e]}function _u(e,n,t){const i=Kt((t||{}).ignore||[]),o=Tu(n);let l=-1;for(;++l<o.length;)fi(e,"text",a);function a(s,f){let c=-1,p;for(;++c<f.length;){const h=f[c],g=p?p.children:void 0;if(i(h,g?g.indexOf(h):void 0,p))return;p=h}if(p)return u(s,f)}function u(s,f){const c=f[f.length-1],p=o[l][0],h=o[l][1];let g=0;const v=c.children.indexOf(s);let x=!1,I=[];p.lastIndex=0;let C=p.exec(s.value);for(;C;){const L=C.index,N={index:C.index,input:C.input,stack:[...f,s]};let k=h(...C,N);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?p.lastIndex=L+1:(g!==L&&I.push({type:"text",value:s.value.slice(g,L)}),Array.isArray(k)?I.push(...k):k&&I.push(k),g=L+C[0].length,x=!0),!p.global)break;C=p.exec(s.value)}return x?(g<s.value.length&&I.push({type:"text",value:s.value.slice(g)}),c.children.splice(v,1,...I)):I=[s],v+I.length}}function Tu(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([Pu(i[0]),zu(i[1])])}return n}function Pu(e){return typeof e=="string"?new RegExp(ku(e),"g"):e}function zu(e){return typeof e=="function"?e:function(){return e}}const hn="phrasing",pn=["autolink","link","image","label"];function Du(){return{transforms:[Bu],enter:{literalAutolink:Fu,literalAutolinkEmail:mn,literalAutolinkHttp:mn,literalAutolinkWww:mn},exit:{literalAutolink:Mu,literalAutolinkEmail:Ru,literalAutolinkHttp:Nu,literalAutolinkWww:Ou}}}function Lu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hn,notInConstruct:pn},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hn,notInConstruct:pn},{character:":",before:"[ps]",after:"\\/",inConstruct:hn,notInConstruct:pn}]}}function Fu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function mn(e){this.config.enter.autolinkProtocol.call(this,e)}function Nu(e){this.config.exit.autolinkProtocol.call(this,e)}function Ou(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function Ru(e){this.config.exit.autolinkEmail.call(this,e)}function Mu(e){this.exit(e)}function Bu(e){_u(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,$u],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ju]],{ignore:["link","linkReference"]})}function $u(e,n,t,r,i){let o="";if(!hi(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!qu(t)))return!1;const l=Hu(t+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function ju(e,n,t,r){return!hi(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function qu(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function Hu(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=Ut(e,"(");let o=Ut(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function hi(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||nt(t)||Qt(t))&&(!n||t!==47)}pi.peek=Zu;function Uu(){this.buffer()}function Vu(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Wu(){this.buffer()}function Qu(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Yu(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Le(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Ku(e){this.exit(e)}function Gu(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Le(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Xu(e){this.exit(e)}function Zu(){return"["}function pi(e,n,t,r){const i=t.createTracker(r);let o=i.move("[^");const l=t.enter("footnoteReference"),a=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function Ju(){return{enter:{gfmFootnoteCallString:Uu,gfmFootnoteCall:Vu,gfmFootnoteDefinitionLabelString:Wu,gfmFootnoteDefinition:Qu},exit:{gfmFootnoteCallString:Yu,gfmFootnoteCall:Ku,gfmFootnoteDefinitionLabelString:Gu,gfmFootnoteDefinition:Xu}}}function es(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:pi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,o,l){const a=o.createTracker(l);let u=a.move("[^");const s=o.enter("footnoteDefinition"),f=o.enter("label");return u+=a.move(o.safe(o.associationId(r),{before:u,after:"]"})),f(),u+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),u+=a.move((n?`
4
4
  `:" ")+o.indentLines(o.containerFlow(r,a.current()),n?mi:ts))),s(),u}}function ts(e,n,t){return n===0?e:mi(e,n,t)}function mi(e,n,t){return(t?"":" ")+e}const ns=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];di.peek=as;function rs(){return{canContainEols:["delete"],enter:{strikethrough:ls},exit:{strikethrough:os}}}function is(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ns}],handlers:{delete:di}}}function ls(e){this.enter({type:"delete",children:[]},e)}function os(e){this.exit(e)}function di(e,n,t,r){const i=t.createTracker(r),o=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function as(){return"~"}function us(e){return e.length}function ss(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||us,o=[],l=[],a=[],u=[];let s=0,f=-1;for(;++f<e.length;){const w=[],v=[];let x=-1;for(e[f].length>s&&(s=e[f].length);++x<e[f].length;){const I=cs(e[f][x]);if(t.alignDelimiters!==!1){const C=i(I);v[x]=C,(u[x]===void 0||C>u[x])&&(u[x]=C)}w.push(I)}l[f]=w,a[f]=v}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<s;)o[c]=Cr(r[c]);else{const w=Cr(r);for(;++c<s;)o[c]=w}c=-1;const p=[],h=[];for(;++c<s;){const w=o[c];let v="",x="";w===99?(v=":",x=":"):w===108?v=":":w===114&&(x=":");let I=t.alignDelimiters===!1?1:Math.max(1,u[c]-v.length-x.length);const C=v+"-".repeat(I)+x;t.alignDelimiters!==!1&&(I=v.length+I+x.length,I>u[c]&&(u[c]=I),h[c]=I),p[c]=C}l.splice(1,0,p),a.splice(1,0,h),f=-1;const g=[];for(;++f<l.length;){const w=l[f],v=a[f];c=-1;const x=[];for(;++c<s;){const I=w[c]||"";let C="",L="";if(t.alignDelimiters!==!1){const N=u[c]-(v[c]||0),k=o[c];k===114?C=" ".repeat(N):k===99?N%2?(C=" ".repeat(N/2+.5),L=" ".repeat(N/2-.5)):(C=" ".repeat(N/2),L=C):L=" ".repeat(N)}t.delimiterStart!==!1&&!c&&x.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&I==="")&&(t.delimiterStart!==!1||c)&&x.push(" "),t.alignDelimiters!==!1&&x.push(C),x.push(I),t.alignDelimiters!==!1&&x.push(L),t.padding!==!1&&x.push(" "),(t.delimiterEnd!==!1||c!==s-1)&&x.push("|")}g.push(t.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return g.join(`
@@ -1 +1 @@
1
- import{a as f,f as _,c as G,s as H}from"../chunks/CpBqNZvJ.js";import{p as K,b as Q,a as R,e as V,f as y,s as g,t as C,g as l,c as h,d as S,h as W,$ as X,r as b,u as p,i as Y}from"../chunks/BY45LdLb.js";import{i as Z}from"../chunks/C54SSc0V.js";import{h as $,T as d,e as tt,r as et,a as at}from"../chunks/B0Gppwyp.js";import{i as rt}from"../chunks/CRTGkQGy.js";import{A as st}from"../chunks/BgHCMG0A.js";import{C as w,T as lt}from"../chunks/CyMb4fBe.js";import{T as it}from"../chunks/BmHxz2Ar.js";import{L as ot}from"../chunks/Bha_IRQA.js";var nt=_('<div class="flex items-center gap-x-2"><!> <div class="h-4 w-4"></div></div>'),ut=_('<i class="fa-solid fa-save"></i> <span> </span>',1),vt=_("<div><!> <!></div> <!>",1);function xt(E,n){K(n,!0);let e=Q(n.data.themeConfig),v=W(!1);async function j(){S(v,!0);try{await fetch(et("/api/config/save"),{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}finally{S(v,!1),rt()}}$("1gp6n77",x=>{V(()=>{X.title="Config Editor | Art Site Editor"})}),ot(E,{title:"Configuration",children:(x,ft)=>{var A=vt(),m=y(A),T=h(m);d(T,{label:"Default Artist",get options(){return n.data.artists},get value(){return e.defaultArtist},set value(i){e.defaultArtist=i}});var F=g(T,2);tt(F,17,()=>Object.entries(n.data.themeSchema),([i,c])=>i,(i,c)=>{var u=p(()=>Y(l(c),2));let t=()=>l(u)[0],r=()=>l(u)[1];var k=G(),P=y(k);{var B=a=>{d(a,{get label(){return t()},get value(){return e[t()]},set value(s){e[t()]=s}})},I=a=>{{let s=p(()=>r().type==="textbox"?"markdown":r().type);it(a,{get label(){return t()},big:!0,get language(){return l(s)},get value(){return e[t()]},set value(o){e[t()]=o}})}},L=a=>{var s=nt(),o=h(s);{let U=p(()=>/^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e[t()])?"":"Must be a valid color in hex");d(o,{get label(){return t()},get validationError(){return l(U)},get value(){return e[t()]},set value(q){e[t()]=q}})}var N=g(o,2);b(s),C(()=>at(N,`background-color: ${e[t()]??""};`)),f(a,s)},M=a=>{{let s=p(()=>e[t()]&&!r().options.includes(e[t()])?"Must match one of the available options":"");d(a,{get label(){return t()},get validationError(){return l(s)},get options(){return r().options},get value(){return e[t()]},set value(o){e[t()]=o}})}},z=a=>{w(a,{get label(){return t()},get options(){return r().options},get value(){return e[t()]},set value(s){e[t()]=s}})},D=a=>{w(a,{get label(){return t()},onAddUnknown:s=>s,get value(){return e[t()]},set value(s){e[t()]=s}})},J=a=>{lt(a,{get label(){return t()},prefix:"#",get possibleTags(){return n.data.allTags},get value(){return e[t()]},set value(s){e[t()]=s}})};Z(P,a=>{r().type==="string"?a(B):r().type==="textbox"||r().type==="markdown"||r().type==="json"||r().type==="yaml"?a(I,1):r().type==="color"?a(L,2):r().type==="selection"&&!r().multi?a(M,3):r().type==="selection"&&r().multi?a(z,4):r().type==="string-list"?a(D,5):r().type==="tag-list"&&a(J,6)})}f(i,k)}),b(m);var O=g(m,2);st(O,{action:j,get disabled(){return l(v)},class:"absolute right-3 bottom-3 z-10 preset-filled-primary-50-950",children:(i,c)=>{var u=ut(),t=g(y(u),2),r=h(t,!0);b(t),C(()=>H(r,l(v)?"Saving...":"Save")),f(i,u)},$$slots:{default:!0}}),f(x,A)},$$slots:{default:!0}}),R()}export{xt as component};
1
+ import{a as f,f as _,c as G,s as H}from"../chunks/CpBqNZvJ.js";import{p as K,b as Q,a as R,e as V,f as y,s as g,t as C,g as l,c as h,d as S,h as W,$ as X,r as b,u as p,i as Y}from"../chunks/BY45LdLb.js";import{i as Z}from"../chunks/C54SSc0V.js";import{h as $,T as d,e as tt,r as et,a as at}from"../chunks/VJxQahu8.js";import{i as rt}from"../chunks/DU96-whN.js";import{A as st}from"../chunks/D3beoBgN.js";import{C as w,T as lt}from"../chunks/CrEaMP_S.js";import{T as it}from"../chunks/DFiNRRx4.js";import{L as ot}from"../chunks/DmfCqOHO.js";var nt=_('<div class="flex items-center gap-x-2"><!> <div class="h-4 w-4"></div></div>'),ut=_('<i class="fa-solid fa-save"></i> <span> </span>',1),vt=_("<div><!> <!></div> <!>",1);function xt(E,n){K(n,!0);let e=Q(n.data.themeConfig),v=W(!1);async function j(){S(v,!0);try{await fetch(et("/api/config/save"),{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}finally{S(v,!1),rt()}}$("1gp6n77",x=>{V(()=>{X.title="Config Editor | Art Site Editor"})}),ot(E,{title:"Configuration",children:(x,ft)=>{var A=vt(),m=y(A),T=h(m);d(T,{label:"Default Artist",get options(){return n.data.artists},get value(){return e.defaultArtist},set value(i){e.defaultArtist=i}});var F=g(T,2);tt(F,17,()=>Object.entries(n.data.themeSchema),([i,c])=>i,(i,c)=>{var u=p(()=>Y(l(c),2));let t=()=>l(u)[0],r=()=>l(u)[1];var k=G(),P=y(k);{var B=a=>{d(a,{get label(){return t()},get value(){return e[t()]},set value(s){e[t()]=s}})},I=a=>{{let s=p(()=>r().type==="textbox"?"markdown":r().type);it(a,{get label(){return t()},big:!0,get language(){return l(s)},get value(){return e[t()]},set value(o){e[t()]=o}})}},L=a=>{var s=nt(),o=h(s);{let U=p(()=>/^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e[t()])?"":"Must be a valid color in hex");d(o,{get label(){return t()},get validationError(){return l(U)},get value(){return e[t()]},set value(q){e[t()]=q}})}var N=g(o,2);b(s),C(()=>at(N,`background-color: ${e[t()]??""};`)),f(a,s)},M=a=>{{let s=p(()=>e[t()]&&!r().options.includes(e[t()])?"Must match one of the available options":"");d(a,{get label(){return t()},get validationError(){return l(s)},get options(){return r().options},get value(){return e[t()]},set value(o){e[t()]=o}})}},z=a=>{w(a,{get label(){return t()},get options(){return r().options},get value(){return e[t()]},set value(s){e[t()]=s}})},D=a=>{w(a,{get label(){return t()},onAddUnknown:s=>s,get value(){return e[t()]},set value(s){e[t()]=s}})},J=a=>{lt(a,{get label(){return t()},prefix:"#",get possibleTags(){return n.data.allTags},get value(){return e[t()]},set value(s){e[t()]=s}})};Z(P,a=>{r().type==="string"?a(B):r().type==="textbox"||r().type==="markdown"||r().type==="json"||r().type==="yaml"?a(I,1):r().type==="color"?a(L,2):r().type==="selection"&&!r().multi?a(M,3):r().type==="selection"&&r().multi?a(z,4):r().type==="string-list"?a(D,5):r().type==="tag-list"&&a(J,6)})}f(i,k)}),b(m);var O=g(m,2);st(O,{action:j,get disabled(){return l(v)},class:"absolute right-3 bottom-3 z-10 preset-filled-primary-50-950",children:(i,c)=>{var u=ut(),t=g(y(u),2),r=h(t,!0);b(t),C(()=>H(r,l(v)?"Saving...":"Save")),f(i,u)},$$slots:{default:!0}}),f(x,A)},$$slots:{default:!0}}),R()}export{xt as component};
@@ -0,0 +1 @@
1
+ import{_ as m}from"../chunks/C-KDNPDm.js";export{m as component};