@yorz/cli 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/cli/index.js +324 -10
  2. package/dist/gui/assets/{abnfDiagram-VRR7QNED-CHas-sjI.js → abnfDiagram-VRR7QNED-Br8A6RUk.js} +1 -1
  3. package/dist/{gui-mobile/assets/arc-W0d0aNNL.js → gui/assets/arc-BNZF-XYv.js} +1 -1
  4. package/dist/{gui-mobile/assets/architectureDiagram-ZJ3FMSHR-C7n8Akxp.js → gui/assets/architectureDiagram-ZJ3FMSHR-Dl9THa2L.js} +1 -1
  5. package/dist/{gui-mobile/assets/blockDiagram-677ZJIJ3-DyqrKJT7.js → gui/assets/blockDiagram-677ZJIJ3-D-2owPWZ.js} +1 -1
  6. package/dist/gui/assets/{c4Diagram-LMCZKHZV-rfToA0_z.js → c4Diagram-LMCZKHZV-CpOx6hTg.js} +1 -1
  7. package/dist/gui/assets/channel-Bf3xgAnb.js +1 -0
  8. package/dist/gui/assets/{chunk-2Q5K7J3B-EBzGDbj7.js → chunk-2Q5K7J3B-B40RmE3d.js} +1 -1
  9. package/dist/gui/assets/{chunk-32BRIVSS-BWjVeFy7.js → chunk-32BRIVSS-BrNJz81X.js} +1 -1
  10. package/dist/gui/assets/{chunk-5VM5RSS4-DTQx1JHi.js → chunk-5VM5RSS4-CVqumv99.js} +1 -1
  11. package/dist/gui/assets/{chunk-EX3LRPZG-BG5uo2fg.js → chunk-EX3LRPZG-D2K9iqmJ.js} +1 -1
  12. package/dist/gui/assets/{chunk-JWPE2WC7--G0oyo9O.js → chunk-JWPE2WC7-HEpHfS7t.js} +1 -1
  13. package/dist/gui/assets/{chunk-MOJQB5TN-BQ-Mu9Ua.js → chunk-MOJQB5TN-u0_j3hH3.js} +1 -1
  14. package/dist/gui/assets/{chunk-RYQCIY6F-BEYJmvvY.js → chunk-RYQCIY6F-DSwSAQnJ.js} +1 -1
  15. package/dist/gui/assets/{chunk-V7JOEXUC-CXTB9Dv-.js → chunk-V7JOEXUC-BNzztD3a.js} +1 -1
  16. package/dist/gui/assets/{chunk-VR4S4FIN-DdWFxvZe.js → chunk-VR4S4FIN-DizwLX2s.js} +1 -1
  17. package/dist/gui/assets/{chunk-XXDRQBXY-Bu2xNLMy.js → chunk-XXDRQBXY-ngTYtCxj.js} +1 -1
  18. package/dist/gui/assets/classDiagram-OUVF2IWQ-CEEynI1x.js +1 -0
  19. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-CEEynI1x.js +1 -0
  20. package/dist/{gui-mobile/assets/cose-bilkent-JH36ORCC-B-ugahei.js → gui/assets/cose-bilkent-JH36ORCC-OTzs1-hb.js} +1 -1
  21. package/dist/gui/assets/{cynefin-VYW2F7L2-CgdsCBRp.js → cynefin-VYW2F7L2-DKOvpOnu.js} +1 -1
  22. package/dist/{gui-mobile/assets/cynefinDiagram-TSTJHNR4-EpR-VLwY.js → gui/assets/cynefinDiagram-TSTJHNR4-G2TceZSR.js} +1 -1
  23. package/dist/gui/assets/{dagre-VKFMJZFB-9mi0GAtJ.js → dagre-VKFMJZFB-C7bX4NMr.js} +1 -1
  24. package/dist/gui/assets/{diagram-FQU43EPY-C1VrrSj8.js → diagram-FQU43EPY-DzZ_uozs.js} +1 -1
  25. package/dist/{gui-mobile/assets/diagram-G47NLZAW-BkGDb5FF.js → gui/assets/diagram-G47NLZAW-CtUanX8u.js} +1 -1
  26. package/dist/gui/assets/{diagram-NH7WQ7WH-Dt_RBtZf.js → diagram-NH7WQ7WH-Cj0b2ASJ.js} +1 -1
  27. package/dist/{gui-mobile/assets/diagram-OA4YK3LP-bUxPsiBQ.js → gui/assets/diagram-OA4YK3LP-wbAJUivR.js} +1 -1
  28. package/dist/gui/assets/{diagram-WEI45ONY-DM2Z5Vfp.js → diagram-WEI45ONY-8zb4nL1k.js} +1 -1
  29. package/dist/gui/assets/{ebnfDiagram-CCIWWBDH-DJWV5L6j.js → ebnfDiagram-CCIWWBDH-D22yXTH4.js} +1 -1
  30. package/dist/{gui-mobile/assets/erDiagram-Q63AITRT-CbJRWC8U.js → gui/assets/erDiagram-Q63AITRT-Ch6MTse3.js} +1 -1
  31. package/dist/gui/assets/{flowDiagram-23GEKE2U-GznvAjo1.js → flowDiagram-23GEKE2U-DoWr52n6.js} +1 -1
  32. package/dist/{gui-mobile/assets/ganttDiagram-NO4QXBWP-DEdAq2e9.js → gui/assets/ganttDiagram-NO4QXBWP-Bn27EBp5.js} +1 -1
  33. package/dist/gui/assets/{gitGraphDiagram-IHSO6WYX-Cqb8K3WB.js → gitGraphDiagram-IHSO6WYX-eNrZKJto.js} +1 -1
  34. package/dist/gui/assets/index-CGJqeBWy.css +1 -0
  35. package/dist/gui/assets/index-CnBmykN1.js +42 -0
  36. package/dist/gui/assets/{infoDiagram-FWYZ7A6U-3mAm46xF.js → infoDiagram-FWYZ7A6U-thYTzFt4.js} +1 -1
  37. package/dist/gui/assets/{ishikawaDiagram-FXEZZL3T-s8LvetuP.js → ishikawaDiagram-FXEZZL3T-B9wHLiN6.js} +1 -1
  38. package/dist/{gui-mobile/assets/journeyDiagram-5HDEW3XC-CB79ifZC.js → gui/assets/journeyDiagram-5HDEW3XC-DtAVTkgO.js} +1 -1
  39. package/dist/gui/assets/{kanban-definition-HUTT4EX6-CrDI5xq2.js → kanban-definition-HUTT4EX6-Dz9RiLQ9.js} +1 -1
  40. package/dist/gui/assets/{linear-AzP4MQxt.js → linear-CJZ3PkYv.js} +1 -1
  41. package/dist/{gui-mobile/assets/mermaid.core-DvnVINHy.js → gui/assets/mermaid.core-ChZsXg3q.js} +4 -4
  42. package/dist/gui/assets/{mindmap-definition-LN4V7U3C-B7wpSrxj.js → mindmap-definition-LN4V7U3C-Bv4h8NN-.js} +1 -1
  43. package/dist/gui/assets/{pegDiagram-2B236MQR-BOiuiSjj.js → pegDiagram-2B236MQR-CUdmCL7t.js} +1 -1
  44. package/dist/gui/assets/{pieDiagram-ENE6RG2P-DV_bb90P.js → pieDiagram-ENE6RG2P-DBGahumA.js} +1 -1
  45. package/dist/{gui-mobile/assets/quadrantDiagram-ABIIQ3AL-Bx9pQYlQ.js → gui/assets/quadrantDiagram-ABIIQ3AL-RCEsINBH.js} +1 -1
  46. package/dist/gui/assets/{railroadDiagram-RFXS5EU6-BaO9xxpp.js → railroadDiagram-RFXS5EU6-BTVWIeOh.js} +1 -1
  47. package/dist/gui/assets/{requirementDiagram-TGXJPOKE-B-r8AGph.js → requirementDiagram-TGXJPOKE-_ezgAovI.js} +1 -1
  48. package/dist/{gui-mobile/assets/sankeyDiagram-HTMAVEWB-CMC7JPmO.js → gui/assets/sankeyDiagram-HTMAVEWB-CzBFRwRS.js} +1 -1
  49. package/dist/{gui-mobile/assets/sequenceDiagram-DBY2YBRQ-hQilIEP9.js → gui/assets/sequenceDiagram-DBY2YBRQ-vVRMDvRP.js} +1 -1
  50. package/dist/gui/assets/{sizeCapture-X5ZJPWSS-BhmePssk.js → sizeCapture-X5ZJPWSS-XjYT_qs9.js} +1 -1
  51. package/dist/{gui-mobile/assets/stateDiagram-2N3HPSRC-BVwptFNV.js → gui/assets/stateDiagram-2N3HPSRC-BvmUSBj7.js} +1 -1
  52. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-DapGdR4p.js +1 -0
  53. package/dist/{gui-mobile/assets/swimlanes-5IMT3BWC-BbylZ7V-.js → gui/assets/swimlanes-5IMT3BWC-Q9EbvB5b.js} +2 -2
  54. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-DKhxcy5X.js +8 -0
  55. package/dist/{gui-mobile/assets/timeline-definition-FHXFAJF6-BV41TYYS.js → gui/assets/timeline-definition-FHXFAJF6-DgbXmUFv.js} +1 -1
  56. package/dist/gui/assets/{vennDiagram-L72KCM5P-BIqvZp-4.js → vennDiagram-L72KCM5P-HN495Jcc.js} +1 -1
  57. package/dist/gui/assets/{wardleyDiagram-EHGQE667-JPG7bZy9.js → wardleyDiagram-EHGQE667-DO3Kcl1f.js} +1 -1
  58. package/dist/{gui-mobile/assets/xychartDiagram-FW5EYKEG-Cx6vz85D.js → gui/assets/xychartDiagram-FW5EYKEG-Dkev8MUn.js} +1 -1
  59. package/dist/gui/index.html +2 -2
  60. package/dist/gui-mobile/assets/{abnfDiagram-VRR7QNED-Ct5gVqPT.js → abnfDiagram-VRR7QNED-B8a9bP4Z.js} +1 -1
  61. package/dist/{gui/assets/arc-2DIKI2ug.js → gui-mobile/assets/arc-DMWvh_U2.js} +1 -1
  62. package/dist/{gui/assets/architectureDiagram-ZJ3FMSHR-D2QIR4yT.js → gui-mobile/assets/architectureDiagram-ZJ3FMSHR-CriuyKiK.js} +1 -1
  63. package/dist/{gui/assets/blockDiagram-677ZJIJ3-C38mclkj.js → gui-mobile/assets/blockDiagram-677ZJIJ3-C36Osy6t.js} +1 -1
  64. package/dist/gui-mobile/assets/{c4Diagram-LMCZKHZV-B3c0YPoi.js → c4Diagram-LMCZKHZV-D6F9TAnQ.js} +1 -1
  65. package/dist/gui-mobile/assets/channel-Pa9JU1-Q.js +1 -0
  66. package/dist/gui-mobile/assets/{chunk-2Q5K7J3B-DzXlffcc.js → chunk-2Q5K7J3B-DhslPOO5.js} +1 -1
  67. package/dist/gui-mobile/assets/{chunk-32BRIVSS-DNdPyBHB.js → chunk-32BRIVSS-CqWUTC4p.js} +1 -1
  68. package/dist/gui-mobile/assets/{chunk-5VM5RSS4-FHr258SK.js → chunk-5VM5RSS4-C6hfdixH.js} +1 -1
  69. package/dist/gui-mobile/assets/{chunk-EX3LRPZG-DpLoMziL.js → chunk-EX3LRPZG-BjIaj32A.js} +1 -1
  70. package/dist/gui-mobile/assets/{chunk-JWPE2WC7-BfJ8s3z4.js → chunk-JWPE2WC7-CXSE1zoi.js} +1 -1
  71. package/dist/gui-mobile/assets/{chunk-MOJQB5TN-B4KCM52Y.js → chunk-MOJQB5TN-k7ggc-5H.js} +1 -1
  72. package/dist/gui-mobile/assets/{chunk-RYQCIY6F-aU_mZozX.js → chunk-RYQCIY6F-HtP5QefR.js} +1 -1
  73. package/dist/gui-mobile/assets/{chunk-V7JOEXUC-CqjIsdVE.js → chunk-V7JOEXUC-CYYuHgUL.js} +1 -1
  74. package/dist/gui-mobile/assets/{chunk-VR4S4FIN-qx-Snhek.js → chunk-VR4S4FIN-BpCvkdOv.js} +1 -1
  75. package/dist/gui-mobile/assets/{chunk-XXDRQBXY-Dg3iQUEM.js → chunk-XXDRQBXY-BpQuZVjD.js} +1 -1
  76. package/dist/gui-mobile/assets/classDiagram-OUVF2IWQ-D8iVJmba.js +1 -0
  77. package/dist/gui-mobile/assets/classDiagram-v2-EOCWNBFH-D8iVJmba.js +1 -0
  78. package/dist/{gui/assets/cose-bilkent-JH36ORCC-D1zBTANI.js → gui-mobile/assets/cose-bilkent-JH36ORCC-jOz8GIIT.js} +1 -1
  79. package/dist/gui-mobile/assets/{cynefin-VYW2F7L2-DLOiRgeh.js → cynefin-VYW2F7L2-DtByhn4b.js} +1 -1
  80. package/dist/{gui/assets/cynefinDiagram-TSTJHNR4-DMALRnpH.js → gui-mobile/assets/cynefinDiagram-TSTJHNR4-DwDWb-Ju.js} +1 -1
  81. package/dist/gui-mobile/assets/{dagre-VKFMJZFB-DP8rPgCo.js → dagre-VKFMJZFB-pNrK4yk3.js} +1 -1
  82. package/dist/gui-mobile/assets/{diagram-FQU43EPY-zoHmM_c1.js → diagram-FQU43EPY-CdEnsu8F.js} +1 -1
  83. package/dist/{gui/assets/diagram-G47NLZAW-BjP4LLm6.js → gui-mobile/assets/diagram-G47NLZAW-BLuzoAuE.js} +1 -1
  84. package/dist/gui-mobile/assets/{diagram-NH7WQ7WH-RISBAFck.js → diagram-NH7WQ7WH-Bpi99f_Z.js} +1 -1
  85. package/dist/{gui/assets/diagram-OA4YK3LP-YOcWMSYY.js → gui-mobile/assets/diagram-OA4YK3LP-C0m0oiST.js} +1 -1
  86. package/dist/gui-mobile/assets/{diagram-WEI45ONY-DX_OX85j.js → diagram-WEI45ONY-pdcoGVYg.js} +1 -1
  87. package/dist/gui-mobile/assets/{ebnfDiagram-CCIWWBDH-DH_XqG-i.js → ebnfDiagram-CCIWWBDH-DzAqzu-j.js} +1 -1
  88. package/dist/{gui/assets/erDiagram-Q63AITRT-CLQiaiAZ.js → gui-mobile/assets/erDiagram-Q63AITRT-CKbqKY5l.js} +1 -1
  89. package/dist/gui-mobile/assets/{flowDiagram-23GEKE2U-WyU95Ioy.js → flowDiagram-23GEKE2U-CKXhLUH5.js} +1 -1
  90. package/dist/{gui/assets/ganttDiagram-NO4QXBWP-Dxn0qtBL.js → gui-mobile/assets/ganttDiagram-NO4QXBWP-exiET8aZ.js} +1 -1
  91. package/dist/gui-mobile/assets/{gitGraphDiagram-IHSO6WYX-CNKJbGdW.js → gitGraphDiagram-IHSO6WYX-DLe6IY6p.js} +1 -1
  92. package/dist/gui-mobile/assets/index-DL76Df2H.js +34 -0
  93. package/dist/gui-mobile/assets/index-DbWuq34n.css +1 -0
  94. package/dist/gui-mobile/assets/{infoDiagram-FWYZ7A6U-DxOtcAry.js → infoDiagram-FWYZ7A6U-B04qIqaC.js} +1 -1
  95. package/dist/gui-mobile/assets/{ishikawaDiagram-FXEZZL3T-CMaJhSQh.js → ishikawaDiagram-FXEZZL3T-BfUyr0CR.js} +1 -1
  96. package/dist/{gui/assets/journeyDiagram-5HDEW3XC-CxKkBGrP.js → gui-mobile/assets/journeyDiagram-5HDEW3XC-gmwBMoty.js} +1 -1
  97. package/dist/gui-mobile/assets/{kanban-definition-HUTT4EX6-D3ZZPGkn.js → kanban-definition-HUTT4EX6-D22Q3Up0.js} +1 -1
  98. package/dist/gui-mobile/assets/{linear-B0c-4Ray.js → linear-DQwTsNSF.js} +1 -1
  99. package/dist/{gui/assets/mermaid.core-DHOOjgm_.js → gui-mobile/assets/mermaid.core-D8lHksCk.js} +4 -4
  100. package/dist/gui-mobile/assets/{mindmap-definition-LN4V7U3C-_ryv_wzi.js → mindmap-definition-LN4V7U3C-DC_KwrL8.js} +1 -1
  101. package/dist/gui-mobile/assets/{pegDiagram-2B236MQR-DZ2VachG.js → pegDiagram-2B236MQR-C6j0z0D4.js} +1 -1
  102. package/dist/gui-mobile/assets/{pieDiagram-ENE6RG2P-CBph_Pgy.js → pieDiagram-ENE6RG2P-KHzkoE-g.js} +1 -1
  103. package/dist/{gui/assets/quadrantDiagram-ABIIQ3AL-BN9QEn92.js → gui-mobile/assets/quadrantDiagram-ABIIQ3AL-DNShHbw9.js} +1 -1
  104. package/dist/gui-mobile/assets/{railroadDiagram-RFXS5EU6-CmJHGX9l.js → railroadDiagram-RFXS5EU6-RvPMC4lU.js} +1 -1
  105. package/dist/gui-mobile/assets/{requirementDiagram-TGXJPOKE-jitvSOLv.js → requirementDiagram-TGXJPOKE-Z4MqXF1y.js} +1 -1
  106. package/dist/{gui/assets/sankeyDiagram-HTMAVEWB-DqRjcG-_.js → gui-mobile/assets/sankeyDiagram-HTMAVEWB-DL9TkB5D.js} +1 -1
  107. package/dist/{gui/assets/sequenceDiagram-DBY2YBRQ-KcYyDxXc.js → gui-mobile/assets/sequenceDiagram-DBY2YBRQ-ejhB58rm.js} +1 -1
  108. package/dist/gui-mobile/assets/{sizeCapture-X5ZJPWSS-DP0_srQJ.js → sizeCapture-X5ZJPWSS-fAXplUDg.js} +1 -1
  109. package/dist/{gui/assets/stateDiagram-2N3HPSRC-DaA8s8RA.js → gui-mobile/assets/stateDiagram-2N3HPSRC-DVw54Vpx.js} +1 -1
  110. package/dist/gui-mobile/assets/stateDiagram-v2-6OUMAXLB-Cq_iPvyn.js +1 -0
  111. package/dist/{gui/assets/swimlanes-5IMT3BWC-uFXg9Hk3.js → gui-mobile/assets/swimlanes-5IMT3BWC-BK2b0CK-.js} +2 -2
  112. package/dist/gui-mobile/assets/swimlanesDiagram-G3AALYLV-KQfs0uk_.js +8 -0
  113. package/dist/{gui/assets/timeline-definition-FHXFAJF6-DtLX54bg.js → gui-mobile/assets/timeline-definition-FHXFAJF6-4sNUiJhu.js} +1 -1
  114. package/dist/gui-mobile/assets/{vennDiagram-L72KCM5P-BwbuZWM5.js → vennDiagram-L72KCM5P-BzbSNpD8.js} +1 -1
  115. package/dist/gui-mobile/assets/{wardleyDiagram-EHGQE667-CIyvw8Ss.js → wardleyDiagram-EHGQE667-Ic4j9Roh.js} +1 -1
  116. package/dist/{gui/assets/xychartDiagram-FW5EYKEG-BUx7LrAa.js → gui-mobile/assets/xychartDiagram-FW5EYKEG-CE3h4iVU.js} +1 -1
  117. package/dist/gui-mobile/index.html +2 -2
  118. package/dist/gui-mobile/sw.js +1 -1
  119. package/dist/service/agent-sdk/types.d.ts +19 -0
  120. package/package.json +1 -1
  121. package/dist/gui/assets/channel-Ctk8Mzxv.js +0 -1
  122. package/dist/gui/assets/classDiagram-OUVF2IWQ-CdX03Kq_.js +0 -1
  123. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-CdX03Kq_.js +0 -1
  124. package/dist/gui/assets/index-BX4uV__j.css +0 -1
  125. package/dist/gui/assets/index-JL9p240A.js +0 -41
  126. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-CsxzEgZO.js +0 -1
  127. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-DgybLg8h.js +0 -8
  128. package/dist/gui-mobile/assets/channel-DZQuFUOP.js +0 -1
  129. package/dist/gui-mobile/assets/classDiagram-OUVF2IWQ-Ef3O_Gur.js +0 -1
  130. package/dist/gui-mobile/assets/classDiagram-v2-EOCWNBFH-Ef3O_Gur.js +0 -1
  131. package/dist/gui-mobile/assets/index-D4ldI3yk.js +0 -33
  132. package/dist/gui-mobile/assets/index-fVo_kT1f.css +0 -1
  133. package/dist/gui-mobile/assets/stateDiagram-v2-6OUMAXLB-C3kfseLl.js +0 -1
  134. package/dist/gui-mobile/assets/swimlanesDiagram-G3AALYLV-HFAz5nU-.js +0 -8
@@ -0,0 +1,42 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const Ye={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Xd(this.context.count)},getNextContextId(){return Xd(this.context.count++)}};function Xd(e){const t=String(e),n=t.length-1;return Ye.context.id+(n?String.fromCharCode(96+n):"")+t}function xi(e){Ye.context=e}const Gv=!1,Vv=(e,t)=>e===t,jn=Symbol("solid-proxy"),fm=typeof Proxy=="function",Oi=Symbol("solid-track"),Ws={equals:Vv};let gm=bm;const qn=1,Ni=2,hm={owned:null,cleanups:null,context:null,owner:null},du={};var rt=null;let ke=null,Wv=null,ft=null,an=null,sn=null,xa=0;function Pn(e,t){const n=ft,r=rt,o=e.length===0,i=t===void 0?r:t,s=o?hm:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>vt(()=>Vr(s)));rt=s,ft=null;try{return Sn(a,!0)}finally{ft=n,rt=r}}function T(e,t){t=t?Object.assign({},Ws,t):Ws;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(ke&&ke.running&&ke.sources.has(n)?o=o(n.tValue):o=o(n.value)),mm(n,o));return[pm.bind(n),r]}function nc(e,t,n){const r=Ea(e,t,!0,qn);si(r)}function $e(e,t,n){const r=Ea(e,t,!1,qn);si(r)}function re(e,t,n){gm=Qv;const r=Ea(e,t,!1,qn),o=bo&&gt(bo);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),sn?sn.push(r):si(r)}function ne(e,t,n){n=n?Object.assign({},Ws,n):Ws;const r=Ea(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,si(r),pm.bind(r)}function Yv(e){return e&&typeof e=="object"&&"then"in e}function en(e,t,n){let r,o,i;typeof t=="function"?(r=e,o=t,i={}):(r=!0,o=e,i=t||{});let s=null,a=du,u=null,l=!1,c=!1,d="initialValue"in i,g=typeof r=="function"&&ne(r);const h=new Set,[p,m]=(i.storage||T)(i.initialValue),[y,v]=T(void 0),[b,w]=T(void 0,{equals:!1}),[E,C]=T(d?"ready":"unresolved");Ye.context&&(u=Ye.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:Ye.load&&Ye.has(u)&&(a=Ye.load(u)));function A(R,L,F,D){return s===R&&(s=null,D!==void 0&&(d=!0),(R===a||L===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(D,{value:L})),a=du,ke&&R&&l?(ke.promises.delete(R),l=!1,Sn(()=>{ke.running=!0,I(L,F)},!1)):I(L,F)),L}function I(R,L){Sn(()=>{L===void 0&&m(()=>R),C(L!==void 0?"errored":d?"ready":"unresolved"),v(L);for(const F of h.keys())F.decrement();h.clear()},!1)}function S(){const R=bo&&gt(bo),L=p(),F=y();if(F!==void 0&&!s)throw F;return ft&&!ft.user&&R&&nc(()=>{b(),s&&(R.resolved&&ke&&l?ke.promises.add(s):h.has(R)||(R.increment(),h.add(R)))}),L}function k(R=!0){if(R!==!1&&c)return;c=!1;const L=g?g():r;if(l=ke&&ke.running,L==null||L===!1){A(s,vt(p));return}ke&&s&&ke.promises.delete(s);let F;const D=a!==du?a:vt(()=>{try{return o(L,{value:p(),refetching:R})}catch(B){F=B}});if(F!==void 0){A(s,void 0,Ks(F),L);return}else if(!Yv(D))return A(s,D,void 0,L),D;return s=D,"v"in D?(D.s===1?A(s,D.v,void 0,L):A(s,void 0,Ks(D.v),L),D):(c=!0,queueMicrotask(()=>c=!1),Sn(()=>{C(d?"refreshing":"pending"),w()},!1),D.then(B=>A(D,B,void 0,L),B=>A(D,void 0,Ks(B),L)))}Object.defineProperties(S,{state:{get:()=>E()},error:{get:()=>y()},loading:{get(){const R=E();return R==="pending"||R==="refreshing"}},latest:{get(){if(!d)return S();const R=y();if(R&&!s)throw R;return p()}}});let P=rt;return g?nc(()=>(P=rt,k(!1))):k(!1),[S,{refetch:R=>_a(P,()=>k(R)),mutate:m}]}function Bc(e){return Sn(e,!1)}function vt(e){if(ft===null)return e();const t=ft;ft=null;try{return e()}finally{ft=t}}function pt(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let l=0;l<e.length;l++)a[l]=e[l]()}else a=e();if(i)return i=!1,s;const u=vt(()=>t(a,o,s));return o=a,u}}function An(e){re(()=>vt(e))}function ue(e){return rt===null||(rt.cleanups===null?rt.cleanups=[e]:rt.cleanups.push(e)),e}function rc(){return ft}function Mi(){return rt}function _a(e,t){const n=rt,r=ft;rt=e,ft=null;try{return Sn(t,!0)}catch(o){Uc(o)}finally{rt=n,ft=r}}function zc(e){if(ke&&ke.running)return e(),ke.done;const t=ft,n=rt;return Promise.resolve().then(()=>{ft=t,rt=n;let r;return bo&&(r=ke||(ke={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),Sn(e,!1),ft=rt=null,r?r.done:void 0})}const[s5,Jd]=T(!1);function Zv(e){sn.push.apply(sn,e),e.length=0}function mt(e,t){const n=Symbol("context");return{id:n,Provider:ew(n),defaultValue:e}}function gt(e){let t;return rt&&rt.context&&(t=rt.context[e.id])!==void 0?t:e.defaultValue}function ii(e){const t=ne(e),n=ne(()=>oc(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let bo;function Xv(){return bo||(bo=mt())}function pm(){const e=ke&&ke.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===qn)si(this);else{const t=an;an=null,Sn(()=>Zs(this),!1),an=t}if(ft){const t=this.observers;if(!t||t[t.length-1]!==ft){const n=t?t.length:0;ft.sources?(ft.sources.push(this),ft.sourceSlots.push(n)):(ft.sources=[this],ft.sourceSlots=[n]),t?(t.push(ft),this.observerSlots.push(ft.sources.length-1)):(this.observers=[ft],this.observerSlots=[ft.sources.length-1])}}return e&&ke.sources.has(this)?this.tValue:this.value}function mm(e,t,n){let r=ke&&ke.running&&ke.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(ke){const o=ke.running;(o||!n&&ke.sources.has(e))&&(ke.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Sn(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=ke&&ke.running;s&&ke.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?an.push(i):sn.push(i),i.observers&&ym(i)),s?i.tState=qn:i.state=qn)}if(an.length>1e6)throw an=[],new Error},!1)}return t}function si(e){if(!e.fn)return;Vr(e);const t=xa;Qd(e,ke&&ke.running&&ke.sources.has(e)?e.tValue:e.value,t),ke&&!ke.running&&ke.sources.has(e)&&queueMicrotask(()=>{Sn(()=>{ke&&(ke.running=!0),ft=rt=e,Qd(e,e.tValue,t),ft=rt=null},!1)})}function Qd(e,t,n){let r;const o=rt,i=ft;ft=rt=e;try{r=e.fn(t)}catch(s){return e.pure&&(ke&&ke.running?(e.tState=qn,e.tOwned&&e.tOwned.forEach(Vr),e.tOwned=void 0):(e.state=qn,e.owned&&e.owned.forEach(Vr),e.owned=null)),e.updatedAt=n+1,Uc(s)}finally{ft=i,rt=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?mm(e,r,!0):ke&&ke.running&&e.pure?(ke.sources.has(e)||(e.value=r),ke.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function Ea(e,t,n,r=qn,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:rt,context:rt?rt.context:null,pure:n};return ke&&ke.running&&(i.state=0,i.tState=r),rt===null||rt!==hm&&(ke&&ke.running&&rt.pure?rt.tOwned?rt.tOwned.push(i):rt.tOwned=[i]:rt.owned?rt.owned.push(i):rt.owned=[i]),i}function Ys(e){const t=ke&&ke.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Ni)return Zs(e);if(e.suspense&&vt(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<xa);){if(t&&ke.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let o=e,i=n[r+1];for(;(o=o.owner)&&o!==i;)if(ke.disposed.has(o))return}if((t?e.tState:e.state)===qn)si(e);else if((t?e.tState:e.state)===Ni){const o=an;an=null,Sn(()=>Zs(e,n[0]),!1),an=o}}}function Sn(e,t){if(an)return e();let n=!1;t||(an=[]),sn?n=!0:sn=[],xa++;try{const r=e();return Jv(n),r}catch(r){n||(sn=null),an=null,Uc(r)}}function Jv(e){if(an&&(bm(an),an=null),e)return;let t;if(ke){if(!ke.promises.size&&!ke.queue.size){const r=ke.sources,o=ke.disposed;sn.push.apply(sn,ke.effects),t=ke.resolve;for(const i of sn)"tState"in i&&(i.state=i.tState),delete i.tState;ke=null,Sn(()=>{for(const i of o)Vr(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)Vr(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}Jd(!1)},!1)}else if(ke.running){ke.running=!1,ke.effects.push.apply(ke.effects,sn),sn=null,Jd(!0);return}}const n=sn;sn=null,n.length&&Sn(()=>gm(n),!1),t&&t()}function bm(e){for(let t=0;t<e.length;t++)Ys(e[t])}function Qv(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ys(r)}if(Ye.context){if(Ye.count){Ye.effects||(Ye.effects=[]),Ye.effects.push(...e.slice(0,n));return}xi()}for(Ye.effects&&(Ye.done||!Ye.count)&&(e=[...Ye.effects,...e],n+=Ye.effects.length,delete Ye.effects),t=0;t<n;t++)Ys(e[t])}function Zs(e,t){const n=ke&&ke.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){const o=e.sources[r];if(o.sources){const i=n?o.tState:o.state;i===qn?o!==t&&(!o.updatedAt||o.updatedAt<xa)&&Ys(o):i===Ni&&Zs(o,t)}}}function ym(e){const t=ke&&ke.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=Ni:r.state=Ni,r.pure?an.push(r):sn.push(r),r.observers&&ym(r))}}function Vr(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Vr(e.tOwned[t]);delete e.tOwned}if(ke&&ke.running&&e.pure)vm(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Vr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}ke&&ke.running?e.tState=0:e.state=0}function vm(e,t){if(t||(e.tState=0,ke.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)vm(e.owned[n])}function Ks(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Uc(e,t=rt){throw Ks(e)}function oc(e){if(typeof e=="function"&&!e.length)return oc(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=oc(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let o=0;o<r.length;o++)t.push(r[o]);else t.push(r)}return t}return e}function ew(e,t){return function(r){let o;return $e(()=>o=vt(()=>(rt.context={...rt.context,[e]:r.value},ii(()=>r.children))),void 0),o}}const ic=Symbol("fallback");function Xs(e){for(let t=0;t<e.length;t++)e[t]()}function tw(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ue(()=>Xs(i)),()=>{let u=e()||[],l=u.length,c,d;return u[Oi],vt(()=>{let h,p,m,y,v,b,w,E,C;if(l===0)s!==0&&(Xs(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[ic],o[0]=Pn(A=>(i[0]=A,n.fallback())),s=1);else if(s===0){for(o=new Array(l),d=0;d<l;d++)r[d]=u[d],o[d]=Pn(g);s=l}else{for(m=new Array(l),y=new Array(l),a&&(v=new Array(l)),b=0,w=Math.min(s,l);b<w&&r[b]===u[b];b++);for(w=s-1,E=l-1;w>=b&&E>=b&&r[w]===u[E];w--,E--)m[E]=o[w],y[E]=i[w],a&&(v[E]=a[w]);for(h=new Map,p=new Array(E+1),d=E;d>=b;d--)C=u[d],c=h.get(C),p[d]=c===void 0?-1:c,h.set(C,d);for(c=b;c<=w;c++)C=r[c],d=h.get(C),d!==void 0&&d!==-1?(m[d]=o[c],y[d]=i[c],a&&(v[d]=a[c]),d=p[d],h.set(C,d)):i[c]();for(d=b;d<l;d++)d in m?(o[d]=m[d],i[d]=y[d],a&&(a[d]=v[d],a[d](d))):o[d]=Pn(g);o=o.slice(0,s=l),r=u.slice(0)}return o});function g(h){if(i[d]=h,a){const[p,m]=T(d);return a[d]=m,t(u[d],p)}return t(u[d])}}}function nw(e,t,n={}){let r=[],o=[],i=[],s=[],a=0,u;return ue(()=>Xs(i)),()=>{const l=e()||[],c=l.length;return l[Oi],vt(()=>{if(c===0)return a!==0&&(Xs(i),i=[],r=[],o=[],a=0,s=[]),n.fallback&&(r=[ic],o[0]=Pn(g=>(i[0]=g,n.fallback())),a=1),o;for(r[0]===ic&&(i[0](),i=[],r=[],o=[],a=0),u=0;u<c;u++)u<r.length&&r[u]!==l[u]?s[u](()=>l[u]):u>=r.length&&(o[u]=Pn(d));for(;u<r.length;u++)i[u]();return a=s.length=i.length=c,r=l.slice(0),o=o.slice(0,a)});function d(g){i[u]=g;const[h,p]=T(l[u]);return s[u]=p,t(h,u)}}}function f(e,t){return vt(()=>e(t||{}))}function Cs(){return!0}const sc={get(e,t,n){return t===jn?n:e.get(t)},has(e,t){return t===jn?!0:e.has(t)},set:Cs,deleteProperty:Cs,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Cs,deleteProperty:Cs}},ownKeys(e){return e.keys()}};function fu(e){return(e=typeof e=="function"?e():e)?e:{}}function rw(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function G(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&jn in a,e[s]=typeof a=="function"?(t=!0,ne(a)):a}if(fm&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const u=fu(e[a])[s];if(u!==void 0)return u}},has(s){for(let a=e.length-1;a>=0;a--)if(s in fu(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(fu(e[a])));return[...new Set(s)]}},sc);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const u=Object.getOwnPropertyNames(a);for(let l=u.length-1;l>=0;l--){const c=u[l];if(c==="__proto__"||c==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,c);if(!r[c])r[c]=d.get?{enumerable:!0,configurable:!0,get:rw.bind(n[c]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const g=n[c];g&&(d.get?g.push(d.get.bind(a)):d.value!==void 0&&g.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],u=r[a];u&&u.get?Object.defineProperty(o,a,u):o[a]=u?u.value:void 0}return o}function de(e,...t){const n=t.length;if(fm&&jn in e){const o=n>1?t.flat():t[0],i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},sc));return i.push(new Proxy({get(s){return o.includes(s)?void 0:e[s]},has(s){return o.includes(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!o.includes(s))}},sc)),i}const r=[];for(let o=0;o<=n;o++)r[o]={};for(const o of Object.getOwnPropertyNames(e)){let i=n;for(let u=0;u<t.length;u++)if(t[u].includes(o)){i=u;break}const s=Object.getOwnPropertyDescriptor(e,o);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[i][o]=s.value:Object.defineProperty(r[i],o,s)}return r}let ow=0;function Pt(){return Ye.context?Ye.getNextContextId():`cl-${ow++}`}const wm=e=>`Stale read from <${e}>.`;function at(e){const t="fallback"in e&&{fallback:()=>e.fallback};return ne(tw(()=>e.each,e.children,t||void 0))}function ac(e){const t="fallback"in e&&{fallback:()=>e.fallback};return ne(nw(()=>e.each,e.children,t||void 0))}function j(e){const t=e.keyed,n=ne(()=>e.when,void 0,void 0),r=t?n:ne(n,void 0,{equals:(o,i)=>!o==!i});return ne(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?vt(()=>i(t?o:()=>{if(!vt(r))throw wm("Show");return n()})):i}return e.fallback},void 0,void 0)}function iw(e){const t=ii(()=>e.children),n=ne(()=>{const r=t(),o=Array.isArray(r)?r:[r];let i=()=>{};for(let s=0;s<o.length;s++){const a=s,u=o[s],l=i,c=ne(()=>l()?void 0:u.when,void 0,void 0),d=u.keyed?c:ne(c,void 0,{equals:(g,h)=>!g==!h});i=()=>l()||(d()?[a,c,u]:void 0)}return i});return ne(()=>{const r=n()();if(!r)return e.fallback;const[o,i,s]=r,a=s.children;return typeof a=="function"&&a.length>0?vt(()=>a(s.keyed?i():()=>{if(vt(n)()?.[0]!==o)throw wm("Match");return i()})):a},void 0,void 0)}function ef(e){return e}const sw=mt();function Ca(e){let t=0,n,r,o,i,s;const[a,u]=T(!1),l=Xv(),c={increment:()=>{++t===1&&u(!0)},decrement:()=>{--t===0&&u(!1)},inFallback:a,effects:[],resolved:!1},d=Mi();if(Ye.context&&Ye.load){const p=Ye.getContextId();let m=Ye.load(p);if(m&&(typeof m!="object"||m.s!==1?o=m:Ye.gather(p)),o&&o!=="$$f"){const[y,v]=T(void 0,{equals:!1});i=y,o.then(()=>{if(Ye.done)return v();Ye.gather(p),xi(r),v(),xi()},b=>{s=b,v()})}}const g=gt(sw);g&&(n=g.register(c.inFallback));let h;return ue(()=>h&&h()),f(l.Provider,{value:c,get children(){return ne(()=>{if(s)throw s;if(r=Ye.context,i)return i(),i=void 0;r&&o==="$$f"&&xi();const p=ne(()=>e.children);return ne(m=>{const y=c.inFallback(),{showContent:v=!0,showFallback:b=!0}=n?n():{};if((!y||o&&o!=="$$f")&&v)return c.resolved=!0,h&&h(),h=r=o=void 0,Zv(c.effects),p();if(b)return h?m:Pn(w=>(h=w,r&&(xi({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const aw=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],uw=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...aw]),lw=new Set(["innerHTML","textContent","innerText","children"]),cw=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),dw=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function fw(e,t){const n=dw[e];return typeof n=="object"?n[t]?n.$:void 0:n}const gw=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),hw=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),pw={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},J=e=>ne(()=>e());function mw(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,u=t[o-1].nextSibling,l=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const c=i<r?a?n[a-1].nextSibling:n[i-a]:u;for(;a<i;)e.insertBefore(n[a++],c)}else if(i===a)for(;s<o;)(!l||!l.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const c=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],c),t[o]=n[i]}else{if(!l){l=new Map;let d=a;for(;d<i;)l.set(n[d],d++)}const c=l.get(t[s]);if(c!=null)if(a<c&&c<i){let d=s,g=1,h;for(;++d<o&&d<i&&!((h=l.get(t[d]))==null||h!==c+g);)g++;if(g>c-a){const p=t[s];for(;a<c;)e.insertBefore(n[a++],p)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const tf="_$DX_DELEGATE";function bw(e,t,n,r={}){let o;return Pn(i=>{o=i,t===document?e():x(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function $(e,t,n,r){let o;const i=()=>{const a=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:r?a.firstChild:a.content.firstChild},s=t?()=>vt(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function Gt(e,t=window.document){const n=t[tf]||(t[tf]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Cw))}}function Ke(e,t,n){wo(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function yw(e,t,n,r){wo(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function vw(e,t,n){wo(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function kt(e,t){wo(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Js(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function ww(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(nf(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],u=!!t[a];!a||a==="undefined"||n[a]===u||!u||(nf(e,a,!0),n[a]=u)}return n}function Zo(e,t,n){if(!t)return n?Ke(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function Pi(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function gr(e,t={},n,r){const o={};return r||$e(()=>o.children=$i(e,t.children,o.children)),$e(()=>typeof t.ref=="function"&&Hn(t.ref,e)),$e(()=>xw(e,t,n,!0,o,!0)),o}function Hn(e,t,n){return vt(()=>e(t,n))}function x(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return $i(e,t,r,n);$e(o=>$i(e,t(),o,n),r)}function xw(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=rf(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=rf(e,s,a,o[s],n,i,t)}}function _w(e){let t,n;return!wo()||!(t=Ye.registry.get(n=Sw()))?e():(Ye.completed&&Ye.completed.add(t),Ye.registry.delete(n),t)}function wo(e){return!!Ye.context&&!Ye.done&&(!e||e.isConnected)}function Ew(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function nf(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function rf(e,t,n,r,o,i,s){let a,u,l,c,d;if(t==="style")return Zo(e,n,r);if(t==="classList")return ww(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const g=t.slice(3);r&&e.removeEventListener(g,r,typeof r!="function"&&r),n&&e.addEventListener(g,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const g=t.slice(10);r&&e.removeEventListener(g,r,!0),n&&e.addEventListener(g,n,!0)}else if(t.slice(0,2)==="on"){const g=t.slice(2).toLowerCase(),h=gw.has(g);if(!h&&r){const p=Array.isArray(r)?r[0]:r;e.removeEventListener(g,p)}(h||n)&&(Js(e,g,n,h),h&&Gt([g]))}else if(t.slice(0,5)==="attr:")Ke(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")vw(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(l=lw.has(t))||!o&&((c=fw(t,e.tagName))||(u=uw.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),u=!0;else if(wo(e))return n;t==="class"||t==="className"?kt(e,n):a&&!u&&!l?e[Ew(t)]=n:e[c||t]=n}else{const g=o&&t.indexOf(":")>-1&&pw[t.split(":")[0]];g?yw(e,g,t,n):Ke(e,cw[t]||t,n)}return n}function Cw(e){if(Ye.registry&&Ye.events&&Ye.events.find(([u,l])=>l===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=u=>Object.defineProperty(e,"target",{configurable:!0,value:u}),s=()=>{const u=t[n];if(u&&!t.disabled){const l=t[`${n}Data`];if(l!==void 0?u.call(t,l,e):u.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Ye.registry&&!Ye.done&&(Ye.done=_$HY.done=!0),e.composedPath){const u=e.composedPath();i(u[0]);for(let l=0;l<u.length-2&&(t=u[l],!!s());l++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function $i(e,t,n,r,o){const i=wo(e);if(i){!n&&(n=[...e.childNodes]);let u=[];for(let l=0;l<n.length;l++){const c=n[l];c.nodeType===8&&c.data.slice(0,2)==="!$"?c.remove():u.push(c)}n=u}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(a){let u=n[0];u&&u.nodeType===3?u.data!==t&&(u.data=t):u=document.createTextNode(t),n=Io(e,n,r,u)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=Io(e,n,r)}else{if(s==="function")return $e(()=>{let u=t();for(;typeof u=="function";)u=u();n=$i(e,u,n,r)}),()=>n;if(Array.isArray(t)){const u=[],l=n&&Array.isArray(n);if(uc(u,t,n,o))return $e(()=>n=$i(e,u,n,r,!0)),()=>n;if(i){if(!u.length)return n;if(r===void 0)return n=[...e.childNodes];let c=u[0];if(c.parentNode!==e)return n;const d=[c];for(;(c=c.nextSibling)!==r;)d.push(c);return n=d}if(u.length===0){if(n=Io(e,n,r),a)return n}else l?n.length===0?of(e,u,r):mw(e,n,u):(n&&Io(e),of(e,u));n=u}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Io(e,n,r,t);Io(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function uc(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],u=n&&n[e.length],l;if(!(a==null||a===!0||a===!1))if((l=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=uc(e,a,u)||o;else if(l==="function")if(r){for(;typeof a=="function";)a=a();o=uc(e,Array.isArray(a)?a:[a],Array.isArray(u)?u:[u])||o}else e.push(a),o=!0;else{const c=String(a);u&&u.nodeType===3&&u.data===c?e.push(u):e.push(document.createTextNode(c))}}return o}function of(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Io(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const u=a.parentNode===e;!i&&!s?u?e.replaceChild(o,a):e.insertBefore(o,n):u&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function Sw(){return Ye.getNextContextId()}const kw=!1,Aw="http://www.w3.org/2000/svg";function xm(e,t=!1,n=void 0){return t?document.createElementNS(Aw,e):document.createElement(e,{is:n})}function Ji(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Mi();let i,s=!!Ye.context;return re(()=>{s&&(Mi().user=s=!1),i||(i=_a(o,()=>ne(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[u,l]=T(!1),c=()=>l(!0);Pn(d=>x(a,()=>u()?d():i(),null)),ue(c)}else{const u=xm(e.isSVG?"g":"div",e.isSVG),l=t&&u.attachShadow?u.attachShadow({mode:"open"}):u;Object.defineProperty(u,"_$host",{get(){return n.parentNode},configurable:!0}),x(l,i),a.appendChild(u),e.ref&&e.ref(u),ue(()=>a.removeChild(u))}},void 0,{render:!s}),n}function Tw(e,t){const n=ne(e);return ne(()=>{const r=n();switch(typeof r){case"function":return vt(()=>r(t));case"string":const o=hw.has(r),i=Ye.context?_w():xm(r,o,vt(()=>t.is));return gr(i,t,o),i}})}function _m(e){const[,t]=de(e,["component"]);return Tw(()=>e.component,t)}function Em(){let e=new Set;function t(o){return e.add(o),()=>e.delete(o)}let n=!1;function r(o,i){if(n)return!(n=!1);const s={to:o,options:i,defaultPrevented:!1,preventDefault:()=>s.defaultPrevented=!0};for(const a of e)a.listener({...s,from:a.location,retry:u=>{u&&(n=!0),a.navigate(o,{...i,resolve:!1})}});return!s.defaultPrevented}return{subscribe:t,confirm:r}}let lc;function Kc(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),lc=window.history.state._depth}Kc();function Iw(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function Dw(e,t){let n=!1;return()=>{const r=lc;Kc();const o=r==null?null:lc-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const Rw=/^(?:[a-z0-9]+:)?\/\//i,Ow=/^\/+|(\/)\/+$/g,Cm="http://sr";function mo(e,t=!1){const n=e.replace(Ow,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function js(e,t,n){if(Rw.test(t))return;const r=mo(e),o=n&&mo(n);let i="";return!o||t.startsWith("/")?i=r:o.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+o:i=o,(i||"/")+mo(t,!i)}function Nw(e,t){if(e==null)throw new Error(t);return e}function Mw(e,t){return mo(e).replace(/\/*(\*.*)?$/g,"")+mo(t)}function Sm(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function Pw(e,t,n){const[r,o]=e.split("/*",2),i=r.split("/").filter(Boolean),s=i.length;return a=>{const u=a.split("/").filter(Boolean),l=u.length-s;if(l<0||l>0&&o===void 0&&!t)return null;const c={path:s?"":"/",params:{}},d=g=>n===void 0?void 0:n[g];for(let g=0;g<s;g++){const h=i[g],p=h[0]===":",m=p?u[g]:u[g].toLowerCase(),y=p?h.slice(1):h.toLowerCase();if(p&&gu(m,d(y)))c.params[y]=m;else if(p||!gu(m,y))return null;c.path+=`/${m}`}if(o){const g=l?u.slice(-l).join("/"):"";if(gu(g,d(o)))c.params[o]=g;else return null}return c}}function gu(e,t){const n=r=>r===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function $w(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((o,i)=>o+(i.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function km(e){const t=new Map,n=Mi();return new Proxy({},{get(r,o){return t.has(o)||_a(n,()=>t.set(o,ne(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,o){return o in e()}})}function Am(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const o=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)o.push(n+=t[1]),r=r.slice(t[0].length);return Am(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const Lw=100,Tm=mt(),jc=mt(),xo=()=>Nw(gt(Tm),"<A> and 'use' router primitives can be only used inside a Route."),Fw=()=>gt(jc)||xo().base,Bw=e=>{const t=Fw();return ne(()=>t.resolvePath(e()))},zw=e=>{const t=xo();return ne(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},Qr=()=>xo().navigatorFactory(),ai=()=>xo().location,Uw=()=>xo().isRouting,Qi=()=>xo().params,Kw=e=>{const t=xo().beforeLeave.subscribe({listener:e,location:ai(),navigate:Qr()});ue(t)};function jw(e,t=""){const{component:n,preload:r,load:o,children:i,info:s}=e,a=!i||Array.isArray(i)&&!i.length,u={key:e,component:n,preload:r||o,info:s};return Im(e.path).reduce((l,c)=>{for(const d of Am(c)){const g=Mw(t,d);let h=a?g:g.split("/*",1)[0];h=h.split("/").map(p=>p.startsWith(":")||p.startsWith("*")?p:encodeURIComponent(p)).join("/"),l.push({...u,originalPath:c,pattern:h,matcher:Pw(h,!a,e.matchFilters)})}return l},[])}function qw(e,t=0){return{routes:e,score:$w(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o],s=i.matcher(n);if(!s)return null;r.unshift({...s,route:i})}return r}}}function Im(e){return Array.isArray(e)?e:[e]}function Dm(e,t="",n=[],r=[]){const o=Im(e);for(let i=0,s=o.length;i<s;i++){const a=o[i];if(a&&typeof a=="object"){a.hasOwnProperty("path")||(a.path="");const u=jw(a,t);for(const l of u){n.push(l);const c=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!c)Dm(a.children,l.pattern,n,r);else{const d=qw([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function hu(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function Hw(e,t,n){const r=new URL(Cm),o=ne(c=>{const d=e();try{return new URL(d,r)}catch{return console.error(`Invalid path ${d}`),c}},r,{equals:(c,d)=>c.href===d.href}),i=ne(()=>o().pathname),s=ne(()=>o().search,!0),a=ne(()=>o().hash),u=()=>"",l=pt(s,()=>Sm(o()));return{get pathname(){return i()},get search(){return s()},get hash(){return a()},get state(){return t()},get key(){return u()},query:n?n(l):km(l)}}let ho;function Gw(){return ho}function Vw(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(D=>D),u=s.renderPath||(D=>D),l=s.beforeLeave||Em(),c=js("",r.base||"");if(c===void 0)throw new Error(`${c} is not a valid base path`);c&&!o().value&&i({value:c,replace:!0,scroll:!1});const[d,g]=T(!1);let h;const p=(D,B)=>{B.value===m()&&B.state===v()||(h===void 0&&g(!0),ho=D,h=B,zc(()=>{h===B&&(y(h.value),b(h.state),C[1](N=>N.filter(X=>X.pending)))}).finally(()=>{h===B&&Bc(()=>{ho=void 0,D==="navigate"&&L(h),g(!1),h=void 0})}))},[m,y]=T(o().value),[v,b]=T(o().state),w=Hw(m,v,s.queryWrapper),E=[],C=T([]),A=ne(()=>typeof r.transformUrl=="function"?hu(t(),r.transformUrl(w.pathname)):hu(t(),w.pathname)),I=()=>{const D=A(),B={};for(let N=0;N<D.length;N++)Object.assign(B,D[N].params);return B},S=s.paramsWrapper?s.paramsWrapper(I,t):km(I),k={pattern:c,path:()=>c,outlet:()=>null,resolvePath(D){return js(c,D)}};return $e(pt(o,D=>p("native",D),{defer:!0})),{base:k,location:w,params:S,isRouting:d,renderPath:u,parsePath:a,navigatorFactory:R,matches:A,beforeLeave:l,preloadRoute:F,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:C};function P(D,B,N){vt(()=>{if(typeof B=="number"){B&&(s.go?s.go(B):console.warn("Router integration does not support relative routing"));return}const X=!B||B[0]==="?",{replace:se,resolve:K,scroll:U,state:oe}={replace:!1,resolve:!X,scroll:!0,...N},H=K?D.resolvePath(B):js(X&&w.pathname||"",B);if(H===void 0)throw new Error(`Path '${B}' is not a routable path`);if(E.length>=Lw)throw new Error("Too many redirects");const z=m();(H!==z||oe!==v())&&(kw||l.confirm(H,N)&&(E.push({value:z,replace:se,scroll:U,state:v()}),p("navigate",{value:H,state:oe})))})}function R(D){return D=D||gt(jc)||k,(B,N)=>P(D,B,N)}function L(D){const B=E[0];B&&(i({...D,replace:B.replace,scroll:B.scroll}),E.length=0)}function F(D,B){const N=hu(t(),D.pathname),X=ho;ho="preload";for(let se in N){const{route:K,params:U}=N[se];K.component&&K.component.preload&&K.component.preload();const{preload:oe}=K;B&&oe&&_a(n(),()=>oe({params:U,location:{pathname:D.pathname,search:D.search,hash:D.hash,query:Sm(D),state:null,key:""},intent:"preload"}))}ho=X}}function Ww(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:u,preload:l}=r().route,c=ne(()=>r().path);u&&u.preload&&u.preload();const d=l?l({params:s,location:i,intent:ho||"initial"}):void 0;return{parent:t,pattern:a,path:c,outlet:()=>u?f(u,{params:s,location:i,data:d,get children(){return n()}}):n(),resolvePath(h){return js(o.path(),h,c())}}}const Yw=e=>t=>{const{base:n}=t,r=ii(()=>t.children),o=ne(()=>Dm(r(),t.base||""));let i;const s=Vw(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),f(Tm.Provider,{value:s,get children(){return f(Zw,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[J(()=>(i=Mi())&&null),f(Xw,{routerState:s,get branches(){return o()}})]}})}})};function Zw(e){const t=e.routerState.location,n=e.routerState.params,r=ne(()=>e.preload&&vt(()=>{e.preload({params:n,location:t,intent:Gw()||"initial"})}));return f(j,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>f(o,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function Xw(e){const t=[];let n;const r=ne(pt(e.routerState.matches,(o,i,s)=>{let a=i&&o.length===i.length;const u=[];for(let l=0,c=o.length;l<c;l++){const d=i&&i[l],g=o[l];s&&d&&g.route.key===d.route.key?u[l]=s[l]:(a=!1,t[l]&&t[l](),Pn(h=>{t[l]=h,u[l]=Ww(e.routerState,u[l-1]||e.routerState.base,sf(()=>r()[l+1]),()=>{const p=e.routerState.matches();return p[l]??p[0]})}))}return t.splice(o.length).forEach(l=>l()),s&&a?s:(n=u[0],u)}));return sf(()=>r()&&n)()}const sf=e=>()=>f(j,{get when(){return e()},keyed:!0,children:t=>f(jc.Provider,{value:t,get children(){return t.outlet()}})}),_r=e=>{const t=ii(()=>e.children);return G(e,{get children(){return t()}})};function Jw([e,t],n,r){return[e,r?o=>t(r(o)):t]}function Qw(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=Jw(T(n(e.get()),{equals:(o,i)=>o.value===i.value&&o.state===i.state}),void 0,o=>(!t&&e.set(o),Ye.registry&&!Ye.done&&(Ye.done=!0),o));return e.init&&ue(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),Yw({signal:r,create:e.create,utils:e.utils})}function ex(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function tx(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const nx=new Map;function rx({preload:e=!0,explicitLinks:t=!1,actionBase:n="/_server",transformUrl:r}={}){return o=>{const i=o.base.path(),s=o.navigatorFactory(o.base);let a,u;function l(m){return m.namespaceURI==="http://www.w3.org/2000/svg"}function c(m){if(m.defaultPrevented||m.button!==0||m.metaKey||m.altKey||m.ctrlKey||m.shiftKey)return;const y=m.composedPath().find(A=>A instanceof Node&&A.nodeName.toUpperCase()==="A");if(!y||t&&!y.hasAttribute("link"))return;const v=l(y),b=v?y.href.baseVal:y.href;if((v?y.target.baseVal:y.target)||!b&&!y.hasAttribute("state"))return;const E=(y.getAttribute("rel")||"").split(/\s+/);if(y.hasAttribute("download")||E&&E.includes("external"))return;const C=v?new URL(b,document.baseURI):new URL(b);if(!(C.origin!==window.location.origin||i&&C.pathname&&!C.pathname.toLowerCase().startsWith(i.toLowerCase())))return[y,C]}function d(m){const y=c(m);if(!y)return;const[v,b]=y,w=o.parsePath(b.pathname+b.search+b.hash),E=v.getAttribute("state");m.preventDefault(),s(w,{resolve:!1,replace:v.hasAttribute("replace"),scroll:!v.hasAttribute("noscroll"),state:E?JSON.parse(E):void 0})}function g(m){const y=c(m);if(!y)return;const[v,b]=y;r&&(b.pathname=r(b.pathname)),o.preloadRoute(b,v.getAttribute("preload")!=="false")}function h(m){clearTimeout(a);const y=c(m);if(!y)return u=null;const[v,b]=y;u!==v&&(r&&(b.pathname=r(b.pathname)),a=setTimeout(()=>{o.preloadRoute(b,v.getAttribute("preload")!=="false"),u=v},20))}function p(m){if(m.defaultPrevented)return;let y=m.submitter&&m.submitter.hasAttribute("formaction")?m.submitter.getAttribute("formaction"):m.target.getAttribute("action");if(!y)return;if(!y.startsWith("https://action/")){const b=new URL(y,Cm);if(y=o.parsePath(b.pathname+b.search),!y.startsWith(n))return}if(m.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const v=nx.get(y);if(v){m.preventDefault();const b=new FormData(m.target,m.submitter);v.call({r:o,f:m.target},m.target.enctype==="multipart/form-data"?b:new URLSearchParams(b))}}Gt(["click","submit"]),document.addEventListener("click",d),e&&(document.addEventListener("mousemove",h,{passive:!0}),document.addEventListener("focusin",g,{passive:!0}),document.addEventListener("touchstart",g,{passive:!0})),document.addEventListener("submit",p),ue(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",h),document.removeEventListener("focusin",g),document.removeEventListener("touchstart",g)),document.removeEventListener("submit",p)})}}function ox(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,o=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:o}},n=Em();return Qw({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(Iw(s),"",r):window.history.pushState(s,"",r),tx(decodeURIComponent(window.location.hash.slice(1)),i),Kc()},init:r=>ex(window,"popstate",Dw(r,o=>{if(o)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:rx({preload:e.preload,explicitLinks:e.explicitLinks,actionBase:e.actionBase,transformUrl:e.transformUrl}),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var ix=$("<a>");function Kn(e){e=G({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=de(e,["href","state","class","activeClass","inactiveClass","end"]),n=Bw(()=>e.href),r=zw(n),o=ai(),i=ne(()=>{const s=n();if(s===void 0)return[!1,!1];const a=mo(s.split(/[?#]/,1)[0]).toLowerCase(),u=decodeURI(mo(o.pathname).toLowerCase());return[e.end?a===u:u.startsWith(a+"/")||u===a,a===u]});return(()=>{var s=ix();return gr(s,G(t,{get href(){return r()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!i()[0],[e.activeClass]:i()[0],...t.classList}},link:"",get"aria-current"(){return i()[1]?"page":void 0}}),!1,!1),s})()}function sx(e){const t=Qr(),n=ai(),{href:r,state:o}=e,i=typeof r=="function"?r({navigate:t,location:n}):r;return t(i,{replace:!0,state:o}),null}const cc=Symbol("store-raw"),qo=Symbol("store-node"),kr=Symbol("store-has"),Rm=Symbol("store-self");function Om(e){let t=e[jn];if(!t&&(Object.defineProperty(e,jn,{value:t=new Proxy(e,lx)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),o=Object.getPrototypeOf(e),i=o!==null&&e!==null&&typeof e=="object"&&!Array.isArray(e)&&o!==Object.prototype;if(i){const s=Object.getOwnPropertyDescriptors(o);n.push(...Object.keys(s)),Object.assign(r,s)}for(let s=0,a=n.length;s<a;s++){const u=n[s];i&&u==="constructor"||r[u].get&&Object.defineProperty(e,u,{configurable:!0,enumerable:r[u].enumerable,get:r[u].get.bind(t)})}}return t}function Qs(e){let t;return e!=null&&typeof e=="object"&&(e[jn]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Li(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[cc])return n;if(!Qs(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)o=e[s],(r=Li(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let u=0,l=s.length;u<l;u++)i=s[u],!a[i].get&&(o=e[i],(r=Li(o,t))!==o&&(e[i]=r))}return e}function ea(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Fi(e,t,n){if(e[t])return e[t];const[r,o]=T(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function ax(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===jn||t===qo||(delete n.value,delete n.writable,n.get=()=>e[jn][t]),n}function Nm(e){rc()&&Fi(ea(e,qo),Rm)()}function ux(e){return Nm(e),Reflect.ownKeys(e)}const lx={get(e,t,n){if(t===cc)return e;if(t===jn)return n;if(t===Oi)return Nm(e),n;const r=ea(e,qo),o=r[t];let i=o?o():e[t];if(t===qo||t===kr||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);rc()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=Fi(r,t,i)())}return Qs(i)?Om(i):i},has(e,t){return t===cc||t===jn||t===Oi||t===qo||t===kr||t==="__proto__"?!0:(rc()&&Fi(ea(e,kr),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:ux,getOwnPropertyDescriptor:ax};function ta(e,t,n,r=!1){if(t==="__proto__"||!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[kr]&&e[kr][t]&&o!==void 0&&e[kr][t].$()):(e[t]=n,e[kr]&&e[kr][t]&&o===void 0&&e[kr][t].$());let s=ea(e,qo),a;if((a=Fi(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let u=e.length;u<i;u++)(a=s[u])&&a.$();(a=Fi(s,"length",i))&&a.$(e.length)}(a=s[Rm])&&a.$()}function Mm(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];Pm(o)||ta(e,o,t[o])}}function Pm(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function cx(e,t){if(typeof t=="function"&&(t=t(e)),t=Li(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&ta(e,n,o)}ta(e,"length",r)}else Mm(e,t)}function _i(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(s==="string"&&(r==="__proto__"||t.length>1&&Pm(r)))return;if(Array.isArray(r)){for(let u=0;u<r.length;u++)_i(e,[r[u]].concat(t),n);return}else if(a&&s==="function"){for(let u=0;u<e.length;u++)r(e[u],u)&&_i(e,[u].concat(t),n);return}else if(a&&s==="object"){const{from:u=0,to:l=e.length-1,by:c=1}=r;for(let d=u;d<=l;d+=c)_i(e,[d].concat(t),n);return}else if(t.length>1){_i(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=Li(i),r===void 0||Qs(o)&&Qs(i)&&!Array.isArray(i)?Mm(o,i):ta(e,r,i))}function dx(...[e,t]){const n=Li(e||{}),r=Array.isArray(n),o=Om(n);function i(...s){Bc(()=>{r&&s.length===1?cx(n,s[0]):_i(n,s)})}return[o,i]}const We=e=>typeof e=="string",hi=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},af=e=>e==null?"":String(e),fx=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},gx=/###/g,uf=e=>e&&e.includes("###")?e.replace(gx,"."):e,lf=e=>!e||We(e),Ai=(e,t,n)=>{const r=We(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(lf(e))return{};const i=uf(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return lf(e)?{}:{obj:e,k:uf(r[o])}},cf=(e,t,n)=>{const{obj:r,k:o}=Ai(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),a=Ai(e,s,Object);for(;a.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=Ai(e,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},hx=(e,t,n,r)=>{const{obj:o,k:i}=Ai(e,t,Object);o[i]=o[i]||[],o[i].push(n)},na=(e,t)=>{const{obj:n,k:r}=Ai(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},px=(e,t,n)=>{const r=na(e,n);return r!==void 0?r:na(t,n)},$m=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,r)?We(e[r])||e[r]instanceof String||We(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):$m(e[r],t[r],n):e[r]=t[r]);return e},Er=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),mx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},bx=e=>We(e)?e.replace(/[&<>"'\/]/g,t=>mx[t]):e;class yx{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const vx=[" ",",","?","!",";"],wx=new yx(20),xx=(e,t,n)=>{t=t||"",n=n||"";const r=vx.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const o=wx.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(e);if(!i){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i},dc=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let s,a="";for(let u=i;u<r.length;++u)if(u!==i&&(a+=n),a+=r[u],s=o[a],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&u<r.length-1)continue;i+=u-i+1;break}o=s}return o},Bi=e=>e?.replace(/_/g,"-"),_x={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class ra{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||_x,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(t=t.map(i=>We(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),We(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new ra(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ra(this.logger,t)}}var or=new ra;class Sa{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...o)=>{n(...o),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(t,...n)})}}class df extends Sa{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,o={}){const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.includes(".")?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):We(r)&&i?a.push(...r.split(i)):a.push(r)));const u=na(this.data,a);return!u&&!n&&!r&&t.includes(".")&&(t=a[0],n=a[1],r=a.slice(2).join(".")),u||!s||!We(r)?u:dc(this.data?.[t]?.[n],r,i)}addResource(t,n,r,o,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.includes(".")&&(a=t.split("."),o=n,n=a[1]),this.addNamespaces(n),cf(this.data,a,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r,o={silent:!1}){for(const i in r)(We(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i,s={silent:!1,skipCopy:!1}){let a=[t,n];t.includes(".")&&(a=t.split("."),o=r,r=n,n=a[1]),this.addNamespaces(n);let u=na(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?$m(u,r,i):u={...u,...r},cf(this.data,a,u),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Lm={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{t=this.processors[i]?.process(t,n,r,o)??t}),t}};const Fm=Symbol("i18next/PATH_KEY");function Ex(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===Fm?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Ho(e,t){const{[Fm]:n}=e(Ex()),r=t?.keySeparator??".",o=t?.nsSeparator??":",i=t?.enableSelector==="strict";if(n.length>1&&o){const s=t?.ns,a=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(a&&(i?a:a.length>1?a.slice(1):[]).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const pu=e=>!We(e)&&typeof e!="boolean"&&typeof e!="number";class oa extends Sa{constructor(t,n={}){super(),fx(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=or.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const o=this.resolve(t,r);if(o?.res===void 0)return!1;const i=pu(o.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!xx(t,r,o);if(s&&!a){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:We(i)?[i]:i};const l=t.split(r);(r!==o||r===o&&this.options.ns.includes(l[0]))&&(i=l.shift()),t=l.join(o)}return{key:t,namespaces:We(i)?[i]:i}}translate(t,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),t==null)return"";typeof t=="function"&&(t=Ho(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(F=>typeof F=="function"?Ho(F,{...this.options,...o}):String(F));const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(t[t.length-1],o),l=u[u.length-1];let c=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const d=o.lng||this.language,g=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return g?i?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(o)}:`${l}${c}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(o)}:a;const h=this.resolve(t,o);let p=h?.res;const m=h?.usedKey||a,y=h?.exactUsedKey||a,v=["[object Number]","[object Function]","[object RegExp]"],b=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,E=o.count!==void 0&&!We(o.count),C=oa.hasDefaultValue(o),A=E?this.pluralResolver.getSuffix(d,o.count,o):"",I=o.ordinal&&E?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",S=E&&!o.ordinal&&o.count===0,k=S&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${A}`]||o[`defaultValue${I}`]||o.defaultValue;let P=p;w&&!p&&C&&(P=k);const R=pu(P),L=Object.prototype.toString.apply(P);if(w&&P&&R&&!v.includes(L)&&!(We(b)&&Array.isArray(P))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,P,{...o,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(h.res=F,h.usedParams=this.getUsedParamsDetails(o),h):F}if(s){const F=Array.isArray(P),D=F?[]:{},B=F?y:m;for(const N in P)if(Object.prototype.hasOwnProperty.call(P,N)){const X=`${B}${s}${N}`;C&&!p?D[N]=this.translate(X,{...o,defaultValue:pu(k)?k[N]:void 0,joinArrays:!1,ns:u}):D[N]=this.translate(X,{...o,joinArrays:!1,ns:u}),D[N]===X&&(D[N]=P[N])}p=D}}else if(w&&We(b)&&Array.isArray(p))p=p.join(b),p&&(p=this.extendTranslation(p,t,o,r));else{let F=!1,D=!1;!this.isValidLookup(p)&&C&&(F=!0,p=k),this.isValidLookup(p)||(D=!0,p=a);const N=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:p,X=C&&k!==p&&this.options.updateMissing;if(D||F||X){if(this.logger.log(X?"updateKey":"missingKey",d,l,E&&!X?`${a}${this.pluralResolver.getSuffix(d,o.count,o)}`:a,X?k:p),s){const oe=this.resolve(a,{...o,keySeparator:!1});oe&&oe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let se=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let oe=0;oe<K.length;oe++)se.push(K[oe]);else this.options.saveMissingTo==="all"?se=this.languageUtils.toResolveHierarchy(o.lng||this.language):se.push(o.lng||this.language);const U=(oe,H,z)=>{const Z=C&&z!==p?z:N;this.options.missingKeyHandler?this.options.missingKeyHandler(oe,l,H,Z,X,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(oe,l,H,Z,X,o),this.emit("missingKey",oe,l,H,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?se.forEach(oe=>{const H=this.pluralResolver.getSuffixes(oe,o);S&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!H.includes(`${this.options.pluralSeparator}zero`)&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(z=>{U([oe],a+z,o[`defaultValue${z}`]||k)})}):U(se,a,k))}p=this.extendTranslation(p,t,o,h,r),D&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${l}${c}${a}`),(D||F)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,F?p:void 0,o))}return i?(h.res=p,h.usedParams=this.getUsedParamsDetails(o),h):p}extendTranslation(t,n,r,o,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=We(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(u){const d=t.match(this.interpolator.nestingRegexp);l=d&&d.length}let c=r.replace&&!We(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),t=this.interpolator.interpolate(t,c,r.lng||this.language||o.usedLng,r),u){const d=t.match(this.interpolator.nestingRegexp),g=d&&d.length;l<g&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...d)=>i?.[0]===d[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${n[0]}`),null):this.translate(...d,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,a=We(s)?[s]:s;return t!=null&&a?.length&&r.applyPostProcessor!==!1&&(t=Lm.handle(a,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,o,i,s,a;return We(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(u=>typeof u=="function"?Ho(u,{...this.options,...n}):u)),t.forEach(u=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(u,n),c=l.key;o=c;let d=l.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const g=n.count!==void 0&&!We(n.count),h=g&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(We(n.context)||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(y=>{this.isValidLookup(r)||(a=y,!this.checkedLoadedFor[`${m[0]}-${y}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(this.checkedLoadedFor[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${o}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(v=>{if(this.isValidLookup(r))return;s=v;const b=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(b,c,v,y,n);else{let E;g&&(E=this.pluralResolver.getSuffix(v,n.count,n));const C=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(n.ordinal&&E.startsWith(A)&&b.push(c+E.replace(A,this.options.pluralSeparator)),b.push(c+E),h&&b.push(c+C)),p){const I=`${c}${this.options.contextSeparator||"_"}${n.context}`;b.push(I),g&&(n.ordinal&&E.startsWith(A)&&b.push(I+E.replace(A,this.options.pluralSeparator)),b.push(I+E),h&&b.push(I+C))}}let w;for(;w=b.pop();)this.isValidLookup(r)||(i=w,r=this.getResource(v,y,w,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!We(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o={...o,count:t.count}),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class ff{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=or.create("languageUtils")}getScriptPartFromCode(t){if(t=Bi(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Bi(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(We(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),We(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return We(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):We(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.includes(s)||i(this.formatLanguageCode(s))}),o}}const gf={zero:0,one:1,two:2,few:3,many:4,other:5},hf={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Cx{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=or.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Bi(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),hf;if(!t.match(/-|_/))return hf;const u=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(u,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,i)=>gf[o]-gf[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n,r={}){const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const pf=(e,t,n,r=".",o=!0)=>{let i=px(e,t,n);return!i&&o&&We(n)&&(i=dc(e,n,r),i===void 0&&(i=dc(t,n,r))),i},Sx=e=>e.replace(/\$/g,"$$$$");class mf{constructor(t={}){this.logger=or.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:s,suffix:a,suffixEscaped:u,formatSeparator:l,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:g,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:v,alwaysFormat:b}=t.interpolation;this.escape=n!==void 0?n:bx,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Er(i):s||"{{",this.suffix=a?Er(a):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":d?Er(d):"-",this.unescapeSuffix=this.unescapePrefix?"":c?Er(c):"",this.nestingPrefix=g?Er(g):h||Er("$t("),this.nestingSuffix=p?Er(p):m||Er(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=v||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,s,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=h=>{if(!h.includes(this.formatSeparator)){const v=pf(n,u,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...o,...n,interpolationkey:h}):v}const p=h.split(this.formatSeparator),m=p.shift().trim(),y=p.join(this.formatSeparator).trim();return this.format(pf(n,u,m,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:m})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const c=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>h},{regex:this.regexp,safeValue:h=>this.escapeValue?this.escape(h):h}].forEach(h=>{for(a=0;i=h.regex.exec(t);){const p=i[1].trim();if(s=l(p),s===void 0)if(typeof c=="function"){const y=c(t,i,o);s=We(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,p))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),s="";else!We(s)&&!this.useRawValueToEscape&&(s=af(s));const m=h.safeValue(s);if(t=t.replace(i[0],Sx(m)),d?(h.regex.lastIndex+=m.length,h.regex.lastIndex-=i[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n,r={}){let o,i,s;const a=(u,l)=>{const c=this.nestingOptionsSeparator;if(!u.includes(c))return u;const d=u.split(new RegExp(`${Er(c)}[ ]*{`));let g=`{${d[1]}`;u=d[0],g=this.interpolate(g,s);const h=g.match(/'/g),p=g.match(/"/g);((h?.length??0)%2===0&&!p||(p?.length??0)%2!==0)&&(g=g.replace(/'/g,'"'));try{s=JSON.parse(g),l&&(s={...l,...s})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,m),`${u}${c}${g}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];s={...r},s=s.replace&&!We(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const l=/{.*}/s.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(l!==-1&&(u=o[1].slice(l).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),o[1]=o[1].slice(0,l)),i=n(a.call(this,o[1].trim(),s),s),i&&o[0]===t&&!We(i))return i;We(i)||(i=af(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),u.length&&(i=u.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const kx=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].slice(0,-1);t==="currency"&&!o.includes(":")?n.currency||(n.currency=o.trim()):t==="relativetime"&&!o.includes(":")?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(s){const[a,...u]=s.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();n[c]||(n[c]=l),l==="false"&&(n[c]=!1),l==="true"&&(n[c]=!0),isNaN(l)||(n[c]=parseInt(l,10))}})}return{formatName:t,formatOptions:n}},bf=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const s=r+JSON.stringify(i);let a=t[s];return a||(a=e(Bi(r),o),t[s]=a),a(n)}},Ax=e=>(t,n,r)=>e(Bi(n),r)(t);class Tx{constructor(t={}){this.logger=or.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?bf:Ax;this.formats={number:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i});return a=>s.format(a)}),currency:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i,style:"currency"});return a=>s.format(a)}),datetime:r((o,i)=>{const s=new Intl.DateTimeFormat(o,{...i});return a=>s.format(a)}),relativetime:r((o,i)=>{const s=new Intl.RelativeTimeFormat(o,{...i});return a=>s.format(a,i.range||"day")}),list:r((o,i)=>{const s=new Intl.ListFormat(o,{...i});return a=>s.format(a)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=bf(n)}format(t,n,r,o={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator),s=[];for(let u=0;u<i.length;u++){let l=i[u];for(;l.indexOf("(")>-1&&!l.includes(")")&&u+1<i.length;)l=`${l}${this.formatSeparator}${i[++u]}`;s.push(l)}return s.reduce((u,l)=>{const{formatName:c,formatOptions:d}=kx(l);if(this.formats[c]){let g=u;try{const h=o?.formatParams?.[o.interpolationkey]||{},p=h.locale||h.lng||o.locale||o.lng||r;g=this.formats[c](u,p,{...d,...o,...h})}catch(h){this.logger.warn(h)}return g}else this.logger.warn(`there was no format function for ${c}`);return u},t)}}const Ix=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Dx extends Sa{constructor(t,n,r,o={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=or.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,n,r,o){const i={},s={},a={},u={};return t.forEach(l=>{let c=!0;n.forEach(d=>{const g=`${l}|${d}`;!r.reload&&this.store.hasResourceBundle(l,d)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?s[g]===void 0&&(s[g]=!0):(this.state[g]=1,c=!1,s[g]===void 0&&(s[g]=!0),i[g]===void 0&&(i[g]=!0),u[d]===void 0&&(u[d]=!0)))}),c||(a[l]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const o=t.split("|"),i=o[0],s=o[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(u=>{hx(u.loaded,[i],s),Ix(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{a[l]||(a[l]={});const c=u.loaded[l];c.length&&c.forEach(d=>{a[l][d]===void 0&&(a[l][d]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r,o=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(l&&c&&o<this.maxRetries){setTimeout(()=>{this.read(t,n,r,o+1,i*2,s)},i);return}s(l,c)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const l=u(t,n);l&&typeof l.then=="function"?l.then(c=>a(null,c)).catch(a):a(null,l)}catch(l){a(l)}return}return u(t,n,a)}prepareLoading(t,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();We(t)&&(t=this.languageUtils.toResolveHierarchy(t)),We(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,o,i,s={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...s,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let c;l.length===5?c=l(t,n,r,o,u):c=l(t,n,r,o),c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}else l(t,n,r,o,a,u)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const mu=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),We(e[1])&&(t.defaultValue=e[1]),We(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),yf=e=>(We(e.ns)&&(e.ns=[e.ns]),We(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),We(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Ss=()=>{},Rx=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Ti extends Sa{constructor(t={},n){if(super(),this.options=yf(t),this.services={},this.logger=or,this.modules={external:[]},Rx(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(We(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=mu();this.options={...r,...this.options,...yf(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const o=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?or.init(o(this.modules.logger),this.options):or.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=Tx;const c=new ff(this.options);this.store=new df(this.options.resources,this.options);const d=this.services;d.logger=or,d.resourceStore=this.store,d.languageUtils=c,d.pluralResolver=new Cx(c,{prepend:this.options.pluralSeparator}),l&&(d.formatter=o(l),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new mf(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Dx(o(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(g,...h)=>{this.emit(g,...h)}),this.modules.languageDetector&&(d.languageDetector=o(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=o(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new oa(this.services,this.options),this.translator.on("*",(g,...h)=>{this.emit(g,...h)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Ss),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=(...c)=>this.store[l](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...c)=>(this.store[l](...c),this)});const a=hi(),u=()=>{const l=(c,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),n(c,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),a}loadResources(t,n=Ss){let r=n;const o=We(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(l=>{l!=="cimode"&&(i.includes(l)||i.push(l))})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>s(u)),this.options.preload?.forEach?.(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const o=hi();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Ss),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Lm.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=hi();this.emit("languageChanging",t);const o=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,u)=>{u?this.isLanguageChangingTo===t&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((...l)=>this.t(...l)),n&&n(a,(...l)=>this.t(...l))},s=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=We(a)?a:a&&a[0],l=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(We(a)?[a]:a);l&&(this.language||o(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector?.cacheUserLanguage?.(l)),this.loadResources(l,c=>{i(c,l)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,o){const i=o?.scopeNs,s=(a,u,...l)=>{let c;typeof u!="object"?c=this.options.overloadTranslationOptionHandler([a,u].concat(l)):c={...u},c.lng=c.lng||s.lng,c.lngs=c.lngs||s.lngs;const d=c.ns!==void 0&&c.ns!==null;c.ns=c.ns||s.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||s.keyPrefix);const g={...this.options,...c};Array.isArray(i)&&!d&&(g.ns=i),typeof c.keyPrefix=="function"&&(c.keyPrefix=Ho(c.keyPrefix,g));const h=this.options.keySeparator||".";let p;return c.keyPrefix&&Array.isArray(a)?p=a.map(m=>(typeof m=="function"&&(m=Ho(m,g)),`${c.keyPrefix}${h}${m}`)):(typeof a=="function"&&(a=Ho(a,g)),p=c.keyPrefix?`${c.keyPrefix}${h}${a}`:a),this.t(p,c)};return We(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,u)=>{const l=this.services.backendConnector.state[`${a}|${u}`];return l===-1||l===0||l===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(i,t)))}loadNamespaces(t,n){const r=hi();return this.options.ns?(We(t)&&(t=[t]),t.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=hi();We(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(s=>!o.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const i=o.getTextInfo();if(i&&i.direction)return i.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new ff(mu());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new Ti(t,n);return r.createInstance=Ti.createInstance,r}cloneInstance(t={},n=Ss){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new Ti(o);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},u[l]=Object.keys(u[l]).reduce((c,d)=>(c[d]={...u[l][d]},c),u[l]),u),{});i.store=new df(a,o),i.services.resourceStore=i.store}if(t.interpolation){const u={...mu().interpolation,...this.options.interpolation,...t.interpolation},l={...o,interpolation:u};i.services.interpolator=new mf(l)}return i.translator=new oa(i.services,o),i.translator.on("*",(a,...u)=>{i.emit(a,...u)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Mt=Ti.createInstance();Mt.createInstance;Mt.dir;Mt.init;Mt.loadResources;Mt.reloadResources;Mt.use;Mt.changeLanguage;Mt.getFixedT;Mt.t;Mt.exists;Mt.setDefaultNamespace;Mt.hasLoadedNamespace;Mt.loadNamespaces;Mt.loadLanguages;const{slice:Ox,forEach:Nx}=[];function Mx(e){return Nx.call(Ox.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Px(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const vf=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,$x=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!vf.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!vf.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(i+="; Partitioned"),i},wf={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=$x(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Lx={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return wf.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&wf.create(n,e,r,o,i)}},Fx={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const i=r.substring(1).split("&");for(let s=0;s<i.length;s++){const a=i[s].indexOf("=");a>0&&i[s].substring(0,a)===t&&(n=i[s].substring(a+1))}}return n}},Bx={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const i=o.substring(1);if(t){const s=i.split("&");for(let a=0;a<s.length;a++){const u=s[a].indexOf("=");u>0&&s[a].substring(0,u)===t&&(r=s[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const s=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let Do=null;const xf=()=>{if(Do!==null)return Do;try{if(Do=typeof window<"u"&&window.localStorage!==null,!Do)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Do=!1}return Do};var zx={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&xf())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&xf()&&window.localStorage.setItem(n,e)}};let Ro=null;const _f=()=>{if(Ro!==null)return Ro;try{if(Ro=typeof window<"u"&&window.sessionStorage!==null,!Ro)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Ro=!1}return Ro};var Ux={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&_f())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&_f()&&window.sessionStorage.setItem(n,e)}},Kx={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},jx={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},qx={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},Hx={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Bm=!1;try{document.cookie,Bm=!0}catch{}const zm=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Bm||zm.splice(1,1);const Gx=()=>({order:zm,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Um{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Mx(n,this.options||{},Gx()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Lx),this.addDetector(Fx),this.addDetector(zx),this.addDetector(Ux),this.addDetector(Kx),this.addDetector(jx),this.addDetector(qx),this.addDetector(Hx),this.addDetector(Bx)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.filter(r=>r!=null&&!Px(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Um.type="languageDetector";function Vx(e,t={}){const{fallbackLng:n="zh-CN",persistKey:r}=t,o=Mt.use(Um).init({resources:e,fallbackLng:n,detection:{order:r?["localStorage","navigator"]:["navigator"],caches:r?["localStorage"]:[],...r?{lookupLocalStorage:r}:{}},interpolation:{escapeValue:!1}}),[i,s]=T(Mt.language||n),[a,u]=T(Mt.isInitialized);o.then(()=>{s(Mt.language||n),u(!0)}),Mt.on("languageChanged",d=>s(d));const l=(d,g)=>(i(),Mt.t(d,g));return{i18next:Mt,initPromise:o,t:l,useTranslation:()=>({t:l,lng:ne(()=>i()),ready:ne(()=>a()),changeLanguage:d=>{Mt.changeLanguage(d)}})}}const Wx={common:{loading:"加载中…",cancel:"取消",delete:"删除",confirmDelete:"确认删除",deleting:"删除中…",submitting:"提交中…",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",pendingAgent:"(待 Agent 补全)",close:"关闭",remove:"移除",error:"错误",filterOptions:"筛选选项…",noMatchingOptions:"没有匹配的选项"},breadcrumb:{specList:"Spec 列表",newSpec:"新建 spec"},shell:{newSpec:"新建 spec",settingsMenu:"配置",languageSwitch:"切换语言",langZh:"中文",langEn:"English",themeSwitch:"外观",themeModeGroup:"色彩模式",themeSystem:"跟随系统",themeLight:"亮色",themeDark:"暗色",themeNameGroup:"主题",themeTerminal:"终端",themeGraphite:"石墨",themePaper:"纸感",globalConfig:"全局配置",userGuide:"使用指南"},systemNotifications:{title:"系统提示",delete:"删除提示",versionTitle:"发现新版本",versionMessage:"YorZ {{latest}} 已发布,当前版本 {{current}}。",update:"更新",updating:"更新中…",restart:"重启服务",restartTooltip:"重复服务会中断正在运行中的任务,可在 chat 中发送“继续”指令",disconnectedTitle:"服务已断开",disconnectedMessage:"与 YorZ 服务的连接已中断,正在执行的任务可能已停止。请在终端重新执行"},welcome:{title:"欢迎使用 YorZ",description:"YorZ 通过本地目录托管 spec 文档;请先添加一个项目目录,然后即可开始管理它的需求。"},addProject:{trigger:"添加项目",title:"添加项目",help:"帮助",helpTooltip:"也可使用命令 `yorz add <path>` 添加项目",parent:"上级目录",home:"主目录",driveRoot:"此电脑",empty:"该目录下没有子目录",truncated:"子目录过多,仅显示前 1000 项",showHidden:"显示隐藏目录",choose:"选择此目录",loading:"加载中…",newFolder:"新建文件夹",newFolderPlaceholder:"文件夹名称",newFolderConfirm:"创建",invalidName:"名称不能为空,且不能包含路径分隔符",gitInitTitle:"该目录不是 git 仓库",gitInitDesc:"{{path}} 尚未 git init。YorZ 的 git 面板与 worktree 功能依赖 git 仓库。",gitInitConfirm:"执行 git init 并添加",failed:"添加失败:{{message}}"},sidebar:{title:"项目",expand:"展开项目面板",collapse:"折叠项目面板",collapseShort:"折叠",pin:"固定展开项目面板",configure:"配置 {{name}}",projectConfig:"项目配置",removeProject:"移除 {{name}}",deleteProject:"删除项目",deleteDesc:"此操作将从 YorZ 项目列表中移除该项目。",deleteFiles:"同时删除文件目录",uncommittedChanges:"存在未提交 git 的变更",resizeHint:"拖动调整项目面板宽度",projectRunning:"{{name}} 有任务正在运行"},chat:{title:"Chat",expand:"展开 Chat",collapse:"折叠 Chat",newSession:"新建会话",collapseSessions:"折叠会话列表",expandSessions:"展开会话列表",sessionsLabel:"会话({{count}})",sessionsLabelPlain:"会话",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · 执行中",sessionDivider:"{{kind}} · {{time}}",empty:"选择或新建一个会话开始对话。",draftEmpty:"Untitled 会话 —— 发送消息即开始。",usageLoading:"正在查询当前模型剩余用量…",usageError:"{{kind}} 剩余用量查询失败。",usageAvailableNoDetails:"{{kind}} 已连接,但未返回可展示的剩余用量明细。",usageSummary:"{{kind}} 用量:{{details}}",usageWindow:"{{label}} 剩余约 {{remaining}}%(已用 {{used}}%,重置:{{reset}})",usageWindowUnknown:"{{label}} 剩余用量未知",usageResetUnknown:"未知",usageSeparator:" · ",inputPlaceholder:"输入消息,/ 触发候选指令,@ 引用文件,Enter 发送…",draftPlaceholder:"输入消息,/ 触发候选指令,@ 引用文件,发送后自动创建会话…",noSessionPlaceholder:"请先选择项目",showHistory:"显示历史",sessionListLimit:"会话显示条数",sessionListRows:"会话列表高度",sessionListRows3:"3行",sessionListRows5:"5行",sessionListRows10:"10行",untitledSession:"未命名会话",noRunningSessions:"未提交的会话",abort:"中止",send:"发送",agentContextCollapsed:"Agent 上下文 ×{{count}}",toolCollapsed:"[工具] ×{{count}}",toolTextExpand:"展开全部 {{count}} 字符",toolTextCollapse:"收起",errorMessage:"[错误] {{message}}",copyFilePath:"复制文件路径",filePathCopied:"已复制文件路径",filePathCopyFailed:"复制文件路径失败",slashCommandYorzDebug:"启动 debug 模式,尝试解决疑难问题",slashCommandYorzSpec:"基于上下文启动 spec 驱动开发",slashCommandNewSession:"在当前会话组中开始一个新 session",addSlashCommandOption:"新增指令",addSlashCommandOptionDescription:"创建一个自定义斜杠指令",addSlashCommandTitle:"新增指令",editSlashCommandTitle:"编辑指令",slashCommandNoMatch:"没有匹配的指令",deleteSlashCommandTitle:"删除指令",deleteSlashCommandConfirm:"确定删除自定义指令 /{{name}}?此操作不可撤销。",slashCommandScopeProject:"当前项目",slashCommandScopeGlobal:"全局",customSlashCommandScope:"保存位置",customSlashCommandScopeProjectHint:"项目指令仅在当前项目可用,同名指令项目优先,保存后不可切换",customSlashCommandScopeGlobalHint:"全局指令在所有项目可用,保存后不可切换",customSlashCommandName:"名称",customSlashCommandNamePlaceholder:"git-commit",customSlashCommandDescription:"说明",customSlashCommandDescriptionPlaceholder:"提交当前会话相关的变更文件",customSlashCommandHiddenPrompt:"隐藏提示词",customSlashCommandHiddenPromptPlaceholder:"使用 git 提交当前会话相关的变更文件",customSlashCommandHiddenPromptHint:"发送时自动附加给 Agent,不会出现在输入框和聊天记录中",customSlashCommandPrefill:"预输入内容",customSlashCommandPrefillPlaceholder:"选择该指令后回填到输入框的内容",customSlashCommandPrefillHint:"选择该指令后回填到输入框,会自动带上 /指令名 前缀,可继续编辑后再发送",customSlashCommandNameRequired:"请输入指令名称",customSlashCommandNameInvalid:"名称只能包含字母、数字、下划线和连字符",customSlashCommandNoDescription:"自定义指令",editCustomSlashCommand:"编辑 {{name}}",deleteCustomSlashCommand:"删除 {{name}}",saveCustomSlashCommand:"保存"},home:{specList:"Spec 列表",mainProject:"主项目:",merging:"合并中…",mergeToMain:"合入主项目",mergeHint:"提交 worktree 改动并合入主项目",mergeDialogTitle:"合并 worktree",mergeDialogDescription:"合入主项目前,请确认本次合并的提交信息。",mergeCommitMessage:"提交信息",runningTasksPreventMerge:"存在进行中的命令或 Agent 任务,请等待任务结束后再合并",mainUnreachable:"主项目不可达",merged:"已合入主项目,正在跳转…",conflictDispatched:"冲突 spec 已自动派给 Agent 处理,列表会在合并完成后自动刷新",noSpecs:"还没有 spec。",createFirst:"新建第一个 spec",moreActions:"更多操作",copySpecPath:"复制路径",confirmDeleteSpec:"确定删除此 spec?",newSpec:"+ 新建 spec"},newSpec:{title:"新建 spec",description:"只需选择类型与录入需求内容;文件名、概要、初始骨架由 Agent 根据需求生成,Agent 创建完文档后会自动进入 plan 阶段。",type:"类型",typeFeat:"feat",typeFeatHint:"新功能",typeRefct:"refct",typeRefctHint:"重构 / 抽取",typeFix:"fix",typeFixHint:"修复缺陷",parallelWorktree:"新开项目并行",parallelWorktreeDesc:"以 git worktree 形式开新分支并行开发,避免与主项目互相干扰;合并将通过列表页『合入主项目』按钮一键完成。",requirement:"需求内容",requirementPlaceholder:"原始诉求、痛点、期望效果、关联文档/模块(可使用 @ 引用)",attachments:"附件",attachmentsHint:"共 {{count}}/{{max}},单文件 ≤ 10 MB;图片支持 Cmd/Ctrl-V 粘贴",importAttachment:"导入附件",createAndStart:"发送",creating:"Spec 创建中…",descTooShort:"请至少输入 5 个字符的需求描述",attachmentLimit:"附件总数不能超过 {{max}} 个",unsupportedType:"不支持的文件类型:{{name}}",unsupportedMime:"不支持的 MIME:{{mime}}",fileTooLarge:"{{name}} 超过 10 MB 限制",attachmentRoomLimit:"只能再添加 {{room}} 个附件(当前 {{current}}/{{max}})",attachmentFailedCount:"有 {{count}} 个附件上传失败,请先移除或重试",attachmentUploading:"附件仍在上传中,请稍候",uploading:"上传中…",uploadFailed:"失败:{{error}}",clickToRename:"点击重命名",agentRunFailed:"Agent 运行失败",creatingSpec:"(新建 spec 中)",deleteAttachment:"删除 {{name}}"},specDetail:{appendTask:"追加任务",agentLogs:"执行日志",review:"Review",debug:"Debug 文档",running:"运行中…",forceStage:"强制设置 spec 状态",notFound:"spec 不存在或已删除",fullscreen:"全屏(临时折叠项目列表与对话面板)",exitFullscreen:"退出全屏(Esc)",copySpecPath:"复制 spec 文件路径",specPathCopied:"已复制 spec 文件路径",appendSavedSpecBusy:"追加任务已保存;该 spec 有正在执行的会话,未自动派发,请在其结束后手动运行。",specPathCopyFailed:"复制 spec 文件路径失败"},mermaid:{maximize:"最大化图表",viewerLabel:"Mermaid 图表查看器",zoomIn:"放大",zoomOut:"缩小",reset:"重置视图",close:"关闭图表查看器"},specDebug:{empty:"暂无 debug.md 记录"},review:{backToSpec:"返回 spec",heading:"Review · {{id}}",commit:"提交",discard:"丢弃",committing:"提交中…",discarding:"丢弃中…",commitPlaceholder:"commit message…({{shortcut}} 提交)",manualSelect:"手动选择",agentSelect:"Agent 智能判定",selectAll:"全选",deselectAll:"全部取消",fileCount:"{{selected}}/{{total}} 个文件",noChanges:"暂无变更文件",selectAtLeastOne:"请至少选择一个文件",discardTitle:"丢弃变更",confirmDiscardAction:"确认丢弃",confirmDiscard:"确定要丢弃选中的变更吗?此操作不可撤销。",confirmDiscardAll:"确定要丢弃当前 spec 相关的所有未提交变更吗?此操作不可撤销。",enterCommitMsg:"请输入 commit message",dispatched:"已派发:"},git:{title:"Git",statusTab:"状态",historyTab:"历史",historySearchPlaceholder:"搜索提交信息或提交人",historyLoading:"加载提交历史…",historyEmpty:"没有匹配的提交记录",historyLoadMore:"加载更多",historyLoadingMore:"加载更多…",historyFilesLoading:"加载变更文件…",historyNoFiles:"该提交没有可显示的变更文件",branchSelect:"切换分支",branchPlaceholder:"选择分支",branchFilterPlaceholder:"过滤 / 新建分支…",noBranches:"没有匹配的分支",createBranch:"创建",creatingBranch:"创建中…",branchCreated:"已创建并切换到 {{branch}}",branchExists:"分支已存在",fetching:"拉取远端中…",fetchFailed:"拉取远端失败",fetched:"远端已更新",mergeBranch:"合并分支",mergeBranchPlaceholder:"选择要合并的分支",mergeFilterPlaceholder:"过滤本地 / 远程分支…",mergeAction:"合并",merging:"合并中…",merged:"已将 {{branch}} 合并到 {{current}}",mergeUpToDate:"{{current}} 已包含 {{branch}},无需合并",mergeSelfHint:"当前分支不能合并到自身",push:"推送",pushing:"推送中…",pushed:"已推送到远端({{branch}})",pull:"拉取",pulling:"拉取中…",pulled:"已拉取最新提交({{branch}})",upToDate:"已是最新,无需拉取",binaryFile:"二进制文件,无法展示差异",diffTruncated:"差异过大,已截断展示",diffEmpty:"该文件暂无可展示的差异",diffLoading:"差异加载中…"},agentLogs:{backToSpec:"← 返回 spec",title:"执行日志 · {{id}}",listTitle:"Agent 执行日志({{count}})",empty:"暂无 Agent 执行日志",truncated:"已截断显示末尾 256KB",emptyLog:"日志为空",success:"成功",notFinished:"未收尾",failed:"失败 ({{code}})"},agentDock:{title:"Agent 任务",panelLabel:"Agent 任务面板",clearFinished:"清理已完成",progressLabel:"进行中 {{running}} / 已完成 {{done}} / 失败 {{failed}}",waitingOutput:"(等待输出…)",creatingNew:"(新建中)",sourceRun:"执行 spec",sourceExplain:"解释",sourceDraft:"新建 spec",statusPending:"等待…",statusStreaming:"运行中",statusDone:"已完成",statusFailed:"失败"},selectionMenu:{annotate:"批注",explain:"解释"},annotate:{title:"批注",placeholder:"写下你对这段文本的批注…",submit:"添加批注",inSection:"中"},questionConfirm:{title:"待确认项",unanswered:"未确认",submitAll:"发送",running:"运行中…",noAnswers:"没有可提交的答复",selectionAnnotation:"选区批注",notePlaceholder:"写下你的答复…",recommended:"(推荐)",freeformLabel:"其他(自由批注)",quoteConnector:"中",confirmPlanLabel:"方案",confirmImpactLabel:"影响",decisionAccept:"确认,按此推进",decisionReject:"否决",intentAlternative:"换方案(原目标下另寻实现)",intentConstraint:"补约束(我来补充你漏掉的信息)",intentDropGoal:"弃目标(影响太大,不做)",dropGoalCurrent:"废弃当前目标,继续其余",dropGoalSpec:"放弃整个 spec",reasonPlaceholder:"请说明否决理由或约束(必填)…",reasonRequired:"否决时必须填写理由"},appendTask:{title:"追加任务",hint:"提交后将自动重开 plan 阶段,Agent 会续跑处理新增项",type:"类型",kindFeat:"feat 新增/扩展需求",kindRefct:"refct 重构/重写/抽取",kindFix:"fix 修复缺陷",description:"描述",descPlaceholder:"详细描述新增需求 / 重构意图 / 缺陷复现…",descRequired:"描述不能为空",submit:"发送",refSection:"引用章节:"},projectConfig:{title:"项目配置",inheritGlobal:"继承全局默认",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",agentPi:"Pi",agent:"Agent",model:"模型",reasoningEffort:"推理强度",agentDefaultOption:"--",specsDir:"spec 文档目录",specsDirHint:"相对项目根路径,不存在时会自动创建",invalidPath:'spec 目录不能包含 ".." 段',saved:"配置已保存",oldSpecsHint:"旧 spec 仍在原目录,请手工迁移",save:"保存"},globalConfig:{title:"全局配置",agentDefault:"默认 Agent",model:"模型",reasoningEffort:"推理强度",agentDefaultOption:"--",sessionEnd:"任务结束提示",banner:"横幅提示",sound:"声音提示",powerTitle:"任务运行期间防休眠",powerSystemDefault:"系统默认",powerPreventDisplaySleep:"禁止息屏",powerKeepSystemAwake:"禁止休眠",shortcutsTitle:"快捷键",shortcutRecord:"录制",shortcutRecording:"按下新的组合键…",shortcutRecordingButton:"录制中",shortcutReset:"重置",shortcutConflict:"快捷键不能重复绑定",saveStatusSaving:"保存中...",saveStatusSaved:"已保存",shortcuts:{newSpec:"新建 spec",toggleSpecDetailFullscreen:"页面最大化",projectSettings:"项目设置",globalSettings:"全局配置"}},commands:{menuTitle:"命令",empty:"还没有配置命令",add:"添加命令",addTitle:"添加命令",name:"名称",namePlaceholder:"例如:dev",cli:"命令行",cliPlaceholder:"例如:pnpm dev",submit:"添加",deleteDef:"删除命令",running:"运行中的命令",status:{running:"运行中",exited:"已退出",killed:"已终止",failed:"启动失败"},clearTitle:"终止并清空该条记录?",clearDescription:"将终止正在运行的进程,并删除该条执行记录与日志文件。",clear:"终止并清空",restart:"重启",stop:"终止",stopping:"终止中…",detailTitle:"命令执行详情",logFile:"日志文件",exitCode:"退出码",startedAt:"开始时间",duration:"运行时长",outputEmpty:"暂无输出",outputTruncated:"日志过长,仅显示尾部内容",notFound:"执行记录不存在或已被清空",back:"返回列表"},errors:{serverDisconnected:"Server 失联,任务可能已终止",serverRestarted:"Server 已重启,原任务未恢复"},selection:{noSection:"(无章节)"},pairing:{title:"配对移动端",hint:"在手机上打开应用,扫描二维码或手动输入下方配对码完成配对。配对码 5 分钟内有效、仅可使用一次。",loading:"生成配对码中…",error:"生成配对码失败",retry:"重试",refresh:"刷新配对码",unauthorizedTitle:"未授权",unauthorized:"当前页面缺少有效令牌,请使用 `yorz serve` 启动日志中打印的带 token 链接打开本页面。"}},Yx={common:{loading:"Loading…",cancel:"Cancel",delete:"Delete",confirmDelete:"Confirm Delete",deleting:"Deleting…",submitting:"Submitting…",saving:"Saving…",refresh:"Refresh",refreshing:"Refreshing…",pendingAgent:"(Pending Agent)",close:"Close",remove:"Remove",error:"Error",filterOptions:"Filter options…",noMatchingOptions:"No matching options"},breadcrumb:{specList:"Spec List",newSpec:"New Spec"},shell:{newSpec:"New Spec",settingsMenu:"Settings",languageSwitch:"Switch Language",langZh:"中文",langEn:"English",themeSwitch:"Appearance",themeModeGroup:"Color Mode",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeNameGroup:"Theme",themeTerminal:"Terminal",themeGraphite:"Graphite",themePaper:"Paper",globalConfig:"Global Settings",userGuide:"User Guide"},systemNotifications:{title:"System Notifications",delete:"Delete notification",versionTitle:"New Version Available",versionMessage:"YorZ {{latest}} is available. Current version: {{current}}.",update:"Update",updating:"Updating…",restart:"Restart Service",restartTooltip:'Restarting the service will interrupt running tasks. You can send "continue" in chat.',disconnectedTitle:"Service disconnected",disconnectedMessage:"The connection to the YorZ service was lost; running tasks may have stopped. Restart it in your terminal with"},welcome:{title:"Welcome to YorZ",description:"YorZ hosts spec documents in local directories. Add a project directory first, then start managing its requirements."},addProject:{trigger:"Add Project",title:"Add Project",help:"Help",helpTooltip:"You can also run `yorz add <path>` to add a project",parent:"Parent directory",home:"Home directory",driveRoot:"This PC",empty:"No subdirectories here",truncated:"Too many subdirectories; showing the first 1000",showHidden:"Show hidden directories",choose:"Choose this directory",loading:"Loading…",newFolder:"New folder",newFolderPlaceholder:"Folder name",newFolderConfirm:"Create",invalidName:"Name must not be empty or contain a path separator",gitInitTitle:"Not a git repository",gitInitDesc:"{{path}} has not been git-initialized. The git panel and worktree features require a git repository.",gitInitConfirm:"Run git init and add",failed:"Failed to add: {{message}}"},sidebar:{title:"Projects",expand:"Expand project panel",collapse:"Collapse project panel",collapseShort:"Collapse",pin:"Keep project panel open",configure:"Configure {{name}}",projectConfig:"Project Config",removeProject:"Remove {{name}}",deleteProject:"Delete Project",deleteDesc:"This will remove the project from the YorZ project list.",deleteFiles:"Also delete file directory",uncommittedChanges:"Uncommitted git changes",resizeHint:"Drag to resize project panel width",projectRunning:"Task running in {{name}}"},chat:{title:"Chat",expand:"Expand Chat",collapse:"Collapse Chat",newSession:"New Session",collapseSessions:"Collapse session list",expandSessions:"Expand session list",sessionsLabel:"Sessions ({{count}})",sessionsLabelPlain:"Sessions",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · Running",sessionDivider:"{{kind}} · {{time}}",empty:"Select or create a session to start chatting.",draftEmpty:"Untitled session — send a message to start.",usageLoading:"Checking current model usage…",usageError:"Failed to query {{kind}} remaining usage.",usageAvailableNoDetails:"{{kind}} is connected, but returned no displayable usage details.",usageSummary:"{{kind}} usage: {{details}}",usageWindow:"{{label}} about {{remaining}}% remaining ({{used}}% used, resets: {{reset}})",usageWindowUnknown:"{{label}} remaining usage unknown",usageResetUnknown:"unknown",usageSeparator:" · ",inputPlaceholder:"Type a message, / for commands, @ to reference files, Enter to send…",draftPlaceholder:"Type a message, / for commands, @ to reference files — a session starts on send…",noSessionPlaceholder:"Select a project first",showHistory:"History",sessionListLimit:"Session list count",sessionListRows:"Session list height",sessionListRows3:"3 rows",sessionListRows5:"5 rows",sessionListRows10:"10 rows",untitledSession:"Untitled session",noRunningSessions:"Uncommitted sessions",abort:"Abort",send:"Send",agentContextCollapsed:"Agent context ×{{count}}",toolCollapsed:"[Tool] ×{{count}}",toolTextExpand:"Show all {{count}} chars",toolTextCollapse:"Collapse",errorMessage:"[Error] {{message}}",copyFilePath:"Copy file path",filePathCopied:"File path copied",filePathCopyFailed:"Failed to copy file path",slashCommandYorzDebug:"Start debug mode to troubleshoot difficult issues",slashCommandYorzSpec:"Start spec-driven development from the current context",slashCommandNewSession:"Start a new session in the current conversation group",addSlashCommandOption:"Add Command",addSlashCommandOptionDescription:"Create a custom slash command",addSlashCommandTitle:"Add Command",editSlashCommandTitle:"Edit Command",slashCommandNoMatch:"No matching command",deleteSlashCommandTitle:"Delete command",deleteSlashCommandConfirm:"Delete the custom command /{{name}}? This cannot be undone.",slashCommandScopeProject:"This project",slashCommandScopeGlobal:"Global",customSlashCommandScope:"Saved in",customSlashCommandScopeProjectHint:"Available only in this project, shadows a global command of the same name, and cannot be moved after saving",customSlashCommandScopeGlobalHint:"Available in every project, and cannot be moved after saving",customSlashCommandName:"Name",customSlashCommandNamePlaceholder:"git-commit",customSlashCommandDescription:"Description",customSlashCommandDescriptionPlaceholder:"Commit files related to the current session",customSlashCommandHiddenPrompt:"Hidden Prompt",customSlashCommandHiddenPromptPlaceholder:"Use git to commit files related to this session",customSlashCommandHiddenPromptHint:"Sent to the Agent automatically; never shown in the composer or the chat log",customSlashCommandPrefill:"Prefill Content",customSlashCommandPrefillPlaceholder:"Content inserted into the input when selected",customSlashCommandPrefillHint:"Inserted into the composer on select, prefixed with /command-name; you can edit before sending",customSlashCommandNameRequired:"Enter a command name",customSlashCommandNameInvalid:"Use only letters, numbers, underscores, and hyphens",customSlashCommandNoDescription:"Custom command",editCustomSlashCommand:"Edit {{name}}",deleteCustomSlashCommand:"Delete {{name}}",saveCustomSlashCommand:"Save"},home:{specList:"Specs",mainProject:"Main project: ",merging:"Merging…",mergeToMain:"Merge to Main",mergeHint:"Commit worktree changes and merge into main project",mergeDialogTitle:"Merge worktree",mergeDialogDescription:"Review the merge commit message before merging into the main project.",mergeCommitMessage:"Commit message",runningTasksPreventMerge:"Wait for running commands or Agent tasks to finish before merging",mainUnreachable:"Main project unreachable",merged:"Merged into main, redirecting…",conflictDispatched:"Conflict specs dispatched to Agent, list will refresh after merge",noSpecs:"No specs yet.",createFirst:"Create first spec",moreActions:"More actions",copySpecPath:"Copy path",confirmDeleteSpec:"Delete this spec?",newSpec:"+ New Spec"},newSpec:{title:"New Spec",description:"Just pick a type and enter your requirements. Filename, summary, and initial skeleton are generated by Agent based on your input. After document creation, it enters the plan stage automatically.",type:"Type",typeFeat:"feat",typeFeatHint:"New feature",typeRefct:"refct",typeRefctHint:"Refactor / Extract",typeFix:"fix",typeFixHint:"Bug fix",parallelWorktree:"Parallel worktree",parallelWorktreeDesc:'Create a new branch via git worktree for parallel development. Merge via the "Merge to Main" button on the list page.',requirement:"Requirement",requirementPlaceholder:"Raw needs, pain points, expected outcomes, related docs/modules (use @ to reference)",attachments:"Attachments",attachmentsHint:"{{count}}/{{max}}, max 10 MB per file; images support Cmd/Ctrl-V paste",importAttachment:"Import",createAndStart:"Send",creating:"Creating spec…",descTooShort:"Please enter at least 5 characters",attachmentLimit:"Cannot exceed {{max}} attachments",unsupportedType:"Unsupported file type: {{name}}",unsupportedMime:"Unsupported MIME: {{mime}}",fileTooLarge:"{{name}} exceeds 10 MB limit",attachmentRoomLimit:"Can only add {{room}} more ({{current}}/{{max}})",attachmentFailedCount:"{{count}} attachment(s) failed to upload, please remove or retry",attachmentUploading:"Attachments still uploading, please wait",uploading:"Uploading…",uploadFailed:"Failed: {{error}}",clickToRename:"Click to rename",agentRunFailed:"Agent run failed",creatingSpec:"(Creating spec…)",deleteAttachment:"Delete {{name}}"},specDetail:{appendTask:"Append Task",agentLogs:"Agent Logs",review:"Review",debug:"Debug document",running:"Running…",forceStage:"Force set spec stage",notFound:"Spec not found or deleted",fullscreen:"Fullscreen (temporarily collapse projects & chat)",exitFullscreen:"Exit fullscreen (Esc)",copySpecPath:"Copy spec file path",specPathCopied:"Spec file path copied",appendSavedSpecBusy:"Append saved. This spec already has a running session, so no round was dispatched — run it manually once that finishes.",specPathCopyFailed:"Failed to copy spec file path"},mermaid:{maximize:"Maximize diagram",viewerLabel:"Mermaid diagram viewer",zoomIn:"Zoom in",zoomOut:"Zoom out",reset:"Reset view",close:"Close diagram viewer"},specDebug:{empty:"No debug.md records yet"},review:{backToSpec:"Back to spec",heading:"Review · {{id}}",commit:"Commit",discard:"Discard",committing:"Committing…",discarding:"Discarding…",commitPlaceholder:"commit message… ({{shortcut}} to commit)",manualSelect:"Manual select",agentSelect:"Agent smart select",selectAll:"Select all",deselectAll:"Deselect all",fileCount:"{{selected}}/{{total}} files",noChanges:"No changed files",selectAtLeastOne:"Please select at least one file",discardTitle:"Discard changes",confirmDiscardAction:"Confirm Discard",confirmDiscard:"Discard selected changes? This cannot be undone.",confirmDiscardAll:"Discard all uncommitted changes for this spec? This cannot be undone.",enterCommitMsg:"Please enter commit message",dispatched:"Dispatched: "},git:{title:"Git",statusTab:"Status",historyTab:"History",historySearchPlaceholder:"Search commit message or author",historyLoading:"Loading commit history…",historyEmpty:"No matching commits",historyLoadMore:"Load more",historyLoadingMore:"Loading more…",historyFilesLoading:"Loading changed files…",historyNoFiles:"This commit has no changed files to show",branchSelect:"Switch branch",branchPlaceholder:"Select branch",branchFilterPlaceholder:"Filter / create branch…",noBranches:"No matching branches",createBranch:"Create",creatingBranch:"Creating…",branchCreated:"Created and switched to {{branch}}",branchExists:"Branch already exists",fetching:"Fetching remotes…",fetchFailed:"Failed to fetch remotes",fetched:"Remotes updated",mergeBranch:"Merge branch",mergeBranchPlaceholder:"Pick a branch to merge",mergeFilterPlaceholder:"Filter local / remote branches…",mergeAction:"Merge",merging:"Merging…",merged:"Merged {{branch}} into {{current}}",mergeUpToDate:"{{current}} already contains {{branch}}",mergeSelfHint:"The current branch cannot be merged into itself",push:"Push",pushing:"Pushing…",pushed:"Pushed to remote ({{branch}})",pull:"Pull",pulling:"Pulling…",pulled:"Pulled latest commits ({{branch}})",upToDate:"Already up to date",binaryFile:"Binary file — diff not shown",diffTruncated:"Diff too large, truncated",diffEmpty:"No diff to show for this file",diffLoading:"Loading diff…"},agentLogs:{backToSpec:"← Back to spec",title:"Agent Logs · {{id}}",listTitle:"Agent Execution Logs ({{count}})",empty:"No agent execution logs",truncated:"Showing last 256KB (truncated)",emptyLog:"Log is empty",success:"Success",notFinished:"Not finished",failed:"Failed ({{code}})"},agentDock:{title:"Agent Tasks",panelLabel:"Agent task panel",clearFinished:"Clear finished",progressLabel:"Running {{running}} / Done {{done}} / Failed {{failed}}",waitingOutput:"(Waiting for output…)",creatingNew:"(Creating…)",sourceRun:"Run spec",sourceExplain:"Explain",sourceDraft:"New spec",statusPending:"Pending…",statusStreaming:"Running",statusDone:"Done",statusFailed:"Failed"},selectionMenu:{annotate:"Annotate",explain:"Explain"},annotate:{title:"Annotation",placeholder:"Write your annotation for this text…",submit:"Add Annotation",inSection:"in"},questionConfirm:{title:"Pending Items",unanswered:"Unconfirmed",submitAll:"Send",running:"Running…",noAnswers:"No answers to submit",selectionAnnotation:"Selection Annotation",notePlaceholder:"Write your answer…",recommended:"(Recommended)",freeformLabel:"Other (free-form annotation)",quoteConnector:"in",confirmPlanLabel:"Plan",confirmImpactLabel:"Impact",decisionAccept:"Confirm & proceed",decisionReject:"Reject",intentAlternative:"Find alternative (same goal, different approach)",intentConstraint:"Add constraint (info you missed)",intentDropGoal:"Drop goal (impact too large)",dropGoalCurrent:"Drop this goal, keep the rest",dropGoalSpec:"Abandon the whole spec",reasonPlaceholder:"Explain your reason or constraint (required)…",reasonRequired:"A reason is required to reject"},appendTask:{title:"Append Task",hint:"After submission, plan stage will reopen automatically. Agent will process new items.",type:"Type",kindFeat:"feat new/extended requirement",kindRefct:"refct refactor/rewrite/extract",kindFix:"fix bug fix",description:"Description",descPlaceholder:"Describe new requirement / refactor intent / bug reproduction…",descRequired:"Description cannot be empty",submit:"Send",refSection:"Reference section: "},projectConfig:{title:"Project Config",inheritGlobal:"Use global default",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",agentPi:"Pi",agent:"Agent",model:"Model",reasoningEffort:"Reasoning effort",agentDefaultOption:"--",specsDir:"Spec directory",specsDirHint:"Relative to project root, auto-created if missing",invalidPath:'Spec directory cannot contain ".."',saved:"Configuration saved",oldSpecsHint:"Old specs remain in the original directory; migrate them manually",save:"Save"},globalConfig:{title:"Global Settings",agentDefault:"Default Agent",model:"Model",reasoningEffort:"Reasoning effort",agentDefaultOption:"--",sessionEnd:"Task end alerts",banner:"Banner alert",sound:"Sound alert",powerTitle:"Prevent sleep while tasks run",powerSystemDefault:"System default",powerPreventDisplaySleep:"Prevent display sleep",powerKeepSystemAwake:"Prevent sleep",shortcutsTitle:"Shortcuts",shortcutRecord:"Record",shortcutRecording:"Press a new shortcut…",shortcutRecordingButton:"Recording",shortcutReset:"Reset",shortcutConflict:"Shortcut bindings must be unique",saveStatusSaving:"Saving...",saveStatusSaved:"Saved",shortcuts:{newSpec:"New Spec",toggleSpecDetailFullscreen:"Page fullscreen",projectSettings:"Project Settings",globalSettings:"Global Settings"}},commands:{menuTitle:"Commands",empty:"No commands configured yet",add:"Add command",addTitle:"Add command",name:"Name",namePlaceholder:"e.g. dev",cli:"Command line",cliPlaceholder:"e.g. pnpm dev",submit:"Add",deleteDef:"Delete command",running:"Running commands",status:{running:"Running",exited:"Exited",killed:"Killed",failed:"Failed to start"},clearTitle:"Stop and clear this record?",clearDescription:"Terminates the running process and deletes this run record and its log file.",clear:"Stop and clear",restart:"Restart",stop:"Stop",stopping:"Stopping...",detailTitle:"Command run",logFile:"Log file",exitCode:"Exit code",startedAt:"Started at",duration:"Duration",outputEmpty:"No output yet",outputTruncated:"Log is large; showing the tail only",notFound:"This run record does not exist or has been cleared",back:"Back to list"},errors:{serverDisconnected:"Server disconnected, task may have terminated",serverRestarted:"Server restarted, previous task not recovered"},selection:{noSection:"(no section)"},pairing:{title:"Pair a mobile device",hint:"Open the app on your phone, then scan the QR code or type the pairing code below. The code is valid for 5 minutes and can be used once.",loading:"Generating pairing code…",error:"Failed to generate pairing code",retry:"Retry",refresh:"Refresh code",unauthorizedTitle:"Unauthorized",unauthorized:"This page has no valid token. Open it using the token-bearing URL printed in the `yorz serve` startup log."}},qc=Vx({"zh-CN":{translation:Wx},en:{translation:Yx}}),{i18next:Ef}=qc,Zx=["system","light","dark"],Xx=["terminal","graphite","paper"],Km="(prefers-color-scheme: dark)",jm="yorz.appearanceHint";function Jx(e){return Zx.includes(e)}function Qx(e){return Xx.includes(e)}function e_(){if(typeof window>"u")return null;try{const e=window.localStorage.getItem(jm);if(!e)return null;const t=JSON.parse(e);if(!t||typeof t!="object")return null;const{mode:n,name:r}=t;return!Jx(n)||!Qx(r)?null:{mode:n,name:r}}catch{return null}}function qm(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(jm,JSON.stringify({mode:e,name:t}))}catch{}}function Hm(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia(Km).matches?"dark":"light"}function Gm(e,t){return e==="light"||e==="dark"?e:t?"dark":"light"}const Hc=e_(),[ia,t_]=T(Hc?.mode??"system"),[sa,Vm]=T(Hc?.name??"paper"),[n_,r_]=T(Gm(Hc?.mode??"system",Hm()==="dark"));let Wm=!1;function o_(e,t){typeof document>"u"||(document.documentElement.setAttribute("data-kb-theme",e),document.documentElement.setAttribute("data-kb-theme-name",t),document.documentElement.style.colorScheme=e)}function aa(e,t){const n=Gm(e,Hm()==="dark");r_(n),o_(n,t),Wm&&qm(e,t)}function Ym(e){t_(e),aa(e,sa())}function i_(e){Vm(e),aa(ia(),e)}function s_(e,t){Vm(t),Ym(e)}let Cf=!1;function a_(e={}){Cf||(Cf=!0,Wm=e.persistHint??!1,aa(ia(),sa()),!(typeof window>"u"||!window.matchMedia)&&window.matchMedia(Km).addEventListener("change",()=>{ia()==="system"&&aa("system",sa())}))}const u_="x-yorz-pair-token";let Zm=()=>null,Xm=()=>{};function l_(e){e.tokenProvider&&(Zm=e.tokenProvider),e.onUnauthorized&&(Xm=e.onUnauthorized)}function Jm(){try{return Zm()}catch{return null}}function c_(){try{Xm()}catch{}}function Qm(e){const t=Jm();if(!t)return e??{};const n=new Headers(e?.headers);return n.set(u_,t),{...e,headers:n}}function ka(e){const t=Jm();if(!t)return e;const n=e.includes("?")?"&":"?";return`${e}${n}token=${encodeURIComponent(t)}`}const e0="yorz.token",[d_,Sf]=T(!1);function f_(){try{return localStorage.getItem(e0)}catch{return null}}function g_(e){try{localStorage.setItem(e0,e)}catch{}}function h_(){try{const e=new URL(window.location.href),t=e.searchParams.get("token");if(t){g_(t),Sf(!1),e.searchParams.delete("token");const n=e.pathname+(e.search?e.search:"")+e.hash;window.history.replaceState(window.history.state,"",n)}}catch{}l_({tokenProvider:f_,onUnauthorized:()=>Sf(!0)})}/**
2
+ * @license lucide-solid v1.24.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */var p_={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},Oo=p_,m_=mt({size:24,color:"currentColor",strokeWidth:2,absoluteStrokeWidth:!1,class:""}),b_=$("<svg>"),y_=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},v_=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),w_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),kf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),x_=e=>{const t=w_(e);return t.charAt(0).toUpperCase()+t.slice(1)},__=e=>{const[t,n]=de(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]),r=gt(m_);return(()=>{var o=b_();return gr(o,G(Oo,{get width(){return t.size??r.size??Oo.width},get height(){return t.size??r.size??Oo.height},get stroke(){return t.color??r.color??Oo.stroke},get"stroke-width"(){return J(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??Oo["stroke-width"])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??Oo["stroke-width"])},get class(){return v_("lucide","lucide-icon",r.class,...t.name!=null?[`lucide-${kf(x_(t.name))}`,`lucide-${kf(t.name)}`]:[],t.class)},get"aria-hidden"(){return!t.children&&!y_(n)?"true":void 0}},n),!0,!0),x(o,f(at,{get each(){return t.iconNode},children:([i,s])=>f(_m,G({component:i},s))})),o})()},Xe=__,E_=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],C_=e=>f(Xe,G(e,{iconNode:E_,name:"arrow-left"})),S_=C_,k_=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],A_=e=>f(Xe,G(e,{iconNode:k_,name:"bell"})),T_=A_,I_=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],D_=e=>f(Xe,G(e,{iconNode:I_,name:"book-open"})),R_=D_,O_=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],N_=e=>f(Xe,G(e,{iconNode:O_,name:"check"})),Ei=N_,M_=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],P_=e=>f(Xe,G(e,{iconNode:M_,name:"chevron-down"})),Aa=P_,$_=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],L_=e=>f(Xe,G(e,{iconNode:$_,name:"chevron-right"})),Ta=L_,F_=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],B_=e=>f(Xe,G(e,{iconNode:F_,name:"chevrons-left"})),t0=B_,z_=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],U_=e=>f(Xe,G(e,{iconNode:z_,name:"chevrons-right"})),fc=U_,K_=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],j_=e=>f(Xe,G(e,{iconNode:K_,name:"chevrons-up-down"})),q_=j_,H_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],G_=e=>f(Xe,G(e,{iconNode:H_,name:"circle-check"})),V_=G_,W_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Y_=e=>f(Xe,G(e,{iconNode:W_,name:"circle-question-mark"})),Z_=Y_,X_=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],J_=e=>f(Xe,G(e,{iconNode:X_,name:"copy"})),Q_=J_,e2=[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]],t2=e=>f(Xe,G(e,{iconNode:e2,name:"corner-left-up"})),n2=t2,r2=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],o2=e=>f(Xe,G(e,{iconNode:r2,name:"ellipsis"})),i2=o2,s2=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["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",key:"1kt360"}]],a2=e=>f(Xe,G(e,{iconNode:s2,name:"folder-plus"})),u2=a2,l2=[["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",key:"1kt360"}]],c2=e=>f(Xe,G(e,{iconNode:l2,name:"folder"})),d2=c2,f2=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],g2=e=>f(Xe,G(e,{iconNode:f2,name:"git-branch"})),Gc=g2,h2=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],p2=e=>f(Xe,G(e,{iconNode:h2,name:"git-merge"})),n0=p2,m2=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],b2=e=>f(Xe,G(e,{iconNode:m2,name:"house"})),y2=b2,v2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],w2=e=>f(Xe,G(e,{iconNode:v2,name:"info"})),x2=w2,_2=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],E2=e=>f(Xe,G(e,{iconNode:_2,name:"languages"})),C2=E2,S2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],k2=e=>f(Xe,G(e,{iconNode:S2,name:"loader-circle"})),on=k2,A2=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],T2=e=>f(Xe,G(e,{iconNode:A2,name:"maximize-2"})),I2=T2,D2=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],R2=e=>f(Xe,G(e,{iconNode:D2,name:"menu"})),O2=R2,N2=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],M2=e=>f(Xe,G(e,{iconNode:N2,name:"minimize-2"})),P2=M2,$2=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],L2=e=>f(Xe,G(e,{iconNode:$2,name:"monitor"})),r0=L2,F2=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],B2=e=>f(Xe,G(e,{iconNode:F2,name:"moon"})),z2=B2,U2=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],K2=e=>f(Xe,G(e,{iconNode:U2,name:"palette"})),j2=K2,q2=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],H2=e=>f(Xe,G(e,{iconNode:q2,name:"paperclip"})),G2=H2,V2=[["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",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],W2=e=>f(Xe,G(e,{iconNode:V2,name:"pencil"})),o0=W2,Y2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Z2=e=>f(Xe,G(e,{iconNode:Y2,name:"plus"})),Wr=Z2,X2=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],J2=e=>f(Xe,G(e,{iconNode:X2,name:"qr-code"})),Q2=J2,eE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],tE=e=>f(Xe,G(e,{iconNode:eE,name:"rotate-ccw"})),nE=tE,rE=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],oE=e=>f(Xe,G(e,{iconNode:rE,name:"rotate-cw"})),iE=oE,sE=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],aE=e=>f(Xe,G(e,{iconNode:sE,name:"send"})),Ia=aE,uE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],lE=e=>f(Xe,G(e,{iconNode:uE,name:"settings"})),cE=lE,dE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],fE=e=>f(Xe,G(e,{iconNode:dE,name:"square"})),i0=fE,gE=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],hE=e=>f(Xe,G(e,{iconNode:gE,name:"sun"})),pE=hE,mE=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],bE=e=>f(Xe,G(e,{iconNode:mE,name:"terminal"})),yE=bE,vE=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],wE=e=>f(Xe,G(e,{iconNode:vE,name:"trash-2"})),Vc=wE,xE=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],_E=e=>f(Xe,G(e,{iconNode:xE,name:"triangle-alert"})),EE=_E,CE=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],SE=e=>f(Xe,G(e,{iconNode:CE,name:"upload"})),kE=SE,AE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],TE=e=>f(Xe,G(e,{iconNode:AE,name:"x"})),eo=TE;async function qs(e,t){const n=await fetch(e,Qm(t));return n.status===401&&c_(),n}function Ge(e){return`/api/projects/${encodeURIComponent(e)}`}async function Hs(e){const t=await e.text();if(!t)return"";try{return JSON.parse(t).error??t}catch{return t}}async function Se(e,t){const n=await qs(e,t);if(!n.ok){const r=await Hs(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}const pe={listSpecs:e=>Se(`${Ge(e)}/specs`),getSpec:(e,t)=>Se(`${Ge(e)}/specs/${encodeURIComponent(t)}`),deleteSpec:(e,t)=>Se(`${Ge(e)}/specs/${encodeURIComponent(t)}`,{method:"DELETE"}),setStage:(e,t,n)=>Se(`${Ge(e)}/specs/${encodeURIComponent(t)}/stage`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({stage:n})}),createSpec:(e,t)=>qs(`${Ge(e)}/specs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}).then(async n=>{if(!n.ok){const r=await Hs(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}),appendAnnotation:(e,t,n)=>Se(`${Ge(e)}/specs/${encodeURIComponent(t)}/inputs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:"annotate",...n})}),submitQuestionAnswers:(e,t,n)=>Se(`${Ge(e)}/specs/${encodeURIComponent(t)}/questions/answers`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),runAgent:(e,t)=>Se(`${Ge(e)}/specs/${encodeURIComponent(t)}/run`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),appendItem:(e,t,n)=>Se(`${Ge(e)}/specs/${encodeURIComponent(t)}/appends`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),explain:(e,t,n)=>Se(`${Ge(e)}/specs/${encodeURIComponent(t)}/explain`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:n})}),gitOp:(e,t,n)=>Se(`${Ge(e)}/specs/${encodeURIComponent(t)}/git`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:n})}),getProjectChanges:e=>Se(`${Ge(e)}/git/changes`),getFileDiff:(e,t)=>Se(`${Ge(e)}/git/diff?path=${encodeURIComponent(t)}`),getGitHistory:(e,t="",n)=>{const r=new URLSearchParams;t.trim()&&r.set("q",t.trim()),n!==void 0&&r.set("cursor",String(n));const o=r.size?`?${r.toString()}`:"";return Se(`${Ge(e)}/git/history${o}`)},getGitCommitFiles:(e,t)=>Se(`${Ge(e)}/git/history/${encodeURIComponent(t)}/files`),getGitCommitFileDiff:(e,t,n)=>Se(`${Ge(e)}/git/history/${encodeURIComponent(t)}/diff?path=${encodeURIComponent(n)}`),getGitBranches:e=>Se(`${Ge(e)}/git/branches`),checkoutGitBranch:(e,t)=>Se(`${Ge(e)}/git/checkout`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({branch:t})}),createGitBranch:(e,t)=>Se(`${Ge(e)}/git/create-branch`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:t})}),gitFetch:e=>Se(`${Ge(e)}/git/fetch`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({})}),mergeGitBranch:(e,t)=>Se(`${Ge(e)}/git/merge`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({branch:t})}),projectCommit:(e,t)=>Se(`${Ge(e)}/git/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),projectDiscard:(e,t)=>Se(`${Ge(e)}/git/discard`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),projectPush:e=>Se(`${Ge(e)}/git/push`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),projectPull:e=>Se(`${Ge(e)}/git/pull`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),getDebug:(e,t)=>Se(`${Ge(e)}/specs/${encodeURIComponent(t)}/debug`),listProjects:()=>Se("/api/projects"),listDirs:(e,t)=>{const n=new URLSearchParams;e!==void 0&&n.set("path",e),t&&n.set("showHidden","1");const r=n.toString();return Se(`/api/fs/list${r?`?${r}`:""}`)},createDir:(e,t)=>Se("/api/fs/mkdir",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({parent:e,name:t})}),addProject:async(e,t)=>{const n=await qs("/api/projects",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,...t?.gitInit?{gitInit:!0}:{}})});if(n.status===409){const r=await n.json();if(r.needGitInit)return{ok:!1,needGitInit:!0,path:r.path??e}}if(!n.ok){const r=await Hs(n);throw new Error(`${n.status} ${r||n.statusText}`)}return{ok:!0,project:await n.json()}},listSystemNotifications:()=>Se("/api/system-notifications"),deleteSystemNotification:e=>Se(`/api/system-notifications/${encodeURIComponent(e)}`,{method:"DELETE"}),updateSystemNotification:e=>Se(`/api/system-notifications/${encodeURIComponent(e)}/update`,{method:"POST"}),restartSystemNotification:e=>Se(`/api/system-notifications/${encodeURIComponent(e)}/restart`,{method:"POST"}),removeProject:e=>Se(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"}),removeProjectWithFiles:e=>Se(`/api/projects/${encodeURIComponent(e)}?deleteFiles=true`,{method:"DELETE"}),createWorktree:(e,t)=>Se(`/api/projects/${encodeURIComponent(e)}/worktrees`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),mergeWorktreeToMain:(e,t)=>Se(`/api/projects/${encodeURIComponent(e)}/merge-main`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectConfig:e=>Se(`/api/projects/${encodeURIComponent(e)}/config`),updateProjectConfig:(e,t)=>Se(`/api/projects/${encodeURIComponent(e)}/config`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectCustomInstructions:e=>Se(`/api/projects/${encodeURIComponent(e)}/custom-instructions`),updateProjectCustomInstructions:(e,t)=>Se(`/api/projects/${encodeURIComponent(e)}/custom-instructions`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({customInstructions:t})}),getPairingCode:()=>Se("/api/pairing/code"),claimPairing:e=>Se("/api/pairing/claim",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({code:e})}),getVapidPublicKey:()=>Se("/api/push/vapid-public-key"),savePushSubscription:e=>Se("/api/push/subscriptions",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),deletePushSubscription:e=>Se("/api/push/subscriptions",{method:"DELETE",headers:{"content-type":"application/json"},body:JSON.stringify({endpoint:e})}),getGlobalConfig:()=>Se("/api/global-config"),listGlobalAgents:()=>Se("/api/agents"),listGlobalAgentModels:e=>Se(`/api/agents/${encodeURIComponent(e)}/models`),updateGlobalConfig:e=>Se("/api/global-config",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),createDraft:e=>Se(`${Ge(e)}/spec-drafts`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),uploadAttachment:async(e,t,n)=>{const r=new FormData;r.append("file",n,n.name);const o=await qs(`${Ge(e)}/spec-drafts/${encodeURIComponent(t)}/attachments`,{method:"POST",body:r});if(!o.ok){const i=await Hs(o);throw new Error(`${o.status} ${i||o.statusText}`)}return o.json()},deleteAttachment:(e,t,n)=>Se(`${Ge(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"DELETE"}),renameAttachment:(e,t,n,r)=>Se(`${Ge(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({name:r})}),draftAttachmentUrl:(e,t,n)=>`${Ge(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,chatAttachmentUrl:(e,t,n)=>`${Ge(e)}/chat-attachments/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,specAttachmentUrl:(e,t,n)=>`${Ge(e)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,listFiles:(e,t,n=50)=>Se(`${Ge(e)}/files?query=${encodeURIComponent(t)}&limit=${n}`),listSessions:e=>Se(`${Ge(e)}/sessions`),listAgents:e=>Se(`${Ge(e)}/agents`),listAgentModels:(e,t)=>Se(`${Ge(e)}/agents/${encodeURIComponent(t)}/models`),getAgentUsageStatus:e=>Se(`${Ge(e)}/agent-usage`),createSession:(e,t={})=>Se(`${Ge(e)}/sessions`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getSessionMessages:(e,t)=>Se(`${Ge(e)}/sessions/${encodeURIComponent(t)}/messages`),getSpecMessages:(e,t)=>Se(`${Ge(e)}/specs/${encodeURIComponent(t)}/messages`),getSessionGroupMessages:(e,t)=>Se(`${Ge(e)}/session-groups/${encodeURIComponent(t)}/messages`),sendSessionMessage:(e,t,n,r)=>Se(`${Ge(e)}/sessions/${encodeURIComponent(t)}/messages`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r?{prompt:n,draftId:r}:{prompt:n})}),abortSession:(e,t)=>Se(`${Ge(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"}),getSpecSession:(e,t)=>Se(`${Ge(e)}/specs/${encodeURIComponent(t)}/session`),listCommands:e=>Se(`${Ge(e)}/commands`),createCommand:(e,t)=>Se(`${Ge(e)}/commands`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),deleteCommand:(e,t)=>Se(`${Ge(e)}/commands/${encodeURIComponent(t)}`,{method:"DELETE"}),listCommandRuns:e=>Se(`${Ge(e)}/command-runs`),getCommandRun:(e,t)=>Se(`${Ge(e)}/command-runs/${encodeURIComponent(t)}`),runCommand:(e,t)=>Se(`${Ge(e)}/command-runs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({commandId:t})}),readCommandOutput:(e,t,n)=>Se(`${Ge(e)}/command-runs/${encodeURIComponent(t)}/output${n===void 0?"":`?offset=${n}`}`),stopCommandRun:(e,t)=>Se(`${Ge(e)}/command-runs/${encodeURIComponent(t)}/stop`,{method:"POST"}),clearCommandRun:(e,t)=>Se(`${Ge(e)}/command-runs/${encodeURIComponent(t)}`,{method:"DELETE"})},[IE,s0]=T(""),[DE,a0]=T(null);function Ko(e,t){e&&(s0(e),a0(t&&t.userText?{sessionId:e,...t}:null))}function RE(){s0(""),a0(null)}const[St,OE]=T(NE());function NE(){if(typeof window>"u")return"";const e=window.location.pathname.match(/^\/([^/]+)/);return e&&e[1]!=="api"?e[1]:""}function _o(){const e=Qi();return()=>e.projectId??St()}function Bt(e="",t){const n=t??St();if(!n)return e.startsWith("/")?e:`/${e}`;const r=e.startsWith("/")?e:e?`/${e}`:"";return`/${n}${r}`}const[ME,PE]=T(0),[$E,Af]=T(null);let Tf=0;function LE(){PE(e=>e+1)}function FE(e){const t=++Tf;Af(()=>e),ue(()=>{Tf===t&&Af(null)})}const[Rr,Wc]=T(!1);function u0(){Wc(e=>!e)}function ua(){Wc(!1)}let gc=0,bu=!1;function BE(){gc-=1,!bu&&(bu=!0,queueMicrotask(()=>{bu=!1,gc<=0&&Wc(!1)}))}function es(e){gc+=1,ue(BE),FE(u0),re(()=>{if(!Rr())return;const t=n=>{n.key!=="Escape"||e?.()||ua()};window.addEventListener("keydown",t),ue(()=>window.removeEventListener("keydown",t))})}const zE=16e3,UE=5e3,KE=5e3;function jE(){const e=globalThis;return e.crypto?.randomUUID?e.crypto.randomUUID():`c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}class qE{clientId=jE();source=null;handlers=new Map;syncTimer=null;syncInFlight=!1;syncPending=!1;lastFrameAt=0;watchdogTimer=null;visibilityBound=!1;connected=!0;connListeners=new Set;subscribe(t,n){let r=this.handlers.get(t);return r||(r=new Set,this.handlers.set(t,r)),r.add(n),this.ensureOpen(),this.scheduleSync(),()=>{const o=this.handlers.get(t);o&&(o.delete(n),o.size===0&&this.handlers.delete(t),this.scheduleSync())}}readyState(){return this.source?.readyState??2}ensureOpen(){if(this.source)return;const t=ka(`/api/events/stream?clientId=${encodeURIComponent(this.clientId)}`),n=new EventSource(t);this.source=n,this.lastFrameAt=Date.now(),this.startWatchdog(),n.addEventListener("open",()=>{this.lastFrameAt=Date.now(),this.markConnected(!0),this.scheduleSync(!0)}),n.addEventListener("server-heartbeat",r=>{this.lastFrameAt=Date.now(),this.markConnected(!0);let o={ts:Date.now()};try{o=JSON.parse(r.data)}catch{}for(const i of this.handlers.values())for(const s of i)try{s("server-heartbeat",o)}catch{}}),n.addEventListener("msg",r=>{this.lastFrameAt=Date.now(),this.markConnected(!0);let o;try{o=JSON.parse(r.data)}catch{return}const i=this.handlers.get(o.topic);if(i)for(const s of i)try{s(o.event,o.data)}catch{}}),n.addEventListener("error",()=>{})}startWatchdog(){if(this.watchdogTimer===null){const t=setInterval(()=>this.checkAlive(),KE);t.unref?.(),this.watchdogTimer=t}!this.visibilityBound&&typeof document<"u"&&(this.visibilityBound=!0,document.addEventListener("visibilitychange",()=>{document.hidden||this.checkAlive()}))}checkAlive(){const t=this.source;if(!t)return;const n=Date.now()-this.lastFrameAt,r=t.readyState===2;(n>UE||r)&&this.markConnected(!1),(n>zE||r)&&this.reconnect()}markConnected(t){if(this.connected!==t){this.connected=t;for(const n of this.connListeners)try{n(t)}catch{}}}isConnected(){return this.connected}subscribeConnectionState(t){return this.connListeners.add(t),this.ensureOpen(),t(this.connected),()=>{this.connListeners.delete(t)}}reconnect(){const t=this.source;this.source=null;try{t?.close()}catch{}this.ensureOpen()}scheduleSync(t=!1){if(this.syncTimer)return;const n=t?0:20;this.syncTimer=setTimeout(()=>{this.syncTimer=null,this.runSync()},n)}async runSync(){if(this.syncInFlight){this.syncPending=!0;return}this.syncInFlight=!0;try{const t=[...this.handlers.keys()].sort();await fetch("/api/events/subscribe",Qm({method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({clientId:this.clientId,topics:t})}))}catch{}finally{this.syncInFlight=!1,this.syncPending&&(this.syncPending=!1,this.scheduleSync(!0))}}dispose(){this.watchdogTimer!==null&&(clearInterval(this.watchdogTimer),this.watchdogTimer=null),this.syncTimer!==null&&(clearTimeout(this.syncTimer),this.syncTimer=null);try{this.source?.close()}catch{}this.source=null,this.handlers.clear(),this.connListeners.clear(),this.connected=!0}}let Zn=new qE;function Da(e){const t=e;return t.readyState=()=>Zn.readyState(),t}function HE(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}`,o=Zn.subscribe(r,(i,s)=>{switch(i){case"updated":n.onUpdated?.();break;case"server-heartbeat":n.onServerHeartbeat?.(s);break}});return Da(o)}function Ra(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:session:${t}`,o=Zn.subscribe(r,(i,s)=>{i==="session-msg"?n.onEvent?.(s):i==="ready"?n.onReady?.(s):i==="server-heartbeat"&&n.onServerHeartbeat?.(s)});return Da(o)}function l0(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:sessions`,r=Zn.subscribe(n,(o,i)=>{o==="session-status"?t.onStatus?.(i):o==="server-heartbeat"&&t.onServerHeartbeat?.(i)});return Da(r)}function c0(e,t){if(!e)return()=>{};const n=`project:${e}:specs`;return Zn.subscribe(n,r=>{r==="list-updated"&&t()})}function d0(e){return Zn.subscribe("projects",t=>{t==="projects-changed"&&e()})}function GE(e){return Zn.subscribe("system-notifications",t=>{t==="updated"&&e()})}function VE(e){return Zn.subscribeConnectionState(e)}function WE(e,t){if(!e)return()=>{};const n=`project:${e}:commands`;return Zn.subscribe(n,(r,o)=>{r==="runs-updated"&&t(o.runs)})}function YE(e,t,n){if(!e||!t)return()=>{};const r=`project:${e}:command:${t}`;return Zn.subscribe(r,(o,i)=>{if(o==="output-appended")n.onOutput?.(i);else if(o==="run-updated")n.onRun?.(i.run);else if(o==="ready"){const s=i.run;s&&n.onRun?.(s)}else o==="error"&&n.onError?.(String(i.error??"unknown error"))})}function ZE(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:changes`,r=Zn.subscribe(n,(o,i)=>{o==="changes-updated"&&t(i.changes)});return Da(r)}function f0(e){if(!e)return"";const t=e.replace(/^['"]|['"]$/g,"").trim();return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(t)||/^\d{4}-\d{2}-\d{2}$/.test(t)?t:t||""}const XE={plan:"bg-stage-plan/15 text-stage-plan border-stage-plan/30",tasks:"bg-stage-tasks/15 text-stage-tasks border-stage-tasks/30",execute:"bg-stage-execute/15 text-stage-execute border-stage-execute/30",done:"bg-stage-done/15 text-stage-done border-stage-done/30"},JE={feat:"text-success",refct:"text-info",fix:"text-destructive"};function g0(e){const[t,n,...r]=e.split(".");return!t||!n||r.length===0?null:{prefix:t,type:n,suffix:r.join(".")}}function QE(e,t){const n=g0(e)?.type??e.split(".")[1]??"feat",r=t?.trim()??"";return r?`${n}: ${r}`:`${n}: update`}function eC(e){return`@.yorz/specs/${e}/spec.md`}const tC=e=>e!=null,nC=e=>e.filter(tC);function rC(e){return(...t)=>{for(const n of e)n&&n(...t)}}const ee=e=>typeof e=="function"&&!e.length?e():e,hc=e=>Array.isArray(e)?e:e?[e]:[];function oC(e,...t){return typeof e=="function"?e(...t):e}const iC=ue;function sC(e,t,n,r){const o=e.length,i=t.length;let s=0;if(!i){for(;s<o;s++)n(e[s]);return}if(!o){for(;s<i;s++)r(t[s]);return}for(;s<i&&t[s]===e[s];s++);let a,u;t=t.slice(s),e=e.slice(s);for(a of t)e.includes(a)||r(a);for(u of e)t.includes(u)||n(u)}function aC(e,t,n,r){return e.addEventListener(t,n,r),iC(e.removeEventListener.bind(e,t,n,r))}function uC(e,t,n,r){const o=()=>{hc(ee(e)).forEach(i=>{i&&hc(ee(t)).forEach(s=>aC(i,s,n,r))})};typeof e=="function"?re(o):$e(o)}const yu=Symbol("fallback");function If(e){for(const t of e)t.dispose()}function lC(e,t,n,r={}){const o=new Map;return ue(()=>If(o.values())),()=>{const s=e()||[];return s[Oi],vt(()=>{if(!s.length)return If(o.values()),o.clear(),r.fallback?[Pn(d=>(o.set(yu,{dispose:d}),r.fallback()))]:[];const a=new Array(s.length),u=o.get(yu);if(!o.size||u){u?.dispose(),o.delete(yu);for(let c=0;c<s.length;c++){const d=s[c],g=t(d,c);i(a,d,c,g)}return a}const l=new Set(o.keys());for(let c=0;c<s.length;c++){const d=s[c],g=t(d,c);l.delete(g);const h=o.get(g);h?(a[c]=h.mapped,h.setIndex?.(c),h.setItem(()=>d)):i(a,d,c,g)}for(const c of l)o.get(c)?.dispose(),o.delete(c);return a})};function i(s,a,u,l){Pn(c=>{const[d,g]=T(a),h={setItem:g,dispose:c};if(n.length>1){const[p,m]=T(u);h.setIndex=m,h.mapped=n(d,p)}else h.mapped=n(d);o.set(l,h),s[u]=h.mapped})}}function cC(e){const{by:t}=e;return ne(lC(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}const dC=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Df(e){const t={};let n;for(;n=dC.exec(e);)t[n[1]]=n[2];return t}function bn(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Df(e)}else typeof t=="string"&&(t=Df(t));return{...e,...t}}function it(...e){return rC(e)}function fC(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function pc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gC(e){return typeof e=="number"}function zo(e){return Object.prototype.toString.call(e)==="[object String]"}function ts(e){return typeof e=="function"}function gn(e){return t=>`${e()}-${t}`}function Ht(e,t){return e?e===t||e.contains(t):!1}function Ci(e,t=!1){const{activeElement:n}=fn(e);if(!n?.nodeName)return null;if(h0(n)&&n.contentDocument)return Ci(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=fn(n).getElementById(r);if(o)return o}}return n}function Yc(e){return fn(e).defaultView||window}function fn(e){return e?e.ownerDocument||e:document}function h0(e){return e.tagName==="IFRAME"}var Oa=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(Oa||{});function p0(e){return typeof window>"u"||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function Zc(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function ns(){return Zc(/^Mac/i)}function hC(){return Zc(/^iPhone/i)}function pC(){return Zc(/^iPad/i)||ns()&&navigator.maxTouchPoints>1}function mC(){return hC()||pC()}function bC(){return ns()||mC()}function m0(){return p0(/AppleWebKit/i)&&!yC()}function yC(){return p0(/Chrome/i)}function Me(e,t){return t&&(ts(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function ot(e){return t=>{for(const n of e)Me(t,n)}}function vC(e){return ns()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function It(e){if(e)if(wC())e.focus({preventScroll:!0});else{const t=xC(e);e.focus(),_C(t)}}var ks=null;function wC(){if(ks==null){ks=!1;try{document.createElement("div").focus({get preventScroll(){return ks=!0,!0}})}catch{}}return ks}function xC(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function _C(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var b0=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],EC=[...b0,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Xc=`${b0.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,CC=EC.join(':not([hidden]):not([tabindex="-1"]),');function y0(e,t){const r=Array.from(e.querySelectorAll(Xc)).filter(Rf);return t&&Rf(e)&&r.unshift(e),r.forEach((o,i)=>{if(h0(o)&&o.contentDocument){const s=o.contentDocument.body,a=y0(s,!1);r.splice(i,1,...a)}}),r}function Rf(e){return v0(e)&&!SC(e)}function v0(e){return e.matches(Xc)&&Jc(e)}function SC(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function Jc(e,t){return e.nodeName!=="#comment"&&kC(e)&&AC(e,t)&&(!e.parentElement||Jc(e.parentElement,e))}function kC(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function AC(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function w0(e,t,n){const r=t?.tabbable?CC:Xc,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Jc(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function Of(e){let t=e;for(;t&&!TC(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function TC(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function IC(){}function DC(e){return[e.clientX,e.clientY]}function x0(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,a=0,u=s-1;a<s;u=a++){const[l,c]=t[a],[d,g]=t[u],[,h]=t[u===0?s-1:u-1]||[0,0],p=(c-g)*(n-l)-(l-d)*(r-c);if(g<c){if(r>=g&&r<c){if(p===0)return!0;p>0&&(r===g?r>h&&(o=!o):o=!o)}}else if(c<g){if(r>c&&r<=g){if(p===0)return!0;p<0&&(r===g?r<h&&(o=!o):o=!o)}}else if(r===c&&(n>=d&&n<=l||n>=l&&n<=d))return!0}return o}function Ne(e,t){return G(e,t)}var pi=new Map,Nf=new Set;function Mf(){if(typeof window>"u"||document.body===null)return;const e=n=>{if(!n.target)return;let r=pi.get(n.target);r||(r=new Set,pi.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=pi.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),pi.delete(n.target)),pi.size===0)){for(const o of Nf)o();Nf.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?Mf():document.addEventListener("DOMContentLoaded",Mf));function mc(e,t){const n=Pf(e,t,"left"),r=Pf(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const u=s+e.offsetWidth,l=a+e.offsetHeight;n<=s?s=n:n+o>u&&(s+=n+o-u),r<=a?a=r:r+i>l&&(a+=r+i-l),e.scrollLeft=s,e.scrollTop=a}function Pf(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function RC(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=Of(e);for(;e&&o&&e!==n&&o!==n;)mc(o,e),e=o,o=Of(e)}else{const{left:o,top:i}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:s,top:a}=e.getBoundingClientRect();(Math.abs(o-s)>1||Math.abs(i-a)>1)&&e.scrollIntoView?.({block:"nearest"})}}}var Na={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"},zi="data-kb-top-layer",_0,bc=!1,ur=[];function Ui(e){return ur.findIndex(t=>t.node===e)}function OC(e){return ur[Ui(e)]}function NC(e){return ur.length>0&&ur[ur.length-1].node===e}function E0(){return ur.filter(e=>e.isPointerBlocking)}function MC(){return[...E0()].slice(-1)[0]}function Qc(){return E0().length>0}function C0(e){const t=Ui(MC()?.node);return Ui(e)<t}function PC(e){ur.push(e)}function $C(e){const t=Ui(e);t<0||ur.splice(t,1)}function LC(){for(const{node:e}of ur)e.style.pointerEvents=C0(e)?"none":"auto"}function FC(e){if(Qc()&&!bc){const t=fn(e);_0=document.body.style.pointerEvents,t.body.style.pointerEvents="none",bc=!0}}function BC(e){if(Qc())return;const t=fn(e);t.body.style.pointerEvents=_0,t.body.style.length===0&&t.body.removeAttribute("style"),bc=!1}var wn={layers:ur,isTopMostLayer:NC,hasPointerBlockingLayer:Qc,isBelowPointerBlockingLayer:C0,addLayer:PC,removeLayer:$C,indexOf:Ui,find:OC,assignPointerEventToLayers:LC,disableBodyPointerEvents:FC,restoreBodyPointerEvents:BC};function Ma(e,t){const[n,r]=T($f(t?.()));return re(()=>{r(e()?.tagName.toLowerCase()||$f(t?.()))}),n}function $f(e){return zo(e)?e:void 0}function Fe(e){const[t,n]=de(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return f(_m,G(n,{get component(){return t.as}}))}var zC=Object.defineProperty,Dn=(e,t)=>{for(var n in t)zC(e,n,{get:t[n],enumerable:!0})},UC={};Dn(UC,{Button:()=>S0,Root:()=>hr});var KC=["button","color","file","image","reset","submit"];function jC(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?KC.indexOf(e.type)!==-1:!1}function hr(e){let t;const n=Ne({type:"button"},e),[r,o]=de(n,["ref","type","disabled"]),i=Ma(()=>t,()=>"button"),s=ne(()=>{const l=i();return l==null?!1:jC({tagName:l,type:r.type})}),a=ne(()=>i()==="input"),u=ne(()=>i()==="a"&&t?.getAttribute("href")!=null);return f(Fe,G({as:"button",ref(l){var c=it(d=>t=d,r.ref);typeof c=="function"&&c(l)},get type(){return J(()=>!!(s()||a()))()?r.type:void 0},get role(){return!s()&&!u()?"button":void 0},get tabIndex(){return!s()&&!u()&&!r.disabled?0:void 0},get disabled(){return J(()=>!!(s()||a()))()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var S0=hr;function xt(e){return t=>(e(t),()=>e(void 0))}var rn=e=>typeof e=="function"?e():e,qC=e=>{const t=ne(()=>{const s=rn(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=T(rn(e.show)?"present":"hidden");let i="none";return re(s=>{const a=rn(e.show);return vt(()=>{if(s===a)return a;const u=i,l=n();a?o("present"):l==="none"||t()?.display==="none"?o("hidden"):o(s===!0&&u!==l?"hiding":"hidden")}),a}),re(()=>{const s=rn(e.element);if(!s)return;const a=l=>{l.target===s&&(i=n())},u=l=>{const d=n().includes(l.animationName);l.target===s&&d&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u),ue(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},HC=qC,Gn=HC,GC={};Dn(GC,{CloseButton:()=>A0,Description:()=>T0,List:()=>D0,ProgressFill:()=>R0,ProgressTrack:()=>O0,Region:()=>N0,Root:()=>M0,Title:()=>P0,Toast:()=>po,toaster:()=>Ki,useToastContext:()=>rs});var k0=mt();function rs(){const e=gt(k0);if(e===void 0)throw new Error("[kobalte]: `useToastContext` must be used within a `Toast.Root` component");return e}function A0(e){const t=rs(),[n,r]=de(e,["aria-label","onClick"]);return f(hr,G({get"aria-label"(){return n["aria-label"]||t.translations().close},onClick:i=>{Me(i,n.onClick),t.close()}},r))}function T0(e){const t=rs(),n=Ne({id:t.generateId("description")},e),[r,o]=de(n,["id"]);return re(()=>ue(t.registerDescriptionId(r.id))),f(Fe,G({as:"div",get id(){return r.id}},o))}var I0=mt();function ed(){const e=gt(I0);if(e===void 0)throw new Error("[kobalte]: `useToastRegionContext` must be used within a `Toast.Region` component");return e}function D0(e){let t;const n=ed(),[r,o]=de(e,["ref","onFocusIn","onFocusOut","onPointerMove","onPointerLeave"]),i=l=>{Me(l,r.onFocusIn),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},s=l=>{Me(l,r.onFocusOut),Ht(t,l.relatedTarget)||n.resumeAllTimer()},a=l=>{Me(l,r.onPointerMove),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},u=l=>{Me(l,r.onPointerLeave),Ht(t,fn(t).activeElement)||n.resumeAllTimer()};return re(pt([()=>t,()=>n.hotkey()],([l,c])=>{if(!l)return;const d=fn(l),g=h=>{c.every(m=>h[m]||h.code===m)&&It(l)};d.addEventListener("keydown",g),ue(()=>d.removeEventListener("keydown",g))})),re(()=>{if(!n.pauseOnPageIdle())return;const l=Yc(t);l.addEventListener("blur",n.pauseAllTimer),l.addEventListener("focus",n.resumeAllTimer),ue(()=>{l.removeEventListener("blur",n.pauseAllTimer),l.removeEventListener("focus",n.resumeAllTimer)})}),f(Fe,G({as:"ol",ref(l){var c=it(d=>t=d,r.ref);typeof c=="function"&&c(l)},tabIndex:-1,onFocusIn:i,onFocusOut:s,onPointerMove:a,onPointerLeave:u},o,{get children(){return f(at,{get each(){return n.toasts()},children:l=>l.toastComponent({get toastId(){return l.id}})})}}))}function R0(e){const t=ed(),n=rs(),[r,o]=de(e,["style"]),[i,s]=T(100);let a=0;return re(()=>{if(t.isPaused()||n.isPersistent())return;const u=setInterval(()=>{const l=new Date().getTime()-n.closeTimerStartTime()+a,c=Math.trunc(100-l/n.duration()*100);s(c<0?0:c)});ue(()=>{a+=new Date().getTime()-n.closeTimerStartTime(),clearInterval(u)})}),f(Fe,G({as:"div",get style(){return bn({"--kb-toast-progress-fill-width":`${i()}%`},r.style)}},o))}function O0(e){return f(Fe,G({as:"div","aria-hidden":"true",role:"presentation"},e))}var[td,os]=dx({toasts:[]});function VC(e){os("toasts",t=>[...t,e])}function WC(e){return td.toasts.find(t=>t.id===e)}function YC(e,t){const n=td.toasts.findIndex(r=>r.id===e);n!==-1&&os("toasts",r=>[...r.slice(0,n),t,...r.slice(n+1)])}function ZC(e){os("toasts",t=>t.id===e,"dismiss",!0)}function XC(e){os("toasts",t=>t.filter(n=>n.id!==e))}function JC(){os("toasts",[])}var yo={toasts:()=>td.toasts,add:VC,get:WC,update:YC,dismiss:ZC,remove:XC,clear:JC},Lf="{hotkey}",QC={close:"Close"},eS={notifications:e=>`Notifications (${e})`};function N0(e){const t=Ne({id:`toast-region-${Pt()}`,hotkey:["altKey","KeyT"],duration:5e3,limit:3,swipeDirection:"right",swipeThreshold:50,pauseOnInteraction:!0,pauseOnPageIdle:!0,topLayer:!0,translations:eS},e),[n,r]=de(t,["translations","style","hotkey","duration","limit","swipeDirection","swipeThreshold","pauseOnInteraction","pauseOnPageIdle","topLayer","aria-label","regionId"]),o=ne(()=>yo.toasts().filter(g=>g.region===n.regionId&&g.dismiss===!1).slice(0,n.limit)),[i,s]=T(!1),a=()=>o().length>0,u=()=>n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),l=()=>(n["aria-label"]||n.translations.notifications(Lf)).replace(Lf,u()),c=()=>({[zi]:n.topLayer?"":void 0}),d={isPaused:i,toasts:o,hotkey:()=>n.hotkey,duration:()=>n.duration,swipeDirection:()=>n.swipeDirection,swipeThreshold:()=>n.swipeThreshold,pauseOnInteraction:()=>n.pauseOnInteraction,pauseOnPageIdle:()=>n.pauseOnPageIdle,pauseAllTimer:()=>s(!0),resumeAllTimer:()=>s(!1),generateId:gn(()=>r.id)};return f(I0.Provider,{value:d,get children(){return f(Fe,G({as:"div",role:"region",tabIndex:-1,get"aria-label"(){return l()},get style(){return bn({"pointer-events":a()?n.topLayer?"auto":void 0:"none"},n.style)}},c,r))}})}var tS="toast.swipeStart",nS="toast.swipeMove",rS="toast.swipeCancel",oS="toast.swipeEnd";function M0(e){const t=ed(),n=Ne({id:`toast-${Pt()}`,priority:"high",translations:QC},e),[r,o]=de(n,["ref","translations","toastId","style","priority","duration","persistent","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd","onEscapeKeyDown","onKeyDown","onPointerDown","onPointerMove","onPointerUp"]),[i,s]=T(!0),[a,u]=T(),[l,c]=T(),[d,g]=T(!0),[h,p]=T(),{present:m}=Gn({show:i,element:()=>h()??null}),y=ne(()=>r.duration||t.duration());let v,b=0,w=y(),E=null,C=null;const A=()=>{s(!1),g(!0)},I=()=>{yo.remove(r.toastId)},S=N=>{!N||r.persistent||(window.clearTimeout(v),b=new Date().getTime(),v=window.setTimeout(A,N))},k=()=>{S(w),r.onResume?.()},P=()=>{const N=new Date().getTime()-b;w=w-N,window.clearTimeout(v),r.onPause?.()},R=N=>{Me(N,r.onKeyDown),N.key==="Escape"&&(r.onEscapeKeyDown?.(N),N.defaultPrevented||A())},L=N=>{Me(N,r.onPointerDown),N.button===0&&(E={x:N.clientX,y:N.clientY})},F=N=>{if(Me(N,r.onPointerMove),!E)return;const X=N.clientX-E.x,se=N.clientY-E.y,K=!!C,U=["left","right"].includes(t.swipeDirection()),oe=["left","up"].includes(t.swipeDirection())?Math.min:Math.max,H=U?oe(0,X):0,z=U?0:oe(0,se),Z=N.pointerType==="touch"?10:2,te={x:H,y:z},he={originalEvent:N,delta:te};if(K){C=te,As(nS,r.onSwipeMove,he);const{x:W,y:M}=te;N.currentTarget.setAttribute("data-swipe","move"),N.currentTarget.style.setProperty("--kb-toast-swipe-move-x",`${W}px`),N.currentTarget.style.setProperty("--kb-toast-swipe-move-y",`${M}px`)}else Ff(te,t.swipeDirection(),Z)?(C=te,As(tS,r.onSwipeStart,he),N.currentTarget.setAttribute("data-swipe","start"),N.target.setPointerCapture(N.pointerId)):(Math.abs(X)>Z||Math.abs(se)>Z)&&(E=null)},D=N=>{Me(N,r.onPointerUp);const X=C,se=N.target;if(se.hasPointerCapture(N.pointerId)&&se.releasePointerCapture(N.pointerId),C=null,E=null,X){const K=N.currentTarget,U={originalEvent:N,delta:X};if(Ff(X,t.swipeDirection(),t.swipeThreshold())){As(oS,r.onSwipeEnd,U);const{x:oe,y:H}=X;N.currentTarget.setAttribute("data-swipe","end"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),N.currentTarget.style.setProperty("--kb-toast-swipe-end-x",`${oe}px`),N.currentTarget.style.setProperty("--kb-toast-swipe-end-y",`${H}px`),A()}else As(rS,r.onSwipeCancel,U),N.currentTarget.setAttribute("data-swipe","cancel"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),N.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),N.currentTarget.style.removeProperty("--kb-toast-swipe-end-x"),N.currentTarget.style.removeProperty("--kb-toast-swipe-end-y");K.addEventListener("click",oe=>oe.preventDefault(),{once:!0})}};An(()=>{t.toasts().find(N=>N.id===r.toastId&&N.update)&&g(!1)}),re(pt(()=>t.isPaused(),N=>{N?P():k()},{defer:!0})),re(pt([i,y],([N,X])=>{N&&!t.isPaused()&&S(X)})),re(pt(()=>yo.get(r.toastId)?.dismiss,N=>N&&A())),re(pt(()=>m(),N=>!N&&I()));const B={translations:()=>r.translations,close:A,duration:y,isPersistent:()=>r.persistent??!1,closeTimerStartTime:()=>b,generateId:gn(()=>o.id),registerTitleId:xt(u),registerDescriptionId:xt(c)};return f(j,{get when(){return m()},get children(){return f(k0.Provider,{value:B,get children(){return f(Fe,G({as:"li",ref(N){var X=it(p,r.ref);typeof X=="function"&&X(N)},role:"status",tabIndex:0,get style(){return bn({animation:d()?void 0:"none","user-select":"none","touch-action":"none"},r.style)},get"aria-live"(){return r.priority==="high"?"assertive":"polite"},"aria-atomic":"true",get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},get"data-opened"(){return i()?"":void 0},get"data-closed"(){return i()?void 0:""},get"data-swipe-direction"(){return t.swipeDirection()},onKeyDown:R,onPointerDown:L,onPointerMove:F,onPointerUp:D},o))}})}})}function Ff(e,t,n=0){const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n}function As(e,t,n){const r=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function P0(e){const t=rs(),n=Ne({id:t.generateId("title")},e),[r,o]=de(n,["id"]);return re(()=>ue(t.registerTitleId(r.id))),f(Fe,G({as:"div",get id(){return r.id}},o))}var iS=0;function $0(e,t){const n=iS++;return yo.add({id:n,toastComponent:e,dismiss:!1,update:!1,region:t?.region}),n}function yc(e,t){yo.update(e,{id:e,toastComponent:t,dismiss:!1,update:!0})}function sS(e,t,n){const r=$0(o=>t({get toastId(){return o.toastId},state:"pending"}),n);return(ts(e)?e():e).then(o=>yc(r,i=>t({get toastId(){return i.toastId},state:"fulfilled",data:o}))).catch(o=>yc(r,i=>t({get toastId(){return i.toastId},state:"rejected",error:o}))),r}function aS(e){return yo.dismiss(e),e}function uS(){yo.clear()}var Ki={show:$0,update:yc,promise:sS,dismiss:aS,clear:uS},po=Object.assign(M0,{CloseButton:A0,Description:T0,List:D0,ProgressFill:R0,ProgressTrack:O0,Region:N0,Title:P0,toaster:Ki});function ui(e){const[t,n]=T(e.defaultValue?.()),r=ne(()=>e.value?.()!==void 0),o=ne(()=>r()?e.value?.():t());return[o,s=>{vt(()=>{const a=oC(s,o());return Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})}]}function L0(e){const[t,n]=ui(e);return[()=>t()??!1,n]}function lS(e){const[t,n]=ui(e);return[()=>t()??[],n]}function F0(e={}){const[t,n]=L0({value:()=>ee(e.isSelected),defaultValue:()=>!!ee(e.defaultIsSelected),onChange:i=>e.onSelectedChange?.(i)});return{isSelected:t,setIsSelected:i=>{!ee(e.isReadOnly)&&!ee(e.isDisabled)&&n(i)},toggle:()=>{!ee(e.isReadOnly)&&!ee(e.isDisabled)&&n(!t())}}}var cS=class{collection;direction;orientation;constructor(e,t,n){this.collection=e,this.direction=t,this.orientation=n}flipDirection(){return this.direction()==="rtl"&&this.orientation()==="horizontal"}getKeyLeftOf(e){if(this.flipDirection())return this.getNextKey(e);if(this.orientation()==="horizontal")return this.getPreviousKey(e)}getKeyRightOf(e){if(this.flipDirection())return this.getPreviousKey(e);if(this.orientation()==="horizontal")return this.getNextKey(e)}getKeyAbove(e){if(this.orientation()==="vertical")return this.getPreviousKey(e)}getKeyBelow(e){if(this.orientation()==="vertical")return this.getNextKey(e)}getFirstKey(){let e=this.collection().getFirstKey();return e==null?void 0:(this.collection().getItem(e)?.disabled&&(e=this.getNextKey(e)),e)}getLastKey(){let e=this.collection().getLastKey();return e==null?void 0:(this.collection().getItem(e)?.disabled&&(e=this.getPreviousKey(e)),e)}getNextKey(e){let t=e,n;do if(t=this.collection().getKeyAfter(t)??this.collection().getFirstKey(),t==null||(n=this.collection().getItem(t),n==null))return;while(n.disabled);return t}getPreviousKey(e){let t=e,n;do if(t=this.collection().getKeyBefore(t)??this.collection().getLastKey(),t==null||(n=this.collection().getItem(t),n==null))return;while(n.disabled);return t}};function B0(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=u=>{if(u==null)return"";const l=e.getKey??"key",c=zo(l)?u[l]:l(u);return c!=null?String(c):""},i=u=>{if(u==null)return"";const l=e.getTextValue??"textValue",c=zo(l)?u[l]:l(u);return c!=null?String(c):""},s=u=>{if(u==null)return!1;const l=e.getDisabled??"disabled";return(zo(l)?u[l]:l(u))??!1},a=u=>{if(u!=null)return zo(e.getSectionChildren)?u[e.getSectionChildren]:e.getSectionChildren?.(u)};for(const u of e.dataSource){if(zo(u)||gC(u)){r.push({type:"item",rawValue:u,key:String(u),textValue:String(u),disabled:s(u),level:n,index:t}),t++;continue}if(a(u)!=null){r.push({type:"section",rawValue:u,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const l=a(u)??[];if(l.length>0){const c=B0({dataSource:l,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...c),t+=c.length}}else r.push({type:"item",rawValue:u,key:o(u),textValue:i(u),disabled:s(u),level:n,index:t}),t++}return r}function dS(e,t=[]){return ne(()=>{const n=B0({dataSource:ee(e.dataSource),getKey:ee(e.getKey),getTextValue:ee(e.getTextValue),getDisabled:ee(e.getDisabled),getSectionChildren:ee(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var fS=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gS=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function hS(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return fS.has(n)}const t=e.split("-")[0];return gS.has(t)}function pS(e){return hS(e)?"rtl":"ltr"}function z0(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:pS(e)}}var vc=z0(),Si=new Set;function Bf(){vc=z0();for(const e of Si)e(vc)}function mS(){const[e,t]=T(vc),n=ne(()=>e());return An(()=>{Si.size===0&&window.addEventListener("languagechange",Bf),Si.add(t),ue(()=>{Si.delete(t),Si.size===0&&window.removeEventListener("languagechange",Bf)})}),{locale:()=>n().locale,direction:()=>n().direction}}var bS=mt();function pr(){const e=mS();return gt(bS)||e}var vu=new Map;function U0(e){const{locale:t}=pr(),n=ne(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return ne(()=>{const r=n();let o;return vu.has(r)&&(o=vu.get(r)),o||(o=new Intl.Collator(t(),e),vu.set(r,o)),o})}var nr=class K0 extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof K0?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function yS(e){const[t,n]=ui(e);return[()=>t()??new nr,n]}function j0(e){return bC()?e.altKey:e.ctrlKey}function Uo(e){return ns()?e.metaKey:e.ctrlKey}function zf(e){return new nr(e)}function q0(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function vS(e){const t=Ne({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=T(!1),[o,i]=T(),s=ne(()=>{const m=ee(t.selectedKeys);return m!=null?zf(m):m}),a=ne(()=>{const m=ee(t.defaultSelectedKeys);return m!=null?zf(m):new nr}),[u,l]=yS({value:s,defaultValue:a,onChange:m=>t.onSelectionChange?.(m)}),[c,d]=T(ee(t.selectionBehavior)),g=()=>ee(t.selectionMode),h=()=>ee(t.disallowEmptySelection)??!1,p=m=>{(ee(t.allowDuplicateSelectionEvents)||!q0(m,u()))&&l(m)};return re(()=>{const m=u();ee(t.selectionBehavior)==="replace"&&c()==="toggle"&&typeof m=="object"&&m.size===0&&d("replace")}),re(()=>{d(ee(t.selectionBehavior)??"toggle")}),{selectionMode:g,disallowEmptySelection:h,selectionBehavior:c,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:u,setSelectedKeys:p}}function H0(e){const[t,n]=T(""),[r,o]=T(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(ee(e.isDisabled))return;const a=ee(e.keyboardDelegate),u=ee(e.selectionManager);if(!a.getKeyForSearch)return;const l=wS(s.key);if(!l||s.ctrlKey||s.metaKey)return;l===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let c=n(g=>g+l),d=a.getKeyForSearch(c,u.focusedKey())??a.getKeyForSearch(c);d==null&&xS(c)&&(c=c[0],d=a.getKeyForSearch(c,u.focusedKey())??a.getKeyForSearch(c)),d!=null&&(u.setFocusedKey(d),e.onTypeSelect?.(d)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function wS(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function xS(e){return e.split("").every(t=>t===e[0])}function G0(e,t,n){const o=G({selectOnFocus:()=>ee(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>n?.()??t(),{direction:s}=pr();let a={top:0,left:0};uC(()=>ee(o.isVirtualized)?void 0:i(),"scroll",()=>{const y=i();y&&(a={top:y.scrollTop,left:y.scrollLeft})});const{typeSelectHandlers:u}=H0({isDisabled:()=>ee(o.disallowTypeAhead),keyboardDelegate:()=>ee(o.keyboardDelegate),selectionManager:()=>ee(o.selectionManager)}),l=()=>ee(o.orientation)??"vertical",c=y=>{Me(y,u.onKeyDown),y.altKey&&y.key==="Tab"&&y.preventDefault();const v=t();if(!v?.contains(y.target))return;const b=ee(o.selectionManager),w=ee(o.selectOnFocus),E=S=>{S!=null&&(b.setFocusedKey(S),y.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(S):w&&!j0(y)&&b.replaceSelection(S))},C=ee(o.keyboardDelegate),A=ee(o.shouldFocusWrap),I=b.focusedKey();switch(y.key){case(l()==="vertical"?"ArrowDown":"ArrowRight"):{if(C.getKeyBelow){y.preventDefault();let S;I!=null?S=C.getKeyBelow(I):S=C.getFirstKey?.(),S==null&&A&&(S=C.getFirstKey?.(I)),E(S)}break}case(l()==="vertical"?"ArrowUp":"ArrowLeft"):{if(C.getKeyAbove){y.preventDefault();let S;I!=null?S=C.getKeyAbove(I):S=C.getLastKey?.(),S==null&&A&&(S=C.getLastKey?.(I)),E(S)}break}case(l()==="vertical"?"ArrowLeft":"ArrowUp"):{if(C.getKeyLeftOf){y.preventDefault();const S=s()==="rtl";let k;I!=null?k=C.getKeyLeftOf(I):k=S?C.getFirstKey?.():C.getLastKey?.(),E(k)}break}case(l()==="vertical"?"ArrowRight":"ArrowDown"):{if(C.getKeyRightOf){y.preventDefault();const S=s()==="rtl";let k;I!=null?k=C.getKeyRightOf(I):k=S?C.getLastKey?.():C.getFirstKey?.(),E(k)}break}case"Home":if(C.getFirstKey){y.preventDefault();const S=C.getFirstKey(I,Uo(y));S!=null&&(b.setFocusedKey(S),Uo(y)&&y.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(S):w&&b.replaceSelection(S))}break;case"End":if(C.getLastKey){y.preventDefault();const S=C.getLastKey(I,Uo(y));S!=null&&(b.setFocusedKey(S),Uo(y)&&y.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(S):w&&b.replaceSelection(S))}break;case"PageDown":if(C.getKeyPageBelow&&I!=null){y.preventDefault();const S=C.getKeyPageBelow(I);E(S)}break;case"PageUp":if(C.getKeyPageAbove&&I!=null){y.preventDefault();const S=C.getKeyPageAbove(I);E(S)}break;case"a":Uo(y)&&b.selectionMode()==="multiple"&&ee(o.disallowSelectAll)!==!0&&(y.preventDefault(),b.selectAll());break;case"Escape":y.defaultPrevented||(y.preventDefault(),ee(o.disallowEmptySelection)||b.clearSelection());break;case"Tab":if(!ee(o.allowsTabNavigation)){if(y.shiftKey)v.focus();else{const S=w0(v,{tabbable:!0});let k,P;do P=S.lastChild(),P&&(k=P);while(P);k&&!k.contains(document.activeElement)&&It(k)}break}}},d=y=>{const v=ee(o.selectionManager),b=ee(o.keyboardDelegate),w=ee(o.selectOnFocus);if(v.isFocused()){y.currentTarget.contains(y.target)||v.setFocused(!1);return}if(y.currentTarget.contains(y.target)){if(v.setFocused(!0),v.focusedKey()==null){const E=A=>{A!=null&&(v.setFocusedKey(A),w&&v.replaceSelection(A))},C=y.relatedTarget;C&&y.currentTarget.compareDocumentPosition(C)&Node.DOCUMENT_POSITION_FOLLOWING?E(v.lastSelectedKey()??b.getLastKey?.()):E(v.firstSelectedKey()??b.getFirstKey?.())}else if(!ee(o.isVirtualized)){const E=i();if(E){E.scrollTop=a.top,E.scrollLeft=a.left;const C=E.querySelector(`[data-key="${v.focusedKey()}"]`);C&&(It(C),mc(E,C))}}}},g=y=>{const v=ee(o.selectionManager);y.currentTarget.contains(y.relatedTarget)||v.setFocused(!1)},h=y=>{i()===y.target&&y.preventDefault()},p=()=>{const y=ee(o.autoFocus);if(!y)return;const v=ee(o.selectionManager),b=ee(o.keyboardDelegate);let w;y==="first"&&(w=b.getFirstKey?.()),y==="last"&&(w=b.getLastKey?.());const E=v.selectedKeys();E.size&&(w=E.values().next().value),v.setFocused(!0),v.setFocusedKey(w);const C=t();C&&w==null&&!ee(o.shouldUseVirtualFocus)&&It(C)};return An(()=>{o.deferAutoFocus?setTimeout(p,0):p()}),re(pt([i,()=>ee(o.isVirtualized),()=>ee(o.selectionManager).focusedKey()],y=>{const[v,b,w]=y;if(b)w&&o.scrollToKey?.(w);else if(w&&v){const E=v.querySelector(`[data-key="${w}"]`);E&&mc(v,E)}})),{tabIndex:ne(()=>{if(!ee(o.shouldUseVirtualFocus))return ee(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:c,onMouseDown:h,onFocusIn:d,onFocusOut:g}}function Pa(e,t){const n=()=>ee(e.selectionManager),r=()=>ee(e.key),o=()=>ee(e.shouldUseVirtualFocus),i=b=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):b?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Uo(b)||"pointerType"in b&&b.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>ee(e.disabled)||n().isDisabled(r()),u=()=>!a()&&n().canSelectItem(r());let l=null;const c=b=>{u()&&(l=b.pointerType,b.pointerType==="mouse"&&b.button===0&&!ee(e.shouldSelectOnPressUp)&&i(b))},d=b=>{u()&&b.pointerType==="mouse"&&b.button===0&&ee(e.shouldSelectOnPressUp)&&ee(e.allowsDifferentPressOrigin)&&i(b)},g=b=>{u()&&(ee(e.shouldSelectOnPressUp)&&!ee(e.allowsDifferentPressOrigin)||l!=="mouse")&&i(b)},h=b=>{!u()||!["Enter"," "].includes(b.key)||(j0(b)?n().toggleSelection(r()):i(b))},p=b=>{a()&&b.preventDefault()},m=b=>{const w=t();o()||a()||!w||b.target===w&&n().setFocusedKey(r())},y=ne(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),v=ne(()=>ee(e.virtualized)?void 0:r());return re(pt([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([b,w,E,C,A])=>{b&&w===C&&A&&!E&&document.activeElement!==b&&(e.focus?e.focus():It(b))})),{isSelected:s,isDisabled:a,allowsSelection:u,tabIndex:y,dataKey:v,onPointerDown:c,onPointerUp:d,onClick:g,onKeyDown:h,onMouseDown:p,onFocus:m}}var _S=class{collection;state;constructor(e,t){this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index<e.index;(!e||r)&&(e=n)}return e?.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index>e.index;(!e||r)&&(e=n)}return e?.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,o=new nr(n,r,t);for(const i of this.getKeyRange(r,n.currentKey||t))o.delete(i);for(const i of this.getKeyRange(t,r))this.canSelectItem(i)&&o.add(i);this.state.setSelectedKeys(o)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const o=this.collection().getItem(r);if(o&&o.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new nr(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new nr([t],t,t):new nr;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new nr;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new nr)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},Uf=class{keyMap=new Map;iterable;firstKey;lastKey;constructor(e){this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,o]of this.keyMap)t?(t.nextKey=r,o.prevKey=t.key):(this.firstKey=r,o.prevKey=void 0),o.type==="item"&&(o.index=n++),t=o,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey}getKeyAfter(e){return this.keyMap.get(e)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function $a(e){const t=vS(e),r=dS({dataSource:()=>ee(e.dataSource),getKey:()=>ee(e.getKey),getTextValue:()=>ee(e.getTextValue),getDisabled:()=>ee(e.getDisabled),getSectionChildren:()=>ee(e.getSectionChildren),factory:i=>e.filter?new Uf(e.filter(i)):new Uf(i)},[()=>e.filter]),o=new _S(r,t);return nc(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var V0=mt();function W0(){return gt(V0)}function ES(){const e=W0();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function Y0(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function CS(e,t){const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=e[r]?.ref();if(o&&Y0(o,n))return r+1}return 0}function SS(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[i,s])=>{const a=o.ref(),u=s.ref();return a===u||!a||!u?0:Y0(a,u)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function Z0(e,t){const n=SS(e);e!==n&&t(n)}function kS(e){const t=e[0],n=e[e.length-1]?.ref();let r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return fn(r).body}function AS(e,t){re(()=>{const n=setTimeout(()=>{Z0(e(),t)});ue(()=>clearTimeout(n))})}function TS(e,t){if(typeof IntersectionObserver!="function"){AS(e,t);return}let n=[];re(()=>{const r=()=>{const s=!!n.length;n=e(),s&&Z0(e(),t)},o=kS(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}ue(()=>i.disconnect())})}function X0(e={}){const[t,n]=lS({value:()=>ee(e.items),onChange:i=>e.onItemsChange?.(i)});TS(t,n);const r=i=>(n(s=>{const a=CS(s,i);return fC(s,i,a)}),()=>{n(s=>{const a=s.filter(u=>u.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>f(V0.Provider,{value:{registerItem:r},get children(){return i.children}})}}function J0(e){const t=ES(),n=Ne({shouldRegisterItem:!0},e);re(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());ue(r)})}const IS=["top","right","bottom","left"],Yr=Math.min,xn=Math.max,la=Math.round,Ts=Math.floor,lr=e=>({x:e,y:e}),DS={left:"right",right:"left",bottom:"top",top:"bottom"};function wc(e,t,n){return xn(e,Yr(t,n))}function Eo(e,t){return typeof e=="function"?e(t):e}function Zr(e){return e.split("-")[0]}function li(e){return e.split("-")[1]}function Q0(e){return e==="x"?"y":"x"}function nd(e){return e==="y"?"height":"width"}function Tr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function rd(e){return Q0(Tr(e))}function RS(e,t,n){n===void 0&&(n=!1);const r=li(e),o=rd(e),i=nd(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ca(s)),[s,ca(s)]}function OS(e){const t=ca(e);return[xc(e),t,xc(t)]}function xc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Kf=["left","right"],jf=["right","left"],NS=["top","bottom"],MS=["bottom","top"];function PS(e,t,n){switch(e){case"top":case"bottom":return n?t?jf:Kf:t?Kf:jf;case"left":case"right":return t?NS:MS;default:return[]}}function $S(e,t,n,r){const o=li(e);let i=PS(Zr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(xc)))),i}function ca(e){const t=Zr(e);return DS[t]+e.slice(t.length)}function LS(e){return{top:0,right:0,bottom:0,left:0,...e}}function eb(e){return typeof e!="number"?LS(e):{top:e,right:e,bottom:e,left:e}}function da(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function qf(e,t,n){let{reference:r,floating:o}=e;const i=Tr(t),s=rd(t),a=nd(s),u=Zr(t),l=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let h;switch(u){case"top":h={x:c,y:r.y-o.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(li(t)){case"start":h[s]-=g*(n&&l?-1:1);break;case"end":h[s]+=g*(n&&l?-1:1);break}return h}async function FS(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:g=!1,padding:h=0}=Eo(t,e),p=eb(h),y=a[g?d==="floating"?"reference":"floating":d],v=da(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:c,strategy:u})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),E=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},C=da(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:w,strategy:u}):b);return{top:(v.top-C.top+p.top)/E.y,bottom:(C.bottom-v.bottom+p.bottom)/E.y,left:(v.left-C.left+p.left)/E.x,right:(C.right-v.right+p.right)/E.x}}const BS=50,zS=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:FS},u=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=qf(l,r,u),g=r,h=0;const p={};for(let m=0;m<i.length;m++){const y=i[m];if(!y)continue;const{name:v,fn:b}=y,{x:w,y:E,data:C,reset:A}=await b({x:c,y:d,initialPlacement:r,placement:g,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});c=w??c,d=E??d,p[v]={...p[v],...C},A&&h<BS&&(h++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(l=A.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:c,y:d}=qf(l,g,u)),m=-1)}return{x:c,y:d,placement:g,strategy:o,middlewareData:p}},US=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:u}=t,{element:l,padding:c=0}=Eo(e,t)||{};if(l==null)return{};const d=eb(c),g={x:n,y:r},h=rd(o),p=nd(h),m=await s.getDimensions(l),y=h==="y",v=y?"top":"left",b=y?"bottom":"right",w=y?"clientHeight":"clientWidth",E=i.reference[p]+i.reference[h]-g[h]-i.floating[p],C=g[h]-i.reference[h],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let I=A?A[w]:0;(!I||!await(s.isElement==null?void 0:s.isElement(A)))&&(I=a.floating[w]||i.floating[p]);const S=E/2-C/2,k=I/2-m[p]/2-1,P=Yr(d[v],k),R=Yr(d[b],k),L=P,F=I-m[p]-R,D=I/2-m[p]/2+S,B=wc(L,D,F),N=!u.arrow&&li(o)!=null&&D!==B&&i.reference[p]/2-(D<L?P:R)-m[p]/2<0,X=N?D<L?D-L:D-F:0;return{[h]:g[h]+X,data:{[h]:B,centerOffset:D-B-X,...N&&{alignmentOffset:X}},reset:N}}}),KS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=Eo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Zr(o),b=Tr(a),w=Zr(a)===a,E=await(u.isRTL==null?void 0:u.isRTL(l.floating)),C=g||(w||!m?[ca(a)]:OS(a)),A=p!=="none";!g&&A&&C.push(...$S(a,m,p,E));const I=[a,...C],S=await u.detectOverflow(t,y),k=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&k.push(S[v]),d){const D=RS(o,s,E);k.push(S[D[0]],S[D[1]])}if(P=[...P,{placement:o,overflows:k}],!k.every(D=>D<=0)){var R,L;const D=(((R=i.flip)==null?void 0:R.index)||0)+1,B=I[D];if(B&&(!(d==="alignment"?b!==Tr(B):!1)||P.every(se=>Tr(se.placement)===b?se.overflows[0]>0:!0)))return{data:{index:D,overflows:P},reset:{placement:B}};let N=(L=P.filter(X=>X.overflows[0]<=0).sort((X,se)=>X.overflows[1]-se.overflows[1])[0])==null?void 0:L.placement;if(!N)switch(h){case"bestFit":{var F;const X=(F=P.filter(se=>{if(A){const K=Tr(se.placement);return K===b||K==="y"}return!0}).map(se=>[se.placement,se.overflows.filter(K=>K>0).reduce((K,U)=>K+U,0)]).sort((se,K)=>se[1]-K[1])[0])==null?void 0:F[0];X&&(N=X);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function Hf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Gf(e){return IS.some(t=>e[t]>=0)}const jS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Eo(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=Hf(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Gf(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=Hf(s,n.floating);return{data:{escapedOffsets:a,escaped:Gf(a)}}}default:return{}}}}},qS=new Set(["left","top"]);async function HS(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Zr(n),a=li(n),u=Tr(n)==="y",l=qS.has(s)?-1:1,c=i&&u?-1:1,d=Eo(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),u?{x:h*c,y:g*l}:{x:g*l,y:h*c}}const GS=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await HS(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},VS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:v=>{let{x:b,y:w}=v;return{x:b,y:w}}},...l}=Eo(e,t),c={x:n,y:r},d=await i.detectOverflow(t,l),g=Tr(Zr(o)),h=Q0(g);let p=c[h],m=c[g];if(s){const v=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=p+d[v],E=p-d[b];p=wc(w,p,E)}if(a){const v=g==="y"?"top":"left",b=g==="y"?"bottom":"right",w=m+d[v],E=m-d[b];m=wc(w,m,E)}const y=u.fn({...t,[h]:p,[g]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:s,[g]:a}}}}}},WS=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:u=()=>{},...l}=Eo(e,t),c=await s.detectOverflow(t,l),d=Zr(o),g=li(o),h=Tr(o)==="y",{width:p,height:m}=i.floating;let y,v;d==="top"||d==="bottom"?(y=d,v=g===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,y=g==="end"?"top":"bottom");const b=m-c.top-c.bottom,w=p-c.left-c.right,E=Yr(m-c[y],b),C=Yr(p-c[v],w),A=!t.middlewareData.shift;let I=E,S=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=b),A&&!g){const P=xn(c.left,0),R=xn(c.right,0),L=xn(c.top,0),F=xn(c.bottom,0);h?S=p-2*(P!==0||R!==0?P+R:xn(c.left,c.right)):I=m-2*(L!==0||F!==0?L+F:xn(c.top,c.bottom))}await u({...t,availableWidth:S,availableHeight:I});const k=await s.getDimensions(a.floating);return p!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function La(){return typeof window<"u"}function ci(e){return tb(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mr(e){var t;return(t=(tb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tb(e){return La()?e instanceof Node||e instanceof kn(e).Node:!1}function Vn(e){return La()?e instanceof Element||e instanceof kn(e).Element:!1}function Nr(e){return La()?e instanceof HTMLElement||e instanceof kn(e).HTMLElement:!1}function Vf(e){return!La()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function is(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Wn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function YS(e){return/^(table|td|th)$/.test(ci(e))}function Fa(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ZS=/transform|translate|scale|rotate|perspective|filter/,XS=/paint|layout|strict|content/,uo=e=>!!e&&e!=="none";let wu;function od(e){const t=Vn(e)?Wn(e):e;return uo(t.transform)||uo(t.translate)||uo(t.scale)||uo(t.rotate)||uo(t.perspective)||!id()&&(uo(t.backdropFilter)||uo(t.filter))||ZS.test(t.willChange||"")||XS.test(t.contain||"")}function JS(e){let t=Xr(e);for(;Nr(t)&&!Xo(t);){if(od(t))return t;if(Fa(t))return null;t=Xr(t)}return null}function id(){return wu==null&&(wu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wu}function Xo(e){return/^(html|body|#document)$/.test(ci(e))}function Wn(e){return kn(e).getComputedStyle(e)}function Ba(e){return Vn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xr(e){if(ci(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vf(e)&&e.host||mr(e);return Vf(t)?t.host:t}function nb(e){const t=Xr(e);return Xo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nr(t)&&is(t)?t:nb(t)}function ji(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=nb(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=kn(o);if(i){const a=_c(s);return t.concat(s,s.visualViewport||[],is(o)?o:[],a&&n?ji(a):[])}else return t.concat(o,ji(o,[],n))}function _c(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rb(e){const t=Wn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Nr(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=la(n)!==i||la(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function sd(e){return Vn(e)?e:e.contextElement}function Go(e){const t=sd(e);if(!Nr(t))return lr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=rb(t);let s=(i?la(n.width):n.width)/r,a=(i?la(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const QS=lr(0);function ob(e){const t=kn(e);return!id()||!t.visualViewport?QS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ek(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function vo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=sd(e);let s=lr(1);t&&(r?Vn(r)&&(s=Go(r)):s=Go(e));const a=ek(i,n,r)?ob(i):lr(0);let u=(o.left+a.x)/s.x,l=(o.top+a.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){const g=kn(i),h=r&&Vn(r)?kn(r):r;let p=g,m=_c(p);for(;m&&r&&h!==p;){const y=Go(m),v=m.getBoundingClientRect(),b=Wn(m),w=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,E=v.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;u*=y.x,l*=y.y,c*=y.x,d*=y.y,u+=w,l+=E,p=kn(m),m=_c(p)}}return da({width:c,height:d,x:u,y:l})}function za(e,t){const n=Ba(e).scrollLeft;return t?t.left+n:vo(mr(e)).left+n}function ib(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-za(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function tk(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=mr(r),a=t?Fa(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},l=lr(1);const c=lr(0),d=Nr(r);if((d||!d&&!i)&&((ci(r)!=="body"||is(s))&&(u=Ba(r)),d)){const h=vo(r);l=Go(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}const g=s&&!d&&!i?ib(s,u):lr(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x+g.x,y:n.y*l.y-u.scrollTop*l.y+c.y+g.y}}function nk(e){return Array.from(e.getClientRects())}function rk(e){const t=mr(e),n=Ba(e),r=e.ownerDocument.body,o=xn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=xn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+za(e);const a=-n.scrollTop;return Wn(r).direction==="rtl"&&(s+=xn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Wf=25;function ok(e,t){const n=kn(e),r=mr(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const c=id();(!c||c&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const l=za(r);if(l<=0){const c=r.ownerDocument,d=c.body,g=getComputedStyle(d),h=c.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,p=Math.abs(r.clientWidth-d.clientWidth-h);p<=Wf&&(i-=p)}else l<=Wf&&(i+=l);return{width:i,height:s,x:a,y:u}}function ik(e,t){const n=vo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Nr(e)?Go(e):lr(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,u=o*i.x,l=r*i.y;return{width:s,height:a,x:u,y:l}}function Yf(e,t,n){let r;if(t==="viewport")r=ok(e,n);else if(t==="document")r=rk(mr(e));else if(Vn(t))r=ik(t,n);else{const o=ob(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return da(r)}function sb(e,t){const n=Xr(e);return n===t||!Vn(n)||Xo(n)?!1:Wn(n).position==="fixed"||sb(n,t)}function sk(e,t){const n=t.get(e);if(n)return n;let r=ji(e,[],!1).filter(a=>Vn(a)&&ci(a)!=="body"),o=null;const i=Wn(e).position==="fixed";let s=i?Xr(e):e;for(;Vn(s)&&!Xo(s);){const a=Wn(s),u=od(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||is(s)&&!u&&sb(e,s))?r=r.filter(c=>c!==s):o=a,s=Xr(s)}return t.set(e,r),r}function ak(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Fa(t)?[]:sk(t,this._c):[].concat(n),r],a=Yf(t,s[0],o);let u=a.top,l=a.right,c=a.bottom,d=a.left;for(let g=1;g<s.length;g++){const h=Yf(t,s[g],o);u=xn(h.top,u),l=Yr(h.right,l),c=Yr(h.bottom,c),d=xn(h.left,d)}return{width:l-d,height:c-u,x:d,y:u}}function uk(e){const{width:t,height:n}=rb(e);return{width:t,height:n}}function lk(e,t,n){const r=Nr(t),o=mr(t),i=n==="fixed",s=vo(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=lr(0);function l(){u.x=za(o)}if(r||!r&&!i)if((ci(t)!=="body"||is(o))&&(a=Ba(t)),r){const h=vo(t,!0,i,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else o&&l();i&&!r&&o&&l();const c=o&&!r&&!i?ib(o,a):lr(0),d=s.left+a.scrollLeft-u.x-c.x,g=s.top+a.scrollTop-u.y-c.y;return{x:d,y:g,width:s.width,height:s.height}}function xu(e){return Wn(e).position==="static"}function Zf(e,t){if(!Nr(e)||Wn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return mr(e)===n&&(n=n.ownerDocument.body),n}function ab(e,t){const n=kn(e);if(Fa(e))return n;if(!Nr(e)){let o=Xr(e);for(;o&&!Xo(o);){if(Vn(o)&&!xu(o))return o;o=Xr(o)}return n}let r=Zf(e,t);for(;r&&YS(r)&&xu(r);)r=Zf(r,t);return r&&Xo(r)&&xu(r)&&!od(r)?n:r||JS(e)||n}const ck=async function(e){const t=this.getOffsetParent||ab,n=this.getDimensions,r=await n(e.floating);return{reference:lk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dk(e){return Wn(e).direction==="rtl"}const ub={convertOffsetParentRelativeRectToViewportRelativeRect:tk,getDocumentElement:mr,getClippingRect:ak,getOffsetParent:ab,getElementRects:ck,getClientRects:nk,getDimensions:uk,getScale:Go,isElement:Vn,isRTL:dk};function lb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fk(e,t){let n=null,r;const o=mr(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const l=e.getBoundingClientRect(),{left:c,top:d,width:g,height:h}=l;if(a||t(),!g||!h)return;const p=Ts(d),m=Ts(o.clientWidth-(c+g)),y=Ts(o.clientHeight-(d+h)),v=Ts(c),w={rootMargin:-p+"px "+-m+"px "+-y+"px "+-v+"px",threshold:xn(0,Yr(1,u))||1};let E=!0;function C(A){const I=A[0].intersectionRatio;if(I!==u){if(!E)return s();I?s(!1,I):r=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!lb(l,e.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return s(!0),i}function gk(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=sd(e),c=o||i?[...l?ji(l):[],...t?ji(t):[]]:[];c.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=l&&a?fk(l,n):null;let g=-1,h=null;s&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===l&&h&&t&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),l&&!u&&h.observe(l),t&&h.observe(t));let p,m=u?vo(e):null;u&&y();function y(){const v=vo(e);m&&!lb(m,v)&&n(),m=v,p=requestAnimationFrame(y)}return n(),()=>{var v;c.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(v=h)==null||v.disconnect(),h=null,u&&cancelAnimationFrame(p)}}const hk=GS,pk=VS,mk=KS,bk=WS,yk=jS,vk=US,wk=(e,t,n)=>{const r=new Map,o={platform:ub,...n},i={...o.platform,_c:r};return zS(e,t,{...o,platform:i})};var xk=$('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),ad=mt();function ud(){const e=gt(ad);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var Ec=30,Xf=Ec/2,_k={top:180,right:-90,bottom:0,left:90};function Mr(e){const t=ud(),n=Ne({size:Ec},e),[r,o]=de(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=Ek(t.contentRef),a=()=>s()?.getPropertyValue("background-color")||"none",u=()=>s()?.getPropertyValue(`border-${i()}-color`)||"none",l=()=>s()?.getPropertyValue(`border-${i()}-width`)||"0px",c=()=>Number.parseInt(l())*2*(Ec/r.size),d=()=>`rotate(${_k[i()]} ${Xf} ${Xf}) translate(0 2)`;return f(Fe,G({as:"div",ref(g){var h=it(t.setArrowRef,r.ref);typeof h=="function"&&h(g)},"aria-hidden":"true",get style(){return bn({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:u(),"stroke-width":c()},r.style)}},o,{get children(){var g=xk(),h=g.firstChild,p=h.firstChild;return p.nextSibling,$e(()=>Ke(h,"transform",d())),g}}))}function Ek(e){const[t,n]=T();return re(()=>{const r=e();r&&n(Yc(r).getComputedStyle(r))}),t}function Ck(e){const t=ud(),[n,r]=de(e,["ref","style"]);return f(Fe,G({as:"div",ref(o){var i=it(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return bn({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function Jf(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function Sk(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?Jf(r):e?e.getBoundingClientRect():Jf()}}}function kk(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var Ak={top:"bottom",right:"left",bottom:"top",left:"right"};function Tk(e,t){const[n,r]=e.split("-"),o=Ak[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function Ik(e){const t=Ne({getAnchorRect:g=>g?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=T(),[o,i]=T(),[s,a]=T(t.placement),u=()=>Sk(t.anchorRef?.(),t.getAnchorRect),{direction:l}=pr();async function c(){const g=u(),h=n(),p=o();if(!g||!h)return;const m=(p?.clientHeight||0)/2,y=typeof t.gutter=="number"?t.gutter+m:t.gutter??m;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),g.getBoundingClientRect();const v=[hk(({placement:A})=>{const I=!!A.split("-")[1];return{mainAxis:y,crossAxis:I?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const A=typeof t.flip=="string"?t.flip.split(" "):void 0;if(A!==void 0&&!A.every(kk))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(mk({padding:t.overflowPadding,fallbackPlacements:A}))}(t.slide||t.overlap)&&v.push(pk({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(bk({padding:t.overflowPadding,apply({availableWidth:A,availableHeight:I,rects:S}){const k=Math.round(S.reference.width);A=Math.floor(A),I=Math.floor(I),h.style.setProperty("--kb-popper-anchor-width",`${k}px`),h.style.setProperty("--kb-popper-content-available-width",`${A}px`),h.style.setProperty("--kb-popper-content-available-height",`${I}px`),t.sameWidth&&(h.style.width=`${k}px`),t.fitViewport&&(h.style.maxWidth=`${A}px`,h.style.maxHeight=`${I}px`)}})),t.hideWhenDetached&&v.push(yk({padding:t.detachedPadding})),p&&v.push(vk({element:p,padding:t.arrowPadding}));const b=await wk(g,h,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...ub,isRTL:()=>l()==="rtl"}});if(a(b.placement),t.onCurrentPlacementChange?.(b.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",Tk(b.placement,l()));const w=Math.round(b.x),E=Math.round(b.y);let C;if(t.hideWhenDetached&&(C=b.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${w}px, ${E}px, 0)`,visibility:C}),p&&b.middlewareData.arrow){const{x:A,y:I}=b.middlewareData.arrow,S=b.placement.split("-")[0];Object.assign(p.style,{left:A!=null?`${A}px`:"",top:I!=null?`${I}px`:"",[S]:"100%"})}}re(()=>{const g=u(),h=n();if(!g||!h)return;const p=gk(g,h,c,{elementResize:typeof ResizeObserver=="function"});ue(p)}),re(()=>{const g=n(),h=t.contentRef?.();!g||!h||queueMicrotask(()=>{g.style.zIndex=getComputedStyle(h).zIndex})});const d={currentPlacement:s,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:i};return f(ad.Provider,{value:d,get children(){return t.children}})}var to=Object.assign(Ik,{Arrow:Mr,Context:ad,usePopperContext:ud,Positioner:Ck});function Dk(e){const t=n=>{n.key===Oa.Escape&&e.onEscapeKeyDown?.(n)};re(()=>{if(ee(e.isDisabled))return;const n=e.ownerDocument?.()??fn();n.addEventListener("keydown",t),ue(()=>{n.removeEventListener("keydown",t)})})}var Qf="interactOutside.pointerDownOutside",eg="interactOutside.focusOutside";function Rk(e,t){let n,r=IC;const o=()=>fn(t()),i=d=>e.onPointerDownOutside?.(d),s=d=>e.onFocusOutside?.(d),a=d=>e.onInteractOutside?.(d),u=d=>{const g=d.target;return!(g instanceof Element)||g.closest(`[${zi}]`)||!Ht(o(),g)||Ht(t(),g)?!1:!e.shouldExcludeElement?.(g)},l=d=>{function g(){const h=t(),p=d.target;if(!h||!p||!u(d))return;const m=ot([i,a]);p.addEventListener(Qf,m,{once:!0});const y=new CustomEvent(Qf,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||vC(d)&&d.button===0}});p.dispatchEvent(y)}d.pointerType==="touch"?(o().removeEventListener("click",g),r=g,o().addEventListener("click",g,{once:!0})):g()},c=d=>{const g=t(),h=d.target;if(!g||!h||!u(d))return;const p=ot([s,a]);h.addEventListener(eg,p,{once:!0});const m=new CustomEvent(eg,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(m)};re(()=>{ee(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",l,!0)},0),o().addEventListener("focusin",c,!0),ue(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",l,!0),o().removeEventListener("focusin",c,!0)}))})}var cb=mt();function Ok(){return gt(cb)}function ss(e){let t;const n=Ok(),[r,o]=de(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=d=>{i.add(d);const g=n?.registerNestedLayer(d);return()=>{i.delete(d),g?.()}};Rk({shouldExcludeElement:d=>t?r.excludedElements?.some(g=>Ht(g(),d))||[...i].some(g=>Ht(g,d)):!1,onPointerDownOutside:d=>{!t||wn.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!wn.isTopMostLayer(t)||(r.onPointerDownOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.())},onFocusOutside:d=>{r.onFocusOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.()}},()=>t),Dk({ownerDocument:()=>fn(t),onEscapeKeyDown:d=>{!t||!wn.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),An(()=>{if(!t)return;wn.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);wn.assignPointerEventToLayers(),wn.disableBodyPointerEvents(t),ue(()=>{t&&(wn.removeLayer(t),d?.(),wn.assignPointerEventToLayers(),wn.restoreBodyPointerEvents(t))})}),re(pt([()=>t,()=>r.disableOutsidePointerEvents],([d,g])=>{if(!d)return;const h=wn.find(d);h&&h.isPointerBlocking!==g&&(h.isPointerBlocking=g,wn.assignPointerEventToLayers()),g&&wn.disableBodyPointerEvents(d),ue(()=>{wn.restoreBodyPointerEvents(d)})},{defer:!0}));const c={registerNestedLayer:s};return f(cb.Provider,{value:c,get children(){return f(Fe,G({as:"div",ref(d){var g=it(h=>t=h,r.ref);typeof g=="function"&&g(d)}},o))}})}function Co(e={}){const[t,n]=L0({value:()=>ee(e.open),defaultValue:()=>!!ee(e.defaultOpen),onChange:s=>e.onOpenChange?.(s)}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}var Nk={};Dn(Nk,{Arrow:()=>Mr,Content:()=>fb,Portal:()=>gb,Root:()=>hb,Tooltip:()=>qi,Trigger:()=>pb,useTooltipContext:()=>Ua});var db=mt();function Ua(){const e=gt(db);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function fb(e){const t=Ua(),n=Ne({id:t.generateId("content")},e),[r,o]=de(n,["ref","style"]);return re(()=>ue(t.registerContentId(o.id))),f(j,{get when(){return t.contentPresent()},get children(){return f(to.Positioner,{get children(){return f(ss,G({ref(i){var s=it(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return bn({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:i=>i.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),o))}})}})}function gb(e){const t=Ua();return f(j,{get when(){return t.contentPresent()},get children(){return f(Ji,e)}})}function Mk(e,t,n){const r=e.split("-")[0],o=t.getBoundingClientRect(),i=n.getBoundingClientRect(),s=[],a=o.left+o.width/2,u=o.top+o.height/2;switch(r){case"top":s.push([o.left,u]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([o.right,u]);break;case"right":s.push([a,o.top]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([a,o.bottom]);break;case"bottom":s.push([o.left,u]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([i.right,i.top]),s.push([o.right,u]);break;case"left":s.push([a,o.top]),s.push([i.right,i.top]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([a,o.bottom]);break}return s}var lo={},Pk=0,No=!1,Cr,mi,Mo;function hb(e){const t=`tooltip-${Pt()}`,n=`${++Pk}`,r=Ne({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=de(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount","onCurrentPlacementChange"]);let s;const[a,u]=T(),[l,c]=T(),[d,g]=T(),[h,p]=T(i.placement),m=Co({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:D=>o.onOpenChange?.(D)}),{present:y}=Gn({show:()=>o.forceMount||m.isOpen(),element:()=>d()??null}),v=()=>{lo[n]=w},b=()=>{for(const D in lo)D!==n&&(lo[D](!0),delete lo[D])},w=(D=!1)=>{D||o.closeDelay&&o.closeDelay<=0?(window.clearTimeout(s),s=void 0,m.close()):s||(s=window.setTimeout(()=>{s=void 0,m.close()},o.closeDelay)),window.clearTimeout(Cr),Cr=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(Mo=window.setTimeout(()=>{window.clearTimeout(Mo),Mo=void 0},o.skipDelayDuration)),No&&(window.clearTimeout(mi),mi=window.setTimeout(()=>{delete lo[n],mi=void 0,No=!1},o.closeDelay))},E=()=>{clearTimeout(s),s=void 0,b(),v(),No=!0,m.open(),window.clearTimeout(Cr),Cr=void 0,window.clearTimeout(mi),mi=void 0,window.clearTimeout(Mo),Mo=void 0},C=()=>{b(),v(),!m.isOpen()&&!Cr&&!No?Cr=window.setTimeout(()=>{Cr=void 0,No=!0,E()},o.openDelay):m.isOpen()||E()},A=(D=!1)=>{!D&&o.openDelay&&o.openDelay>0&&!s&&!Mo?C():E()},I=()=>{window.clearTimeout(Cr),Cr=void 0,No=!1},S=()=>{window.clearTimeout(s),s=void 0},k=D=>Ht(l(),D)||Ht(d(),D),P=D=>{const B=l(),N=d();if(!(!B||!N))return Mk(D,B,N)},R=D=>{const B=D.target;if(k(B)){S();return}if(!o.ignoreSafeArea){const N=P(h());if(N&&x0(DC(D),N)){S();return}}s||w()};re(()=>{if(!m.isOpen())return;const D=fn();D.addEventListener("pointermove",R,!0),ue(()=>{D.removeEventListener("pointermove",R,!0)})}),re(()=>{const D=l();if(!D||!m.isOpen())return;const B=X=>{const se=X.target;Ht(se,D)&&w(!0)},N=Yc();N.addEventListener("scroll",B,{capture:!0}),ue(()=>{N.removeEventListener("scroll",B,{capture:!0})})}),ue(()=>{clearTimeout(s),lo[n]&&delete lo[n]});const F={dataset:ne(()=>({"data-expanded":m.isOpen()?"":void 0,"data-closed":m.isOpen()?void 0:""})),isOpen:m.isOpen,isDisabled:()=>o.disabled??!1,triggerOnFocusOnly:()=>o.triggerOnFocusOnly??!1,contentId:a,contentPresent:y,openTooltip:A,hideTooltip:w,cancelOpening:I,generateId:gn(()=>r.id),registerContentId:xt(u),isTargetOnTooltip:k,setTriggerRef:c,setContentRef:g};return f(db.Provider,{value:F,get children(){return f(to,G({anchorRef:l,contentRef:d,onCurrentPlacementChange:D=>{p(D),o.onCurrentPlacementChange?.(D)}},i))}})}function pb(e){let t;const n=Ua(),[r,o]=de(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let i=!1,s=!1,a=!1;const u=()=>{i=!1},l=()=>{!n.isOpen()&&(s||a)&&n.openTooltip(a)},c=v=>{n.isOpen()&&!s&&!a&&n.hideTooltip(v)},d=v=>{Me(v,r.onPointerEnter),!(v.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||v.defaultPrevented)&&(s=!0,l())},g=v=>{Me(v,r.onPointerLeave),v.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?c():n.cancelOpening())},h=v=>{Me(v,r.onPointerDown),i=!0,fn(t).addEventListener("pointerup",u,{once:!0})},p=v=>{Me(v,r.onClick),s=!1,a=!1,c(!0)},m=v=>{Me(v,r.onFocus),!(n.isDisabled()||v.defaultPrevented||i)&&(a=!0,l())},y=v=>{Me(v,r.onBlur);const b=v.relatedTarget;n.isTargetOnTooltip(b)||(s=!1,a=!1,c(!0))};return ue(()=>{fn(t).removeEventListener("pointerup",u)}),f(Fe,G({as:"button",ref(v){var b=it(w=>{n.setTriggerRef(w),t=w},r.ref);typeof b=="function"&&b(v)},get"aria-describedby"(){return J(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:g,onPointerDown:h,onClick:p,onFocus:m,onBlur:y},()=>n.dataset(),o))}var qi=Object.assign(hb,{Arrow:Mr,Content:fb,Portal:gb,Trigger:pb}),ld=["id","name","validationState","required","disabled","readOnly"];function cd(e){const t=`form-control-${Pt()}`,n=Ne({id:t},e),[r,o]=T(),[i,s]=T(),[a,u]=T(),[l,c]=T(),d=(m,y,v)=>{const b=v!=null||r()!=null;return[v,r(),b&&y!=null?m:void 0].filter(Boolean).join(" ")||void 0},g=m=>[a(),l(),m].filter(Boolean).join(" ")||void 0,h=ne(()=>({"data-valid":ee(n.validationState)==="valid"?"":void 0,"data-invalid":ee(n.validationState)==="invalid"?"":void 0,"data-required":ee(n.required)?"":void 0,"data-disabled":ee(n.disabled)?"":void 0,"data-readonly":ee(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>ee(n.name)??ee(n.id),dataset:h,validationState:()=>ee(n.validationState),isRequired:()=>ee(n.required),isDisabled:()=>ee(n.disabled),isReadOnly:()=>ee(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:l,getAriaLabelledBy:d,getAriaDescribedBy:g,generateId:gn(()=>ee(n.id)),registerLabel:xt(o),registerField:xt(s),registerDescription:xt(u),registerErrorMessage:xt(c)}}}var Ka=mt();function Bn(){const e=gt(Ka);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function as(e){const t=Bn(),n=Ne({id:t.generateId("description")},e);return re(()=>ue(t.registerDescription(n.id))),f(Fe,G({as:"div"},()=>t.dataset(),n))}var $k=$("<option>"),Lk=$("<div aria-hidden=true><input type=text style=font-size:16px><select tabindex=-1><option>");function Fk(e){let t;const[n,r]=de(e,["ref","onChange","collection","selectionManager","isOpen","isMultiple","isVirtualized","focusTrigger"]),o=Bn(),[i,s]=T(!1),a=u=>{const l=n.collection.getItem(u);return f(j,{get when(){return l?.type==="item"},get children(){var c=$k();return c.value=u,x(c,()=>l?.textValue),$e(()=>c.selected=n.selectionManager.isSelected(u)),c}})};return re(pt(()=>n.selectionManager.selectedKeys(),(u,l)=>{l&&q0(u,l)||(s(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})))},{defer:!0})),(()=>{var u=Lk(),l=u.firstChild,c=l.nextSibling;c.firstChild,l.addEventListener("focus",()=>n.focusTrigger()),c.addEventListener("change",g=>{Me(g,n.onChange),i()||n.selectionManager.setSelectedKeys(new Set([g.target.value])),s(!1)});var d=it(g=>t=g,n.ref);return typeof d=="function"&&Hn(d,c),gr(c,G({get multiple(){return n.isMultiple},get name(){return o.name()},get required(){return o.isRequired()},get disabled(){return o.isDisabled()},get size(){return n.collection.getSize()},get value(){return n.selectionManager.firstSelectedKey()??""}},r),!1,!0),x(c,f(j,{get when(){return n.isVirtualized},get fallback(){return f(at,{get each(){return[...n.collection.getKeys()]},children:a})},get children(){return f(at,{get each(){return[...n.selectionManager.selectedKeys()]},children:a})}}),null),$e(g=>{var h=Na,p=n.selectionManager.isFocused()||n.isOpen?-1:0,m=o.isRequired(),y=o.isDisabled(),v=o.isReadOnly();return g.e=Zo(u,h,g.e),p!==g.t&&Ke(l,"tabindex",g.t=p),m!==g.a&&(l.required=g.a=m),y!==g.o&&(l.disabled=g.o=y),v!==g.i&&(l.readOnly=g.i=v),g},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),u})()}var tg=new WeakMap;function Bk(e){let t=tg.get(e);if(t!=null)return t;t=0;for(const n of e)n.type==="item"&&t++;return tg.set(e,t),t}var mb=class{collection;ref;collator;constructor(e,t,n){this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop>r;)o=this.getKeyAbove(o),n=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop<r;)o=this.getKeyBelow(o),n=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,t){const n=this.collator?.();if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const o=this.collection().getItem(r);if(o){const i=o.textValue.slice(0,e.length);if(o.textValue&&n.compare(i,e)===0)return r}r=this.getKeyBelow(r)}}};function bb(e,t,n){const r=U0({usage:"search",sensitivity:"base"}),o=ne(()=>{const i=ee(e.keyboardDelegate);return i||new mb(e.collection,t,r)});return G0({selectionManager:()=>ee(e.selectionManager),keyboardDelegate:o,autoFocus:()=>ee(e.autoFocus),deferAutoFocus:()=>ee(e.deferAutoFocus),shouldFocusWrap:()=>ee(e.shouldFocusWrap),disallowEmptySelection:()=>ee(e.disallowEmptySelection),selectOnFocus:()=>ee(e.selectOnFocus),disallowTypeAhead:()=>ee(e.disallowTypeAhead),shouldUseVirtualFocus:()=>ee(e.shouldUseVirtualFocus),allowsTabNavigation:()=>ee(e.allowsTabNavigation),isVirtualized:()=>ee(e.isVirtualized),scrollToKey:i=>ee(e.scrollToKey)?.(i),orientation:()=>ee(e.orientation)},t,n)}var zk={};Dn(zk,{Item:()=>ja,ItemDescription:()=>qa,ItemIndicator:()=>Ha,ItemLabel:()=>Ga,Listbox:()=>Uk,Root:()=>fd,Section:()=>Va,useListboxContext:()=>vb});var yb=mt();function vb(){const e=gt(yb);if(e===void 0)throw new Error("[kobalte]: `useListboxContext` must be used within a `Listbox` component");return e}var wb=mt();function dd(){const e=gt(wb);if(e===void 0)throw new Error("[kobalte]: `useListboxItemContext` must be used within a `Listbox.Item` component");return e}function ja(e){let t;const n=vb(),r=`${n.generateId("item")}-${Pt()}`,o=Ne({id:r},e),[i,s]=de(o,["ref","item","aria-label","aria-labelledby","aria-describedby","onPointerMove","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=T(),[l,c]=T(),d=()=>n.listState().selectionManager(),g=()=>d().focusedKey()===i.item.key,h=Pa({key:()=>i.item.key,selectionManager:d,shouldSelectOnPressUp:n.shouldSelectOnPressUp,allowsDifferentPressOrigin:()=>n.shouldSelectOnPressUp()&&n.shouldFocusOnHover(),shouldUseVirtualFocus:n.shouldUseVirtualFocus,disabled:()=>i.item.disabled},()=>t),p=()=>{if(d().selectionMode()!=="none")return h.isSelected()},m=ne(()=>!(ns()&&m0())),y=()=>m()?i["aria-label"]:void 0,v=()=>m()?a():void 0,b=()=>m()?l():void 0,w=()=>{if(!n.isVirtualized())return;const S=n.listState().collection().getItem(i.item.key)?.index;return S!=null?S+1:void 0},E=()=>{if(n.isVirtualized())return Bk(n.listState().collection())},C=S=>{Me(S,i.onPointerMove),S.pointerType==="mouse"&&!h.isDisabled()&&n.shouldFocusOnHover()&&(It(S.currentTarget),d().setFocused(!0),d().setFocusedKey(i.item.key))},A=ne(()=>({"data-disabled":h.isDisabled()?"":void 0,"data-selected":h.isSelected()?"":void 0,"data-highlighted":g()?"":void 0})),I={isSelected:h.isSelected,dataset:A,generateId:gn(()=>s.id),registerLabelId:xt(u),registerDescriptionId:xt(c)};return f(wb.Provider,{value:I,get children(){return f(Fe,G({as:"li",ref(S){var k=it(P=>t=P,i.ref);typeof k=="function"&&k(S)},role:"option",get tabIndex(){return h.tabIndex()},get"aria-disabled"(){return h.isDisabled()},get"aria-selected"(){return p()},get"aria-label"(){return y()},get"aria-labelledby"(){return v()},get"aria-describedby"(){return b()},get"aria-posinset"(){return w()},get"aria-setsize"(){return E()},get"data-key"(){return h.dataKey()},get onPointerDown(){return ot([i.onPointerDown,h.onPointerDown])},get onPointerUp(){return ot([i.onPointerUp,h.onPointerUp])},get onClick(){return ot([i.onClick,h.onClick])},get onKeyDown(){return ot([i.onKeyDown,h.onKeyDown])},get onMouseDown(){return ot([i.onMouseDown,h.onMouseDown])},get onFocus(){return ot([i.onFocus,h.onFocus])},onPointerMove:C},A,s))}})}function qa(e){const t=dd(),n=Ne({id:t.generateId("description")},e);return re(()=>ue(t.registerDescriptionId(n.id))),f(Fe,G({as:"div"},()=>t.dataset(),n))}function Ha(e){const t=dd(),n=Ne({id:t.generateId("indicator")},e),[r,o]=de(n,["forceMount"]);return f(j,{get when(){return r.forceMount||t.isSelected()},get children(){return f(Fe,G({as:"div","aria-hidden":"true"},()=>t.dataset(),o))}})}function Ga(e){const t=dd(),n=Ne({id:t.generateId("label")},e);return re(()=>ue(t.registerLabelId(n.id))),f(Fe,G({as:"div"},()=>t.dataset(),n))}function fd(e){let t;const n=`listbox-${Pt()}`,r=Ne({id:n,selectionMode:"single",virtualized:!1},e),[o,i]=de(r,["ref","children","renderItem","renderSection","value","defaultValue","onChange","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","state","keyboardDelegate","autoFocus","selectionMode","shouldFocusWrap","shouldUseVirtualFocus","shouldSelectOnPressUp","shouldFocusOnHover","allowDuplicateSelectionEvents","disallowEmptySelection","selectionBehavior","selectOnFocus","disallowTypeAhead","allowsTabNavigation","virtualized","scrollToItem","scrollRef","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),s=ne(()=>o.state?o.state:$a({selectedKeys:()=>o.value,defaultSelectedKeys:()=>o.defaultValue,onSelectionChange:o.onChange,allowDuplicateSelectionEvents:()=>ee(o.allowDuplicateSelectionEvents),disallowEmptySelection:()=>ee(o.disallowEmptySelection),selectionBehavior:()=>ee(o.selectionBehavior),selectionMode:()=>ee(o.selectionMode),dataSource:()=>o.options??[],getKey:()=>o.optionValue,getTextValue:()=>o.optionTextValue,getDisabled:()=>o.optionDisabled,getSectionChildren:()=>o.optionGroupChildren})),a=bb({selectionManager:()=>s().selectionManager(),collection:()=>s().collection(),autoFocus:()=>ee(o.autoFocus),shouldFocusWrap:()=>ee(o.shouldFocusWrap),keyboardDelegate:()=>o.keyboardDelegate,disallowEmptySelection:()=>ee(o.disallowEmptySelection),selectOnFocus:()=>ee(o.selectOnFocus),disallowTypeAhead:()=>ee(o.disallowTypeAhead),shouldUseVirtualFocus:()=>ee(o.shouldUseVirtualFocus),allowsTabNavigation:()=>ee(o.allowsTabNavigation),isVirtualized:()=>o.virtualized,scrollToKey:()=>o.scrollToItem},()=>t,()=>o.scrollRef?.()),u={listState:s,generateId:gn(()=>i.id),shouldUseVirtualFocus:()=>r.shouldUseVirtualFocus,shouldSelectOnPressUp:()=>r.shouldSelectOnPressUp,shouldFocusOnHover:()=>r.shouldFocusOnHover,isVirtualized:()=>o.virtualized};return f(yb.Provider,{value:u,get children(){return f(Fe,G({as:"ul",ref(l){var c=it(d=>t=d,o.ref);typeof c=="function"&&c(l)},role:"listbox",get tabIndex(){return a.tabIndex()},get"aria-multiselectable"(){return s().selectionManager().selectionMode()==="multiple"?!0:void 0},get onKeyDown(){return ot([o.onKeyDown,a.onKeyDown])},get onMouseDown(){return ot([o.onMouseDown,a.onMouseDown])},get onFocusIn(){return ot([o.onFocusIn,a.onFocusIn])},get onFocusOut(){return ot([o.onFocusOut,a.onFocusOut])}},i,{get children(){return f(j,{get when(){return!o.virtualized},get fallback(){return o.children?.(s().collection)},get children(){return f(cC,{get each(){return[...s().collection()]},by:"key",children:l=>f(iw,{get children(){return[f(ef,{get when(){return l().type==="section"},get children(){return o.renderSection?.(l())}}),f(ef,{get when(){return l().type==="item"},get children(){return o.renderItem?.(l())}})]}})})}})}}))}})}function Va(e){return f(Fe,G({as:"li",role:"presentation"},e))}var Uk=Object.assign(fd,{Item:ja,ItemDescription:qa,ItemIndicator:Ha,ItemLabel:Ga,Section:Va}),_u="focusScope.autoFocusOnMount",Eu="focusScope.autoFocusOnUnmount",ng={bubbles:!1,cancelable:!0},rg={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=pc(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=pc(this.stack,e),this.active()?.resume()}};function Wa(e,t){const[n,r]=T(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=p=>e.onMountAutoFocus?.(p),a=p=>e.onUnmountAutoFocus?.(p),u=()=>fn(t()),l=()=>{const p=u().createElement("span");return p.setAttribute("data-focus-trap",""),p.tabIndex=0,Object.assign(p.style,Na),p},c=()=>{const p=t();return p?y0(p,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{const p=c();return p.length>0?p[0]:null},g=()=>{const p=c();return p.length>0?p[p.length-1]:null},h=()=>{const p=t();if(!p)return!1;const m=Ci(p);return!m||Ht(p,m)?!1:v0(m)};re(()=>{const p=t();if(!p)return;rg.add(o);const m=Ci(p);if(!Ht(p,m)){const v=new CustomEvent(_u,ng);p.addEventListener(_u,s),p.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{It(d()),Ci(p)===m&&It(p)},0)}ue(()=>{p.removeEventListener(_u,s),setTimeout(()=>{const v=new CustomEvent(Eu,ng);h()&&v.preventDefault(),p.addEventListener(Eu,a),p.dispatchEvent(v),v.defaultPrevented||It(m??u().body),p.removeEventListener(Eu,a),rg.remove(o)},0)})}),re(()=>{const p=t();if(!p||!ee(e.trapFocus)||n())return;const m=v=>{const b=v.target;b?.closest(`[${zi}]`)||(Ht(p,b)?i=b:It(i))},y=v=>{const w=v.relatedTarget??Ci(p);w?.closest(`[${zi}]`)||Ht(p,w)||It(i)};u().addEventListener("focusin",m),u().addEventListener("focusout",y),ue(()=>{u().removeEventListener("focusin",m),u().removeEventListener("focusout",y)})}),re(()=>{const p=t();if(!p||!ee(e.trapFocus)||n())return;const m=l();p.insertAdjacentElement("afterbegin",m);const y=l();p.insertAdjacentElement("beforeend",y);function v(w){const E=d(),C=g();w.relatedTarget===E?It(C):It(E)}m.addEventListener("focusin",v),y.addEventListener("focusin",v);const b=new MutationObserver(w=>{for(const E of w)E.previousSibling===y&&(y.remove(),p.insertAdjacentElement("beforeend",y)),E.nextSibling===m&&(m.remove(),p.insertAdjacentElement("afterbegin",m))});b.observe(p,{childList:!0,subtree:!1}),ue(()=>{m.removeEventListener("focusin",v),y.removeEventListener("focusin",v),m.remove(),y.remove(),b.disconnect()})})}var Kk="data-live-announcer";function Ya(e){re(()=>{ee(e.isDisabled)||ue(jk(ee(e.targets),ee(e.root)))})}var bi=new WeakMap,On=[];function jk(e,t=document.body){const n=new Set(e),r=new Set,o=u=>{for(const g of u.querySelectorAll(`[${Kk}], [${zi}]`))n.add(g);const l=g=>{if(n.has(g)||g.parentElement&&r.has(g.parentElement)&&g.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const h of n)if(g.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:l}),d=l(u);if(d===NodeFilter.FILTER_ACCEPT&&i(u),d!==NodeFilter.FILTER_REJECT){let g=c.nextNode();for(;g!=null;)i(g),g=c.nextNode()}},i=u=>{const l=bi.get(u)??0;u.getAttribute("aria-hidden")==="true"&&l===0||(l===0&&u.setAttribute("aria-hidden","true"),r.add(u),bi.set(u,l+1))};On.length&&On[On.length-1].disconnect(),o(t);const s=new MutationObserver(u=>{for(const l of u)if(!(l.type!=="childList"||l.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(l.target))){for(const c of l.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(const c of l.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&o(c)}});s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return On.push(a),()=>{s.disconnect();for(const u of r){const l=bi.get(u);if(l==null)return;l===1?(u.removeAttribute("aria-hidden"),bi.delete(u)):bi.set(u,l-1)}a===On[On.length-1]?(On.pop(),On.length&&On[On.length-1].observe()):On.splice(On.indexOf(a),1)}}var xb=["id","aria-label","aria-labelledby","aria-describedby"];function _b(e){const t=Bn(),n=Ne({id:t.generateId("field")},e);return re(()=>ue(t.registerField(ee(n.id)))),{fieldProps:{id:()=>ee(n.id),ariaLabel:()=>ee(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(ee(n.id),ee(n["aria-label"]),ee(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(ee(n["aria-describedby"]))}}}function gd(e){let t;const n=Bn(),r=Ne({id:n.generateId("label")},e),[o,i]=de(r,["ref"]),s=Ma(()=>t,()=>"label");return re(()=>ue(n.registerLabel(i.id))),f(Fe,G({as:"label",ref(a){var u=it(l=>t=l,o.ref);typeof u=="function"&&u(a)},get for(){return J(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}function hd(e,t){re(pt(e,n=>{if(n==null)return;const r=qk(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),ue(()=>{r.removeEventListener("reset",t)}))}))}function qk(e){return Hk(e)?e.form:e.closest("form")}function Hk(e){return e.matches("textarea, input, select, button")}function us(e){const t=Bn(),n=Ne({id:t.generateId("error-message")},e),[r,o]=de(n,["forceMount"]),i=()=>t.validationState()==="invalid";return re(()=>{i()&&ue(t.registerErrorMessage(o.id))}),f(j,{get when(){return r.forceMount||i()},get children(){return f(Fe,G({as:"div"},()=>t.dataset(),o))}})}var Cc=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},Is=new Map,Gk=e=>{re(()=>{const t=rn(e.style)??{},n=rn(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=Is.get(e.key);o?o.activeCount++:Is.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);ue(()=>{const i=Is.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}Is.delete(e.key);for(const[s,a]of Object.entries(i.originalStyles))e.element.style[s]=a;for(const s of i.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},og=Gk,Vk=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},Wk=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},Yk=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[u,l,c]=Vk(o,t),d=c-u-r*l;(l!==0||d!==0)&&Wk(o,t)&&(i+=d,s+=l),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[ig,sg]=T([]),Zk=e=>ig().indexOf(e)===ig().length-1,Xk=e=>{const t=G({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Pt();let r=[0,0],o=null,i=null;re(()=>{rn(t.enabled)&&(sg(l=>[...l,n]),ue(()=>{sg(l=>l.filter(c=>c!==n))}))}),re(()=>{if(!rn(t.enabled)||!rn(t.hideScrollbar))return;const{body:l}=document,c=window.innerWidth-l.offsetWidth;if(rn(t.preventScrollbarShift)){const d={overflow:"hidden"},g=[];c>0&&(rn(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(l).paddingRight} + ${c}px)`:d.marginRight=`calc(${window.getComputedStyle(l).marginRight} + ${c}px)`,g.push({key:"--scrollbar-width",value:`${c}px`}));const h=window.scrollY,p=window.scrollX;og({key:"prevent-scroll",element:l,style:d,properties:g,cleanup:()=>{rn(t.restoreScrollPosition)&&c>0&&window.scrollTo(p,h)}})}else og({key:"prevent-scroll",element:l,style:{overflow:"hidden"}})}),re(()=>{!Zk(n)||!rn(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",u,{passive:!1}),ue(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",u)}))});const s=l=>{r=ag(l),o=null,i=null},a=l=>{const c=l.target,d=rn(t.element),g=Jk(l),h=Math.abs(g[0])>Math.abs(g[1])?"x":"y",p=h==="x"?g[0]:g[1],m=ug(c,h,p,d);let y;d&&Cc(d,c)?y=!m:y=!0,y&&l.cancelable&&l.preventDefault()},u=l=>{const c=rn(t.element),d=l.target;let g;if(l.touches.length===2)g=!rn(t.allowPinchZoom);else{if(o==null||i===null){const h=ag(l).map((m,y)=>r[y]-m),p=Math.abs(h[0])>Math.abs(h[1])?"x":"y";o=p,i=p==="x"?h[0]:h[1]}if(d.type==="range")g=!1;else{const h=ug(d,o,i,c);c&&Cc(c,d)?g=!h:g=!0}}g&&l.cancelable&&l.preventDefault()}},Jk=e=>[e.deltaX,e.deltaY],ag=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],ug=(e,t,n,r)=>{const o=r!==null&&Cc(r,e),[i,s]=Yk(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},Qk=Xk,Za=Qk,e3={};Dn(e3,{Arrow:()=>Mr,Content:()=>Cb,Description:()=>as,ErrorMessage:()=>us,HiddenSelect:()=>Sb,Icon:()=>kb,Item:()=>ja,ItemDescription:()=>qa,ItemIndicator:()=>Ha,ItemLabel:()=>Ga,Label:()=>Ab,Listbox:()=>Tb,Portal:()=>Ib,Root:()=>Db,Section:()=>Va,Select:()=>un,Trigger:()=>Rb,Value:()=>Ob,useSelectContext:()=>Pr});var Eb=mt();function Pr(){const e=gt(Eb);if(e===void 0)throw new Error("[kobalte]: `useSelectContext` must be used within a `Select` component");return e}function Cb(e){let t;const n=Pr(),[r,o]=de(e,["ref","style","onCloseAutoFocus","onFocusOutside"]),i=a=>{n.close()},s=a=>{r.onFocusOutside?.(a),n.isOpen()&&n.isModal()&&a.preventDefault()};return Ya({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),Za({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),Wa({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{r.onCloseAutoFocus?.(a),a.defaultPrevented||(It(n.triggerRef()),a.preventDefault())}},()=>t),f(j,{get when(){return n.contentPresent()},get children(){return f(to.Positioner,{get children(){return f(ss,G({ref(a){var u=it(l=>{n.setContentRef(l),t=l},r.ref);typeof u=="function"&&u(a)},get disableOutsidePointerEvents(){return J(()=>!!n.isModal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get style(){return bn({"--kb-select-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onEscapeKeyDown:i,onFocusOutside:s,get onDismiss(){return n.close}},()=>n.dataset(),o))}})}})}function Sb(e){const t=Pr();return f(Fk,G({get collection(){return t.listState().collection()},get selectionManager(){return t.listState().selectionManager()},get isOpen(){return t.isOpen()},get isMultiple(){return t.isMultiple()},get isVirtualized(){return t.isVirtualized()},focusTrigger:()=>t.triggerRef()?.focus()},e))}function kb(e){const t=Pr(),n=Ne({children:"▼"},e);return f(Fe,G({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Ab(e){const t=Pr(),[n,r]=de(e,["onClick"]);return f(gd,G({as:"span",onClick:i=>{Me(i,n.onClick),t.isDisabled()||t.triggerRef()?.focus()}},r))}function Tb(e){const t=Pr(),n=Ne({id:t.generateId("listbox")},e),[r,o]=de(n,["ref","id","onKeyDown"]);return re(()=>ue(t.registerListboxId(r.id))),f(fd,G({ref(s){var a=it(t.setListboxRef,r.ref);typeof a=="function"&&a(s)},get id(){return r.id},get state(){return t.listState()},get virtualized(){return t.isVirtualized()},get autoFocus(){return t.autoFocus()},shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,get shouldFocusWrap(){return t.shouldFocusWrap()},get disallowTypeAhead(){return t.disallowTypeAhead()},get"aria-labelledby"(){return t.listboxAriaLabelledBy()},get renderItem(){return t.renderItem},get renderSection(){return t.renderSection},onKeyDown:s=>{Me(s,r.onKeyDown),s.key==="Escape"&&s.preventDefault()}},o))}function Ib(e){const t=Pr();return f(j,{get when(){return t.contentPresent()},get children(){return f(Ji,e)}})}function t3(e){const t=`select-${Pt()}`,n=Ne({id:t,selectionMode:"single",disallowEmptySelection:!1,closeOnSelection:e.selectionMode==="single",allowDuplicateSelectionEvents:!0,gutter:8,sameWidth:!0,modal:!1},e),[r,o,i,s]=de(n,["itemComponent","sectionComponent","open","defaultOpen","onOpenChange","value","defaultValue","onChange","placeholder","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","keyboardDelegate","allowDuplicateSelectionEvents","disallowEmptySelection","closeOnSelection","disallowTypeAhead","shouldFocusWrap","selectionBehavior","selectionMode","virtualized","modal","preventScroll","forceMount"],["getAnchorRect","placement","gutter","shift","flip","slide","overlap","sameWidth","fitViewport","hideWhenDetached","detachedPadding","arrowPadding","overflowPadding"],ld),[a,u]=T(),[l,c]=T(),[d,g]=T(),[h,p]=T(),[m,y]=T(),[v,b]=T(),[w,E]=T(),[C,A]=T(!0),I=W=>{const M=r.optionValue;return M==null?String(W):String(ts(M)?M(W):W[M])},S=ne(()=>{const W=r.optionGroupChildren;return W==null?r.options:r.options.flatMap(M=>M[W]??M)}),k=ne(()=>S().map(W=>I(W))),P=W=>[...W].map(M=>S().find(Y=>I(Y)===M)).filter(M=>M!=null),R=Co({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:W=>r.onOpenChange?.(W)}),L=$a({selectedKeys:()=>r.value!=null?r.value.map(I):r.value,defaultSelectedKeys:()=>r.defaultValue!=null?r.defaultValue.map(I):r.defaultValue,onSelectionChange:W=>{r.onChange?.(P(W)),r.closeOnSelection&&se()},allowDuplicateSelectionEvents:()=>ee(r.allowDuplicateSelectionEvents),disallowEmptySelection:()=>ee(r.disallowEmptySelection),selectionBehavior:()=>ee(r.selectionBehavior),selectionMode:()=>r.selectionMode,dataSource:()=>r.options??[],getKey:()=>r.optionValue,getTextValue:()=>r.optionTextValue,getDisabled:()=>r.optionDisabled,getSectionChildren:()=>r.optionGroupChildren}),F=ne(()=>P(L.selectionManager().selectedKeys())),D=W=>{L.selectionManager().toggleSelection(I(W))},{present:B}=Gn({show:()=>r.forceMount||R.isOpen(),element:()=>m()??null}),N=()=>{const W=v();W&&It(W)},X=W=>{if(r.options.length<=0)return;A(W),R.open();let M=L.selectionManager().firstSelectedKey();M==null&&(W==="first"?M=L.collection().getFirstKey():W==="last"&&(M=L.collection().getLastKey())),N(),L.selectionManager().setFocused(!0),L.selectionManager().setFocusedKey(M)},se=()=>{R.close(),L.selectionManager().setFocused(!1),L.selectionManager().setFocusedKey(void 0)},K=W=>{R.isOpen()?se():X(W)},{formControlContext:U}=cd(i);hd(h,()=>{const W=r.defaultValue?[...r.defaultValue].map(I):new nr;L.selectionManager().setSelectedKeys(W)});const oe=U0({usage:"search",sensitivity:"base"}),H=ne(()=>{const W=ee(r.keyboardDelegate);return W||new mb(L.collection,void 0,oe)}),z=W=>r.itemComponent?.({item:W}),Z=W=>r.sectionComponent?.({section:W});re(pt([k],([W])=>{const Y=[...L.selectionManager().selectedKeys()].filter(ae=>W.includes(ae));L.selectionManager().setSelectedKeys(Y)},{defer:!0}));const te=ne(()=>({"data-expanded":R.isOpen()?"":void 0,"data-closed":R.isOpen()?void 0:""})),he={dataset:te,isOpen:R.isOpen,isDisabled:()=>U.isDisabled()??!1,isMultiple:()=>ee(r.selectionMode)==="multiple",isVirtualized:()=>r.virtualized??!1,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??he.isModal(),disallowTypeAhead:()=>r.disallowTypeAhead??!1,shouldFocusWrap:()=>r.shouldFocusWrap??!1,selectedOptions:F,contentPresent:B,autoFocus:C,triggerRef:h,listState:()=>L,keyboardDelegate:H,triggerId:a,valueId:l,listboxId:d,listboxAriaLabelledBy:w,setListboxAriaLabelledBy:E,setTriggerRef:p,setContentRef:y,setListboxRef:b,open:X,close:se,toggle:K,placeholder:()=>r.placeholder,renderItem:z,renderSection:Z,removeOptionFromSelection:D,generateId:gn(()=>ee(i.id)),registerTriggerId:xt(u),registerValueId:xt(c),registerListboxId:xt(g)};return f(Ka.Provider,{value:U,get children(){return f(Eb.Provider,{value:he,get children(){return f(to,G({anchorRef:h,contentRef:m},o,{get children(){return f(Fe,G({as:"div",role:"group",get id(){return ee(i.id)}},()=>U.dataset(),te,s))}}))}})}})}function Db(e){const[t,n]=de(e,["value","defaultValue","onChange","multiple"]),r=ne(()=>t.value!=null?t.multiple?t.value:[t.value]:t.value),o=ne(()=>t.defaultValue!=null?t.multiple?t.defaultValue:[t.defaultValue]:t.defaultValue);return f(t3,G({get value(){return r()},get defaultValue(){return o()},onChange:s=>{t.multiple?t.onChange?.(s??[]):t.onChange?.(s[0]??null)},get selectionMode(){return t.multiple?"multiple":"single"}},n))}function Rb(e){const t=Bn(),n=Pr(),r=Ne({id:n.generateId("trigger")},e),[o,i,s]=de(r,["ref","disabled","onPointerDown","onClick","onKeyDown","onFocus","onBlur"],xb),a=()=>n.listState().selectionManager(),u=()=>n.keyboardDelegate(),l=()=>o.disabled||n.isDisabled(),{fieldProps:c}=_b(i),{typeSelectHandlers:d}=H0({keyboardDelegate:u,selectionManager:a,onTypeSelect:b=>a().select(b)}),g=()=>[n.listboxAriaLabelledBy(),n.valueId()].filter(Boolean).join(" ")||void 0,h=b=>{Me(b,o.onPointerDown),b.currentTarget.dataset.pointerType=b.pointerType,!l()&&b.pointerType!=="touch"&&b.button===0&&(b.preventDefault(),n.toggle(!0))},p=b=>{Me(b,o.onClick),!l()&&b.currentTarget.dataset.pointerType==="touch"&&n.toggle(!0)},m=b=>{if(Me(b,o.onKeyDown),!l())switch(Me(b,d.onKeyDown),b.key){case"Enter":case" ":case"ArrowDown":b.stopPropagation(),b.preventDefault(),n.toggle("first");break;case"ArrowUp":b.stopPropagation(),b.preventDefault(),n.toggle("last");break;case"ArrowLeft":{if(b.preventDefault(),n.isMultiple())return;const w=a().firstSelectedKey(),E=w!=null?u().getKeyAbove?.(w):u().getFirstKey?.();E!=null&&a().select(E);break}case"ArrowRight":{if(b.preventDefault(),n.isMultiple())return;const w=a().firstSelectedKey(),E=w!=null?u().getKeyBelow?.(w):u().getFirstKey?.();E!=null&&a().select(E);break}}},y=b=>{Me(b,o.onFocus),!a().isFocused()&&a().setFocused(!0)},v=b=>{Me(b,o.onBlur),!n.isOpen()&&a().setFocused(!1)};return re(()=>ue(n.registerTriggerId(c.id()))),re(()=>{n.setListboxAriaLabelledBy([c.ariaLabelledBy(),c.ariaLabel()&&!c.ariaLabelledBy()?c.id():null].filter(Boolean).join(" ")||void 0)}),f(hr,G({ref(b){var w=it(n.setTriggerRef,o.ref);typeof w=="function"&&w(b)},get id(){return c.id()},get disabled(){return l()},"aria-haspopup":"listbox",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return J(()=>!!n.isOpen())()?n.listboxId():void 0},get"aria-label"(){return c.ariaLabel()},get"aria-labelledby"(){return g()},get"aria-describedby"(){return c.ariaDescribedBy()},onPointerDown:h,onClick:p,onKeyDown:m,onFocus:y,onBlur:v},()=>n.dataset(),()=>t.dataset(),s))}function Ob(e){const t=Bn(),n=Pr(),r=Ne({id:n.generateId("value")},e),[o,i]=de(r,["id","children"]),s=()=>n.listState().selectionManager(),a=()=>{const u=s().selectedKeys();return u.size===1&&u.has("")?!0:s().isEmpty()};return re(()=>ue(n.registerValueId(o.id))),f(Fe,G({as:"span",get id(){return o.id},get"data-placeholder-shown"(){return a()?"":void 0}},()=>t.dataset(),i,{get children(){return f(j,{get when(){return!a()},get fallback(){return n.placeholder()},get children(){return f(n3,{state:{selectedOption:()=>n.selectedOptions()[0],selectedOptions:()=>n.selectedOptions(),remove:u=>n.removeOptionFromSelection(u),clear:()=>s().clearSelection()},get children(){return o.children}})}})}}))}function n3(e){const t=ii(()=>{const n=e.children;return ts(n)?n(e.state):n});return J(t)}var un=Object.assign(Db,{Arrow:Mr,Content:Cb,Description:as,ErrorMessage:us,HiddenSelect:Sb,Icon:kb,Item:ja,ItemDescription:qa,ItemIndicator:Ha,ItemLabel:Ga,Label:Ab,Listbox:Tb,Portal:Ib,Section:Va,Trigger:Rb,Value:Ob});function r3(e,t){const n=new ResizeObserver(e);return ue(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function o3(e,t,n){const r=new WeakMap,{observe:o,unobserve:i}=r3(s=>{for(const a of s){const{contentRect:u,target:l}=a,c=Math.round(u.width),d=Math.round(u.height),g=r.get(l);(!g||g.width!==c||g.height!==d)&&(t(u,l,a),r.set(l,{width:c,height:d}))}},n);re(s=>{const a=nC(hc(ee(e)));return sC(a,s,o,i),a},[])}var i3={};Dn(i3,{Content:()=>Mb,Indicator:()=>Pb,List:()=>$b,Root:()=>Lb,Tabs:()=>cs,Trigger:()=>Fb,useTabsContext:()=>ls});var Nb=mt();function ls(){const e=gt(Nb);if(e===void 0)throw new Error("[kobalte]: `useTabsContext` must be used within a `Tabs` component");return e}function Mb(e){const[t,n]=T(),r=ls(),[o,i]=de(e,["ref","id","value","forceMount"]),[s,a]=T(0),u=()=>o.id??r.generateContentId(o.value),l=()=>r.listState().selectedKey()===o.value,{present:c}=Gn({show:()=>o.forceMount||l(),element:()=>t()??null});return re(pt([()=>t(),()=>c()],([d,g])=>{if(d==null||!g)return;const h=()=>{const m=w0(d,{tabbable:!0});a(m.nextNode()?void 0:0)};h();const p=new MutationObserver(h);p.observe(d,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabindex","disabled"]}),ue(()=>{p.disconnect()})})),re(pt([()=>o.value,u],([d,g])=>{r.contentIdsMap().set(d,g)})),f(j,{get when(){return c()},get children(){return f(Fe,G({as:"div",ref(d){var g=it(n,o.ref);typeof g=="function"&&g(d)},get id(){return u()},role:"tabpanel",get tabIndex(){return s()},get"aria-labelledby"(){return r.triggerIdsMap().get(o.value)},get"data-orientation"(){return r.orientation()},get"data-selected"(){return l()?"":void 0}},i))}})}function Pb(e){const t=ls(),[n,r]=de(e,["style"]),[o,i]=T({width:void 0,height:void 0}),{direction:s}=pr(),a=()=>{const g=t.selectedTab();if(g==null)return;const h={transform:void 0,width:void 0,height:void 0},p=s()==="rtl"?-1*(g.offsetParent?.offsetWidth-g.offsetWidth-g.offsetLeft):g.offsetLeft;h.transform=t.orientation()==="vertical"?`translateY(${g.offsetTop}px)`:`translateX(${p}px)`,t.orientation()==="horizontal"?h.width=`${g.offsetWidth}px`:h.height=`${g.offsetHeight}px`,i(h)};An(()=>{queueMicrotask(()=>{a()})}),re(pt([t.selectedTab,t.orientation,s],()=>{a()},{defer:!0}));const[u,l]=T(!1);let c=null,d=null;return o3(t.selectedTab,(g,h)=>{if(d!==h){d=h;return}l(!0),c&&clearTimeout(c),c=setTimeout(()=>{c=null,l(!1)},1),a()}),f(Fe,G({as:"div",role:"presentation",get style(){return bn(o(),n.style)},get"data-orientation"(){return t.orientation()},get"data-resizing"(){return u()}},r))}function $b(e){let t;const n=ls(),[r,o]=de(e,["ref","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),{direction:i}=pr(),s=new cS(()=>n.listState().collection(),i,n.orientation),a=G0({selectionManager:()=>n.listState().selectionManager(),keyboardDelegate:()=>s,selectOnFocus:()=>n.activationMode()==="automatic",shouldFocusWrap:!1,disallowEmptySelection:!0},()=>t);return re(()=>{if(t==null)return;const u=t.querySelector(`[data-key="${n.listState().selectedKey()}"]`);u!=null&&n.setSelectedTab(u)}),f(Fe,G({as:"div",ref(u){var l=it(c=>t=c,r.ref);typeof l=="function"&&l(u)},role:"tablist",get"aria-orientation"(){return n.orientation()},get"data-orientation"(){return n.orientation()},get onKeyDown(){return ot([r.onKeyDown,a.onKeyDown])},get onMouseDown(){return ot([r.onMouseDown,a.onMouseDown])},get onFocusIn(){return ot([r.onFocusIn,a.onFocusIn])},get onFocusOut(){return ot([r.onFocusOut,a.onFocusOut])}},o))}function s3(e){const[t,n]=ui({value:()=>ee(e.selectedKey),defaultValue:()=>ee(e.defaultSelectedKey),onChange:l=>e.onSelectionChange?.(l)}),r=ne(()=>{const l=t();return l!=null?[l]:[]}),[,o]=de(e,["onSelectionChange"]),i=G(o,{selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:r,onSelectionChange:l=>{const c=l.values().next().value;c===t()&&e.onSelectionChange?.(c),n(c)}}),{collection:s,selectionManager:a}=$a(i),u=ne(()=>{const l=t();return l!=null?s().getItem(l):void 0});return{collection:s,selectionManager:a,selectedKey:t,setSelectedKey:n,selectedItem:u}}function Lb(e){const t=`tabs-${Pt()}`,n=Ne({id:t,orientation:"horizontal",activationMode:"automatic"},e),[r,o]=de(n,["value","defaultValue","onChange","orientation","activationMode","disabled"]),[i,s]=T([]),[a,u]=T(),{DomCollectionProvider:l}=X0({items:i,onItemsChange:s}),c=s3({selectedKey:()=>r.value,defaultSelectedKey:()=>r.defaultValue,onSelectionChange:m=>r.onChange?.(String(m)),dataSource:i});let d=c.selectedKey();re(pt([()=>c.selectionManager(),()=>c.collection(),()=>c.selectedKey()],([m,y,v])=>{let b=v;if(m.isEmpty()||b==null||!y.getItem(b)){b=y.getFirstKey();let w=b!=null?y.getItem(b):void 0;for(;w?.disabled&&w.key!==y.getLastKey();)b=y.getKeyAfter(w.key),w=b!=null?y.getItem(b):void 0;w?.disabled&&b===y.getLastKey()&&(b=y.getFirstKey()),b!=null&&m.setSelectedKeys([b])}(m.focusedKey()==null||!m.isFocused()&&b!==d)&&m.setFocusedKey(b),d=b}));const g=new Map,h=new Map,p={isDisabled:()=>r.disabled??!1,orientation:()=>r.orientation,activationMode:()=>r.activationMode,triggerIdsMap:()=>g,contentIdsMap:()=>h,listState:()=>c,selectedTab:a,setSelectedTab:u,generateTriggerId:m=>`${o.id}-trigger-${m}`,generateContentId:m=>`${o.id}-content-${m}`};return f(l,{get children(){return f(Nb.Provider,{value:p,get children(){return f(Fe,G({as:"div",get"data-orientation"(){return p.orientation()}},o))}})}})}function Fb(e){let t;const n=ls(),r=Ne({type:"button"},e),[o,i]=de(r,["ref","id","value","disabled","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),s=()=>o.id??n.generateTriggerId(o.value),a=()=>n.listState().selectionManager().focusedKey()===o.value,u=()=>o.disabled||n.isDisabled(),l=()=>n.contentIdsMap().get(o.value);J0({getItem:()=>({ref:()=>t,type:"item",key:o.value,textValue:"",disabled:u()})});const c=Pa({key:()=>o.value,selectionManager:()=>n.listState().selectionManager(),disabled:u},()=>t),d=g=>{m0()&&It(g.currentTarget)};return re(pt([()=>o.value,s],([g,h])=>{n.triggerIdsMap().set(g,h)})),f(Fe,G({as:"button",ref(g){var h=it(p=>t=p,o.ref);typeof h=="function"&&h(g)},get id(){return s()},role:"tab",get tabIndex(){return J(()=>!u())()?c.tabIndex():void 0},get disabled(){return u()},get"aria-selected"(){return c.isSelected()},get"aria-disabled"(){return u()||void 0},get"aria-controls"(){return J(()=>!!c.isSelected())()?l():void 0},get"data-key"(){return c.dataKey()},get"data-orientation"(){return n.orientation()},get"data-selected"(){return c.isSelected()?"":void 0},get"data-highlighted"(){return a()?"":void 0},get"data-disabled"(){return u()?"":void 0},get onPointerDown(){return ot([o.onPointerDown,c.onPointerDown])},get onPointerUp(){return ot([o.onPointerUp,c.onPointerUp])},get onClick(){return ot([o.onClick,c.onClick,d])},get onKeyDown(){return ot([o.onKeyDown,c.onKeyDown])},get onMouseDown(){return ot([o.onMouseDown,c.onMouseDown])},get onFocus(){return ot([o.onFocus,c.onFocus])}},i))}var cs=Object.assign(Lb,{Content:Mb,Indicator:Pb,List:$b,Trigger:Fb}),a3={};Dn(a3,{Anchor:()=>zb,Arrow:()=>Mr,CloseButton:()=>Ub,Content:()=>Kb,Description:()=>jb,Popover:()=>Hr,Portal:()=>qb,Root:()=>Hb,Title:()=>Gb,Trigger:()=>Vb,usePopoverContext:()=>no});var Bb=mt();function no(){const e=gt(Bb);if(e===void 0)throw new Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function zb(e){const t=no(),[n,r]=de(e,["ref"]);return f(Fe,G({as:"div",ref(o){var i=it(t.setDefaultAnchorRef,n.ref);typeof i=="function"&&i(o)}},()=>t.dataset(),r))}function Ub(e){const t=no(),[n,r]=de(e,["aria-label","onClick"]);return f(hr,G({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Me(i,n.onClick),t.close()}},()=>t.dataset(),r))}function Kb(e){let t;const n=no(),r=Ne({id:n.generateId("content")},e),[o,i]=de(r,["ref","style","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1,u=!1;const l=h=>{o.onCloseAutoFocus?.(h),n.isModal()?(h.preventDefault(),s||It(n.triggerRef())):(h.defaultPrevented||(a||It(n.triggerRef()),h.preventDefault()),a=!1,u=!1)},c=h=>{o.onPointerDownOutside?.(h),n.isModal()&&(s=h.detail.isContextMenu)},d=h=>{o.onFocusOutside?.(h),n.isOpen()&&n.isModal()&&h.preventDefault()},g=h=>{o.onInteractOutside?.(h),!n.isModal()&&(h.defaultPrevented||(a=!0,h.detail.originalEvent.type==="pointerdown"&&(u=!0)),Ht(n.triggerRef(),h.target)&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&u&&h.preventDefault())};return Ya({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),Za({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),Wa({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:l},()=>t),re(()=>ue(n.registerContentId(i.id))),f(j,{get when(){return n.contentPresent()},get children(){return f(to.Positioner,{get children(){return f(ss,G({ref(h){var p=it(m=>{n.setContentRef(m),t=m},o.ref);typeof p=="function"&&p(h)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return J(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return bn({"--kb-popover-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},o.style)},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:g,get onDismiss(){return n.close}},()=>n.dataset(),i))}})}})}function jb(e){const t=no(),n=Ne({id:t.generateId("description")},e),[r,o]=de(n,["id"]);return re(()=>ue(t.registerDescriptionId(r.id))),f(Fe,G({as:"p",get id(){return r.id}},()=>t.dataset(),o))}function qb(e){const t=no();return f(j,{get when(){return t.contentPresent()},get children(){return f(Ji,e)}})}var lg={dismiss:"Dismiss"};function Hb(e){const t=`popover-${Pt()}`,n=Ne({id:t,modal:!1,translations:lg},e),[r,o]=de(n,["translations","id","open","defaultOpen","onOpenChange","modal","preventScroll","forceMount","anchorRef"]),[i,s]=T(),[a,u]=T(),[l,c]=T(),[d,g]=T(),[h,p]=T(),[m,y]=T(),v=Co({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:A=>r.onOpenChange?.(A)}),b=()=>r.anchorRef?.()??i()??a(),{present:w}=Gn({show:()=>r.forceMount||v.isOpen(),element:()=>l()??null}),E=ne(()=>({"data-expanded":v.isOpen()?"":void 0,"data-closed":v.isOpen()?void 0:""})),C={translations:()=>r.translations??lg,dataset:E,isOpen:v.isOpen,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??C.isModal(),contentPresent:w,triggerRef:a,contentId:d,titleId:h,descriptionId:m,setDefaultAnchorRef:s,setTriggerRef:u,setContentRef:c,close:v.close,toggle:v.toggle,generateId:gn(()=>r.id),registerContentId:xt(g),registerTitleId:xt(p),registerDescriptionId:xt(y)};return f(Bb.Provider,{value:C,get children(){return f(to,G({anchorRef:b,contentRef:l},o))}})}function Gb(e){const t=no(),n=Ne({id:t.generateId("title")},e),[r,o]=de(n,["id"]);return re(()=>ue(t.registerTitleId(r.id))),f(Fe,G({as:"h2",get id(){return r.id}},()=>t.dataset(),o))}function Vb(e){const t=no(),[n,r]=de(e,["ref","onClick","onPointerDown"]);return f(hr,G({ref(s){var a=it(t.setTriggerRef,n.ref);typeof a=="function"&&a(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return J(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:s=>{Me(s,n.onPointerDown),s.preventDefault()},onClick:s=>{Me(s,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Hr=Object.assign(Hb,{Anchor:zb,Arrow:Mr,CloseButton:Ub,Content:Kb,Description:jb,Portal:qb,Title:Gb,Trigger:Vb}),u3={};Dn(u3,{Description:()=>as,ErrorMessage:()=>us,Item:()=>Zb,ItemControl:()=>Xb,ItemDescription:()=>Jb,ItemIndicator:()=>Qb,ItemInput:()=>e1,ItemLabel:()=>t1,Label:()=>n1,RadioGroup:()=>Yn,Root:()=>r1,useRadioGroupContext:()=>pd});var Wb=mt();function pd(){const e=gt(Wb);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var Yb=mt();function ds(){const e=gt(Yb);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function Zb(e){const t=Bn(),n=pd(),r=`${t.generateId("item")}-${Pt()}`,o=Ne({id:r},e),[i,s]=de(o,["value","disabled","onPointerDown"]),[a,u]=T(),[l,c]=T(),[d,g]=T(),[h,p]=T(),[m,y]=T(!1),v=ne(()=>n.isDefaultValue(i.value)),b=ne(()=>n.isSelectedValue(i.value)),w=ne(()=>i.disabled||t.isDisabled()||!1),E=I=>{Me(I,i.onPointerDown),m()&&I.preventDefault()},C=ne(()=>({...t.dataset(),"data-disabled":w()?"":void 0,"data-checked":b()?"":void 0})),A={value:()=>i.value,dataset:C,isDefault:v,isSelected:b,isDisabled:w,inputId:a,labelId:l,descriptionId:d,inputRef:h,select:()=>n.setSelectedValue(i.value),generateId:gn(()=>s.id),registerInput:xt(u),registerLabel:xt(c),registerDescription:xt(g),setIsFocused:y,setInputRef:p};return f(Yb.Provider,{value:A,get children(){return f(Fe,G({as:"div",role:"group",onPointerDown:E},C,s))}})}function Xb(e){const t=ds(),n=Ne({id:t.generateId("control")},e),[r,o]=de(n,["onClick","onKeyDown"]);return f(Fe,G({as:"div",onClick:a=>{Me(a,r.onClick),t.select(),t.inputRef()?.focus({preventScroll:!0})},onKeyDown:a=>{Me(a,r.onKeyDown),a.key===Oa.Space&&(t.select(),t.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),o))}function Jb(e){const t=ds(),n=Ne({id:t.generateId("description")},e);return re(()=>ue(t.registerDescription(n.id))),f(Fe,G({as:"div"},()=>t.dataset(),n))}function Qb(e){const t=ds(),n=Ne({id:t.generateId("indicator")},e),[r,o]=de(n,["ref","forceMount"]),[i,s]=T(),{present:a}=Gn({show:()=>r.forceMount||t.isSelected(),element:()=>i()??null});return f(j,{get when(){return a()},get children(){return f(Fe,G({as:"div",ref(u){var l=it(s,r.ref);typeof l=="function"&&l(u)}},()=>t.dataset(),o))}})}function e1(e){const t=Bn(),n=pd(),r=ds(),o=Ne({id:r.generateId("input")},e),[i,s]=de(o,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[i["aria-labelledby"],r.labelId(),i["aria-labelledby"]!=null&&s["aria-label"]!=null?s.id:void 0].filter(Boolean).join(" ")||void 0,u=()=>[i["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[l,c]=T(!1),d=p=>{if(Me(p,i.onChange),p.stopPropagation(),!l()){n.setSelectedValue(r.value());const m=p.target;m.checked=r.isSelected()}c(!1)},g=p=>{Me(p,i.onFocus),r.setIsFocused(!0)},h=p=>{Me(p,i.onBlur),r.setIsFocused(!1)};return re(pt([()=>r.isSelected(),()=>r.value()],p=>{if(!p[0]&&p[1]===r.value())return;c(!0);const m=r.inputRef();m?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),m?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),re(()=>ue(r.registerInput(s.id))),f(Fe,G({as:"input",ref(p){var m=it(r.setInputRef,i.ref);typeof m=="function"&&m(p)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return bn({...Na},i.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},onChange:d,onFocus:g,onBlur:h},()=>r.dataset(),s))}function t1(e){const t=ds(),n=Ne({id:t.generateId("label")},e);return re(()=>ue(t.registerLabel(n.id))),f(Fe,G({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function n1(e){return f(gd,G({as:"span"},e))}function r1(e){let t;const n=`radiogroup-${Pt()}`,r=Ne({id:n,orientation:"vertical"},e),[o,i,s]=de(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],ld),[a,u]=ui({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:y=>o.onChange?.(y)}),{formControlContext:l}=cd(i);hd(()=>t,()=>u(o.defaultValue??""));const c=()=>l.getAriaLabelledBy(ee(i.id),s["aria-label"],o["aria-labelledby"]),d=()=>l.getAriaDescribedBy(o["aria-describedby"]),g=y=>y===e.defaultValue,h=y=>y===a(),m={ariaDescribedBy:d,isDefaultValue:g,isSelectedValue:h,setSelectedValue:y=>{if(!(l.isReadOnly()||l.isDisabled())&&(u(y),t))for(const v of t.querySelectorAll("[type='radio']")){const b=v;b.checked=h(b.value)}}};return f(Ka.Provider,{value:l,get children(){return f(Wb.Provider,{value:m,get children(){return f(Fe,G({as:"div",ref(y){var v=it(b=>t=b,o.ref);typeof v=="function"&&v(y)},role:"radiogroup",get id(){return ee(i.id)},get"aria-invalid"(){return l.validationState()==="invalid"||void 0},get"aria-required"(){return l.isRequired()||void 0},get"aria-disabled"(){return l.isDisabled()||void 0},get"aria-readonly"(){return l.isReadOnly()||void 0},get"aria-orientation"(){return o.orientation},get"aria-labelledby"(){return c()},get"aria-describedby"(){return d()}},()=>l.dataset(),s))}})}})}var Yn=Object.assign(r1,{Description:as,ErrorMessage:us,Item:Zb,ItemControl:Xb,ItemDescription:Jb,ItemIndicator:Qb,ItemInput:e1,ItemLabel:t1,Label:n1}),l3=mt();function Xa(){return gt(l3)}var c3=mt();function o1(){return gt(c3)}var i1=mt();function s1(){return gt(i1)}function $r(){const e=s1();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var a1=mt();function md(){const e=gt(a1);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var u1=mt();function br(){const e=gt(u1);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function bd(e){let t;const n=br(),r=$r(),o=Ne({id:n.generateId(`item-${Pt()}`)},e),[i,s]=de(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=T(),[l,c]=T(),[d,g]=T(),h=()=>r.listState().selectionManager(),p=()=>s.id,m=()=>h().focusedKey()===p(),y=()=>{i.onSelect?.(),i.closeOnSelect&&setTimeout(()=>{r.close(!0)},1)};J0({getItem:()=>({ref:()=>t,type:"item",key:p(),textValue:i.textValue??d()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const v=Pa({key:p,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),b=k=>{Me(k,i.onPointerMove),k.pointerType==="mouse"&&(i.disabled?r.onItemLeave(k):(r.onItemEnter(k),k.defaultPrevented||(It(k.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(p()))))},w=k=>{Me(k,i.onPointerLeave),k.pointerType==="mouse"&&r.onItemLeave(k)},E=k=>{Me(k,i.onPointerUp),!i.disabled&&k.button===0&&y()},C=k=>{if(Me(k,i.onKeyDown),!k.repeat&&!i.disabled)switch(k.key){case"Enter":case" ":y();break}},A=ne(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),I=ne(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":m()?"":void 0})),S={isChecked:()=>i.checked,dataset:I,setLabelRef:g,generateId:gn(()=>s.id),registerLabel:xt(u),registerDescription:xt(c)};return f(a1.Provider,{value:S,get children(){return f(Fe,G({as:"div",ref(k){var P=it(R=>t=R,i.ref);typeof P=="function"&&P(k)},get tabIndex(){return v.tabIndex()},get"aria-checked"(){return A()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},get"data-key"(){return v.dataKey()},get onPointerDown(){return ot([i.onPointerDown,v.onPointerDown])},get onPointerUp(){return ot([E,v.onPointerUp])},get onClick(){return ot([i.onClick,v.onClick])},get onKeyDown(){return ot([C,v.onKeyDown])},get onMouseDown(){return ot([i.onMouseDown,v.onMouseDown])},get onFocus(){return ot([i.onFocus,v.onFocus])},onPointerMove:b,onPointerLeave:w},I,s))}})}function l1(e){const t=Ne({closeOnSelect:!1},e),[n,r]=de(t,["checked","defaultChecked","onChange","onSelect"]),o=F0({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return f(bd,G({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{n.onSelect?.(),o.toggle()}},r))}var Hi={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Hi.next(e==="ltr"?"rtl":"ltr",t)},cg={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function c1(e){const t=br(),n=$r(),r=Xa(),{direction:o}=pr(),i=Ne({id:t.generateId("trigger")},e),[s,a]=de(i,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let u=()=>t.value();r!==void 0&&(u=()=>t.value()??s.id,r.lastValue()===void 0&&r.setLastValue(u));const l=Ma(()=>n.triggerRef(),()=>"button"),c=ne(()=>l()==="a"&&n.triggerRef()?.getAttribute("href")!=null);re(pt(()=>r?.value(),v=>{c()&&v===u()&&n.triggerRef()?.focus()}));const d=()=>{r!==void 0?n.isOpen()?r.value()===u()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},g=v=>{Me(v,s.onPointerDown),v.currentTarget.dataset.pointerType=v.pointerType,!s.disabled&&v.pointerType!=="touch"&&v.button===0&&d()},h=v=>{Me(v,s.onClick),s.disabled||v.currentTarget.dataset.pointerType==="touch"&&d()},p=v=>{if(Me(v,s.onKeyDown),!s.disabled){if(c())switch(v.key){case"Enter":case" ":return}switch(v.key){case"Enter":case" ":case cg.first(t.orientation()):v.stopPropagation(),v.preventDefault(),RC(v.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(u);break;case cg.last(t.orientation()):v.stopPropagation(),v.preventDefault(),n.open("last");break;case Hi.next(o(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.nextMenu();break;case Hi.previous(o(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.previousMenu();break}}},m=v=>{Me(v,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(u)},y=v=>{Me(v,s.onFocus),r!==void 0&&v.currentTarget.dataset.pointerType!=="touch"&&r.setValue(u)};return re(()=>ue(n.registerTriggerId(s.id))),f(hr,G({ref(v){var b=it(n.setTriggerRef,s.ref);typeof b=="function"&&b(v)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return s.id},get disabled(){return s.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return J(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return u()!==void 0&&r?.value()===u()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===u()||r.lastValue()===u()?0:-1:void 0},onPointerDown:g,onMouseOver:m,onClick:h,onKeyDown:p,onFocus:y,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}function d1(e){let t;const n=br(),r=$r(),o=Xa(),i=o1(),{direction:s}=pr(),a=Ne({id:n.generateId(`content-${Pt()}`)},e),[u,l]=de(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let c=0;const d=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),g=bb({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);Wa({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:w=>{o===void 0&&u.onOpenAutoFocus?.(w)},onUnmountAutoFocus:u.onCloseAutoFocus},()=>t);const h=w=>{if(Ht(w.currentTarget,w.target)&&(w.key==="Tab"&&r.isOpen()&&w.preventDefault(),o!==void 0&&w.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(w.key){case Hi.next(s(),n.orientation()):w.stopPropagation(),w.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Hi.previous(s(),n.orientation()):if(w.currentTarget.hasAttribute("data-closed"))break;w.stopPropagation(),w.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},p=w=>{u.onEscapeKeyDown?.(w),o?.setAutoFocusMenu(!1),r.close(!0)},m=w=>{u.onFocusOutside?.(w),n.isModal()&&w.preventDefault()},y=w=>{Me(w,u.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},v=w=>{if(Me(w,u.onPointerMove),w.pointerType!=="mouse")return;const E=w.target,C=c!==w.clientX;Ht(w.currentTarget,E)&&C&&(r.setPointerDir(w.clientX>c?"right":"left"),c=w.clientX)};re(()=>ue(r.registerContentId(u.id))),ue(()=>r.setContentRef(void 0));const b={ref:it(w=>{r.setContentRef(w),t=w},u.ref),role:"menu",get id(){return u.id},get tabIndex(){return g.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:ot([u.onKeyDown,g.onKeyDown,h]),onMouseDown:ot([u.onMouseDown,g.onMouseDown]),onFocusIn:ot([u.onFocusIn,g.onFocusIn]),onFocusOut:ot([u.onFocusOut,g.onFocusOut]),onPointerEnter:y,onPointerMove:v,get"data-orientation"(){return n.orientation()}};return f(j,{get when(){return r.contentPresent()},get children(){return f(j,{get when(){return i===void 0||r.parentMenuContext()!=null},get fallback(){return f(Fe,G({as:"div"},()=>r.dataset(),b,l))},get children(){return f(to.Positioner,{get children(){return f(ss,G({get disableOutsidePointerEvents(){return J(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return bn({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},u.style)},onEscapeKeyDown:p,onFocusOutside:m,get onDismiss(){return r.close}},()=>r.dataset(),b,l))}})}})}})}function d3(e){let t;const n=br(),r=$r(),[o,i]=de(e,["ref"]);return Za({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),f(d1,G({ref(s){var a=it(u=>{t=u},o.ref);typeof a=="function"&&a(s)}},i))}var f1=mt();function f3(){const e=gt(f1);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function yd(e){const t=br(),n=Ne({id:t.generateId(`group-${Pt()}`)},e),[r,o]=T(),i={generateId:gn(()=>n.id),registerLabelId:xt(o)};return f(f1.Provider,{value:i,get children(){return f(Fe,G({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function g1(e){const t=f3(),n=Ne({id:t.generateId("label")},e),[r,o]=de(n,["id"]);return re(()=>ue(t.registerLabelId(r.id))),f(Fe,G({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function h1(e){const t=$r(),n=Ne({children:"▼"},e);return f(Fe,G({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function p1(e){return f(bd,G({role:"menuitem",closeOnSelect:!0},e))}function m1(e){const t=md(),n=Ne({id:t.generateId("description")},e),[r,o]=de(n,["id"]);return re(()=>ue(t.registerDescription(r.id))),f(Fe,G({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function b1(e){const t=md(),n=Ne({id:t.generateId("indicator")},e),[r,o]=de(n,["forceMount"]);return f(j,{get when(){return r.forceMount||t.isChecked()},get children(){return f(Fe,G({as:"div"},()=>t.dataset(),o))}})}function y1(e){const t=md(),n=Ne({id:t.generateId("label")},e),[r,o]=de(n,["ref","id"]);return re(()=>ue(t.registerLabel(r.id))),f(Fe,G({as:"div",ref(i){var s=it(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function v1(e){const t=$r();return f(j,{get when(){return t.contentPresent()},get children(){return f(Ji,e)}})}var w1=mt();function g3(){const e=gt(w1);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function x1(e){const n=br().generateId(`radiogroup-${Pt()}`),r=Ne({id:n},e),[o,i]=de(r,["value","defaultValue","onChange","disabled"]),[s,a]=ui({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:l=>o.onChange?.(l)}),u={isDisabled:()=>o.disabled,isSelectedValue:l=>l===s(),setSelectedValue:l=>a(l)};return f(w1.Provider,{value:u,get children(){return f(yd,i)}})}function _1(e){const t=g3(),n=Ne({closeOnSelect:!1},e),[r,o]=de(n,["value","onSelect"]);return f(bd,G({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},o))}function h3(e,t,n){const r=e.split("-")[0],o=n.getBoundingClientRect(),i=[],s=t.clientX,a=t.clientY;switch(r){case"top":i.push([s,a+5]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]);break;case"right":i.push([s-5,a]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]);break;case"bottom":i.push([s,a-5]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]);break;case"left":i.push([s+5,a]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]);break}return i}function p3(e,t){return t?x0([e.clientX,e.clientY],t):!1}function E1(e){const t=br(),n=W0(),r=s1(),o=Xa(),i=o1(),s=Ne({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,u]=de(s,["open","defaultOpen","onOpenChange"]);let l=0,c=null,d="right";const[g,h]=T(),[p,m]=T(),[y,v]=T(),[b,w]=T(),[E,C]=T(!0),[A,I]=T(u.placement),[S,k]=T([]),[P,R]=T([]),{DomCollectionProvider:L}=X0({items:P,onItemsChange:R}),F=Co({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:M=>a.onOpenChange?.(M)}),{present:D}=Gn({show:()=>t.forceMount()||F.isOpen(),element:()=>b()??null}),B=$a({selectionMode:"none",dataSource:P}),N=M=>{C(M),F.open()},X=(M=!1)=>{F.close(),M&&r&&r.close(!0)},se=M=>{C(M),F.toggle()},K=()=>{const M=b();M&&(It(M),B.selectionManager().setFocused(!0),B.selectionManager().setFocusedKey(void 0))},U=()=>{i!=null?setTimeout(()=>K()):K()},oe=M=>{k(ae=>[...ae,M]);const Y=r?.registerNestedMenu(M);return()=>{k(ae=>pc(ae,M)),Y?.()}},H=M=>d===c?.side&&p3(M,c?.area),z=M=>{H(M)&&M.preventDefault()},Z=M=>{H(M)||U()},te=M=>{H(M)&&M.preventDefault()};Ya({isDisabled:()=>!(r==null&&F.isOpen()&&t.isModal()),targets:()=>[b(),...S()].filter(Boolean)}),re(()=>{const M=b();if(!M||!r)return;const Y=r.registerNestedMenu(M);ue(()=>{Y()})}),re(()=>{r===void 0&&o?.registerMenu(t.value(),[b(),...S()])}),re(()=>{r!==void 0||o===void 0||(o.value()===t.value()?(y()?.focus(),o.autoFocusMenu()&&N(!0)):X())}),re(()=>{r!==void 0||o===void 0||F.isOpen()&&o.setValue(t.value())}),ue(()=>{r===void 0&&o?.unregisterMenu(t.value())});const W={dataset:ne(()=>({"data-expanded":F.isOpen()?"":void 0,"data-closed":F.isOpen()?void 0:""})),isOpen:F.isOpen,contentPresent:D,nestedMenus:S,currentPlacement:A,pointerGraceTimeoutId:()=>l,autoFocus:E,listState:()=>B,parentMenuContext:()=>r,triggerRef:y,contentRef:b,triggerId:g,contentId:p,setTriggerRef:v,setContentRef:w,open:N,close:X,toggle:se,focusContent:U,onItemEnter:z,onItemLeave:Z,onTriggerLeave:te,setPointerDir:M=>d=M,setPointerGraceTimeoutId:M=>l=M,setPointerGraceIntent:M=>c=M,registerNestedMenu:oe,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:xt(h),registerContentId:xt(m)};return f(L,{get children(){return f(i1.Provider,{value:W,get children(){return f(j,{when:i===void 0,get fallback(){return u.children},get children(){return f(to,G({anchorRef:y,contentRef:b,onCurrentPlacementChange:I},u))}})}})}})}function C1(e){const{direction:t}=pr();return f(E1,G({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var m3={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function S1(e){const t=$r(),n=br(),[r,o]=de(e,["onFocusOutside","onKeyDown"]),{direction:i}=pr();return f(d1,G({onOpenAutoFocus:c=>{c.preventDefault()},onCloseAutoFocus:c=>{c.preventDefault()},onFocusOutside:c=>{r.onFocusOutside?.(c);const d=c.target;Ht(t.triggerRef(),d)||t.close()},onKeyDown:c=>{Me(c,r.onKeyDown);const d=Ht(c.currentTarget,c.target),g=m3.close(i(),n.orientation()).includes(c.key),h=t.parentMenuContext()!=null;d&&g&&h&&(t.close(),It(t.triggerRef()))}},o))}var dg=["Enter"," "],b3={open:(e,t)=>e==="ltr"?[...dg,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...dg,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function k1(e){let t;const n=br(),r=$r(),o=Ne({id:n.generateId(`sub-trigger-${Pt()}`)},e),[i,s]=de(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const u=()=>{a&&window.clearTimeout(a),a=null},{direction:l}=pr(),c=()=>i.id,d=()=>{const w=r.parentMenuContext();if(w==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return w.listState().selectionManager()},g=()=>r.listState().collection(),h=()=>d().focusedKey()===c(),p=Pa({key:c,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),m=w=>{Me(w,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},y=w=>{if(Me(w,i.onPointerMove),w.pointerType!=="mouse")return;const E=r.parentMenuContext();if(E?.onItemEnter(w),!w.defaultPrevented){if(i.disabled){E?.onItemLeave(w);return}!r.isOpen()&&!a&&(r.parentMenuContext()?.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),u()},100)),E?.onItemEnter(w),w.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),It(w.currentTarget),E?.listState().selectionManager().setFocused(!0),E?.listState().selectionManager().setFocusedKey(c()))}},v=w=>{if(Me(w,i.onPointerLeave),w.pointerType!=="mouse")return;u();const E=r.parentMenuContext(),C=r.contentRef();if(C){E?.setPointerGraceIntent({area:h3(r.currentPlacement(),w,C),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(E?.pointerGraceTimeoutId());const A=window.setTimeout(()=>{E?.setPointerGraceIntent(null)},300);E?.setPointerGraceTimeoutId(A)}else{if(E?.onTriggerLeave(w),w.defaultPrevented)return;E?.setPointerGraceIntent(null)}E?.onItemLeave(w)},b=w=>{Me(w,i.onKeyDown),!w.repeat&&(i.disabled||b3.open(l(),n.orientation()).includes(w.key)&&(w.stopPropagation(),w.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(g().getFirstKey())))};return re(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const w=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:c(),textValue:i.textValue??t?.textContent??"",disabled:i.disabled??!1});ue(w)}),re(pt(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),w=>{ue(()=>{window.clearTimeout(w),r.parentMenuContext()?.setPointerGraceIntent(null)})})),re(()=>ue(r.registerTriggerId(i.id))),ue(()=>{u()}),f(Fe,G({as:"div",ref(w){var E=it(C=>{r.setTriggerRef(C),t=C},i.ref);typeof E=="function"&&E(w)},get id(){return i.id},role:"menuitem",get tabIndex(){return p.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return J(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return p.dataKey()},get"data-highlighted"(){return h()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return ot([i.onPointerDown,p.onPointerDown])},get onPointerUp(){return ot([i.onPointerUp,p.onPointerUp])},get onClick(){return ot([m,p.onClick])},get onKeyDown(){return ot([b,p.onKeyDown])},get onMouseDown(){return ot([i.onMouseDown,p.onMouseDown])},get onFocus(){return ot([i.onFocus,p.onFocus])},onPointerMove:y,onPointerLeave:v},()=>r.dataset(),s))}function y3(e){const t=Xa(),n=`menu-${Pt()}`,r=Ne({id:n,modal:!0},e),[o,i]=de(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=Co({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:u=>o.onOpenChange?.(u)}),a={isModal:()=>o.modal??!0,preventScroll:()=>o.preventScroll??a.isModal(),forceMount:()=>o.forceMount??!1,generateId:gn(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??t?.orientation()??"horizontal"};return f(u1.Provider,{value:a,get children(){return f(E1,G({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}var v3={};Dn(v3,{Root:()=>Ja,Separator:()=>w3});function Ja(e){let t;const n=Ne({orientation:"horizontal"},e),[r,o]=de(n,["ref","orientation"]),i=Ma(()=>t,()=>"hr");return f(Fe,G({as:"hr",ref(s){var a=it(u=>t=u,r.ref);typeof a=="function"&&a(s)},get role(){return i()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},o))}var w3=Ja,x3={};Dn(x3,{Arrow:()=>Mr,CheckboxItem:()=>l1,Content:()=>A1,DropdownMenu:()=>Tn,Group:()=>yd,GroupLabel:()=>g1,Icon:()=>h1,Item:()=>p1,ItemDescription:()=>m1,ItemIndicator:()=>b1,ItemLabel:()=>y1,Portal:()=>v1,RadioGroup:()=>x1,RadioItem:()=>_1,Root:()=>T1,Separator:()=>Ja,Sub:()=>C1,SubContent:()=>S1,SubTrigger:()=>k1,Trigger:()=>c1});function A1(e){const t=br(),n=$r(),[r,o]=de(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return f(d3,G({onCloseAutoFocus:u=>{r.onCloseAutoFocus?.(u),i||It(n.triggerRef()),i=!1,u.preventDefault()},onInteractOutside:u=>{r.onInteractOutside?.(u),(!t.isModal()||u.detail.isContextMenu)&&(i=!0)}},o))}function T1(e){const t=`dropdownmenu-${Pt()}`,n=Ne({id:t},e);return f(y3,n)}var Tn=Object.assign(T1,{Arrow:Mr,CheckboxItem:l1,Content:A1,Group:yd,GroupLabel:g1,Icon:h1,Item:p1,ItemDescription:m1,ItemIndicator:b1,ItemLabel:y1,Portal:v1,RadioGroup:x1,RadioItem:_1,Separator:Ja,Sub:C1,SubContent:S1,SubTrigger:k1,Trigger:c1}),_3={};Dn(_3,{Collapsible:()=>Qa,Content:()=>D1,Root:()=>R1,Trigger:()=>O1,useCollapsibleContext:()=>vd});var I1=mt();function vd(){const e=gt(I1);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function D1(e){const[t,n]=T(),r=vd(),o=Ne({id:r.generateId("content")},e),[i,s]=de(o,["ref","id","style"]),{present:a}=Gn({show:r.shouldMount,element:()=>t()??null}),[u,l]=T(0),[c,d]=T(0);let h=r.isOpen()||a();return An(()=>{const p=requestAnimationFrame(()=>{h=!1});ue(()=>{cancelAnimationFrame(p)})}),re(pt(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const p=t().getBoundingClientRect();l(p.height),d(p.width),h||(t().style.transitionDuration="",t().style.animationName="")})),re(pt(r.isOpen,p=>{!p&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),re(()=>ue(r.registerContentId(i.id))),f(j,{get when(){return a()},get children(){return f(Fe,G({as:"div",ref(p){var m=it(n,i.ref);typeof m=="function"&&m(p)},get id(){return i.id},get style(){return bn({"--kb-collapsible-content-height":u()?`${u()}px`:void 0,"--kb-collapsible-content-width":c()?`${c()}px`:void 0},i.style)}},()=>r.dataset(),s))}})}function R1(e){const t=`collapsible-${Pt()}`,n=Ne({id:t},e),[r,o]=de(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[i,s]=T(),a=Co({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:c=>r.onOpenChange?.(c)}),u=ne(()=>({"data-expanded":a.isOpen()?"":void 0,"data-closed":a.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),l={dataset:u,isOpen:a.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||a.isOpen(),contentId:i,toggle:a.toggle,generateId:gn(()=>o.id),registerContentId:xt(s)};return f(I1.Provider,{value:l,get children(){return f(Fe,G({as:"div"},u,o))}})}function O1(e){const t=vd(),[n,r]=de(e,["onClick"]);return f(hr,G({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return J(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:i=>{Me(i,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Qa=Object.assign(R1,{Content:D1,Trigger:O1}),E3={};Dn(E3,{CloseButton:()=>M1,Content:()=>P1,Description:()=>$1,Dialog:()=>Ir,Overlay:()=>L1,Portal:()=>F1,Root:()=>B1,Title:()=>z1,Trigger:()=>U1,useDialogContext:()=>ro});var N1=mt();function ro(){const e=gt(N1);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function M1(e){const t=ro(),[n,r]=de(e,["aria-label","onClick"]);return f(hr,G({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{Me(i,n.onClick),t.close()}},r))}function P1(e){let t;const n=ro(),r=Ne({id:n.generateId("content")},e),[o,i]=de(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const u=g=>{o.onPointerDownOutside?.(g),n.modal()&&g.detail.isContextMenu&&g.preventDefault()},l=g=>{o.onFocusOutside?.(g),n.modal()&&g.preventDefault()},c=g=>{o.onInteractOutside?.(g),!n.modal()&&(g.defaultPrevented||(s=!0,g.detail.originalEvent.type==="pointerdown"&&(a=!0)),Ht(n.triggerRef(),g.target)&&g.preventDefault(),g.detail.originalEvent.type==="focusin"&&a&&g.preventDefault())},d=g=>{o.onCloseAutoFocus?.(g),n.modal()?(g.preventDefault(),It(n.triggerRef())):(g.defaultPrevented||(s||It(n.triggerRef()),g.preventDefault()),s=!1,a=!1)};return Ya({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),Za({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),Wa({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),re(()=>ue(n.registerContentId(i.id))),f(j,{get when(){return n.contentPresent()},get children(){return f(ss,G({ref(g){var h=it(p=>{n.setContentRef(p),t=p},o.ref);typeof h=="function"&&h(g)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return J(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:c,get onDismiss(){return n.close}},i))}})}function $1(e){const t=ro(),n=Ne({id:t.generateId("description")},e),[r,o]=de(n,["id"]);return re(()=>ue(t.registerDescriptionId(r.id))),f(Fe,G({as:"p",get id(){return r.id}},o))}function L1(e){const t=ro(),[n,r]=de(e,["ref","style","onPointerDown"]),o=i=>{Me(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return f(j,{get when(){return t.overlayPresent()},get children(){return f(Fe,G({as:"div",ref(i){var s=it(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return bn({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:o},r))}})}function F1(e){const t=ro();return f(j,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return f(Ji,e)}})}var fg={dismiss:"Dismiss"};function B1(e){const t=`dialog-${Pt()}`,n=Ne({id:t,modal:!0,translations:fg},e),[r,o]=T(),[i,s]=T(),[a,u]=T(),[l,c]=T(),[d,g]=T(),[h,p]=T(),m=Co({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:E=>n.onOpenChange?.(E)}),y=()=>n.forceMount||m.isOpen(),{present:v}=Gn({show:y,element:()=>l()??null}),{present:b}=Gn({show:y,element:()=>d()??null}),w={translations:()=>n.translations??fg,isOpen:m.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??w.modal(),contentId:r,titleId:i,descriptionId:a,triggerRef:h,overlayRef:l,setOverlayRef:c,contentRef:d,setContentRef:g,overlayPresent:v,contentPresent:b,close:m.close,toggle:m.toggle,setTriggerRef:p,generateId:gn(()=>n.id),registerContentId:xt(o),registerTitleId:xt(s),registerDescriptionId:xt(u)};return f(N1.Provider,{value:w,get children(){return n.children}})}function z1(e){const t=ro(),n=Ne({id:t.generateId("title")},e),[r,o]=de(n,["id"]);return re(()=>ue(t.registerTitleId(r.id))),f(Fe,G({as:"h2",get id(){return r.id}},o))}function U1(e){const t=ro(),[n,r]=de(e,["ref","onClick"]);return f(hr,G({ref(i){var s=it(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return J(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{Me(i,n.onClick),t.toggle()}},r))}var Ir=Object.assign(B1,{CloseButton:M1,Content:P1,Description:$1,Overlay:L1,Portal:F1,Title:z1,Trigger:U1}),C3={};Dn(C3,{Checkbox:()=>Gr,Control:()=>j1,Description:()=>q1,ErrorMessage:()=>H1,Indicator:()=>G1,Input:()=>V1,Label:()=>W1,Root:()=>Y1,useCheckboxContext:()=>So});var K1=mt();function So(){const e=gt(K1);if(e===void 0)throw new Error("[kobalte]: `useCheckboxContext` must be used within a `Checkbox` component");return e}function j1(e){const t=Bn(),n=So(),r=Ne({id:n.generateId("control")},e),[o,i]=de(r,["onClick","onKeyDown"]);return f(Fe,G({as:"div",onClick:u=>{Me(u,o.onClick),n.toggle(),n.inputRef()?.focus({preventScroll:!0})},onKeyDown:u=>{Me(u,o.onKeyDown),u.key===Oa.Space&&(n.toggle(),n.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),()=>n.dataset(),i))}function q1(e){const t=So();return f(as,G(()=>t.dataset(),e))}function H1(e){const t=So();return f(us,G(()=>t.dataset(),e))}function G1(e){const t=Bn(),n=So(),[r,o]=T(),i=Ne({id:n.generateId("indicator")},e),[s,a]=de(i,["ref","forceMount"]),{present:u}=Gn({show:()=>s.forceMount||n.indeterminate()||n.checked(),element:()=>r()??null});return f(j,{get when(){return u()},get children(){return f(Fe,G({as:"div",ref(l){var c=it(o,s.ref);typeof c=="function"&&c(l)}},()=>t.dataset(),()=>n.dataset(),a))}})}function V1(e){let t;const n=Bn(),r=So(),o=Ne({id:r.generateId("input")},e),[i,s,a]=de(o,["ref","style","onChange","onFocus","onBlur"],xb),{fieldProps:u}=_b(s),[l,c]=T(!1),d=p=>{if(Me(p,i.onChange),p.stopPropagation(),!l()){const m=p.target;r.setIsChecked(m.checked),m.checked=r.checked()}c(!1)},g=p=>{Me(p,i.onFocus),r.setIsFocused(!0)},h=p=>{Me(p,i.onBlur),r.setIsFocused(!1)};return re(pt([()=>r.checked(),()=>r.value()],()=>{c(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),re(pt([()=>t,()=>r.indeterminate(),()=>r.checked()],([p,m])=>{p&&(p.indeterminate=m)})),f(Fe,G({as:"input",ref(p){var m=it(y=>{r.setInputRef(y),t=y},i.ref);typeof m=="function"&&m(p)},type:"checkbox",get id(){return u.id()},get name(){return n.name()},get value(){return r.value()},get checked(){return r.checked()},get required(){return n.isRequired()},get disabled(){return n.isDisabled()},get readonly(){return n.isReadOnly()},get style(){return bn(Na,i.style)},get"aria-label"(){return u.ariaLabel()},get"aria-labelledby"(){return u.ariaLabelledBy()},get"aria-describedby"(){return u.ariaDescribedBy()},get"aria-invalid"(){return n.validationState()==="invalid"||void 0},get"aria-required"(){return n.isRequired()},get"aria-disabled"(){return n.isDisabled()},get"aria-readonly"(){return n.isReadOnly()},onChange:d,onFocus:g,onBlur:h},()=>n.dataset(),()=>r.dataset(),a))}function W1(e){const t=So();return f(gd,G(()=>t.dataset(),e))}function Y1(e){let t;const n=`checkbox-${Pt()}`,r=Ne({value:"on",id:n},e),[o,i,s]=de(r,["ref","children","value","checked","defaultChecked","indeterminate","onChange","onPointerDown"],ld),[a,u]=T(),[l,c]=T(!1),{formControlContext:d}=cd(i),g=F0({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:y=>o.onChange?.(y),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});hd(()=>t,()=>g.setIsSelected(o.defaultChecked??!1));const h=y=>{Me(y,o.onPointerDown),l()&&y.preventDefault()},p=ne(()=>({"data-checked":g.isSelected()?"":void 0,"data-indeterminate":o.indeterminate?"":void 0})),m={value:()=>o.value,dataset:p,checked:()=>g.isSelected(),indeterminate:()=>o.indeterminate??!1,inputRef:a,generateId:gn(()=>ee(i.id)),toggle:()=>g.toggle(),setIsChecked:y=>g.setIsSelected(y),setIsFocused:c,setInputRef:u};return f(Ka.Provider,{value:d,get children(){return f(K1.Provider,{value:m,get children(){return f(Fe,G({as:"div",ref(y){var v=it(b=>t=b,o.ref);typeof v=="function"&&v(y)},role:"group",get id(){return ee(i.id)},onPointerDown:h},()=>d.dataset(),p,s,{get children(){return f(S3,{state:m,get children(){return o.children}})}}))}})}})}function S3(e){const t=ii(()=>{const n=e.children;return ts(n)?n(e.state):n});return J(t)}var Gr=Object.assign(Y1,{Control:j1,Description:q1,ErrorMessage:H1,Indicator:G1,Input:V1,Label:W1});function Z1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Z1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function X1(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Z1(e))&&(r&&(r+=" "),r+=t);return r}const k3=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},A3=(e,t)=>({classGroupId:e,validator:t}),J1=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),fa="-",gg=[],T3="arbitrary..",I3=e=>{const t=R3(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return D3(s);const a=s.split(fa),u=a[0]===""&&a.length>1?1:0;return Q1(a,u,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const u=r[s],l=n[s];return u?l?k3(l,u):u:l||gg}return n[s]||gg}}},Q1=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const l=Q1(e,t+1,i);if(l)return l}const s=n.validators;if(s===null)return;const a=t===0?e.join(fa):e.slice(t).join(fa),u=s.length;for(let l=0;l<u;l++){const c=s[l];if(c.validator(a))return c.classGroupId}},D3=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?T3+r:void 0})(),R3=e=>{const{theme:t,classGroups:n}=e;return O3(n,t)},O3=(e,t)=>{const n=J1();for(const r in e){const o=e[r];wd(o,n,r,t)}return n},wd=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];N3(s,t,n,r)}},N3=(e,t,n,r)=>{if(typeof e=="string"){M3(e,t,n);return}if(typeof e=="function"){P3(e,t,n,r);return}$3(e,t,n,r)},M3=(e,t,n)=>{const r=e===""?t:ey(t,e);r.classGroupId=n},P3=(e,t,n,r)=>{if(L3(e)){wd(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(A3(n,e))},$3=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,u]=o[s];wd(u,ey(t,a),n,r)}},ey=(e,t)=>{let n=e;const r=t.split(fa),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=J1(),n.nextPart.set(s,a)),n=a}return n},L3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,F3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},Sc="!",hg=":",B3=[],pg=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),z3=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,u=0,l;const c=o.length;for(let m=0;m<c;m++){const y=o[m];if(s===0&&a===0){if(y===hg){i.push(o.slice(u,m)),u=m+1;continue}if(y==="/"){l=m;continue}}y==="["?s++:y==="]"?s--:y==="("?a++:y===")"&&a--}const d=i.length===0?o:o.slice(u);let g=d,h=!1;d.endsWith(Sc)?(g=d.slice(0,-1),h=!0):d.startsWith(Sc)&&(g=d.slice(1),h=!0);const p=l&&l>u?l-u:void 0;return pg(i,h,g,p)};if(t){const o=t+hg,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):pg(B3,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},U3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",u=t.has(s);a||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},K3=e=>({cache:F3(e.cacheSize),parseClassName:z3(e),sortModifiers:U3(e),postfixLookupClassGroupIds:j3(e),...I3(e)}),j3=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},q3=/\s+/,H3=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=t,a=[],u=e.trim().split(q3);let l="";for(let c=u.length-1;c>=0;c-=1){const d=u[c],{isExternal:g,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:y}=n(d);if(g){l=d+(l.length>0?" "+l:l);continue}let v=!!y,b;if(v){const I=m.substring(0,y);b=r(I);const S=b&&s[b]?r(m):void 0;S&&S!==b&&(b=S,v=!1)}else b=r(m);if(!b){if(!v){l=d+(l.length>0?" "+l:l);continue}if(b=r(m),!b){l=d+(l.length>0?" "+l:l);continue}v=!1}const w=h.length===0?"":h.length===1?h[0]:i(h).join(":"),E=p?w+Sc:w,C=E+b;if(a.indexOf(C)>-1)continue;a.push(C);const A=o(b,v);for(let I=0;I<A.length;++I){const S=A[I];a.push(E+S)}l=d+(l.length>0?" "+l:l)}return l},G3=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=ty(n))&&(o&&(o+=" "),o+=r);return o},ty=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ty(e[r]))&&(n&&(n+=" "),n+=t);return n},V3=(e,...t)=>{let n,r,o,i;const s=u=>{const l=t.reduce((c,d)=>d(c),e());return n=K3(l),r=n.cache.get,o=n.cache.set,i=a,a(u)},a=u=>{const l=r(u);if(l)return l;const c=H3(u,n);return o(u,c),c};return i=s,(...u)=>i(G3(...u))},W3=[],qt=e=>{const t=n=>n[e]||W3;return t.isThemeGetter=!0,t},ny=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ry=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Y3=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Z3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,X3=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,J3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Q3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Br=e=>Y3.test(e),nt=e=>!!e&&!Number.isNaN(Number(e)),er=e=>!!e&&Number.isInteger(Number(e)),Cu=e=>e.endsWith("%")&&nt(e.slice(0,-1)),Sr=e=>Z3.test(e),oy=()=>!0,tA=e=>X3.test(e)&&!J3.test(e),xd=()=>!1,nA=e=>Q3.test(e),rA=e=>eA.test(e),oA=e=>!De(e)&&!Oe(e),iA=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),sA=e=>oo(e,ay,xd),De=e=>ny.test(e),co=e=>oo(e,uy,tA),mg=e=>oo(e,hA,nt),aA=e=>oo(e,cy,oy),uA=e=>oo(e,ly,xd),bg=e=>oo(e,iy,xd),lA=e=>oo(e,sy,rA),Ds=e=>oo(e,dy,nA),Oe=e=>ry.test(e),yi=e=>ko(e,uy),cA=e=>ko(e,ly),yg=e=>ko(e,iy),dA=e=>ko(e,ay),fA=e=>ko(e,sy),Rs=e=>ko(e,dy,!0),gA=e=>ko(e,cy,!0),oo=(e,t,n)=>{const r=ny.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ko=(e,t,n=!1)=>{const r=ry.exec(e);return r?r[1]?t(r[1]):n:!1},iy=e=>e==="position"||e==="percentage",sy=e=>e==="image"||e==="url",ay=e=>e==="length"||e==="size"||e==="bg-size",uy=e=>e==="length",hA=e=>e==="number",ly=e=>e==="family-name",cy=e=>e==="number"||e==="weight",dy=e=>e==="shadow",pA=()=>{const e=qt("color"),t=qt("font"),n=qt("text"),r=qt("font-weight"),o=qt("tracking"),i=qt("leading"),s=qt("breakpoint"),a=qt("container"),u=qt("spacing"),l=qt("radius"),c=qt("shadow"),d=qt("inset-shadow"),g=qt("text-shadow"),h=qt("drop-shadow"),p=qt("blur"),m=qt("perspective"),y=qt("aspect"),v=qt("ease"),b=qt("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...E(),Oe,De],A=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],S=()=>[Oe,De,u],k=()=>[Br,"full","auto",...S()],P=()=>[er,"none","subgrid",Oe,De],R=()=>["auto",{span:["full",er,Oe,De]},er,Oe,De],L=()=>[er,"auto",Oe,De],F=()=>["auto","min","max","fr",Oe,De],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...S()],X=()=>[Br,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],se=()=>[Br,"screen","full","dvw","lvw","svw","min","max","fit",...S()],K=()=>[Br,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],U=()=>[e,Oe,De],oe=()=>[...E(),yg,bg,{position:[Oe,De]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",dA,sA,{size:[Oe,De]}],Z=()=>[Cu,yi,co],te=()=>["","none","full",l,Oe,De],he=()=>["",nt,yi,co],W=()=>["solid","dashed","dotted","double"],M=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[nt,Cu,yg,bg],ae=()=>["","none",p,Oe,De],_e=()=>["none",nt,Oe,De],fe=()=>["none",nt,Oe,De],xe=()=>[nt,Oe,De],Te=()=>[Br,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Sr],breakpoint:[Sr],color:[oy],container:[Sr],"drop-shadow":[Sr],ease:["in","out","in-out"],font:[oA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Sr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Sr],shadow:[Sr],spacing:["px",nt],text:[Sr],"text-shadow":[Sr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Br,De,Oe,y]}],container:["container"],"container-type":[{"@container":["","normal","size",Oe,De]}],"container-named":[iA],columns:[{columns:[nt,De,Oe,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{"inset-s":k(),start:k()}],end:[{"inset-e":k(),end:k()}],"inset-bs":[{"inset-bs":k()}],"inset-be":[{"inset-be":k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[er,"auto",Oe,De]}],basis:[{basis:[Br,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[nt,Br,"auto","initial","none",De]}],grow:[{grow:["",nt,Oe,De]}],shrink:[{shrink:["",nt,Oe,De]}],order:[{order:[er,"first","last","none",Oe,De]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...se()]}],"min-inline-size":[{"min-inline":["auto",...se()]}],"max-inline-size":[{"max-inline":["none",...se()]}],"block-size":[{block:["auto",...K()]}],"min-block-size":[{"min-block":["auto",...K()]}],"max-block-size":[{"max-block":["none",...K()]}],w:[{w:[a,"screen",...X()]}],"min-w":[{"min-w":[a,"screen","none",...X()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,yi,co]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,gA,aA]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Cu,De]}],"font-family":[{font:[cA,uA,t]}],"font-features":[{"font-features":[De]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Oe,De]}],"line-clamp":[{"line-clamp":[nt,"none",Oe,mg]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",Oe,De]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,De]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[nt,"from-font","auto",Oe,co]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[nt,"auto",Oe,De]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[er,Oe,De]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,De]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Oe,De]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},er,Oe,De],radial:["",Oe,De],conic:[er,Oe,De]},fA,lA]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[nt,Oe,De]}],"outline-w":[{outline:["",nt,yi,co]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",c,Rs,Ds]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",d,Rs,Ds]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[nt,co]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",g,Rs,Ds]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[nt,Oe,De]}],"mix-blend":[{"mix-blend":[...M(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":M()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[nt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[Oe,De]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[nt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,De]}],filter:[{filter:["","none",Oe,De]}],blur:[{blur:ae()}],brightness:[{brightness:[nt,Oe,De]}],contrast:[{contrast:[nt,Oe,De]}],"drop-shadow":[{"drop-shadow":["","none",h,Rs,Ds]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",nt,Oe,De]}],"hue-rotate":[{"hue-rotate":[nt,Oe,De]}],invert:[{invert:["",nt,Oe,De]}],saturate:[{saturate:[nt,Oe,De]}],sepia:[{sepia:["",nt,Oe,De]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,De]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[nt,Oe,De]}],"backdrop-contrast":[{"backdrop-contrast":[nt,Oe,De]}],"backdrop-grayscale":[{"backdrop-grayscale":["",nt,Oe,De]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[nt,Oe,De]}],"backdrop-invert":[{"backdrop-invert":["",nt,Oe,De]}],"backdrop-opacity":[{"backdrop-opacity":[nt,Oe,De]}],"backdrop-saturate":[{"backdrop-saturate":[nt,Oe,De]}],"backdrop-sepia":[{"backdrop-sepia":["",nt,Oe,De]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,De]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[nt,"initial",Oe,De]}],ease:[{ease:["linear","initial",v,Oe,De]}],delay:[{delay:[nt,Oe,De]}],animate:[{animate:["none",b,Oe,De]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Oe,De]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[Oe,De,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Te()}],"translate-x":[{"translate-x":Te()}],"translate-y":[{"translate-y":Te()}],"translate-z":[{"translate-z":Te()}],"translate-none":["translate-none"],zoom:[{zoom:[er,Oe,De]}],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Oe,De]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":U()}],"scrollbar-track-color":[{"scrollbar-track":U()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Oe,De]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[nt,yi,co,mg]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},mA=V3(pA);function ct(...e){return mA(X1(e))}const _=qc.t,_d=qc.useTranslation;var bA=$("<div>"),yA=$("<div class=min-w-0>");const vA={"top-left":"left-0 top-0 items-start","top-right":"right-0 top-0 items-end","bottom-left":"bottom-0 left-0 items-start","bottom-right":"bottom-0 right-0 items-end","top-center":"left-0 right-0 top-0 items-center","bottom-center":"bottom-0 left-0 right-0 items-center"},wA={default:"border-border",success:"border-success/40 text-success",info:"border-info/40 text-info",warning:"border-warning/40 text-warning",error:"border-destructive/40 text-destructive",loading:"border-border"};function xA(e){switch(e.type){case"success":return f(V_,{class:"h-4 w-4"});case"info":return f(x2,{class:"h-4 w-4"});case"warning":case"error":return f(EE,{class:"h-4 w-4"});case"loading":return f(on,{class:"h-4 w-4 animate-spin"});default:return null}}function _A(e){return f(po,{get toastId(){return e.toastId},get duration(){return e.duration},get persistent(){return e.persistent},get priority(){return e.priority},get class(){return ct("pointer-events-auto relative inline-flex w-fit max-w-[calc(100vw-2rem)] items-start gap-3 overflow-hidden rounded-md border bg-background px-4 py-3 text-sm text-foreground shadow-lg outline-none","data-[closed]:animate-out data-[opened]:animate-in data-[closed]:fade-out-0 data-[opened]:fade-in-0 data-[closed]:zoom-out-95 data-[opened]:zoom-in-95","data-[swipe=move]:translate-x-[var(--kb-toast-swipe-move-x)] data-[swipe=move]:translate-y-[var(--kb-toast-swipe-move-y)] data-[swipe=move]:transition-none","data-[swipe=end]:animate-out data-[swipe=end]:fade-out-0 sm:max-w-md")},get children(){return[(()=>{var t=bA();return x(t,f(xA,{get type(){return e.type}})),$e(()=>kt(t,ct("shrink-0 self-center",wA[e.type]))),t})(),(()=>{var t=yA();return x(t,f(po.Title,{class:"font-medium leading-5",get children(){return e.title}}),null),x(t,(()=>{var n=J(()=>!!e.description);return()=>n()?f(po.Description,{class:"mt-1 max-w-[22rem] leading-5 text-muted-foreground",get children(){return e.description}}):null})(),null),t})(),f(po.CloseButton,{class:"ml-2 inline-flex h-5 w-5 shrink-0 self-center items-center justify-center rounded-sm text-muted-foreground opacity-70 transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring",get"aria-label"(){return _("common.close")},get children(){return f(eo,{class:"h-4 w-4"})}})]}})}function Po(e,t,n={}){return Ki.show(r=>f(_A,{get toastId(){return r.toastId},type:e,title:t,get description(){return n.description},get duration(){return n.duration},get persistent(){return n.persistent},get priority(){return n.priority}}),{region:n.region})}const Xt=Object.assign((e,t)=>Po("default",e,t),{success:(e,t)=>Po("success",e,t),info:(e,t)=>Po("info",e,t),warning:(e,t)=>Po("warning",e,t),error:(e,t)=>Po("error",e,t),loading:(e,t)=>Po("loading",e,t),dismiss:e=>{if(typeof e=="number")return Ki.dismiss(e);Ki.clear()}}),EA=e=>{const[t,n]=de(e,["position","duration","visibleToasts","class"]);return f(po.Region,G({get duration(){return t.duration??5e3},get limit(){return t.visibleToasts??3},swipeDirection:"right",get class(){return ct("!pointer-events-none fixed z-[100] flex max-h-screen w-full flex-col gap-2 p-4 sm:p-6",vA[t.position??"bottom-right"],t.class)}},n,{get children(){return f(po.List,{class:"flex w-fit max-w-full flex-col gap-2 outline-none"})}}))};async function fy(e){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(eC(e)),Xt.success(_("specDetail.specPathCopied"))}catch{Xt.error(_("specDetail.specPathCopyFailed"))}}function CA(e,t){return e.some(n=>n.status==="running")||t.some(n=>n.running)}async function vg(e,t){const[n,r]=await Promise.all([t.listCommandRuns(e),t.listSessions(e)]);return!CA(n,r)}function SA(e,t=()=>{}){let n=!1;async function r(o){if(!n){n=!0,t(!0);try{return await o()}finally{n=!1,t(!1)}}}return{async check(o){const i=await r(()=>vg(o,e));return i===void 0?"busy":i?"allowed":"running"},async merge(o,i){return await r(async()=>await vg(o,e)?{status:"merged",value:await i()}:{status:"blocked",reason:"running"})??{status:"blocked",reason:"busy"}}}}const wg=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xg=X1,gy=(e,t)=>n=>{var r;if(t?.variants==null)return xg(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(l=>{const c=n?.[l],d=i?.[l];if(c===null)return null;const g=wg(c)||wg(d);return o[l][g]}),a=n&&Object.entries(n).reduce((l,c)=>{let[d,g]=c;return g===void 0||(l[d]=g),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:d,className:g,...h}=c;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...l,d,g]:l},[]);return xg(e,s,u,n?.class,n?.className)},kA=gy("inline-flex items-center justify-center rounded-md font-medium transition-[color,background-color,box-shadow] focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-2 text-sm",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),we=e=>{const[t,n]=de(e,["class","variant","size"]);return f(S0,G({get class(){return ct(kA({size:t.size,variant:t.variant}),t.class)}},n))};var AA=$("<div>");const TA=gy("inline-flex items-center rounded-md border px-2.5 py-0.5 text-sm font-semibold transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),hy=e=>{const[t,n]=de(e,["class","variant"]);return(()=>{var r=AA();return gr(r,G({get class(){return ct(TA({variant:t.variant}),t.class)}},n),!1,!1),r})()},fs=()=>{const e=()=>Rr()?_("specDetail.exitFullscreen"):_("specDetail.fullscreen");return f(we,{variant:"outline",size:"sm",class:"h-6 w-6 shrink-0 p-0",onClick:u0,get title(){return e()},get"aria-label"(){return e()},get"aria-pressed"(){return Rr()},get children(){return f(j,{get when(){return Rr()},get fallback(){return f(I2,{class:"h-3 w-3"})},get children(){return f(P2,{class:"h-3 w-3"})}})}})};var IA=$("<input>");const $n=e=>{const[t,n]=de(e,["class"]);return(()=>{var r=IA();return gr(r,G({get class(){return ct("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 shadow-sm transition-shadow file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()},Ed=Tn.Trigger;Tn.Group;const _g=Tn.Sub;Tn.RadioGroup;const Cd=e=>{const t=G({gutter:4,flip:!1},e);return f(Tn,t)},Sd=e=>{const[t,n]=de(e,["class"]);return f(Tn.Portal,{get children(){return f(Tn.Content,G({get class(){return ct("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},rr=e=>{const[t,n]=de(e,["class","inset"]);return f(Tn.Item,G({get class(){return ct("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.inset&&"pl-8",t.class)}},n))},Eg=e=>{const[t,n]=de(e,["class","children"]);return f(Tn.SubTrigger,G({get class(){return ct("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[expanded]:bg-accent data-[expanded]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}},n,{get children(){return[J(()=>t.children),f(Ta,{class:"ml-auto h-4 w-4 text-muted-foreground"})]}}))},Cg=e=>{const[t,n]=de(e,["class"]);return f(Tn.Portal,{get children(){return f(Tn.SubContent,G({get class(){return ct("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus-visible:outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},kc=e=>{const[t,n]=de(e,["class"]);return f(Tn.Separator,G({get class(){return ct("-mx-1 my-1 h-px bg-muted",t.class)}},n))};var DA=$('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close'),py=$("<div>");const cn=Ir;Ir.Trigger;const cr=e=>{const[t,n]=de(e,["class","children"]);return f(Ir.Portal,{get children(){return[f(Ir.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),f(Ir.Content,G({get class(){return ct("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[closed]:duration-200 data-[expanded]:duration-200 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 data-[closed]:slide-out-to-left-1/2 data-[closed]:slide-out-to-top-[48%] data-[expanded]:slide-in-from-left-1/2 data-[expanded]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",t.class)}},n,{get children(){return[J(()=>t.children),f(Ir.CloseButton,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",get children(){return DA()}})]}}))]}})},dr=e=>{const[t,n]=de(e,["class"]);return f(Ir.Title,G({get class(){return ct("text-lg font-semibold text-foreground",t.class)}},n))},eu=e=>{const[t,n]=de(e,["class"]);return f(Ir.Description,G({get class(){return ct(" text-muted-foreground",t.class)}},n))},fr=e=>{const[t,n]=de(e,["class"]);return(()=>{var r=py();return gr(r,G({get class(){return ct("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},Or=e=>{const[t,n]=de(e,["class"]);return(()=>{var r=py();return gr(r,G({get class(){return ct("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)}},n),!1,!1),r})()};var RA=$('<p class="m-0 text-destructive">'),OA=$('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=command-name></label><label class="grid gap-2 text-sm font-medium"for=command-cli>'),NA=$('<div class="flex items-center">'),MA=$('<div class="px-2 py-1.5 text-sm text-muted-foreground">'),PA=$('<span class="flex min-w-0 flex-col"><span class=truncate></span><span class="truncate font-mono text-[11px] text-muted-foreground">'),$A=$('<button type=button class="shrink-0 rounded p-1 opacity-0 transition-opacity hover:bg-muted group-hover:opacity-100">');const LA=e=>{const t=Qr(),[n,{refetch:r}]=en(e.projectId,v=>v?pe.listCommands(v):Promise.resolve([])),[o,i]=T(!1),[s,a]=T(""),[u,l]=T(""),[c,d]=T(!1),[g,h]=T(null);async function p(v){const b=e.projectId();if(b)try{const w=await pe.runCommand(b,v.id);e.onRunStarted?.(),t(Bt(`commands/${encodeURIComponent(w.runId)}`))}catch(w){Xt.error(w.message)}}async function m(v){const b=e.projectId();if(b)try{await pe.deleteCommand(b,v.id),await r()}catch(w){Xt.error(w.message)}}async function y(v){v.preventDefault();const b=e.projectId();if(!b)return;const w=s().trim(),E=u().trim();if(!(!w||!E)){d(!0),h(null);try{await pe.createCommand(b,{name:w,cli:E}),a(""),l(""),i(!1),await r()}catch(C){h(C.message)}finally{d(!1)}}}return(()=>{var v=NA();return x(v,f(Cd,{placement:"bottom-start",get children(){return[f(Ed,{as:we,variant:"ghost",size:"icon",class:"h-8 w-8",get title(){return _("commands.menuTitle")},get children(){return f(yE,{class:"h-4 w-4"})}}),f(Sd,{class:"min-w-56",get children(){return[f(j,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var b=MA();return x(b,()=>_("commands.empty")),b})()},get children(){return f(at,{get each(){return n()??[]},children:b=>f(rr,{class:"group flex items-center justify-between gap-2",onSelect:()=>void p(b),get children(){return[(()=>{var w=PA(),E=w.firstChild,C=E.nextSibling;return x(E,()=>b.name),x(C,()=>b.cli),w})(),(()=>{var w=$A();return w.$$click=E=>{E.stopPropagation(),E.preventDefault(),m(b)},w.$$keydown=E=>E.stopPropagation(),w.$$pointerup=E=>E.stopPropagation(),w.$$pointerdown=E=>E.stopPropagation(),x(w,f(Vc,{class:"h-3.5 w-3.5 text-destructive"})),$e(()=>Ke(w,"title",_("commands.deleteDef"))),w})()]}})})}}),f(kc,{}),f(rr,{onSelect:()=>i(!0),get children(){return[f(Wr,{class:"mr-1 h-4 w-4"}),J(()=>_("commands.add"))]}})]}})]}}),null),x(v,f(cn,{get open(){return o()},onOpenChange:b=>{i(b),b||h(null)},get children(){return f(cr,{class:"max-w-md",get children(){return[f(fr,{get children(){return f(dr,{get children(){return _("commands.addTitle")}})}}),(()=>{var b=OA(),w=b.firstChild,E=w.nextSibling;return b.addEventListener("submit",C=>void y(C)),x(w,()=>_("commands.name"),null),x(w,f($n,{id:"command-name",get value(){return s()},get placeholder(){return _("commands.namePlaceholder")},onInput:C=>a(C.currentTarget.value),get disabled(){return c()}}),null),x(E,()=>_("commands.cli"),null),x(E,f($n,{id:"command-cli",get value(){return u()},get placeholder(){return _("commands.cliPlaceholder")},onInput:C=>l(C.currentTarget.value),get disabled(){return c()}}),null),x(b,f(j,{get when(){return g()},get children(){var C=RA();return x(C,g),C}}),null),x(b,f(Or,{get children(){return[f(we,{type:"button",variant:"outline",onClick:()=>i(!1),get disabled(){return c()},get children(){return _("common.cancel")}}),f(we,{type:"submit",get disabled(){return c()||!s().trim()||!u().trim()},get children(){return J(()=>!!c())()?_("common.submitting"):_("commands.submit")}})]}}),null),b})()]}})}}),null),v})()};Gt(["pointerdown","pointerup","keydown","click"]);var FA=$("<span>");const BA={running:"text-success",exited:"text-muted-foreground",killed:"text-warning",failed:"text-destructive"},my=e=>(()=>{var t=FA();return x(t,()=>_(`commands.status.${e.status}`)),$e(()=>kt(t,`shrink-0 text-xs font-medium ${BA[e.status]} ${e.class??""}`)),t})();var zA=$('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close');const Jo=Hr.Trigger,by=Hr.Title;Hr.Description;const Qo=e=>{const t=G({gutter:4,flip:!1},e);return f(Hr,t)},ei=e=>{const[t,n]=de(e,["class","children","hideCloseButton"]);return f(Hr.Portal,{get children(){return f(Hr.Content,G({get class(){return ct("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n,{get children(){return[J(()=>t.children),f(j,{get when(){return!t.hideCloseButton},get children(){return f(Hr.CloseButton,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",get children(){return zA()}})}})]}}))}})};function yy(e,t,n){const r=Math.max(0,(t??n)-e),o=Math.floor(r/1e3),i=Math.floor(o/3600),s=Math.floor(o%3600/60),a=o%60,u=l=>String(l).padStart(2,"0");return i>0?`${i}:${u(s)}:${u(a)}`:`${s}:${u(a)}`}var UA=$('<section class=mt-3><h2 class="m-0 mb-1.5 text-sm font-medium text-muted-foreground"></h2><ul class="grid list-none gap-2 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),KA=$('<span class="truncate font-medium">'),jA=$('<span class="truncate font-mono text-xs text-muted-foreground">'),qA=$('<span class="ml-auto shrink-0 font-mono text-xs text-muted-foreground">'),HA=$('<p class="m-0 text-sm font-medium">'),GA=$('<p class="mb-3 mt-1 text-xs text-muted-foreground">'),VA=$('<div class="flex justify-end">'),WA=$('<li class="flex items-center gap-3 rounded-lg border bg-card px-3 py-2"><div>');const YA=e=>{const[t,{refetch:n,mutate:r}]=en(e.projectId,h=>h?pe.listCommandRuns(h):Promise.resolve([])),[o,i]=T(Date.now()),[s,a]=T(null),[u,l]=T(null),c=setInterval(()=>i(Date.now()),1e3);ue(()=>clearInterval(c)),re(()=>{e.revision?.(),n()}),re(()=>{const h=e.projectId();if(!h)return;const p=WE(h,m=>r(m));ue(p)});async function d(h){const p=e.projectId();if(p){a(h.runId);try{await pe.clearCommandRun(p,h.runId),await n()}catch(m){Xt.error(m.message)}finally{a(null)}}}async function g(h){const p=e.projectId();if(p){l(h.runId);try{await pe.clearCommandRun(p,h.runId),await pe.runCommand(p,h.commandId),await n()}catch(m){Xt.error(m.message)}finally{l(null)}}}return f(j,{get when(){return(t()??[]).length>0},get children(){var h=UA(),p=h.firstChild,m=p.nextSibling;return x(p,()=>_("commands.running")),x(m,f(at,{get each(){return t()??[]},children:y=>(()=>{var v=WA(),b=v.firstChild;return x(v,f(Kn,{get href(){return Bt(`commands/${encodeURIComponent(y.runId)}`)},class:"flex min-w-0 flex-1 items-center gap-3",get children(){return[f(my,{get status(){return y.status}}),(()=>{var w=KA();return x(w,()=>y.name),w})(),(()=>{var w=jA();return x(w,()=>y.cli),w})(),(()=>{var w=qA();return x(w,()=>yy(y.startedAt,y.endedAt,o())),w})()]}}),b),x(b,f(we,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("commands.restart")},get disabled(){return u()===y.runId||s()===y.runId},onClick:()=>void g(y),get children(){return f(nE,{class:"h-4 w-4"})}}),null),x(b,f(Qo,{get children(){return[f(Jo,{as:we,variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("commands.clear")},get disabled(){return u()===y.runId},get children(){return f(eo,{class:"h-4 w-4"})}}),f(ei,{class:"w-72",get children(){return[(()=>{var w=HA();return x(w,()=>_("commands.clearTitle")),w})(),(()=>{var w=GA();return x(w,()=>_("commands.clearDescription")),w})(),(()=>{var w=VA();return x(w,f(we,{variant:"destructive",size:"sm",get disabled(){return s()===y.runId},onClick:()=>void d(y),get children(){return J(()=>s()===y.runId)()?_("common.deleting"):_("commands.clear")}})),w})()]}})]}}),null),v})()})),h}})};var ZA=$('<span class=" text-muted-foreground">'),XA=$('<span class=" text-destructive">'),JA=$('<div class="mt-2 flex flex-wrap items-center gap-3"><div class="flex items-center gap-2"><span class=" text-muted-foreground">'),QA=$('<ul class="mt-4 grid list-none gap-3 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),eT=$('<div class="py-6 text-center text-sm text-muted-foreground">'),Sg=$('<p class=" text-destructive">'),tT=$('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=merge-commit-message>'),nT=$('<section class="overflow-y-auto p-2"><header class="flex items-center justify-between"><div class="flex items-center gap-2"><h1 class="mr-2 text-xl">'),rT=$('<p class=" text-muted-foreground">'),oT=$('<div class="mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed bg-card p-12"><p>'),iT=$('<div class="flex items-center justify-between text-sm text-muted-foreground"><time>'),sT=$('<h2 class="my-1.5 text-base font-semibold">'),aT=$('<p class="m-0 mb-3 flex-1 text-muted-foreground">'),uT=$('<code class="mt-auto block break-all font-mono text-sm text-muted-foreground">'),lT=$('<li class="group relative flex rounded-xl border bg-card shadow transition-transform hover:-translate-y-px"><div class="absolute right-1.5 top-1.5 z-[2] opacity-0 transition-opacity group-hover:opacity-100">'),kg=$("<span>."),cT=$("<span>");const Su=40,dT=()=>{const e=Qr(),t=_o(),[n,{refetch:r}]=en(t,z=>z?pe.listSpecs(z):Promise.resolve([])),[o,{refetch:i}]=en(()=>pe.listProjects()),s=ne(()=>(o()??[]).find(z=>z.id===t())),a=ne(()=>{const z=s();return z?.worktree?(o()??[]).some(Z=>Z.id===z.worktree.mainProjectId):!0}),u=ne(()=>{const z=s();return z?.worktree?`feat(${z.worktree.branch}): merge from worktree`:""}),[l,c]=T(!1),[d,g]=T(!1),[h,p]=T(null),[m,y]=T(!1),[v,b]=T(""),[w,E]=T(null),[C,A]=T(0),[I,S]=T(!1),[k,P]=T(null),R=SA(pe,g);es(()=>m()||w()!==null);const[L,F]=T(Su),D=ne(()=>(n()??[]).slice(0,L())),B=ne(()=>L()<(n()??[]).length),[N,X]=T(null);re(()=>{t(),F(Su)}),An(()=>{const z=new IntersectionObserver(Z=>{if(!Z.some(he=>he.isIntersecting))return;const te=(n()??[]).length;F(he=>he>=te?he:Math.min(he+Su,te))},{rootMargin:"300px"});re(()=>{const Z=N();L(),Z&&(z.observe(Z),ue(()=>z.unobserve(Z)))}),ue(()=>z.disconnect())});let se=null;re(()=>{const z=t();se?.(),se=null,z&&(se=c0(z,()=>{r()}))}),An(()=>{const z=d0(()=>{(async()=>{const Z=s()?.worktree?.mainProjectId??null;await i();const te=t();!te||(o()??[]).some(W=>W.id===te)||Z&&e(`/${encodeURIComponent(Z)}`)})()});ue(z)}),ue(()=>{se?.(),se=null});async function K(){const z=t();if(!z)return!1;p(null);try{const Z=await R.check(z);return Z==="running"?(p(_("home.runningTasksPreventMerge")),!1):Z==="allowed"}catch(Z){return p(Z.message),!1}}async function U(){s()?.worktree&&a()&&await K()&&(b(u()),p(null),y(!0))}async function oe(){const z=s();if(!z?.worktree||!a())return;const Z=v().trim()||u();p(null);try{const te=await R.merge(z.id,async()=>{c(!0);try{return await pe.mergeWorktreeToMain(z.id,{commitMessage:Z})}finally{c(!1)}});if(te.status==="blocked"){te.reason==="running"&&p(_("home.runningTasksPreventMerge"));return}const he=te.value;y(!1),he.status==="merged"?(Xt.success(_("home.merged")),await i(),e(`/${encodeURIComponent(he.mainProjectId)}`)):(Xt.info(_("home.conflictDispatched")),await i(),e(`/${encodeURIComponent(he.mainProjectId)}/specs/${encodeURIComponent(he.conflictSpecId)}`))}catch(te){p(te.message)}}async function H(z){const Z=t();if(Z){S(!0),P(null);try{await pe.deleteSpec(Z,z),E(null),await r()}catch(te){P(te.message)}finally{S(!1)}}}return(()=>{var z=nT(),Z=z.firstChild,te=Z.firstChild,he=te.firstChild;return x(he,()=>_("home.specList")),x(te,f(LA,{projectId:t,onRunStarted:()=>A(W=>W+1)}),null),x(te,f(we,{as:Kn,get href(){return Bt("git")},variant:"ghost",size:"icon",class:"h-8 w-8",get title(){return _("git.title")},get children(){return f(Gc,{class:"h-4 w-4"})}}),null),x(Z,f(fs,{}),null),x(z,f(YA,{projectId:t,revision:C}),null),x(z,f(j,{get when(){return s()?.worktree},get children(){var W=JA(),M=W.firstChild,Y=M.firstChild;return x(Y,()=>_("home.mainProject"),null),x(Y,()=>s().worktree.mainPath.split("/").filter(Boolean).pop()??s().worktree.mainPath,null),x(W,f(we,{variant:"default",size:"sm",onClick:()=>void U(),get disabled(){return l()||d()||!a()},get title(){return J(()=>!!a())()?_("home.mergeHint"):_("home.mainUnreachable")},get children(){return[f(n0,{class:"mr-1 h-3.5 w-3.5"}),J(()=>J(()=>!!l())()?_("home.merging"):_("home.mergeToMain"))]}}),null),x(W,f(j,{get when(){return!a()},get children(){var ae=ZA();return x(ae,()=>_("home.mainUnreachable")),ae}}),null),x(W,f(j,{get when(){return h()},get children(){var ae=XA();return x(ae,h),ae}}),null),W}}),null),x(z,f(Ca,{get fallback(){return(()=>{var W=rT();return x(W,()=>_("common.loading")),W})()},get children(){return f(j,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var W=oT(),M=W.firstChild;return x(M,()=>_("home.noSpecs")),x(W,f(we,{as:Kn,get href(){return Bt("specs/new")},variant:"default",size:"sm",get children(){return[f(Wr,{class:"mr-1 h-4 w-4"}),J(()=>_("home.createFirst"))]}}),null),W})()},get children(){return[(()=>{var W=QA();return x(W,f(at,{get each(){return D()},children:M=>{const Y=g0(M.id);return(()=>{var ae=lT(),_e=ae.firstChild;return x(ae,f(Kn,{get href(){return Bt(`specs/${encodeURIComponent(M.id)}`)},class:"flex min-h-40 flex-1 flex-col p-4",get children(){return[(()=>{var fe=iT(),xe=fe.firstChild;return x(fe,f(hy,{variant:"outline",get class(){return`font-mono ${XE[M.stage]??"bg-muted text-muted-foreground border-border"} uppercase tracking-wider`},get children(){return M.stage}}),xe),x(xe,()=>f0(M.updated_at)),fe})(),(()=>{var fe=sT();return x(fe,()=>M.title||_("common.pendingAgent")),fe})(),(()=>{var fe=aT();return x(fe,()=>M.summary||_("common.pendingAgent")),fe})(),(()=>{var fe=uT();return x(fe,f(j,{when:Y,get fallback(){return M.id},children:xe=>[(()=>{var Te=kg(),bt=Te.firstChild;return x(Te,()=>xe().prefix,bt),Te})(),(()=>{var Te=cT();return x(Te,()=>xe().type),$e(()=>kt(Te,`font-semibold ${JE[xe().type]??"text-foreground"}`)),Te})(),(()=>{var Te=kg();return Te.firstChild,x(Te,()=>xe().suffix,null),Te})()]})),fe})()]}}),_e),x(_e,f(Cd,{placement:"bottom-end",get children(){return[f(Ed,{as:we,variant:"ghost",size:"icon",class:"h-7 w-7",get title(){return _("home.moreActions")},get children(){return f(i2,{class:"h-4 w-4"})}}),f(Sd,{get children(){return[f(rr,{onSelect:()=>void fy(M.id),get children(){return _("home.copySpecPath")}}),f(rr,{class:"text-destructive focus:text-destructive",onSelect:()=>E(M.id),get children(){return _("common.delete")}})]}})]}})),ae})()}})),W})(),f(j,{get when(){return B()},get children(){var W=eT();return Hn(M=>X(M),W),x(W,()=>_("common.loading")),W}})]}})}}),null),x(z,f(cn,{get open(){return m()},onOpenChange:W=>{y(W),W||p(null)},get children(){return f(cr,{class:"max-w-md",get children(){return[f(fr,{get children(){return[f(dr,{get children(){return _("home.mergeDialogTitle")}}),f(eu,{get children(){return _("home.mergeDialogDescription")}})]}}),(()=>{var W=tT(),M=W.firstChild;return W.addEventListener("submit",Y=>{Y.preventDefault(),oe()}),x(M,()=>_("home.mergeCommitMessage"),null),x(M,f($n,{id:"merge-commit-message",get value(){return v()},onInput:Y=>b(Y.currentTarget.value),get disabled(){return l()}}),null),x(W,f(j,{get when(){return h()},get children(){var Y=Sg();return x(Y,h),Y}}),null),x(W,f(Or,{get children(){return[f(we,{type:"button",variant:"outline",onClick:()=>y(!1),get disabled(){return l()},get children(){return _("common.cancel")}}),f(we,{type:"submit",get disabled(){return l()||d()||!a()},get children(){return J(()=>!!l())()?_("home.merging"):_("home.mergeToMain")}})]}}),null),W})()]}})}}),null),x(z,f(cn,{get open(){return w()!==null},onOpenChange:W=>{W||(E(null),P(null))},get children(){return f(cr,{class:"max-w-sm",get children(){return[f(fr,{get children(){return f(dr,{get children(){return _("home.confirmDeleteSpec")}})}}),f(j,{get when(){return k()},get children(){var W=Sg();return x(W,k),W}}),f(Or,{get children(){return[f(we,{variant:"outline",onClick:()=>E(null),get disabled(){return I()},get children(){return _("common.cancel")}}),f(we,{variant:"destructive",onClick:()=>w()&&void H(w()),get disabled(){return I()},get children(){return J(()=>!!I())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),z})()},vy="",fT=10*1024*1024,Vo=10;function gT(e){const t=e.type;return t.startsWith("image/")?"image":t==="application/pdf"?"pdf":t==="text/plain"||t==="text/markdown"||t===""&&/\.(md|markdown|txt)$/i.test(e.name)?"text":"file"}function hT(e){return e.type?e:/\.md$/i.test(e.name)||/\.markdown$/i.test(e.name)?new File([e],e.name,{type:"text/markdown"}):/\.txt$/i.test(e.name)?new File([e],e.name,{type:"text/plain"}):e}function Ag(e){const t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}function pT(){return Math.random().toString(36).slice(2,8)}function wy(e){const t=e.labels,[n,r]=T([]),[o,i]=T(null),[s,a]=T(null),[u,l]=T(null),[c,d]=T(""),g=ne(()=>n().length),h=ne(()=>n().some(R=>R.status==="pending")),p=ne(()=>n().some(R=>R.status==="failed"));ue(()=>{for(const R of n())R.previewUrl&&URL.revokeObjectURL(R.previewUrl)});async function m(){const R=o();if(R)return R;const{draftId:L}=await pe.createDraft(e.projectId());return i(L),L}function y(R){r(L=>[...L,R])}function v(R,L){r(F=>F.map(D=>D.id===R?{...D,...L}:D))}function b(R){r(L=>{const F=[];for(const D of L){if(D.id===R){D.previewUrl&&URL.revokeObjectURL(D.previewUrl);continue}F.push(D)}return F})}async function w(R){a(null);const L=n(),F=Vo-L.length;if(F<=0){a(t.attachmentLimit(Vo));return}const D=[];for(const B of R.slice(0,F)){const N=hT(B),X=gT(N);if(N.size>fT){a(t.fileTooLarge(N.name));continue}const se=`att-${Date.now()}-${pT()}`,K=X==="image"?URL.createObjectURL(N):void 0;D.push({id:se,file:N,name:N.name,kind:X,previewUrl:K,status:"pending"})}if(D.length!==0){R.length>F&&a(t.attachmentRoomLimit(F,L.length,Vo));for(const B of D)y(B);try{const B=await m();for(const N of D)try{const X=await pe.uploadAttachment(e.projectId(),B,N.file);v(N.id,{storedName:X.storedName,name:X.storedName,status:"uploaded"})}catch(X){v(N.id,{status:"failed",error:X.message})}}catch(B){a(B.message);for(const N of D)v(N.id,{status:"failed",error:B.message})}}}async function E(R){const L=R.currentTarget;if(!L.files)return;const F=Array.from(L.files);L.value="",await w(F)}async function C(R){const L=R.clipboardData?.items;if(!L)return;const F=[];for(const D of Array.from(L))if(D.kind==="file"&&D.type.startsWith("image/")){const B=D.getAsFile();B&&F.push(B)}F.length!==0&&(R.preventDefault(),await w(F))}async function A(R){const L=n().find(F=>F.id===R);if(L){if(L.storedName&&o())try{await pe.deleteAttachment(e.projectId(),o(),L.storedName)}catch(F){a(F.message)}b(R)}}function I(R){d(Ag(R.name)),l(R.id)}async function S(R){const L=c().trim();if(l(null),!(!L||!R.storedName||!o())&&L!==Ag(R.name))try{const F=await pe.renameAttachment(e.projectId(),o(),R.storedName,L);v(R.id,{storedName:F.storedName,name:F.storedName})}catch(F){a(F.message)}}function k(){l(null)}function P(){const R=vt(n);for(const L of R)L.previewUrl&&URL.revokeObjectURL(L.previewUrl);R.length>0&&r([]),i(null),l(null),d(""),a(null)}return{attachments:n,draftId:o,error:s,setError:a,count:g,hasPending:h,hasFailed:p,renamingId:u,renameDraft:c,setRenameDraft:d,addFiles:w,onFileInputChange:E,onPaste:C,removeAttachment:A,beginRename:I,commitRename:S,cancelRename:k,reset:P}}const xy={attachmentLimit:e=>_("newSpec.attachmentLimit",{max:e}),unsupportedType:e=>_("newSpec.unsupportedType",{name:e}),unsupportedMime:e=>_("newSpec.unsupportedMime",{mime:e}),fileTooLarge:e=>_("newSpec.fileTooLarge",{name:e}),attachmentRoomLimit:(e,t,n)=>_("newSpec.attachmentRoomLimit",{room:e,current:t,max:n})},mT=150,bT=16,yT=48,vT=24,wT=8;function ku(e){return e.replace(/^\/+/,"")}function xT(e,t){return t===0?!0:/[\s/_.-]/.test(e[t-1]??"")}function Tg(e,t){if(!e)return 0;const n=e.toLowerCase(),r=t.toLowerCase();let o=0,i=-1;for(let s=0;s<n.length;s++){const a=r.indexOf(n[s],i+1);if(a===-1)return null;o+=bT,a===s&&(o+=yT),a===i+1&&(o+=vT),xT(t,a)&&(o+=wT),o-=Math.max(0,a-i-1),i=a}return o-t.length*.01}function _T(e,t){const n=ku(e.trim());if(!n)return 0;const r=Tg(n,ku(t.value)),o=t.label?Tg(n,ku(t.label)):null;return r==null?o:o==null?r:Math.max(r,o)}function ET(e,t){return t?e.map((n,r)=>{const o=_T(t,n);return o==null?null:{cmd:n,score:o,index:r}}).filter(n=>n!=null).sort((n,r)=>r.score-n.score||n.index-r.index).map(n=>n.cmd):e}function CT(e,t,n){const r=e.slice(0,t);if(n&&/^\/[\w-]*$/.test(r))return{kind:"slash",query:r.slice(1)};const o=r.lastIndexOf("@");if(o===-1)return null;const i=r.slice(o+1);return/^[\w./@-]*$/.test(i)?{kind:"mention",start:o,query:i}:null}function Ig(e,t,n){const r=t.kind==="slash"?0:t.start,o=e.slice(0,r),i=e.slice(r+1+t.query.length);return{next:o+n+i,cursorPos:o.length+n.length}}function ST(e){return e.kind==="mention"?`@${e.value}`:e.replacement??`${e.value} `}function kT(e){const[t,n]=T(!1),[r,o]=T([]),[i,s]=T(0),[a,u]=T(!1);let l=null,c=null;ue(()=>{c&&clearTimeout(c)});function d(){n(!1),u(!1),o([]),s(0),l=null,c&&(clearTimeout(c),c=null)}function g(b){c&&clearTimeout(c),c=setTimeout(async()=>{const w=e.projectId();if(w)try{const E=await pe.listFiles(w,b);if(l?.kind!=="mention"||l.query!==b)return;o(E.items.map(C=>({kind:"mention",value:C}))),s(0)}catch{o([])}},e.searchDebounceMs??mT)}function h(b){const w=e.slashCommands?.()??[],E=ET(w,b).map(C=>({kind:"slash",value:C.value,label:C.label??C.value,description:C.description,replacement:C.replacement,action:C.action,customId:C.customId,editable:C.editable,editLabel:C.editLabel,deletable:C.deletable,deleteLabel:C.deleteLabel,icon:C.icon,command:C}));o(E),s(0),E.length>0?(u(!1),n(!0)):e.slashEmptyEnabled?.()?(u(!0),n(!0)):d()}function p(b){const w=(e.slashCommands?.()??[]).length>0,E=CT(b.value,b.selectionStart,w);if(!E){d();return}if(l=E,E.kind==="slash"){h(E.query);return}u(!1),t()||n(!0),g(E.query)}function m(b){const w=l;if(!w)return{kind:"noop"};if(b.kind==="slash"&&b.action==="add"){const{next:A}=Ig(e.value(),w,"");return e.onValueChange(A),d(),{kind:"action",command:b.command}}const{next:E,cursorPos:C}=Ig(e.value(),w,ST(b));return e.onValueChange(E),d(),{kind:"text",cursorPos:C}}function y(b){const w=r();w.length!==0&&s(E=>(E+b+w.length)%w.length)}function v(b){if(!b)return;const w=r().filter(E=>E.kind!=="slash"||E.customId!==b);o(w),s(E=>Math.min(E,Math.max(0,w.length-1))),w.length===0&&d()}return{open:t,items:r,index:i,setIndex:s,slashEmpty:a,handleInput:p,select:m,close:d,moveIndex:y,removeSlashItem:v}}var AT=$("<textarea>");const Ac=e=>{const[t,n]=de(e,["class"]);return(()=>{var r=AT();return gr(r,G({get class(){return ct("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 shadow-sm transition-shadow placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()},Dg=1.5,_y=2,TT=10;function IT(e,t=_y,n=TT){if(!e)return;const r=getComputedStyle(e),o=parseFloat(r.fontSize)||14,i=r.lineHeight==="normal"?o*Dg:parseFloat(r.lineHeight)||o*Dg,s=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),a=i*t+s,u=i*n+s;e.style.height="auto",e.style.height=`${Math.min(Math.max(e.scrollHeight,a),u)}px`,e.style.overflowY=e.scrollHeight>u?"auto":"hidden"}const ga=e=>{const[t,n]=de(e,["minRows","maxRows","class","ref","onInput"]);let r;const o=()=>IT(r,t.minRows,t.maxRows),i=a=>{r=a;const u=t.ref;typeof u=="function"&&u(a)},s=a=>{const u=t.onInput;typeof u=="function"?u(a):Array.isArray(u)&&u[0](u[1],a),o()};return An(()=>{o(),requestAnimationFrame(o)}),re(pt(()=>e.value,o)),f(Ac,G({ref:i,get class(){return ct("min-h-0 resize-none",t.class)},get rows(){return t.minRows??_y},onInput:s},n))};var DT=$('<li class="px-3 py-1.5 text-sm text-muted-foreground">'),RT=$('<ul class="absolute bottom-full left-0 right-0 z-[100] m-0 max-h-60 list-none overflow-y-auto rounded-lg border bg-card py-1 shadow-lg">'),OT=$('<div class="relative w-full">'),NT=$("<span>"),MT=$('<div class="mr-1 flex shrink-0 items-center gap-0.5">'),PT=$('<li><button type=button class="flex min-w-0 flex-1 items-center gap-2 overflow-hidden border-0 bg-transparent px-3 py-1.5 text-left text-sm text-inherit"><span class="min-w-0 flex-1"><span class="block overflow-hidden text-ellipsis whitespace-nowrap">');const $T=150,tu=e=>{let t,n=[],r=null;ue(()=>{r&&clearTimeout(r)});const o=kT({projectId:()=>e.projectId,value:()=>e.value,onValueChange:c=>e.onValueChange(c),slashCommands:()=>e.slashCommands??[],slashEmptyEnabled:()=>!!e.slashEmptyLabel});function i(c){n=[];const d=o.select(c);if(d.kind!=="noop"){if(d.kind==="action"){e.onSlashCommandAction?.(d.command),requestAnimationFrame(()=>t?.focus());return}requestAnimationFrame(()=>{t&&(t.focus(),t.setSelectionRange(d.cursorPos,d.cursorPos))})}}function s(c){c.kind==="slash"&&(e.onDeleteSlashCommand?.(c.command),c.customId&&o.removeSlashItem(c.customId))}function a(c){c.kind==="slash"&&(e.onEditSlashCommand?.(c.command),o.close(),requestAnimationFrame(()=>t?.focus()))}function u(){n[o.index()]?.scrollIntoView({block:"nearest"})}function l(c){const d=o.items();if(o.open()&&d.length>0){if(c.key==="ArrowDown"){c.preventDefault(),o.moveIndex(1),requestAnimationFrame(u);return}if(c.key==="ArrowUp"){c.preventDefault(),o.moveIndex(-1),requestAnimationFrame(u);return}if(c.key==="Enter"||c.key==="Tab"){if(!c.isComposing){c.preventDefault(),i(d[o.index()]);return}}else if(c.key==="Escape"){c.preventDefault(),o.close();return}}e.onKeyDown?.(c)}return(()=>{var c=OT();return x(c,f(ga,{ref(d){var g=t;typeof g=="function"?g(d):t=d},get minRows(){return e.minRows},get maxRows(){return e.maxRows},get value(){return e.value},get placeholder(){return e.placeholder},get disabled(){return e.disabled},get required(){return e.required},get autofocus(){return e.autofocus},get class(){return e.class},onInput:d=>{e.onValueChange(d.currentTarget.value),n=[],o.handleInput(d.currentTarget)},onKeyDown:l,onPaste:d=>e.onPaste?.(d),onBlur:()=>{r&&clearTimeout(r),r=setTimeout(o.close,$T)}}),null),x(c,f(j,{get when(){return J(()=>!!o.open())()&&(o.items().length>0||o.slashEmpty())},get children(){var d=RT();return x(d,f(j,{get when(){return o.slashEmpty()},get children(){var g=DT();return x(g,()=>e.slashEmptyLabel),g}}),null),x(d,f(at,{get each(){return o.items()},children:(g,h)=>(()=>{var p=PT(),m=p.firstChild,y=m.firstChild,v=y.firstChild;return p.addEventListener("mouseenter",()=>o.setIndex(h())),Hn(b=>n[h()]=b,p),m.$$mousedown=b=>{b.preventDefault(),i(g)},x(m,f(j,{get when(){return J(()=>g.kind==="slash")()&&g.icon==="plus"},get children(){return f(Wr,{class:"h-3.5 w-3.5 shrink-0"})}}),y),x(v,(()=>{var b=J(()=>g.kind==="slash");return()=>b()?g.label:g.value})()),x(y,f(j,{get when(){return J(()=>g.kind==="slash")()&&g.description},get children(){var b=NT();return x(b,(()=>{var w=J(()=>g.kind==="slash");return()=>w()?g.description:""})()),$e(()=>kt(b,ct("block overflow-hidden text-ellipsis whitespace-nowrap text-xs",o.index()===h()?"text-primary-foreground/80":"text-muted-foreground"))),b}}),null),x(p,f(j,{get when(){return J(()=>g.kind==="slash")()&&(g.editable||g.deletable)},get children(){var b=MT();return x(b,f(j,{get when(){return J(()=>g.kind==="slash")()&&g.editable},get children(){return f(we,{type:"button",variant:"ghost",size:"sm",tabIndex:-1,get title(){return J(()=>g.kind==="slash")()?g.editLabel:void 0},get class(){return ct("h-7 w-7 p-0",o.index()===h()?"text-primary-foreground hover:bg-primary-foreground/20 hover:text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},onMouseDown:w=>{w.preventDefault(),w.stopPropagation(),a(g)},get children(){return f(o0,{class:"h-3.5 w-3.5"})}})}}),null),x(b,f(j,{get when(){return J(()=>g.kind==="slash")()&&g.deletable},get children(){return f(we,{type:"button",variant:"ghost",size:"sm",tabIndex:-1,get title(){return J(()=>g.kind==="slash")()?g.deleteLabel:void 0},get class(){return ct("h-7 w-7 p-0",o.index()===h()?"text-primary-foreground hover:bg-primary-foreground/20 hover:text-primary-foreground":"text-destructive hover:bg-destructive/10 hover:text-destructive")},onMouseDown:w=>{w.preventDefault(),w.stopPropagation(),s(g)},get children(){return f(Vc,{class:"h-3.5 w-3.5"})}})}}),null),b}}),null),$e(b=>{var w=ct("flex items-center",o.index()===h()?"bg-primary text-primary-foreground":"text-foreground hover:bg-accent hover:text-accent-foreground"),E=g.kind==="slash"&&g.description?g.description:g.value;return w!==b.e&&kt(p,b.e=w),E!==b.t&&Ke(m,"title",b.t=E),b},{e:void 0,t:void 0}),p})()}),null),d}}),null),c})()};Gt(["mousedown"]);const kd=qi.Trigger,Ad=e=>{const t=G({gutter:4,flip:!1},e);return f(qi,t)},Td=e=>{const[t,n]=de(e,["class"]);return f(qi.Portal,{get children(){return f(qi.Content,G({get class(){return ct("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})};var LT=$('<img class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg">');const Ey=e=>f(cn,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return f(cn.Portal,{get children(){return[f(cn.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),f(cn.Content,{class:"group fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",get children(){return[f(j,{get when(){return e.src},get children(){var t=LT();return $e(n=>{var r=e.src,o=e.alt;return r!==n.e&&Ke(t,"src",n.e=r),o!==n.t&&Ke(t,"alt",n.t=o),n},{e:void 0,t:void 0}),t}}),f(cn.CloseButton,{class:"absolute right-2 top-2 flex h-7 w-7 items-center justify-center rounded-full bg-background/80 text-foreground opacity-0 shadow ring-offset-background transition hover:bg-background focus:outline-none focus-visible:opacity-100 focus-visible:ring-[1.5px] focus-visible:ring-ring focus-visible:ring-offset-2 group-hover:opacity-100","aria-label":"Close",get children(){return f(eo,{class:"h-4 w-4"})}})]}})]}})}});var FT=$('<ul class="m-0 flex list-none flex-wrap gap-2 p-0">'),Cy=$('<img class="h-full w-full object-cover">'),BT=$('<div class="absolute inset-0 flex items-center justify-center bg-background/50">'),zT=$('<li class="group relative shrink-0"><button type=button class="absolute right-0 top-0 z-10 flex h-4 w-4 items-center justify-center rounded-bl bg-background/80 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0">'),UT=$('<span class="text-xs font-bold text-muted-foreground">'),KT=$('<ul class="m-0 grid list-none gap-2 [grid-template-columns:repeat(auto-fill,minmax(180px,1fr))]">'),jT=$('<li><div class="flex h-14 w-14 items-center justify-center overflow-hidden rounded-md bg-card"></div><div class="flex min-w-0 flex-col"><span class="text-sm text-muted-foreground">'),qT=$('<span class="rounded border border-border bg-background px-1 py-0.5 text-sm font-bold text-muted-foreground">'),HT=$('<button type=button class="cursor-pointer overflow-hidden whitespace-nowrap border-0 bg-transparent p-0 text-left text-ellipsis hover:underline disabled:cursor-default disabled:no-underline">');function Sy(e){return e==="pdf"?"PDF":e==="text"?"TXT":"FILE"}function GT(e){return e.status==="pending"?`${e.name} · ${_("newSpec.uploading")}`:e.status==="failed"?`${e.name} · ${_("newSpec.uploadFailed",{error:e.error})}`:`${e.name} · ${Math.round(e.file.size/1024)} KB · ${e.kind}`}const ky=e=>{const t=e.ctrl,[n,r]=T(),[o,i]=T(),[s,a]=T(!1);function u(l){l.kind!=="image"||!l.previewUrl||(r(l.previewUrl),i(l.name),a(!0))}return f(j,{get when(){return e.compact},get fallback(){return f(VT,e)},get children(){return[(()=>{var l=FT();return x(l,f(at,{get each(){return t.attachments()},children:c=>(()=>{var d=zT(),g=d.firstChild;return x(d,f(Ad,{openDelay:150,closeDelay:0,get children(){return[f(kd,{type:"button",get class(){return`flex h-14 w-14 items-center justify-center overflow-hidden rounded-md border bg-card ${c.status==="pending"?"opacity-75":""} ${c.status==="failed"?"border-destructive":""} ${c.kind==="image"&&c.previewUrl?"cursor-zoom-in":"cursor-default"}`},onClick:()=>u(c),get children(){return[f(j,{get when(){return J(()=>c.kind==="image")()&&c.previewUrl},get fallback(){return(()=>{var h=UT();return x(h,()=>Sy(c.kind)),h})()},get children(){var h=Cy();return $e(p=>{var m=c.previewUrl,y=c.name;return m!==p.e&&Ke(h,"src",p.e=m),y!==p.t&&Ke(h,"alt",p.t=y),p},{e:void 0,t:void 0}),h}}),f(j,{get when(){return c.status==="pending"},get children(){var h=BT();return x(h,f(on,{class:"h-4 w-4 animate-spin text-muted-foreground"})),h}})]}}),f(Td,{get children(){return GT(c)}})]}}),g),g.$$click=()=>void t.removeAttachment(c.id),x(g,f(eo,{class:"h-3 w-3"})),$e(h=>{var p=e.busy,m=_("newSpec.deleteAttachment",{name:c.name});return p!==h.e&&(g.disabled=h.e=p),m!==h.t&&Ke(g,"aria-label",h.t=m),h},{e:void 0,t:void 0}),d})()})),l})(),f(Ey,{get src(){return n()},get alt(){return o()},get open(){return s()},onOpenChange:a})]}})},VT=e=>{const t=e.ctrl;return(()=>{var n=KT();return x(n,f(at,{get each(){return t.attachments()},children:r=>(()=>{var o=jT(),i=o.firstChild,s=i.nextSibling,a=s.firstChild;return x(i,f(j,{get when(){return J(()=>r.kind==="image")()&&r.previewUrl},get fallback(){return(()=>{var u=qT();return x(u,()=>Sy(r.kind)),u})()},get children(){var u=Cy();return $e(l=>{var c=r.previewUrl,d=r.name;return c!==l.e&&Ke(u,"src",l.e=c),d!==l.t&&Ke(u,"alt",l.t=d),l},{e:void 0,t:void 0}),u}})),x(s,f(j,{get when(){return J(()=>!!e.allowRename)()&&t.renamingId()===r.id},get fallback(){return(()=>{var u=HT();return u.$$click=()=>e.allowRename&&t.beginRename(r),x(u,()=>r.name),$e(l=>{var c=e.busy||!e.allowRename||r.status!=="uploaded",d=e.allowRename?_("newSpec.clickToRename"):r.name;return c!==l.e&&(u.disabled=l.e=c),d!==l.t&&Ke(u,"title",l.t=d),l},{e:void 0,t:void 0}),u})()},get children(){return f($n,{type:"text",get value(){return t.renameDraft()},autofocus:!0,onInput:u=>t.setRenameDraft(u.currentTarget.value),onBlur:()=>void t.commitRename(r),onKeyDown:u=>{u.key==="Enter"?(u.preventDefault(),t.commitRename(r)):u.key==="Escape"&&t.cancelRename()},class:"h-7 py-0.5 text-sm"})}}),a),x(a,f(j,{get when(){return r.status==="pending"},get children(){return[f(on,{class:"mr-0.5 inline h-3 w-3 animate-spin"}),J(()=>_("newSpec.uploading"))]}}),null),x(a,f(j,{get when(){return r.status==="failed"},get children(){return _("newSpec.uploadFailed",{error:r.error})}}),null),x(a,f(j,{get when(){return r.status==="uploaded"},get children(){return[J(()=>Math.round(r.file.size/1024))," KB · ",J(()=>r.kind)]}}),null),x(o,f(we,{variant:"ghost",size:"icon",type:"button",class:"h-7 w-7",onClick:()=>void t.removeAttachment(r.id),get disabled(){return e.busy},get"aria-label"(){return _("newSpec.deleteAttachment",{name:r.name})},get children(){return f(eo,{class:"h-3.5 w-3.5"})}}),null),$e(()=>kt(o,`grid items-center gap-2 rounded-lg border bg-background p-2 [grid-template-columns:56px_1fr_auto] ${r.status==="pending"?"opacity-75":""} ${r.status==="failed"?"border-destructive":""}`)),o})()})),n})()};Gt(["click"]);var WT=$('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checkbox');const Gi=Gr.Label,ti=Gr;Gr.ErrorMessage;Gr.Description;const ni=e=>{const[t,n]=de(e,["class","children"]);return[f(Gr.Input,{class:"[&:focus-visible+div]:outline-none [&:focus-visible+div]:ring-[1.5px] [&:focus-visible+div]:ring-ring [&:focus-visible+div]:ring-offset-2 [&:focus-visible+div]:ring-offset-background"}),f(Gr.Control,G({get class(){return ct("h-4 w-4 shrink-0 rounded-sm border border-input shadow transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:text-primary-foreground data-[disabled]:opacity-50",t.class)}},n,{get children(){return f(Gr.Indicator,{class:"flex items-center justify-center text-current",get children(){return WT()}})}}))]};Yn.Description;Yn.ErrorMessage;Yn.ItemDescription;const _n=Yn.ItemInput,En=Yn.ItemLabel,Id=Yn.Label,ir=Yn,Cn=Yn.Item,Nn=e=>{const[t,n]=de(e,["class"]);return f(Yn.ItemControl,G({get class(){return ct("flex aspect-square h-4 w-4 items-center justify-center rounded-full border border-input bg-background shadow-sm transition-[border-color,background-color,box-shadow] focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:shadow data-[checked]:ring-2 data-[checked]:ring-primary/20",t.class)}},n,{get children(){return f(Yn.ItemIndicator,{class:"h-2 w-2 rounded-full bg-primary-foreground"})}}))};var YT=$('<nav class="flex items-center gap-1 text-muted-foreground"aria-label=breadcrumb>'),ZT=$('<span class="truncate font-medium text-foreground">');const gs=e=>(()=>{var t=YT();return x(t,f(at,{get each(){return e.items},children:(n,r)=>[f(j,{get when(){return r()>0},get children(){return f(Ta,{class:"h-3.5 w-3.5 shrink-0 opacity-60"})}}),f(j,{get when(){return n.href},get fallback(){return(()=>{var o=ZT();return x(o,()=>n.label),o})()},get children(){return f(Kn,{class:"truncate cursor-pointer hover:text-foreground",get href(){return n.href},get children(){return n.label}})}})]})),t})(),XT="yorz:new-spec-draft:";function JT(e){return e==="feat"||e==="refct"||e==="fix"}function Dd(e){return`${XT}${e}`}function QT(e){if(!e||typeof window>"u")return{};try{const t=window.localStorage.getItem(Dd(e));if(!t)return{};const n=JSON.parse(t);return{content:typeof n.content=="string"?n.content:void 0,type:JT(n.type)?n.type:void 0,useWorktree:typeof n.useWorktree=="boolean"?n.useWorktree:void 0}}catch{return{}}}function eI(e,t){if(!(!e||typeof window>"u"))try{const n=t.content.trim().length>0||t.type!=="feat"||t.useWorktree!==!1,r=Dd(e);if(!n){window.localStorage.removeItem(r);return}window.localStorage.setItem(r,JSON.stringify(t))}catch{}}function Rg(e){return JSON.stringify(e)}function Og(e){if(!(!e||typeof window>"u"))try{window.localStorage.removeItem(Dd(e))}catch{}}function tI(e){const n=(e.split(/\r?\n/)[0]??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return n&&!/^[0-9]+$/.test(n)?n:`spec-${Date.now().toString(36)}`}function nI(e){let t=new Set,n=!1;return{setBaseline(r){t=new Set(r),n=!1},async poll(){if(!n)try{const o=(await e.listSpecs()).find(i=>!t.has(i.id));if(!o||n)return;n=!0,e.onFound(o.id)}catch{}},found:()=>n}}var Ng=$('<span class="text-sm text-muted-foreground">'),rI=$('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex flex-col gap-1"></header><p class=" text-muted-foreground"></p><form class="flex flex-col gap-4 rounded-xl border bg-card p-4"><label class="flex flex-col gap-1.5 font-medium"><span></span></label><section class="flex flex-col gap-2.5 rounded-lg border border-dashed bg-card p-3"><div class="flex flex-wrap items-center gap-2.5"><span class=font-semibold></span><span class="text-sm text-muted-foreground"></span><input type=file multiple hidden>'),oI=$('<strong class=" ">'),iI=$('<p class=" text-destructive">');const sI=[{value:"feat",labelKey:"newSpec.typeFeat",hintKey:"newSpec.typeFeatHint"},{value:"refct",labelKey:"newSpec.typeRefct",hintKey:"newSpec.typeRefctHint"},{value:"fix",labelKey:"newSpec.typeFix",hintKey:"newSpec.typeFixHint"}],aI=()=>{const e=Qr(),t=_o(),[n,r]=T(""),[o,i]=T("feat"),[s,a]=T("idle"),[u,l]=T(!1),c=()=>s()==="creating",d=wy({projectId:t,labels:xy}),g=d.error,h=d.setError;let p=null,m=null,y="",v="",b,w=!1,E="";ue(()=>{p?.(),m?.()}),re(pt(t,I=>{w=!0;const S=QT(I);r(S.content??""),i(S.type??"feat"),l(S.useWorktree??!1),w=!1})),re(()=>{if(w||c())return;const I={content:n(),type:o(),useWorktree:u()};Rg(I)!==E&&(E="",eI(t(),I))});const C=nI({listSpecs:()=>pe.listSpecs(y||t()),onFound:I=>{const S=y||t();p?.(),p=null,m?.(),m=null;const k=S?`/${S}/specs/${encodeURIComponent(I)}`:Bt(`specs/${encodeURIComponent(I)}`);e(k),v&&(Ko(v),v="")}});async function A(I){if(I.preventDefault(),s()==="creating")return;h(null);const S=n().trim();if(S.length<5){h(_("newSpec.descTooShort"));return}const k=d.attachments().filter(P=>P.status==="failed");if(k.length>0){h(_("newSpec.attachmentFailedCount",{count:k.length}));return}if(d.hasPending()){h(_("newSpec.attachmentUploading"));return}a("creating");try{const P=t();E=Rg({content:n(),type:o(),useWorktree:u()}),Og(P);let R=P;if(u()){const N=tI(S);R=(await pe.createWorktree(P,{specSlug:N})).id,Og(R)}y=R;const L=await pe.listSpecs(R);C.setBaseline(L.map(N=>N.id));const F={type:o(),requirement:S},D=d.draftId();D&&(F.draftId=D,R!==P&&(F.draftProjectId=P));const B=await pe.createSpec(R,F);"draft"in B&&B.draft?(v=B.sessionId,m=Ra(R,B.sessionId,{onEvent:N=>{N.type==="error"&&(a("failed"),h(N.message||_("newSpec.agentRunFailed")),m?.(),m=null)}}),p=c0(R,()=>{C.poll()}),C.poll()):"id"in B&&e(`/${R}/specs/${encodeURIComponent(B.id)}`)}catch(P){h(P.message),a("failed")}}return(()=>{var I=rI(),S=I.firstChild,k=S.nextSibling,P=k.nextSibling,R=P.firstChild,L=R.firstChild,F=R.nextSibling,D=F.firstChild,B=D.firstChild,N=B.nextSibling,X=N.nextSibling;x(S,f(gs,{get items(){return[{label:_("breadcrumb.specList"),href:Bt("")},{label:_("breadcrumb.newSpec")}]}})),x(k,()=>_("newSpec.description")),P.addEventListener("submit",A),x(P,f(ir,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return o()},onChange:K=>i(K),get disabled(){return c()},get children(){return[f(Id,{class:"mb-1.5 w-full font-medium",get children(){return _("newSpec.type")}}),J(()=>sI.map(K=>f(Cn,{get value(){return K.value},class:"flex min-h-[44px] flex-1",get children(){return[f(_n,{class:"sr-only"}),f(En,{get class(){return`flex w-full cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 transition-colors ${o()===K.value?"border-primary bg-primary/10":"border-border bg-background"}`},get children(){return[(()=>{var U=oI();return x(U,()=>_(K.labelKey)),U})(),(()=>{var U=Ng();return x(U,()=>_(K.hintKey)),U})()]}})]}})))]}}),R),x(P,f(ti,{get checked(){return u()},onChange:K=>l(K),get disabled(){return c()},class:"flex flex-wrap items-center gap-2",get children(){return[f(ni,{}),f(Gi,{class:"cursor-pointer font-medium",get children(){return _("newSpec.parallelWorktree")}}),(()=>{var K=Ng();return x(K,()=>_("newSpec.parallelWorktreeDesc")),K})()]}}),R),x(L,()=>_("newSpec.requirement")),x(R,f(tu,{get projectId(){return t()},get value(){return n()},onValueChange:r,get onPaste(){return d.onPaste},get placeholder(){return _("newSpec.requirementPlaceholder")},minRows:10,maxRows:10,required:!0,autofocus:!0,get disabled(){return c()}}),null),Js(F,"paste",d.onPaste),x(B,()=>_("newSpec.attachments")),x(N,()=>_("newSpec.attachmentsHint",{count:d.count(),max:Vo})),x(D,f(we,{variant:"outline",size:"sm",type:"button",onClick:()=>b?.click(),get disabled(){return c()||d.count()>=Vo},get children(){return[f(kE,{class:"mr-1 h-3.5 w-3.5"}),J(()=>_("newSpec.importAttachment"))]}}),X),Js(X,"change",d.onFileInputChange);var se=b;return typeof se=="function"?Hn(se,X):b=X,Ke(X,"accept",vy),x(F,f(j,{get when(){return d.count()>0},get children(){return f(ky,{ctrl:d,get busy(){return c()},allowRename:!0})}}),null),x(P,(()=>{var K=J(()=>!!g());return()=>K()&&(()=>{var U=iI();return x(U,g),U})()})(),null),x(P,f(we,{type:"submit",variant:"default",get disabled(){return c()},get children(){return[J(()=>J(()=>!!c())()?f(on,{class:"mr-1 h-4 w-4 animate-spin"}):f(Ia,{class:"mr-1 h-4 w-4"})),J(()=>J(()=>!!c())()?_("newSpec.creating"):_("newSpec.createAndStart"))]}}),null),I})()};var Mg=11;function uI(e,t){var n=t.attributes,r,o,i,s,a;if(!(t.nodeType===Mg||e.nodeType===Mg)){for(var u=n.length-1;u>=0;u--)r=n[u],o=r.name,i=r.namespaceURI,s=r.value,i?(o=r.localName||o,a=e.getAttributeNS(i,o),a!==s&&(r.prefix==="xmlns"&&(o=r.name),e.setAttributeNS(i,o,s))):(a=e.getAttribute(o),a!==s&&e.setAttribute(o,s));for(var l=e.attributes,c=l.length-1;c>=0;c--)r=l[c],o=r.name,i=r.namespaceURI,i?(o=r.localName||o,t.hasAttributeNS(i,o)||e.removeAttributeNS(i,o)):t.hasAttribute(o)||e.removeAttribute(o)}}var Os,lI="http://www.w3.org/1999/xhtml",dn=typeof document>"u"?void 0:document,cI=!!dn&&"content"in dn.createElement("template"),dI=!!dn&&dn.createRange&&"createContextualFragment"in dn.createRange();function fI(e){var t=dn.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function gI(e){Os||(Os=dn.createRange(),Os.selectNode(dn.body));var t=Os.createContextualFragment(e);return t.childNodes[0]}function hI(e){var t=dn.createElement("body");return t.innerHTML=e,t.childNodes[0]}function pI(e){return e=e.trim(),cI?fI(e):dI?gI(e):hI(e)}function Ns(e,t){var n=e.nodeName,r=t.nodeName,o,i;return n===r?!0:(o=n.charCodeAt(0),i=r.charCodeAt(0),o<=90&&i>=97?n===r.toUpperCase():i<=90&&o>=97?r===n.toUpperCase():!1)}function mI(e,t){return!t||t===lI?dn.createElement(e):dn.createElementNS(t,e)}function bI(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function Au(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Pg={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();r==="OPTGROUP"&&(n=n.parentNode,r=n&&n.nodeName.toUpperCase()),r==="SELECT"&&!n.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}Au(e,t,"selected")},INPUT:function(e,t){Au(e,t,"checked"),Au(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var o=r.nodeValue;if(o==n||!n&&o==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n=-1,r=0,o=e.firstChild,i,s;o;)if(s=o.nodeName&&o.nodeName.toUpperCase(),s==="OPTGROUP")i=o,o=i.firstChild,o||(o=i.nextSibling,i=null);else{if(s==="OPTION"){if(o.hasAttribute("selected")){n=r;break}r++}o=o.nextSibling,!o&&i&&(o=i.nextSibling,i=null)}e.selectedIndex=n}}},vi=1,$g=11,Lg=3,Fg=8;function zr(){}function yI(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function vI(e){return function(n,r,o){if(o||(o={}),typeof r=="string")if(n.nodeName==="#document"||n.nodeName==="HTML"){var i=r;r=dn.createElement("html"),r.innerHTML=i}else if(n.nodeName==="BODY"){var s=r;r=dn.createElement("html"),r.innerHTML=s;var a=r.querySelector("body");a&&(r=a)}else r=pI(r);else r.nodeType===$g&&(r=r.firstElementChild);var u=o.getNodeKey||yI,l=o.onBeforeNodeAdded||zr,c=o.onNodeAdded||zr,d=o.onBeforeElUpdated||zr,g=o.onElUpdated||zr,h=o.onBeforeNodeDiscarded||zr,p=o.onNodeDiscarded||zr,m=o.onBeforeElChildrenUpdated||zr,y=o.skipFromChildren||zr,v=o.addChild||function(K,U){return K.appendChild(U)},b=o.childrenOnly===!0,w=Object.create(null),E=[];function C(K){E.push(K)}function A(K,U){if(K.nodeType===vi)for(var oe=K.firstChild;oe;){var H=void 0;U&&(H=u(oe))?C(H):(p(oe),oe.firstChild&&A(oe,U)),oe=oe.nextSibling}}function I(K,U,oe){h(K)!==!1&&(U&&U.removeChild(K),p(K),A(K,oe))}function S(K){if(K.nodeType===vi||K.nodeType===$g)for(var U=K.firstChild;U;){var oe=u(U);oe&&(w[oe]=U),S(U),U=U.nextSibling}}S(n);function k(K){c(K);for(var U=K.firstChild;U;){var oe=U.nextSibling,H=u(U);if(H){var z=w[H];z&&Ns(U,z)?(U.parentNode.replaceChild(z,U),R(z,U)):k(U)}else k(U);U=oe}}function P(K,U,oe){for(;U;){var H=U.nextSibling;(oe=u(U))?C(oe):I(U,K,!0),U=H}}function R(K,U,oe){var H=u(U);if(H&&delete w[H],!oe){var z=d(K,U);if(z===!1||(z instanceof HTMLElement&&(K=z,S(K)),e(K,U),g(K),m(K,U)===!1))return}K.nodeName!=="TEXTAREA"?L(K,U):Pg.TEXTAREA(K,U)}function L(K,U){var oe=y(K,U),H=U.firstChild,z=K.firstChild,Z,te,he,W,M;e:for(;H;){for(W=H.nextSibling,Z=u(H);!oe&&z;){if(he=z.nextSibling,H.isSameNode&&H.isSameNode(z)){H=W,z=he;continue e}te=u(z);var Y=z.nodeType,ae=void 0;if(Y===H.nodeType&&(Y===vi?(Z?Z!==te&&((M=w[Z])?he===M?ae=!1:(K.insertBefore(M,z),te?C(te):I(z,K,!0),z=M,te=u(z)):ae=!1):te&&(ae=!1),ae=ae!==!1&&Ns(z,H),ae&&R(z,H)):(Y===Lg||Y==Fg)&&(ae=!0,z.nodeValue!==H.nodeValue&&(z.nodeValue=H.nodeValue))),ae){H=W,z=he;continue e}te?C(te):I(z,K,!0),z=he}if(Z&&(M=w[Z])&&Ns(M,H))oe||v(K,M),R(M,H);else{var _e=l(H);_e!==!1&&(_e&&(H=_e),H.actualize&&(H=H.actualize(K.ownerDocument||dn)),v(K,H),k(H))}H=W,z=he}P(K,z,te);var fe=Pg[K.nodeName];fe&&fe(K,U)}var F=n,D=F.nodeType,B=r.nodeType;if(!b){if(D===vi)B===vi?Ns(n,r)||(p(n),F=bI(n,mI(r.nodeName,r.namespaceURI))):F=r;else if(D===Lg||D===Fg){if(B===D)return F.nodeValue!==r.nodeValue&&(F.nodeValue=r.nodeValue),F;F=r}}if(F===r)p(n);else{if(r.isSameNode&&r.isSameNode(F))return;if(R(F,r,b),E)for(var N=0,X=E.length;N<X;N++){var se=w[E[N]];se&&I(se,se.parentNode,!1)}}return!b&&F!==n&&n.parentNode&&(F.actualize&&(F=F.actualize(n.ownerDocument||dn)),n.parentNode.replaceChild(F,n)),F}}var wI=vI(uI);const Bg={};function xI(e){let t=Bg[e];if(t)return t;t=Bg[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function ri(e,t){typeof t!="string"&&(t=ri.defaultChars);const n=xI(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let o="";for(let i=0,s=r.length;i<s;i+=3){const a=parseInt(r.slice(i+1,i+3),16);if(a<128){o+=n[a];continue}if((a&224)===192&&i+3<s){const u=parseInt(r.slice(i+4,i+6),16);if((u&192)===128){const l=a<<6&1984|u&63;l<128?o+="��":o+=String.fromCharCode(l),i+=3;continue}}if((a&240)===224&&i+6<s){const u=parseInt(r.slice(i+4,i+6),16),l=parseInt(r.slice(i+7,i+9),16);if((u&192)===128&&(l&192)===128){const c=a<<12&61440|u<<6&4032|l&63;c<2048||c>=55296&&c<=57343?o+="���":o+=String.fromCharCode(c),i+=6;continue}}if((a&248)===240&&i+9<s){const u=parseInt(r.slice(i+4,i+6),16),l=parseInt(r.slice(i+7,i+9),16),c=parseInt(r.slice(i+10,i+12),16);if((u&192)===128&&(l&192)===128&&(c&192)===128){let d=a<<18&1835008|u<<12&258048|l<<6&4032|c&63;d<65536||d>1114111?o+="����":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}o+="�"}return o})}ri.defaultChars=";/?:@&=+$,#";ri.componentChars="";const zg={};function _I(e){let t=zg[e];if(t)return t;t=zg[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function hs(e,t,n){typeof t!="string"&&(n=t,t=hs.defaultChars),typeof n>"u"&&(n=!0);const r=_I(t);let o="";for(let i=0,s=e.length;i<s;i++){const a=e.charCodeAt(i);if(n&&a===37&&i+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){o+=e.slice(i,i+3),i+=2;continue}if(a<128){o+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<s){const u=e.charCodeAt(i+1);if(u>=56320&&u<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}hs.defaultChars=";/?:@&=+$,-_.!~*'()#";hs.componentChars="-_.!~*'()";function Rd(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function ha(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const EI=/^([a-z0-9.+-]+:)/i,CI=/:[0-9]*$/,SI=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,kI=["<",">",'"',"`"," ","\r",`
7
+ `," "],AI=["{","}","|","\\","^","`"].concat(kI),TI=["'"].concat(AI),Ug=["%","/","?",";","#"].concat(TI),Kg=["/","?","#"],II=255,jg=/^[+a-z0-9A-Z_-]{0,63}$/,DI=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,qg={javascript:!0,"javascript:":!0},Hg={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Od(e,t){if(e&&e instanceof ha)return e;const n=new ha;return n.parse(e,t),n}ha.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const l=SI.exec(i);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let s=EI.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&qg[s])&&(i=i.substr(2),this.slashes=!0)),!qg[s]&&(o||s&&!Hg[s])){let l=-1;for(let p=0;p<Kg.length;p++)r=i.indexOf(Kg[p]),r!==-1&&(l===-1||r<l)&&(l=r);let c,d;l===-1?d=i.lastIndexOf("@"):d=i.lastIndexOf("@",l),d!==-1&&(c=i.slice(0,d),i=i.slice(d+1),this.auth=c),l=-1;for(let p=0;p<Ug.length;p++)r=i.indexOf(Ug[p]),r!==-1&&(l===-1||r<l)&&(l=r);l===-1&&(l=i.length),i[l-1]===":"&&l--;const g=i.slice(0,l);i=i.slice(l),this.parseHost(g),this.hostname=this.hostname||"";const h=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!h){const p=this.hostname.split(/\./);for(let m=0,y=p.length;m<y;m++){const v=p[m];if(v&&!v.match(jg)){let b="";for(let w=0,E=v.length;w<E;w++)v.charCodeAt(w)>127?b+="x":b+=v[w];if(!b.match(jg)){const w=p.slice(0,m),E=p.slice(m+1),C=v.match(DI);C&&(w.push(C[1]),E.unshift(C[2])),E.length&&(i=E.join(".")+i),this.hostname=w.join(".");break}}}}this.hostname.length>II&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=i.indexOf("#");a!==-1&&(this.hash=i.substr(a),i=i.slice(0,a));const u=i.indexOf("?");return u!==-1&&(this.search=i.substr(u),i=i.slice(0,u)),i&&(this.pathname=i),Hg[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ha.prototype.parseHost=function(e){let t=CI.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const RI=Object.freeze(Object.defineProperty({__proto__:null,decode:ri,encode:hs,format:Rd,parse:Od},Symbol.toStringTag,{value:"Module"})),Ay=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ty=/[\0-\x1F\x7F-\x9F]/,OI=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Nd=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Iy=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Dy=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,NI=Object.freeze(Object.defineProperty({__proto__:null,Any:Ay,Cc:Ty,Cf:OI,P:Nd,S:Iy,Z:Dy},Symbol.toStringTag,{value:"Module"})),MI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),PI=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Tu;const $I=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),LI=(Tu=String.fromCodePoint)!==null&&Tu!==void 0?Tu:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function FI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=$I.get(e))!==null&&t!==void 0?t:e}var Zt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Zt||(Zt={}));const BI=32;var qr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(qr||(qr={}));function Tc(e){return e>=Zt.ZERO&&e<=Zt.NINE}function zI(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_F||e>=Zt.LOWER_A&&e<=Zt.LOWER_F}function UI(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_Z||e>=Zt.LOWER_A&&e<=Zt.LOWER_Z||Tc(e)}function KI(e){return e===Zt.EQUALS||UI(e)}var Yt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Yt||(Yt={}));var Ar;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ar||(Ar={}));class jI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Yt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ar.Strict}startEntity(t){this.decodeMode=t,this.state=Yt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Yt.EntityStart:return t.charCodeAt(n)===Zt.NUM?(this.state=Yt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Yt.NamedEntity,this.stateNamedEntity(t,n));case Yt.NumericStart:return this.stateNumericStart(t,n);case Yt.NumericDecimal:return this.stateNumericDecimal(t,n);case Yt.NumericHex:return this.stateNumericHex(t,n);case Yt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|BI)===Zt.LOWER_X?(this.state=Yt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Yt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Tc(o)||zI(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Tc(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Zt.SEMI)this.consumed+=1;else if(this.decodeMode===Ar.Strict)return 0;return this.emitCodePoint(FI(this.result),this.consumed),this.errors&&(t!==Zt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&qr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=qI(r,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ar.Attribute&&(i===0||KI(s))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&qr.VALUE_LENGTH)>>14,i!==0){if(s===Zt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Ar.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&qr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~qr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Yt.NamedEntity:return this.result!==0&&(this.decodeMode!==Ar.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Yt.NumericDecimal:return this.emitNumericEntity(0,2);case Yt.NumericHex:return this.emitNumericEntity(0,3);case Yt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Yt.EntityStart:return 0}}}function Ry(e){let t="";const n=new jI(e,r=>t+=LI(r));return function(o,i){let s=0,a=0;for(;(a=o.indexOf("&",a))>=0;){t+=o.slice(s,a),n.startEntity(i);const l=n.write(o,a+1);if(l<0){s=a+n.end();break}s=a+l,a=l===0?s+1:s}const u=t+o.slice(s);return t="",u}}function qI(e,t,n,r){const o=(t&qr.BRANCH_LENGTH)>>7,i=t&qr.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const u=r-i;return u<0||u>=o?-1:e[n+u]-1}let s=n,a=s+o-1;for(;s<=a;){const u=s+a>>>1,l=e[u];if(l<r)s=u+1;else if(l>r)a=u-1;else return e[u+o]}return-1}const Oy=Ry(MI);Ry(PI);function HI(e,t=Ar.Legacy){return Oy(e,t)}function GI(e){return Oy(e,Ar.Strict)}function VI(e){return Object.prototype.toString.call(e)}function Md(e){return VI(e)==="[object String]"}const WI=Object.prototype.hasOwnProperty;function YI(e,t){return WI.call(e,t)}function nu(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function Ny(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Pd(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Vi(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const My=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,ZI=/&([a-z#][a-z0-9]{1,31});/gi,XI=new RegExp(My.source+"|"+ZI.source,"gi"),JI=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function QI(e,t){if(t.charCodeAt(0)===35&&JI.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Pd(r)?Vi(r):e}const n=HI(e);return n!==e?n:e}function eD(e){return e.indexOf("\\")<0?e:e.replace(My,"$1")}function oi(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(XI,function(t,n,r){return n||QI(t,r)})}const tD=/[&<>"]/,nD=/[&<>"]/g,rD={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function oD(e){return rD[e]}function Jr(e){return tD.test(e)?e.replace(nD,oD):e}const iD=/[.?*+^$[\]\\(){}|-]/g;function sD(e){return e.replace(iD,"\\$&")}function At(e){switch(e){case 9:case 32:return!0}return!1}function Wi(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Py(e){return Nd.test(e)||Iy.test(e)}function Yi(e){return Py(Vi(e))}function Zi(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function ru(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function Gg(e){return e===32||e===9||e===10||e===13}function ou(e){let t=0;for(;t<e.length&&Gg(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&Gg(e.charCodeAt(n));n--);return e.slice(t,n+1)}const aD={mdurl:RI,ucmicro:NI},uD=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Ny,asciiTrim:ou,assign:nu,escapeHtml:Jr,escapeRE:sD,fromCodePoint:Vi,has:YI,isMdAsciiPunct:Zi,isPunctChar:Py,isPunctCharCode:Yi,isSpace:At,isString:Md,isValidEntityCode:Pd,isWhiteSpace:Wi,lib:aD,normalizeReference:ru,unescapeAll:oi,unescapeMd:eD},Symbol.toStringTag,{value:"Module"}));function lD(e,t,n){let r,o,i,s;const a=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos<a;){if(i=e.src.charCodeAt(e.pos),i===93&&(r--,r===0)){o=!0;break}if(s=e.pos,e.md.inline.skipToken(e),i===91){if(s===e.pos-1)r++;else if(n)return e.pos=u,-1}}let l=-1;return o&&(l=e.pos),e.pos=u,l}function cD(e,t,n){let r,o=t;const i={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(r=e.charCodeAt(o),r===10||r===60)return i;if(r===62)return i.pos=o+1,i.str=oi(e.slice(t+1,o)),i.ok=!0,i;if(r===92&&o+1<n){o+=2;continue}o++}return i}let s=0;for(;o<n&&(r=e.charCodeAt(o),!(r===32||r<32||r===127));){if(r===92&&o+1<n){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(r===40&&(s++,s>32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=oi(e.slice(t,o)),i.pos=o,i.ok=!0),i}function dD(e,t,n,r){let o,i=t;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let a=e.charCodeAt(i);if(a!==34&&a!==39&&a!==40)return s;t++,i++,a===40&&(a=41),s.marker=a}for(;i<n;){if(o=e.charCodeAt(i),o===s.marker)return s.pos=i+1,s.str+=oi(e.slice(t,i)),s.ok=!0,s;if(o===40&&s.marker===41)return s;o===92&&i+1<n&&i++,i++}return s.can_continue=!0,s.str+=oi(e.slice(t,i)),s}const fD=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:cD,parseLinkLabel:lD,parseLinkTitle:dD},Symbol.toStringTag,{value:"Module"})),yr={};yr.code_inline=function(e,t,n,r,o){const i=e[t];return"<code"+o.renderAttrs(i)+">"+Jr(i.content)+"</code>"};yr.code_block=function(e,t,n,r,o){const i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+Jr(e[t].content)+`</code></pre>
8
+ `};yr.fence=function(e,t,n,r,o){const i=e[t],s=i.info?oi(i.info).trim():"";let a="",u="";if(s){const c=s.split(/(\s+)/g);a=c[0],u=c.slice(2).join("")}let l;if(n.highlight?l=n.highlight(i.content,a,u)||Jr(i.content):l=Jr(i.content),l.indexOf("<pre")===0)return l+`
9
+ `;if(s){const c=i.attrIndex("class"),d=i.attrs?i.attrs.slice():[];c<0?d.push(["class",n.langPrefix+a]):(d[c]=d[c].slice(),d[c][1]+=" "+n.langPrefix+a);const g={attrs:d};return`<pre><code${o.renderAttrs(g)}>${l}</code></pre>
10
+ `}return`<pre><code${o.renderAttrs(i)}>${l}</code></pre>
11
+ `};yr.image=function(e,t,n,r,o){const i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(e,t,n)};yr.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
12
+ `:`<br>
13
+ `};yr.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
14
+ `:`<br>
15
+ `:`
16
+ `};yr.text=function(e,t){return Jr(e[t].content)};yr.html_block=function(e,t){return e[t].content};yr.html_inline=function(e,t){return e[t].content};function di(){this.rules=nu({},yr)}di.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+Jr(t.attrs[n][0])+'="'+Jr(t.attrs[n][1])+'"';return o};di.prototype.renderToken=function(t,n,r){const o=t[n];let i="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&t[n-1].hidden&&(i+=`
17
+ `),i+=(o.nesting===-1?"</":"<")+o.tag,i+=this.renderAttrs(o),o.nesting===0&&r.xhtmlOut&&(i+=" /");let s=!1;if(o.block&&(s=!0,o.nesting===1&&n+1<t.length)){const a=t[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===o.tag)&&(s=!1)}return i+=s?`>
18
+ `:">",i};di.prototype.renderInline=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t)}return r};di.prototype.renderInlineAsText=function(e,t,n){let r="";for(let o=0,i=e.length;o<i;o++)switch(e[o].type){case"text":r+=e[o].content;break;case"image":r+=this.renderInlineAsText(e[o].children,t,n);break;case"html_inline":case"html_block":r+=e[o].content;break;case"softbreak":case"hardbreak":r+=`
19
+ `;break}return r};di.prototype.render=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;a==="inline"?r+=this.renderInline(e[i].children,t,n):typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t,n)}return r};function mn(){this.__rules__=[],this.__cache__=null}mn.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};mn.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})};mn.prototype.at=function(e,t,n){const r=this.__find__(e),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null};mn.prototype.before=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};mn.prototype.after=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};mn.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};mn.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n};mn.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};mn.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n};mn.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Xn(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Xn.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,o=n.length;r<o;r++)if(n[r][0]===t)return r;return-1};Xn.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Xn.prototype.attrSet=function(t,n){const r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o};Xn.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};Xn.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function $y(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}$y.prototype.Token=Xn;const gD=/\r\n?|\n/g,hD=/\0/g;function pD(e){let t;t=e.src.replace(gD,`
20
+ `),t=t.replace(hD,"�"),e.src=t}function mD(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function bD(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const o=t[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function yD(e){return/^<a[>\s]/i.test(e)}function vD(e){return/^<\/a\s*>/i.test(e)}function wD(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let o=t[n].children,i=0;for(let s=o.length-1;s>=0;s--){const a=o[s];if(a.type==="link_close"){for(s--;o[s].level!==a.level&&o[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(yD(a.content)&&i>0&&i--,vD(a.content)&&i++),!(i>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const u=a.content;let l=e.md.linkify.match(u);const c=[];let d=a.level,g=0;l.length>0&&l[0].index===0&&s>0&&o[s-1].type==="text_special"&&(l=l.slice(1));for(let h=0;h<l.length;h++){const p=l[h].url,m=e.md.normalizeLink(p);if(!e.md.validateLink(m))continue;let y=l[h].text;l[h].schema?l[h].schema==="mailto:"&&!/^mailto:/i.test(y)?y=e.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):y=e.md.normalizeLinkText(y):y=e.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,"");const v=l[h].index;if(v>g){const C=new e.Token("text","",0);C.content=u.slice(g,v),C.level=d,c.push(C)}const b=new e.Token("link_open","a",1);b.attrs=[["href",m]],b.level=d++,b.markup="linkify",b.info="auto",c.push(b);const w=new e.Token("text","",0);w.content=y,w.level=d,c.push(w);const E=new e.Token("link_close","a",-1);E.level=--d,E.markup="linkify",E.info="auto",c.push(E),g=l[h].lastIndex}if(g<u.length){const h=new e.Token("text","",0);h.content=u.slice(g),h.level=d,c.push(h)}t[n].children=o=Ny(o,s,c)}}}}const Ly=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,xD=/\((c|tm|r)\)/i,_D=/\((c|tm|r)\)/ig,ED={c:"©",r:"®",tm:"™"};function CD(e,t){return ED[t.toLowerCase()]}function SD(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(_D,CD)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function kD(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&Ly.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function AD(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(xD.test(e.tokens[t].content)&&SD(e.tokens[t].children),Ly.test(e.tokens[t].content)&&kD(e.tokens[t].children))}const TD=/['"]/,Vg=/['"]/g,Wg="’";function Ms(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function ID(e,t){let n="",r=0;t.sort((o,i)=>o.pos-i.pos);for(let o=0;o<t.length;o++){const i=t[o];n+=e.slice(r,i.pos)+i.ch,r=i.pos+1}return n+e.slice(r)}function DD(e,t){let n;const r=[],o={};for(let i=0;i<e.length;i++){const s=e[i],a=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=a);n--);if(r.length=n+1,s.type!=="text")continue;const u=s.content;let l=0;const c=u.length;e:for(;l<c;){Vg.lastIndex=l;const d=Vg.exec(u);if(!d)break;let g=!0,h=!0;l=d.index+1;const p=d[0]==="'";let m=32;if(d.index-1>=0)m=u.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let y=32;if(l<c)y=u.charCodeAt(l);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){y=e[n].content.charCodeAt(0);break}const v=Zi(m)||Yi(m),b=Zi(y)||Yi(y),w=Wi(m),E=Wi(y);if(E?g=!1:b&&(w||v||(g=!1)),w?h=!1:v&&(E||b||(h=!1)),y===34&&d[0]==='"'&&m>=48&&m<=57&&(h=g=!1),g&&h&&(g=v,h=b),!g&&!h){p&&Ms(o,i,d.index,Wg);continue}if(h)for(n=r.length-1;n>=0;n--){let C=r[n];if(r[n].level<a)break;if(C.single===p&&r[n].level===a){C=r[n];let A,I;p?(A=t.md.options.quotes[2],I=t.md.options.quotes[3]):(A=t.md.options.quotes[0],I=t.md.options.quotes[1]),Ms(o,i,d.index,I),Ms(o,C.token,C.pos,A),r.length=n;continue e}}g?r.push({token:i,pos:d.index,single:p,level:a}):h&&p&&Ms(o,i,d.index,Wg)}}Object.keys(o).forEach(function(i){e[i].content=ID(e[i].content,o[i])})}function RD(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!TD.test(e.tokens[t].content)||DD(e.tokens[t].children,e)}function OD(e){let t,n;const r=e.tokens,o=r.length;for(let i=0;i<o;i++){if(r[i].type!=="inline")continue;const s=r[i].children,a=s.length;for(t=0;t<a;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=n=0;t<a;t++)s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}}const Iu=[["normalize",pD],["block",mD],["inline",bD],["linkify",wD],["replacements",AD],["smartquotes",RD],["text_join",OD]];function $d(){this.ruler=new mn;for(let e=0;e<Iu.length;e++)this.ruler.push(Iu[e][0],Iu[e][1])}$d.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};$d.prototype.State=$y;function vr(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let i=0,s=0,a=0,u=0,l=o.length,c=!1;s<l;s++){const d=o.charCodeAt(s);if(!c)if(At(d)){a++,d===9?u+=4-u%4:u++;continue}else c=!0;(d===10||s===l-1)&&(d!==10&&s++,this.bMarks.push(i),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(u),this.bsCount.push(0),c=!1,a=0,u=0,i=s+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}vr.prototype.push=function(e,t,n){const r=new Xn(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};vr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};vr.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};vr.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const r=this.src.charCodeAt(t);if(!At(r))break}return t};vr.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!At(this.src.charCodeAt(--t)))return t+1;return t};vr.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};vr.prototype.skipCharsBack=function(t,n,r){if(t<=r)return t;for(;t>r;)if(n!==this.src.charCodeAt(--t))return t+1;return t};vr.prototype.getLines=function(t,n,r,o){if(t>=n)return"";const i=new Array(n-t);for(let s=0,a=t;a<n;a++,s++){let u=0;const l=this.bMarks[a];let c=l,d;for(a+1<n||o?d=this.eMarks[a]+1:d=this.eMarks[a];c<d&&u<r;){const g=this.src.charCodeAt(c);if(At(g))g===9?u+=4-(u+this.bsCount[a])%4:u++;else if(c-l<this.tShift[a])u++;else break;c++}u>r?i[s]=new Array(u-r+1).join(" ")+this.src.slice(c,d):i[s]=this.src.slice(c,d)}return i.join("")};vr.prototype.Token=Xn;const ND=65536;function Du(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Yg(e){const t=[],n=e.length;let r=0,o=e.charCodeAt(r),i=!1,s=0,a="";for(;r<n;)o===124&&(i?(a+=e.substring(s,r-1),s=r):(t.push(a+e.substring(s,r)),a="",s=r+1)),i=o===92,r++,o=e.charCodeAt(r);return t.push(a+e.substring(s)),t}function MD(e,t,n,r){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;const s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;const a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58&&!At(a)||s===45&&At(a))return!1;for(;i<e.eMarks[o];){const E=e.src.charCodeAt(i);if(E!==124&&E!==45&&E!==58&&!At(E))return!1;i++}let u=Du(e,t+1),l=u.split("|");const c=[];for(let E=0;E<l.length;E++){const C=l[E].trim();if(!C){if(E===0||E===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?c.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?c.push("left"):c.push("")}if(u=Du(e,t).trim(),u.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=Yg(u),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const d=l.length;if(d===0||d!==c.length)return!1;if(r)return!0;const g=e.parentType;e.parentType="table";const h=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),m=[t,0];p.map=m;const y=e.push("thead_open","thead",1);y.map=[t,t+1];const v=e.push("tr_open","tr",1);v.map=[t,t+1];for(let E=0;E<l.length;E++){const C=e.push("th_open","th",1);c[E]&&(C.attrs=[["style","text-align:"+c[E]]]);const A=e.push("inline","",0);A.content=l[E].trim(),A.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let b,w=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let E=!1;for(let A=0,I=h.length;A<I;A++)if(h[A](e,o,n,!0)){E=!0;break}if(E||(u=Du(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(l=Yg(u),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),w+=d-l.length,w>ND))break;if(o===t+2){const A=e.push("tbody_open","tbody",1);A.map=b=[t+2,0]}const C=e.push("tr_open","tr",1);C.map=[o,o+1];for(let A=0;A<d;A++){const I=e.push("td_open","td",1);c[A]&&(I.attrs=[["style","text-align:"+c[A]]]);const S=e.push("inline","",0);S.content=l[A]?l[A].trim():"",S.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return b&&(e.push("tbody_close","tbody",-1),b[1]=o),e.push("table_close","table",-1),m[1]=o,e.parentType=g,e.line=o,!0}function PD(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,o=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,o=r;continue}break}e.line=o;const i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+`
21
+ `,i.map=[t,e.line],!0}function $D(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;const s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let a=o;o=e.skipChars(o,s);let u=o-a;if(u<3)return!1;const l=e.src.slice(a,o),c=e.src.slice(o,i);if(s===96&&c.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,g=!1;for(;d++,!(d>=n||(o=a=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o<i&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(o)===s&&!(e.sCount[d]-e.blkIndent>=4)&&(o=e.skipChars(o,s),!(o-a<u)&&(o=e.skipSpaces(o),!(o<i)))){g=!0;break}u=e.sCount[t],e.line=d+(g?1:0);const h=e.push("fence","code",0);return h.info=c,h.content=e.getLines(t+1,d,u,!0),h.markup=l,h.map=[t,e.line],!0}function LD(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;const a=[],u=[],l=[],c=[],d=e.md.block.ruler.getRules("blockquote"),g=e.parentType;e.parentType="blockquote";let h=!1,p;for(p=t;p<n;p++){const w=e.sCount[p]<e.blkIndent;if(o=e.bMarks[p]+e.tShift[p],i=e.eMarks[p],o>=i)break;if(e.src.charCodeAt(o++)===62&&!w){let C=e.sCount[p]+1,A,I;e.src.charCodeAt(o)===32?(o++,C++,I=!1,A=!0):e.src.charCodeAt(o)===9?(A=!0,(e.bsCount[p]+C)%4===3?(o++,C++,I=!1):I=!0):A=!1;let S=C;for(a.push(e.bMarks[p]),e.bMarks[p]=o;o<i;){const k=e.src.charCodeAt(o);if(At(k))k===9?S+=4-(S+e.bsCount[p]+(I?1:0))%4:S++;else break;o++}h=o>=i,u.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(A?1:0),l.push(e.sCount[p]),e.sCount[p]=S-C,c.push(e.tShift[p]),e.tShift[p]=o-e.bMarks[p];continue}if(h)break;let E=!1;for(let C=0,A=d.length;C<A;C++)if(d[C](e,p,n,!0)){E=!0;break}if(E){e.lineMax=p,e.blkIndent!==0&&(a.push(e.bMarks[p]),u.push(e.bsCount[p]),c.push(e.tShift[p]),l.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}a.push(e.bMarks[p]),u.push(e.bsCount[p]),c.push(e.tShift[p]),l.push(e.sCount[p]),e.sCount[p]=-1}const m=e.blkIndent;e.blkIndent=0;const y=e.push("blockquote_open","blockquote",1);y.markup=">";const v=[t,0];y.map=v,e.md.block.tokenize(e,t,p);const b=e.push("blockquote_close","blockquote",-1);b.markup=">",e.lineMax=s,e.parentType=g,v[1]=e.line;for(let w=0;w<c.length;w++)e.bMarks[w+t]=a[w],e.tShift[w+t]=c[w],e.sCount[w+t]=l[w],e.bsCount[w+t]=u[w];return e.blkIndent=m,!0}function FD(e,t,n,r){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;i<o;){const l=e.src.charCodeAt(i++);if(l!==s&&!At(l))return!1;l===s&&a++}if(a<3)return!1;if(r)return!0;e.line=t+1;const u=e.push("hr","hr",0);return u.map=[t,e.line],u.markup=Array(a+1).join(String.fromCharCode(s)),!0}function Zg(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(r++);if(o!==42&&o!==45&&o!==43)return-1;if(r<n){const i=e.src.charCodeAt(r);if(!At(i))return-1}return r}function Xg(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let o=n;if(o+1>=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o<r&&(i=e.src.charCodeAt(o),!At(i))?-1:o}function BD(e,t){const n=e.level+2;for(let r=t+2,o=e.tokens.length-2;r<o;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function zD(e,t,n,r){let o,i,s,a,u=t,l=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let c=!1;r&&e.parentType==="paragraph"&&e.sCount[u]>=e.blkIndent&&(c=!0);let d,g,h;if((h=Xg(e,u))>=0){if(d=!0,s=e.bMarks[u]+e.tShift[u],g=Number(e.src.slice(s,h-1)),c&&g!==1)return!1}else if((h=Zg(e,u))>=0)d=!1;else return!1;if(c&&e.skipSpaces(h)>=e.eMarks[u])return!1;if(r)return!0;const p=e.src.charCodeAt(h-1),m=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),g!==1&&(a.attrs=[["start",g]])):a=e.push("bullet_list_open","ul",1);const y=[u,0];a.map=y,a.markup=String.fromCharCode(p);let v=!1;const b=e.md.block.ruler.getRules("list"),w=e.parentType;for(e.parentType="list";u<n;){i=h,o=e.eMarks[u];const E=e.sCount[u]+h-(e.bMarks[u]+e.tShift[u]);let C=E;for(;i<o;){const B=e.src.charCodeAt(i);if(B===9)C+=4-(C+e.bsCount[u])%4;else if(B===32)C++;else break;i++}const A=i;let I;A>=o?I=1:I=C-E,I>4&&(I=1);const S=E+I;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(p);const k=[u,0];a.map=k,d&&(a.info=e.src.slice(s,h-1));const P=e.tight,R=e.tShift[u],L=e.sCount[u],F=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=S,e.tight=!0,e.tShift[u]=A-e.bMarks[u],e.sCount[u]=C,A>=o&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||v)&&(l=!1),v=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=F,e.tShift[u]=R,e.sCount[u]=L,e.tight=P,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(p),u=e.line,k[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let D=!1;for(let B=0,N=b.length;B<N;B++)if(b[B](e,u,n,!0)){D=!0;break}if(D)break;if(d){if(h=Xg(e,u),h<0)break;s=e.bMarks[u]+e.tShift[u]}else if(h=Zg(e,u),h<0)break;if(p!==e.src.charCodeAt(h-1))break}return d?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(p),y[1]=u,e.line=u,e.parentType=w,l&&BD(e,m),!0}function UD(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function a(b){const w=e.lineMax;if(b>=w||e.isEmpty(b))return null;let E=!1;if(e.sCount[b]-e.blkIndent>3&&(E=!0),e.sCount[b]<0&&(E=!0),!E){const I=e.md.block.ruler.getRules("reference"),S=e.parentType;e.parentType="reference";let k=!1;for(let P=0,R=I.length;P<R;P++)if(I[P](e,b,w,!0)){k=!0;break}if(e.parentType=S,k)return null}const C=e.bMarks[b]+e.tShift[b],A=e.eMarks[b];return e.src.slice(C,A+1)}let u=e.src.slice(o,i+1);i=u.length;let l=-1;for(o=1;o<i;o++){const b=u.charCodeAt(o);if(b===91)return!1;if(b===93){l=o;break}else if(b===10){const w=a(s);w!==null&&(u+=w,i=u.length,s++)}else if(b===92&&(o++,o<i&&u.charCodeAt(o)===10)){const w=a(s);w!==null&&(u+=w,i=u.length,s++)}}if(l<0||u.charCodeAt(l+1)!==58)return!1;for(o=l+2;o<i;o++){const b=u.charCodeAt(o);if(b===10){const w=a(s);w!==null&&(u+=w,i=u.length,s++)}else if(!At(b))break}const c=e.md.helpers.parseLinkDestination(u,o,i);if(!c.ok)return!1;const d=e.md.normalizeLink(c.str);if(!e.md.validateLink(d))return!1;o=c.pos;const g=o,h=s,p=o;for(;o<i;o++){const b=u.charCodeAt(o);if(b===10){const w=a(s);w!==null&&(u+=w,i=u.length,s++)}else if(!At(b))break}let m=e.md.helpers.parseLinkTitle(u,o,i);for(;m.can_continue;){const b=a(s);if(b===null)break;u+=b,o=i,i=u.length,s++,m=e.md.helpers.parseLinkTitle(u,o,i,m)}let y;for(o<i&&p!==o&&m.ok?(y=m.str,o=m.pos):(y="",o=g,s=h);o<i;){const b=u.charCodeAt(o);if(!At(b))break;o++}if(o<i&&u.charCodeAt(o)!==10&&y)for(y="",o=g,s=h;o<i;){const b=u.charCodeAt(o);if(!At(b))break;o++}if(o<i&&u.charCodeAt(o)!==10)return!1;const v=ru(u.slice(1,l));return v?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[v]>"u"&&(e.env.references[v]={title:y,href:d}),e.line=s),!0):!1}const KD=["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"],jD="[a-zA-Z_:][a-zA-Z0-9:._-]*",qD="[^\"'=<>`\\x00-\\x20]+",HD="'[^']*'",GD='"[^"]*"',VD="(?:"+qD+"|"+HD+"|"+GD+")",WD="(?:\\s+"+jD+"(?:\\s*=\\s*"+VD+")?)",Fy="<[A-Za-z][A-Za-z0-9\\-]*"+WD+"*\\s*\\/?>",By="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",YD="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",ZD="<[?][\\s\\S]*?[?]>",XD="<![A-Za-z][^>]*>",JD="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",QD=new RegExp("^(?:"+Fy+"|"+By+"|"+YD+"|"+ZD+"|"+XD+"|"+JD+")"),e6=new RegExp("^(?:"+Fy+"|"+By+")"),fo=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+KD.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(e6.source+"\\s*$"),/^$/,!1]];function t6(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),a=0;for(;a<fo.length&&!fo[a][0].test(s);a++);if(a===fo.length)return!1;if(r)return fo[a][2];let u=t+1;const l=fo[a][1].test("");if(!fo[a][1].test(s)){for(;u<n&&!(e.sCount[u]<e.blkIndent&&(l||!e.isEmpty(u)));u++)if(o=e.bMarks[u]+e.tShift[u],i=e.eMarks[u],s=e.src.slice(o,i),fo[a][1].test(s)){s.length!==0&&u++;break}}e.line=u;const c=e.push("html_block","",0);return c.map=[t,u],c.content=e.getLines(t,u,e.blkIndent,!0),!0}function n6(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let a=1;for(s=e.src.charCodeAt(++o);s===35&&o<i&&a<=6;)a++,s=e.src.charCodeAt(++o);if(a>6||o<i&&!At(s))return!1;if(r)return!0;i=e.skipSpacesBack(i,o);const u=e.skipCharsBack(i,35,o);u>o&&At(e.src.charCodeAt(u-1))&&(i=u),e.line=t+1;const l=e.push("heading_open","h"+String(a),1);l.markup="########".slice(0,a),l.map=[t,e.line];const c=e.push("inline","",0);c.content=ou(e.src.slice(o,i)),c.map=[t,e.line],c.children=[];const d=e.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function r6(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let i=0,s,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let h=e.bMarks[a]+e.tShift[a];const p=e.eMarks[a];if(h<p&&(s=e.src.charCodeAt(h),(s===45||s===61)&&(h=e.skipChars(h,s),h=e.skipSpaces(h),h>=p))){i=s===61?1:2;break}}if(e.sCount[a]<0)continue;let g=!1;for(let h=0,p=r.length;h<p;h++)if(r[h](e,a,n,!0)){g=!0;break}if(g)break}if(!i)return e.parentType=o,!1;const u=ou(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const l=e.push("heading_open","h"+String(i),1);l.markup=String.fromCharCode(s),l.map=[t,e.line];const c=e.push("inline","",0);c.content=u,c.map=[t,e.line-1],c.children=[];const d=e.push("heading_close","h"+String(i),-1);return d.markup=String.fromCharCode(s),e.parentType=o,!0}function o6(e,t,n){const r=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let i=t+1;for(e.parentType="paragraph";i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3||e.sCount[i]<0)continue;let l=!1;for(let c=0,d=r.length;c<d;c++)if(r[c](e,i,n,!0)){l=!0;break}if(l)break}const s=ou(e.getLines(t,i,e.blkIndent,!1));e.line=i;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const u=e.push("inline","",0);return u.content=s,u.map=[t,e.line],u.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const Ps=[["table",MD,["paragraph","reference"]],["code",PD],["fence",$D,["paragraph","reference","blockquote","list"]],["blockquote",LD,["paragraph","reference","blockquote","list"]],["hr",FD,["paragraph","reference","blockquote","list"]],["list",zD,["paragraph","reference","blockquote"]],["reference",UD],["html_block",t6,["paragraph","reference","blockquote"]],["heading",n6,["paragraph","reference","blockquote"]],["lheading",r6],["paragraph",o6]];function iu(){this.ruler=new mn;for(let e=0;e<Ps.length;e++)this.ruler.push(Ps[e][0],Ps[e][1],{alt:(Ps[e][2]||[]).slice()})}iu.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),o=r.length,i=e.md.options.maxNesting;let s=t,a=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=i){e.line=n;break}const u=e.line;let l=!1;for(let c=0;c<o;c++)if(l=r[c](e,s,n,!1),l){if(u>=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<n&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}};iu.prototype.parse=function(e,t,n,r){if(!e)return;const o=new this.State(e,t,n,r);this.tokenize(o,o.line,o.lineMax)};iu.prototype.State=vr;function ps(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}ps.prototype.pushPending=function(){const e=new Xn("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};ps.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new Xn(e,t,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};ps.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e);let o;if(e===0)o=32;else if(e===1)o=this.src.charCodeAt(0),(o&63488)===55296&&(o=65533);else if(o=this.src.charCodeAt(e-1),(o&64512)===56320){const y=this.src.charCodeAt(e-2);o=(y&64512)===55296?65536+(y-55296<<10)+(o-56320):65533}else(o&64512)===55296&&(o=65533);let i=e;for(;i<n&&this.src.charCodeAt(i)===r;)i++;const s=i-e;let a=i<n?this.src.charCodeAt(i):32;if((a&64512)===55296){const y=this.src.charCodeAt(i+1);a=(y&64512)===56320?65536+(a-55296<<10)+(y-56320):65533}else(a&64512)===56320&&(a=65533);const u=Zi(o)||Yi(o),l=Zi(a)||Yi(a),c=Wi(o),d=Wi(a),g=!d&&(!l||c||u),h=!c&&(!u||d||l);return{can_open:g&&(t||!h||u),can_close:h&&(t||!g||l),length:s}};ps.prototype.Token=Xn;function i6(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function s6(e,t){let n=e.pos;for(;n<e.posMax&&!i6(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const a6=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function u6(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const o=e.pending.match(a6);if(!o)return!1;const i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let a=s.url;if(a.length<=i.length)return!1;let u=a.length;for(;u>0&&a.charCodeAt(u-1)===42;)u--;u!==a.length&&(a=a.slice(0,u));const l=e.md.normalizeLink(a);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const c=e.push("link_open","a",1);c.attrs=[["href",l]],c.markup="linkify",c.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(a);const g=e.push("link_close","a",-1);g.markup="linkify",g.info="auto"}return e.pos+=a.length-i.length,!0}function l6(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&At(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const Ld=[];for(let e=0;e<256;e++)Ld.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Ld[e.charCodeAt(0)]=1});function c6(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<r&&(o=e.src.charCodeAt(n),!!At(o));)n++;return e.pos=n,!0}let i=e.src[n];if(o>=55296&&o<=56319&&n+1<r){const a=e.src.charCodeAt(n+1);a>=56320&&a<=57343&&(i+=e.src[n+1],n++)}const s="\\"+i;if(!t){const a=e.push("text_special","",0);o<256&&Ld[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function d6(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const o=n;n++;const i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(o,n),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=o)return t||(e.pending+=s),e.pos+=a,!0;let u=n,l;for(;(l=e.src.indexOf("`",u))!==-1;){for(u=l+1;u<i&&e.src.charCodeAt(u)===96;)u++;const c=u-l;if(c===a){if(!t){const d=e.push("code_inline","code",0);d.markup=s,d.content=e.src.slice(n,l).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=u,!0}e.backticks[c]=l}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=a,!0}function f6(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;const o=e.scanDelims(e.pos,!0);let i=o.length;const s=String.fromCharCode(r);if(i<2)return!1;let a;i%2&&(a=e.push("text","",0),a.content=s,i--);for(let u=0;u<i;u+=2)a=e.push("text","",0),a.content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function Jg(e,t){let n;const r=[],o=t.length;for(let i=0;i<o;i++){const s=t[i];if(s.marker!==126||s.end===-1)continue;const a=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&r.push(a.token-1)}for(;r.length;){const i=r.pop();let s=i+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,i!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[i],e.tokens[i]=n)}}function g6(e){const t=e.tokens_meta,n=e.tokens_meta.length;Jg(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Jg(e,t[r].delimiters)}const zy={tokenize:f6,postProcess:g6};function h6(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;const o=e.scanDelims(e.pos,r===42);for(let i=0;i<o.length;i++){const s=e.push("text","",0);s.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function Qg(e,t){const n=t.length;for(let r=n-1;r>=0;r--){const o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,a=String.fromCharCode(o.marker),u=e.tokens[o.token];u.type=s?"strong_open":"em_open",u.tag=s?"strong":"em",u.nesting=1,u.markup=s?a+a:a,u.content="";const l=e.tokens[i.token];l.type=s?"strong_close":"em_close",l.tag=s?"strong":"em",l.nesting=-1,l.markup=s?a+a:a,l.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function p6(e){const t=e.tokens_meta,n=e.tokens_meta.length;Qg(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Qg(e,t[r].delimiters)}const Uy={tokenize:h6,postProcess:p6};function m6(e,t){let n,r,o,i,s="",a="",u=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const c=e.pos,d=e.posMax,g=e.pos+1,h=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(h<0)return!1;let p=h+1;if(p<d&&e.src.charCodeAt(p)===40){for(l=!1,p++;p<d&&(n=e.src.charCodeAt(p),!(!At(n)&&n!==10));p++);if(p>=d)return!1;if(u=p,o=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?p=o.pos:s="",u=p;p<d&&(n=e.src.charCodeAt(p),!(!At(n)&&n!==10));p++);if(o=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<d&&u!==p&&o.ok)for(a=o.str,p=o.pos;p<d&&(n=e.src.charCodeAt(p),!(!At(n)&&n!==10));p++);}(p>=d||e.src.charCodeAt(p)!==41)&&(l=!0),p++}if(l){if(typeof e.env.references>"u")return!1;if(p<d&&e.src.charCodeAt(p)===91?(u=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?r=e.src.slice(u,p++):p=h+1):p=h+1,r||(r=e.src.slice(g,h)),i=e.env.references[ru(r)],!i)return e.pos=c,!1;s=i.href,a=i.title}if(!t){e.pos=g,e.posMax=h;const m=e.push("link_open","a",1),y=[["href",s]];m.attrs=y,a&&y.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=d,!0}function b6(e,t){let n,r,o,i,s,a,u,l,c="";const d=e.pos,g=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const h=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(i=p+1,i<g&&e.src.charCodeAt(i)===40){for(i++;i<g&&(n=e.src.charCodeAt(i),!(!At(n)&&n!==10));i++);if(i>=g)return!1;for(l=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok&&(c=e.md.normalizeLink(a.str),e.md.validateLink(c)?i=a.pos:c=""),l=i;i<g&&(n=e.src.charCodeAt(i),!(!At(n)&&n!==10));i++);if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<g&&l!==i&&a.ok)for(u=a.str,i=a.pos;i<g&&(n=e.src.charCodeAt(i),!(!At(n)&&n!==10));i++);else u="";if(i>=g||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<g&&e.src.charCodeAt(i)===91?(l=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?o=e.src.slice(l,i++):i=p+1):i=p+1,o||(o=e.src.slice(h,p)),s=e.env.references[ru(o)],!s)return e.pos=d,!1;c=s.href,u=s.title}if(!t){r=e.src.slice(h,p);const m=[];e.md.inline.parse(r,e.md,e.env,m);const y=e.push("image","img",0),v=[["src",c],["alt",""]];y.attrs=v,y.children=m,y.content=r,u&&v.push(["title",u])}return e.pos=i,e.posMax=g,!0}const y6=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,v6=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function w6(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}const i=e.src.slice(r+1,n);if(v6.test(i)){const s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=i.length+2,!0}if(y6.test(i)){const s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=i.length+2,!0}return!1}function x6(e){return/^<a[>\s]/i.test(e)}function _6(e){return/^<\/a\s*>/i.test(e)}function E6(e){const t=e|32;return t>=97&&t<=122}function C6(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!E6(o))return!1;const i=e.src.slice(r).match(QD);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],x6(s.content)&&e.linkLevel++,_6(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const S6=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,k6=/^&([a-z][a-z0-9]{1,31});/i;function A6(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const i=e.src.slice(n).match(S6);if(i){if(!t){const s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),a=e.push("text_special","",0);a.content=Pd(s)?Vi(s):Vi(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(n).match(k6);if(i){const s=GI(i[0]);if(s!==i[0]){if(!t){const a=e.push("text_special","",0);a.content=s,a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function eh(e){const t={},n=e.length;if(!n)return;let r=0,o=-2;const i=[];for(let s=0;s<n;s++){const a=e[s];if(i.push(0),(e[r].marker!==a.marker||o!==a.token-1)&&(r=s),o=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const u=t[a.marker][(a.open?3:0)+a.length%3];let l=r-i[r]-1,c=l;for(;l>u;l-=i[l]+1){const d=e[l];if(d.marker===a.marker&&d.open&&d.end<0){let g=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(g=!0),!g){const h=l>0&&!e[l-1].open?i[l-1]+1:0;i[s]=s-l+h,i[l]=h,a.open=!1,d.end=s,d.close=!1,c=-1,o=-2;break}}}c!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=c)}}function T6(e){const t=e.tokens_meta,n=e.tokens_meta.length;eh(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&eh(t[r].delimiters)}function I6(e){let t,n,r=0;const o=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,o[t].type==="text"&&t+1<i&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}const Ru=[["text",s6],["linkify",u6],["newline",l6],["escape",c6],["backticks",d6],["strikethrough",zy.tokenize],["emphasis",Uy.tokenize],["link",m6],["image",b6],["autolink",w6],["html_inline",C6],["entity",A6]],Ou=[["balance_pairs",T6],["strikethrough",zy.postProcess],["emphasis",Uy.postProcess],["fragments_join",I6]];function ms(){this.ruler=new mn;for(let e=0;e<Ru.length;e++)this.ruler.push(Ru[e][0],Ru[e][1]);this.ruler2=new mn;for(let e=0;e<Ou.length;e++)this.ruler2.push(Ou[e][0],Ou[e][1])}ms.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,o=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let s=!1;if(e.level<o){for(let a=0;a<r;a++)if(e.level++,s=n[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};ms.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos<r;){const i=e.pos;let s=!1;if(e.level<o){for(let a=0;a<n;a++)if(s=t[a](e,!1),s){if(i>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};ms.prototype.parse=function(e,t,n,r){const o=new this.State(e,t,n,r);this.tokenize(o);const i=this.ruler2.getRules(""),s=i.length;for(let a=0;a<s;a++)i[a](o)};ms.prototype.State=ps;function D6(e){const t={};e=e||{},t.src_Any=Ay.source,t.src_Cc=Ty.source,t.src_Z=Dy.source,t.src_P=Nd.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Ic(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function su(e){return Object.prototype.toString.call(e)}function R6(e){return su(e)==="[object String]"}function O6(e){return su(e)==="[object Object]"}function N6(e){return su(e)==="[object RegExp]"}function th(e){return su(e)==="[object Function]"}function M6(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Ky={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function P6(e){return Object.keys(e||{}).reduce(function(t,n){return t||Ky.hasOwnProperty(n)},!1)}const $6={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},L6="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",F6="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function B6(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function nh(){return function(e,t){t.normalize(e)}}function pa(e){const t=e.re=D6(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(L6),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(r(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(r(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(r(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];e.__compiled__={};function i(a,u){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+u)}Object.keys(e.__schemas__).forEach(function(a){const u=e.__schemas__[a];if(u===null)return;const l={validate:null,link:null};if(e.__compiled__[a]=l,O6(u)){N6(u.validate)?l.validate=B6(u.validate):th(u.validate)?l.validate=u.validate:i(a,u),th(u.normalize)?l.normalize=u.normalize:u.normalize?i(a,u):l.normalize=nh();return}if(R6(u)){o.push(a);return}i(a,u)}),o.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:nh()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(M6).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function jy(e,t,n,r){const o=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=o,this.text=o,this.url=o}function In(e,t){if(!(this instanceof In))return new In(e,t);t||P6(e)&&(t=e,e={}),this.__opts__=Ic({},Ky,t),this.__schemas__=Ic({},$6,e),this.__compiled__={},this.__tlds__=F6,this.__tlds_replaced__=!1,this.re={},pa(this)}In.prototype.add=function(t,n){return this.__schemas__[t]=n,pa(this),this};In.prototype.set=function(t){return this.__opts__=Ic(this.__opts__,t),this};In.prototype.test=function(t){if(!t.length)return!1;let n,r;if(this.re.schema_test.test(t)){for(r=this.re.schema_search,r.lastIndex=0;(n=r.exec(t))!==null;)if(this.testSchemaAt(t,n[2],r.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};In.prototype.pretest=function(t){return this.re.pretest.test(t)};In.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};In.prototype.match=function(t){const n=[],r=[],o=[],i=[];let s,a,u;function l(g,h){return g?h?g.index!==h.index?g.index<h.index?g:h:g.lastIndex>=h.lastIndex?g:h:g:h}if(!t.length)return null;if(this.re.schema_test.test(t))for(u=this.re.schema_search,u.lastIndex=0;(s=u.exec(t))!==null;)a=this.testSchemaAt(t,s[2],u.lastIndex),a&&r.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(u=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)o.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(u=this.re.email_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)i.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});const c=[0,0,0];let d=0;for(;;){const g=[r[c[0]],i[c[1]],o[c[2]]],h=l(l(g[0],g[1]),g[2]);if(!h)break;if(h===g[0]?c[0]++:h===g[1]?c[1]++:c[2]++,h.index<d)continue;const p=new jy(t,h.schema,h.index,h.lastIndex);this.__compiled__[p.schema].normalize(p,this),n.push(p),d=h.lastIndex}return n.length?n:null};In.prototype.matchAtStart=function(t){if(!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);if(!r)return null;const o=new jy(t,n[2],n.index+n[1].length,n.index+n[0].length+r);return this.__compiled__[o.schema].normalize(o,this),o};In.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),pa(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,pa(this),this)};In.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};In.prototype.onCompile=function(){};const Wo=2147483647,sr=36,Fd=1,Xi=26,z6=38,U6=700,qy=72,Hy=128,Gy="-",K6=/^xn--/,j6=/[^\0-\x7F]/,q6=/[\x2E\u3002\uFF0E\uFF61]/g,H6={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Nu=sr-Fd,ar=Math.floor,Mu=String.fromCharCode;function jr(e){throw new RangeError(H6[e])}function G6(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Vy(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(q6,".");const o=e.split("."),i=G6(o,t).join(".");return r+i}function Wy(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=e.charCodeAt(n++);(i&64512)==56320?t.push(((o&1023)<<10)+(i&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const V6=e=>String.fromCodePoint(...e),W6=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:sr},rh=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Yy=function(e,t,n){let r=0;for(e=n?ar(e/U6):e>>1,e+=ar(e/t);e>Nu*Xi>>1;r+=sr)e=ar(e/Nu);return ar(r+(Nu+1)*e/(e+z6))},Zy=function(e){const t=[],n=e.length;let r=0,o=Hy,i=qy,s=e.lastIndexOf(Gy);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&jr("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<n;){const u=r;for(let c=1,d=sr;;d+=sr){a>=n&&jr("invalid-input");const g=W6(e.charCodeAt(a++));g>=sr&&jr("invalid-input"),g>ar((Wo-r)/c)&&jr("overflow"),r+=g*c;const h=d<=i?Fd:d>=i+Xi?Xi:d-i;if(g<h)break;const p=sr-h;c>ar(Wo/p)&&jr("overflow"),c*=p}const l=t.length+1;i=Yy(r-u,l,u==0),ar(r/l)>Wo-o&&jr("overflow"),o+=ar(r/l),r%=l,t.splice(r++,0,o)}return String.fromCodePoint(...t)},Xy=function(e){const t=[];e=Wy(e);const n=e.length;let r=Hy,o=0,i=qy;for(const u of e)u<128&&t.push(Mu(u));const s=t.length;let a=s;for(s&&t.push(Gy);a<n;){let u=Wo;for(const c of e)c>=r&&c<u&&(u=c);const l=a+1;u-r>ar((Wo-o)/l)&&jr("overflow"),o+=(u-r)*l,r=u;for(const c of e)if(c<r&&++o>Wo&&jr("overflow"),c===r){let d=o;for(let g=sr;;g+=sr){const h=g<=i?Fd:g>=i+Xi?Xi:g-i;if(d<h)break;const p=d-h,m=sr-h;t.push(Mu(rh(h+p%m,0))),d=ar(p/m)}t.push(Mu(rh(d,0))),i=Yy(o,l,a===s),o=0,++a}++o,++r}return t.join("")},Y6=function(e){return Vy(e,function(t){return K6.test(t)?Zy(t.slice(4).toLowerCase()):t})},Z6=function(e){return Vy(e,function(t){return j6.test(t)?"xn--"+Xy(t):t})},Jy={version:"2.3.1",ucs2:{decode:Wy,encode:V6},decode:Zy,encode:Xy,toASCII:Z6,toUnicode:Y6},X6={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},J6={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},Q6={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},eR={default:X6,zero:J6,commonmark:Q6},tR=/^(vbscript|javascript|file|data):/,nR=/^data:image\/(gif|png|jpeg|webp);/;function rR(e){const t=e.trim().toLowerCase();return tR.test(t)?nR.test(t):!0}const Qy=["http:","https:","mailto:"];function oR(e){const t=Od(e,!0);if(t.hostname&&(!t.protocol||Qy.indexOf(t.protocol)>=0))try{t.hostname=Jy.toASCII(t.hostname)}catch{}return hs(Rd(t))}function iR(e){const t=Od(e,!0);if(t.hostname&&(!t.protocol||Qy.indexOf(t.protocol)>=0))try{t.hostname=Jy.toUnicode(t.hostname)}catch{}return ri(Rd(t),ri.defaultChars+"%")}function Ln(e,t){if(!(this instanceof Ln))return new Ln(e,t);t||Md(e)||(t=e||{},e="default"),this.inline=new ms,this.block=new iu,this.core=new $d,this.renderer=new di,this.linkify=new In,this.validateLink=rR,this.normalizeLink=oR,this.normalizeLinkText=iR,this.utils=uD,this.helpers=nu({},fD),this.options={},this.configure(e),t&&this.set(t)}Ln.prototype.set=function(e){return nu(this.options,e),this};Ln.prototype.configure=function(e){const t=this;if(Md(e)){const n=e;if(e=eR[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};Ln.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Ln.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Ln.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Ln.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Ln.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Ln.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Ln.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function bs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pu,oh;function sR(){if(oh)return Pu;oh=1;var e=!0,t=!1,n=!1;Pu=function(m,y){y&&(e=!y.enabled,t=!!y.label,n=!!y.labelAfter),m.core.ruler.after("inline","github-task-lists",function(v){for(var b=v.tokens,w=2;w<b.length;w++)i(b,w)&&(s(b[w],v.Token),r(b[w-2],"class","task-list-item"+(e?"":" enabled")),r(b[o(b,w-2)],"class","contains-task-list"))})};function r(m,y,v){var b=m.attrIndex(y),w=[y,v];b<0?m.attrPush(w):m.attrs[b]=w}function o(m,y){for(var v=m[y].level-1,b=y-1;b>=0;b--)if(m[b].level===v)return b;return-1}function i(m,y){return d(m[y])&&g(m[y-1])&&h(m[y-2])&&p(m[y])}function s(m,y){if(m.children.unshift(a(m,y)),m.children[1].content=m.children[1].content.slice(3),m.content=m.content.slice(3),t)if(n){m.children.pop();var v="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);m.children[0].content=m.children[0].content.slice(0,-1)+' id="'+v+'">',m.children.push(c(m.content,v,y))}else m.children.unshift(u(y)),m.children.push(l(y))}function a(m,y){var v=new y("html_inline","",0),b=e?' disabled="" ':"";return m.content.indexOf("[ ] ")===0?v.content='<input class="task-list-item-checkbox"'+b+'type="checkbox">':(m.content.indexOf("[x] ")===0||m.content.indexOf("[X] ")===0)&&(v.content='<input class="task-list-item-checkbox" checked=""'+b+'type="checkbox">'),v}function u(m){var y=new m("html_inline","",0);return y.content="<label>",y}function l(m){var y=new m("html_inline","",0);return y.content="</label>",y}function c(m,y,v){var b=new v("html_inline","",0);return b.content='<label class="task-list-item-label" for="'+y+'">'+m+"</label>",b.attrs=[{for:y}],b}function d(m){return m.type==="inline"}function g(m){return m.type==="paragraph_open"}function h(m){return m.type==="list_item_open"}function p(m){return m.content.indexOf("[ ] ")===0||m.content.indexOf("[x] ")===0||m.content.indexOf("[X] ")===0}return Pu}var aR=sR();const uR=bs(aR);var $u,ih;function lR(){if(ih)return $u;ih=1;function e(O){return O instanceof Map?O.clear=O.delete=O.set=function(){throw new Error("map is read-only")}:O instanceof Set&&(O.add=O.clear=O.delete=function(){throw new Error("set is read-only")}),Object.freeze(O),Object.getOwnPropertyNames(O).forEach(Q=>{const be=O[Q],le=typeof be;(le==="object"||le==="function")&&!Object.isFrozen(be)&&e(be)}),O}class t{constructor(Q){Q.data===void 0&&(Q.data={}),this.data=Q.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(O){return O.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(O,...Q){const be=Object.create(null);for(const le in O)be[le]=O[le];return Q.forEach(function(le){for(const je in le)be[je]=le[je]}),be}const o="</span>",i=O=>!!O.scope,s=(O,{prefix:Q})=>{if(O.startsWith("language:"))return O.replace("language:","language-");if(O.includes(".")){const be=O.split(".");return[`${Q}${be.shift()}`,...be.map((le,je)=>`${le}${"_".repeat(je+1)}`)].join(" ")}return`${Q}${O}`};class a{constructor(Q,be){this.buffer="",this.classPrefix=be.classPrefix,Q.walk(this)}addText(Q){this.buffer+=n(Q)}openNode(Q){if(!i(Q))return;const be=s(Q.scope,{prefix:this.classPrefix});this.span(be)}closeNode(Q){i(Q)&&(this.buffer+=o)}value(){return this.buffer}span(Q){this.buffer+=`<span class="${Q}">`}}const u=(O={})=>{const Q={children:[]};return Object.assign(Q,O),Q};class l{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Q){this.top.children.push(Q)}openNode(Q){const be=u({scope:Q});this.add(be),this.stack.push(be)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Q){return this.constructor._walk(Q,this.rootNode)}static _walk(Q,be){return typeof be=="string"?Q.addText(be):be.children&&(Q.openNode(be),be.children.forEach(le=>this._walk(Q,le)),Q.closeNode(be)),Q}static _collapse(Q){typeof Q!="string"&&Q.children&&(Q.children.every(be=>typeof be=="string")?Q.children=[Q.children.join("")]:Q.children.forEach(be=>{l._collapse(be)}))}}class c extends l{constructor(Q){super(),this.options=Q}addText(Q){Q!==""&&this.add(Q)}startScope(Q){this.openNode(Q)}endScope(){this.closeNode()}__addSublanguage(Q,be){const le=Q.root;be&&(le.scope=`language:${be}`),this.add(le)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(O){return O?typeof O=="string"?O:O.source:null}function g(O){return m("(?=",O,")")}function h(O){return m("(?:",O,")*")}function p(O){return m("(?:",O,")?")}function m(...O){return O.map(be=>d(be)).join("")}function y(O){const Q=O[O.length-1];return typeof Q=="object"&&Q.constructor===Object?(O.splice(O.length-1,1),Q):{}}function v(...O){return"("+(y(O).capture?"":"?:")+O.map(le=>d(le)).join("|")+")"}function b(O){return new RegExp(O.toString()+"|").exec("").length-1}function w(O,Q){const be=O&&O.exec(Q);return be&&be.index===0}const E=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(O,{joinWith:Q}){let be=0;return O.map(le=>{be+=1;const je=be;let et=d(le),Ee="";for(;et.length>0;){const ye=E.exec(et);if(!ye){Ee+=et;break}Ee+=et.substring(0,ye.index),et=et.substring(ye.index+ye[0].length),ye[0][0]==="\\"&&ye[1]?Ee+="\\"+String(Number(ye[1])+je):(Ee+=ye[0],ye[0]==="("&&be++)}return Ee}).map(le=>`(${le})`).join(Q)}const A=/\b\B/,I="[a-zA-Z]\\w*",S="[a-zA-Z_]\\w*",k="\\b\\d+(\\.\\d+)?",P="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",R="\\b(0b[01]+)",L="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",F=(O={})=>{const Q=/^#![ ]*\//;return O.binary&&(O.begin=m(Q,/.*\b/,O.binary,/\b.*/)),r({scope:"meta",begin:Q,end:/$/,relevance:0,"on:begin":(be,le)=>{be.index!==0&&le.ignoreMatch()}},O)},D={begin:"\\\\[\\s\\S]",relevance:0},B={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[D]},N={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[D]},X={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},se=function(O,Q,be={}){const le=r({scope:"comment",begin:O,end:Q,contains:[]},be);le.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const je=v("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return le.contains.push({begin:m(/[ ]+/,"(",je,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),le},K=se("//","$"),U=se("/\\*","\\*/"),oe=se("#","$"),H={scope:"number",begin:k,relevance:0},z={scope:"number",begin:P,relevance:0},Z={scope:"number",begin:R,relevance:0},te={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[D,{begin:/\[/,end:/\]/,relevance:0,contains:[D]}]},he={scope:"title",begin:I,relevance:0},W={scope:"title",begin:S,relevance:0},M={begin:"\\.\\s*"+S,relevance:0};var ae=Object.freeze({__proto__:null,APOS_STRING_MODE:B,BACKSLASH_ESCAPE:D,BINARY_NUMBER_MODE:Z,BINARY_NUMBER_RE:R,COMMENT:se,C_BLOCK_COMMENT_MODE:U,C_LINE_COMMENT_MODE:K,C_NUMBER_MODE:z,C_NUMBER_RE:P,END_SAME_AS_BEGIN:function(O){return Object.assign(O,{"on:begin":(Q,be)=>{be.data._beginMatch=Q[1]},"on:end":(Q,be)=>{be.data._beginMatch!==Q[1]&&be.ignoreMatch()}})},HASH_COMMENT_MODE:oe,IDENT_RE:I,MATCH_NOTHING_RE:A,METHOD_GUARD:M,NUMBER_MODE:H,NUMBER_RE:k,PHRASAL_WORDS_MODE:X,QUOTE_STRING_MODE:N,REGEXP_MODE:te,RE_STARTERS_RE:L,SHEBANG:F,TITLE_MODE:he,UNDERSCORE_IDENT_RE:S,UNDERSCORE_TITLE_MODE:W});function _e(O,Q){O.input[O.index-1]==="."&&Q.ignoreMatch()}function fe(O,Q){O.className!==void 0&&(O.scope=O.className,delete O.className)}function xe(O,Q){Q&&O.beginKeywords&&(O.begin="\\b("+O.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",O.__beforeBegin=_e,O.keywords=O.keywords||O.beginKeywords,delete O.beginKeywords,O.relevance===void 0&&(O.relevance=0))}function Te(O,Q){Array.isArray(O.illegal)&&(O.illegal=v(...O.illegal))}function bt(O,Q){if(O.match){if(O.begin||O.end)throw new Error("begin & end are not supported with match");O.begin=O.match,delete O.match}}function q(O,Q){O.relevance===void 0&&(O.relevance=1)}const V=(O,Q)=>{if(!O.beforeMatch)return;if(O.starts)throw new Error("beforeMatch cannot be used with starts");const be=Object.assign({},O);Object.keys(O).forEach(le=>{delete O[le]}),O.keywords=be.keywords,O.begin=m(be.beforeMatch,g(be.begin)),O.starts={relevance:0,contains:[Object.assign(be,{endsParent:!0})]},O.relevance=0,delete be.beforeMatch},ce=["of","and","for","in","not","or","if","then","parent","list","value"],Ae="keyword";function Le(O,Q,be=Ae){const le=Object.create(null);return typeof O=="string"?je(be,O.split(" ")):Array.isArray(O)?je(be,O):Object.keys(O).forEach(function(et){Object.assign(le,Le(O[et],Q,et))}),le;function je(et,Ee){Q&&(Ee=Ee.map(ye=>ye.toLowerCase())),Ee.forEach(function(ye){const He=ye.split("|");le[He[0]]=[et,qe(He[0],He[1])]})}}function qe(O,Q){return Q?Number(Q):ut(O)?0:1}function ut(O){return ce.includes(O.toLowerCase())}const $t={},Be=O=>{console.error(O)},Ve=(O,...Q)=>{console.log(`WARN: ${O}`,...Q)},Qe=(O,Q)=>{$t[`${O}/${Q}`]||(console.log(`Deprecated as of ${O}. ${Q}`),$t[`${O}/${Q}`]=!0)},wt=new Error;function Dt(O,Q,{key:be}){let le=0;const je=O[be],et={},Ee={};for(let ye=1;ye<=Q.length;ye++)Ee[ye+le]=je[ye],et[ye+le]=!0,le+=b(Q[ye-1]);O[be]=Ee,O[be]._emit=et,O[be]._multi=!0}function Ot(O){if(Array.isArray(O.begin)){if(O.skip||O.excludeBegin||O.returnBegin)throw Be("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),wt;if(typeof O.beginScope!="object"||O.beginScope===null)throw Be("beginScope must be object"),wt;Dt(O,O.begin,{key:"beginScope"}),O.begin=C(O.begin,{joinWith:""})}}function hn(O){if(Array.isArray(O.end)){if(O.skip||O.excludeEnd||O.returnEnd)throw Be("skip, excludeEnd, returnEnd not compatible with endScope: {}"),wt;if(typeof O.endScope!="object"||O.endScope===null)throw Be("endScope must be object"),wt;Dt(O,O.end,{key:"endScope"}),O.end=C(O.end,{joinWith:""})}}function zn(O){O.scope&&typeof O.scope=="object"&&O.scope!==null&&(O.beginScope=O.scope,delete O.scope)}function Jt(O){zn(O),typeof O.beginScope=="string"&&(O.beginScope={_wrap:O.beginScope}),typeof O.endScope=="string"&&(O.endScope={_wrap:O.endScope}),Ot(O),hn(O)}function zt(O){function Q(Ee,ye){return new RegExp(d(Ee),"m"+(O.case_insensitive?"i":"")+(O.unicodeRegex?"u":"")+(ye?"g":""))}class be{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ye,He){He.position=this.position++,this.matchIndexes[this.matchAt]=He,this.regexes.push([He,ye]),this.matchAt+=b(ye)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ye=this.regexes.map(He=>He[1]);this.matcherRe=Q(C(ye,{joinWith:"|"}),!0),this.lastIndex=0}exec(ye){this.matcherRe.lastIndex=this.lastIndex;const He=this.matcherRe.exec(ye);if(!He)return null;const _t=He.findIndex((ie,Re)=>Re>0&&ie!==void 0),Tt=this.matchIndexes[_t];return He.splice(0,_t),Object.assign(He,Tt)}}class le{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ye){if(this.multiRegexes[ye])return this.multiRegexes[ye];const He=new be;return this.rules.slice(ye).forEach(([_t,Tt])=>He.addRule(_t,Tt)),He.compile(),this.multiRegexes[ye]=He,He}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ye,He){this.rules.push([ye,He]),He.type==="begin"&&this.count++}exec(ye){const He=this.getMatcher(this.regexIndex);He.lastIndex=this.lastIndex;let _t=He.exec(ye);if(this.resumingScanAtSamePosition()&&!(_t&&_t.index===this.lastIndex)){const Tt=this.getMatcher(0);Tt.lastIndex=this.lastIndex+1,_t=Tt.exec(ye)}return _t&&(this.regexIndex+=_t.position+1,this.regexIndex===this.count&&this.considerAll()),_t}}function je(Ee){const ye=new le;return Ee.contains.forEach(He=>ye.addRule(He.begin,{rule:He,type:"begin"})),Ee.terminatorEnd&&ye.addRule(Ee.terminatorEnd,{type:"end"}),Ee.illegal&&ye.addRule(Ee.illegal,{type:"illegal"}),ye}function et(Ee,ye){const He=Ee;if(Ee.isCompiled)return He;[fe,bt,Jt,V].forEach(Tt=>Tt(Ee,ye)),O.compilerExtensions.forEach(Tt=>Tt(Ee,ye)),Ee.__beforeBegin=null,[xe,Te,q].forEach(Tt=>Tt(Ee,ye)),Ee.isCompiled=!0;let _t=null;return typeof Ee.keywords=="object"&&Ee.keywords.$pattern&&(Ee.keywords=Object.assign({},Ee.keywords),_t=Ee.keywords.$pattern,delete Ee.keywords.$pattern),_t=_t||/\w+/,Ee.keywords&&(Ee.keywords=Le(Ee.keywords,O.case_insensitive)),He.keywordPatternRe=Q(_t,!0),ye&&(Ee.begin||(Ee.begin=/\B|\b/),He.beginRe=Q(He.begin),!Ee.end&&!Ee.endsWithParent&&(Ee.end=/\B|\b/),Ee.end&&(He.endRe=Q(He.end)),He.terminatorEnd=d(He.end)||"",Ee.endsWithParent&&ye.terminatorEnd&&(He.terminatorEnd+=(Ee.end?"|":"")+ye.terminatorEnd)),Ee.illegal&&(He.illegalRe=Q(Ee.illegal)),Ee.contains||(Ee.contains=[]),Ee.contains=[].concat(...Ee.contains.map(function(Tt){return yn(Tt==="self"?Ee:Tt)})),Ee.contains.forEach(function(Tt){et(Tt,He)}),Ee.starts&&et(Ee.starts,ye),He.matcher=je(He),He}if(O.compilerExtensions||(O.compilerExtensions=[]),O.contains&&O.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return O.classNameAliases=r(O.classNameAliases||{}),et(O)}function pn(O){return O?O.endsWithParent||pn(O.starts):!1}function yn(O){return O.variants&&!O.cachedVariants&&(O.cachedVariants=O.variants.map(function(Q){return r(O,{variants:null},Q)})),O.cachedVariants?O.cachedVariants:pn(O)?r(O,{starts:O.starts?r(O.starts):null}):Object.isFrozen(O)?r(O):O}var Vt="11.11.1";class io extends Error{constructor(Q,be){super(Q),this.name="HTMLInjectionError",this.html=be}}const wr=n,Lr=r,dt=Symbol("nomatch"),Rn=7,ge=function(O){const Q=Object.create(null),be=Object.create(null),le=[];let je=!0;const et="Could not find the language '{}', did you forget to load/include a language module?",Ee={disableAutodetect:!0,name:"Plain text",contains:[]};let ye={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:c};function He(me){return ye.noHighlightRe.test(me)}function _t(me){let ze=me.className+" ";ze+=me.parentNode?me.parentNode.className:"";const lt=ye.languageDetectRe.exec(ze);if(lt){const Et=Je(lt[1]);return Et||(Ve(et.replace("{}",lt[1])),Ve("Falling back to no-highlight mode for this block.",me)),Et?lt[1]:"no-highlight"}return ze.split(/\s+/).find(Et=>He(Et)||Je(Et))}function Tt(me,ze,lt){let Et="",jt="";typeof ze=="object"?(Et=me,lt=ze.ignoreIllegals,jt=ze.language):(Qe("10.7.0","highlight(lang, code, ...args) has been deprecated."),Qe("10.7.0",`Please use highlight(code, options) instead.
22
+ https://github.com/highlightjs/highlight.js/issues/2277`),jt=me,Et=ze),lt===void 0&&(lt=!0);const Un={code:Et,language:jt};tn("before:highlight",Un);const Fr=Un.result?Un.result:ie(Un.language,Un.code,lt);return Fr.code=Un.code,tn("after:highlight",Fr),Fr}function ie(me,ze,lt,Et){const jt=Object.create(null);function Un(Ce,Ue){return Ce.keywords[Ue]}function Fr(){if(!Ze.keywords){Qt.addText(Ct);return}let Ce=0;Ze.keywordPatternRe.lastIndex=0;let Ue=Ze.keywordPatternRe.exec(Ct),tt="";for(;Ue;){tt+=Ct.substring(Ce,Ue.index);const yt=Qn.case_insensitive?Ue[0].toLowerCase():Ue[0],nn=Un(Ze,yt);if(nn){const[xr,qv]=nn;if(Qt.addText(tt),tt="",jt[yt]=(jt[yt]||0)+1,jt[yt]<=Rn&&(Es+=qv),xr.startsWith("_"))tt+=Ue[0];else{const Hv=Qn.classNameAliases[xr]||xr;Jn(Ue[0],Hv)}}else tt+=Ue[0];Ce=Ze.keywordPatternRe.lastIndex,Ue=Ze.keywordPatternRe.exec(Ct)}tt+=Ct.substring(Ce),Qt.addText(tt)}function xs(){if(Ct==="")return;let Ce=null;if(typeof Ze.subLanguage=="string"){if(!Q[Ze.subLanguage]){Qt.addText(Ct);return}Ce=ie(Ze.subLanguage,Ct,!0,Zd[Ze.subLanguage]),Zd[Ze.subLanguage]=Ce._top}else Ce=ve(Ct,Ze.subLanguage.length?Ze.subLanguage:null);Ze.relevance>0&&(Es+=Ce.relevance),Qt.__addSublanguage(Ce._emitter,Ce.language)}function vn(){Ze.subLanguage!=null?xs():Fr(),Ct=""}function Jn(Ce,Ue){Ce!==""&&(Qt.startScope(Ue),Qt.addText(Ce),Qt.endScope())}function Gd(Ce,Ue){let tt=1;const yt=Ue.length-1;for(;tt<=yt;){if(!Ce._emit[tt]){tt++;continue}const nn=Qn.classNameAliases[Ce[tt]]||Ce[tt],xr=Ue[tt];nn?Jn(xr,nn):(Ct=xr,Fr(),Ct=""),tt++}}function Vd(Ce,Ue){return Ce.scope&&typeof Ce.scope=="string"&&Qt.openNode(Qn.classNameAliases[Ce.scope]||Ce.scope),Ce.beginScope&&(Ce.beginScope._wrap?(Jn(Ct,Qn.classNameAliases[Ce.beginScope._wrap]||Ce.beginScope._wrap),Ct=""):Ce.beginScope._multi&&(Gd(Ce.beginScope,Ue),Ct="")),Ze=Object.create(Ce,{parent:{value:Ze}}),Ze}function Wd(Ce,Ue,tt){let yt=w(Ce.endRe,tt);if(yt){if(Ce["on:end"]){const nn=new t(Ce);Ce["on:end"](Ue,nn),nn.isMatchIgnored&&(yt=!1)}if(yt){for(;Ce.endsParent&&Ce.parent;)Ce=Ce.parent;return Ce}}if(Ce.endsWithParent)return Wd(Ce.parent,Ue,tt)}function Bv(Ce){return Ze.matcher.regexIndex===0?(Ct+=Ce[0],1):(cu=!0,0)}function zv(Ce){const Ue=Ce[0],tt=Ce.rule,yt=new t(tt),nn=[tt.__beforeBegin,tt["on:begin"]];for(const xr of nn)if(xr&&(xr(Ce,yt),yt.isMatchIgnored))return Bv(Ue);return tt.skip?Ct+=Ue:(tt.excludeBegin&&(Ct+=Ue),vn(),!tt.returnBegin&&!tt.excludeBegin&&(Ct=Ue)),Vd(tt,Ce),tt.returnBegin?0:Ue.length}function Uv(Ce){const Ue=Ce[0],tt=ze.substring(Ce.index),yt=Wd(Ze,Ce,tt);if(!yt)return dt;const nn=Ze;Ze.endScope&&Ze.endScope._wrap?(vn(),Jn(Ue,Ze.endScope._wrap)):Ze.endScope&&Ze.endScope._multi?(vn(),Gd(Ze.endScope,Ce)):nn.skip?Ct+=Ue:(nn.returnEnd||nn.excludeEnd||(Ct+=Ue),vn(),nn.excludeEnd&&(Ct=Ue));do Ze.scope&&Qt.closeNode(),!Ze.skip&&!Ze.subLanguage&&(Es+=Ze.relevance),Ze=Ze.parent;while(Ze!==yt.parent);return yt.starts&&Vd(yt.starts,Ce),nn.returnEnd?0:Ue.length}function Kv(){const Ce=[];for(let Ue=Ze;Ue!==Qn;Ue=Ue.parent)Ue.scope&&Ce.unshift(Ue.scope);Ce.forEach(Ue=>Qt.openNode(Ue))}let _s={};function Yd(Ce,Ue){const tt=Ue&&Ue[0];if(Ct+=Ce,tt==null)return vn(),0;if(_s.type==="begin"&&Ue.type==="end"&&_s.index===Ue.index&&tt===""){if(Ct+=ze.slice(Ue.index,Ue.index+1),!je){const yt=new Error(`0 width match regex (${me})`);throw yt.languageName=me,yt.badRule=_s.rule,yt}return 1}if(_s=Ue,Ue.type==="begin")return zv(Ue);if(Ue.type==="illegal"&&!lt){const yt=new Error('Illegal lexeme "'+tt+'" for mode "'+(Ze.scope||"<unnamed>")+'"');throw yt.mode=Ze,yt}else if(Ue.type==="end"){const yt=Uv(Ue);if(yt!==dt)return yt}if(Ue.type==="illegal"&&tt==="")return Ct+=`
23
+ `,1;if(lu>1e5&&lu>Ue.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ct+=tt,tt.length}const Qn=Je(me);if(!Qn)throw Be(et.replace("{}",me)),new Error('Unknown language: "'+me+'"');const jv=zt(Qn);let uu="",Ze=Et||jv;const Zd={},Qt=new ye.__emitter(ye);Kv();let Ct="",Es=0,ao=0,lu=0,cu=!1;try{if(Qn.__emitTokens)Qn.__emitTokens(ze,Qt);else{for(Ze.matcher.considerAll();;){lu++,cu?cu=!1:Ze.matcher.considerAll(),Ze.matcher.lastIndex=ao;const Ce=Ze.matcher.exec(ze);if(!Ce)break;const Ue=ze.substring(ao,Ce.index),tt=Yd(Ue,Ce);ao=Ce.index+tt}Yd(ze.substring(ao))}return Qt.finalize(),uu=Qt.toHTML(),{language:me,value:uu,relevance:Es,illegal:!1,_emitter:Qt,_top:Ze}}catch(Ce){if(Ce.message&&Ce.message.includes("Illegal"))return{language:me,value:wr(ze),illegal:!0,relevance:0,_illegalBy:{message:Ce.message,index:ao,context:ze.slice(ao-100,ao+100),mode:Ce.mode,resultSoFar:uu},_emitter:Qt};if(je)return{language:me,value:wr(ze),illegal:!1,relevance:0,errorRaised:Ce,_emitter:Qt,_top:Ze};throw Ce}}function Re(me){const ze={value:wr(me),illegal:!1,relevance:0,_top:Ee,_emitter:new ye.__emitter(ye)};return ze._emitter.addText(me),ze}function ve(me,ze){ze=ze||ye.languages||Object.keys(Q);const lt=Re(me),Et=ze.filter(Je).filter(so).map(vn=>ie(vn,me,!1));Et.unshift(lt);const jt=Et.sort((vn,Jn)=>{if(vn.relevance!==Jn.relevance)return Jn.relevance-vn.relevance;if(vn.language&&Jn.language){if(Je(vn.language).supersetOf===Jn.language)return 1;if(Je(Jn.language).supersetOf===vn.language)return-1}return 0}),[Un,Fr]=jt,xs=Un;return xs.secondBest=Fr,xs}function st(me,ze,lt){const Et=ze&&be[ze]||lt;me.classList.add("hljs"),me.classList.add(`language-${Et}`)}function Nt(me){let ze=null;const lt=_t(me);if(He(lt))return;if(tn("before:highlightElement",{el:me,language:lt}),me.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",me);return}if(me.children.length>0&&(ye.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(me)),ye.throwUnescapedHTML))throw new io("One of your code blocks includes unescaped HTML.",me.innerHTML);ze=me;const Et=ze.textContent,jt=lt?Tt(Et,{language:lt,ignoreIllegals:!0}):ve(Et);me.innerHTML=jt.value,me.dataset.highlighted="yes",st(me,lt,jt.language),me.result={language:jt.language,re:jt.relevance,relevance:jt.relevance},jt.secondBest&&(me.secondBest={language:jt.secondBest.language,relevance:jt.secondBest.relevance}),tn("after:highlightElement",{el:me,result:jt,text:Et})}function Lt(me){ye=Lr(ye,me)}const Ut=()=>{Wt(),Qe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function ln(){Wt(),Qe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Ft=!1;function Wt(){function me(){Wt()}if(document.readyState==="loading"){Ft||window.addEventListener("DOMContentLoaded",me,!1),Ft=!0;return}document.querySelectorAll(ye.cssSelector).forEach(Nt)}function ht(me,ze){let lt=null;try{lt=ze(O)}catch(Et){if(Be("Language definition for '{}' could not be registered.".replace("{}",me)),je)Be(Et);else throw Et;lt=Ee}lt.name||(lt.name=me),Q[me]=lt,lt.rawDefinition=ze.bind(null,O),lt.aliases&&Kt(lt.aliases,{languageName:me})}function Pe(me){delete Q[me];for(const ze of Object.keys(be))be[ze]===me&&delete be[ze]}function Rt(){return Object.keys(Q)}function Je(me){return me=(me||"").toLowerCase(),Q[me]||Q[be[me]]}function Kt(me,{languageName:ze}){typeof me=="string"&&(me=[me]),me.forEach(lt=>{be[lt.toLowerCase()]=ze})}function so(me){const ze=Je(me);return ze&&!ze.disableAutodetect}function ys(me){me["before:highlightBlock"]&&!me["before:highlightElement"]&&(me["before:highlightElement"]=ze=>{me["before:highlightBlock"](Object.assign({block:ze.el},ze))}),me["after:highlightBlock"]&&!me["after:highlightElement"]&&(me["after:highlightElement"]=ze=>{me["after:highlightBlock"](Object.assign({block:ze.el},ze))})}function vs(me){ys(me),le.push(me)}function gi(me){const ze=le.indexOf(me);ze!==-1&&le.splice(ze,1)}function tn(me,ze){const lt=me;le.forEach(function(Et){Et[lt]&&Et[lt](ze)})}function ws(me){return Qe("10.7.0","highlightBlock will be removed entirely in v12.0"),Qe("10.7.0","Please use highlightElement now."),Nt(me)}Object.assign(O,{highlight:Tt,highlightAuto:ve,highlightAll:Wt,highlightElement:Nt,highlightBlock:ws,configure:Lt,initHighlighting:Ut,initHighlightingOnLoad:ln,registerLanguage:ht,unregisterLanguage:Pe,listLanguages:Rt,getLanguage:Je,registerAliases:Kt,autoDetection:so,inherit:Lr,addPlugin:vs,removePlugin:gi}),O.debugMode=function(){je=!1},O.safeMode=function(){je=!0},O.versionString=Vt,O.regex={concat:m,lookahead:g,either:v,optional:p,anyNumberOfTimes:h};for(const me in ae)typeof ae[me]=="object"&&e(ae[me]);return Object.assign(O,ae),O},Ie=ge({});return Ie.newInstance=()=>ge({}),$u=Ie,Ie.HighlightJS=Ie,Ie.default=Ie,$u}var Lu,sh;function cR(){if(sh)return Lu;sh=1;function e(t){const n=t.regex,r=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),o=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=t.inherit(s,{begin:/\(/,end:/\)/}),u=t.inherit(t.APOS_STRING_MODE,{className:"string"}),l=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:o,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,l,u,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,a,l,u]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(r,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:c}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return Lu=e,Lu}var Fu,ah;function dR(){if(ah)return Fu;ah=1;function e(t){const n=t.regex,r={},o={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},o]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},s=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,r,i]};i.contains.push(u);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},d={match:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,r]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=t.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),m={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},y=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],v=["true","false"],b={match:/(\/[a-z._-]+)+/},w=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],E=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],C=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],A=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:y,literal:v,built_in:[...w,...E,"set","shopt",...C,...A]},contains:[p,t.SHEBANG(),m,g,s,a,b,u,l,c,d,r]}}return Fu=e,Fu}var Bu,uh;function fR(){if(uh)return Bu;uh=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},p=n.optional(i)+t.IDENT_RE+"\\s*\\(",v={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},b=[g,u,r,t.C_BLOCK_COMMENT_MODE,d,c],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:b.concat([{begin:/\(/,end:/\)/,keywords:v,contains:b.concat(["self"]),relevance:0}]),relevance:0},E={begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[t.inherit(h,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,c,d,u,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,c,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:v,disableAutodetect:!0,illegal:"</",contains:[].concat(w,E,b,[g,{begin:t.IDENT_RE+"::",keywords:v},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:g,strings:c,keywords:v}}}return Bu=e,Bu}var zu,lh;function gR(){if(lh)return zu;lh=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},p=n.optional(i)+t.IDENT_RE+"\\s*\\(",m=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],y=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],v=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],b=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],C={type:y,keyword:m,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:v},A={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},I=[A,g,u,r,t.C_BLOCK_COMMENT_MODE,d,c],S={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:I.concat([{begin:/\(/,end:/\)/,keywords:C,contains:I.concat(["self"]),relevance:0}]),relevance:0},k={className:"function",begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:C,relevance:0},{begin:p,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,c,d,u,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,c,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(S,k,A,I,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:C,contains:["self",u]},{begin:t.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return zu=e,zu}var Uu,ch;function hR(){if(ch)return Uu;ch=1;function e(t){const n=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],o=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:i.concat(s),built_in:n,literal:o},u=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},g=t.inherit(d,{illegal:/\n/}),h={className:"subst",begin:/\{/,end:/\}/,keywords:a},p=t.inherit(h,{illegal:/\n/}),m={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,p]},y={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]},v=t.inherit(y,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});h.contains=[y,m,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,l,t.C_BLOCK_COMMENT_MODE],p.contains=[v,m,g,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,l,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const b={variants:[c,y,m,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},w={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},E=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",C={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},b,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,w,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,w,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+E+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,w],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[b,l,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},C]}}return Uu=e,Uu}var Ku,dh;function pR(){if(dh)return Ku;dh=1;const e=l=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:l.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:l.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(l){const c=l.regex,d=e(l),g={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},h="and or not only",p=/@-?\w[\w]*(-\w+)*/,m="[a-zA-Z-][a-zA-Z0-9_-]*",y=[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[d.BLOCK_COMMENT,g,d.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+m,relevance:0},d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+i.join("|")+")"},{begin:":(:)?("+s.join("|")+")"}]},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[d.BLOCK_COMMENT,d.HEXCOLOR,d.IMPORTANT,d.CSS_NUMBER_MODE,...y,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...y,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},d.FUNCTION_DISPATCH]},{begin:c.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:p},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:h,attribute:o.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...y,d.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b"}]}}return Ku=u,Ku}var ju,fh;function mR(){if(fh)return ju;fh=1;function e(t){const n=t.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},o={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},g=t.inherit(c,{contains:[]}),h=t.inherit(d,{contains:[]});c.contains.push(h),d.contains.push(g);let p=[r,l];return[c,d,g,h].forEach(b=>{b.contains=b.contains.concat(p)}),p=p.concat(c,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},r,s,c,d,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,o,l,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return ju=e,ju}var qu,gh;function bR(){if(gh)return qu;gh=1;function e(t){const n=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return qu=e,qu}var Hu,hh;function yR(){if(hh)return Hu;hh=1;function e(t){const n=t.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",o=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=n.concat(o,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[t.COMMENT("#","$",{contains:[u]}),t.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:a},g={className:"string",contains:[t.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,d]})]}]},h="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",m={className:"number",relevance:0,variants:[{begin:`\\b(${h})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},y={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},I=[g,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:o,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[y]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:r}],relevance:0},m,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);d.contains=I,y.contains=I;const R=[{begin:/^\s*=>/,starts:{end:"$",contains:I}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:I}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(R).concat(c).concat(I)}}return Hu=e,Hu}var Gu,ph;function vR(){if(ph)return Gu;ph=1;function e(t){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}return Gu=e,Gu}var Vu,mh;function wR(){if(mh)return Vu;mh=1;function e(t){const n=t.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:n.concat(r,n.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return Vu=e,Vu}var Wu,bh;function xR(){if(bh)return Wu;bh=1;function e(t){const n=t.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},o=t.COMMENT();o.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},a={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[o,s,i,a,r,"self"],relevance:0},l=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,d=/'[^']*'/,g=n.either(l,c,d),h=n.concat(g,"(\\s*\\.\\s*",g,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[o,{className:"section",begin:/\[+/,end:/\]+/},{begin:h,className:"attr",starts:{end:/$/,contains:[o,u,s,i,a,r]}}]}}return Wu=e,Wu}var Yu,yh;function _R(){if(yh)return Yu;yh=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(s,a,u){return u===-1?"":s.replace(a,l=>o(s,a,u-1))}function i(s){const a=s.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",l=u+o("(?:<"+u+"~~~(?:\\s*,\\s*"+u+"~~~)*>)?",/~~~/g,2),p={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},m={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},y={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[s.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,illegal:/<\/|#/,contains:[s.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[s.BACKSLASH_ESCAPE]},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[a.concat(/(?!else)/,u),/\s+/,u,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[y,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+l+"\\s+)",s.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[m,s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,r,s.C_BLOCK_COMMENT_MODE]},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},r,m]}}return Yu=i,Yu}var Zu,vh;function ER(){if(vh)return Zu;vh=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(l){const c=l.regex,d=(W,{after:M})=>{const Y="</"+W[0].slice(1);return W.input.indexOf(Y,M)!==-1},g=e,h={begin:"<>",end:"</>"},p=/<[A-Za-z0-9\\._:-]+\s*\/>/,m={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(W,M)=>{const Y=W[0].length+W.index,ae=W.input[Y];if(ae==="<"||ae===","){M.ignoreMatch();return}ae===">"&&(d(W,{after:Y})||M.ignoreMatch());let _e;const fe=W.input.substring(Y);if(_e=fe.match(/^\s*=/)){M.ignoreMatch();return}if((_e=fe.match(/^\s+extends\s+/))&&_e.index===0){M.ignoreMatch();return}}},y={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},v="[0-9](_?[0-9])*",b=`\\.(${v})`,w="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",E={className:"number",variants:[{begin:`(\\b(${w})((${b})|\\.)?|(${b}))[eE][+-]?(${v})\\b`},{begin:`\\b(${w})\\b((${b})\\b|\\.)?|(${b})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},C={className:"subst",begin:"\\$\\{",end:"\\}",keywords:y,contains:[]},A={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,C],subLanguage:"xml"}},I={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,C],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,C],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[l.BACKSLASH_ESCAPE,C]},R={className:"comment",variants:[l.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:g+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),l.C_BLOCK_COMMENT_MODE,l.C_LINE_COMMENT_MODE]},L=[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,A,I,S,k,{match:/\$\d+/},E];C.contains=L.concat({begin:/\{/,end:/\}/,keywords:y,contains:["self"].concat(L)});const F=[].concat(R,C.contains),D=F.concat([{begin:/(\s*)\(/,end:/\)/,keywords:y,contains:["self"].concat(F)}]),B={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:D},N={variants:[{match:[/class/,/\s+/,g,/\s+/,/extends/,/\s+/,c.concat(g,"(",c.concat(/\./,g),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,g],scope:{1:"keyword",3:"title.class"}}]},X={relevance:0,match:c.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},se={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},K={variants:[{match:[/function/,/\s+/,g,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[B],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function oe(W){return c.concat("(?!",W.join("|"),")")}const H={match:c.concat(/\b/,oe([...i,"super","import"].map(W=>`${W}\\s*\\(`)),g,c.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:c.concat(/\./,c.lookahead(c.concat(g,/(?![0-9A-Za-z$_(])/))),end:g,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,g,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},B]},te="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+l.UNDERSCORE_IDENT_RE+")\\s*=>",he={match:[/const|var|let/,/\s+/,g,/\s*/,/=\s*/,/(async\s*)?/,c.lookahead(te)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[B]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:y,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:X},illegal:/#(?![$_A-z])/,contains:[l.SHEBANG({label:"shebang",binary:"node",relevance:5}),se,l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,A,I,S,k,R,{match:/\$\d+/},E,X,{scope:"attr",match:g+c.lookahead(":"),relevance:0},he,{begin:"("+l.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,l.REGEXP_MODE,{className:"function",begin:te,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:l.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:h.begin,end:h.end},{match:p},{begin:m.begin,"on:begin":m.isTrulyOpeningTag,end:m.end}],subLanguage:"xml",contains:[{begin:m.begin,end:m.end,skip:!0,contains:["self"]}]}]},K,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+l.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[B,l.inherit(l.TITLE_MODE,{begin:g,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+g,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[B]},H,U,N,Z,{match:/\$[(.]/}]}}return Zu=u,Zu}var Xu,wh;function CR(){if(wh)return Xu;wh=1;function e(t){const n={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},o=["true","false","null"],i={scope:"literal",beginKeywords:o.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:o},contains:[n,r,t.QUOTE_STRING_MODE,i,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return Xu=e,Xu}var Ju,xh;function SR(){if(xh)return Ju;xh=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(i){const s={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},u={className:"symbol",begin:i.UNDERSCORE_IDENT_RE+"@"},l={className:"subst",begin:/\$\{/,end:/\}/,contains:[i.C_NUMBER_MODE]},c={className:"variable",begin:"\\$"+i.UNDERSCORE_IDENT_RE},d={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[c,l]},{begin:"'",end:"'",illegal:/\n/,contains:[i.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,c,l]}]};l.contains.push(d);const g={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+i.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+i.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[i.inherit(d,{className:"string"}),"self"]}]},p=r,m=i.COMMENT("/\\*","\\*/",{contains:[i.C_BLOCK_COMMENT_MODE]}),y={variants:[{className:"type",begin:i.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},v=y;return v.variants[1].contains=[y],y.variants[1].contains=[v],{name:"Kotlin",aliases:["kt","kts"],keywords:s,contains:[i.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),i.C_LINE_COMMENT_MODE,m,a,u,g,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:s,relevance:5,contains:[{begin:i.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[i.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[y,i.C_LINE_COMMENT_MODE,m],relevance:0},i.C_LINE_COMMENT_MODE,m,g,h,d,i.C_NUMBER_MODE]},m]},{begin:[/class|interface|trait/,/\s+/,i.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},i.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},g,h]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
24
+ `},p]}}return Ju=o,Ju}var Qu,_h;function kR(){if(_h)return Qu;_h=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u=i.concat(s).sort().reverse();function l(c){const d=e(c),g=u,h="and or not only",p="[\\w-]+",m="("+p+"|@\\{"+p+"\\})",y=[],v=[],b=function(F){return{className:"string",begin:"~?"+F+".*?"+F}},w=function(F,D,B){return{className:F,begin:D,relevance:B}},E={$pattern:/[a-z-]+/,keyword:h,attribute:o.join(" ")},C={begin:"\\(",end:"\\)",contains:v,keywords:E,relevance:0};v.push(c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,b("'"),b('"'),d.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},d.HEXCOLOR,C,w("variable","@@?"+p,10),w("variable","@\\{"+p+"\\}"),w("built_in","~?`[^`]*?`"),{className:"attribute",begin:p+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},d.IMPORTANT,{beginKeywords:"and not"},d.FUNCTION_DISPATCH);const A=v.concat({begin:/\{/,end:/\}/,contains:y}),I={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(v)},S={begin:m+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:v}}]},k={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:E,returnEnd:!0,contains:v,relevance:0}},P={className:"variable",variants:[{begin:"@"+p+"\\s*:",relevance:15},{begin:"@"+p}],starts:{end:"[;}]",returnEnd:!0,contains:A}},R={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:m,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,I,w("keyword","all\\b"),w("variable","@\\{"+p+"\\}"),{begin:"\\b("+r.join("|")+")\\b",className:"selector-tag"},d.CSS_NUMBER_MODE,w("selector-tag",m,0),w("selector-id","#"+m),w("selector-class","\\."+m,0),w("selector-tag","&",0),d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+s.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:A},{begin:"!important"},d.FUNCTION_DISPATCH]},L={begin:p+`:(:)?(${g.join("|")})`,returnBegin:!0,contains:[R]};return y.push(c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,k,P,L,S,R,I,d.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:y}}return Qu=l,Qu}var el,Eh;function AR(){if(Eh)return el;Eh=1;function e(t){const n="\\[=*\\[",r="\\]=*\\]",o={begin:n,end:r,contains:["self"]},i=[t.COMMENT("--(?!"+n+")","$"),t.COMMENT("--"+n,r,{contains:[o],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:n,end:r,contains:[o],relevance:5}])}}return el=e,el}var tl,Ch;function TR(){if(Ch)return tl;Ch=1;function e(t){const n={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n]},o={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[n,r]},i={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},a={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,n,r,o,i,s,a]}}return tl=e,tl}var nl,Sh;function IR(){if(Sh)return nl;Sh=1;function e(t){const n=t.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],o=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:r.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},a={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[t.BACKSLASH_ESCAPE,s,l],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],h=(y,v,b="\\1")=>{const w=b==="\\1"?b:n.concat(b,v);return n.concat(n.concat("(?:",y,")"),v,/(?:\\.|[^\\\/])*?/,w,/(?:\\.|[^\\\/])*?/,b,o)},p=(y,v,b)=>n.concat(n.concat("(?:",y,")"),v,/(?:\\.|[^\\\/])*?/,b,o),m=[l,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:h("s|tr|y",n.either(...g,{capture:!0}))},{begin:h("s|tr|y","\\(","\\)")},{begin:h("s|tr|y","\\[","\\]")},{begin:h("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",n.either(...g,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=m,a.contains=m,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:m}}return nl=e,nl}var rl,kh;function DR(){if(kh)return rl;kh=1;function e(t){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[n,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}return rl=e,rl}var ol,Ah;function RR(){if(Ah)return ol;Ah=1;function e(t){const n=t.regex,r=/(?![A-Za-z0-9])(?![$])/,o=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),i=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),s=n.concat(/[A-Z]+/,r),a={scope:"variable",match:"\\$+"+o},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=t.inherit(t.APOS_STRING_MODE,{illegal:null}),d=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(l)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(B,N)=>{N.data._beginMatch=B[1]||B[2]},"on:end":(B,N)=>{N.data._beginMatch!==B[1]&&N.ignoreMatch()}},h=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
25
+ ]`,m={scope:"string",variants:[d,c,g,h]},y={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},v=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],w=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:b,literal:(B=>{const N=[];return B.forEach(X=>{N.push(X),X.toLowerCase()===X?N.push(X.toUpperCase()):N.push(X.toLowerCase())}),N})(v),built_in:w},A=B=>B.map(N=>N.replace(/\|\d+$/,"")),I={variants:[{match:[/new/,n.concat(p,"+"),n.concat("(?!",A(w).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},S=n.concat(o,"\\b(?!\\()"),k={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),S],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),S],scope:{1:"title.class",3:"variable.constant"}},{match:[i,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},P={scope:"attr",match:n.concat(o,n.lookahead(":"),n.lookahead(/(?!::)/))},R={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[P,a,k,t.C_BLOCK_COMMENT_MODE,m,y,I]},L={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",A(b).join("\\b|"),"|",A(w).join("\\b|"),"\\b)"),o,n.concat(p,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[R]};R.contains.push(L);const F=[P,k,t.C_BLOCK_COMMENT_MODE,m,y,I],D={begin:n.concat(/#\[\s*\\?/,n.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:v,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:v,keyword:["new","array"]},contains:["self",...F]},...F,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:C,contains:[D,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},a,L,k,{match:[/const/,/\s/,o],scope:{1:"keyword",3:"variable.constant"}},I,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:C,contains:["self",D,a,k,t.C_BLOCK_COMMENT_MODE,m,y]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},m,y]}}return ol=e,ol}var il,Th;function OR(){if(Th)return il;Th=1;function e(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return il=e,il}var sl,Ih;function NR(){if(Ih)return sl;Ih=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return sl=e,sl}var al,Dh;function MR(){if(Dh)return al;Dh=1;function e(t){const n=t.regex,r=/[\p{XID_Start}_]\p{XID_Continue}*/u,o=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:o,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},d={begin:/\{\{/,relevance:0},g={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,l,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,l,d,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,d,c]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},h="[0-9](_?[0-9])*",p=`(\\b(${h}))?\\.(${h})|\\b(${h})\\.`,m=`\\b|${o.join("|")}`,y={className:"number",relevance:0,variants:[{begin:`(\\b(${h})|(${p}))[eE][+-]?(${h})[jJ]?(?=${m})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${m})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${m})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${m})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${m})`},{begin:`\\b(${h})[jJ](?=${m})`}]},v={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},b={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",l,y,g,t.HASH_COMMENT_MODE]}]};return c.contains=[g,y,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[l,y,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,v,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[b]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[y,b,g]}]}}return al=e,al}var ul,Rh;function PR(){if(Rh)return ul;Rh=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return ul=e,ul}var ll,Oh;function $R(){if(Oh)return ll;Oh=1;function e(t){const n=t.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,o=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,o]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,o]},{scope:{1:"punctuation",2:"number"},match:[s,o]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,o]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return ll=e,ll}var cl,Nh;function LR(){if(Nh)return cl;Nh=1;function e(t){const n=t.regex,r=/(r#)?/,o=n.concat(r,t.UNDERSCORE_IDENT_RE),i=n.concat(r,t.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,n.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:d,keyword:u,literal:l,built_in:c},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+a},{begin:"\\b0o([0-7_]+)"+a},{begin:"\\b0x([A-Fa-f0-9_]+)"+a},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+a}],relevance:0},{begin:[/fn/,/\s+/,o],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,o],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,o,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:c,type:d}},{className:"punctuation",begin:"->"},s]}}return cl=e,cl}var dl,Mh;function FR(){if(Mh)return dl;Mh=1;const e=l=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:l.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:l.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(l){const c=e(l),d=s,g=i,h="@[a-z-]+",p="and or not only",y={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,c.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},c.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+g.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+d.join("|")+")"},y,{begin:/\(/,end:/\)/,contains:[c.CSS_NUMBER_MODE]},c.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[c.BLOCK_COMMENT,y,c.HEXCOLOR,c.CSS_NUMBER_MODE,l.QUOTE_STRING_MODE,l.APOS_STRING_MODE,c.IMPORTANT,c.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:h,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},contains:[{begin:h,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},y,l.QUOTE_STRING_MODE,l.APOS_STRING_MODE,c.HEXCOLOR,c.CSS_NUMBER_MODE]},c.FUNCTION_DISPATCH]}}return dl=u,dl}var fl,Ph;function BR(){if(Ph)return fl;Ph=1;function e(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return fl=e,fl}var gl,$h;function zR(){if($h)return gl;$h=1;function e(t){const n=t.regex,r=t.COMMENT("--","$"),o={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],h=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=d,m=[...c,...l].filter(A=>!d.includes(A)),y={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},v={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},b={match:n.concat(/\b/,n.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function w(A){return n.concat(/\b/,n.either(...A.map(I=>I.replace(/\s+/,"\\s+"))),/\b/)}const E={scope:"keyword",match:w(h),relevance:0};function C(A,{exceptions:I,when:S}={}){const k=S;return I=I||[],A.map(P=>P.match(/\|\d+$/)||I.includes(P)?P:k(P)?`${P}|0`:P)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(m,{when:A=>A.length<3}),literal:s,type:u,built_in:g},contains:[{scope:"type",match:w(a)},E,b,y,o,i,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,v]}}return gl=e,gl}var hl,Lh;function UR(){if(Lh)return hl;Lh=1;function e(S){return S?typeof S=="string"?S:S.source:null}function t(S){return n("(?=",S,")")}function n(...S){return S.map(P=>e(P)).join("")}function r(S){const k=S[S.length-1];return typeof k=="object"&&k.constructor===Object?(S.splice(S.length-1,1),k):{}}function o(...S){return"("+(r(S).capture?"":"?:")+S.map(R=>e(R)).join("|")+")"}const i=S=>n(/\b/,S,/\w$/.test(S)?/\b/:/\B/),s=["Protocol","Type"].map(i),a=["init","self"].map(i),u=["Any","Self"],l=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],c=["false","nil","true"],d=["assignment","associativity","higherThan","left","lowerThan","none","right"],g=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],h=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],p=o(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),m=o(p,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),y=n(p,m,"*"),v=o(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),b=o(v,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),w=n(v,b,"*"),E=n(/[A-Z]/,b,"*"),C=["attached","autoclosure",n(/convention\(/,o("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,w,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],A=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function I(S){const k={match:/\s+/,relevance:0},P=S.COMMENT("/\\*","\\*/",{contains:["self"]}),R=[S.C_LINE_COMMENT_MODE,P],L={match:[/\./,o(...s,...a)],className:{2:"keyword"}},F={match:n(/\./,o(...l)),relevance:0},D=l.filter(dt=>typeof dt=="string").concat(["_|0"]),B=l.filter(dt=>typeof dt!="string").concat(u).map(i),N={variants:[{className:"keyword",match:o(...B,...a)}]},X={$pattern:o(/\b\w+/,/#\w+/),keyword:D.concat(g),literal:c},se=[L,F,N],K={match:n(/\./,o(...h)),relevance:0},U={className:"built_in",match:n(/\b/,o(...h),/(?=\()/)},oe=[K,U],H={match:/->/,relevance:0},z={className:"operator",relevance:0,variants:[{match:y},{match:`\\.(\\.|${m})+`}]},Z=[H,z],te="([0-9]_*)+",he="([0-9a-fA-F]_*)+",W={className:"number",relevance:0,variants:[{match:`\\b(${te})(\\.(${te}))?([eE][+-]?(${te}))?\\b`},{match:`\\b0x(${he})(\\.(${he}))?([pP][+-]?(${te}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},M=(dt="")=>({className:"subst",variants:[{match:n(/\\/,dt,/[0\\tnr"']/)},{match:n(/\\/,dt,/u\{[0-9a-fA-F]{1,8}\}/)}]}),Y=(dt="")=>({className:"subst",match:n(/\\/,dt,/[\t ]*(?:[\r\n]|\r\n)/)}),ae=(dt="")=>({className:"subst",label:"interpol",begin:n(/\\/,dt,/\(/),end:/\)/}),_e=(dt="")=>({begin:n(dt,/"""/),end:n(/"""/,dt),contains:[M(dt),Y(dt),ae(dt)]}),fe=(dt="")=>({begin:n(dt,/"/),end:n(/"/,dt),contains:[M(dt),ae(dt)]}),xe={className:"string",variants:[_e(),_e("#"),_e("##"),_e("###"),fe(),fe("#"),fe("##"),fe("###")]},Te=[S.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[S.BACKSLASH_ESCAPE]}],bt={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:Te},q=dt=>{const Rn=n(dt,/\//),ge=n(/\//,dt);return{begin:Rn,end:ge,contains:[...Te,{scope:"comment",begin:`#(?!.*${ge})`,end:/$/}]}},V={scope:"regexp",variants:[q("###"),q("##"),q("#"),bt]},ce={match:n(/`/,w,/`/)},Ae={className:"variable",match:/\$\d+/},Le={className:"variable",match:`\\$${b}+`},qe=[ce,Ae,Le],ut={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:A,contains:[...Z,W,xe]}]}},$t={scope:"keyword",match:n(/@/,o(...C),t(o(/\(/,/\s+/)))},Be={scope:"meta",match:n(/@/,w)},Ve=[ut,$t,Be],Qe={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,b,"+")},{className:"type",match:E,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t(E)),relevance:0}]},wt={begin:/</,end:/>/,keywords:X,contains:[...R,...se,...Ve,H,Qe]};Qe.contains.push(wt);const Dt={match:n(w,/\s*:/),keywords:"_|0",relevance:0},Ot={begin:/\(/,end:/\)/,relevance:0,keywords:X,contains:["self",Dt,...R,V,...se,...oe,...Z,W,xe,...qe,...Ve,Qe]},hn={begin:/</,end:/>/,keywords:"repeat each",contains:[...R,Qe]},zn={begin:o(t(n(w,/\s*:/)),t(n(w,/\s+/,w,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:w}]},Jt={begin:/\(/,end:/\)/,keywords:X,contains:[zn,...R,...se,...Z,W,xe,...Ve,Qe,Ot],endsParent:!0,illegal:/["']/},zt={match:[/(func|macro)/,/\s+/,o(ce.match,w,y)],className:{1:"keyword",3:"title.function"},contains:[hn,Jt,k],illegal:[/\[/,/%/]},pn={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[hn,Jt,k],illegal:/\[|%/},yn={match:[/operator/,/\s+/,y],className:{1:"keyword",3:"title"}},Vt={begin:[/precedencegroup/,/\s+/,E],className:{1:"keyword",3:"title"},contains:[Qe],keywords:[...d,...c],end:/}/},io={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},wr={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Lr={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,w,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:X,contains:[hn,...se,{begin:/:/,end:/\{/,keywords:X,contains:[{scope:"title.class.inherited",match:E},...se],relevance:0}]};for(const dt of xe.variants){const Rn=dt.contains.find(Ie=>Ie.label==="interpol");Rn.keywords=X;const ge=[...se,...oe,...Z,W,xe,...qe];Rn.contains=[...ge,{begin:/\(/,end:/\)/,contains:["self",...ge]}]}return{name:"Swift",keywords:X,contains:[...R,zt,pn,io,wr,Lr,yn,Vt,{beginKeywords:"import",end:/$/,contains:[...R],relevance:0},V,...se,...oe,...Z,W,xe,...qe,...Ve,Qe,Ot]}}return hl=I,hl}var pl,Fh;function KR(){if(Fh)return pl;Fh=1;function e(t){const n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",o={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},u=t.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),h={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},m={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},y={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},v=[o,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},h,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},m,y,s,a],b=[...v];return b.pop(),b.push(u),p.contains=b,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:v}}return pl=e,pl}var ml,Bh;function jR(){if(Bh)return ml;Bh=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(c){const d=c.regex,g=(M,{after:Y})=>{const ae="</"+M[0].slice(1);return M.input.indexOf(ae,Y)!==-1},h=e,p={begin:"<>",end:"</>"},m=/<[A-Za-z0-9\\._:-]+\s*\/>/,y={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(M,Y)=>{const ae=M[0].length+M.index,_e=M.input[ae];if(_e==="<"||_e===","){Y.ignoreMatch();return}_e===">"&&(g(M,{after:ae})||Y.ignoreMatch());let fe;const xe=M.input.substring(ae);if(fe=xe.match(/^\s*=/)){Y.ignoreMatch();return}if((fe=xe.match(/^\s+extends\s+/))&&fe.index===0){Y.ignoreMatch();return}}},v={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},b="[0-9](_?[0-9])*",w=`\\.(${b})`,E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",C={className:"number",variants:[{begin:`(\\b(${E})((${w})|\\.)?|(${w}))[eE][+-]?(${b})\\b`},{begin:`\\b(${E})\\b((${w})\\b|\\.)?|(${w})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},A={className:"subst",begin:"\\$\\{",end:"\\}",keywords:v,contains:[]},I={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,A],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,A],subLanguage:"css"}},k={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,A],subLanguage:"graphql"}},P={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,A]},L={className:"comment",variants:[c.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:h+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]},F=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,I,S,k,P,{match:/\$\d+/},C];A.contains=F.concat({begin:/\{/,end:/\}/,keywords:v,contains:["self"].concat(F)});const D=[].concat(L,A.contains),B=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:v,contains:["self"].concat(D)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:v,contains:B},X={variants:[{match:[/class/,/\s+/,h,/\s+/,/extends/,/\s+/,d.concat(h,"(",d.concat(/\./,h),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,h],scope:{1:"keyword",3:"title.class"}}]},se={relevance:0,match:d.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},K={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},U={variants:[{match:[/function/,/\s+/,h,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},oe={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function H(M){return d.concat("(?!",M.join("|"),")")}const z={match:d.concat(/\b/,H([...i,"super","import"].map(M=>`${M}\\s*\\(`)),h,d.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:d.concat(/\./,d.lookahead(d.concat(h,/(?![0-9A-Za-z$_(])/))),end:h,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},te={match:[/get|set/,/\s+/,h,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},he="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,h,/\s*/,/=\s*/,/(async\s*)?/,d.lookahead(he)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:v,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:se},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),K,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,I,S,k,P,L,{match:/\$\d+/},C,se,{scope:"attr",match:h+d.lookahead(":"),relevance:0},W,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[L,c.REGEXP_MODE,{className:"function",begin:he,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:c.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:v,contains:B}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:p.begin,end:p.end},{match:m},{begin:y.begin,"on:begin":y.isTrulyOpeningTag,end:y.end}],subLanguage:"xml",contains:[{begin:y.begin,end:y.end,skip:!0,contains:["self"]}]}]},U,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,c.inherit(c.TITLE_MODE,{begin:h,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+h,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},z,oe,X,te,{match:/\$[(.]/}]}}function l(c){const d=c.regex,g=u(c),h=e,p=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],m={begin:[/namespace/,/\s+/,c.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},y={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:p},contains:[g.exports.CLASS_REFERENCE]},v={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},b=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],w={$pattern:e,keyword:t.concat(b),literal:n,built_in:a.concat(p),"variable.language":s},E={className:"meta",begin:"@"+h},C=(k,P,R)=>{const L=k.contains.findIndex(F=>F.label===P);if(L===-1)throw new Error("can not find mode to replace");k.contains.splice(L,1,R)};Object.assign(g.keywords,w),g.exports.PARAMS_CONTAINS.push(E);const A=g.contains.find(k=>k.scope==="attr"),I=Object.assign({},A,{match:d.concat(h,d.lookahead(/\s*\?:/))});g.exports.PARAMS_CONTAINS.push([g.exports.CLASS_REFERENCE,A,I]),g.contains=g.contains.concat([E,m,y,I]),C(g,"shebang",c.SHEBANG()),C(g,"use_strict",v);const S=g.contains.find(k=>k.label==="func.def");return S.relevance=0,Object.assign(g,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),g}return ml=l,ml}var bl,zh;function qR(){if(zh)return bl;zh=1;function e(t){const n=t.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},o={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:n.concat(/# */,n.either(s,i),/ *#/)},{begin:n.concat(/# */,u,/ *#/)},{begin:n.concat(/# */,a,/ *#/)},{begin:n.concat(/# */,n.either(s,i),/ +/,n.either(a,u),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},g=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),h=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,o,l,c,d,g,h,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[h]}]}}return bl=e,bl}var yl,Uh;function HR(){if(Uh)return yl;Uh=1;function e(t){t.regex;const n=t.COMMENT(/\(;/,/;\)/);n.contains.push("self");const r=t.COMMENT(/;;/,/$/),o=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:o},contains:[r,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,i,t.QUOTE_STRING_MODE,l,c,u]}}return yl=e,yl}var vl,Kh;function GR(){if(Kh)return vl;Kh=1;var e=lR();return e.registerLanguage("xml",cR()),e.registerLanguage("bash",dR()),e.registerLanguage("c",fR()),e.registerLanguage("cpp",gR()),e.registerLanguage("csharp",hR()),e.registerLanguage("css",pR()),e.registerLanguage("markdown",mR()),e.registerLanguage("diff",bR()),e.registerLanguage("ruby",yR()),e.registerLanguage("go",vR()),e.registerLanguage("graphql",wR()),e.registerLanguage("ini",xR()),e.registerLanguage("java",_R()),e.registerLanguage("javascript",ER()),e.registerLanguage("json",CR()),e.registerLanguage("kotlin",SR()),e.registerLanguage("less",kR()),e.registerLanguage("lua",AR()),e.registerLanguage("makefile",TR()),e.registerLanguage("perl",IR()),e.registerLanguage("objectivec",DR()),e.registerLanguage("php",RR()),e.registerLanguage("php-template",OR()),e.registerLanguage("plaintext",NR()),e.registerLanguage("python",MR()),e.registerLanguage("python-repl",PR()),e.registerLanguage("r",$R()),e.registerLanguage("rust",LR()),e.registerLanguage("scss",FR()),e.registerLanguage("shell",BR()),e.registerLanguage("sql",zR()),e.registerLanguage("swift",UR()),e.registerLanguage("yaml",KR()),e.registerLanguage("typescript",jR()),e.registerLanguage("vbnet",qR()),e.registerLanguage("wasm",HR()),e.HighlightJS=e,e.default=e,vl=e,vl}var VR=GR();const ma=bs(VR);function ev(e){return e?!!(e.startsWith("/")||/^data:image\//i.test(e)||e.startsWith("blob:")||/^https:\/\//i.test(e)):!1}const tv=`
26
+
27
+ `,WR="<!-- yorz:hidden -->",YR=/<!-- yorz:hidden -->[\s\S]*?<!-- \/yorz:hidden -->\n?/g;function ba(e){return e.includes(WR)?e.replace(YR,"").trim():e}function ZR(e,t){return t.type==="text"?t.contextKind?{kind:"context",contextKind:t.contextKind,text:t.text}:{kind:"text",role:e,text:ba(t.text)}:t.type==="tool-use"?{kind:"tool",name:t.name,input:t.input}:t.type==="image"?{kind:"image",role:"assistant",src:t.data,alt:t.alt}:{kind:"tool",result:t.text}}const jh=/!\[([^\]]*)\]\(([^)\s]*chat-attachments\/[^)\s]+)\)/g;function XR(e,t){if(!t||!e.includes("chat-attachments/"))return[];const n=[];jh.lastIndex=0;let r;for(;(r=jh.exec(e))!==null;){const o=r[1]??"",s=(r[2]??"").match(/chat-attachments\/([^/]+)\/attachments\/([^/?#]+)/);if(!s)continue;const a=decodeURIComponent(s[1]),u=decodeURIComponent(s[2]),l={kind:"image",role:"user",src:t(a,u)};o&&(l.alt=o),n.push(l)}return n}function nv(e,t={}){const n=[];for(const r of e){let o=!1;for(const i of r.parts){const s=ZR(r.role,i);if(s.kind==="text"){const a=n[n.length-1],u=!o&&a?.kind==="text"&&a.role===s.role;if(n.push(u?{...s,text:tv+s.text}:s),o=!0,r.role==="user"&&i.type==="text")for(const l of XR(i.text,t.imageUrl))n.push(l)}else n.push(s)}}return n}function qh(e,t={}){const n=[];for(const r of e){const o=nv(r.messages,t);o.length!==0&&(n.length>0&&n.push({kind:"divider",sessionId:r.sessionId,agentKind:r.kind,startedAt:r.createdAt}),n.push(...o))}return n}function JR(e,t){return!e||!t||e.endsWith(`
28
+ `)||t.startsWith(`
29
+ `)?e+t:e+tv+t}function QR(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.result===void 0){r.result=t;return}}e.push({kind:"tool",result:t})}function Hh(e,t,n){return`${e}#${t}:${n}`}function eO(e){const t=[];let n=null,r=0;const o=()=>`t${r++}`,i=()=>(n||(n={kind:"assistant",segments:[]},t.push(n)),n);for(const a of e){if(a.kind==="divider"){n=null,t.push({kind:"divider",sessionId:a.sessionId,agentKind:a.agentKind,startedAt:a.startedAt});continue}if(a.kind==="context"){n=null;const c=t[t.length-1];c?.kind==="context"?c.contexts.push(a):t.push({kind:"context",contexts:[a]});continue}if(a.kind==="text"&&a.role==="user"){n=null;const c=t[t.length-1];c?.kind==="user"?c.text=JR(c.text,a.text):t.push({kind:"user",text:a.text});continue}if(a.kind==="image"&&a.role==="user"){n=null;const c=t[t.length-1];c?.kind==="user"?(c.images??=[]).push(a):t.push({kind:"user",text:"",images:[a]});continue}const u=i(),l=u.segments[u.segments.length-1];if(a.kind==="text"){l?.kind==="text"?l.text+=a.text:u.segments.push({kind:"text",text:a.text});continue}if(a.kind==="image"){l?.kind==="image"?l.images.push(a):u.segments.push({kind:"image",images:[a]});continue}l?.kind==="tools"?a.result!==void 0&&a.name===void 0?QR(l.tools,a.result):l.tools.push({...a}):u.segments.push({kind:"tools",id:o(),tools:[{...a}]})}return t.map(a=>a.kind==="user"?{...a,text:ba(a.text)}:a.kind!=="assistant"?a:{...a,segments:a.segments.map(u=>u.kind==="text"?{...u,text:ba(u.text)}:u)}).filter(a=>a.kind!=="assistant"||a.segments.length>0)}const Fn=new Ln({html:!0,linkify:!0,breaks:!1,highlight(e,t){if(t&&ma.getLanguage(t))try{const n=ma.highlight(e,{language:t}).value;return`<pre><code class="hljs language-${t}">${n}</code></pre>`}catch{}return""}}),tO=/^<\/?(?:details|summary)>$/i,nO=/^<details\s+open\s*>$/i,rO=/^<input class="task-list-item-checkbox"(?: checked="")? disabled="" type="checkbox">$/;function oO(e){return tO.test(e)||nO.test(e)||rO.test(e)}function rv(e){const t=Fn.utils.escapeHtml;let n="",r=0;const o=/<[^>]*>/g;let i;for(;(i=o.exec(e))!==null;){n+=t(e.slice(r,i.index));const s=i[0];n+=oO(s)?s:t(s),r=i.index+s.length}return n+=t(e.slice(r)),n}Fn.renderer.rules.html_block=(e,t)=>rv(e[t].content);Fn.renderer.rules.html_inline=(e,t)=>rv(e[t].content);const Gh=Fn.renderer.rules.image??((e,t,n,r,o)=>o.renderToken(e,t,n)),Vh=Fn.renderer.rules.link_open??((e,t,n,r,o)=>o.renderToken(e,t,n)),iO=Fn.renderer.rules.fence??((e,t,n,r,o)=>o.renderToken(e,t,n));function ov(e,t,n){if(!e||/^([a-z]+:)?\/\//i.test(e)||e.startsWith("/")||e.startsWith("#"))return e;const r=e.match(/^attachments\/(.+)$/);return!r||!n?e:ka(`/api/projects/${encodeURIComponent(n)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(r[1])}`)}function sO(e){return e.replace(/:\d+(?::\d+)?$/,"")}function aO(e){const n=sO(e).replace(/[?#].*$/,"").split(/[\\/]/).filter(Boolean).pop()??"";return/^\.[^./\\]+$/.test(n)||/\.[A-Za-z0-9][A-Za-z0-9_-]{0,15}$/.test(n)}function uO(e){return!e||e.startsWith("#")||/^([a-z]+:)?\/\//i.test(e)||/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^[A-Za-z]:[\\/]/.test(e)||e.startsWith("attachments/")?!1:(e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e))&&aO(e)}function wl(e,t){e.attrs&&(e.attrs=e.attrs.filter(([n])=>n!==t))}function $o(e,t,n){e.attrs||(e.attrs=[]);const r=e.attrs.find(([o])=>o===t);r?r[1]=n:e.attrs.push([t,n])}Fn.renderer.rules.image=function(e,t,n,r,o){const i=r,s=e[t],a=s.attrs?.find(([u])=>u==="src");return i?.specId?(a&&(a[1]=ov(a[1],i.specId,i?.projectId)),Gh(e,t,n,r,o)):!a||!ev(a[1])?Fn.utils.escapeHtml(s.content??""):Gh(e,t,n,r,o)};Fn.renderer.rules.link_open=function(e,t,n,r,o){const i=r,s=e[t],a=s.attrs?.find(([l])=>l==="href");if(i?.fileLinks==="copy"&&a&&uO(a[1])){const l=a[1];return wl(s,"href"),wl(s,"target"),wl(s,"rel"),$o(s,"role","button"),$o(s,"tabindex","0"),$o(s,"data-file-link","true"),$o(s,"data-file-path",l),i.fileLinkTitle&&($o(s,"title",i.fileLinkTitle),$o(s,"aria-label",i.fileLinkTitle)),Vh(e,t,n,r,o)}const u=i?.specId;if(u&&a){const l=ov(a[1],u,i?.projectId);if(l!==a[1]){a[1]=l;const c=s.attrs?.find(([d])=>d==="target");c?c[1]="_blank":s.attrs?.push(["target","_blank"]),s.attrs?.push(["rel","noopener noreferrer"])}}return Vh(e,t,n,r,o)};Fn.renderer.rules.fence=function(e,t,n,r,o){const i=e[t],s=i.info.trim(),a=r?.mermaid??"diagram";if(s==="mermaid"&&a==="diagram"){const u=i.content;return`<div class="mermaid" data-mermaid-source="${u.replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}">${u}</div>`}return iO(e,t,n,r,o)};Fn.use(uR,{enabled:!1,label:!1});function Bd(e,t={}){const n={};return t.specId&&(n.specId=t.specId),t.projectId&&(n.projectId=t.projectId),t.mermaid&&(n.mermaid=t.mermaid),t.fileLinks&&(n.fileLinks=t.fileLinks),t.fileLinkTitle&&(n.fileLinkTitle=t.fileLinkTitle),Fn.render(e,n)}function lO(e){return e.replace(/^\uFEFF?---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,"")}const cO="modulepreload",dO=function(e){return"/"+e},Wh={},fO=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let s=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");o=s(n.map(l=>{if(l=dO(l),l in Wh)return;Wh[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const g=document.createElement("link");if(g.rel=c?"stylesheet":cO,c||(g.as="script"),g.crossOrigin="",g.href=l,u&&g.setAttribute("nonce",u),document.head.appendChild(g),c)return new Promise((h,p)=>{g.addEventListener("load",h),g.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};let xl=null,Yh=Promise.resolve();const Dc=new WeakMap,gO=30,Zh=3;async function hO(e,t){for(let n=0;n<gO;n+=1){if(!Vs(e,t))return!1;if(e.isConnected)return!0;await Gs()}return e.querySelectorAll(".mermaid").length,!1}function pO(e){return Array.from(e.querySelectorAll(".mermaid")).filter(t=>{const n=t.getAttribute("data-mermaid-source");return n!==null&&n!==""&&t.querySelector("svg")===null})}async function mO(){return xl||(xl=fO(()=>import("./mermaid.core-ChZsXg3q.js").then(e=>e.bp),[]).then(e=>e.default)),xl}function bO(){return n_()==="dark"?"dark":"default"}function Gs(){return new Promise(e=>{if(typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)})}function yO(e){const t=(Dc.get(e)??0)+1;return Dc.set(e,t),t}function Vs(e,t){return Dc.get(e)===t}async function vO(e){const t=Yh.then(e,e);Yh=t.catch(()=>{}),await t}async function wO(e,t={}){if(e.querySelector(".mermaid")===null)return()=>{};const n=yO(e),r=await mO();if(!Vs(e,n))return()=>{};if(!await hO(e,n))return()=>{};let o=()=>{},i=!1;function s(){o(),o=t.enhance?t.enhance(e):()=>{}}async function a(d){const g=d.filter(h=>h.isConnected&&e.contains(h));if(g.length===0){d.length;return}await vO(async()=>{if(!Vs(e,n))return;const h=g.filter(m=>m.isConnected&&e.contains(m));if(h.length===0){g.length;return}const p=bO();r.initialize({startOnLoad:!1,theme:p}),o(),o=()=>{},h.forEach(m=>{const y=m.getAttribute("data-mermaid-source");y&&(m.removeAttribute("data-processed"),m.textContent=y)});try{await r.run({nodes:h}),await Gs(),s()}catch(m){i=!0,console.error("[mermaid] render error:",m)}})}let u=Array.from(e.querySelectorAll(".mermaid:not([data-processed])"));for(let d=1;d<=Zh&&(u.length>0&&await a(u),!(i||!Vs(e,n)));d+=1){const g=pO(e);if(g.length===0)break;if(d===Zh){g.length;break}await Gs(),u=g}await Gs(),s();const l=()=>void a(Array.from(e.querySelectorAll(".mermaid"))),c=new window.MutationObserver(l);return c.observe(document.documentElement,{attributes:!0,attributeFilter:["data-kb-theme"]}),()=>{o(),c.disconnect()}}const $s=new WeakMap;let jo=null;const Xh=96,iv=.25,xO=8,_O=2.5;function sv(e,t,n){return Math.min(n,Math.max(t,e))}function Ls(e){const t=Math.round(e*1e3)/1e3;return Object.is(t,-0)?"0":String(t)}function Jh(e){if(!e)return null;const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function EO(e){const t=e.getBoundingClientRect();if(t.width>0&&t.height>0)return{width:t.width,height:t.height};const n=e.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);return n?.length===4&&n[2]>0&&n[3]>0?{width:n[2],height:n[3]}:{width:Jh(e.getAttribute("width"))??0,height:Jh(e.getAttribute("height"))??0}}function CO(e,t){const n=t.getBoundingClientRect();if(e.width<=0||e.height<=0||n.width<=0||n.height<=0)return 1;const r=Math.max(n.width-Xh,n.width*.5),o=Math.max(n.height-Xh,n.height*.5),i=Math.min(r/e.width,o/e.height);return sv(i,iv,_O)}function ki(e,t,n){const r=document.createElement("button");return r.type="button",r.className=e,r.setAttribute("aria-label",t),r.title=t,r.textContent=n,r}function av(e){return typeof SVGSVGElement<"u"&&e instanceof SVGSVGElement}function SO(e,t){if(av(e)){const r=e.parentElement;return!r||r===t?null:{host:r,svg:e}}if(!(e instanceof HTMLElement))return null;const n=e.querySelector("svg");return n?{host:e,svg:n}:null}function kO(e,t){jo?.close();const n=t.parentNode,r=t.nextSibling,o=t.style.width,i=t.style.height,s=document.createElement("div");s.className="mermaid-overlay",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label",_("mermaid.viewerLabel"));const a=document.createElement("div");a.className="mermaid-overlay__toolbar";const u=ki("mermaid-overlay__button",_("mermaid.zoomOut"),"-"),l=ki("mermaid-overlay__button",_("mermaid.zoomIn"),"+"),c=ki("mermaid-overlay__button",_("mermaid.reset"),"1:1"),d=ki("mermaid-overlay__button",_("mermaid.close"),"x");a.append(u,l,c,d);const g=document.createElement("div");g.className="mermaid-overlay__viewport";const h=document.createElement("div");h.className="mermaid-overlay__canvas",t.classList.add("mermaid-overlay__svg"),h.appendChild(t),g.appendChild(h),s.append(a,g),document.body.appendChild(s);const p=EO(t),m=CO(p,g);let y=m,v=0,b=0,w=!1,E=0,C=0,A=0,I=0;const S=()=>{h.style.transform=`translate(${Ls(v)}px, ${Ls(b)}px)`},k=()=>{p.width<=0||p.height<=0||(t.style.width=`${Ls(p.width*y)}px`,t.style.height=`${Ls(p.height*y)}px`)},P=()=>{k(),S()},R=(K,U,oe)=>{const H=g.getBoundingClientRect(),z=U===void 0?H.width/2:U-H.left,Z=oe===void 0?H.height/2:oe-H.top,te=H.width/2,he=H.height/2,W=y;y=sv(K,iv,xO),v=z-te-(z-te-v)/W*y,b=Z-he-(Z-he-b)/W*y,P()},L=()=>{y=m,v=p.width>0?-(p.width*y)/2:0,b=p.height>0?-(p.height*y)/2:0,P()},F=()=>{if(document.removeEventListener("keydown",se),t.classList.remove("mermaid-overlay__svg"),t.style.width=o,t.style.height=i,n?.isConnected){const K=r?.parentNode===n?r:null;n.insertBefore(t,K)}s.remove(),jo?.close===F&&(jo=null)},D=K=>{K.preventDefault();const U=K.deltaY>0?.9:1.1;R(y*U,K.clientX,K.clientY)},B=K=>{K.button===0&&(w=!0,E=K.clientX,C=K.clientY,A=v,I=b,g.setPointerCapture(K.pointerId),g.classList.add("is-dragging"))},N=K=>{w&&(v=A+K.clientX-E,b=I+K.clientY-C,S())},X=K=>{w&&(w=!1,g.classList.remove("is-dragging"),g.hasPointerCapture(K.pointerId)&&g.releasePointerCapture(K.pointerId))},se=K=>{K.key==="Escape"&&(K.stopPropagation(),F())};return u.addEventListener("click",()=>R(y/1.2)),l.addEventListener("click",()=>R(y*1.2)),c.addEventListener("click",L),d.addEventListener("click",F),g.addEventListener("wheel",D,{passive:!1}),g.addEventListener("pointerdown",B),g.addEventListener("pointermove",N),g.addEventListener("pointerup",X),g.addEventListener("pointercancel",X),document.addEventListener("keydown",se),jo={host:e,sourceSvg:t,close:F},L(),d.focus(),F}function AO(e){const t=[];return e.querySelectorAll(".mermaid").forEach(n=>{const r=SO(n,e);if(!r)return;const{host:o}=r,i=$s.get(o);if(i?.button.isConnected){t.push(i.cleanup);return}i?.cleanup(),o.classList.add("mermaid-control-host");const s=ki("mermaid-fullscreen-button",_("mermaid.maximize"),"⤢"),a=()=>{const l=av(n)&&n.isConnected?n:o.querySelector("svg");l&&kO(o,l)};s.addEventListener("click",a),o.appendChild(s);const u=()=>{jo?.host===o&&jo.close(),s.removeEventListener("click",a),s.isConnected&&s.remove(),o.classList.remove("mermaid-control-host"),$s.get(o)?.button===s&&$s.delete(o)};$s.set(o,{button:s,cleanup:u}),t.push(u)}),()=>{t.forEach(n=>n())}}async function uv(e){return wO(e,{enhance:AO})}function TO(e,t){let n=e;for(;n&&n!==t;){if(n.nodeType===1){const o=n.tagName;if(o==="H2"||o==="H3")return n}let r=n.previousSibling;if(!r){n=n.parentNode;continue}for(;r?.lastChild;)r=r.lastChild;n=r}return null}function IO(e,t){return t.contains(e.startContainer)&&t.contains(e.endContainer)&&t.contains(e.commonAncestorContainer)}function DO(e,t,n){const r=n.throttleMs??50;let o,i="";const s=()=>{window.clearTimeout(o),o=window.setTimeout(()=>{const a=window.getSelection();if(!a||a.rangeCount===0||a.isCollapsed){i!==""&&(i="",t(null));return}const u=a.getRangeAt(0);if(!IO(u,e)){i!==""&&(i="",t(null));return}const l=a.toString();if(!l.trim()){i!==""&&(i="",t(null));return}const c=u.getBoundingClientRect(),d=TO(u.startContainer,e),g=n.noSectionLabel,h=d&&d.textContent?.trim()||g;i=l,t({text:l,rect:c,sectionPath:h})},r)};return document.addEventListener("selectionchange",s),()=>{document.removeEventListener("selectionchange",s),window.clearTimeout(o)}}function RO(e,t,n={}){return DO(e,t,{...n,noSectionLabel:_("selection.noSection")})}const OO=/^##\s+(?:\d+(?:\.\d+)*\.?\s+)?待确认(?:项|问题)\s*$/,NO=/^##\s+/,MO=/^###\s+(?:\d+(?:\.\d+)*\s+)?(.+\S)\s*$/,PO=/^\d+\.\s+(.*\S)\s*$/,Rc=/^\s*$/,Qh=/\s*[((]推荐[))]\s*$/,ep=/\s*(自由文本)\s*$/,$O=/^\[(choice|confirm)\]\s*/i,LO=/^\*\*方案\*\*\s*[::]\s*(.*\S)?\s*$/,FO=/^\*\*(?:影响|代价)\*\*\s*[::]\s*(.*\S)?\s*$/;function BO(e){const t=e.split(`
30
+ `);let n=0;for(;n<t.length&&!OO.test(t[n]);)n+=1;if(n>=t.length)return[];n+=1;const r=[];let o=null;for(;n<t.length;){const i=t[n];if(NO.test(i))break;const s=qO(i);s?(o={headingText:s,bodyLines:[]},r.push(o)):o&&o.bodyLines.push(i),n+=1}return r.map((i,s)=>zO(i,s))}function zO(e,t){const n=$O.exec(e.headingText),r=n?.[1]?.toLowerCase(),o=n?e.headingText.slice(n[0].length):e.headingText,i=ep.test(o),s=i?o.replace(ep,"").trim():o.trim();if(r==="confirm"){const{plan:c,impact:d}=KO(e.bodyLines);return{id:tp(t,s),text:s,kind:"confirm",options:[],isFreeform:!1,plan:c,impact:d}}const a=jO(e.bodyLines,t,s),u=i||a.length===0,l=UO(e.bodyLines);return{id:tp(t,s),text:s,kind:u?"freeform":"choice",options:a,isFreeform:u,...l?{description:l}:{}}}function UO(e){const t=[];for(const n of e){if(lv(n)!==null)break;t.push(n)}for(;t.length&&Rc.test(t[0]);)t.shift();for(;t.length&&Rc.test(t[t.length-1]);)t.pop();if(t.length!==0)return t.join(`
31
+ `)}function KO(e){let t,n;for(const r of e){const o=r.trim(),i=LO.exec(o);if(i){t=i[1]?.trim()||"";continue}const s=FO.exec(o);s&&(n=s[1]?.trim()||"")}return{plan:t,impact:n}}function jO(e,t,n){const r=[];let o=0;for(const i of e){if(Rc.test(i))continue;const s=lv(i);if(s===null)continue;const a=Qh.test(s),u=a?s.replace(Qh,"").trim():s.trim();u&&(a&&(o+=1),r.push({id:HO(t,r.length,u),label:u,recommended:a&&o===1}))}return o>=2&&console.warn(`[question-parse] 问题 "${n}" 含 ${o} 个 (推荐),已保留首个,其余降级`),r}function qO(e){const t=MO.exec(e);return t?t[1]:null}function lv(e){const t=PO.exec(e);return t?t[1]:null}function tp(e,t){return`q-${e}-${cv(t)}`}function HO(e,t,n){return`q-${e}-o-${t}-${cv(n)}`}function cv(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return(t>>>0).toString(36)}var GO=$('<div class="selection-menu fixed z-50 flex gap-1 rounded-md border bg-popover p-1 shadow-md">');const VO=36,WO=140,YO=e=>{const t=()=>{const n=e.snap;if(!n)return{top:0,left:0,visible:!1};const r=n.rect.top-VO-8,o=n.rect.left,i=r<8?n.rect.bottom+8:r,s=Math.min(Math.max(8,o),window.innerWidth-WO-8);return{top:i,left:s,visible:!0}};return f(j,{get when(){return e.snap},children:n=>{const r=t();return(()=>{var o=GO();return o.$$mousedown=i=>i.preventDefault(),x(o,f(we,{variant:"ghost",size:"sm",onClick:()=>e.onAnnotate(n()),get children(){return _("selectionMenu.annotate")}}),null),x(o,f(we,{variant:"ghost",size:"sm",onClick:()=>e.onExplain(n()),get children(){return _("selectionMenu.explain")}}),null),$e(i=>{var s=`${r.top}px`,a=`${r.left}px`;return s!==i.e&&Pi(o,"top",i.e=s),a!==i.t&&Pi(o,"left",i.t=a),i},{e:void 0,t:void 0}),o})()}})};Gt(["mousedown"]);var ZO=$('<div class="fixed z-[60] flex max-h-[calc(100vh-16px)] flex-col gap-2.5 overflow-visible rounded-lg border bg-card p-3.5 shadow-xl"style=width:500px><header class="flex flex-col gap-0.5"><strong></strong></header><blockquote class="m-0 border-l-2 border-border bg-background px-2.5 py-1.5 text-[0.9em] text-muted-foreground"><em></em> <!> "<!>"</blockquote><form><div class="mt-3 flex justify-end gap-2">'),XO=$('<p class="text-destructive ">');const JO=500,Ur=8,QO=e=>{const[t,n]=T(""),[r,o]=T(!1),[i,s]=T(null),[a,u]=T(0),l=()=>{const d=e.snap;if(!d)return{top:0,left:0};const g=a()||260,h=window.innerHeight,p=d.rect.bottom+Ur,m=d.rect.top-Ur-g;let y;p+g<=h-Ur?y=p:m>=Ur?y=m:y=Math.max(Ur,h-g-Ur);const v=Math.min(Math.max(Ur,d.rect.left),window.innerWidth-JO-Ur);return{top:y,left:v}};async function c(d){if(d.preventDefault(),!!t().trim()){o(!0),s(null);try{await e.onSubmit(t().trim()),n(""),e.onCancel()}catch(g){s(g.message)}finally{o(!1)}}}return f(j,{get when(){return J(()=>!!e.open)()&&e.snap},get children(){var d=ZO(),g=d.firstChild,h=g.firstChild,p=g.nextSibling,m=p.firstChild,y=m.nextSibling,v=y.nextSibling,b=v.nextSibling,w=b.nextSibling;w.nextSibling;var E=p.nextSibling,C=E.firstChild;return d.$$mousedown=A=>A.stopPropagation(),Hn(A=>{queueMicrotask(()=>{A.offsetHeight!==a()&&u(A.offsetHeight)})},d),x(h,()=>_("annotate.title")),x(m,()=>e.snap?.sectionPath),x(p,()=>_("annotate.inSection"),v),x(p,()=>(e.snap?.text??"").slice(0,200),w),E.addEventListener("submit",c),x(E,f(tu,{get projectId(){return e.projectId},minRows:3,maxRows:3,get value(){return t()},onValueChange:n,get placeholder(){return _("annotate.placeholder")},autofocus:!0}),C),x(E,(()=>{var A=J(()=>!!i());return()=>A()&&(()=>{var I=XO();return x(I,i),I})()})(),C),x(C,f(we,{variant:"ghost",type:"button",get onClick(){return e.onCancel},get children(){return _("common.cancel")}}),null),x(C,f(we,{variant:"default",type:"submit",get disabled(){return r()||!t().trim()},get children(){return J(()=>!!r())()?_("common.submitting"):_("annotate.submit")}}),null),$e(A=>{var I=`${l().top}px`,S=`${l().left}px`;return I!==A.e&&Pi(d,"top",A.e=I),S!==A.t&&Pi(d,"left",A.t=S),A},{e:void 0,t:void 0}),d}})};Gt(["mousedown"]);var e4=$("<div><span class=text-muted-foreground></span><code class=font-mono>"),t4=$('<blockquote class="m-0 border-l-2 border-border pl-2 text-muted-foreground">'),n4=$('<div class="flex flex-col gap-1 text-sm">'),r4=$('<p class="text-destructive ">'),o4=$('<div class="append-dialog-backdrop fixed inset-0 z-50"><div class="append-dialog fixed z-50 flex w-96 max-w-[calc(100vw-2rem)] flex-col gap-3 rounded-xl border bg-card p-4 shadow-lg"role=dialog><header class="flex flex-col gap-0.5"><strong class=" "></strong><span class="text-sm text-muted-foreground"></span></header><form class="flex flex-col gap-3"><label class="flex flex-col gap-1 "><span></span></label><div class="flex items-center justify-end gap-2">');const i4={feat:"appendTask.kindFeat",refct:"appendTask.kindRefct",fix:"appendTask.kindFix"},s4=e=>{const[t,n]=T("fix"),[r,o]=T(""),[i,s]=T(!1),[a,u]=T(null),[l,c]=T(null);re(()=>{if(!e.open){c(null);return}const p=e.anchorEl;if(!p)return;const m=p.getBoundingClientRect(),v=Math.max(16,Math.min(m.left,window.innerWidth-384-16));c({top:m.bottom+8,left:v})}),re(()=>{if(!e.open)return;const p=m=>{m.defaultPrevented||m.key==="Escape"&&(m.preventDefault(),h())};window.addEventListener("keydown",p),ue(()=>window.removeEventListener("keydown",p))});function d(){n("fix"),o(""),u(null)}async function g(p){p.preventDefault();const m=r().trim();if(!m){u(_("appendTask.descRequired"));return}s(!0),u(null);try{await e.onSubmit({kind:t(),description:m,sectionPath:e.sectionPath,quote:e.quote}),d(),e.onCancel()}catch(y){u(y.message)}finally{s(!1)}}function h(){e.onCancel()}return f(j,{get when(){return e.open},get children(){var p=o4(),m=p.firstChild,y=m.firstChild,v=y.firstChild,b=v.nextSibling,w=y.nextSibling,E=w.firstChild,C=E.firstChild,A=E.nextSibling;return p.$$mousedown=h,m.$$mousedown=I=>I.stopPropagation(),x(v,()=>_("appendTask.title")),x(b,()=>_("appendTask.hint")),w.addEventListener("submit",g),x(w,f(ir,{class:"m-0 flex flex-col gap-1.5 border-0 p-0",get value(){return t()},onChange:I=>n(I),get disabled(){return i()},get children(){return[f(Id,{class:"mb-1 font-medium",get children(){return _("appendTask.type")}}),J(()=>["feat","refct","fix"].map(I=>f(Cn,{value:I,class:"flex items-center gap-1.5",get children(){return[f(_n,{}),f(Nn,{}),f(En,{class:"cursor-pointer",get children(){return _(i4[I])}})]}})))]}}),E),x(C,()=>_("appendTask.description")),x(E,f(tu,{get projectId(){return e.projectId},minRows:5,maxRows:5,get value(){return r()},onValueChange:o,get placeholder(){return _("appendTask.descPlaceholder")},autofocus:!0,get disabled(){return i()}}),null),x(w,f(j,{get when(){return e.sectionPath||e.quote},get children(){var I=n4();return x(I,f(j,{get when(){return e.sectionPath},get children(){var S=e4(),k=S.firstChild,P=k.nextSibling;return x(k,()=>_("appendTask.refSection")),x(P,()=>e.sectionPath),S}}),null),x(I,f(j,{get when(){return e.quote},get children(){var S=t4();return x(S,()=>e.quote?.slice(0,200)),S}}),null),I}}),A),x(w,f(j,{get when(){return a()},get children(){var I=r4();return x(I,a),I}}),A),x(A,f(we,{type:"button",variant:"ghost",size:"sm",onClick:h,get disabled(){return i()},get children(){return _("common.cancel")}}),null),x(A,f(we,{type:"submit",variant:"default",size:"sm",get disabled(){return i()},get children(){return[f(Ia,{class:"mr-1 h-3.5 w-3.5"}),J(()=>J(()=>!!i())()?_("common.submitting"):_("appendTask.submit"))]}}),null),$e(I=>{var S=_("appendTask.title"),k=l()?{top:`${l().top}px`,left:`${l().left}px`}:void 0;return S!==I.e&&Ke(m,"aria-label",I.e=S),I.t=Zo(m,k,I.t),I},{e:void 0,t:void 0}),p}})};Gt(["mousedown"]);const ya="__freeform__",a4={accept:"确认,按此推进",rejectAlternative:"否决·换方案",rejectConstraint:"否决·补约束",rejectDropGoal:"否决·弃目标·废弃当前目标,继续其余",rejectDropSpec:"否决·弃目标·放弃整个 spec"},u4="accept";function l4(e){return e!==u4}function c4(e,t,n){const r=a4[t],o=(n??"").trim();if(l4(t)&&!o)return null;const i={questionId:e.id,questionText:e.text,selectedOptionLabel:r};return o&&(i.note=o),i}function d4(e,t){const n=(t.note??"").trim();if(e.isFreeform)return n?{questionId:e.id,questionText:e.text,note:n}:null;const r=t.selectedOptionLabel;return r===ya?n?{questionId:e.id,questionText:e.text,note:n}:null:r?{questionId:e.id,questionText:e.text,selectedOptionLabel:r}:null}function dv(e){if(e.confirmTop==="accept")return"accept";if(e.confirmTop!=="reject")return null;if(e.confirmIntent==="alternative")return"rejectAlternative";if(e.confirmIntent==="constraint")return"rejectConstraint";if(e.confirmIntent==="dropGoal"){if(e.confirmDrop==="current")return"rejectDropGoal";if(e.confirmDrop==="spec")return"rejectDropSpec"}return null}function f4(e){const t=dv(e);return t?t==="accept"?!0:e.note.trim().length>0:!1}function g4(e){const t={};for(const n of e){if(n.kind==="confirm"){t[n.id]={note:"",confirmTop:"accept"};continue}const r=n.options.find(o=>o.recommended);t[n.id]={selectedOptionLabel:r?.label??n.options[0]?.label,note:""}}return t}function h4(e,t){let n=0;for(const r of e){const o=t[r.id];if(!o){n+=1;continue}if(r.kind==="confirm"){f4(o)||(n+=1);continue}const i=o.note??"";r.isFreeform||o.selectedOptionLabel===ya?i.trim()||(n+=1):o.selectedOptionLabel||(n+=1)}return n}function p4(e,t){const n=[];for(const r of e){const o=t[r.id]??{note:""};if(r.kind==="confirm"){const s=dv(o);if(!s)continue;const a=c4(r,s,o.note);if(!a)return{ok:!1,reason:"reasonRequired"};n.push(a);continue}const i=d4(r,o);i&&n.push(i)}return{ok:!0,items:n}}function m4(e){return`f-${Date.now()}-${e}`}function b4(e){return e.map(t=>({sectionPath:t.sectionPath,quote:t.quote,note:t.note}))}function y4(e){return e?e.includes("🔴")?"border-l-2 border-l-destructive":e.includes("🟡")?"border-l-2 border-l-warning":"border-border":"border-border"}var v4=$('<p class="text-destructive mx-3 mt-1 ">'),w4=$('<aside class="flex min-w-0 flex-[4] flex-col overflow-hidden rounded-lg border bg-card shadow-lg"data-testid=question-confirm-panel><header class="flex items-center justify-between gap-2 border-b bg-background px-3 py-2.5"><div class="flex min-w-0 flex-1 items-baseline gap-2"><strong class="min-w-0 truncate font-semibold"></strong><span class="shrink-0 whitespace-nowrap text-sm text-muted-foreground"> <span class="font-semibold text-warning"></span> / </span></div></header><ul class="m-0 flex min-h-0 min-w-0 list-none flex-1 flex-col gap-2 overflow-auto p-2">'),x4=$('<p class="qcp-question-desc m-0 whitespace-pre-wrap break-words text-muted-foreground">'),np=$('<p class="m-0 break-words"><strong></strong>:'),_4=$("<div>"),E4=$('<li class="flex min-w-0 flex-col gap-2 rounded-lg border bg-background p-2.5"><p class="qcp-question m-0 font-medium break-words">'),C4=$('<em class="text-sm not-italic text-primary"> '),S4=$('<li class="flex min-w-0 flex-col gap-2 rounded-lg border border-accent/60 bg-background p-2.5"><header class="text-muted-foreground flex items-center justify-between text-sm"><strong></strong></header><blockquote class="border-border bg-card m-0 border-l-2 px-2 py-1 text-sm text-muted-foreground break-words"><em></em> <!> "<!>"</blockquote><p class="m-0 whitespace-pre-wrap break-words">!!!');const k4=e=>{const t=ne(()=>g4(e.questions)),[n,r]=T({}),o=ne(()=>({...t(),...n()})),[i,s]=T(!1),[a,u]=T(null);function l(v,b){r(w=>({...w,[v]:{...w[v]??o()[v],...b}}))}function c(v,b){l(v,{selectedOptionLabel:b})}function d(v,b){l(v,{note:b})}function g(v,b){b==="accept"?l(v,{confirmTop:b,confirmIntent:void 0,confirmDrop:void 0}):l(v,{confirmTop:b})}function h(v,b){b==="dropGoal"?l(v,{confirmIntent:b}):l(v,{confirmIntent:b,confirmDrop:void 0})}function p(v,b){l(v,{confirmDrop:b})}const m=ne(()=>h4(e.questions,o()));async function y(){s(!0),u(null);try{const v=p4(e.questions,o());if(!v.ok){u(_("questionConfirm.reasonRequired"));return}const b={answers:v.items,freeformAnnotations:b4(e.freeforms)};if(b.answers.length===0&&b.freeformAnnotations.length===0){u(_("questionConfirm.noAnswers"));return}await e.onSubmit(b)}catch(v){u(v.message)}finally{s(!1)}}return(()=>{var v=w4(),b=v.firstChild,w=b.firstChild,E=w.firstChild,C=E.nextSibling,A=C.firstChild,I=A.nextSibling;I.nextSibling;var S=b.nextSibling;return x(E,()=>_("questionConfirm.title")),x(C,()=>_("questionConfirm.unanswered"),A),x(I,m),x(C,()=>e.questions.length,null),x(b,f(we,{size:"sm",class:"shrink-0",get disabled(){return i()||e.running},onClick:y,get children(){return[f(Ia,{class:"mr-1 h-3.5 w-3.5"}),J(()=>J(()=>!!i())()?_("common.submitting"):J(()=>!!e.running)()?_("questionConfirm.running"):_("questionConfirm.submitAll"))]}}),null),x(v,f(j,{get when(){return a()},get children(){var k=v4();return x(k,a),k}}),S),x(S,f(at,{get each(){return e.questions},children:k=>{const P=()=>o()[k.id]??{note:""},R=()=>k.kind!=="confirm"&&(k.isFreeform||P().selectedOptionLabel===ya),L=()=>k.kind==="confirm"&&P().confirmTop==="reject";return(()=>{var F=E4(),D=F.firstChild;return x(D,()=>k.text),x(F,f(j,{get when(){return k.description},get children(){var B=x4();return x(B,()=>k.description),B}}),null),x(F,f(j,{get when(){return k.kind==="choice"},get children(){return f(ir,{class:"m-0 flex flex-col gap-1 p-0",get value(){return P().selectedOptionLabel??""},onChange:B=>c(k.id,B),get children(){return[f(at,{get each(){return k.options},children:B=>f(Cn,{get value(){return B.label},class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(_n,{}),f(Nn,{}),f(En,{class:"min-w-0 cursor-pointer break-words",get children(){return[J(()=>B.label),f(j,{get when(){return B.recommended},get children(){var N=C4();return N.firstChild,x(N,()=>_("questionConfirm.recommended"),null),N}})]}})]}})}),f(Cn,{value:ya,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(_n,{}),f(Nn,{}),f(En,{class:"qcp-option-freeform cursor-pointer",get children(){return _("questionConfirm.freeformLabel")}})]}})]}})}}),null),x(F,f(j,{get when(){return k.kind==="confirm"},get children(){return[(()=>{var B=_4();return x(B,f(j,{get when(){return k.plan},get children(){var N=np(),X=N.firstChild;return X.nextSibling,x(X,()=>_("questionConfirm.confirmPlanLabel")),x(N,()=>k.plan,null),N}}),null),x(B,f(j,{get when(){return k.impact},get children(){var N=np(),X=N.firstChild;return X.nextSibling,x(X,()=>_("questionConfirm.confirmImpactLabel")),x(N,()=>k.impact,null),N}}),null),$e(()=>kt(B,`flex flex-col gap-1 rounded-md border bg-card px-2 py-1.5 text-sm ${y4(k.impact)}`)),B})(),f(ir,{class:"m-0 flex flex-col gap-1 p-0",get value(){return P().confirmTop??""},onChange:B=>g(k.id,B),get children(){return[f(Cn,{value:"accept",class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(_n,{}),f(Nn,{}),f(En,{class:"qcp-confirm-accept cursor-pointer",get children(){return _("questionConfirm.decisionAccept")}})]}}),f(Cn,{value:"reject",class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(_n,{}),f(Nn,{}),f(En,{class:"qcp-confirm-reject cursor-pointer font-medium text-destructive",get children(){return _("questionConfirm.decisionReject")}})]}})]}}),f(j,{get when(){return P().confirmTop==="reject"},get children(){return f(ir,{class:"m-0 ml-5 flex flex-col gap-1 border-l border-border pl-2",get value(){return P().confirmIntent??""},onChange:B=>h(k.id,B),get children(){return[f(at,{get each(){return[["alternative",_("questionConfirm.intentAlternative")],["constraint",_("questionConfirm.intentConstraint")],["dropGoal",_("questionConfirm.intentDropGoal")]]},children:([B,N])=>f(Cn,{value:B,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(_n,{}),f(Nn,{}),f(En,{class:"min-w-0 cursor-pointer break-words",children:N})]}})}),f(j,{get when(){return P().confirmIntent==="dropGoal"},get children(){return f(ir,{class:"m-0 ml-5 flex flex-col gap-1 border-l border-border pl-2",get value(){return P().confirmDrop??""},onChange:B=>p(k.id,B),get children(){return f(at,{get each(){return[["current",_("questionConfirm.dropGoalCurrent")],["spec",_("questionConfirm.dropGoalSpec")]]},children:([B,N])=>f(Cn,{value:B,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(_n,{}),f(Nn,{}),f(En,{class:"min-w-0 cursor-pointer break-words",children:N})]}})})}})}})]}})}})]}}),null),x(F,f(j,{get when(){return R()},get children(){return f(Ac,{class:"qcp-note",rows:2,get placeholder(){return _("questionConfirm.notePlaceholder")},get value(){return P().note},onInput:B=>d(k.id,B.currentTarget.value)})}}),null),x(F,f(j,{get when(){return L()},get children(){return f(Ac,{class:"qcp-reject-reason",rows:2,get placeholder(){return _("questionConfirm.reasonPlaceholder")},get value(){return P().note},onInput:B=>d(k.id,B.currentTarget.value)})}}),null),F})()}}),null),x(S,f(at,{get each(){return e.freeforms},children:k=>(()=>{var P=S4(),R=P.firstChild,L=R.firstChild,F=R.nextSibling,D=F.firstChild,B=D.nextSibling,N=B.nextSibling,X=N.nextSibling,se=X.nextSibling;se.nextSibling;var K=F.nextSibling;return K.firstChild,x(L,()=>_("questionConfirm.selectionAnnotation")),x(R,f(we,{variant:"ghost",size:"icon",class:"h-6 w-6",onClick:()=>e.onRemoveFreeform(k.id),"aria-label":"remove",get children(){return f(eo,{class:"h-4 w-4"})}}),null),x(D,()=>k.sectionPath),x(F,()=>_("questionConfirm.quoteConnector"),N),x(F,()=>k.quote.slice(0,200),se),x(K,()=>k.note,null),P})()}),null),$e(()=>Ke(E,"title",_("questionConfirm.title"))),v})()};var A4=$('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),rp=$("<p class=text-muted-foreground>"),T4=$('<header class="flex flex-col items-start justify-between gap-2"><div class="flex w-full items-center justify-between gap-2"><div class="flex min-w-0 items-center gap-1"></div></div><div><p class=" text-muted-foreground"></p></div><div class="flex items-center gap-2 text-muted-foreground"><div class="relative inline-flex shrink-0 rounded-md has-[:focus-visible]:ring-[1.5px] has-[:focus-visible]:ring-ring"><span aria-hidden=true></span><select class="absolute inset-0 h-full w-full cursor-pointer opacity-0"><option value=plan>plan</option><option value=tasks>tasks</option><option value=execute>execute</option><option value=done>done</option></select></div><time>'),I4=$('<p class="text-destructive ">'),D4=$('<div class="flex min-h-0 flex-1 items-stretch gap-4"><article class="markdown spec-main flex-[6] min-w-0 overflow-auto rounded-xl border bg-card p-4 shadow">');const R4={plan:"bg-stage-plan/15 text-stage-plan border-stage-plan/30",tasks:"bg-stage-tasks/15 text-stage-tasks border-stage-tasks/30",execute:"bg-stage-execute/15 text-stage-execute border-stage-execute/30",done:"bg-stage-done/15 text-stage-done border-stage-done/30"},O4=120,op=3,N4=150,M4=e=>new Promise(t=>setTimeout(t,e));async function P4(e,t,n){for(let r=0;r<=op;r+=1)try{return await pe.getSpec(e,t)}catch(o){if(!o.message.startsWith("404"))throw o;r<op&&await M4(N4)}return n??null}const $4=()=>{const e=Qi(),t=_o(),[n,r]=T(0),[o,i]=T(!1),[s,a]=T(""),[u]=en(()=>[t(),e.id,n()],async([H,z],Z)=>P4(H,z,Z.value)),[l]=en(()=>[t(),e.id,n()],async([H,z])=>{try{return await pe.getDebug(H,z)}catch{return{exists:!1,text:""}}}),[c,d]=T(null),[g,h]=T(!1),[p,m]=T(null),[y,v]=T(null),[b,w]=T(null),[E,C]=T([]),[A,I]=T(!1),[S,k]=T(null);let P;const R=ne(()=>{const H=u();return H?BO(H.body):[]}),L=ne(()=>!u()||o()?!1:R().length>0||E().length>0);re(()=>{const H=e.id,z=t();if(!H||!z)return;let Z;const te=HE(z,H,{onUpdated:()=>{Z&&clearTimeout(Z),Z=setTimeout(()=>void zc(()=>r(he=>he+1)),O4)}});ue(()=>{Z&&clearTimeout(Z),te()})}),re(()=>{const H=e.id,z=t();!H||!z||pe.getSpecSession(z,H).then(({sessionId:Z,running:te})=>{Z&&(a(Z),i(te),Ko(Z))}).catch(()=>{})}),re(()=>{const H=t(),z=s();if(!H||!z)return;const Z=l0(H,{onStatus:te=>{te.sessionId===z&&i(te.running)}});ue(Z)}),re(()=>{const H=t(),z=s();if(!H||!z)return;const Z=Ra(H,z,{onEvent:te=>{(te.type==="turn-completed"||te.type==="error")&&i(!1)}});ue(Z)}),re(()=>{const H=b();if(!H)return;const z=RO(H,d);ue(z)}),es(()=>A()||g()),re(()=>{const H=b(),z=u();if(!H||!z)return;const Z=t();let te=!0,he;const W=Bd(z.body,{specId:z.id,projectId:Z||void 0});wI(H,`<article>${W}</article>`,{childrenOnly:!0,onBeforeElUpdated:(M,Y)=>!(M.classList?.contains("mermaid")&&M.getAttribute("data-mermaid-source")===Y.getAttribute?.("data-mermaid-source"))}),uv(H).then(M=>{if(!te){M();return}he=M}),ue(()=>{te=!1,he?.()})});async function F(){v(null),i(!0);try{const H=t(),{sessionId:z}=await pe.runAgent(H,e.id);a(z),Ko(z)}catch(H){i(!1),v(H.message)}}async function D(H){v(null);try{await pe.setStage(t(),e.id,H),r(z=>z+1)}catch(z){v(z.message)}}function B(H){m(H),h(!0)}async function N(H){const z=p();z&&C(Z=>[...Z,{id:m4(Z.length),sectionPath:z.sectionPath,quote:z.text,note:H}])}function X(H){C(z=>z.filter(Z=>Z.id!==H))}async function se(H){await pe.submitQuestionAnswers(t(),e.id,H),C([]),await F()}function K(){k(c()),I(!0)}async function U(H){const z=t(),Z=await pe.appendItem(z,e.id,H);Z.busy&&v(_("specDetail.appendSavedSpecBusy")),Z.sessionId&&(i(!0),a(Z.sessionId),Ko(Z.sessionId,Z.commandLine?{userText:Z.commandLine,kind:Z.kind??"claude"}:void 0))}async function oe(H){i(!0);try{const z=t(),{sessionId:Z}=await pe.explain(z,e.id,H.text);a(Z),Ko(Z)}catch(z){i(!1),v(z.message)}}return(()=>{var H=A4();return x(H,f(Ca,{get fallback(){return(()=>{var z=rp();return x(z,()=>_("common.loading")),z})()},get children(){return f(j,{get when(){return u()},get fallback(){return(()=>{var z=rp();return x(z,()=>_("specDetail.notFound")),z})()},children:z=>[(()=>{var Z=T4(),te=Z.firstChild,he=te.firstChild,W=te.nextSibling,M=W.firstChild,Y=W.nextSibling,ae=Y.firstChild,_e=ae.firstChild,fe=_e.nextSibling,xe=ae.nextSibling;return x(he,f(gs,{get items(){return[{label:_("breadcrumb.specList"),href:Bt("")},{label:z().id}]}}),null),x(he,f(we,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("specDetail.copySpecPath")},get"aria-label"(){return _("specDetail.copySpecPath")},onClick:()=>void fy(e.id),get children(){return f(Q_,{class:"h-3.5 w-3.5"})}}),null),x(te,f(fs,{}),null),x(M,()=>z().frontmatter.summary||_("common.pendingAgent")),x(_e,()=>z().frontmatter.stage),fe.addEventListener("change",Te=>D(Te.currentTarget.value)),x(xe,()=>f0(z().frontmatter.updated_at)),x(Y,f(we,{variant:"outline",size:"sm",class:"append-btn",ref(Te){var bt=P;typeof bt=="function"?bt(Te):P=Te},onClick:K,get children(){return _("specDetail.appendTask")}}),null),x(Y,f(j,{get when(){return l()?.exists},get children(){return f(Kn,{class:"inline-flex h-8 cursor-pointer items-center justify-center rounded-md px-3 font-medium hover:bg-accent hover:text-accent-foreground",get href(){return Bt(`specs/${z().id}/debug`)},get children(){return _("specDetail.debug")}})}}),null),x(Y,f(Kn,{class:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground",get href(){return Bt(`specs/${z().id}/review`)},get title(){return _("git.title")},get children(){return f(Gc,{class:"h-4 w-4"})}}),null),x(Y,f(j,{get when(){return o()},get children(){return f(hy,{variant:"secondary",get children(){return _("specDetail.running")}})}}),null),$e(Te=>{var bt=`inline-flex items-center rounded-md border px-2.5 py-0.5 font-mono text-sm font-semibold uppercase tracking-wider ${R4[z().frontmatter.stage]??"bg-muted text-muted-foreground border-border"}`,q=_("specDetail.forceStage"),V=_("specDetail.forceStage");return bt!==Te.e&&kt(_e,Te.e=bt),q!==Te.t&&Ke(fe,"title",Te.t=q),V!==Te.a&&Ke(fe,"aria-label",Te.a=V),Te},{e:void 0,t:void 0,a:void 0}),$e(()=>fe.value=z().frontmatter.stage),Z})(),f(j,{get when(){return y()},get children(){var Z=I4();return x(Z,y),Z}}),(()=>{var Z=D4(),te=Z.firstChild;return x(Z,f(j,{get when(){return L()},get children(){return f(k4,{get questions(){return R()},get freeforms(){return E()},get running(){return o()},onRemoveFreeform:X,onSubmit:se})}}),te),Hn(w,te),Z})(),f(YO,{get snap(){return J(()=>!!g())()?null:c()},onAnnotate:B,onExplain:oe}),f(QO,{get open(){return g()},get projectId(){return t()},get snap(){return p()},onCancel:()=>h(!1),onSubmit:N}),f(s4,{get open(){return A()},get projectId(){return t()},get sectionPath(){return S()?.sectionPath},get quote(){return S()?.text},anchorEl:P,onCancel:()=>I(!1),onSubmit:U})]})}})),H})()},L4={M:"text-warning",A:"text-success",D:"text-destructive","??":"text-info",R:"text-primary"};function F4(e){return L4[e]??""}function B4(e,t,n){const r=new Set(n.map(i=>i.path)),o=new Set;for(const i of e)r.has(i)&&o.add(i);return{selected:o,active:t&&r.has(t)?t:null}}function z4(e){return`${e?.index??""}${e?.worktree??""}`}var _l,ip;function U4(){if(ip)return _l;ip=1,_l=c=>{if(!c)return[];if(typeof c!="string"||c.match(/^\s+$/))return[];const d=c.split(`
32
+ `);if(d.length===0)return[];const g=[];let h=null,p=null,m=0,y=0,v=null;const b=H=>{p?.changes.push({type:"normal",normal:!0,ln1:m++,ln2:y++,content:H}),v.oldLines--,v.newLines--},w=H=>{const[z,Z]=n(H)??[];h={chunks:[],deletions:0,additions:0,from:z,to:Z},g.push(h)},E=()=>{(!h||h.chunks.length)&&w()},C=(H,z)=>{E(),h.new=!0,h.newMode=z[1],h.from="/dev/null"},A=(H,z)=>{E(),h.deleted=!0,h.oldMode=z[1],h.to="/dev/null"},I=(H,z)=>{E(),h.oldMode=z[1]},S=(H,z)=>{E(),h.newMode=z[1]},k=(H,z)=>{E(),h.index=H.split(" ").slice(1),z[1]&&(h.oldMode=h.newMode=z[1].trim())},P=H=>{E(),h.from=o(H)},R=H=>{E(),h.to=o(H)},L=H=>+(H||1),F=(H,z)=>{h||w(H);const[Z,te,he,W]=z.slice(1);m=+Z,y=+he,p={content:H,changes:[],oldStart:+Z,oldLines:L(te),newStart:+he,newLines:L(W)},v={oldLines:L(te),newLines:L(W)},h.chunks.push(p)},D=H=>{p&&(p.changes.push({type:"del",del:!0,ln:m++,content:H}),h.deletions++,v.oldLines--)},B=H=>{p&&(p.changes.push({type:"add",add:!0,ln:y++,content:H}),h.additions++,v.newLines--)},N=H=>{if(!p)return;const[z]=p.changes.slice(-1);p.changes.push({type:z.type,[z.type]:!0,ln1:z.ln1,ln2:z.ln2,ln:z.ln,content:H})},X=[[/^diff\s/,w],[/^new file mode (\d+)$/,C],[/^deleted file mode (\d+)$/,A],[/^old mode (\d+)$/,I],[/^new mode (\d+)$/,S],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,k],[/^---\s/,P],[/^\+\+\+\s/,R],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,F],[/^\$/,N]],se=[[/^\$/,N],[/^-/,D],[/^\+/,B],[/^\s*/,b]],K=H=>{for(const[z,Z]of se){const te=H.match(z);if(te){Z(H,te);break}}v.oldLines===0&&v.newLines===0&&(v=null)},U=H=>{for(const[z,Z]of X){const te=H.match(z);if(te){Z(H,te);break}}},oe=H=>{v?K(H):U(H)};for(const H of d)oe(H);return g};const e=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,t=/^(a|b|i|w|c|o|1|2)\//,n=c=>c?.match(e)?.map(d=>d.replace(t,"").replace(/("|')$/,"")),r=/^\\?['"]|\\?['"]$/g,o=c=>{let d=i(c,"-+").trim();return d=a(d),d.replace(r,"").replace(t,"")},i=(c,d)=>{c=l(c);const g=u(d);return c.replace(new RegExp(`^${g}+`),"")},s=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,a=c=>{const d=s.exec(c);return d&&(c=c.substring(0,d.index).trim()),c},u=c=>c instanceof RegExp?c.source:`[${l(c).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,l=c=>`${c??""}`;return _l}var K4=U4();const j4=bs(K4),q4={ts:"typescript",tsx:"typescript",mts:"typescript",cts:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",json:"json",css:"css",scss:"scss",less:"less",html:"xml",vue:"xml",xml:"xml",svg:"xml",md:"markdown",markdown:"markdown",sh:"bash",bash:"bash",zsh:"bash",yml:"yaml",yaml:"yaml",toml:"ini",ini:"ini",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",h:"c",cpp:"cpp",hpp:"cpp",cs:"csharp",php:"php",sql:"sql"};function H4(e){const t=e.split(".").pop()?.toLowerCase()??"",n=q4[t];return n&&ma.getLanguage(n)?n:void 0}function G4(e,t){if(!(!t||!e))try{return ma.highlight(e,{language:t,ignoreIllegals:!0}).value}catch{return}}function V4(e){return e?j4(e).map(t=>({chunks:t.chunks.map(n=>({header:n.content,rows:n.changes.map(W4)}))})):[]}function W4(e){const t=e.type==="add"?"":e.type==="del"?e.ln:e.ln1,n=e.type==="del"?"":e.type==="add"?e.ln:e.ln2;return{oldLn:t,newLn:n,marker:e.content.slice(0,1),code:e.content.slice(1),tone:e.type==="add"?"add":e.type==="del"?"del":"normal"}}var Y4=$('<span class="shrink-0 text-sm text-warning">'),Z4=$('<button type=button class="ml-auto inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md border-0 bg-transparent text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring">'),X4=$('<div data-testid=git-diff-pane class="code-highlight flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-xl border bg-card"><div class="flex items-center gap-2 border-b px-2 py-1"><span class="min-w-0 flex-1 truncate font-mono text-sm"></span></div><div class="min-h-0 flex-1 overflow-auto">'),El=$('<p class="p-3 text-muted-foreground">'),J4=$('<p class="p-3 text-destructive">'),Q4=$('<div><div class="bg-muted px-2 py-0.5 font-mono text-sm text-muted-foreground">'),eN=$('<div><span class="w-12 shrink-0 select-none px-1 text-right text-muted-foreground"></span><span class="w-12 shrink-0 select-none px-1 text-right text-muted-foreground"></span><pre class="m-0 flex-1 whitespace-pre-wrap break-all px-2"><span>'),tN=$("<span>"),nN=$("<span class=hljs>");const fv=e=>{const t=ne(()=>V4(e.patch)),n=ne(()=>t().some(o=>o.chunks.length>0)),r=ne(()=>H4(e.path));return(()=>{var o=X4(),i=o.firstChild,s=i.firstChild,a=i.nextSibling;return x(s,()=>e.path),x(i,f(j,{get when(){return e.truncated},get children(){var u=Y4();return x(u,()=>_("git.diffTruncated")),u}}),null),x(i,f(j,{get when(){return e.onClose},get children(){var u=Z4();return u.$$click=()=>e.onClose?.(),x(u,f(eo,{class:"h-4 w-4"})),$e(l=>{var c=_("common.close"),d=_("common.close");return c!==l.e&&Ke(u,"aria-label",l.e=c),d!==l.t&&Ke(u,"title",l.t=d),l},{e:void 0,t:void 0}),u}}),null),x(a,f(j,{get when(){return!e.loading},get fallback(){return(()=>{var u=El();return x(u,()=>_("git.diffLoading")),u})()},get children(){return f(j,{get when(){return!e.error},get fallback(){return(()=>{var u=J4();return x(u,()=>e.error),u})()},get children(){return f(j,{get when(){return!e.binary},get fallback(){return(()=>{var u=El();return x(u,()=>_("git.binaryFile")),u})()},get children(){return f(j,{get when(){return n()},get fallback(){return(()=>{var u=El();return x(u,()=>_("git.diffEmpty")),u})()},get children(){return f(at,{get each(){return t()},children:u=>f(at,{get each(){return u.chunks},children:l=>(()=>{var c=Q4(),d=c.firstChild;return x(d,()=>l.header),x(c,f(at,{get each(){return l.rows},children:g=>{const h=g.tone==="add"?"bg-success/10":g.tone==="del"?"bg-destructive/10":"",p=g.tone==="add"?"text-success":g.tone==="del"?"text-destructive":"text-muted-foreground",m=G4(g.code,r());return(()=>{var y=eN(),v=y.firstChild,b=v.nextSibling,w=b.nextSibling,E=w.firstChild;return kt(y,`flex font-mono text-sm ${h}`),x(v,()=>g.oldLn),x(b,()=>g.newLn),kt(E,`select-none ${p}`),x(E,()=>g.marker),x(w,f(j,{when:m,get fallback(){return(()=>{var C=tN();return x(C,()=>g.code),C})()},children:C=>(()=>{var A=nN();return $e(()=>A.innerHTML=C()),A})()}),null),y})()}}),null),c})()})})}})}})}})}})),$e(()=>Ke(s,"title",e.path)),o})()};Gt(["click"]);var rN=$("<span class=text-muted-foreground> → "),oN=$('<div><button type=button class="flex min-w-0 flex-1 cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-left"><span></span><span class="truncate font-mono text-sm">');const gv=e=>f(at,{get each(){return e.files},children:t=>(()=>{var n=oN(),r=n.firstChild,o=r.firstChild,i=o.nextSibling;return x(n,f(j,{get when(){return J(()=>!!e.selectedPaths)()&&e.onToggle},get children(){return f(ti,{get checked(){return e.selectedPaths?.has(t.path)??!1},onChange:()=>e.onToggle?.(t.path),get disabled(){return e.disabled},get children(){return f(ni,{})}})}}),r),r.$$click=()=>e.onSelect(t.path),x(o,()=>t.status),x(i,f(j,{get when(){return t.renamedFrom},get children(){var s=rN(),a=s.firstChild;return x(s,()=>t.renamedFrom,a),s}}),null),x(i,()=>t.path,null),$e(s=>{var a=`flex items-center gap-2 px-2 py-0.5 ${e.activePath===t.path?"bg-accent":""}`,u=t.renamedFrom?`${t.renamedFrom} → ${t.path}`:t.path,l=`inline-block w-6 text-center text-sm font-bold ${F4(t.status)}`;return a!==s.e&&kt(n,s.e=a),u!==s.t&&Ke(r,"title",s.t=u),l!==s.a&&kt(o,s.a=l),s},{e:void 0,t:void 0,a:void 0}),n})()});Gt(["click"]);var iN=$('<span class="min-w-0 flex-1 truncate text-left">'),sN=$('<div class="flex items-center gap-1 border-b p-1">'),sp=$('<div class="px-2 py-2 text-sm text-muted-foreground">'),ap=$('<div class="max-h-64 overflow-auto p-1">'),aN=$('<div class="absolute inset-x-0 bottom-0 flex items-center gap-1 rounded-b-md border-t bg-popover px-2 py-1 text-xs text-muted-foreground">'),uN=$('<div class="border-b p-1 pr-9">'),lN=$('<div class="flex min-h-0 flex-1 flex-col gap-1 overflow-auto rounded-xl border"><div class="sticky top-0 flex items-center gap-2 border-b bg-card px-2 py-1"><span class=" text-muted-foreground">'),cN=$('<p class=" text-muted-foreground">'),dN=$('<p class="text-destructive ">'),fN=$('<p class=" text-muted-foreground">(runId: <code></code>)'),gN=$('<div class="flex min-h-0 flex-1 gap-4"><section data-testid=review-controls-pane class="flex min-h-0 min-w-0 flex-1 flex-col gap-3"><div class="flex flex-wrap items-center gap-2"><span aria-hidden=true class="select-none text-border">|</span><span aria-hidden=true class="select-none text-border">|'),hN=$('<button type=button><span class="min-w-0 flex-1 truncate">'),pN=$('<div><button type=button class="min-w-0 flex-1 truncate border-0 bg-transparent p-0 text-left font-mono text-sm disabled:opacity-50">');const mN=new Set(["commit","discard"]),bN=typeof navigator<"u"&&/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent),yN=bN?"⌘ + Enter":"Ctrl + Enter",hv=e=>{const[t,n]=T([]),[r,o]=T("manual"),[i,s]=T(new Set),[a,u]=T(null),[l,c]=T(""),[d,g]=T(!1),[h,p]=T(null),[m,y]=T(""),[v,b]=T(""),[w,E]=T(null),[C,A]=T(!1),[I,S]=T(!1),[k,P]=T(!1),[R,L]=T("idle"),[F,D]=T(null),[B,N]=T(null),[X,se]=T(null),[K,U]=T(null),[oe,H]=T(""),[z,Z]=T(null);function te(ge){return H(ge),new Promise(Ie=>Z(()=>Ie))}function he(ge){const Ie=z();Ie&&(Z(null),Ie(ge))}const W=()=>e.specId?.(),M=ne(()=>!!W());let Y=null;ue(()=>Y?.()),ue(()=>he(!1)),re(()=>{const ge=e.initialMessage?.()??"";ge&&!d()&&c(ge)});const[ae,{refetch:_e,mutate:fe}]=en(e.projectId,ge=>pe.getGitBranches(ge)),xe=()=>zc(()=>_e()),Te=ne(()=>{const ge=ae();return[...ge?.branches??[],...ge?.remoteBranches??[]]}),bt=ne(()=>{const ge=m().trim().toLowerCase(),Ie=Te();return ge?Ie.filter(O=>O.toLowerCase().includes(ge)):Ie}),q=ne(()=>m().trim()),V=ne(()=>q().length>=1),ce=ne(()=>(ae()?.branches??[]).includes(q())),Ae=ne(()=>{const ge=ae();return[...ge?.branches??[],...ge?.remoteBranches??[]]}),Le=ne(()=>{const ge=v().trim().toLowerCase(),Ie=Ae();return ge?Ie.filter(O=>O.toLowerCase().includes(ge)):Ie});function qe(ge){n(ge);const Ie=B4(i(),a(),ge);s(Ie.selected),u(Ie.active)}re(()=>{const ge=e.projectId();if(!ge)return;let Ie=!1,O=!1;pe.getProjectChanges(ge).then(be=>{Ie||O||qe(be.changes)}).catch(()=>{});const Q=ZE(ge,be=>{O=!0,qe(be)});ue(()=>{Ie=!0,Q()})});const[ut]=en(()=>{const ge=a(),Ie=e.projectId();if(!ge||!Ie)return null;const O=t().find(Q=>Q.path===ge);return{pid:Ie,path:ge,revision:z4(O)}},ge=>pe.getFileDiff(ge.pid,ge.path));function $t(ge){return K()===ge}const Be=ne(()=>F()!==null||K()!==null||h()!==null),Ve=ne(()=>B()??(ae.error?ae.error.message:null));function Qe(ge,Ie){Y?.(),U(ge),Y=Ra(e.projectId(),Ie,{onEvent:O=>{(O.type==="turn-completed"||O.type==="error")&&(U(null),Y?.(),Y=null)}})}function wt(){return r()==="agent"?t().map(ge=>ge.path):[...i()]}async function Dt(ge){if(Be())return;N(null);const Ie=wt();if(Ie.length===0){N(_("review.selectAtLeastOne"));return}if(!(ge==="discard"&&!await te(_("review.confirmDiscard")))){p(ge);try{if(ge==="commit"){const Q=l().trim();if(!Q){N(_("review.enterCommitMsg"));return}await pe.projectCommit(e.projectId(),{message:Q,paths:Ie})}else await pe.projectDiscard(e.projectId(),{paths:Ie});s(new Set),u(null);const O=await pe.getProjectChanges(e.projectId());qe(O.changes)}catch(O){N(O.message)}finally{p(null)}}}async function Ot(ge){const Ie=W();if(!(!Ie||Be())&&(N(null),!(ge==="discard"&&!await te(_("review.confirmDiscardAll"))))){D(ge);try{const O=await pe.gitOp(e.projectId(),Ie,ge);se({kind:ge,runId:O.runId}),Ko(O.sessionId),Qe(ge,O.sessionId)}catch(O){N(O.message)}finally{D(null)}}}async function hn(ge){r()==="manual"?await Dt(ge):await Ot(ge)}async function zn(ge){if(!Be()){N(null),p(ge);try{if(ge==="push"){const Ie=await pe.projectPush(e.projectId());Xt.success(_("git.pushed",{branch:Ie.branch}))}else{const Ie=await pe.projectPull(e.projectId());Xt.success(Ie.updated?_("git.pulled",{branch:Ie.branch}):_("git.upToDate"))}}catch(Ie){N(Ie.message)}finally{p(null)}}}async function Jt(ge){const Ie=ge?.trim(),O=e.projectId();if(!(!Ie||!O||Be())&&Ie!==ae()?.current){N(null),p("checkout");try{const Q=await pe.checkoutGitBranch(O,Ie);fe(le=>({current:Q.current,branches:le?.branches.includes(Q.current)?le.branches:[...le?.branches??[],Q.current].sort(),remoteBranches:le?.remoteBranches??[]})),s(new Set),u(null),y(""),S(!1);const be=await pe.getProjectChanges(O);n(be.changes),await xe()}catch(Q){N(Q.message)}finally{p(null)}}}async function zt(){const ge=e.projectId(),Ie=m().trim();if(!(!ge||!Ie||Be())){N(null),p("checkout");try{const O=await pe.createGitBranch(ge,Ie);Xt.success(_("git.branchCreated",{branch:O.current})),s(new Set),u(null),y(""),S(!1);const Q=await pe.getProjectChanges(ge);n(Q.changes),await xe()}catch(O){N(O.message)}finally{p(null)}}}async function pn(){const ge=e.projectId();if(!(!ge||R()==="fetching")){L("fetching");try{await pe.gitFetch(ge),await xe(),L("done")}catch{L("failed")}}}async function yn(ge){const Ie=e.projectId();if(!(!ge||!Ie||Be())){N(null),p("merge");try{const O=await pe.mergeGitBranch(Ie,ge);Xt.success(O.alreadyUpToDate?_("git.mergeUpToDate",{current:O.current,branch:O.merged}):_("git.merged",{current:O.current,branch:O.merged})),E(null),b("");const Q=await pe.getProjectChanges(Ie);n(Q.changes),await xe()}catch(O){N(O.message)}finally{p(null),A(!1)}}}function Vt(ge){return h()===ge||mN.has(ge)&&($t(ge)||F()===ge)}function io(ge){s(Ie=>{const O=new Set(Ie);return O.has(ge)?O.delete(ge):O.add(ge),O})}function wr(){t().every(ge=>i().has(ge.path))?s(new Set):s(new Set(t().map(ge=>ge.path)))}const Lr=ne(()=>t().length>0&&t().every(ge=>i().has(ge.path))),dt=ne(()=>r()==="manual"&&i().size===0),Rn=ne(()=>Be()||r()==="manual"&&(dt()||l().trim()===""));return(()=>{var ge=gN(),Ie=ge.firstChild,O=Ie.firstChild,Q=O.firstChild,be=Q.nextSibling;return x(O,f(Qo,{get open(){return I()},onOpenChange:le=>{S(le),le?k()||(P(!0),pn()):y("")},get children(){return[f(Jo,{as:we,variant:"outline",size:"sm",class:"h-8 w-56 max-w-full justify-start gap-2 px-2 text-sm font-mono",get disabled(){return Be()||ae.loading||!!ae.error},get title(){return _("git.branchSelect")},get"aria-label"(){return _("git.branchSelect")},get children(){return[f(j,{get when(){return J(()=>!ae.loading&&h()!=="checkout")()&&R()!=="fetching"},get fallback(){return f(on,{class:"h-3.5 w-3.5 shrink-0 animate-spin"})},get children(){return f(Gc,{class:"h-3.5 w-3.5 shrink-0"})}}),(()=>{var le=iN();return x(le,()=>ae()?.current??_("git.branchPlaceholder")),le})()]}}),f(ei,{class:"relative w-72 p-0",hideCloseButton:!0,get children(){return[(()=>{var le=sN();return x(le,f($n,{get value(){return m()},onInput:je=>y(je.currentTarget.value),get placeholder(){return _("git.branchFilterPlaceholder")},class:"h-8 flex-1 text-sm"}),null),x(le,f(j,{get when(){return V()},get children(){return f(we,{size:"sm",variant:"secondary",class:"h-8 shrink-0 px-2 text-xs",get disabled(){return Be()||ce()},get title(){return J(()=>!!ce())()?_("git.branchExists"):void 0},onClick:()=>void zt(),get children(){return[f(j,{get when(){return h()==="checkout"},get children(){return f(on,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>h()==="checkout")()?_("git.creatingBranch"):_("git.createBranch"))]}})}}),null),le})(),(()=>{var le=ap();return x(le,f(at,{get each(){return bt()},children:je=>(()=>{var et=hN(),Ee=et.firstChild;return et.$$click=()=>void Jt(je),Ke(et,"title",je),x(Ee,je),$e(ye=>{var He=`flex w-full items-center gap-2 rounded-sm px-2 py-1 text-left font-mono text-sm disabled:opacity-50 ${je===ae()?.current?"bg-accent":""}`,_t=je===ae()?.current||Be();return He!==ye.e&&kt(et,ye.e=He),_t!==ye.t&&(et.disabled=ye.t=_t),ye},{e:void 0,t:void 0}),et})()}),null),x(le,f(j,{get when(){return J(()=>!ae.loading)()&&bt().length===0},get children(){var je=sp();return x(je,()=>_("git.noBranches")),je}}),null),$e(()=>le.classList.toggle("pb-8",R()==="fetching"||R()==="failed")),le})(),f(j,{get when(){return R()==="fetching"||R()==="failed"},get children(){var le=aN();return x(le,f(j,{get when(){return R()==="fetching"},get children(){return[f(on,{class:"h-3 w-3 animate-spin"}),J(()=>_("git.fetching"))]}}),null),x(le,f(j,{get when(){return R()==="failed"},get children(){return _("git.fetchFailed")}}),null),le}})]}})]}}),Q),x(O,f(we,{variant:"default",size:"sm",get disabled(){return Rn()},onClick:()=>hn("commit"),get children(){return[f(j,{get when(){return Vt("commit")},get children(){return f(on,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!Vt("commit"))()?_("review.committing"):_("review.commit"))]}}),Q),x(O,f(we,{variant:"ghost",size:"sm",class:"text-destructive",get disabled(){return Be()||dt()},onClick:()=>hn("discard"),get children(){return[f(j,{get when(){return Vt("discard")},get children(){return f(on,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!Vt("discard"))()?_("review.discarding"):_("review.discard"))]}}),Q),x(O,f(Qo,{get open(){return C()},onOpenChange:le=>{A(le),le||(b(""),E(null))},get children(){return[f(Jo,{as:we,variant:"ghost",size:"sm",get disabled(){return Be()||ae.loading||!!ae.error},get title(){return _("git.mergeBranch")},get children(){return[f(j,{get when(){return!Vt("merge")},get fallback(){return f(on,{class:"mr-1 h-3 w-3 animate-spin"})},get children(){return f(n0,{class:"mr-1 h-3 w-3"})}}),J(()=>J(()=>!!Vt("merge"))()?_("git.merging"):_("git.mergeBranch"))]}}),f(ei,{class:"w-72 p-0",get children(){return[(()=>{var le=uN();return x(le,f($n,{get value(){return v()},onInput:je=>b(je.currentTarget.value),get placeholder(){return _("git.mergeFilterPlaceholder")},class:"h-8 text-sm"})),le})(),(()=>{var le=ap();return x(le,f(at,{get each(){return Le()},children:je=>(()=>{var et=pN(),Ee=et.firstChild;return Ee.$$click=()=>E(je),x(Ee,je),x(et,f(j,{get when(){return w()===je},get children(){return f(we,{size:"sm",variant:"secondary",class:"h-6 shrink-0 px-2 text-xs",get disabled(){return Be()},onClick:()=>void yn(je),get children(){return[f(j,{get when(){return Vt("merge")},get children(){return f(on,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!Vt("merge"))()?_("git.merging"):_("git.mergeAction"))]}})}}),null),$e(ye=>{var He=`flex items-center gap-2 rounded-sm px-2 py-1 ${w()===je?"bg-accent":""}`,_t=je===ae()?.current,Tt=je===ae()?.current?_("git.mergeSelfHint"):je;return He!==ye.e&&kt(et,ye.e=He),_t!==ye.t&&(Ee.disabled=ye.t=_t),Tt!==ye.a&&Ke(Ee,"title",ye.a=Tt),ye},{e:void 0,t:void 0,a:void 0}),et})()}),null),x(le,f(j,{get when(){return J(()=>!ae.loading)()&&Le().length===0},get children(){var je=sp();return x(je,()=>_("git.noBranches")),je}}),null),le})()]}})]}}),be),x(O,f(we,{variant:"ghost",size:"sm",get disabled(){return Be()},onClick:()=>void zn("push"),get children(){return[f(j,{get when(){return Vt("push")},get children(){return f(on,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!Vt("push"))()?_("git.pushing"):_("git.push"))]}}),null),x(O,f(we,{variant:"ghost",size:"sm",get disabled(){return Be()},onClick:()=>void zn("pull"),get children(){return[f(j,{get when(){return Vt("pull")},get children(){return f(on,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!Vt("pull"))()?_("git.pulling"):_("git.pull"))]}}),null),x(Ie,f(ga,{get placeholder(){return _("review.commitPlaceholder",{shortcut:yN})},get value(){return l()},onInput:le=>{g(!0),c(le.currentTarget.value)},onKeyDown:le=>{le.key!=="Enter"||!(le.metaKey||le.ctrlKey)||(le.preventDefault(),!Rn()&&hn("commit"))},get disabled(){return Be()},minRows:1,maxRows:3}),null),x(Ie,f(j,{get when(){return M()},get children(){return f(ir,{class:"flex gap-4",get value(){return r()},onChange:le=>o(le),get disabled(){return Be()},get children(){return[f(Cn,{value:"manual",class:"flex items-center gap-1.5",get children(){return[f(_n,{}),f(Nn,{}),f(En,{class:"cursor-pointer",get children(){return _("review.manualSelect")}})]}}),f(Cn,{value:"agent",class:"flex items-center gap-1.5",get children(){return[f(_n,{}),f(Nn,{}),f(En,{class:"cursor-pointer",get children(){return _("review.agentSelect")}})]}})]}})}}),null),x(Ie,f(j,{get when(){return J(()=>r()==="manual")()&&t().length>0},get children(){var le=lN(),je=le.firstChild,et=je.firstChild;return x(je,f(we,{variant:"ghost",size:"sm",onClick:wr,get disabled(){return Be()},get children(){return J(()=>!!Lr())()?_("review.deselectAll"):_("review.selectAll")}}),et),x(et,()=>_("review.fileCount",{selected:i().size,total:t().length})),x(le,f(gv,{get files(){return t()},get activePath(){return a()},get selectedPaths(){return i()},get disabled(){return Be()},onToggle:io,onSelect:u}),null),le}}),null),x(Ie,f(j,{get when(){return J(()=>r()==="manual")()&&t().length===0},get children(){var le=cN();return x(le,()=>_("review.noChanges")),le}}),null),x(Ie,f(j,{get when(){return Ve()},get children(){var le=dN();return x(le,Ve),le}}),null),x(Ie,f(j,{get when(){return X()},get children(){var le=fN(),je=le.firstChild,et=je.nextSibling;return x(le,()=>_("review.dispatched"),je),x(le,(()=>{var Ee=J(()=>X().kind==="commit");return()=>Ee()?_("review.commit"):_("review.discard")})(),je),x(et,()=>X().runId.slice(0,8)),le}}),null),x(ge,f(j,{get when(){return a()},children:le=>f(fv,{get path(){return le()},get patch(){return ut()?.patch??""},get binary(){return ut()?.binary??!1},get truncated(){return ut()?.truncated??!1},get loading(){return ut.loading},get error(){return J(()=>!!ut.error)()?ut.error.message:null},onClose:()=>u(null)})}),null),x(ge,f(cn,{get open(){return z()!==null},onOpenChange:le=>{le||he(!1)},get children(){return f(cr,{class:"max-w-sm",get children(){return[f(fr,{get children(){return[f(dr,{get children(){return _("review.discardTitle")}}),f(eu,{get children(){return oe()}})]}}),f(Or,{get children(){return[f(we,{variant:"outline",onClick:()=>he(!1),get children(){return _("common.cancel")}}),f(we,{variant:"destructive",onClick:()=>he(!0),get children(){return _("review.confirmDiscardAction")}})]}})]}})}}),null),ge})()};Gt(["click"]);var vN=$('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),wN=$('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),xN=$("<p class=text-muted-foreground>");const _N=()=>{const e=Qi(),t=_o(),[n]=en(()=>[t(),e.id],([o,i])=>pe.getSpec(o,i));es();const r=ne(()=>QE(e.id,n()?.frontmatter.summary));return(()=>{var o=wN();return x(o,f(Ca,{get fallback(){return(()=>{var i=xN();return x(i,()=>_("common.loading")),i})()},get children(){return[(()=>{var i=vN(),s=i.firstChild,a=s.firstChild,u=s.nextSibling;return x(s,f(gs,{get items(){return[{label:_("breadcrumb.specList"),href:Bt("")},{label:e.id,href:Bt(`specs/${e.id}`)},{label:_("git.title")}]}}),a),x(a,()=>n()?.frontmatter.summary||_("common.pendingAgent")),x(u,f(fs,{})),i})(),f(hv,{projectId:t,specId:()=>e.id,initialMessage:r})]}})),o})()};var EN=$('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),up=$("<p class=text-muted-foreground>"),CN=$('<section class="flex min-h-0 min-w-0 flex-1 flex-col gap-2">'),SN=$('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),kN=$('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),AN=$('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const TN=()=>{const e=Qi(),t=_o();es();const[n]=en(()=>[t(),e.id],([a,u])=>pe.getSpec(a,u)),[r]=en(()=>[t(),e.id],([a,u])=>pe.getDebug(a,u)),o=ne(()=>{const a=lO(r()?.text??"");return a.trim()?Bd(a,{specId:e.id,projectId:t()}):""}),[i,s]=T(null);return re(()=>{const a=i(),u=o();if(!a)return;a.innerHTML=u;let l=!0,c;uv(a).then(d=>{if(!l){d();return}c=d}),ue(()=>{l=!1,c?.()})}),(()=>{var a=SN();return x(a,f(Ca,{get fallback(){return(()=>{var u=up();return x(u,()=>_("common.loading")),u})()},get children(){return[(()=>{var u=EN(),l=u.firstChild,c=l.firstChild,d=l.nextSibling;return x(l,f(gs,{get items(){return[{label:_("breadcrumb.specList"),href:Bt("")},{label:e.id,href:Bt(`specs/${e.id}`)},{label:_("specDetail.debug")}]}}),c),x(c,()=>n()?.frontmatter.summary||_("common.pendingAgent")),x(d,f(fs,{})),u})(),(()=>{var u=CN();return x(u,f(j,{get when(){return r.loading},get fallback(){return f(j,{get when(){return o()},get fallback(){return(()=>{var l=AN();return x(l,()=>_("specDebug.empty")),l})()},get children(){var l=kN();return Hn(s,l),l}})},get children(){var l=up();return x(l,()=>_("common.loading")),l}})),u})()]}})),a})()};var IN=["second","minute","hour","day","week","month","year"];function DN(e,t){if(t===0)return["just now","right now"];var n=IN[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var RN=["秒","分钟","小时","天","周","个月","年"];function ON(e,t){if(t===0)return["刚刚","片刻后"];var n=RN[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var Oc={},fi=function(e,t){Oc[e]=t},NN=function(e){return Oc[e]||Oc.en_US},Cl=[60,60,24,7,365/7/12,12];function MN(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function PN(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=Cl[o]&&o<Cl.length;o++)e/=Cl[o];return e=Math.floor(e),o*=2,e>(o===0?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function $N(e,t){var n=new Date;return(+n-+MN(e))/1e3}var pv=function(e,t,n){var r=$N(e);return PN(r,NN(t))};fi("en_US",DN);fi("zh_CN",ON);var Fs={},lp;function LN(){if(lp)return Fs;lp=1,Object.defineProperty(Fs,"__esModule",{value:!0});var e=["秒","分钟","小时","天","周","个月","年"];function t(n,r){if(r===0)return["刚刚","片刻后"];var o=e[~~(r/2)];return[n+" "+o+"前",n+" "+o+"后"]}return Fs.default=t,Fs}var FN=LN();const mv=bs(FN),cp=[["just now","right now"],["%ss ago","in %ss"],["1m ago","in 1m"],["%sm ago","in %sm"],["1h ago","in 1h"],["%sh ago","in %sh"],["1d ago","in 1d"],["%sd ago","in %sd"],["1w ago","in 1w"],["%sw ago","in %sw"],["1mo ago","in 1mo"],["%smo ago","in %smo"],["1y ago","in 1y"],["%sy ago","in %sy"]];function bv(e,t){return cp[t]??cp[0]}var BN=$("<div class=divide-y>"),zN=$('<div class="flex min-h-0 flex-1 gap-2"><section class="flex min-h-0 min-w-0 flex-1 flex-col gap-2"><div class="min-h-0 flex-1 overflow-auto rounded-lg border bg-card">'),UN=$('<div class="border-t bg-muted/20 py-1">'),KN=$('<article><button type=button class="grid w-full grid-cols-[1fr_auto] gap-x-4 gap-y-1 px-3 py-2 text-left hover:bg-accent"><span class="flex min-w-0 items-center gap-2 font-medium"><span class=truncate></span></span><time class="text-xs text-muted-foreground"></time><span class="col-start-1 ml-6 truncate text-xs text-muted-foreground"></span><code class="col-start-2 text-xs text-muted-foreground">'),jN=$("<p>");fi("en",bv);fi("zh-CN",mv);const qN=e=>{const{lng:t}=_d(),[n,r]=T(""),[o,i]=T(""),[s,a]=T([]),[u,l]=T(null),[c,d]=T(!0),[g,h]=T(!1),[p,m]=T(null),[y,v]=T(null),[b,w]=T([]),[E,C]=T(!1),[A,I]=T(null),[S,k]=T(null);let P,R=0,L=0,F="";ue(()=>clearTimeout(P));async function D(K){const U=++R;i(K),d(!0),h(!1),m(null),a([]),l(null),v(null),k(null);try{const oe=await pe.getGitHistory(e.projectId(),K);if(U!==R)return;a(oe.commits),l(oe.nextCursor)}catch(oe){U===R&&m(oe.message)}finally{U===R&&d(!1)}}re(()=>{const K=e.projectId();!K||K===F||(F=K,D(n().trim()))});function B(K){r(K),clearTimeout(P),P=setTimeout(()=>void D(K.trim()),250)}async function N(){const K=u();if(K===null||g())return;const U=R;h(!0),m(null);try{const oe=await pe.getGitHistory(e.projectId(),o(),K);if(U!==R)return;a(H=>{const z=new Set(H.map(Z=>Z.sha));return[...H,...oe.commits.filter(Z=>!z.has(Z.sha))]}),l(oe.nextCursor)}catch(oe){U===R&&m(oe.message)}finally{U===R&&h(!1)}}async function X(K){if(y()===K.sha){v(null),k(null);return}const U=++L;v(K.sha),w([]),k(null),C(!0),I(null);try{const oe=await pe.getGitCommitFiles(e.projectId(),K.sha);U===L&&w(oe.files)}catch(oe){U===L&&I(oe.message)}finally{U===L&&C(!1)}}const[se]=en(()=>{const K=y(),U=S(),oe=e.projectId();return K&&U&&oe?{sha:K,path:U,pid:oe}:null},K=>pe.getGitCommitFileDiff(K.pid,K.sha,K.path));return(()=>{var K=zN(),U=K.firstChild,oe=U.firstChild;return x(U,f($n,{type:"search",get value(){return n()},onInput:H=>B(H.currentTarget.value),get placeholder(){return _("git.historySearchPlaceholder")},get"aria-label"(){return _("git.historySearchPlaceholder")}}),oe),x(oe,f(j,{get when(){return!c()},get fallback(){return f(Lo,{loading:!0,get text(){return _("git.historyLoading")}})},get children(){return f(j,{get when(){return!p()},get fallback(){return f(Lo,{get text(){return p()},tone:"error"})},get children(){return f(j,{get when(){return s().length>0},get fallback(){return f(Lo,{get text(){return _("git.historyEmpty")}})},get children(){var H=BN();return x(H,f(at,{get each(){return s()},children:z=>(()=>{var Z=KN(),te=Z.firstChild,he=te.firstChild,W=he.firstChild,M=he.nextSibling,Y=M.nextSibling,ae=Y.nextSibling;return te.$$click=()=>void X(z),x(he,(()=>{var _e=J(()=>y()===z.sha);return()=>_e()?f(Aa,{class:"h-4 w-4 shrink-0"}):f(Ta,{class:"h-4 w-4 shrink-0"})})(),W),x(W,()=>z.subject),x(M,()=>pv(z.committedAt,t())),x(Y,()=>z.authorName),x(ae,()=>z.sha.slice(0,8)),x(Z,f(j,{get when(){return y()===z.sha},get children(){var _e=UN();return x(_e,f(j,{get when(){return!E()},get fallback(){return f(Lo,{loading:!0,get text(){return _("git.historyFilesLoading")}})},get children(){return f(j,{get when(){return!A()},get fallback(){return f(Lo,{get text(){return A()},tone:"error"})},get children(){return f(j,{get when(){return b().length>0},get fallback(){return f(Lo,{get text(){return _("git.historyNoFiles")}})},get children(){return f(gv,{get files(){return b()},get activePath(){return S()},onSelect:k})}})}})}})),_e}}),null),$e(_e=>{var fe=y()===z.sha,xe=z.committedAt,Te=z.committedAt;return fe!==_e.e&&Ke(te,"aria-expanded",_e.e=fe),xe!==_e.t&&Ke(M,"datetime",_e.t=xe),Te!==_e.a&&Ke(M,"title",_e.a=Te),_e},{e:void 0,t:void 0,a:void 0}),Z})()})),H}})}})}})),x(U,f(j,{get when(){return u()!==null},get children(){return f(we,{variant:"link",get disabled(){return g()},onClick:()=>void N(),get children(){return[f(j,{get when(){return g()},get children(){return f(on,{class:"mr-1 h-4 w-4 animate-spin"})}}),J(()=>J(()=>!!g())()?_("git.historyLoadingMore"):_("git.historyLoadMore"))]}})}}),null),x(K,f(j,{get when(){return S()},children:H=>f(fv,{get path(){return H()},get patch(){return se()?.patch??""},get binary(){return se()?.binary??!1},get truncated(){return se()?.truncated??!1},get loading(){return se.loading},get error(){return J(()=>!!se.error)()?se.error.message:null},onClose:()=>k(null)})}),null),K})()},Lo=e=>(()=>{var t=jN();return x(t,f(j,{get when(){return e.loading},get children(){return f(on,{class:"h-4 w-4 animate-spin"})}}),null),x(t,()=>e.text,null),$e(()=>kt(t,`flex items-center justify-center gap-2 px-4 py-8 text-sm ${e.tone==="error"?"text-destructive":"text-muted-foreground"}`)),t})();Gt(["click"]);const HN=cs,GN=e=>{const[t,n]=de(e,["class"]);return f(cs.List,G({get class(){return ct("inline-flex h-9 items-center rounded-lg bg-muted p-1 text-muted-foreground",t.class)}},n))},dp=e=>{const[t,n]=de(e,["class"]);return f(cs.Trigger,G({get class(){return ct("inline-flex h-7 items-center justify-center rounded-md px-3 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[selected]:bg-background data-[selected]:text-foreground data-[selected]:shadow-sm",t.class)}},n))},fp=e=>{const[t,n]=de(e,["class"]);return f(cs.Content,G({get class(){return ct("focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring",t.class)}},n))};var VN=$('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex items-start justify-between gap-2"><div class="flex shrink-0 items-center gap-2 text-muted-foreground">');const WN=()=>{const e=_o();return es(),(()=>{var t=VN(),n=t.firstChild,r=n.firstChild;return x(n,f(gs,{get items(){return[{label:_("breadcrumb.specList"),href:Bt("")},{label:_("git.title")}]}}),r),x(r,f(fs,{})),x(t,f(HN,{defaultValue:"status",class:"flex min-h-0 flex-1 flex-col gap-2",get children(){return[f(fp,{value:"status",forceMount:!0,class:"hidden min-h-0 flex-1 data-[selected]:flex",get children(){return f(hv,{projectId:e})}}),f(fp,{value:"history",class:"flex min-h-0 flex-1",get children(){return f(qN,{projectId:e})}}),f(GN,{class:"self-start",get children(){return[f(dp,{value:"status",get children(){return _("git.statusTab")}}),f(dp,{value:"history",get children(){return _("git.historyTab")}})]}})]}}),null),t})()};function gp(){return{text:"",nextOffset:0,truncated:!1}}function YN(e){return{text:e.text,nextOffset:e.offset+Nc(e.text),truncated:e.truncated}}function ZN(e,t){return t.offset===e.nextOffset?{state:{text:e.text+t.chunk,nextOffset:e.nextOffset+Nc(t.chunk),truncated:e.truncated},needsRefetch:!1}:t.offset+Nc(t.chunk)<=e.nextOffset?{state:e,needsRefetch:!1}:{state:e,needsRefetch:!0}}function hp(e,t){return e.text.length<=t?e:{text:e.text.slice(e.text.length-t),nextOffset:e.nextOffset,truncated:!0}}function Nc(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e).length:e.length}const XN=80,pp=4e5;function JN(e){const[t,{mutate:n}]=en(()=>[e.projectId(),e.runId()],async([b,w])=>b&&w?pe.getCommandRun(b,w):null),[r,o]=T(gp()),[i,s]=T(null),[a,u]=T(!1),[l,c]=T(Date.now());let d=null,g=null,h=!1;const p=setInterval(()=>c(Date.now()),1e3);ue(()=>clearInterval(p)),ue(()=>{g!==null&&window.clearTimeout(g)});function m(b){d=hp(b,pp),g===null&&(g=window.setTimeout(()=>{g=null,d&&(o(d),d=null,e.onFlush?.())},XN))}async function y(){const b=e.projectId(),w=e.runId();if(!(!b||!w||h)){h=!0;try{const E=await pe.readCommandOutput(b,w),C=hp(YN(E),pp);d=null,o(C),s(null),e.onReset?.()}catch(E){s(E.message)}finally{h=!1}}}re(()=>{const b=e.projectId(),w=e.runId();if(!b||!w)return;o(gp()),y();const E=YE(b,w,{onOutput:C=>{const A=d??r(),I=ZN(A,C);I.needsRefetch?y():m(I.state)},onRun:C=>n(C),onError:C=>s(C)});ue(E)});async function v(){const b=e.projectId(),w=t();if(!b||!w)return{ok:!1};u(!0);try{const E=await pe.stopCommandRun(b,w.runId);return n(E.run),{ok:!0}}catch(E){return{ok:!1,error:E.message}}finally{u(!1)}}return{run:t,text:()=>r().text,truncated:()=>r().truncated,loadError:i,stopping:a,now:l,reload:y,stop:v}}var QN=$('<section class="flex h-full min-h-0 flex-col overflow-hidden p-2"><header class="flex items-center gap-3"><h1 class="m-0 text-xl">'),eM=$("<p class=text-muted-foreground>"),tM=$('<span class="text-xs text-muted-foreground">: '),nM=$('<div class="mt-2 flex flex-wrap items-center gap-3 rounded-lg border bg-card px-3 py-2"><span class=font-medium></span><code class="font-mono text-xs text-muted-foreground"></code><span class="text-xs text-muted-foreground">: </span><code class="ml-auto font-mono text-xs text-muted-foreground">: '),rM=$('<p class="m-0 mt-2 text-xs text-muted-foreground">'),oM=$('<p class="m-0 mt-2 text-xs text-destructive">'),iM=$('<pre class="mt-2 min-h-0 flex-1 overflow-auto rounded-lg border bg-background p-3 font-mono text-[12px] leading-snug">');const sM=96,aM=()=>{const e=Qi(),t=_o();let n,r=!0;const o=JN({projectId:()=>t()||void 0,runId:()=>e.runId,onFlush:()=>{r&&n&&(n.scrollTop=n.scrollHeight)},onReset:()=>{n&&(n.scrollTop=n.scrollHeight)}}),{run:i,loadError:s,stopping:a,now:u}=o;function l(){n&&(r=n.scrollHeight-n.scrollTop-n.clientHeight<=sM)}async function c(){const d=await o.stop();d.error&&Xt.error(d.error)}return(()=>{var d=QN(),g=d.firstChild,h=g.firstChild;return x(g,f(we,{as:Kn,get href(){return Bt("")},variant:"ghost",size:"sm",get children(){return[f(S_,{class:"mr-1 h-4 w-4"}),J(()=>_("commands.back"))]}}),h),x(h,()=>_("commands.detailTitle")),x(d,f(j,{get when(){return i()},get fallback(){return(()=>{var p=eM();return x(p,()=>s()??_("common.loading")),p})()},children:p=>[(()=>{var m=nM(),y=m.firstChild,v=y.nextSibling,b=v.nextSibling,w=b.firstChild,E=b.nextSibling,C=E.firstChild;return x(m,f(j,{get when(){return p().status==="running"},get children(){return f(we,{variant:"destructive",size:"sm",get disabled(){return a()},onClick:()=>void c(),get children(){return[f(i0,{class:"mr-1 h-3.5 w-3.5"}),J(()=>J(()=>!!a())()?_("commands.stopping"):_("commands.stop"))]}})}}),y),x(m,f(my,{get status(){return p().status}}),y),x(y,()=>p().name),x(v,()=>p().cli),x(b,()=>_("commands.duration"),w),x(b,()=>yy(p().startedAt,p().endedAt,u()),null),x(m,f(j,{get when(){return p().status!=="running"},get children(){var A=tM(),I=A.firstChild;return x(A,()=>_("commands.exitCode"),I),x(A,()=>p().exitCode??p().signal??"—",null),A}}),E),x(E,()=>_("commands.logFile"),C),x(E,()=>p().logFile,null),m})(),f(j,{get when(){return o.truncated()},get children(){var m=rM();return x(m,()=>_("commands.outputTruncated")),m}}),f(j,{get when(){return s()},get children(){var m=oM();return x(m,s),m}}),(()=>{var m=iM();m.addEventListener("scroll",l);var y=n;return typeof y=="function"?Hn(y,m):n=m,x(m,()=>o.text()||_("commands.outputEmpty")),m})()]}),null),d})()};function uM(e,t){if(!e)return[];if(t==="\\"){const n=/^\\\\([^\\]+)\\([^\\]+)(.*)$/.exec(e);if(n){const o=`\\\\${n[1]}\\${n[2]}`;return[{label:o,path:o},...Sl(o,n[3]??"",t)]}const r=/^([A-Za-z]:)\\?(.*)$/.exec(e);if(r){const o=r[1];return[{label:o,path:`${o}\\`},...Sl(`${o}\\`,r[2]??"",t)]}return[]}return[{label:t,path:t},...Sl(t,e.slice(1),t)]}function yv(e,t,n){return e?e.endsWith(n)?`${e}${t}`:`${e}${n}${t}`:t}function mp(e){const t=e.trim();return!(!t||t==="."||t===".."||t.includes("/")||t.includes("\\"))}function Sl(e,t,n){const r=t.split(n).filter(Boolean),o=[];let i=e;for(const s of r)i=yv(i,s,n),o.push({label:s,path:i});return o}var lM=$('<div class="flex items-center gap-1.5">'),cM=$('<button type=button class="inline-flex items-center gap-1 rounded px-1 py-0.5 hover:bg-accent hover:text-accent-foreground">'),dM=$('<div class="flex items-center gap-2">'),fM=$('<button type=button class="flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm hover:bg-accent hover:text-accent-foreground">'),gM=$('<p class="m-0 px-3 py-1.5 text-sm text-muted-foreground">'),hM=$('<p class="m-0 text-sm text-destructive break-all">'),pM=$('<div class="grid gap-3"><div class="flex items-center gap-1"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1 text-sm text-muted-foreground"><button type=button class="inline-flex items-center gap-1 rounded px-1 py-0.5 hover:bg-accent hover:text-accent-foreground"></button></div></div><div class="h-64 overflow-y-auto rounded border">'),mM=$('<div class="grid gap-4"><p class="m-0 font-medium"></p><p class="m-0 text-sm text-muted-foreground break-all">'),bM=$('<button type=button class="rounded px-1 py-0.5 hover:bg-accent hover:text-accent-foreground">'),bp=$('<p class="m-0 p-3 text-sm text-muted-foreground">'),yM=$('<button type=button class="flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm hover:bg-accent hover:text-accent-foreground"><span class=truncate>');const vv=e=>{const[t,n]=T(null),[r,o]=T(!1),[i,s]=T(null),[a,u]=T(!1),[l,c]=T(!1),[d,g]=T(null),[h,p]=T(!1),[m,y]=T(""),[v,b]=T(!1),w=()=>{const k=t();return!k||k.path===""?null:k.path},E=()=>t()?.sep==="\\";async function C(k){o(!0),s(null);try{const P=await pe.listDirs(k,a());n(P)}catch(P){s(P.message)}finally{o(!1)}}re(pt(()=>e.open,k=>{k?(g(null),s(null),A(),C()):(n(null),A())}));function A(){p(!1),y("")}async function I(){const k=w(),P=m().trim();if(!k||!mp(P)){s(_("addProject.invalidName"));return}b(!0),s(null);try{const R=await pe.createDir(k,P);A(),await C(R.path)}catch(R){s(R.message)}finally{b(!1)}}async function S(k){const P=w();if(P){c(!0),s(null);try{const R=await pe.addProject(P,k?{gitInit:!0}:void 0);if(!R.ok){g(R.path);return}g(null),e.onOpenChange(!1),e.onAdded?.(R.project.id)}catch(R){s(_("addProject.failed",{message:R.message}))}finally{c(!1)}}}return f(cn,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return f(cr,{class:"max-w-xl",onOpenAutoFocus:k=>{k.preventDefault();const P=k.currentTarget;P instanceof HTMLElement&&P.focus()},get children(){return[f(fr,{get children(){var k=lM();return x(k,f(dr,{get children(){return _("addProject.title")}}),null),x(k,f(Ad,{openDelay:150,closeDelay:0,get children(){return[f(kd,{as:we,type:"button",variant:"ghost",size:"icon",class:"h-6 w-6 text-muted-foreground",get"aria-label"(){return _("addProject.help")},get children(){return f(Z_,{class:"h-4 w-4"})}}),f(Td,{get children(){return _("addProject.helpTooltip")}})]}}),null),k}}),f(j,{get when(){return!d()},get fallback(){return(()=>{var k=mM(),P=k.firstChild,R=P.nextSibling;return x(P,()=>_("addProject.gitInitTitle")),x(R,()=>_("addProject.gitInitDesc",{path:d()??""})),x(k,f(Or,{get children(){return[f(we,{type:"button",variant:"outline",get disabled(){return l()},onClick:()=>g(null),get children(){return _("common.cancel")}}),f(we,{type:"button",get disabled(){return l()},onClick:()=>void S(!0),get children(){return J(()=>!!l())()?_("common.submitting"):_("addProject.gitInitConfirm")}})]}}),null),k})()},get children(){var k=pM(),P=k.firstChild,R=P.firstChild,L=R.firstChild,F=P.nextSibling;return L.$$click=()=>void C(t()?.home),x(L,f(y2,{class:"h-3.5 w-3.5"})),x(R,f(j,{get when(){return E()},get children(){var D=cM();return D.$$click=()=>void C(""),x(D,f(r0,{class:"h-3.5 w-3.5"})),$e(B=>{var N=_("addProject.driveRoot"),X=_("addProject.driveRoot");return N!==B.e&&Ke(D,"aria-label",B.e=N),X!==B.t&&Ke(D,"title",B.t=X),B},{e:void 0,t:void 0}),D}}),null),x(R,f(at,{get each(){return uM(t()?.path??"",t()?.sep??"/")},children:D=>[f(Ta,{class:"h-3 w-3 shrink-0 opacity-50"}),(()=>{var B=bM();return B.$$click=()=>void C(D.path),x(B,()=>D.label),B})()]}),null),x(P,f(we,{type:"button",variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get"aria-label"(){return _("addProject.newFolder")},get title(){return _("addProject.newFolder")},get disabled(){return!w()||r()||l()},onClick:()=>{s(null),p(!0)},get children(){return f(u2,{class:"h-4 w-4"})}}),null),x(k,f(j,{get when(){return h()},get children(){var D=dM();return x(D,f($n,{id:"add-project-new-folder",class:"h-8",autofocus:!0,get value(){return m()},get placeholder(){return _("addProject.newFolderPlaceholder")},get disabled(){return v()},onInput:B=>y(B.currentTarget.value),onKeyDown:B=>{B.key==="Enter"?(B.preventDefault(),I()):B.key==="Escape"&&(B.preventDefault(),A())}}),null),x(D,f(we,{type:"button",size:"sm",class:"shrink-0",get disabled(){return v()||!mp(m())},onClick:()=>void I(),get children(){return _("addProject.newFolderConfirm")}}),null),x(D,f(we,{type:"button",size:"sm",variant:"outline",class:"shrink-0",get disabled(){return v()},onClick:A,get children(){return _("common.cancel")}}),null),D}}),F),x(F,f(j,{get when(){return!r()},get fallback(){return(()=>{var D=bp();return x(D,()=>_("addProject.loading")),D})()},get children(){return[f(j,{get when(){return J(()=>t()?.parent!==null)()&&t()?.parent!==void 0},get children(){var D=fM();return D.$$click=()=>void C(t().parent),x(D,f(n2,{class:"h-4 w-4 shrink-0 opacity-70"}),null),x(D,()=>_("addProject.parent"),null),D}}),f(at,{get each(){return t()?.entries??[]},get fallback(){return f(j,{get when(){return J(()=>!!t())()&&t().entries.length===0},get children(){var D=bp();return x(D,()=>_("addProject.empty")),D}})},children:D=>(()=>{var B=yM(),N=B.firstChild;return B.$$click=()=>void C(yv(t().path,D.name,t().sep)),x(B,f(d2,{class:"h-4 w-4 shrink-0 opacity-70"}),N),x(N,()=>D.name),B})()}),f(j,{get when(){return t()?.truncated},get children(){var D=gM();return x(D,()=>_("addProject.truncated")),D}})]}})),x(k,f(ti,{class:"flex items-center gap-2",get checked(){return a()},onChange:D=>{u(D),C(t()?.path)},get children(){return[f(ni,{}),f(Gi,{class:"text-sm",get children(){return _("addProject.showHidden")}})]}}),null),x(k,f(j,{get when(){return i()},get children(){var D=hM();return x(D,i),D}}),null),x(k,f(Or,{get children(){return[f(we,{type:"button",variant:"outline",get disabled(){return l()},onClick:()=>e.onOpenChange(!1),get children(){return _("common.cancel")}}),f(we,{type:"button",get disabled(){return l()||r()||!w()},onClick:()=>void S(!1),get children(){return J(()=>!!l())()?_("common.submitting"):_("addProject.choose")}})]}}),null),$e(D=>{var B=_("addProject.home"),N=_("addProject.home"),X=!t();return B!==D.e&&Ke(L,"aria-label",D.e=B),N!==D.t&&Ke(L,"title",D.t=N),X!==D.a&&(L.disabled=D.a=X),D},{e:void 0,t:void 0,a:void 0}),k}})]}})}})};Gt(["click"]);var vM=$('<section class=p-8><header class=mb-4><h1 class="text-2xl font-bold"></h1></header><p class=text-muted-foreground>');const wv=()=>{const e=Qr(),[t,n]=T(!1);return(()=>{var r=vM(),o=r.firstChild,i=o.firstChild,s=o.nextSibling;return x(i,()=>_("welcome.title")),x(s,()=>_("welcome.description")),x(r,f(we,{class:"mt-4 gap-1",onClick:()=>n(!0),get children(){return[f(Wr,{class:"h-4 w-4"}),J(()=>_("addProject.trigger"))]}}),null),x(r,f(vv,{get open(){return t()},onOpenChange:n,onAdded:a=>e(Bt("",a))}),null),r})()};var wM=$('<p class="p-8 text-muted-foreground">');const xM=()=>{const[e]=en(()=>pe.listProjects());return f(j,{get when(){return!e.loading},get fallback(){return(()=>{var t=wM();return x(t,()=>_("common.loading")),t})()},get children(){return f(j,{get when(){return(e()??[]).length>0},get fallback(){return f(wv,{})},get children(){return(()=>{const n=(e()??[])[0];return n?f(sx,{get href(){return`/${encodeURIComponent(n.id)}`}}):null})()}})}})},yp="data-vt";function _M(){return typeof document<"u"&&typeof document.startViewTransition=="function"}function EM(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function vp(e){return e.split("/").filter(Boolean).length}function CM(e,t){const n=vp(e),r=vp(t);return r>n?"forward":r<n?"back":"lateral"}function xv(e){const t=typeof window>"u"?"http://localhost":window.location.origin;try{return new URL(e,t).pathname}catch{return e}}function wp(e,t=600){return e()?Promise.resolve():new Promise(n=>{let r=!1,o;const i=setTimeout(s,t);function s(){r||(r=!0,clearTimeout(i),o?.(),n())}Pn(a=>{o=a,re(()=>{e()&&s()})})})}let Bs=null;function SM(e,t){const n=document.documentElement;Bs?.skipTransition(),n.setAttribute(yp,e);const r=document.startViewTransition(async()=>{await t()});Bs=r,r.finished.catch(()=>{}).finally(()=>{Bs===r&&(Bs=null,n.removeAttribute(yp))})}function kM(e,t){return e.defaultPrevented||e.enabled===!1||e.replace||typeof e.to=="string"&&xv(e.to)===e.fromPathname?null:t(e.fromPathname,e.to)}function AM(e){const t=ai(),n=Uw();Kw(r=>{const o=t.pathname,i=kM({fromPathname:o,to:r.to,replace:r.options?.replace,defaultPrevented:r.defaultPrevented,enabled:_M()&&!EM()},e.resolveDirection);if(!i)return;const s=typeof r.to=="number";r.preventDefault();const a=s?TM():void 0;SM(i,async()=>{a&&await a,r.retry(!0),s&&await wp(()=>t.pathname!==o),await wp(()=>!n())})})}function TM(e=600){return new Promise(t=>{let n=!1;function r(){n||(n=!0,clearTimeout(o),window.removeEventListener("popstate",r),t())}const o=setTimeout(r,e);window.addEventListener("popstate",r,{once:!0})})}function _v(){let e=Promise.resolve(),t=0;return{enqueue(n){const r=++t,o=e.then(n.task);return e=o.then(()=>{},()=>{}),o.then(i=>{r===t&&n.onLatestSuccess?.(i)},i=>{r===t&&n.onLatestError?.(i)})},whenIdle(){return e}}}var IM=$('<svg><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m8 9l4-4l4 4m0 6l-4 4l-4-4"></svg>',!1,!0,!1),DM=$('<svg xmlns=http://www.w3.org/2000/svg class="h-4 w-4"viewBox="0 0 24 24"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checked');const RM=un,OM=un.Value;un.Description;un.ErrorMessage;un.ItemDescription;un.HiddenSelect;un.Section;const NM=e=>{const[t,n]=de(e,["class","children"]);return f(un.Trigger,G({get class(){return ct("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 shadow-sm ring-offset-background transition-shadow placeholder:text-muted-foreground focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n,{get children(){return[J(()=>t.children),f(un.Icon,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"flex size-4 shrink-0 items-center justify-center opacity-50",get children(){return IM()}})]}}))},MM=e=>{const[t,n]=de(e,["class","children"]);return f(un.Portal,{get children(){return f(un.Content,G({"data-kb-top-layer":"",get class(){return ct("relative z-[60] min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n,{get children(){return[J(()=>t.children),f(un.Listbox,{class:"p-1 focus-visible:outline-none"})]}}))}})},PM=e=>{const[t,n]=de(e,["class","children"]);return f(un.Item,G({get class(){return ct("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}},n,{get children(){return[f(un.ItemIndicator,{class:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",get children(){return DM()}}),f(un.ItemLabel,{get children(){return t.children}})]}}))};var $M=$('<span class="min-w-0 flex-1 truncate text-left">'),LM=$('<div class="border-b p-1">'),FM=$('<p class="m-0 px-2 py-3 text-center text-sm text-muted-foreground">'),BM=$('<div class="max-h-64 overflow-y-auto p-1">'),zM=$('<div class="flex flex-col gap-1.5 font-medium"><span>'),UM=$('<button type=button class="flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm hover:bg-accent focus-visible:bg-accent focus-visible:outline-none"><span class="min-w-0 flex-1 truncate">');const Yo=e=>{const[t,n]=T(!1),[r,o]=T(""),i=ne(()=>e.options.find(l=>l.value===e.value)??null),s=ne(()=>e.options.find(l=>l.value==="")?.label),a=ne(()=>{const l=r().trim().toLocaleLowerCase();return l?e.options.filter(c=>c.value===""||c.label.toLocaleLowerCase().includes(l)||c.value.toLocaleLowerCase().includes(l)):e.options}),u=l=>{e.onChange(l),n(!1)};return(()=>{var l=zM(),c=l.firstChild;return x(c,()=>e.label),x(l,f(j,{get when(){return e.searchable},get fallback(){return f(RM,{get options(){return[...e.options]},optionValue:"value",optionTextValue:"label",get value(){return i()},get placeholder(){return s()},get disabled(){return e.disabled},allowDuplicateSelectionEvents:!1,onChange:d=>{d&&queueMicrotask(()=>e.onChange(d.value))},itemComponent:d=>f(PM,{get item(){return d.item},get children(){return d.item.rawValue.label}}),get"aria-label"(){return e.label},get children(){return[f(NM,{class:"min-w-0",get children(){return f(OM,{class:"min-w-0 flex-1 truncate text-left",children:d=>d.selectedOption().label})}}),f(MM,{})]}})},get children(){return f(Qo,{get open(){return t()},onOpenChange:d=>{n(d),d||o("")},placement:"bottom-start",get children(){return[f(Jo,{as:we,type:"button",variant:"outline",class:"min-w-0 justify-between gap-2 px-3 font-normal",get disabled(){return e.disabled},get"aria-label"(){return e.label},get children(){return[(()=>{var d=$M();return x(d,()=>i()?.label??s()??e.value),d})(),f(q_,{class:"size-4 shrink-0 opacity-50"})]}}),f(ei,{class:"w-80 max-w-[calc(100vw-2rem)] p-0",hideCloseButton:!0,get children(){return[(()=>{var d=LM();return x(d,f($n,{get value(){return r()},onInput:g=>o(g.currentTarget.value),get placeholder(){return e.filterPlaceholder},class:"h-8"})),d})(),(()=>{var d=BM();return x(d,f(at,{get each(){return a()},children:g=>(()=>{var h=UM(),p=h.firstChild;return h.$$click=()=>u(g.value),x(p,()=>g.label),x(h,f(Ei,{get class(){return`size-4 shrink-0 ${g.value===e.value?"opacity-100":"opacity-0"}`}}),null),$e(m=>{var y=g.label,v=g.value===e.value;return y!==m.e&&Ke(h,"title",m.e=y),v!==m.t&&Ke(h,"aria-pressed",m.t=v),m},{e:void 0,t:void 0}),h})()}),null),x(d,f(j,{get when(){return a().length===0},get children(){var g=FM();return x(g,()=>e.emptyText),g}}),null),d})()]}})]}})}}),null),l})()};Gt(["click"]);var KM=$("<span> · "),jM=$('<span class="text-xs font-normal text-muted-foreground">'),qM=$('<span class="text-sm text-muted-foreground">'),HM=$('<div class="flex flex-col gap-4"><fieldset class="m-0 grid gap-3 border-0 p-0 sm:grid-cols-3"></fieldset><label class="flex flex-col gap-1 font-medium"><span></span><span class="text-sm text-muted-foreground">'),GM=$('<p class=" text-muted-foreground">'),VM=$('<p class=" text-destructive">');const go=".yorz/specs",WM={claude:"projectConfig.agentClaude",opencode:"projectConfig.agentOpencode",codex:"projectConfig.agentCodex",pi:"projectConfig.agentPi"},YM=e=>{const[t,n]=T("inherit"),[r,o]=T([]),[i,s]=T(""),[a,u]=T(""),[l,c]=T({models:[],defaultReasoningEfforts:[]}),[d,g]=T(!1),[h,p]=T(go),[m,y]=T(go),[v,b]=T(!1),[w,E]=T("idle"),[C,A]=T(!1),[I,S]=T(null);let k=0,P=0,R,L=go;const F=_v();re(()=>{const M=++P;e.open&&(S(null),W(),E("idle"),A(!1),b(!0),(async()=>{try{if(await F.whenIdle(),M!==P||!e.open)return;const[Y,ae]=await Promise.all([pe.getProjectConfig(e.projectId),pe.listAgents(e.projectId).catch(()=>[])]);if(M!==P||!e.open)return;o(ae),D(Y),Y.agent.kind!=="inherit"&&oe(Y.agent.kind)}catch(Y){if(M!==P||!e.open)return;S(Y.message)}finally{M===P&&b(!1)}})())});function D(M){n(M.agent.kind),s(M.agent.model??""),u(M.agent.reasoningEffort??"");const Y=M.specsDir||go;p(Y),y(Y),L=Y}function B(){return t()==="inherit"?{kind:"inherit"}:{kind:t(),...i()?{model:i()}:{},...a()?{reasoningEffort:a()}:{}}}const N=()=>["inherit",...r().map(M=>M.id)];function X(M){if(M==="inherit")return _("projectConfig.inheritGlobal");const Y=r().find(_e=>_e.id===M);if(Y&&Y.source==="external")return Y.displayName;const ae=WM[M];return ae?_(ae):Y?.displayName??M}function se(M){n(M),s(""),u(""),c({models:[],defaultReasoningEfforts:[]}),M!=="inherit"&&oe(M),Z({kind:M},L)}function K(M){s(M),u(""),Z({kind:t(),...M?{model:M}:{}},L)}function U(M){u(M),Z({kind:t(),...i()?{model:i()}:{},...M?{reasoningEffort:M}:{}},L)}async function oe(M){const Y=++k;g(!0);try{const ae=await pe.listAgentModels(e.projectId,M);Y===k&&c(ae)}catch{Y===k&&c({models:[],defaultReasoningEfforts:[]})}finally{Y===k&&g(!1)}}const H=()=>{const M=[{value:"",label:_("projectConfig.agentDefaultOption")},...l().models.map(Y=>({value:Y.id,label:Y.displayName}))];return i()&&!M.some(Y=>Y.value===i())&&M.push({value:i(),label:i()}),M},z=()=>{const M=i()?l().models.find(ae=>ae.id===i())?.reasoningEfforts??[]:l().defaultReasoningEfforts,Y=[{value:"",label:_("projectConfig.agentDefaultOption")},...M.map(ae=>({value:ae.id,label:ae.displayName}))];return a()&&!Y.some(ae=>ae.value===a())&&Y.push({value:a(),label:a()}),Y};async function Z(M,Y){S(null),A(!1),W(),E("saving"),await F.enqueue({task:()=>pe.updateProjectConfig(e.projectId,{agent:M,specsDir:Y}),onLatestSuccess:ae=>{const _e=ae.config.specsDir!==m();y(ae.config.specsDir),L=ae.config.specsDir,(h().trim()||go)===Y&&p(ae.config.specsDir),A(_e),E("saved"),R=setTimeout(()=>E("idle"),2e3)},onLatestError:ae=>{L===Y&&(L=m()),E("idle"),S(ae.message)}})}function te(){const M=h().trim()||go;if(M.split(/[\\/]/).some(Y=>Y==="..")){S(_("projectConfig.invalidPath"));return}p(M),M!==L&&(L=M,Z(B(),M))}function he(){te(),e.onClose()}function W(){R&&(clearTimeout(R),R=void 0)}return ue(W),f(cn,{get open(){return e.open},onOpenChange:M=>!M&&he(),get children(){return f(cr,{class:"max-w-[480px]",get children(){return[f(fr,{get children(){return f(dr,{class:"flex items-baseline gap-2",get children(){return[(()=>{var M=KM(),Y=M.firstChild;return x(M,()=>_("projectConfig.title"),Y),x(M,()=>e.projectName,null),M})(),f(j,{get when(){return w()!=="idle"},get children(){var M=jM();return x(M,(()=>{var Y=J(()=>w()==="saving");return()=>Y()?_("globalConfig.saveStatusSaving"):_("globalConfig.saveStatusSaved")})()),M}})]}})}}),f(j,{get when(){return!v()},get fallback(){return(()=>{var M=GM();return x(M,()=>_("common.loading")),M})()},get children(){var M=HM(),Y=M.firstChild,ae=Y.nextSibling,_e=ae.firstChild,fe=_e.nextSibling;return x(Y,f(Yo,{get label(){return _("projectConfig.agent")},get value(){return t()},get options(){return N().map(xe=>({value:xe,label:X(xe)}))},onChange:se}),null),x(Y,f(Yo,{get label(){return _("projectConfig.model")},get value(){return i()},get options(){return H()},get searchable(){return l().models.length>10},get filterPlaceholder(){return _("common.filterOptions")},get emptyText(){return _("common.noMatchingOptions")},get disabled(){return t()==="inherit"||d()||H().length<=1},onChange:K}),null),x(Y,f(Yo,{get label(){return _("projectConfig.reasoningEffort")},get value(){return a()},get options(){return z()},get disabled(){return t()==="inherit"||d()||z().length<=1},onChange:U}),null),x(_e,()=>_("projectConfig.specsDir")),x(ae,f($n,{type:"text",get value(){return h()},onInput:xe=>p(xe.currentTarget.value),onBlur:te,onKeyDown:xe=>{xe.key==="Enter"&&xe.currentTarget.blur()},placeholder:go}),fe),x(fe,()=>_("projectConfig.specsDirHint")),x(ae,f(j,{get when(){return C()},get children(){var xe=qM();return x(xe,()=>_("projectConfig.oldSpecsHint")),xe}}),null),x(M,(()=>{var xe=J(()=>!!I());return()=>xe()&&(()=>{var Te=VM();return x(Te,I),Te})()})(),null),M}})]}})}})};function xp(e){if(!e.worktree)return e.name;const t=e.worktree.mainPath.split("/").filter(Boolean).pop()??e.worktree.mainPath,n=e.worktree.cleanSlug??e.worktree.branch.replace(/^wt\//,"");return`${t} · ${n}`}function _p(e){return(e[0]??"?").toUpperCase()}function ZM(e){const t=new Set(e.map(s=>s.id)),n=new Map,r=s=>s.worktree&&t.has(s.worktree.mainProjectId)?s.worktree.mainProjectId:s.id;e.forEach((s,a)=>{const u=r(s),l=n.get(u);l?l.push(a):n.set(u,[a])});const o=Array.from(n.entries()).map(([s,a])=>({key:s,idxs:a,freshness:Math.min(...a)}));o.sort((s,a)=>s.freshness-a.freshness||(s.key<a.key?-1:s.key>a.key?1:0));const i=[];for(const s of o){const a=s.idxs.length>=2,u=[...s.idxs].sort((d,g)=>{const h=e[d].id===s.key?0:1,p=e[g].id===s.key?0:1;return h-p||d-g}),l=u.find(d=>e[d].id===s.key)??u[0],c=_p(e[l].name);u.forEach((d,g)=>{i.push({project:e[d],groupId:s.key,grouped:a,indexInGroup:a?g:0,groupSize:s.idxs.length,letter:a?c:_p(e[d].name)})})}return i}var XM=$('<span class=" font-semibold tracking-wide">'),JM=$('<div class="flex items-center gap-1">'),QM=$('<ul class="m-0 flex-1 list-none overflow-y-auto py-1.5">'),eP=$('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),tP=$("<aside data-testid=projects-sidebar><div data-testid=projects-sidebar-panel><header></header><footer>"),nP=$('<p class="px-2.5 py-2 text-muted-foreground">'),rP=$('<span class="flex min-w-0 items-center"><span></span><span class=truncate>'),oP=$('<button type=button class="absolute right-6 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-accent-foreground group-hover:opacity-100">'),iP=$('<button type=button class="absolute right-1.5 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100">'),sP=$('<li class="group relative flex items-center">'),aP=$('<sub class="absolute -bottom-1 -right-2 text-[9px] font-semibold leading-none">'),uP=$('<span class="absolute -right-2 -top-1 size-1.5 animate-pulse rounded-full bg-primary">'),lP=$('<span class="relative inline-block font-semibold">'),cP=$('<button type=button class="flex h-5 w-5 items-center justify-center rounded bg-muted text-muted-foreground hover:text-foreground">'),dP=$('<p class="mt-1 text-sm text-destructive break-words">'),fP=$('<p class="break-all font-semibold">');const Ev="yorz.projectsSidebar.collapsed",Cv="yorz.projectsSidebar.width",gP=300,zd=220,hP=.2,pP=160,mP=640;function bP(){try{return typeof window<"u"&&window.localStorage.getItem(Ev)==="1"}catch{return!1}}function Ep(e){try{typeof window<"u"&&window.localStorage.setItem(Ev,e?"1":"0")}catch{}}function au(e){return Number.isFinite(e)?Math.min(mP,Math.max(pP,Math.round(e))):zd}function kl(){return typeof window>"u"?zd:au(window.innerWidth*hP)}function yP(){try{if(typeof window>"u")return zd;const e=window.localStorage.getItem(Cv);if(!e)return kl();const t=Number(e);return Number.isFinite(t)?au(t):kl()}catch{return kl()}}function vP(e){try{typeof window<"u"&&window.localStorage.setItem(Cv,String(au(e)))}catch{}}const wP=()=>{const[e,t]=T(bP()),[n,r]=T(yP()),[o,{refetch:i}]=en(()=>pe.listProjects()),[s,a]=T(null),[u,l]=T(null),[c,d]=T(null),[g,h]=T(!1),[p,m]=T(!1),[y,v]=T(!1),b=Qr(),w=ai(),E=ne(()=>{const M=w.pathname.match(/^\/([^/]+)/);return M&&M[1]!=="api"?M[1]:""}),C=()=>e()||Rr(),[A,I]=T(!1);let S=null;function k(){S!=null&&(window.clearTimeout(S),S=null)}const P=()=>u()!==null||c()!==null,R=()=>C()&&(A()||P()),L=()=>C()&&!R();function F(){!C()||A()||(k(),S=window.setTimeout(()=>{S=null,C()&&I(!0)},gP))}function D(){k(),I(!1)}function B(){k()}ue(k);function N(){k(),I(!1),Rr()&&ua(),t(!1),Ep(!1)}function X(){if(Rr()){ua();return}const M=!e();t(M),Ep(M)}let se=null,K=null,U=null;An(()=>{const M=d0(()=>{i()});ue(M)});let oe=0;re(()=>{const M=ME();if(M===0||M===oe)return;if(vt(u)){oe=M,l(null);return}const Y=vt(E),ae=(o()??[]).find(_e=>_e.id===Y);ae&&(oe=M,l(ae))});function H(M){C()||(M.preventDefault(),se={startX:M.clientX,startW:n(),raf:null},document.body.classList.add("is-resizing"),K=Y=>{if(!se)return;const ae=Y.clientX-se.startX,_e=au(se.startW+ae);se.raf==null&&(se.raf=requestAnimationFrame(()=>{se&&(se.raf=null,r(_e))}))},U=()=>{se?.raf!=null&&cancelAnimationFrame(se.raf),se=null,document.body.classList.remove("is-resizing"),K&&document.removeEventListener("mousemove",K),U&&document.removeEventListener("mouseup",U),K=null,U=null,vP(n())},document.addEventListener("mousemove",K),document.addEventListener("mouseup",U))}ue(()=>{K&&document.removeEventListener("mousemove",K),U&&document.removeEventListener("mouseup",U),document.body.classList.remove("is-resizing")});function z(M,Y){Y.preventDefault(),Y.stopPropagation(),l(M)}function Z(M,Y){Y.preventDefault(),Y.stopPropagation(),h(!1),d(M)}async function te(){const M=c();if(M){m(!0);try{g()&&M.worktree?await pe.removeProjectWithFiles(M.id):await pe.removeProject(M.id),await i(),E()===M.id&&b("/"),d(null)}catch(Y){const ae=Y.message;ae.includes("409")?(Xt.error(_("sidebar.uncommittedChanges")),d(null)):(a(ae),Xt.error(ae))}finally{m(!1)}}}const he=()=>C()?void 0:{width:`${n()}px`},W=()=>L()?void 0:{width:`${n()}px`};return(()=>{var M=tP(),Y=M.firstChild,ae=Y.firstChild,_e=ae.nextSibling;return M.addEventListener("mouseleave",D),M.addEventListener("mouseenter",F),x(ae,f(j,{get when(){return!L()},get fallback(){return f(we,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:X,onMouseEnter:B,onMouseLeave:F,get title(){return _("sidebar.expand")},get children(){return f(fc,{class:"h-4 w-4"})}})},get children(){return[(()=>{var fe=XM();return x(fe,()=>_("sidebar.title")),fe})(),(()=>{var fe=JM();return x(fe,f(we,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",get onClick(){return R()?N:X},get title(){return J(()=>!!R())()?_("sidebar.pin"):_("sidebar.collapse")},get children(){return f(j,{get when(){return R()},get fallback(){return f(t0,{class:"h-4 w-4"})},get children(){return f(fc,{class:"h-4 w-4"})}})}})),fe})()]}})),x(Y,f(j,{get when(){return o()!==void 0},get fallback(){return(()=>{var fe=nP();return x(fe,()=>_("common.loading")),fe})()},get children(){var fe=QM();return x(fe,f(at,{get each(){return ZM(o()??[])},children:xe=>{const Te=xe.project,bt=()=>E()===Te.id;return(()=>{var q=sP();return x(q,f(Kn,{get href(){return`/${encodeURIComponent(Te.id)}`},get class(){return`flex-1 truncate py-1.5 no-underline ${bt()?"bg-primary-soft text-foreground font-semibold":"hover:bg-accent"} ${L()?"px-0 text-center":"pl-2.5 pr-12"}`},get title(){return J(()=>!!Te.worktree)()?`${Te.path}
33
+ worktree of ${Te.worktree.mainPath}`:Te.path},get children(){return f(j,{get when(){return!L()},get fallback(){return(()=>{var V=lP();return x(V,()=>xe.letter,null),x(V,f(j,{get when(){return xe.grouped},get children(){var ce=aP();return x(ce,()=>xe.indexInGroup),ce}}),null),x(V,f(j,{get when(){return Te.running},get children(){var ce=uP();return $e(()=>Ke(ce,"aria-label",_("sidebar.projectRunning",{name:Te.name}))),ce}}),null),V})()},get children(){var V=rP(),ce=V.firstChild,Ae=ce.nextSibling;return x(Ae,()=>xp(Te)),$e(Le=>{var qe=ct("mr-1.5 size-2 shrink-0 rounded-full",Te.running?"animate-pulse bg-primary":"bg-transparent"),ut=Te.running?_("sidebar.projectRunning",{name:Te.name}):void 0;return qe!==Le.e&&kt(ce,Le.e=qe),ut!==Le.t&&Ke(ce,"aria-label",Le.t=ut),Le},{e:void 0,t:void 0}),V}})}}),null),x(q,f(j,{get when(){return!L()},get children(){return[(()=>{var V=oP();return V.$$click=ce=>z(Te,ce),x(V,f(o0,{class:"h-3.5 w-3.5"})),$e(ce=>{var Ae=_("sidebar.configure",{name:Te.name}),Le=_("sidebar.projectConfig");return Ae!==ce.e&&Ke(V,"aria-label",ce.e=Ae),Le!==ce.t&&Ke(V,"title",ce.t=Le),ce},{e:void 0,t:void 0}),V})(),(()=>{var V=iP();return V.$$click=ce=>void Z(Te,ce),x(V,f(eo,{class:"h-3.5 w-3.5"})),$e(ce=>{var Ae=_("sidebar.removeProject",{name:Te.name}),Le=_("sidebar.deleteProject");return Ae!==ce.e&&Ke(V,"aria-label",ce.e=Ae),Le!==ce.t&&Ke(V,"title",ce.t=Le),ce},{e:void 0,t:void 0}),V})()]}}),null),q})()}})),fe}}),_e),x(_e,f(j,{get when(){return!L()},get fallback(){return(()=>{var fe=cP();return fe.$$click=()=>v(!0),x(fe,f(Wr,{class:"h-3.5 w-3.5"})),$e(xe=>{var Te=_("addProject.trigger"),bt=_("addProject.trigger");return Te!==xe.e&&Ke(fe,"title",xe.e=Te),bt!==xe.t&&Ke(fe,"aria-label",xe.t=bt),xe},{e:void 0,t:void 0}),fe})()},get children(){return f(we,{variant:"outline",size:"sm",class:"w-full justify-start gap-1",onClick:()=>v(!0),get children(){return[f(Wr,{class:"h-3.5 w-3.5"}),J(()=>_("addProject.trigger"))]}})}}),null),x(_e,(()=>{var fe=J(()=>!!s());return()=>fe()&&(()=>{var xe=dP();return x(xe,s),$e(()=>Ke(xe,"title",s())),xe})()})(),null),x(Y,f(j,{get when(){return!C()},get children(){var fe=eP();return fe.$$mousedown=H,$e(()=>Ke(fe,"aria-label",_("sidebar.resizeHint"))),fe}}),null),x(M,f(vv,{get open(){return y()},onOpenChange:v,onAdded:fe=>b(Bt("",fe))}),null),x(M,f(j,{get when(){return u()},children:fe=>f(YM,{open:!0,get projectId(){return fe().id},get projectName(){return fe().name},onClose:()=>l(null)})}),null),x(M,f(cn,{get open(){return c()!==null},onOpenChange:fe=>!fe&&!p()&&d(null),get children(){return f(cr,{class:"max-w-sm",get children(){return[f(fr,{get children(){return[f(dr,{get children(){return _("sidebar.deleteProject")}}),f(eu,{get children(){return _("sidebar.deleteDesc")}})]}}),f(j,{get when(){return c()},children:fe=>[(()=>{var xe=fP();return x(xe,()=>xp(fe())),xe})(),f(j,{get when(){return fe().worktree},get children(){return f(ti,{get checked(){return g()},onChange:xe=>h(xe),class:"flex items-center gap-2 text-destructive",get children(){return[f(ni,{}),f(Gi,{get children(){return _("sidebar.deleteFiles")}})]}})}})]}),f(Or,{get children(){return[f(we,{variant:"outline",onClick:()=>d(null),get disabled(){return p()},get children(){return _("common.cancel")}}),f(we,{variant:"destructive",onClick:()=>void te(),get disabled(){return p()},get children(){return J(()=>!!p())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),$e(fe=>{var xe=`relative shrink-0 ${C()?"w-9 transition-[width] duration-150":""}`,Te=he(),bt=R()?"1":void 0,q=`flex flex-col border-r bg-background ${R()?"absolute left-0 top-0 z-40 h-full shadow-xl animate-in fade-in-0 slide-in-from-left-2 duration-150":"h-full w-full"}`,V=W(),ce=`flex items-center border-b ${L()?"justify-center py-2":"justify-between px-2.5 py-2"}`,Ae=`border-t ${L()?"flex justify-center py-2":"p-2"}`;return xe!==fe.e&&kt(M,fe.e=xe),fe.t=Zo(M,Te,fe.t),bt!==fe.a&&Ke(Y,"data-peek",fe.a=bt),q!==fe.o&&kt(Y,fe.o=q),fe.i=Zo(Y,V,fe.i),ce!==fe.n&&kt(ae,fe.n=ce),Ae!==fe.s&&kt(_e,fe.s=Ae),fe},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),M})()};Gt(["mousedown","click"]);const xP=2;function _P(e,t){if(!e)return t.t("chat.usageResetUnknown");const n=new Date(e);return Number.isFinite(n.getTime())?t.formatTime(n):t.t("chat.usageResetUnknown")}function EP(e,t){if(typeof e.utilization!="number")return t.t("chat.usageWindowUnknown",{label:e.label});const n=Math.min(100,Math.max(0,Math.round(e.utilization)));return t.t("chat.usageWindow",{label:e.label,remaining:Math.max(0,100-n),used:n,reset:_P(e.resetsAt,t)})}function CP(e,t,n){if(t)return n.t("chat.usageLoading");if(!e)return"";if(e.status==="error")return n.t("chat.usageError",{kind:e.kind});if(e.status==="unavailable")return"";const r=e.windows??[];return r.length===0?n.t("chat.usageAvailableNoDetails",{kind:e.kind}):n.t("chat.usageSummary",{kind:e.kind,details:r.slice(0,xP).map(o=>EP(o,n)).join(n.t("chat.usageSeparator"))})}const Ii={agent:{defaultKind:"claude"},notifications:{sessionEnd:{banner:!1,sound:!1},push:{enabled:!1}},shortcuts:{},power:{inhibitWhenRunning:"system-default"},appearance:{themeMode:"system",themeName:"paper",language:"zh-CN"},customInstructions:[]},[Mn,Mc]=T(Ii);async function SP(){try{const e=await pe.getGlobalConfig();return Mc(e),Pc(e),kP(e),e}catch{return Mc(Ii),Pc(Ii,!1),Ii}}async function Sv(e){const t=await pe.updateGlobalConfig(e);return Mc(t.config),Pc(t.config),kv(),t.config}async function Di(e){return Sv(e(Mn()))}async function Cp(e){return Di(t=>({...t,customInstructions:e}))}function Pc(e,t=!0){s_(e.appearance.themeMode,e.appearance.themeName),t&&qm(e.appearance.themeMode,e.appearance.themeName),Ef.language!==e.appearance.language&&Ef.changeLanguage(e.appearance.language)}function kP(e){if(!(typeof window>"u"))try{const t=window.localStorage,n=t.getItem("yorz.theme"),r=t.getItem("yorz.themeName"),o=t.getItem("yorz.lang"),i=DP(t.getItem("yorz.chat.customSlashCommands")),s=e.appearance,a={themeMode:AP(n)?n:s.themeMode,themeName:TP(r)?r:s.themeName,language:IP(o)?o:s.language},u=e.customInstructions.length>0||i.length===0?e.customInstructions:i;if(a.themeMode===s.themeMode&&a.themeName===s.themeName&&a.language===s.language&&u===e.customInstructions){kv();return}Di(l=>({...l,appearance:a,customInstructions:u}))}catch{}}function kv(){if(!(typeof window>"u"))try{window.localStorage.removeItem("yorz.theme"),window.localStorage.removeItem("yorz.themeName"),window.localStorage.removeItem("yorz.lang"),window.localStorage.removeItem("yorz.chat.customSlashCommands")}catch{}}function AP(e){return e==="system"||e==="light"||e==="dark"}function TP(e){return e==="terminal"||e==="graphite"||e==="paper"}function IP(e){return e==="zh-CN"||e==="en"}function DP(e){if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(RP).filter(n=>n!==null):[]}catch{return[]}}function RP(e){if(!e||typeof e!="object")return null;const t=e,n=typeof t.hiddenPrompt=="string"?t.hiddenPrompt:typeof t.systemPrompt=="string"?t.systemPrompt:null;return typeof t.id!="string"||typeof t.name!="string"||typeof t.description!="string"||n===null||typeof t.prefill!="string"||typeof t.createdAt!="number"?null:{id:t.id,name:t.name,description:t.description,hiddenPrompt:n,prefill:t.prefill,createdAt:t.createdAt}}const[OP,NP]=T({});function Al(e){return e?OP()[e]??[]:[]}function $c(e,t){return NP(n=>({...n,[e]:t})),t}async function MP(e){if(!e)return[];try{const t=await pe.getProjectCustomInstructions(e);return $c(e,t.customInstructions)}catch{return $c(e,[])}}async function Sp(e,t){const n=await pe.updateProjectCustomInstructions(e,t);return $c(e,n.customInstructions)}function PP(e,t){const n=`/${e}`;return t.trim()?$P(t,e)?t:`${n} ${t}`:`${n} `}function $P(e,t){const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^/${n}(\\s|$)`).test(e.trimStart())}function LP(e,t){const n=new Set(e.map(r=>r.name));return[...e.map(r=>({...r,scope:"project"})),...t.filter(r=>!n.has(r.name)).map(r=>({...r,scope:"global"}))]}function FP(e){const{sid:t,displayedSid:n,displayedSpecId:r,displayedGroupId:o,fresh:i,listPending:s,known:a,specId:u,groupId:l,running:c}=e;if(!t)return{action:"idle"};const d=n===t;return i&&d?{action:"fresh"}:!a&&s?{action:"hold"}:c&&d&&(r===u&&o===l)?{action:"keep"}:{action:"load",clear:!d,specId:u,...l?{groupId:l}:{}}}function BP(){let e=0;return{begin(){const t=++e;return()=>t===e},invalidate(){e+=1}}}const zP="\0";function Tl(e,t){return`${e}${zP}${t}`}function Av(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.role===t.role&&e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.name===t.name&&e.result===t.result:e.kind==="context"&&t.kind==="context"?e.contextKind===t.contextKind&&e.text===t.text:e.kind==="divider"&&t.kind==="divider"?e.sessionId===t.sessionId&&e.startedAt===t.startedAt:!1}function UP(e,t){return e.length!==t.length?!1:e.length===0?!0:Av(e[e.length-1],t[t.length-1])}function KP(e,t){if(e.length>t.length)return!1;for(let n=0;n<e.length;n++)if(!Av(e[n],t[n]))return!1;return!0}const jP=80,kp=1500;function Ap(e){return new Promise(t=>window.setTimeout(t,e))}function qP(e){const[t,n]=T([]),r=ne(()=>eO(t())),[o,i]=T(!1),[s,a]=T(!1),[u,l]=T({}),c={isExpanded:q=>u()[q]===!0,set:(q,V)=>l(ce=>ce[q]===V?ce:{...ce,[q]:V})};function d(){l(q=>Object.keys(q).length===0?q:{})}const g=new Set,[h,p]=T(0);let m=new Set,y=!1,v,b;const[w,E]=T(0);let C=null;function A(){C==null&&(C=window.setTimeout(()=>{C=null,E(q=>q+1)},120))}let I="",S,k,P="";const R=BP();function L(q){return I!==q&&P!==q?!1:vt(t).length>0}function F(q,V){if(P===V||L(V))return!0;const ce=e.transcriptCache?.get(Tl(q,V));return!ce||ce.parts.length===0?!1:(te(ce.parts),P=V,!0)}const D=new Map;function B(q){let V=D.get(q);if(!V){let ce=()=>{};V={promise:new Promise(Le=>{ce=Le}),resolve:ce},D.set(q,V)}return V.promise}function N(q){B(q),D.get(q)?.resolve()}function X(q){g.delete(q)&&q===e.sessionId()&&p(V=>V+1)}let se="",K=null;function U(q,V){const ce=q[q.length-1];return ce&&ce.kind==="text"&&ce.role==="assistant"?[...q.slice(0,-1),{...ce,text:ce.text+V}]:[...q,{kind:"text",role:"assistant",text:V}]}function oe(){K!=null&&(clearTimeout(K),K=null);const q=se;se="",q&&n(V=>U(V,q))}function H(q){se+=q,K==null&&(K=window.setTimeout(oe,jP))}function z(q){oe(),n(V=>U(V,q))}function Z(q){oe(),n(V=>[...V,q])}function te(q=[]){K!=null&&(clearTimeout(K),K=null),se="",n(V=>q.length===0&&V.length===0?V:q)}function he(q){z(`
34
+ ${e.errorLabel(q)}
35
+ `)}re(()=>{const q=e.projectId(),V=e.sessionId(),ce=e.specId(),Ae=e.groupId?.(),Le=ce||Ae?e.running():!1,qe=FP({sid:V,displayedSid:I,displayedSpecId:S,displayedGroupId:k,fresh:g.has(V),listPending:e.listPending?.()??!1,known:e.known?.()??!0,specId:ce,groupId:Ae,running:Le});if(h(),w(),!q){a(!1);return}if(qe.action==="hold"){a(!F(q,V));return}if(qe.action==="idle"||qe.action==="keep"){a(!1);return}if(qe.action==="fresh"){a(!1),e.onSubjectChange?.();return}e.onSubjectChange?.(),qe.clear&&P!==V&&(te(),d()),qe.clear&&(m=new Set,y=!1,v&&v.sid!==V&&(v=void 0),b?.sourceSid!==V&&(b=void 0)),I=V,S=qe.specId,k=qe.groupId;const ut=R.begin();a(!F(q,V));const $t={imageUrl:((Ve,Qe)=>ka(pe.chatAttachmentUrl(q,Ve,Qe)))};(qe.specId?pe.getSpecMessages(q,qe.specId).then(Ve=>({next:qh(Ve,$t),folded:new Set(Ve.filter(Qe=>Qe.messages.length>0).map(Qe=>Qe.sessionId))})):qe.groupId?pe.getSessionGroupMessages(q,qe.groupId).then(Ve=>({next:qh(Ve,$t),folded:new Set(Ve.filter(Qe=>Qe.messages.length>0).map(Qe=>Qe.sessionId))})):pe.getSessionMessages(q,V).then(Ve=>({next:nv(Ve,$t),folded:new Set(Ve.length>0?[V]:[])}))).then(({next:Ve,folded:Qe})=>{if(!ut())return;v&&v.sid===V&&Qe.has(V)&&(v=void 0);const wt=!!(qe.specId&&v&&v.sid===V&&!Qe.has(V));if(qe.specId&&!Qe.has(V)&&y&&!wt){a(!1);return}let Dt=Ve;if(wt&&v){const Jt=[];Ve.length>0&&Jt.push({kind:"divider",sessionId:V,agentKind:v.kind,startedAt:v.startedAt}),Jt.push({kind:"text",role:"user",text:v.userText}),Dt=[...Ve,...Jt]}if(b?.sourceSid===V){const Jt=b;Dt=[...Dt.filter(zt=>zt.kind!=="divider"||zt.sessionId!==Jt.pendingSid),{kind:"divider",sessionId:Jt.pendingSid,agentKind:Jt.kind,startedAt:Jt.startedAt}]}P="";const Ot=vt(t),hn=UP(Ot,Dt)||KP(Dt,Ot);hn||te(Dt),m=Qe,Qe.has(V)&&(y=!1),a(!1);const zn=hn?Ot:Dt;zn.length>0&&e.transcriptCache?.set(Tl(q,V),{specId:qe.specId,groupId:qe.groupId,parts:zn})}).catch(()=>{ut()&&a(!1)})}),re(()=>{const q=e.projectId(),V=e.sessionId();if(!q||!V)return;const ce=Ra(q,V,{onReady:()=>N(V),onEvent:Ae=>{const Le=()=>{(e.specId()||e.groupId?.())&&V===e.sessionId()&&!m.has(V)&&(y=!0)};Ae.type==="text"?(H(Ae.delta),Le()):Ae.type==="tool-use"?(Z({kind:"tool",name:Ae.name,input:Ae.input}),Le()):Ae.type==="tool-result"?(Z({kind:"tool",result:Ae.text}),Le()):Ae.type==="image"?(Z({kind:"image",role:"assistant",src:Ae.data}),Le()):Ae.type==="turn-completed"?(oe(),X(V),e.onRunningChange(V,!1),(e.specId()||e.groupId?.())&&V===e.sessionId()&&!m.has(V)&&(y=!0,A())):Ae.type==="error"?(he(Ae.message),e.onRunningChange(V,!1)):Ae.type==="session-started"&&Ae.sessionId!==V&&Bc(()=>{g.has(V)&&g.add(Ae.sessionId),I===V&&(I=Ae.sessionId),e.onSessionIdChange(Ae.sessionId),e.onRunningChange(V,!1),e.onRunningChange(Ae.sessionId,!0),e.onSessionsChanged?.()})}});ue(()=>{D.delete(V),ce()})}),ue(()=>{K!=null&&clearTimeout(K),C!=null&&clearTimeout(C),R.invalidate();const q=e.projectId(),V=t();if(q&&I&&V.length>0){const ce=b?V.filter(Ae=>Ae.kind!=="divider"||Ae.sessionId!==b?.pendingSid):V;if(ce.length===0)return;e.transcriptCache?.set(Tl(q,I),{specId:S,groupId:k,parts:ce})}});function W(){te(),d(),R.invalidate(),a(!1),I="",S=void 0,k=void 0,P="",m=new Set,y=!1,v=void 0,b=void 0,C!=null&&(clearTimeout(C),C=null),e.onSubjectChange?.()}function M(q,V,ce){!q||!V||(v={sid:q,userText:V,kind:ce,startedAt:Date.now()},y=!0,A())}function Y(q){const V=e.sessionId();if(!V||b?.sourceSid===V)return;if(b){const Ae=b.pendingSid;n(Le=>Le.filter(qe=>qe.kind!=="divider"||qe.sessionId!==Ae))}const ce={sourceSid:V,pendingSid:`__pending-new-session__:${V}`,kind:q,startedAt:Date.now()};b=ce,Z({kind:"divider",sessionId:ce.pendingSid,agentKind:q,startedAt:ce.startedAt}),a(!1)}function ae(){W(),i(!1),g.clear(),p(q=>q+1),D.clear()}function _e(q){return(q??[]).map(V=>{const ce={kind:"image",role:"user",src:V.src};return V.alt&&(ce.alt=V.alt),ce})}async function fe(q,V,ce){const Ae=e.projectId(),Le=e.sessionId();if(!Ae||!q||o()||e.running())return"failed";if(e.onSubjectChange?.(),!Le)return Te(Ae,q,V,ce);Z({kind:"text",role:"user",text:q});for(const qe of _e(ce))Z(qe);a(!1),e.onRunningChange(Le,!0);try{return await pe.sendSessionMessage(Ae,Le,q,V),"sent"}catch(qe){return he(qe.message),e.onRunningChange(Le,!1),"failed"}}async function xe(q,V,ce){const Ae=e.projectId(),Le=e.sessionId();if(!Ae||!Le||!q||o()||e.running())return"failed";e.onSubjectChange?.(),i(!0);try{let qe;try{qe=await pe.createSession(Ae,{groupFromSessionId:Le})}catch(Ot){return he(Ot.message),"not-started"}const ut=qe.sessionId;g.add(ut);const $t=B(ut),Be=vt(t),Ve=b?.sourceSid===Le?b:void 0;let Qe=!1;const wt=Be.map(Ot=>Ve&&Ot.kind==="divider"&&Ot.sessionId===Ve.pendingSid?(Qe=!0,{kind:"divider",sessionId:ut,agentKind:qe.kind,startedAt:Ve.startedAt}):Ot);!Qe&&Be.length>0&&wt.push({kind:"divider",sessionId:ut,agentKind:qe.kind,startedAt:Date.now()}),wt.push({kind:"text",role:"user",text:q}),wt.push(..._e(ce)),b=void 0,te(wt),R.invalidate(),I=ut,S=e.specId(),k=e.groupId?.(),P="",y=!1,e.onRunningChange(ut,!0),e.onSessionIdChange(ut),await Promise.race([$t,Ap(kp)]);let Dt;try{await pe.sendSessionMessage(Ae,ut,q,V),Dt="sent"}catch(Ot){he(Ot.message),e.onRunningChange(ut,!1),Dt="failed"}return e.onSessionsChanged?.(),Dt}finally{i(!1)}}async function Te(q,V,ce,Ae){i(!0);try{let Le;try{Le=(await pe.createSession(q,{})).sessionId}catch($t){return he($t.message),"not-started"}g.add(Le);const qe=B(Le);te([{kind:"text",role:"user",text:V},..._e(Ae)]),d(),R.invalidate(),I=Le,S=void 0,k=void 0,P="",e.onRunningChange(Le,!0),e.onSessionIdChange(Le),await Promise.race([qe,Ap(kp)]);let ut;try{await pe.sendSessionMessage(q,Le,V,ce),ut="sent"}catch($t){he($t.message),e.onRunningChange(Le,!1),ut="failed"}return e.onSessionsChanged?.(),ut}finally{i(!1)}}async function bt(){const q=e.projectId(),V=e.sessionId();!q||!V||(await pe.abortSession(q,V).catch(()=>{}),e.onRunningChange(V,!1))}return{blocks:r,running:e.running,starting:o,historyLoading:s,toolExpand:c,send:fe,beginNewSessionBoundary:Y,sendInNewSession:xe,beginOptimisticRound:M,abort:bt,reset:W,markPersisted:X,resetAll:ae}}function HP(e){const t=/^\/new(?:\s+([\s\S]*))?$/.exec(e.trim());return t?{content:(t[1]??"").trim()}:null}function GP(e){const t=ba(e.title),r=(/^\s*<!--\s*yorz:hidden\b/i.test(t)?"":t)||e.id;return r===e.title?e:{...e,title:r}}function VP(e,t){const n=[],r=new Map;for(const o of e){const i=GP(o),s=t(i.id),a=i.specId?void 0:i.groupId,u=i.specId??a;if(!u){n.push({key:i.id,sessions:[i],latest:i,updatedAt:i.updatedAt,running:s});continue}const l=`${i.specId?"spec":"chat"}:${u}`,c=r.get(l);if(!c){const d={key:u,specId:i.specId,groupId:a,sessions:[i],latest:i,updatedAt:i.updatedAt,running:s};r.set(l,d),n.push(d);continue}c.sessions.push(i),i.updatedAt>c.latest.updatedAt&&(c.latest=i),c.updatedAt=Math.max(c.updatedAt,i.updatedAt),c.running||=s}for(const o of r.values())o.sessions.sort((i,s)=>i.createdAt-s.createdAt);return n}function WP(e,t){return e.find(n=>n.sessions.some(r=>r.id===t))}var YP=$("<div>");const ZP=e=>{const[t,n]=de(e,["class"]);return(()=>{var r=YP();return gr(r,G({get class(){return ct("rounded-xl border bg-card text-card-foreground shadow",t.class)}},n),!1,!1),r})()},XP=300;function JP(e,t=XP){const n=e.length;return n<=t?{truncated:!1,preview:e,length:n}:{truncated:!0,preview:e.slice(0,t),length:n}}const Ud=Qa;Qa.Trigger;const Kd=e=>{const[t,n]=de(e,["class"]);return f(Qa.Content,G({get class(){return ct("animate-collapsible-up data-[expanded]:animate-collapsible-down",t.class)}},n))};var QP=$('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 py-0.5 text-left text-xs text-muted-foreground/70"><span class=font-mono>'),e$=$('<div class="mt-1 max-h-[32rem] space-y-2 overflow-auto rounded border bg-background p-2">'),t$=$('<div class="font-mono text-xs font-semibold">'),n$=$("<div class=space-y-1>"),r$=$('<button type=button class="inline-flex w-fit cursor-pointer items-center text-left text-[11px] text-muted-foreground/70">'),o$=$("<div class=space-y-1><pre>");const i$=e=>{const t=()=>e.expand.isExpanded(e.segment.id),n=r=>e.expand.set(e.segment.id,r);return f(Ud,{get open(){return t()},onOpenChange:n,class:"my-1",get children(){return[(()=>{var r=QP(),o=r.firstChild;return r.$$click=()=>n(!t()),x(r,f(Aa,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),x(o,()=>_("chat.toolCollapsed",{count:e.segment.tools.length})),r})(),f(Kd,{get children(){var r=e$();return x(r,f(ac,{get each(){return e.segment.tools},children:(o,i)=>(()=>{var s=n$();return x(s,f(j,{get when(){return o().name},get children(){var a=t$();return x(a,()=>o().name),a}}),null),x(s,f(j,{get when(){return o().input!==void 0},get children(){return f(Tp,{get text(){return s$(o().input)},get expandKey(){return Hh(e.segment.id,i,"input")},get expand(){return e.expand}})}}),null),x(s,f(j,{get when(){return o().result!==void 0},get children(){return f(Tp,{get text(){return o().result??""},get expandKey(){return Hh(e.segment.id,i,"result")},get expand(){return e.expand},wrap:!0})}}),null),s})()})),r}})]}})},Tp=e=>{const t=()=>JP(e.text),n=()=>e.expand.isExpanded(e.expandKey),r=()=>t().truncated&&!n();return(()=>{var o=o$(),i=o.firstChild;return x(i,(()=>{var s=J(()=>!!r());return()=>s()?`${t().preview}…`:e.text})()),x(o,f(j,{get when(){return t().truncated},get children(){var s=r$();return s.$$click=()=>e.expand.set(e.expandKey,!n()),x(s,(()=>{var a=J(()=>!!n());return()=>a()?_("chat.toolTextCollapse"):_("chat.toolTextExpand",{count:t().length})})()),s}}),null),$e(()=>kt(i,`overflow-x-auto rounded bg-muted px-2 py-1 text-[11px] leading-snug ${e.wrap?"whitespace-pre-wrap":""}`)),o})()};function s$(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}Gt(["click"]);var a$=$('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 rounded border border-dashed px-1.5 py-0.5 text-left text-xs text-muted-foreground/80"><span class=font-mono>'),u$=$('<div class="mt-1 max-h-72 space-y-2 overflow-auto rounded border border-dashed bg-muted/40 p-2">'),l$=$('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-background px-2 py-1 text-[11px] leading-snug text-muted-foreground">');const c$=e=>{const[t,n]=T(!1);return f(Ud,{get open(){return t()},onOpenChange:n,class:"mb-2",get children(){return[(()=>{var r=a$(),o=r.firstChild;return r.$$click=()=>n(!t()),x(r,f(Aa,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),x(o,()=>_("chat.agentContextCollapsed",{count:e.contexts.length})),$e(()=>Ke(r,"title",_("chat.agentContextCollapsed",{count:e.contexts.length}))),r})(),f(Kd,{get children(){var r=u$();return x(r,f(at,{get each(){return e.contexts},children:o=>(()=>{var i=l$();return x(i,()=>o.text),i})()})),r}})]}})};Gt(["click"]);var d$=$('<div class="mt-1 flex flex-wrap gap-1.5">'),f$=$('<img loading=lazy class="max-h-64 max-w-full cursor-zoom-in rounded border border-border object-contain">',!0,!1,!1),g$=$('<span class="font-semibold tracking-wide">'),Il=$("<span>"),h$=$('<div class="flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5"><button type=button class="min-w-0 flex-1 text-left font-medium"></button><button type=button class=shrink-0>'),p$=$('<ul class="m-0 list-none overflow-y-auto border-t py-1">'),m$=$("<div class=mb-1.5>"),b$=$('<p class="mb-1 text-xs text-destructive">'),y$=$('<div class="flex min-h-0 flex-1 flex-col"><div class="min-h-0 flex-1 overflow-x-hidden overflow-y-auto p-2 pt-0 pr-1 mr-1 "></div><div class="border-t p-2"><div class="mb-1 flex items-center gap-1"><input type=file multiple hidden></div><div class="flex items-center justify-end gap-1">'),v$=$('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),w$=$('<p class="m-0 text-sm text-destructive">'),x$=$('<form class="flex flex-col gap-4"><div class="flex flex-col gap-1 font-medium"><span class="text-xs font-normal text-muted-foreground"></span></div><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-name></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-description></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-hidden-prompt><span class="text-xs font-normal text-muted-foreground"></span></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-prefill><span class="text-xs font-normal text-muted-foreground">'),_$=$("<aside><header>"),E$=$('<li class="px-2.5 py-1.5 text-xs text-muted-foreground">'),C$=$('<span class="shrink-0 text-[11px] font-normal tabular-nums text-muted-foreground">×'),S$=$('<li><button type=button><span class="shrink-0 text-xs text-muted-foreground">[<!>]</span><span class="min-w-0 flex-1 truncate"></span><span class="ml-auto max-w-20 shrink-0 truncate pl-2 text-right text-[11px] font-normal tabular-nums text-muted-foreground">'),k$=$("<div class=text-muted-foreground><p class=m-0>"),A$=$('<p class="mt-1 text-sm">'),T$=$('<div class="mb-2 whitespace-pre-wrap rounded border border-primary/20 border-l-2 border-l-primary bg-primary/10 px-2 py-1.5 font-medium text-foreground [overflow-wrap:anywhere]">'),I$=$('<div class="mb-2 min-w-0 rounded border bg-card px-2 py-1.5 [overflow-wrap:anywhere]">'),D$=$('<div class="markdown chat-md">'),R$=$('<div class="my-3 flex items-center gap-2 text-[11px] text-muted-foreground"><span class="h-px flex-1 bg-border"></span><span class="shrink-0 tabular-nums"></span><span class="h-px flex-1 bg-border">'),O$=$('<span class="text-sm font-normal text-muted-foreground">');const Dl="yorz.layout.col2.collapsed",Lc="yorz.layout.col2.width",Ip="yorz.chat.sessionList.collapsed",Tv="yorz.chat.sessionList.rows",N$="yorz.chat.sessionList.limit",M$="yorz.chat.sessionList.showHistory",Iv=[3,5,10],P$=28,jd=340,$$=.4,Dv=260,L$=960,F$=.8,B$=96,z$=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,U$=e=>e.kind==="divider"?e:null,K$=e=>e.kind==="context"?e:null,j$=e=>e.kind==="assistant"?e:null,Rl=e=>e.kind==="user"?e:null,q$=e=>e.kind==="tools"?e:null,H$=e=>e.kind==="image"?e:null,G$=e=>e.kind==="text"?e.text:"";function Dp(e){const[t,n]=T(),[r,o]=T(),[i,s]=T(!1);function a(u){n(u.src),o(u.alt),s(!0)}return(()=>{var u=d$();return x(u,f(at,{get each(){return e.images.filter(l=>ev(l.src))},children:l=>(()=>{var c=f$();return c.$$click=()=>a(l),$e(d=>{var g=l.src,h=l.alt??"";return g!==d.e&&Ke(c,"src",d.e=g),h!==d.t&&Ke(c,"alt",d.t=h),d},{e:void 0,t:void 0}),c})()}),null),x(u,f(Ey,{get src(){return t()},get alt(){return r()},get open(){return i()},onOpenChange:s}),null),u})()}fi("en",bv);fi("zh-CN",mv);function V$(){return typeof window>"u"?L$:Math.max(Dv,Math.round(window.innerWidth*F$))}function va(e){return Number.isFinite(e)?Math.min(V$(),Math.max(Dv,Math.round(e))):jd}function Ol(){return typeof window>"u"?jd:va(window.innerWidth*$$)}function Rp(e){return e instanceof Element?e.closest('[data-file-link="true"]'):null}function W$(){try{if(typeof window>"u")return jd;const e=window.localStorage.getItem(Lc);if(!e)return Ol();const t=Number(e);return Number.isFinite(t)?va(t):Ol()}catch{return Ol()}}function Ri(e,t){try{return typeof window<"u"&&window.localStorage.getItem(e)||t}catch{return t}}function Fo(e,t){try{typeof window<"u"&&window.localStorage.setItem(e,t)}catch{}}function Fc(e){return Iv.includes(e)}function Y$(){const e=Number(Ri(Tv,""));if(Fc(e))return e;const t=Number(Ri(N$,""));return Fc(t)?t:Ri(M$,"0")==="1"?10:3}const Op=3,Np=10;function Mp(e){return e.trim().replace(/^\/+/,"")}function Z$(e){return/^[\w-]+$/.test(e)}function X$(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}const J$=()=>{let e,t;const{lng:n}=_d(),r=wy({projectId:()=>St()||"",labels:xy}),o=ne(()=>LP(Al(St()||""),Mn().customInstructions));re(()=>{const ie=St()||"";ie&&MP(ie)});const[i,s]=T(!1),[a,u]=T(""),[l,c]=T(""),[d,g]=T(""),[h,p]=T(""),[m,y]=T("project"),[v,b]=T(null),[w,E]=T(!1),[C,A]=T(null),[I,S]=T(null),[k,P]=T(!1),R=ne(()=>{n();const ie=o().map(Re=>{const ve=`/${Re.name}`;return{value:ve,label:ve,description:Re.description||_("chat.customSlashCommandNoDescription"),replacement:PP(Re.name,Re.prefill),customId:Re.id,editable:!0,editLabel:_("chat.editCustomSlashCommand",{name:Re.name}),deletable:!0,deleteLabel:_("chat.deleteCustomSlashCommand",{name:Re.name})}});return[{value:"/new",description:_("chat.slashCommandNewSession")},{value:"/yorz-debug",description:_("chat.slashCommandYorzDebug")},{value:"/yorz-spec",description:_("chat.slashCommandYorzSpec")},...ie,{value:"/add-command",label:_("chat.addSlashCommandOption"),description:_("chat.addSlashCommandOptionDescription"),action:"add",icon:"plus"}]}),[L,F]=T(Ri(Dl,"0")==="1"),[D,B]=T(W$()),[N,X]=T(Ri(Ip,"0")!=="1"),[se,K]=T(Y$()),[U,oe]=T(""),[H,z]=T(""),[Z,te]=T(!1),[he,W]=T(!0),[M,Y]=T(Date.now()),[ae,_e]=T({}),[fe,{refetch:xe}]=en(()=>St()||void 0,ie=>pe.listSessions(ie)),[Te]=en(()=>{const ie=St();return ie&&!U()?ie:void 0},ie=>pe.getAgentUsageStatus(ie));re(()=>{const ie=fe();if(!ie)return;const Re=U();for(const ve of ie)ve.running||Ve.markPersisted(ve.id);_e(ve=>{const st={};for(const Nt of ie)st[Nt.id]=!!Nt.running;return Re&&!(Re in st)&&ve[Re]===!0&&(st[Re]=!0),st})}),re(pt(St,()=>{oe(""),_e({}),Ve.resetAll(),r.reset(),te(!1)})),re(()=>{const ie=St();if(!ie)return;const Re=l0(ie,{onStatus:ve=>{_e(st=>({...st,[ve.sessionId]:ve.running})),xe()}});ue(Re)});const bt=ie=>ae()[ie]===!0,q=ne(()=>{const ie=U();return ie?bt(ie):!1}),V=ne(()=>VP(fe()??[],bt)),ce=ne(()=>V().filter(ie=>ie.running).length),Ae=ne(()=>WP(V(),U())),Le=ne(()=>Ae()?.sessions.find(ie=>ie.id===U())?.kind??Ae()?.latest.kind),qe=ne(()=>Ae()?.specId),ut=ne(()=>Ae()?.groupId),$t=ne(()=>!!Ae()),Be=ne(()=>!$t()&&fe.loading),Ve=qP({projectId:()=>St()||"",sessionId:U,specId:qe,groupId:ut,running:q,listPending:Be,known:$t,onSessionIdChange:oe,onRunningChange:(ie,Re)=>_e(ve=>({...ve,[ie]:Re})),onSessionsChanged:()=>void xe(),onSubjectChange:()=>W(!0),errorLabel:ie=>_("chat.errorMessage",{message:ie})});function Qe(ie){!ie||ie===U()||(xe(),te(!1),oe(ie))}re(()=>{const ie=IE();if(!ie)return;const Re=DE();RE(),Qe(ie),Re&&Re.sessionId===ie&&Ve.beginOptimisticRound(ie,Re.userText,Re.kind),L()&&(F(!1),Fo(Dl,"0"))});const wt=()=>L()||Rr();function Dt(){if(Rr()){ua();return}const ie=!L();F(ie),Fo(Dl,ie?"1":"0")}function Ot(ie){X(ie),Fo(Ip,ie?"0":"1")}function hn(ie){const Re=Number(ie);Fc(Re)&&(K(Re),Fo(Tv,String(Re)))}function zn(ie){return _(ie===3?"chat.sessionListRows3":ie===5?"chat.sessionListRows5":"chat.sessionListRows10")}function Jt(ie){const Re=ie.title.trim();return Re&&Re!==ie.id&&!z$.test(Re)?Re:ie.id}An(()=>{const ie=()=>{const Re=va(D());Re!==D()&&(B(Re),Fo(Lc,String(Re)))};window.addEventListener("resize",ie),ue(()=>window.removeEventListener("resize",ie))}),An(()=>{const ie=window.setInterval(()=>Y(Date.now()),6e4);ue(()=>window.clearInterval(ie))});let zt=null,pn=null,yn=null;function Vt(ie){wt()||(ie.preventDefault(),zt={startX:ie.clientX,startW:D(),raf:null},document.body.classList.add("is-resizing"),pn=Re=>{if(!zt)return;const ve=va(zt.startW+(Re.clientX-zt.startX));zt.raf==null&&(zt.raf=requestAnimationFrame(()=>{zt&&(zt.raf=null,B(ve))}))},yn=()=>{zt?.raf!=null&&cancelAnimationFrame(zt.raf),zt=null,document.body.classList.remove("is-resizing"),pn&&document.removeEventListener("mousemove",pn),yn&&document.removeEventListener("mouseup",yn),pn=null,yn=null,Fo(Lc,String(D()))},document.addEventListener("mousemove",pn),document.addEventListener("mouseup",yn))}ue(()=>{pn&&document.removeEventListener("mousemove",pn),yn&&document.removeEventListener("mouseup",yn),document.body.classList.remove("is-resizing")}),re(()=>{Ve.blocks(),he()&&requestAnimationFrame(wr)});function io(ie){return ie.scrollHeight-ie.scrollTop-ie.clientHeight<=B$}function wr(){e&&(e.scrollTop=e.scrollHeight)}function Lr(){e&&W(io(e))}function dt(ie){return M(),!Number.isFinite(ie)||ie<=0?"":pv(ie,n())}function Rn(ie){return!Number.isFinite(ie)||ie<=0?"":new Date(ie).toLocaleString(n())}const ge=ne(()=>(n(),CP(Te(),Te.loading,{t:_,formatTime:ie=>ie.toLocaleString(n())})));async function Ie(ie){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(ie),Xt.success(_("chat.filePathCopied"))}catch{Xt.error(_("chat.filePathCopyFailed"))}}function O(ie){const Re=Rp(ie.target);if(!Re||e&&!e.contains(Re))return;const ve=Re.dataset.filePath;ve&&(ie.preventDefault(),Ie(ve))}function Q(ie){if(ie.key!=="Enter"&&ie.key!==" ")return;const Re=Rp(ie.target);if(!Re||e&&!e.contains(Re))return;const ve=Re.dataset.filePath;ve&&(ie.preventDefault(),Ie(ve))}function be(){!St()||!U()||(oe(""),te(!1),Ve.reset(),r.reset())}async function le(){const ie=H().trim(),Re=HP(ie),ve=Re?.content??ie;if(!St()||Ve.starting()||q())return;if(Re&&!ve){z("");const Ft=Le();U()&&Ft&&(te(!0),Ve.beginNewSessionBoundary(Ft));return}if(!ve||r.hasPending())return;z("");const st=r.draftId(),Nt=St()||"",Lt=st&&Nt?r.attachments().filter(Ft=>Ft.kind==="image"&&Ft.storedName).map(Ft=>({src:ka(pe.draftAttachmentUrl(Nt,st,Ft.storedName)),alt:Ft.name})):[],Ut=!!(U()&&(Z()||Re)),ln=Ut?await Ve.sendInNewSession(ve,r.draftId()??void 0,Lt):await Ve.send(ve,r.draftId()??void 0,Lt);ln==="sent"&&r.reset(),ln==="not-started"?(z(ie),Ut&&te(!0)):Ut&&te(!1)}function je(ie){ie.defaultPrevented||ie.isComposing||ie.key==="Enter"&&!ie.shiftKey&&(ie.preventDefault(),le())}function et(){return C()===null&&!!St()}function Ee(){u(""),c(""),g(""),p(""),y(St()?"project":"global"),b(null),A(null)}function ye(){Ee(),s(!0)}function He(ie){const Re=ie.customId,ve=Re?o().find(st=>st.id===Re):void 0;ve&&(A(ve.id),u(ve.name),c(ve.description),g(ve.hiddenPrompt),p(ve.prefill),y(ve.scope),b(null),s(!0))}async function _t(ie){if(ie.preventDefault(),w())return;const Re=Mp(a());if(!Re){b(_("chat.customSlashCommandNameRequired"));return}if(!Z$(Re)){b(_("chat.customSlashCommandNameInvalid"));return}const ve=C(),st=St()||"",Nt=m()==="project"&&st?"project":"global",Lt=Nt==="project"?Al(st):Mn().customInstructions,Ut=ve?Lt.find(Wt=>Wt.id===ve):void 0,ln={id:Ut?.id??X$(),name:Re,description:l().trim(),hiddenPrompt:d().trim(),prefill:h(),createdAt:Ut?.createdAt??Date.now()},Ft=[...Lt.filter(Wt=>Wt.id!==ln.id&&Wt.name!==Re),ln];E(!0);try{Nt==="project"?await Sp(st,Ft):await Cp(Ft),s(!1),Ee()}catch(Wt){b(Wt.message)}finally{E(!1)}}async function Tt(){const ie=I()?.customId;if(!ie)return;const Re=o().find(ve=>ve.id===ie);if(Re){P(!0);try{if(Re.scope==="project"){const ve=St()||"";await Sp(ve,Al(ve).filter(st=>st.id!==ie))}else await Cp(Mn().customInstructions.filter(ve=>ve.id!==ie));S(null)}catch(ve){Xt.error(ve.message)}finally{P(!1)}}}return(()=>{var ie=_$(),Re=ie.firstChild;return x(Re,f(j,{get when(){return!wt()},get fallback(){return f(we,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:Dt,get title(){return _("chat.expand")},get children(){return f(fc,{class:"h-4 w-4"})}})},get children(){return[(()=>{var ve=g$();return x(ve,()=>_("chat.title")),ve})(),f(we,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:Dt,get title(){return _("chat.collapse")},get children(){return f(t0,{class:"h-4 w-4"})}})]}})),x(ie,f(j,{get when(){return!wt()},get children(){var ve=y$(),st=ve.firstChild,Nt=st.nextSibling,Lt=Nt.firstChild,Ut=Lt.firstChild,ln=Lt.nextSibling;x(ve,f(j,{get when(){return St()},get children(){return f(ZP,{class:"m-2 rounded-lg shadow-none",get children(){return f(Ud,{get open(){return N()},onOpenChange:Ot,get children(){return[(()=>{var ht=h$(),Pe=ht.firstChild,Rt=Pe.nextSibling;return Pe.$$click=()=>Ot(!N()),x(Pe,f(j,{get when(){return ce()>0},get fallback(){return(()=>{var Je=Il();return x(Je,()=>_("chat.sessionsLabelPlain")),Je})()},get children(){var Je=Il();return x(Je,()=>_("chat.sessionsLabel",{count:ce()})),Je}})),x(ht,f(ir,{class:"flex shrink-0 items-center gap-2",get value(){return String(se())},onChange:hn,get"aria-label"(){return _("chat.sessionListRows")},get children(){return f(at,{each:Iv,children:Je=>f(Cn,{get value(){return String(Je)},class:"flex items-center gap-1",get children(){return[f(_n,{}),f(Nn,{class:"h-3 w-3"}),f(En,{class:"cursor-pointer text-xs text-muted-foreground",get children(){return zn(Je)}})]}})})}}),Rt),Rt.$$click=()=>Ot(!N()),x(Rt,f(Aa,{get class(){return`h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-150 ${N()?"":"-rotate-90"}`}})),$e(Je=>{var Kt=N()?_("chat.collapseSessions"):_("chat.expandSessions"),so=N()?_("chat.collapseSessions"):_("chat.expandSessions");return Kt!==Je.e&&Ke(Pe,"title",Je.e=Kt),so!==Je.t&&Ke(Rt,"title",Je.t=so),Je},{e:void 0,t:void 0}),ht})(),f(Kd,{get children(){var ht=p$();return x(ht,f(j,{get when(){return V().length>0},get fallback(){return(()=>{var Pe=E$();return x(Pe,()=>_("chat.noRunningSessions")),Pe})()},get children(){return f(at,{get each(){return V()},children:Pe=>(()=>{var Rt=S$(),Je=Rt.firstChild,Kt=Je.firstChild,so=Kt.firstChild,ys=so.nextSibling;ys.nextSibling;var vs=Kt.nextSibling,gi=vs.nextSibling;return Je.$$click=()=>Qe(Pe.latest.id),x(Je,f(j,{get when(){return Pe.running},get children(){return f(on,{class:"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground"})}}),Kt),x(Kt,()=>Pe.latest.kind,ys),x(vs,()=>Jt(Pe.latest)),x(Je,f(j,{get when(){return Pe.sessions.length>1},get children(){var tn=C$();return tn.firstChild,x(tn,()=>Pe.sessions.length,null),tn}}),gi),x(gi,()=>dt(Pe.updatedAt)),$e(tn=>{var ws=`flex w-full items-center gap-1 px-2 py-1 text-left text-sm ${Ae()?.key===Pe.key?"bg-primary-soft font-semibold":"hover:bg-accent"}`,me=Pe.running?_("chat.sessionTitleRunning",{kind:Pe.latest.kind,id:Pe.latest.id}):_("chat.sessionTitle",{kind:Pe.latest.kind,id:Pe.latest.id}),ze=Rn(Pe.updatedAt);return ws!==tn.e&&kt(Je,tn.e=ws),me!==tn.t&&Ke(Je,"title",tn.t=me),ze!==tn.a&&Ke(gi,"title",tn.a=ze),tn},{e:void 0,t:void 0,a:void 0}),Rt})()})}})),$e(Pe=>Pi(ht,"max-height",`${se()*P$+4}px`)),ht}})]}})}})}}),st),st.addEventListener("scroll",Lr),st.$$keydown=Q,st.$$click=O;var Ft=e;typeof Ft=="function"?Hn(Ft,st):e=st,x(st,f(j,{get when(){return Ve.blocks().length>0},get fallback(){return(()=>{var ht=k$(),Pe=ht.firstChild;return x(Pe,(()=>{var Rt=J(()=>!!U());return()=>Rt()?_("chat.empty"):_("chat.draftEmpty")})()),x(ht,f(j,{get when(){return J(()=>!U())()&&ge()},children:Rt=>(()=>{var Je=A$();return x(Je,Rt),Je})()}),null),ht})()},get children(){return f(ac,{get each(){return Ve.blocks()},children:ht=>f(j,{get when(){return U$(ht())},get fallback(){return f(j,{get when(){return K$(ht())},get fallback(){return f(j,{get when(){return j$(ht())},get fallback(){return(()=>{var Pe=T$();return x(Pe,f(j,{get when(){return Rl(ht())?.text},children:Rt=>(()=>{var Je=Il();return x(Je,Rt),Je})()}),null),x(Pe,f(j,{get when(){return Rl(ht())?.images?.length},get children(){return f(Dp,{get images(){return Rl(ht()).images}})}}),null),Pe})()},children:Pe=>(()=>{var Rt=I$();return x(Rt,f(ac,{get each(){return Pe().segments},children:Je=>f(j,{get when(){return H$(Je())},get fallback(){return f(j,{get when(){return q$(Je())},get fallback(){return(()=>{var Kt=D$();return $e(()=>Kt.innerHTML=Bd(G$(Je()),{mermaid:"code",fileLinks:"copy",fileLinkTitle:_("chat.copyFilePath")})),Kt})()},children:Kt=>f(i$,{get segment(){return Kt()},get expand(){return Ve.toolExpand}})})},children:Kt=>f(Dp,{get images(){return Kt().images}})})})),Rt})()})},children:Pe=>f(c$,{get contexts(){return Pe().contexts}})})},children:Pe=>(()=>{var Rt=R$(),Je=Rt.firstChild,Kt=Je.nextSibling;return x(Kt,()=>_("chat.sessionDivider",{kind:Pe().agentKind,time:Rn(Pe().startedAt)})),Rt})()})})}})),x(Nt,f(j,{get when(){return r.count()>0},get children(){var ht=m$();return x(ht,f(ky,{ctrl:r,compact:!0})),ht}}),Lt),x(Nt,f(j,{get when(){return r.error()},get children(){var ht=b$();return x(ht,()=>r.error()),ht}}),Lt),x(Lt,f(tu,{get projectId(){return St()||""},get value(){return H()},onValueChange:z,get slashCommands(){return R()},get slashEmptyLabel(){return _("chat.slashCommandNoMatch")},onSlashCommandAction:ye,onEditSlashCommand:He,onDeleteSlashCommand:S,onKeyDown:je,get onPaste(){return r.onPaste},get placeholder(){return J(()=>!St())()?_("chat.noSessionPlaceholder"):J(()=>!!U())()?_("chat.inputPlaceholder"):_("chat.draftPlaceholder")},get disabled(){return!St()},minRows:2,maxRows:10,class:"min-w-0 flex-1 bg-background px-2 py-1"}),Ut),x(Lt,f(we,{variant:"outline",size:"sm",class:"h-8 w-8 shrink-0 p-0",onClick:()=>t?.click(),get disabled(){return!St()||r.count()>=Vo},get title(){return _("newSpec.importAttachment")},get children(){return f(G2,{class:"h-4 w-4"})}}),Ut),Js(Ut,"change",r.onFileInputChange);var Wt=t;return typeof Wt=="function"?Hn(Wt,Ut):t=Ut,Ke(Ut,"accept",vy),x(ln,f(we,{variant:"outline",size:"sm",class:"h-8 w-8 p-0",onClick:be,get disabled(){return!St()||!U()},get title(){return _("chat.newSession")},get children(){return f(Wr,{class:"h-4 w-4"})}}),null),x(ln,f(j,{get when(){return q()},get fallback(){return f(we,{size:"sm",onClick:()=>void le(),get disabled(){return!St()||!H().trim()||Ve.starting()||r.hasPending()},get children(){return[f(Ia,{class:"mr-1 h-3.5 w-3.5"}),J(()=>_("chat.send"))]}})},get children(){return f(we,{variant:"outline",size:"sm",onClick:()=>void Ve.abort(),get title(){return _("chat.abort")},get children(){return[f(i0,{class:"mr-1 h-3.5 w-3.5"}),J(()=>_("chat.abort"))]}})}}),null),ve}}),null),x(ie,f(j,{get when(){return!wt()},get children(){var ve=v$();return ve.$$mousedown=Vt,ve}}),null),x(ie,f(cn,{get open(){return i()},onOpenChange:ve=>{!ve&&w()||(s(ve),ve||Ee())},get children(){return f(cr,{class:"max-w-[700px]",get children(){return[f(fr,{get children(){return f(dr,{get children(){return J(()=>!!C())()?_("chat.editSlashCommandTitle"):_("chat.addSlashCommandTitle")}})}}),(()=>{var ve=x$(),st=ve.firstChild,Nt=st.firstChild,Lt=st.nextSibling,Ut=Lt.nextSibling,ln=Ut.nextSibling,Ft=ln.firstChild,Wt=ln.nextSibling,ht=Wt.firstChild;return ve.addEventListener("submit",Pe=>void _t(Pe)),x(st,()=>_("chat.customSlashCommandScope"),Nt),x(st,f(j,{get when(){return et()},get fallback(){return(()=>{var Pe=O$();return x(Pe,(()=>{var Rt=J(()=>m()==="project");return()=>Rt()?_("chat.slashCommandScopeProject"):_("chat.slashCommandScopeGlobal")})()),Pe})()},get children(){return f(ir,{get value(){return m()},onChange:Pe=>y(Pe),class:"flex items-center gap-4",get children(){return f(at,{get each(){return[{value:"project",label:_("chat.slashCommandScopeProject")},{value:"global",label:_("chat.slashCommandScopeGlobal")}]},children:Pe=>f(Cn,{get value(){return Pe.value},class:"flex items-center gap-1",get children(){return[f(_n,{}),f(Nn,{class:"h-3 w-3"}),f(En,{class:"cursor-pointer text-sm font-normal",get children(){return Pe.label}})]}})})}})}}),Nt),x(Nt,(()=>{var Pe=J(()=>m()==="project");return()=>Pe()?_("chat.customSlashCommandScopeProjectHint"):_("chat.customSlashCommandScopeGlobalHint")})()),x(Lt,()=>_("chat.customSlashCommandName"),null),x(Lt,f($n,{id:"chat-custom-command-name",get value(){return a()},get placeholder(){return _("chat.customSlashCommandNamePlaceholder")},onInput:Pe=>{u(Pe.currentTarget.value),b(null)},required:!0}),null),x(Ut,()=>_("chat.customSlashCommandDescription"),null),x(Ut,f($n,{id:"chat-custom-command-description",get value(){return l()},get placeholder(){return _("chat.customSlashCommandDescriptionPlaceholder")},onInput:Pe=>c(Pe.currentTarget.value)}),null),x(ln,()=>_("chat.customSlashCommandHiddenPrompt"),Ft),x(ln,f(ga,{id:"chat-custom-command-hidden-prompt",get value(){return d()},get placeholder(){return _("chat.customSlashCommandHiddenPromptPlaceholder")},minRows:Op,maxRows:Np,onInput:Pe=>g(Pe.currentTarget.value)}),Ft),x(Ft,()=>_("chat.customSlashCommandHiddenPromptHint")),x(Wt,()=>_("chat.customSlashCommandPrefill"),ht),x(Wt,f(ga,{id:"chat-custom-command-prefill",get value(){return h()},get placeholder(){return _("chat.customSlashCommandPrefillPlaceholder")},minRows:Op,maxRows:Np,onInput:Pe=>p(Pe.currentTarget.value)}),ht),x(ht,()=>_("chat.customSlashCommandPrefillHint")),x(ve,f(j,{get when(){return v()},get children(){var Pe=w$();return x(Pe,v),Pe}}),null),x(ve,f(Or,{get children(){return[f(we,{type:"button",variant:"outline",onClick:()=>s(!1),get disabled(){return w()},get children(){return _("common.cancel")}}),f(we,{type:"submit",get disabled(){return!a().trim()||w()},get children(){return J(()=>!!w())()?_("common.saving"):_("chat.saveCustomSlashCommand")}})]}}),null),ve})()]}})}}),null),x(ie,f(cn,{get open(){return I()!==null},onOpenChange:ve=>!ve&&!k()&&S(null),get children(){return f(cr,{class:"max-w-sm",get children(){return[f(fr,{get children(){return[f(dr,{get children(){return _("chat.deleteSlashCommandTitle")}}),f(eu,{get children(){return _("chat.deleteSlashCommandConfirm",{name:Mp(I()?.value??"")})}})]}}),f(Or,{get children(){return[f(we,{variant:"outline",onClick:()=>S(null),get disabled(){return k()},get children(){return _("common.cancel")}}),f(we,{variant:"destructive",onClick:()=>void Tt(),get disabled(){return k()},get children(){return J(()=>!!k())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),$e(ve=>{var st=`relative flex flex-col border-r bg-background text-base shrink-0 ${wt()?"w-9 transition-[width] duration-150":""}`,Nt=wt()?void 0:{width:`${D()}px`},Lt=`flex items-center border-b ${wt()?"justify-center py-2":"justify-between px-2.5 py-2"}`;return st!==ve.e&&kt(ie,ve.e=st),ve.t=Zo(ie,Nt,ve.t),Lt!==ve.a&&kt(Re,ve.a=Lt),ve},{e:void 0,t:void 0,a:void 0}),ie})()};Gt(["click","keydown","mousedown"]);const Rv=["newSpec","toggleSpecDetailFullscreen","projectSettings","globalSettings"],Dr={newSpec:"Ctrl+Shift+N",toggleSpecDetailFullscreen:"Ctrl+Shift+F",projectSettings:"Ctrl+Shift+S",globalSettings:"Ctrl+Shift+G"},Q$=new Set(["Control","Shift","Alt","Meta"]);function zs(e){if(!e)return null;const t=e.split("+").map(r=>r.trim()).filter(Boolean),n={key:""};for(const r of t){const o=r.toLowerCase();o==="ctrl"||o==="control"?n.ctrl=!0:o==="shift"?n.shift=!0:o==="alt"||o==="option"?n.alt=!0:o==="meta"||o==="cmd"||o==="command"?n.meta=!0:n.key=qd(r)}return n.key?Nv(n):null}function Ov(e){if(Q$.has(e.key))return null;const t=qd(e.key);return t?Nv({key:t,ctrl:e.ctrlKey,shift:e.shiftKey,alt:e.altKey,meta:e.metaKey}):null}function wa(e){return{newSpec:zs(e?.newSpec)??Dr.newSpec,toggleSpecDetailFullscreen:zs(e?.toggleSpecDetailFullscreen)??Dr.toggleSpecDetailFullscreen,projectSettings:zs(e?.projectSettings)??Dr.projectSettings,globalSettings:zs(e?.globalSettings)??Dr.globalSettings}}function Pp(e){const t=wa(e),n=new Map,r=new Set;for(const o of Rv){const i=t[o],s=n.get(i);s?(r.add(s),r.add(o)):n.set(i,o)}return[...r]}function eL(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const t=e.tagName.toLowerCase();if(t==="textarea"||t==="select")return!0;if(t!=="input")return!1;const r=e.type.toLowerCase();return!["button","checkbox","radio","submit","reset","file","color"].includes(r)}function Nv(e){const t=[];return e.ctrl&&t.push("Ctrl"),e.shift&&t.push("Shift"),e.alt&&t.push("Alt"),e.meta&&t.push("Meta"),t.push(qd(e.key)),t.join("+")}function qd(e){return e.length===1?e.toUpperCase():e===" "?"Space":e.startsWith("Arrow")?e:e.slice(0,1).toUpperCase()+e.slice(1)}var tL=$("<span>"),nL=$('<span class="text-xs font-normal text-muted-foreground">'),rL=$('<p class="m-0 text-sm text-destructive">'),oL=$('<div class="flex flex-col gap-4"><fieldset class="m-0 grid gap-3 border-0 p-0 sm:grid-cols-3"></fieldset><fieldset class="m-0 flex flex-col gap-3 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-wrap items-center gap-x-6 gap-y-2"></div></fieldset><fieldset class="m-0 flex flex-col gap-2 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-col gap-2">'),iL=$("<p class=text-muted-foreground>"),sL=$('<div class="grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 rounded-md border p-2"><div class=min-w-0><p class="m-0 font-medium"></p><p>'),aL=$("<p class=text-destructive>");const uL={claude:"projectConfig.agentClaude",opencode:"projectConfig.agentOpencode",codex:"projectConfig.agentCodex",pi:"projectConfig.agentPi"},lL=e=>{const[t,n]=T("claude"),[r,o]=T([]),[i,s]=T(""),[a,u]=T(""),[l,c]=T({models:[],defaultReasoningEfforts:[]}),[d,g]=T(!1),[h,p]=T(!1),[m,y]=T(!1),[v,b]=T("system-default"),[w,E]=T({}),[C,A]=T(null),[I,S]=T(!1),[k,P]=T("idle"),[R,L]=T(null);let F=0,D=0;const B=_v(),N=ne(()=>new Set(Pp(w())));let X;re(()=>{const q=++D;e.open&&(L(null),U(),P("idle"),S(!0),(async()=>{try{if(await B.whenIdle(),q!==D||!e.open)return;const[V,ce]=await Promise.all([pe.getGlobalConfig(),pe.listGlobalAgents().catch(()=>[])]);if(q!==D||!e.open)return;se(V),o(ce),ae(V.agent.defaultKind)}catch(V){if(q!==D||!e.open)return;L(V.message),se(Ii)}finally{q===D&&S(!1)}})())});function se(q){n(q.agent.defaultKind),s(q.agent.model??""),u(q.agent.reasoningEffort??""),p(!!q.notifications.sessionEnd.banner),y(!!q.notifications.sessionEnd.sound),b(q.power?.inhibitWhenRunning??"system-default"),E(q.shortcuts??{}),A(null)}re(()=>{const q=C();if(!q)return;const V=ce=>{if(ce.preventDefault(),ce.stopPropagation(),ce.key==="Escape"){A(null);return}if(ce.key==="Backspace"||ce.key==="Delete"){const qe={...w(),[q]:null};E(qe),A(null),K({shortcuts:qe});return}const Ae=Ov(ce);if(!Ae)return;const Le={...w(),[q]:Ae};E(Le),A(null),K({shortcuts:Le})};window.addEventListener("keydown",V,!0),ue(()=>window.removeEventListener("keydown",V,!0))});async function K(q){L(null);const V=q.shortcuts??w();if(Pp(V).length>0){L(_("globalConfig.shortcutConflict"));return}U(),P("saving");const ce=q.agent?q.agent.model:i()||void 0,Ae=q.agent?q.agent.reasoningEffort:a()||void 0,Le={agent:{defaultKind:q.agent?.defaultKind??t(),...ce?{model:ce}:{},...Ae?{reasoningEffort:Ae}:{}},notifications:{sessionEnd:{banner:q.notifications?.sessionEnd.banner??h(),sound:q.notifications?.sessionEnd.sound??m()},push:q.notifications?.push??Mn().notifications.push},shortcuts:V,power:{inhibitWhenRunning:q.power?.inhibitWhenRunning??v()},appearance:Mn().appearance,customInstructions:Mn().customInstructions};await B.enqueue({task:()=>Sv(Le),onLatestSuccess:()=>{P("saved"),X=setTimeout(()=>P("idle"),2e3)},onLatestError:qe=>{P("idle"),L(qe.message)}})}function U(){X&&(clearTimeout(X),X=void 0)}ue(U);const oe=()=>{const q=r().map(V=>V.id);return q.length>0?q:["claude","opencode","codex","pi"]};function H(q){const V=r().find(Ae=>Ae.id===q);if(V&&V.source==="external")return V.displayName;const ce=uL[q];return ce?_(ce):V?.displayName??q}function z(q){return _(`globalConfig.shortcuts.${q}`)}function Z(q){return _(q==="prevent-display-sleep"?"globalConfig.powerPreventDisplaySleep":q==="keep-system-awake"?"globalConfig.powerKeepSystemAwake":"globalConfig.powerSystemDefault")}function te(q){return C()===q?_("globalConfig.shortcutRecording"):wa(w())[q]}function he(q){const V={...w(),[q]:null};E(V),K({shortcuts:V})}function W(q){n(q),s(""),u(""),ae(q),K({agent:{defaultKind:q}})}function M(q){s(q),u(""),K({agent:{defaultKind:t(),...q?{model:q}:{}}})}function Y(q){u(q),K({agent:{defaultKind:t(),...i()?{model:i()}:{},...q?{reasoningEffort:q}:{}}})}async function ae(q){const V=++F;g(!0);try{const ce=await pe.listGlobalAgentModels(q);V===F&&c(ce)}catch{V===F&&c({models:[],defaultReasoningEfforts:[]})}finally{V===F&&g(!1)}}const _e=()=>{const q=[{value:"",label:_("globalConfig.agentDefaultOption")},...l().models.map(V=>({value:V.id,label:V.displayName}))];return i()&&!q.some(V=>V.value===i())&&q.push({value:i(),label:i()}),q},fe=()=>{const q=i()?l().models.find(ce=>ce.id===i())?.reasoningEfforts??[]:l().defaultReasoningEfforts,V=[{value:"",label:_("globalConfig.agentDefaultOption")},...q.map(ce=>({value:ce.id,label:ce.displayName}))];return a()&&!V.some(ce=>ce.value===a())&&V.push({value:a(),label:a()}),V};function xe(q){p(q),K({notifications:{sessionEnd:{banner:q,sound:m()},push:Mn().notifications.push}})}function Te(q){y(q),K({notifications:{sessionEnd:{banner:h(),sound:q},push:Mn().notifications.push}})}function bt(q){b(q),K({power:{inhibitWhenRunning:q}})}return f(cn,{get open(){return e.open},onOpenChange:q=>!q&&e.onClose(),get children(){return f(cr,{class:"max-w-[560px]",get children(){return[f(fr,{get children(){return f(dr,{class:"flex items-baseline gap-2",get children(){return[(()=>{var q=tL();return x(q,()=>_("globalConfig.title")),q})(),f(j,{get when(){return k()!=="idle"},get children(){var q=nL();return x(q,(()=>{var V=J(()=>k()==="saving");return()=>V()?_("globalConfig.saveStatusSaving"):_("globalConfig.saveStatusSaved")})()),q}})]}})}}),f(j,{get when(){return!I()},get fallback(){return(()=>{var q=iL();return x(q,()=>_("common.loading")),q})()},get children(){var q=oL(),V=q.firstChild,ce=V.nextSibling,Ae=ce.firstChild,Le=Ae.nextSibling,qe=ce.nextSibling,ut=qe.firstChild,$t=ut.nextSibling;return x(V,f(Yo,{get label(){return _("globalConfig.agentDefault")},get value(){return t()},get options(){return oe().map(Be=>({value:Be,label:H(Be)}))},onChange:W}),null),x(V,f(Yo,{get label(){return _("globalConfig.model")},get value(){return i()},get options(){return _e()},get searchable(){return l().models.length>10},get filterPlaceholder(){return _("common.filterOptions")},get emptyText(){return _("common.noMatchingOptions")},get disabled(){return d()||_e().length<=1},onChange:M}),null),x(V,f(Yo,{get label(){return _("globalConfig.reasoningEffort")},get value(){return a()},get options(){return fe()},get disabled(){return d()||fe().length<=1},onChange:Y}),null),x(Ae,()=>_("globalConfig.sessionEnd")),x(Le,f(ti,{get checked(){return h()},onChange:xe,class:"flex items-center gap-2",get children(){return[f(ni,{}),f(Gi,{get children(){return _("globalConfig.banner")}})]}}),null),x(Le,f(ti,{get checked(){return m()},onChange:Te,class:"flex items-center gap-2",get children(){return[f(ni,{}),f(Gi,{get children(){return _("globalConfig.sound")}})]}}),null),x(q,f(ir,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return v()},onChange:Be=>bt(Be),get children(){return[f(Id,{class:"mb-1.5 w-full font-medium",get children(){return _("globalConfig.powerTitle")}}),J(()=>["system-default","prevent-display-sleep","keep-system-awake"].map(Be=>f(Cn,{value:Be,class:"flex items-center gap-1.5",get children(){return[f(_n,{}),f(Nn,{}),f(En,{class:"cursor-pointer",get children(){return Z(Be)}})]}})))]}}),qe),x(ut,()=>_("globalConfig.shortcutsTitle")),x($t,f(at,{each:Rv,children:Be=>(()=>{var Ve=sL(),Qe=Ve.firstChild,wt=Qe.firstChild,Dt=wt.nextSibling;return x(wt,()=>z(Be)),x(Dt,()=>te(Be)),x(Ve,f(we,{type:"button",variant:"outline",size:"sm",onClick:()=>A(Be),get children(){return J(()=>C()===Be)()?_("globalConfig.shortcutRecordingButton"):_("globalConfig.shortcutRecord")}}),null),x(Ve,f(we,{type:"button",variant:"ghost",size:"sm",onClick:()=>he(Be),get disabled(){return te(Be)===Dr[Be]},get children(){return _("globalConfig.shortcutReset")}}),null),$e(()=>kt(Dt,`m-0 font-mono text-sm ${N().has(Be)?"text-destructive":"text-muted-foreground"}`)),Ve})()})),x(qe,f(j,{get when(){return N().size>0},get children(){var Be=rL();return x(Be,()=>_("globalConfig.shortcutConflict")),Be}}),null),x(q,(()=>{var Be=J(()=>!!R());return()=>Be()&&(()=>{var Ve=aL();return x(Ve,R),Ve})()})(),null),q}})]}})}})},[$p,cL]=T(!0);function dL(){const e=VE(cL);ue(e)}const fL=200,gL=8e3;async function hL({id:e,list:t,intervalMs:n=fL,timeoutMs:r=gL,sleep:o=pL}){const i=Math.max(1,n),s=Math.max(1,Math.ceil(r/i)+1);for(let a=0;a<s;a++){try{if(!(await t()).some(l=>l.id===e))return!0}catch{}a<s-1&&await o(i)}return!1}function pL(e){return new Promise(t=>window.setTimeout(t,e))}var mL=$('<span class="absolute right-2 top-2 h-2 w-2 rounded-full bg-destructive">'),bL=$('<div class="border-b px-3 py-2">'),yL=$('<div class="rounded-md px-2 py-2 text-sm"><div class="flex items-center gap-3"><div class="min-w-0 flex-1"><div class="font-medium text-destructive"></div><p class="mt-1 text-xs leading-5 text-muted-foreground"> <code class="rounded bg-muted px-1 py-0.5 font-mono text-foreground">yorz serve start'),vL=$('<div class="max-h-96 overflow-auto p-2">'),wL=$('<div class="rounded-md px-2 py-2 text-sm"><div class="flex items-center gap-3"><div class="min-w-0 flex-1"><div class=font-medium></div><p class="mt-1 text-xs leading-5 text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-1 self-center">');function xL(){const[e,t]=T([]),[n,r]=T(null);dL();async function o(){try{t(await pe.listSystemNotifications())}catch{}}re(()=>{o();const u=GE(()=>void o());ue(u)});async function i(u){r(u);try{await pe.deleteSystemNotification(u),await o()}finally{r(null)}}async function s(u){r(u);try{await pe.updateSystemNotification(u),await o()}finally{r(null)}}async function a(u){r(u);try{await pe.restartSystemNotification(u),t(l=>l.filter(c=>c.id!==u)),await hL({id:u,list:pe.listSystemNotifications}),window.location.reload()}finally{r(null)}}return f(j,{get when(){return e().length>0||!$p()},get children(){return f(Qo,{placement:"bottom-start",get children(){return[f(Jo,{as:we,variant:"ghost",size:"icon",class:"relative h-8 w-8",get title(){return _("systemNotifications.title")},get children(){return[f(T_,{class:"h-4 w-4"}),mL()]}}),f(ei,{class:"w-[26rem] max-w-[calc(100vw-2rem)] p-0",get children(){return[(()=>{var u=bL();return x(u,f(by,{class:"text-sm font-semibold",get children(){return _("systemNotifications.title")}})),u})(),(()=>{var u=vL();return x(u,f(j,{get when(){return!$p()},get children(){var l=yL(),c=l.firstChild,d=c.firstChild,g=d.firstChild,h=g.nextSibling,p=h.firstChild;return x(g,()=>_("systemNotifications.disconnectedTitle")),x(h,()=>_("systemNotifications.disconnectedMessage"),p),l}}),null),x(u,f(at,{get each(){return e()},children:l=>(()=>{var c=wL(),d=c.firstChild,g=d.firstChild,h=g.firstChild,p=h.nextSibling,m=g.nextSibling;return x(h,()=>_L(l)),x(p,()=>EL(l)),x(m,f(j,{get when(){return l.kind==="version-update"},get children(){return f(j,{get when(){return l.action==="restart-ready"},get fallback(){return f(we,{variant:"ghost",size:"sm",class:"h-7 px-2 hover:bg-primary hover:text-primary-foreground",get disabled(){return n()===l.id||l.action==="updating"},onClick:()=>void s(l.id),get children(){return f(j,{get when(){return n()===l.id||l.action==="updating"},get fallback(){return _("systemNotifications.update")},get children(){return[f(iE,{class:"mr-1 h-3.5 w-3.5 animate-spin"}),J(()=>_("systemNotifications.updating"))]}})}})},get children(){return f(Ad,{openDelay:150,closeDelay:0,get children(){return[f(kd,{as:we,variant:"ghost",size:"sm",class:"h-7 px-2 hover:bg-primary hover:text-primary-foreground",get disabled(){return n()===l.id},onClick:()=>void a(l.id),get children(){return _("systemNotifications.restart")}}),f(Td,{get children(){return _("systemNotifications.restartTooltip")}})]}})}})}}),null),x(m,f(we,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0 text-destructive hover:bg-destructive/10 hover:text-destructive",get title(){return _("systemNotifications.delete")},get disabled(){return n()===l.id},onClick:()=>void i(l.id),get children(){return f(Vc,{class:"h-4 w-4"})}}),null),c})()}),null),u})()]}})]}})}})}function _L(e){return e.kind==="version-update"?_("systemNotifications.versionTitle"):e.title}function EL(e){return e.kind!=="version-update"?e.message:_("systemNotifications.versionMessage",{current:e.metadata?.currentVersion??"",latest:e.metadata?.latestVersion??""})}var Bo={},Nl,Lp;function CL(){return Lp||(Lp=1,Nl=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Nl}var Ml={},Kr={},Fp;function Ao(){if(Fp)return Kr;Fp=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Kr.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},Kr.getSymbolTotalCodewords=function(r){return t[r]},Kr.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},Kr.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},Kr.isKanjiModeEnabled=function(){return typeof e<"u"},Kr.toSJIS=function(r){return e(r)},Kr}var Pl={},Bp;function Hd(){return Bp||(Bp=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(Pl)),Pl}var $l,zp;function SL(){if(zp)return $l;zp=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},$l=e,$l}var Ll,Up;function kL(){if(Up)return Ll;Up=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,o){const i=t*this.size+n;this.data[i]=r,o&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},Ll=e,Ll}var Fl={},Kp;function AL(){return Kp||(Kp=1,(function(e){const t=Ao().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,i=t(r),s=i===145?26:Math.ceil((i-13)/(2*o-2))*2,a=[i-7];for(let u=1;u<o-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},e.getPositions=function(r){const o=[],i=e.getRowColCoords(r),s=i.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||o.push([i[a],i[u]]);return o}})(Fl)),Fl}var Bl={},jp;function TL(){if(jp)return Bl;jp=1;const e=Ao().getSymbolSize,t=7;return Bl.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},Bl}var zl={},qp;function IL(){return qp||(qp=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const i=o.size;let s=0,a=0,u=0,l=null,c=null;for(let d=0;d<i;d++){a=u=0,l=c=null;for(let g=0;g<i;g++){let h=o.get(d,g);h===l?a++:(a>=5&&(s+=t.N1+(a-5)),l=h,a=1),h=o.get(g,d),h===c?u++:(u>=5&&(s+=t.N1+(u-5)),c=h,u=1)}a>=5&&(s+=t.N1+(a-5)),u>=5&&(s+=t.N1+(u-5))}return s},e.getPenaltyN2=function(o){const i=o.size;let s=0;for(let a=0;a<i-1;a++)for(let u=0;u<i-1;u++){const l=o.get(a,u)+o.get(a,u+1)+o.get(a+1,u)+o.get(a+1,u+1);(l===4||l===0)&&s++}return s*t.N2},e.getPenaltyN3=function(o){const i=o.size;let s=0,a=0,u=0;for(let l=0;l<i;l++){a=u=0;for(let c=0;c<i;c++)a=a<<1&2047|o.get(l,c),c>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|o.get(c,l),c>=10&&(u===1488||u===93)&&s++}return s*t.N3},e.getPenaltyN4=function(o){let i=0;const s=o.data.length;for(let u=0;u<s;u++)i+=o.data[u];return Math.abs(Math.ceil(i*100/s/5)-10)*t.N4};function n(r,o,i){switch(r){case e.Patterns.PATTERN000:return(o+i)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(o+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return o*i%2+o*i%3===0;case e.Patterns.PATTERN110:return(o*i%2+o*i%3)%2===0;case e.Patterns.PATTERN111:return(o*i%3+(o+i)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,i){const s=i.size;for(let a=0;a<s;a++)for(let u=0;u<s;u++)i.isReserved(u,a)||i.xor(u,a,n(o,u,a))},e.getBestMask=function(o,i){const s=Object.keys(e.Patterns).length;let a=0,u=1/0;for(let l=0;l<s;l++){i(l),e.applyMask(l,o);const c=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(l,o),c<u&&(u=c,a=l)}return a}})(zl)),zl}var Us={},Hp;function Mv(){if(Hp)return Us;Hp=1;const e=Hd(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Us.getBlocksCount=function(o,i){switch(i){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},Us.getTotalCodewordsCount=function(o,i){switch(i){case e.L:return n[(o-1)*4+0];case e.M:return n[(o-1)*4+1];case e.Q:return n[(o-1)*4+2];case e.H:return n[(o-1)*4+3];default:return}},Us}var Ul={},wi={},Gp;function DL(){if(Gp)return wi;Gp=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let o=0;o<255;o++)e[o]=r,t[r]=o,r<<=1,r&256&&(r^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),wi.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},wi.exp=function(r){return e[r]},wi.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},wi}var Vp;function RL(){return Vp||(Vp=1,(function(e){const t=DL();e.mul=function(r,o){const i=new Uint8Array(r.length+o.length-1);for(let s=0;s<r.length;s++)for(let a=0;a<o.length;a++)i[s+a]^=t.mul(r[s],o[a]);return i},e.mod=function(r,o){let i=new Uint8Array(r);for(;i.length-o.length>=0;){const s=i[0];for(let u=0;u<o.length;u++)i[u]^=t.mul(o[u],s);let a=0;for(;a<i.length&&i[a]===0;)a++;i=i.slice(a)}return i},e.generateECPolynomial=function(r){let o=new Uint8Array([1]);for(let i=0;i<r;i++)o=e.mul(o,new Uint8Array([1,t.exp(i)]));return o}})(Ul)),Ul}var Kl,Wp;function OL(){if(Wp)return Kl;Wp=1;const e=RL();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(r.length+this.degree);o.set(r);const i=e.mod(o,this.genPoly),s=this.degree-i.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(i,s),a}return i},Kl=t,Kl}var jl={},ql={},Hl={},Yp;function Pv(){return Yp||(Yp=1,Hl.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Hl}var tr={},Zp;function $v(){if(Zp)return tr;Zp=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
36
+ ]))+`;tr.KANJI=new RegExp(n,"g"),tr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),tr.BYTE=new RegExp(r,"g"),tr.NUMERIC=new RegExp(e,"g"),tr.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),i=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return tr.testKanji=function(u){return o.test(u)},tr.testNumeric=function(u){return i.test(u)},tr.testAlphanumeric=function(u){return s.test(u)},tr}var Xp;function To(){return Xp||(Xp=1,(function(e){const t=Pv(),n=$v();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return n.testNumeric(i)?e.NUMERIC:n.testAlphanumeric(i)?e.ALPHANUMERIC:n.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(i,s){if(e.isValid(i))return i;try{return r(i)}catch{return s}}})(ql)),ql}var Jp;function NL(){return Jp||(Jp=1,(function(e){const t=Ao(),n=Mv(),r=Hd(),o=To(),i=Pv(),s=7973,a=t.getBCHDigit(s);function u(g,h,p){for(let m=1;m<=40;m++)if(h<=e.getCapacity(m,p,g))return m}function l(g,h){return o.getCharCountIndicator(g,h)+4}function c(g,h){let p=0;return g.forEach(function(m){const y=l(m.mode,h);p+=y+m.getBitsLength()}),p}function d(g,h){for(let p=1;p<=40;p++)if(c(g,p)<=e.getCapacity(p,h,o.MIXED))return p}e.from=function(h,p){return i.isValid(h)?parseInt(h,10):p},e.getCapacity=function(h,p,m){if(!i.isValid(h))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=o.BYTE);const y=t.getSymbolTotalCodewords(h),v=n.getTotalCodewordsCount(h,p),b=(y-v)*8;if(m===o.MIXED)return b;const w=b-l(m,h);switch(m){case o.NUMERIC:return Math.floor(w/10*3);case o.ALPHANUMERIC:return Math.floor(w/11*2);case o.KANJI:return Math.floor(w/13);case o.BYTE:default:return Math.floor(w/8)}},e.getBestVersionForData=function(h,p){let m;const y=r.from(p,r.M);if(Array.isArray(h)){if(h.length>1)return d(h,y);if(h.length===0)return 1;m=h[0]}else m=h;return u(m.mode,m.getLength(),y)},e.getEncodedBits=function(h){if(!i.isValid(h)||h<7)throw new Error("Invalid QR Code version");let p=h<<12;for(;t.getBCHDigit(p)-a>=0;)p^=s<<t.getBCHDigit(p)-a;return h<<12|p}})(jl)),jl}var Gl={},Qp;function ML(){if(Qp)return Gl;Qp=1;const e=Ao(),t=1335,n=21522,r=e.getBCHDigit(t);return Gl.getEncodedBits=function(i,s){const a=i.bit<<3|s;let u=a<<10;for(;e.getBCHDigit(u)-r>=0;)u^=t<<e.getBCHDigit(u)-r;return(a<<10|u)^n},Gl}var Vl={},Wl,em;function PL(){if(em)return Wl;em=1;const e=To();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let o,i,s;for(o=0;o+3<=this.data.length;o+=3)i=this.data.substr(o,3),s=parseInt(i,10),r.put(s,10);const a=this.data.length-o;a>0&&(i=this.data.substr(o),s=parseInt(i,10),r.put(s,a*3+1))},Wl=t,Wl}var Yl,tm;function $L(){if(tm)return Yl;tm=1;const e=To(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){let i;for(i=0;i+2<=this.data.length;i+=2){let s=t.indexOf(this.data[i])*45;s+=t.indexOf(this.data[i+1]),o.put(s,11)}this.data.length%2&&o.put(t.indexOf(this.data[i]),6)},Yl=n,Yl}var Zl,nm;function LL(){if(nm)return Zl;nm=1;const e=To();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,o=this.data.length;r<o;r++)n.put(this.data[r],8)},Zl=t,Zl}var Xl,rm;function FL(){if(rm)return Xl;rm=1;const e=To(),t=Ao();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(o){return o*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let o;for(o=0;o<this.data.length;o++){let i=t.toSJIS(this.data[o]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
37
+ Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),r.put(i,13)}},Xl=n,Xl}var Jl={exports:{}},om;function BL(){return om||(om=1,(function(e){var t={single_source_shortest_paths:function(n,r,o){var i={},s={};s[r]=0;var a=t.PriorityQueue.make();a.push(r,0);for(var u,l,c,d,g,h,p,m,y;!a.empty();){u=a.pop(),l=u.value,d=u.cost,g=n[l]||{};for(c in g)g.hasOwnProperty(c)&&(h=g[c],p=d+h,m=s[c],y=typeof s[c]>"u",(y||m>p)&&(s[c]=p,a.push(c,p),i[c]=l))}if(typeof o<"u"&&typeof s[o]>"u"){var v=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(v)}return i},extract_shortest_path_from_predecessor_list:function(n,r){for(var o=[],i=r;i;)o.push(i),n[i],i=n[i];return o.reverse(),o},find_path:function(n,r,o){var i=t.single_source_shortest_paths(n,r,o);return t.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,o={},i;n=n||{};for(i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);return o.queue=[],o.sorter=n.sorter||r.default_sorter,o},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var o={value:n,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Jl)),Jl.exports}var im;function zL(){return im||(im=1,(function(e){const t=To(),n=PL(),r=$L(),o=LL(),i=FL(),s=$v(),a=Ao(),u=BL();function l(v){return unescape(encodeURIComponent(v)).length}function c(v,b,w){const E=[];let C;for(;(C=v.exec(w))!==null;)E.push({data:C[0],index:C.index,mode:b,length:C[0].length});return E}function d(v){const b=c(s.NUMERIC,t.NUMERIC,v),w=c(s.ALPHANUMERIC,t.ALPHANUMERIC,v);let E,C;return a.isKanjiModeEnabled()?(E=c(s.BYTE,t.BYTE,v),C=c(s.KANJI,t.KANJI,v)):(E=c(s.BYTE_KANJI,t.BYTE,v),C=[]),b.concat(w,E,C).sort(function(I,S){return I.index-S.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function g(v,b){switch(b){case t.NUMERIC:return n.getBitsLength(v);case t.ALPHANUMERIC:return r.getBitsLength(v);case t.KANJI:return i.getBitsLength(v);case t.BYTE:return o.getBitsLength(v)}}function h(v){return v.reduce(function(b,w){const E=b.length-1>=0?b[b.length-1]:null;return E&&E.mode===w.mode?(b[b.length-1].data+=w.data,b):(b.push(w),b)},[])}function p(v){const b=[];for(let w=0;w<v.length;w++){const E=v[w];switch(E.mode){case t.NUMERIC:b.push([E,{data:E.data,mode:t.ALPHANUMERIC,length:E.length},{data:E.data,mode:t.BYTE,length:E.length}]);break;case t.ALPHANUMERIC:b.push([E,{data:E.data,mode:t.BYTE,length:E.length}]);break;case t.KANJI:b.push([E,{data:E.data,mode:t.BYTE,length:l(E.data)}]);break;case t.BYTE:b.push([{data:E.data,mode:t.BYTE,length:l(E.data)}])}}return b}function m(v,b){const w={},E={start:{}};let C=["start"];for(let A=0;A<v.length;A++){const I=v[A],S=[];for(let k=0;k<I.length;k++){const P=I[k],R=""+A+k;S.push(R),w[R]={node:P,lastCount:0},E[R]={};for(let L=0;L<C.length;L++){const F=C[L];w[F]&&w[F].node.mode===P.mode?(E[F][R]=g(w[F].lastCount+P.length,P.mode)-g(w[F].lastCount,P.mode),w[F].lastCount+=P.length):(w[F]&&(w[F].lastCount=P.length),E[F][R]=g(P.length,P.mode)+4+t.getCharCountIndicator(P.mode,b))}}C=S}for(let A=0;A<C.length;A++)E[C[A]].end=0;return{map:E,table:w}}function y(v,b){let w;const E=t.getBestModeForData(v);if(w=t.from(b,E),w!==t.BYTE&&w.bit<E.bit)throw new Error('"'+v+'" cannot be encoded with mode '+t.toString(w)+`.
38
+ Suggested mode is: `+t.toString(E));switch(w===t.KANJI&&!a.isKanjiModeEnabled()&&(w=t.BYTE),w){case t.NUMERIC:return new n(v);case t.ALPHANUMERIC:return new r(v);case t.KANJI:return new i(v);case t.BYTE:return new o(v)}}e.fromArray=function(b){return b.reduce(function(w,E){return typeof E=="string"?w.push(y(E,null)):E.data&&w.push(y(E.data,E.mode)),w},[])},e.fromString=function(b,w){const E=d(b,a.isKanjiModeEnabled()),C=p(E),A=m(C,w),I=u.find_path(A.map,"start","end"),S=[];for(let k=1;k<I.length-1;k++)S.push(A.table[I[k]].node);return e.fromArray(h(S))},e.rawSplit=function(b){return e.fromArray(d(b,a.isKanjiModeEnabled()))}})(Vl)),Vl}var sm;function UL(){if(sm)return Ml;sm=1;const e=Ao(),t=Hd(),n=SL(),r=kL(),o=AL(),i=TL(),s=IL(),a=Mv(),u=OL(),l=NL(),c=ML(),d=To(),g=zL();function h(A,I){const S=A.size,k=i.getPositions(I);for(let P=0;P<k.length;P++){const R=k[P][0],L=k[P][1];for(let F=-1;F<=7;F++)if(!(R+F<=-1||S<=R+F))for(let D=-1;D<=7;D++)L+D<=-1||S<=L+D||(F>=0&&F<=6&&(D===0||D===6)||D>=0&&D<=6&&(F===0||F===6)||F>=2&&F<=4&&D>=2&&D<=4?A.set(R+F,L+D,!0,!0):A.set(R+F,L+D,!1,!0))}}function p(A){const I=A.size;for(let S=8;S<I-8;S++){const k=S%2===0;A.set(S,6,k,!0),A.set(6,S,k,!0)}}function m(A,I){const S=o.getPositions(I);for(let k=0;k<S.length;k++){const P=S[k][0],R=S[k][1];for(let L=-2;L<=2;L++)for(let F=-2;F<=2;F++)L===-2||L===2||F===-2||F===2||L===0&&F===0?A.set(P+L,R+F,!0,!0):A.set(P+L,R+F,!1,!0)}}function y(A,I){const S=A.size,k=l.getEncodedBits(I);let P,R,L;for(let F=0;F<18;F++)P=Math.floor(F/3),R=F%3+S-8-3,L=(k>>F&1)===1,A.set(P,R,L,!0),A.set(R,P,L,!0)}function v(A,I,S){const k=A.size,P=c.getEncodedBits(I,S);let R,L;for(R=0;R<15;R++)L=(P>>R&1)===1,R<6?A.set(R,8,L,!0):R<8?A.set(R+1,8,L,!0):A.set(k-15+R,8,L,!0),R<8?A.set(8,k-R-1,L,!0):R<9?A.set(8,15-R-1+1,L,!0):A.set(8,15-R-1,L,!0);A.set(k-8,8,1,!0)}function b(A,I){const S=A.size;let k=-1,P=S-1,R=7,L=0;for(let F=S-1;F>0;F-=2)for(F===6&&F--;;){for(let D=0;D<2;D++)if(!A.isReserved(P,F-D)){let B=!1;L<I.length&&(B=(I[L]>>>R&1)===1),A.set(P,F-D,B),R--,R===-1&&(L++,R=7)}if(P+=k,P<0||S<=P){P-=k,k=-k;break}}}function w(A,I,S){const k=new n;S.forEach(function(D){k.put(D.mode.bit,4),k.put(D.getLength(),d.getCharCountIndicator(D.mode,A)),D.write(k)});const P=e.getSymbolTotalCodewords(A),R=a.getTotalCodewordsCount(A,I),L=(P-R)*8;for(k.getLengthInBits()+4<=L&&k.put(0,4);k.getLengthInBits()%8!==0;)k.putBit(0);const F=(L-k.getLengthInBits())/8;for(let D=0;D<F;D++)k.put(D%2?17:236,8);return E(k,A,I)}function E(A,I,S){const k=e.getSymbolTotalCodewords(I),P=a.getTotalCodewordsCount(I,S),R=k-P,L=a.getBlocksCount(I,S),F=k%L,D=L-F,B=Math.floor(k/L),N=Math.floor(R/L),X=N+1,se=B-N,K=new u(se);let U=0;const oe=new Array(L),H=new Array(L);let z=0;const Z=new Uint8Array(A.buffer);for(let Y=0;Y<L;Y++){const ae=Y<D?N:X;oe[Y]=Z.slice(U,U+ae),H[Y]=K.encode(oe[Y]),U+=ae,z=Math.max(z,ae)}const te=new Uint8Array(k);let he=0,W,M;for(W=0;W<z;W++)for(M=0;M<L;M++)W<oe[M].length&&(te[he++]=oe[M][W]);for(W=0;W<se;W++)for(M=0;M<L;M++)te[he++]=H[M][W];return te}function C(A,I,S,k){let P;if(Array.isArray(A))P=g.fromArray(A);else if(typeof A=="string"){let B=I;if(!B){const N=g.rawSplit(A);B=l.getBestVersionForData(N,S)}P=g.fromString(A,B||40)}else throw new Error("Invalid data");const R=l.getBestVersionForData(P,S);if(!R)throw new Error("The amount of data is too big to be stored in a QR Code");if(!I)I=R;else if(I<R)throw new Error(`
39
+ The chosen QR Code version cannot contain this amount of data.
40
+ Minimum version required to store current data is: `+R+`.
41
+ `);const L=w(I,S,P),F=e.getSymbolSize(I),D=new r(F);return h(D,I),p(D),m(D,I),v(D,S,0),I>=7&&y(D,I),b(D,L),isNaN(k)&&(k=s.getBestMask(D,v.bind(null,D,S))),s.applyMask(k,D),v(D,S,k),{modules:D,version:I,errorCorrectionLevel:S,maskPattern:k,segments:P}}return Ml.create=function(I,S){if(typeof I>"u"||I==="")throw new Error("No input text");let k=t.M,P,R;return typeof S<"u"&&(k=t.from(S.errorCorrectionLevel,t.M),P=l.from(S.version),R=s.from(S.maskPattern),S.toSJISFunc&&e.setToSJISFunction(S.toSJISFunc)),C(I,P,k,R)},Ml}var Ql={},ec={},am;function Lv(){return am||(am=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(i){return[i,i]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,i=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:i,scale:i?4:s,margin:o,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},e.getImageWidth=function(r,o){const i=e.getScale(r,o);return Math.floor((r+o.margin*2)*i)},e.qrToImageData=function(r,o,i){const s=o.modules.size,a=o.modules.data,u=e.getScale(s,i),l=Math.floor((s+i.margin*2)*u),c=i.margin*u,d=[i.color.light,i.color.dark];for(let g=0;g<l;g++)for(let h=0;h<l;h++){let p=(g*l+h)*4,m=i.color.light;if(g>=c&&h>=c&&g<l-c&&h<l-c){const y=Math.floor((g-c)/u),v=Math.floor((h-c)/u);m=d[a[y*s+v]?1:0]}r[p++]=m.r,r[p++]=m.g,r[p++]=m.b,r[p]=m.a}}})(ec)),ec}var um;function KL(){return um||(um=1,(function(e){const t=Lv();function n(o,i,s){o.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=s,i.width=s,i.style.height=s+"px",i.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(i,s,a){let u=a,l=s;typeof u>"u"&&(!s||!s.getContext)&&(u=s,s=void 0),s||(l=r()),u=t.getOptions(u);const c=t.getImageWidth(i.modules.size,u),d=l.getContext("2d"),g=d.createImageData(c,c);return t.qrToImageData(g.data,i,u),n(d,l,c),d.putImageData(g,0,0),l},e.renderToDataURL=function(i,s,a){let u=a;typeof u>"u"&&(!s||!s.getContext)&&(u=s,s=void 0),u||(u={});const l=e.render(i,s,u),c=u.type||"image/png",d=u.rendererOpts||{};return l.toDataURL(c,d.quality)}})(Ql)),Ql}var tc={},lm;function jL(){if(lm)return tc;lm=1;const e=Lv();function t(o,i){const s=o.a/255,a=i+'="'+o.hex+'"';return s<1?a+" "+i+'-opacity="'+s.toFixed(2).slice(1)+'"':a}function n(o,i,s){let a=o+i;return typeof s<"u"&&(a+=" "+s),a}function r(o,i,s){let a="",u=0,l=!1,c=0;for(let d=0;d<o.length;d++){const g=Math.floor(d%i),h=Math.floor(d/i);!g&&!l&&(l=!0),o[d]?(c++,d>0&&g>0&&o[d-1]||(a+=l?n("M",g+s,.5+h+s):n("m",u,0),u=0,l=!1),g+1<i&&o[d+1]||(a+=n("h",c),c=0)):u++}return a}return tc.render=function(i,s,a){const u=e.getOptions(s),l=i.modules.size,c=i.modules.data,d=l+u.margin*2,g=u.color.light.a?"<path "+t(u.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",h="<path "+t(u.color.dark,"stroke")+' d="'+r(c,l,u.margin)+'"/>',p='viewBox="0 0 '+d+" "+d+'"',y='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+p+' shape-rendering="crispEdges">'+g+h+`</svg>
42
+ `;return typeof a=="function"&&a(null,y),y},tc}var cm;function qL(){if(cm)return Bo;cm=1;const e=CL(),t=UL(),n=KL(),r=jL();function o(i,s,a,u,l){const c=[].slice.call(arguments,1),d=c.length,g=typeof c[d-1]=="function";if(!g&&!e())throw new Error("Callback required as last argument");if(g){if(d<2)throw new Error("Too few arguments provided");d===2?(l=a,a=s,s=u=void 0):d===3&&(s.getContext&&typeof l>"u"?(l=u,u=void 0):(l=u,u=a,a=s,s=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=s,s=u=void 0):d===2&&!s.getContext&&(u=a,a=s,s=void 0),new Promise(function(h,p){try{const m=t.create(a,u);h(i(m,s,u))}catch(m){p(m)}})}try{const h=t.create(a,u);l(null,i(h,s,u))}catch(h){l(h)}}return Bo.create=t.create,Bo.toCanvas=o.bind(null,n.render),Bo.toDataURL=o.bind(null,n.renderToDataURL),Bo.toString=o.bind(null,function(i,s,a){return r.render(i,a)}),Bo}var HL=qL();const GL=bs(HL);var VL=$('<p class="mb-3 text-xs text-muted-foreground">'),WL=$('<img class="h-44 w-44 rounded bg-white p-2">'),YL=$('<div class="flex flex-col items-center gap-3"><div class="font-mono text-lg tracking-widest"></div><button type=button class="text-xs text-muted-foreground underline">'),ZL=$('<div class="py-10 text-center text-sm text-muted-foreground">'),XL=$('<div class="flex flex-col items-center gap-3 py-4"><p class="text-sm text-destructive">');function JL(){const[e,t]=T(!1),[n,r]=T(null),[o,i]=T(null),[s,a]=T(!1),[u,l]=T(!1),c=async()=>{l(!0),a(!1);try{const d=await pe.getPairingCode();r(d.code);const g=await GL.toDataURL(d.code,{width:220,margin:1});i(g)}catch{a(!0),r(null),i(null)}finally{l(!1)}};return re(()=>{e()&&c()}),f(Qo,{get open(){return e()},onOpenChange:t,get children(){return[f(Jo,{as:we,variant:"ghost",size:"icon",get title(){return _("pairing.title")},get children(){return f(Q2,{class:"h-4 w-4"})}}),f(ei,{class:"w-72",get children(){return[f(by,{class:"mb-2 pr-6 text-sm font-semibold",get children(){return _("pairing.title")}}),(()=>{var d=VL();return x(d,()=>_("pairing.hint")),d})(),f(j,{get when(){return!u()},get fallback(){return(()=>{var d=ZL();return x(d,()=>_("pairing.loading")),d})()},get children(){return f(j,{get when(){return!s()},get fallback(){return(()=>{var d=XL(),g=d.firstChild;return x(g,()=>_("pairing.error")),x(d,f(we,{size:"sm",variant:"outline",onClick:()=>void c(),get children(){return _("pairing.retry")}}),null),d})()},get children(){var d=YL(),g=d.firstChild,h=g.nextSibling;return x(d,f(j,{get when(){return o()},get children(){var p=WL();return $e(m=>{var y=o(),v=_("pairing.title");return y!==m.e&&Ke(p,"src",m.e=y),v!==m.t&&Ke(p,"alt",m.t=v),m},{e:void 0,t:void 0}),p}}),g),x(g,n),h.$$click=()=>void c(),x(h,()=>_("pairing.refresh")),d}})}})]}})]}})}Gt(["click"]);function QL(e,t){return typeof t=="number"?t===0?null:t<0?"back":"forward":CM(e,xv(t))}var dm=$('<div class="px-2 py-1 text-xs text-muted-foreground">'),e5=$('<div class="shrink-0 border-b border-destructive/40 bg-destructive/10 px-4 py-2 text-xs text-destructive">'),t5=$('<div class="flex h-full flex-col"><header class="flex h-12 shrink-0 items-center gap-2 border-b bg-card px-4"><div class="ml-auto flex items-center gap-2"></div></header><div class="flex min-h-0 flex-1"><main class="vt-page flex min-h-0 min-w-0 flex-1 flex-col overflow-auto">');const n5=[{mode:"system",labelKey:"shell.themeSystem",icon:r0},{mode:"light",labelKey:"shell.themeLight",icon:pE},{mode:"dark",labelKey:"shell.themeDark",icon:z2}],r5=[{name:"terminal",labelKey:"shell.themeTerminal"},{name:"graphite",labelKey:"shell.themeGraphite"},{name:"paper",labelKey:"shell.themePaper"}],o5="https://github.com/hughfenghen/YorZ/blob/main/docs",i5=e=>{const t=ai(),n=Qr();AM({resolveDirection:QL});const{lng:r,changeLanguage:o}=_d(),[i,s]=T(!1),a=ne(()=>t.pathname===Bt("specs/new")),u=ne(()=>`${o5}/${r().startsWith("en")?"User-Guide.md":"User-Guide-CN.md"}`);function l(m){m!==r()&&(o(m),Di(y=>({...y,appearance:{...y.appearance,language:m}})))}function c(m){Ym(m),Di(y=>({...y,appearance:{...y.appearance,themeMode:m}}))}function d(m){i_(m),Di(y=>({...y,appearance:{...y.appearance,themeName:m}}))}function g(){if(!St())return;const m=Bt("specs/new");a()?window.open(m,"_blank","noopener"):n(m)}function h(m){const y=wa(Mn().shortcuts);if(m===y.newSpec)return g(),!0;if(m===y.projectSettings)return LE(),!0;if(m===y.globalSettings)return s(v=>!v),!0;if(m===y.toggleSpecDetailFullscreen){const v=$E();return v?(v(),!0):!1}return!1}const p=m=>{if(m.defaultPrevented)return;const y=Ov(m);if(!y)return;const v=wa(Mn().shortcuts),b=y===v.toggleSpecDetailFullscreen||y===v.projectSettings||y===v.globalSettings;eL(m.target)&&!b||y!==Dr.newSpec&&y!==Dr.projectSettings&&y!==Dr.toggleSpecDetailFullscreen&&y!==Dr.globalSettings&&!Object.values(Mn().shortcuts).includes(y)||h(y)&&m.preventDefault()};return An(()=>{SP(),window.addEventListener("keydown",p)}),ue(()=>window.removeEventListener("keydown",p)),re(()=>{const m=t.pathname.match(/^\/([^/]+)/);OE(m&&m[1]!=="api"?m[1]:"")}),(()=>{var m=t5(),y=m.firstChild,v=y.firstChild,b=y.nextSibling,w=b.firstChild;return x(y,f(Kn,{href:"/",class:"text-lg font-bold",children:"YorZ"}),v),x(y,f(JL,{}),v),x(y,f(xL,{}),v),x(v,f(j,{get when(){return St()},get children(){return f(we,{as:Kn,get href(){return Bt("specs/new")},get target(){return a()?"_blank":void 0},get rel(){return a()?"noopener":void 0},variant:"default",size:"sm",get children(){return[f(Wr,{class:"mr-1 h-4 w-4"}),J(()=>_("shell.newSpec"))]}})}}),null),x(v,f(Cd,{placement:"bottom-end",get children(){return[f(Ed,{as:we,variant:"ghost",size:"icon",get title(){return _("shell.settingsMenu")},get children(){return f(O2,{class:"h-4 w-4"})}}),f(Sd,{get children(){return[f(_g,{get children(){return[f(Eg,{"data-submenu":"language",get children(){return[f(C2,{class:"mr-2 h-4 w-4"}),J(()=>_("shell.languageSwitch"))]}}),f(Cg,{get children(){return[f(rr,{onSelect:()=>l("zh-CN"),get children(){return[f(Ei,{get class(){return`mr-2 h-4 w-4 ${r()==="zh-CN"?"opacity-100":"opacity-0"}`}}),J(()=>_("shell.langZh"))]}}),f(rr,{onSelect:()=>l("en"),get children(){return[f(Ei,{get class(){return`mr-2 h-4 w-4 ${r()==="en"?"opacity-100":"opacity-0"}`}}),J(()=>_("shell.langEn"))]}})]}})]}}),f(_g,{get children(){return[f(Eg,{"data-submenu":"theme",get children(){return[f(j2,{class:"mr-2 h-4 w-4"}),J(()=>_("shell.themeSwitch"))]}}),f(Cg,{get children(){return[(()=>{var E=dm();return x(E,()=>_("shell.themeModeGroup")),E})(),f(at,{each:n5,children:E=>f(rr,{get"data-theme-option"(){return E.mode},onSelect:()=>c(E.mode),get children(){return[f(Ei,{get class(){return`mr-2 h-4 w-4 ${ia()===E.mode?"opacity-100":"opacity-0"}`}}),f(E.icon,{class:"mr-2 h-4 w-4 text-muted-foreground"}),J(()=>_(E.labelKey))]}})}),f(kc,{}),(()=>{var E=dm();return x(E,()=>_("shell.themeNameGroup")),E})(),f(at,{each:r5,children:E=>f(rr,{get"data-theme-name-option"(){return E.name},onSelect:()=>d(E.name),get children(){return[f(Ei,{get class(){return`mr-2 h-4 w-4 ${sa()===E.name?"opacity-100":"opacity-0"}`}}),J(()=>_(E.labelKey))]}})})]}})]}}),f(kc,{}),f(rr,{onSelect:()=>s(!0),get children(){return[f(cE,{class:"mr-2 h-4 w-4"}),J(()=>_("shell.globalConfig"))]}}),f(rr,{as:"a","data-menu-item":"user-guide",get href(){return u()},target:"_blank",rel:"noopener noreferrer",get children(){return[f(R_,{class:"mr-2 h-4 w-4"}),J(()=>_("shell.userGuide"))]}})]}})]}}),null),x(m,f(j,{get when(){return d_()},get children(){var E=e5();return x(E,()=>_("pairing.unauthorized")),E}}),b),x(b,f(wP,{}),w),x(b,f(J$,{}),w),x(w,()=>e.children),x(m,f(EA,{position:"top-center"}),null),x(m,f(lL,{get open(){return i()},onClose:()=>s(!1)}),null),m})()};a_({persistHint:!1});h_();const Fv=document.getElementById("app");if(!Fv)throw new Error("missing #app root");bw(()=>f(ox,{root:i5,get children(){return[f(_r,{path:"/",component:xM}),f(_r,{path:"/:projectId",component:dT}),f(_r,{path:"/:projectId/git",component:WN}),f(_r,{path:"/:projectId/commands/:runId",component:aM}),f(_r,{path:"/:projectId/specs/new",component:aI}),f(_r,{path:"/:projectId/specs/:id",component:$4}),f(_r,{path:"/:projectId/specs/:id/review",component:_N}),f(_r,{path:"/:projectId/specs/:id/debug",component:TN}),f(_r,{path:"*",component:wv})]}}),Fv);queueMicrotask(()=>{const e=document.body,t=document.documentElement;console.log("[body-overflow-diagnostic]",{bodyScrollHeight:e.scrollHeight,bodyClientHeight:e.clientHeight,docScrollHeight:t.scrollHeight,docClientHeight:t.clientHeight,windowInnerHeight:window.innerHeight,bodyOverflowing:e.scrollHeight>e.clientHeight,docOverflowing:t.scrollHeight>t.clientHeight})});export{fO as _,bs as g};