getborg 0.0.98 → 0.0.117

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/{BunPtyAdapter-BO6MRm-I.mjs → BunPtyAdapter-kPTUT2mb.mjs} +3 -3
  2. package/dist/{Config-gKAe02uc.mjs → Config-DvH5tPG0.mjs} +2 -2
  3. package/dist/{FetchHttpClient-Dkvk_2gy.mjs → FetchHttpClient-C-jciW95.mjs} +3 -3
  4. package/dist/{FileSystem-CME3BFzu.mjs → FileSystem-NX0EtGtm.mjs} +109 -3
  5. package/dist/{Mime-CECsj7CV.mjs → Mime-C6O17O_3.mjs} +5 -5
  6. package/dist/{NodeHttpIncomingMessage-0aW45tSl.mjs → NodeHttpIncomingMessage-CylGKvlB.mjs} +4 -4
  7. package/dist/{NodeHttpServer-CdXvBNNA.mjs → NodeHttpServer-EarHJJzn.mjs} +9 -9
  8. package/dist/{NodePtyAdapter-BWrlUEea.mjs → NodePtyAdapter-C6ioPYk6.mjs} +5 -5
  9. package/dist/{NodeServices-BHXunFtp.mjs → NodeServices-C18DO3cx.mjs} +6 -6
  10. package/dist/{NodeSqliteClient-BwW7kwrY.mjs → NodeSqliteClient-CWkKfsSo.mjs} +5 -5
  11. package/dist/{NodeStream-CWX36BNZ.mjs → NodeStream-1N7oXzTp.mjs} +3 -3
  12. package/dist/{Path-BdYWOglD.mjs → Path-ZDpyUmZ1.mjs} +2 -2
  13. package/dist/{PtyAdapter-DCErzU8T.mjs → PtyAdapter-DSEyRij4.mjs} +2 -2
  14. package/dist/{Schema-D5D4He-Q.mjs → Schema-CA_wFfhH.mjs} +292 -8
  15. package/dist/{SqlClient-CZnbSIGl.mjs → SqlClient-Cusaqpaw.mjs} +3 -3
  16. package/dist/bin.mjs +14257 -5060
  17. package/dist/{borgTelemetryNode-B9H2lcK5.mjs → borgTelemetryNode-CHLcRFOW.mjs} +6 -6
  18. package/dist/client/.vite/manifest.json +330 -330
  19. package/dist/client/assets/ArrowRight-CgvCTAzu.js +2 -0
  20. package/dist/client/assets/ArrowSquareOut-C1CwJQ7R.js +2 -0
  21. package/dist/client/assets/ArrowsClockwise-CBwAQTtQ.js +2 -0
  22. package/dist/client/assets/CaretLeft-Bk0n02vc.js +2 -0
  23. package/dist/client/assets/ChatMarkdown-BGNgYyxf.js +249 -0
  24. package/dist/client/assets/DesignWorkspace-Ddz8UJXt.js +3 -0
  25. package/dist/client/assets/DiffPanel-mzb-LNBg.js +2 -0
  26. package/dist/client/assets/DiffWorkerPoolProvider-iCAF4Ogc.js +10 -0
  27. package/dist/client/assets/DocxPreview-BKhbQZ7C.js +17 -0
  28. package/dist/client/assets/{FilePreviewPanel-BnW97AGU.js → FilePreviewPanel-DuxNlIRO.js} +19 -19
  29. package/dist/client/assets/HtmlPreview-DaZHfcMP.js +2 -0
  30. package/dist/client/assets/PdfPreview-BoUaG-ol.js +3 -0
  31. package/dist/client/assets/PptxPreview-BQU4yUZZ.js +3 -0
  32. package/dist/client/assets/PreviewPanel-CnjyoM26.js +2 -0
  33. package/dist/client/assets/PullRequestCodeTab-DM_H15J2.js +6 -0
  34. package/dist/client/assets/{PullRequestReactions-DefnDwQq.js → PullRequestReactions-CHoFc7lq.js} +4 -4
  35. package/dist/client/assets/{RightPanelResizeHandle-CWbwOS4Y.js → RightPanelResizeHandle-DBci-Ee2.js} +2 -2
  36. package/dist/client/assets/VirtualizedFile-CZoHsBen.js +2 -0
  37. package/dist/client/assets/XlsxPreview-DjwlT8cY.js +3 -0
  38. package/dist/client/assets/accountData-C4ZvicpJ.js +16 -0
  39. package/dist/client/assets/assetUrls-CrfozqHH.js +2 -0
  40. package/dist/client/assets/browserHistoryStore-7Le_ew5p.js +4 -0
  41. package/dist/client/assets/browserRecording-CSyywxgr.js +2 -0
  42. package/dist/client/assets/clientPersistenceStorage-BlYjZvCd.js +2 -0
  43. package/dist/client/assets/combobox-CiD-v9Ce.js +2 -0
  44. package/dist/client/assets/composerMentionDrag-DqJ92Sd8.js +2 -0
  45. package/dist/client/assets/designCanvas.logic-HpJw8lAO.js +8 -0
  46. package/dist/client/assets/designOpenFileContext-BP2f7uoG.js +2 -0
  47. package/dist/client/assets/diffFileContents-CpXvVerb.js +248 -0
  48. package/dist/client/assets/empty-BoorOwgr.js +2 -0
  49. package/dist/client/assets/entities-CYOkudic.js +2 -0
  50. package/dist/client/assets/env-71Gq9H0m.js +2 -0
  51. package/dist/client/assets/{index-B3D6JK2-.js → index-xOiIIEJO.js} +3 -3
  52. package/dist/client/assets/input-Dm20FTNt.js +2 -0
  53. package/dist/client/assets/{lib-xfuwsGna.js → lib-CP-ex6Vc.js} +2 -2
  54. package/dist/client/assets/main-SyzcWFeO.js +161 -0
  55. package/dist/client/assets/main-YscGsfgO.css +2 -0
  56. package/dist/client/assets/{pdf-Cr4HwsSN.js → pdf-DcYZLBb4.js} +2 -2
  57. package/dist/client/assets/popover-ivgAAZ7Z.js +2 -0
  58. package/dist/client/assets/{pptxDocument-Dxc3oYrP.js → pptxDocument-DtL8fmW3.js} +2 -2
  59. package/dist/client/assets/projectFilesQueryState-BwZ_KRI1.js +2 -0
  60. package/dist/client/assets/queries-DIo5yBTp.js +2 -0
  61. package/dist/client/assets/scroll-area-DKsvPvOo.js +1634 -0
  62. package/dist/client/assets/session-CgVsO0DD.js +67 -0
  63. package/dist/client/assets/spinner-DHhZaoFg.js +2 -0
  64. package/dist/client/assets/textarea-DprGKUyt.js +5 -0
  65. package/dist/client/assets/toggle-DwBa6pBo.js +2 -0
  66. package/dist/client/assets/toggle-group-BU7-0DcW.js +2 -0
  67. package/dist/client/assets/useWorkspaceMutationRefresh-DLI4brDf.js +2 -0
  68. package/dist/client/assets/utils-DgzD4MA_.js +30 -0
  69. package/dist/client/assets/{xlsxDocument-yc7zPhIi.js → xlsxDocument-iqdkqQBZ.js} +2 -2
  70. package/dist/client/index.html +1 -1
  71. package/dist/service-launcher.mjs +1 -1
  72. package/package.json +1 -1
  73. package/dist/client/assets/ArrowRight-B0WzqdPj.js +0 -2
  74. package/dist/client/assets/ArrowSquareOut-8j4OKqbL.js +0 -2
  75. package/dist/client/assets/ArrowsClockwise-DlJf49Z-.js +0 -2
  76. package/dist/client/assets/CaretLeft-Du0MA4fs.js +0 -2
  77. package/dist/client/assets/ChatMarkdown-DVGPcDDG.js +0 -247
  78. package/dist/client/assets/DesignWorkspace-NVV8GBAk.js +0 -3
  79. package/dist/client/assets/DiffPanel-DEXl5JNm.js +0 -2
  80. package/dist/client/assets/DiffWorkerPoolProvider-EEE1VuzL.js +0 -10
  81. package/dist/client/assets/DocxPreview-BbjPKR5c.js +0 -17
  82. package/dist/client/assets/HtmlPreview-C2OXgUpJ.js +0 -2
  83. package/dist/client/assets/PdfPreview-CthschRx.js +0 -3
  84. package/dist/client/assets/PptxPreview-M1wqnWv-.js +0 -3
  85. package/dist/client/assets/PreviewPanel-T7-TNC-0.js +0 -2
  86. package/dist/client/assets/PullRequestCodeTab-DeLU7Brq.js +0 -6
  87. package/dist/client/assets/VirtualizedFile-DpXIpMCw.js +0 -2
  88. package/dist/client/assets/XlsxPreview-yPrELQ0F.js +0 -3
  89. package/dist/client/assets/assetUrls-Cv1BQRgh.js +0 -2
  90. package/dist/client/assets/browserHistoryStore-Bvr08etl.js +0 -2
  91. package/dist/client/assets/browserRecording-DYgu2qFY.js +0 -4
  92. package/dist/client/assets/clientPersistenceStorage-TiUunQpN.js +0 -2
  93. package/dist/client/assets/combobox-Cf7GvOtx.js +0 -6
  94. package/dist/client/assets/composerMentionDrag-TlGe0rUC.js +0 -2
  95. package/dist/client/assets/designCanvas.logic-CR5c1cCe.js +0 -8
  96. package/dist/client/assets/designOpenFileContext-CUn4dNFv.js +0 -2
  97. package/dist/client/assets/diffFileContents-D8w_yRtq.js +0 -248
  98. package/dist/client/assets/empty-a7hA2Ech.js +0 -2
  99. package/dist/client/assets/entities-x8g8jint.js +0 -2
  100. package/dist/client/assets/env-DgM3kOA4.js +0 -2
  101. package/dist/client/assets/input-C5hbrs5d.js +0 -2
  102. package/dist/client/assets/main-C_wQnCSV.js +0 -145
  103. package/dist/client/assets/main-H0NXtw22.css +0 -2
  104. package/dist/client/assets/popover-CFQuYACO.js +0 -2
  105. package/dist/client/assets/projectFilesQueryState-CtlKP2rG.js +0 -2
  106. package/dist/client/assets/queries-D1aqiDAP.js +0 -2
  107. package/dist/client/assets/scroll-area-DhT-7J-n.js +0 -1630
  108. package/dist/client/assets/session-BpEQOlGw.js +0 -67
  109. package/dist/client/assets/spinner-Bld_-IfK.js +0 -2
  110. package/dist/client/assets/textarea-C37zxlv0.js +0 -5
  111. package/dist/client/assets/toggle-CoeRt1yA.js +0 -2
  112. package/dist/client/assets/toggle-group-Cl-JZXj8.js +0 -2
  113. package/dist/client/assets/useLocalStorage-B6HRw7FK.js +0 -16
  114. package/dist/client/assets/useWorkspaceMutationRefresh-CdZvTsDX.js +0 -2
  115. package/dist/client/assets/utils-CxdSByf6.js +0 -30
@@ -1,1630 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-r4nzjlvl.js","assets/rolldown-runtime-DAXXjFlN.js","assets/html-BwPosJq7.js","assets/javascript-DC7Y13dy.js","assets/css-BCANWTts.js","assets/angular-ts-BxqKd0Zc.js","assets/scss-CGgB8MuJ.js","assets/apl-C04b0OjT.js","assets/xml-DzUK0Pry.js","assets/java-DJul3uN_.js","assets/json-DaZn6kP4.js","assets/astro-AQ_iZfq_.js","assets/typescript-DToX5D_l.js","assets/postcss-BXeXVLqQ.js","assets/tsx-Db8p8m2t.js","assets/blade-DH22iKQU.js","assets/html-derivative-tMv-aKGZ.js","assets/sql-DvBUnkQP.js","assets/bsl-BkkzgIyY.js","assets/sdbl-bTVj8UrX.js","assets/c-Bp9SPJXV.js","assets/cairo-DLTphjLi.js","assets/python-gzcpVVnB.js","assets/cobol-j5M6C8cE.js","assets/coffee-68oYHmZj.js","assets/cpp-dOwNr0lq.js","assets/regexp-D77ZphON.js","assets/glsl-fbNNN2Bp.js","assets/crystal-BQKjzQ6q.js","assets/shellscript-xyv2Ai2R.js","assets/edge-D8ZvGBZ4.js","assets/elixir-8PeAFHYj.js","assets/elm-Aa2ys7L1.js","assets/erb-e24MnpOC.js","assets/ruby-CuVu4KOG.js","assets/haml-BsIdCvCS.js","assets/graphql-BVCjFJgP.js","assets/jsx-C97fCUqH.js","assets/lua-BF4pD4PQ.js","assets/yaml-uB2nBBeV.js","assets/erlang-Cphh6RMH.js","assets/markdown-BYOwaDjH.js","assets/fortran-fixed-form-DEKoE2YW.js","assets/fortran-free-form-CYNrtFtB.js","assets/fsharp-D13ZGOAj.js","assets/gdresource-C0sCabJj.js","assets/gdshader-CBce3t8t.js","assets/gdscript-Cp2uCuqX.js","assets/git-commit-BSykSTBG.js","assets/diff-woXpYk--.js","assets/git-rebase-gx2II6xm.js","assets/glimmer-js-BAhz69_J.js","assets/glimmer-ts-DceI_LA7.js","assets/hack-DxPgm4F4.js","assets/handlebars-DdTlUnCd.js","assets/http-B1LJ0uJF.js","assets/hurl-GKc7yueO.js","assets/csv-Dx-8-gkx.js","assets/hxml-B0Qn7Nwc.js","assets/haxe-OTjmBuCE.js","assets/jinja-DHXIPVIS.js","assets/jison-Bb-bjV_r.js","assets/julia-DjbOEOq7.js","assets/r-D9B56oy7.js","assets/just-e17iqfha.js","assets/perl-CZJdECIs.js","assets/latex-C_WFP2fs.js","assets/tex-we3ORCro.js","assets/liquid-9ZAw5ESd.js","assets/marko-BaTlCnew.js","assets/less-DVTAwKKz.js","assets/mdc-V7J1bLNm.js","assets/nextflow-BJtWHP5T.js","assets/nextflow-groovy-DJMQeKeT.js","assets/nginx-YcT3QO7G.js","assets/nim-BLaoQEWH.js","assets/php-DIy4CEY0.js","assets/pug-r52_xqX8.js","assets/qml-Be35LeVE.js","assets/razor-uUSeMB08.js","assets/csharp-oqKa8noW.js","assets/rst-DZtY-B3E.js","assets/cmake-Bj61d0ZC.js","assets/sas-BRgKo67P.js","assets/shaderlab-TOUzSsQk.js","assets/hlsl-Cvrh5tZx.js","assets/shellsession-BEUInF7X.js","assets/soy-DWSlVwxw.js","assets/sparql-D_iOobhT.js","assets/turtle-ByJddavk.js","assets/stata-DK4xd-1U.js","assets/surrealql-BQstUV05.js","assets/svelte-COt-aqLJ.js","assets/templ-DUVqjRh3.js","assets/go-rLFTqkRN.js","assets/ts-tags-BBqvRvIx.js","assets/twig-BHAJLapx.js","assets/vue-CDP3wwGh.js","assets/vue-html-Cj0ctcUy.js","assets/vue-vine-O34tJq4k.js","assets/stylus-B6D30XZt.js","assets/xsl-B-eulOKn.js"])))=>i.map(i=>d[i]);
2
- import{o as e,r as t,t as n}from"./rolldown-runtime-DAXXjFlN.js";import{t as r}from"./index-B3D6JK2-.js";import{H as i,Ha as a,Ra as o,U as s,a as c,i as l,ml as u,r as d,t as f,va as p,wa as m}from"./useLocalStorage-B6HRw7FK.js";import{Bo as h,Co as g,Ji as _,Ni as v,Oi as y,Pi as b,Qa as x,Wa as S,aa as ee,ar as te,ia as C,r as w,t as T,ta as E,wo as D,zi as ne}from"./utils-CxdSByf6.js";import{Vt as re,bn as O}from"./session-BpEQOlGw.js";import{Jn as ie,Zn as k,p as ae}from"./textarea-C37zxlv0.js";import{t as A}from"./lib-BpnzBIoA.js";var j=e(c(),1),M=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M236,112a68.07,68.07,0,0,1-68,68H61l27.52,27.51a12,12,0,0,1-17,17l-48-48a12,12,0,0,1,0-17l48-48a12,12,0,1,1,17,17L61,156H168a44,44,0,0,0,0-88H80a12,12,0,0,1,0-24h88A68.07,68.07,0,0,1,236,112Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M80,120v96L32,168Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M168,48H80a8,8,0,0,0,0,16h88a48,48,0,0,1,0,96H88V120a8,8,0,0,0-13.66-5.66l-48,48a8,8,0,0,0,0,11.32l48,48A8,8,0,0,0,88,216V176h80a64,64,0,0,0,0-128ZM72,196.69,43.31,168,72,139.31Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M232,112a64.07,64.07,0,0,1-64,64H88v40a8,8,0,0,1-13.66,5.66l-48-48a8,8,0,0,1,0-11.32l48-48A8,8,0,0,1,88,120v40h80a48,48,0,0,0,0-96H80a8,8,0,0,1,0-16h88A64.07,64.07,0,0,1,232,112Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M230,112a62.07,62.07,0,0,1-62,62H46.49l37.75,37.76a6,6,0,1,1-8.48,8.48l-48-48a6,6,0,0,1,0-8.48l48-48a6,6,0,0,1,8.48,8.48L46.49,162H168a50,50,0,0,0,0-100H80a6,6,0,0,1,0-12h88A62.07,62.07,0,0,1,230,112Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M232,112a64.07,64.07,0,0,1-64,64H51.31l34.35,34.34a8,8,0,0,1-11.32,11.32l-48-48a8,8,0,0,1,0-11.32l48-48a8,8,0,0,1,11.32,11.32L51.31,160H168a48,48,0,0,0,0-96H80a8,8,0,0,1,0-16h88A64.07,64.07,0,0,1,232,112Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M228,112a60.07,60.07,0,0,1-60,60H41.66l41.17,41.17a4,4,0,0,1-5.66,5.66l-48-48a4,4,0,0,1,0-5.66l48-48a4,4,0,0,1,5.66,5.66L41.66,164H168a52,52,0,0,0,0-104H80a4,4,0,0,1,0-8h88A60.07,60.07,0,0,1,228,112Z`}))]]),N=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM119.51,96.49a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17L140,59V16a12,12,0,0,0-24,0V59L104.49,47.51a12,12,0,0,0-17,17Zm17,63a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17L116,197v43a12,12,0,0,0,24,0V197l11.51,11.52a12,12,0,0,0,17-17Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M216,32V224a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V32A16,16,0,0,1,56,16H200A16,16,0,0,1,216,32Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM122.34,101.66a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32L136,76.69V16a8,8,0,0,0-16,0V76.69L101.66,58.34A8,8,0,0,0,90.34,69.66Zm11.32,52.68a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L120,179.31V240a8,8,0,0,0,16,0V179.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M90.34,69.66A8,8,0,0,1,96,56h24V16a8,8,0,0,1,16,0V56h24a8,8,0,0,1,5.66,13.66l-32,32a8,8,0,0,1-11.32,0Zm43.32,84.68a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,96,200h24v40a8,8,0,0,0,16,0V200h24a8,8,0,0,0,5.66-13.66ZM216,120H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Zm-98.24-27.76a6,6,0,0,0,8.48,0l32-32a6,6,0,0,0-8.48-8.48L134,81.51V16a6,6,0,0,0-12,0V81.51L100.24,59.76a6,6,0,0,0-8.48,8.48Zm8.48,55.52a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48L122,174.49V240a6,6,0,0,0,12,0V174.49l21.76,21.75a6,6,0,0,0,8.48-8.48Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM122.34,101.66a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32L136,76.69V16a8,8,0,0,0-16,0V76.69L101.66,58.34A8,8,0,0,0,90.34,69.66Zm11.32,52.68a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L120,179.31V240a8,8,0,0,0,16,0V179.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM125.17,98.83a4,4,0,0,0,5.66,0l32-32a4,4,0,1,0-5.66-5.66L132,86.34V16a4,4,0,0,0-8,0V86.34L98.83,61.17a4,4,0,0,0-5.66,5.66Zm5.66,58.34a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66L124,169.66V240a4,4,0,0,0,8,0V169.66l25.17,25.17a4,4,0,0,0,5.66-5.66Z`}))]]),oe=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M80,176h96l-48,48ZM128,32,80,80h96Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z`}))]]),P=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),F=Object.defineProperty,se=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,fe=(e,t,n)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pe=(e,t)=>{for(var n in t||={})ue.call(t,n)&&fe(e,n,t[n]);if(le)for(var n of le(t))de.call(t,n)&&fe(e,n,t[n]);return e},me=(e,t)=>se(e,ce(t)),he=(0,j.forwardRef)((e,t)=>j.createElement(g,me(pe({ref:t},e),{weights:M})));he.displayName=`ArrowUDownLeft`;var ge=Object.defineProperty,_e=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,Se=(e,t,n)=>t in e?ge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ce=(e,t)=>{for(var n in t||={})be.call(t,n)&&Se(e,n,t[n]);if(ye)for(var n of ye(t))xe.call(t,n)&&Se(e,n,t[n]);return e},we=(e,t)=>_e(e,ve(t)),Te=(0,j.forwardRef)((e,t)=>j.createElement(g,we(Ce({ref:t},e),{weights:N})));Te.displayName=`ArrowsInLineVertical`;var Ee=Object.defineProperty,De=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Me=(e,t,n)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ne=(e,t)=>{for(var n in t||={})Ae.call(t,n)&&Me(e,n,t[n]);if(ke)for(var n of ke(t))je.call(t,n)&&Me(e,n,t[n]);return e},Pe=(e,t)=>De(e,Oe(t)),Fe=(0,j.forwardRef)((e,t)=>j.createElement(g,Pe(Ne({ref:t},e),{weights:oe})));Fe.displayName=`CaretUpDown`;var Ie=Object.defineProperty,Le=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,ze=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,He=(e,t,n)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ue=(e,t)=>{for(var n in t||={})Be.call(t,n)&&He(e,n,t[n]);if(ze)for(var n of ze(t))Ve.call(t,n)&&He(e,n,t[n]);return e},We=(e,t)=>Le(e,Re(t)),Ge=(0,j.forwardRef)((e,t)=>j.createElement(g,We(Ue({ref:t},e),{weights:P})));Ge.displayName=`Trash`;var Ke=D(),qe=`borgcode:last-editor`,Je=class extends a()(`PreferredEditorEnvironmentRequiredError`,{targetPath:o}){get message(){return`Cannot open ${this.targetPath} because no environment is selected.`}},Ye=class extends a()(`PreferredEditorUnavailableError`,{environmentId:p,targetPath:o,availableEditorIds:m(s)}){get message(){return`No available editor can open ${this.targetPath} in environment ${this.environmentId}.`}};function Xe(e,t){let n=(0,Ke.c)(5),[r,a]=l(qe,null,s),o;bb0:{if(r&&e.includes(r)){o=r;break bb0}if(t&&e.includes(t)){o=t;break bb0}let a;n[0]===e?a=n[1]:(a=i.find(t=>e.includes(t.id))?.id??null,n[0]=e,n[1]=a),o=a}let c=o,u;return n[2]!==c||n[3]!==a?(u=[c,a],n[2]=c,n[3]=a,n[4]=u):u=n[4],u}function Ze(e){let t=new Set(e),n=f(qe,s);if(n&&t.has(n))return n;let r=i.find(e=>t.has(e.id))?.id??null;return r&&d(qe,r,s),r??null}function Qe(e,t){let n=(0,Ke.c)(5),r;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={reportFailure:!1},n[0]=r):r=n[0];let i=ie(k.openInEditor,r),a;return n[1]!==t||n[2]!==e||n[3]!==i?(a=async n=>{if(e===null)return O(u(new Je({targetPath:n})));let r=Ze(t);return r?re(await i({environmentId:e,input:{cwd:n,editor:r}}),()=>r):O(u(new Ye({environmentId:e,targetPath:n,availableEditorIds:t})))},n[1]=t,n[2]=e,n[3]=i,n[4]=a):a=n[4],a}var $e=/https?:\/\/[^\s"'`<>]+/giu,et=/(?:~\/|\.{1,2}\/|\/|[A-Za-z]:[\\/]|\\\\)[^\s"'`<>]+|[A-Za-z0-9._-]+(?:\/[A-Za-z0-9._-]+)+(?::\d+){0,2}/g,tt=/[.,;!?]+$/,nt=/[.,;:!?]+$/;function rt(e,t){let n=e.replace(t===`path`?nt:tt,``);if(n.length===0)return n;let r=(e,t)=>{for(;n.endsWith(t);){if(n.split(e).length-1>=n.split(t).length-1)return;n=n.slice(0,-1)}};return r(`(`,`)`),r(`[`,`]`),r(`{`,`}`),n}function it(e,t){return e.start<t.end&&t.start<e.end}function at(e,t,n,r){let i=[];n.lastIndex=0;for(let a of e.matchAll(n)){let e=a[0],n=a.index??-1;if(n<0||e.length===0)continue;let o=rt(e,t);if(o.length===0||t===`path`&&pt(o))continue;let s={kind:t,text:o,start:n,end:n+o.length};[...r,...i].some(e=>it(s,e))||i.push(s)}return i}function ot(e){return/^[A-Za-z]:[\\/]/.test(e)||e.startsWith(`\\\\`)}function st(e){return e.startsWith(`/`)||ot(e)}function ct(e){return ot(e)||/[A-Za-z]:\\/.test(e)}function lt(e,t,n){let r=e.replace(/[\\/]+$/,``);return n===`\\`?`${r}\\${t.replaceAll(`/`,`\\`)}`:`${r}/${t.replace(/^\/+/,``)}`}function ut(e){let t=e.match(/^\/Users\/([^/]+)/);if(t?.[1])return`/Users/${t[1]}`;let n=e.match(/^\/home\/([^/]+)/);if(n?.[1])return`/home/${n[1]}`;let r=e.match(/^([A-Za-z]:\\Users\\[^\\]+)/);if(r?.[1])return r[1]}function dt(e){let t=e,n,r,i=t.match(/:(\d+)$/);if(!i?.[1])return{path:t,line:void 0,column:void 0};n=i[1],t=t.slice(0,-i[0].length);let a=t.match(/:(\d+)$/);return a?.[1]?(r=a[1],t=t.slice(0,-a[0].length)):(r=n,n=void 0),{path:t,line:r,column:n}}function ft(e){let t=at(e,`url`,$e,[]),n=at(e,`path`,et,t);return[...t,...n].toSorted((e,t)=>e.start-t.start)}function pt(e){return/^https?:\/\//iu.test(e)}function mt(e,t){let n=t(e-1);if(!n)return null;let r=e,i=n;for(;r>1&&i.isWrapped;){let e=t(r-2);if(!e)return null;--r,i=e}let a=[],o=0,s=r;for(;;){let e=t(s-1);if(!e)break;let n=t(s)?.isWrapped===!0,r=e.translateToString(!n);if(a.push({bufferLineNumber:s,text:r,startIndex:o,endIndex:o+r.length}),o+=r.length,!n)break;s+=1}return{text:a.map(e=>e.text).join(``),segments:a}}function ht(e,t=typeof navigator>`u`?``:navigator.platform){return t.length===0?!1:w(t)?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function gt(e,t){let{path:n,line:r,column:i}=dt(e),a=n;if(n.startsWith(`~/`)){let e=ut(t);if(e){let t=ct(e)?`\\`:`/`;a=lt(e,n.slice(2),t)}}else st(n)||(a=lt(t,n,ct(t)?`\\`:`/`));return r?`${a}:${r}${i?`:${i}`:``}`:a}var _t=`diffs-container`,vt=(()=>{try{return!1}catch{return!1}})(),yt=/(?=^From [a-f0-9]+ .+$)/m,bt=/(?=^diff --git)/gm,xt=/(?<=\n)/,St=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Ct=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,wt=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Tt=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Et=`header-prefix`,Dt=`header-filename-suffix`,Ot=`header-metadata`,kt=`header-custom`,At={dark:`pierre-dark`,light:`pierre-light`},jt=`data-theme-css`,Mt=`data-unsafe-css`,Nt=`data-core-css`,Pt=`data-diffs-scrollbar-measure`,Ft=`data-diffs-code-view-header`,It=`data-diffs-code-view-footer`,Lt=`--diffs-scrollbar-gutter-measured`,Rt=1e5,zt={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},Bt={...zt,hunkLineCount:1},Vt={paddingTop:8,paddingBottom:8,gap:8},Ht={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},Ut=Object.freeze({fromStart:0,fromEnd:0}),Wt={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Gt={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function Kt(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}var qt=new TextEncoder,Jt=new TextDecoder(`utf-8`,{ignoreBOM:!0}),Yt=/[\uD800-\uDFFF]/,Xt=1024,Zt=new Uint8Array(Xt);function Qt(){Zt.length!==Xt&&(Zt=new Uint8Array(Xt))}function I(e){if(e.length===0)return e;if(Yt.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;Zt.length<t&&(Zt=new Uint8Array(t));let{written:n}=qt.encodeInto(e,Zt);return Jt.decode(Zt.subarray(0,n))}var $t=4096,en=.5;function tn(e){for(let t of e.hunks){for(let n=0;n<t.hunkContent.length;n++){let r=t.hunkContent[n];if(r.type!==`change`)continue;let i=rn(e,r);i!=null&&(t.hunkContent.splice(n,1,...i),n+=i.length-1)}nn(t,e)}}function nn(e,t){let{hunkContent:n}=e;for(let e=1;e<n.length;e++){let r=n[e],i=n[e-1];if(r.type!==`change`||r.additions>0&&r.deletions>0||i.type!==`context`)continue;let a=r.additions>0,o=a?t.additionLines:t.deletionLines,s=a?r.additionLineIndex:r.deletionLineIndex,c=a?r.additions:r.deletions,l=o[s]??``;if(l.trim()!==``)continue;let u=!0;for(let e=1;e<c;e++)if(o[s+e]!==l){u=!1;break}if(!u)continue;let d=0;for(;d<i.lines&&t.additionLines[i.additionLineIndex+i.lines-1-d]===l;)d++;if(d===0)continue;r.additionLineIndex-=d,r.deletionLineIndex-=d;let f=r.additionLineIndex+r.additions,p=r.deletionLineIndex+r.deletions,m=n[e+1];m?.type===`context`?(m.lines+=d,m.additionLineIndex=f,m.deletionLineIndex=p):n.splice(e+1,0,{type:`context`,lines:d,additionLineIndex:f,deletionLineIndex:p}),i.lines-=d,i.lines===0&&(n.splice(e-1,1),e--)}}function rn(e,t){let{deletions:n,additions:r,deletionLineIndex:i,additionLineIndex:a}=t,o=Math.min(n,r),s=Math.abs(r-n);if(o===0||s===0||o*(s+1)>$t)return null;let c=[];for(let t=0;t<n;t++)c.push(on(e.deletionLines[i+t]??``));let l=[];for(let t=0;t<r;t++)l.push(on(e.additionLines[a+t]??``));let u=r>n,d=0,f=-1;for(let e=0;e<=s;e++){let t=0;for(let n=0;n<o;n++)t+=sn(c[n+(u?0:e)],l[n+(u?e:0)]);e===0?f=t+o*en:t>f&&(f=t,d=e)}if(d===0)return null;let p=[],m=(e,t,n,r)=>{(e>0||t>0)&&p.push({type:`change`,deletions:e,additions:t,deletionLineIndex:n,additionLineIndex:r})};return u?(m(0,d,i,a),m(o,o,i,a+d),m(0,r-o-d,i+o,a+d+o)):(m(d,0,i,a),m(o,o,i+d,a),m(n-o-d,0,i+d+o,a+o)),p}var an=/\s+/g;function on(e){return e.replace(an,``)}function sn(e,t){if(e===t)return 1;let n=Math.max(e.length,t.length),r=Math.min(e.length,t.length);if(r===0)return 0;let i=0;for(;i<r&&e[i]===t[i];)i++;let a=0;for(;a<r-i&&e[e.length-1-a]===t[t.length-1-a];)a++;return(i+a)/n}function cn(e,t,n){try{return ln(e,t,n)}finally{Qt()}}function ln(e,t,n=!1){let r=Dn(e),i=r?gn(e):_n(e),a,o=[];for(let e of i){if(r&&!bt.test(e)){if(a==null)a=I(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}else if(!r&&!vn(e)){if(a==null)a=I(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}let i=dn(e,{cacheKey:t==null?void 0:`${t}-${o.length}`,isGitDiff:r,throwOnError:n});i!=null&&o.push(i)}return{patchMetadata:a,files:o}}function un(e,t){try{return dn(e,t)}finally{Qt()}}function dn(e,{cacheKey:t,isGitDiff:n=bt.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=On(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=hn(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=wn(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?mn(i.contents):[],deletionLines:!l&&r!=null&&i!=null?mn(r.contents):[],cacheKey:An(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(wt),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=I(r.trim()),n!==r&&(c.prevName=I(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?Ct:St):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=I(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=I(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=I(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=I(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=I(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=I(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(Tt)??[];t!=null&&(c.prevObjectId=I(t)),n!=null&&(c.newObjectId=I(n)),r!=null&&(c.mode=I(r))}e.startsWith(`rename from `)&&(c.prevName=I(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=I(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
3
- `||s[s.length-1]===`\r`||s[s.length-1]===`\r
4
- `||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:An(p.hunkContext),hunkSpecs:I(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`)){if(a&&Sn(t)&&!Cn(t))throw Error(`parsePatchContent: hunk has more lines than expected`);break}let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){if(a)throw Error(`parsePatchContent: invalid hunk line`);console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=jn(n);if(r===`addition`){if(a&&x>=b.additionCount)throw Error(`parsePatchContent: hunk has too many addition lines`);let e=Mn(t);(g==null||g.type!==`change`)&&(g=Nn(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&c.additionLines.push(e),g.additions++,m++,_=`addition`}else if(r===`deletion`){if(a&&S>=b.deletionCount)throw Error(`parsePatchContent: hunk has too many deletion lines`);let e=Mn(t);(g==null||g.type!==`change`)&&(g=Nn(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&c.deletionLines.push(e),g.deletions++,h++,_=`deletion`}else if(r===`context`){if(a&&(S>=b.deletionCount||x>=b.additionCount))throw Error(`parsePatchContent: hunk has too many context lines`);let e=Mn(t);(g==null||g.type!==`context`)&&(g=Nn(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e)),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=Kt(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=Kt(c.deletionLines[e]))}}}if(a&&(x!==b.additionCount||S!==b.deletionCount))throw Error(`parsePatchContent: hunk line count mismatch`);b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(b.additionStart-1-o,0),c.hunks.push(b),o=b.additionStart+b.additionCount-1;for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(a&&l&&!n&&c.hunks.length===0)throw Error(`parsePatchContent: unified file has no hunks`);if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=e.additionStart+e.additionCount-1,n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),tn(c),c}}function fn(e,t,n=!1){let r=[],i=pn(e)?e.split(yt):[e];for(let e of i)try{r.push(cn(e,t==null?void 0:`${t}-${r.length}`,n))}catch(e){if(n)throw e;console.error(e)}return r}function pn(e){return e.startsWith(`From `)||e.includes(`
5
- From `)}function mn(e){let t=hn(e);for(let e=0;e<t.length;e++)t[e]=I(t[e]);return t}function hn(e){if(e.length===0)return[``];let t=[],n=0;for(;;){let r=e.indexOf(`
6
- `,n);if(r===-1)break;t.push(e.slice(n,r+1)),n=r+1}return n<e.length&&t.push(e.slice(n)),t}function gn(e){return On(e,`diff --git`)}function _n(e){if(e.length===0)return[``];let t=[],n=0,r=0,i=0,a=0,o=!1;for(;r<e.length;){let s=xn(e,r);if(i<=0&&a<=0){if(yn(e,r)){r>n&&t.push(e.slice(n,r)),n=r,o=!0,r=xn(e,s);continue}if(o&&e.startsWith(`@@ -`,r)){let t=wn(e.slice(r,s));t!=null&&(i=t.deletionCount,a=t.additionCount)}r=s;continue}let c=e[r];if(c===`\\`){r=s;continue}c===` `?(i=Math.max(i-1,0),a=Math.max(a-1,0)):c===`-`?i=Math.max(i-1,0):c===`+`&&(a=Math.max(a-1,0)),r=s}return t.push(e.slice(n)),t}function vn(e){return yn(e,0)}function yn(e,t){let n=xn(e,t);return bn(e,t,`---`)&&bn(e,n,`+++`)}function bn(e,t,n){if(!e.startsWith(n,t))return!1;let r=e[t+n.length];if(r!==` `&&r!==` `)return!1;for(let r=t+n.length+1;r<e.length;r++){let t=e[r];if(t===`
7
- `||t===`\r`)break;if(t!==` `&&t!==` `)return!0}return!1}function xn(e,t){let n=e.indexOf(`
8
- `,t);return n===-1?e.length:n+1}function Sn(e){let t=e[0];return t===`+`||t===`-`||t===` `}function Cn(e){if(!e.startsWith(`--`))return!1;for(let t=2;t<e.length;t++){let n=e[t];if(n!==` `&&n!==` `&&n!==`
9
- `&&n!==`\r`)return!1}return!0}function wn(e){if(!e.startsWith(`@@ -`))return;let t=4,n=Tn(e,t);if(n==null)return;let r=n.value;t=n.endIndex;let i=1;if(e[t]===`,`){let n=Tn(e,t+1);if(n==null)return;i=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`+`)return;t+=2;let a=Tn(e,t);if(a==null)return;let o=a.value;t=a.endIndex;let s=1;if(e[t]===`,`){let n=Tn(e,t+1);if(n==null)return;s=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`@`||e[t+2]!==`@`)return;let c,l=t+3;return e[l]===` `&&(c=En(e.slice(l+1))),{additionCount:s,additionStart:o,deletionCount:i,deletionStart:r,hunkContext:c}}function Tn(e,t){let n=t,r=0;for(;n<e.length;n++){let t=e.charCodeAt(n)-48;if(t<0||t>9)break;r=r*10+t}if(n!==t)return{value:r,endIndex:n}}function En(e){return e.endsWith(`\r
10
- `)?e.slice(0,-2):e.endsWith(`
11
- `)?e.slice(0,-1):e}function Dn(e){return e.startsWith(`diff --git`)||e.includes(`
12
- diff --git`)}function On(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.startsWith(t)?0:kn(e,n,0);if(r===-1)return[e];let i=[];r>0&&i.push(e.slice(0,r));let a=r;for(;;){let t=kn(e,n,a+1);if(t===-1)break;i.push(e.slice(a,t)),a=t}return i.push(e.slice(a)),i}function kn(e,t,n){let r=e.indexOf(t,n);return r===-1?-1:r+1}function An(e){return e==null?e:I(e)}function jn(e){return e===` `?`context`:e===`\\`?`metadata`:e===`+`?`addition`:`deletion`}function Mn(e){let t=e.slice(1);return I(t===``?`
13
- `:t)}function Nn(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}var Pn={light:`pierre-light`,dark:`pierre-dark`};function Fn(e){return e===`dark`?Pn.dark:Pn.light}var In=2166136261,Ln=16777619,Rn=2654435769,zn=2246822507;function Bn(e,t=In,n=Ln){let r=t>>>0;for(let t=0;t<e.length;t+=1)r^=e.charCodeAt(t),r=Math.imul(r,n)>>>0;return r>>>0}function Vn(e,t=`diff-panel`){let n=e.trim(),r=Bn(n,In,Ln).toString(36),i=Bn(n,Rn,zn).toString(36);return`${t}:${n.length}:${r}:${i}`}function Hn(e){return e.reduce((e,t)=>{for(let n of t.hunks)e.additions+=n.additionLines,e.deletions+=n.deletionLines;return e},{additions:0,deletions:0})}function Un(e){if(!e.isPartial)return e;let t=0,n=0,r=e.hunks.map(e=>{let r={...e,splitLineStart:t,unifiedLineStart:n};return t+=e.splitLineCount,n+=e.unifiedLineCount,r});return{...e,hunks:r,splitLineCount:t,unifiedLineCount:n,...e.cacheKey?{cacheKey:`${e.cacheKey}:compact-partial`}:{}}}function Wn(e,t=`diff-panel`,n={}){if(!e)return null;let r=e.trim();if(r.length===0)return null;try{let e=fn(r,Vn(r,t)).flatMap(e=>n.compactPartialHunkOffsets?e.files.map(Un):e.files);return e.length>0?{kind:`files`,files:e}:{kind:`raw`,text:r,reason:`Unsupported diff format. Showing raw patch.`}}catch{return{kind:`raw`,text:r,reason:`Failed to parse patch. Showing raw patch.`}}}function Gn(e){let t=e.name??e.prevName??``;return t.startsWith(`a/`)||t.startsWith(`b/`)?t.slice(2):t}function Kn(e){let t=e.prevName??e.name??``;return t.startsWith(`a/`)||t.startsWith(`b/`)?t.slice(2):t}function qn(e){let t=e.cacheKey;return t?t.endsWith(`:hydrated`)?t.slice(0,-9):t:`${e.prevName??`none`}:${e.name}`}function Jn(e){switch(e.type){case`new`:return`text-[var(--diffs-addition-base)]`;case`deleted`:return`text-[var(--diffs-deletion-base)]`;case`change`:case`rename-pure`:case`rename-changed`:return`text-[var(--diffs-modified-base)]`;default:return`text-muted-foreground/80`}}var Yn=`
14
- [data-diffs-header],
15
- [data-diff],
16
- [data-file],
17
- [data-error-wrapper],
18
- [data-virtualizer-buffer] {
19
- --diffs-header-font-family: var(--font-sans) !important;
20
- --diffs-font-family: var(--font-mono) !important;
21
- --diffs-bg: var(--code-background) !important;
22
- --diffs-light-bg: var(--code-background) !important;
23
- --diffs-dark-bg: var(--code-background) !important;
24
- --diffs-token-light-bg: transparent;
25
- --diffs-token-dark-bg: transparent;
26
-
27
- /* Gutter, context, and row tints all derive from the code surface the diff
28
- body sits on — mixing from the canvas leaves the gutter looking unthemed
29
- when a palette separates the two. */
30
- --diffs-bg-context-override: color-mix(in srgb, var(--code-background) 97%, var(--code-foreground));
31
- --diffs-bg-hover-override: color-mix(in srgb, var(--code-background) 94%, var(--code-foreground));
32
- --diffs-bg-separator-override: color-mix(
33
- in srgb,
34
- var(--code-background) 95%,
35
- var(--code-foreground)
36
- );
37
- --diffs-bg-buffer-override: color-mix(in srgb, var(--code-background) 90%, var(--code-foreground));
38
-
39
- --diffs-bg-addition-override: light-dark(
40
- color-mix(in srgb, var(--code-background) 50%, var(--success)),
41
- color-mix(in srgb, var(--code-background) 70%, var(--success))
42
- );
43
- --diffs-bg-addition-number-override: light-dark(
44
- color-mix(in srgb, var(--code-background) 35%, var(--success)),
45
- color-mix(in srgb, var(--code-background) 60%, var(--success))
46
- );
47
- --diffs-bg-addition-hover-override: color-mix(in srgb, var(--code-background) 85%, var(--success));
48
- --diffs-bg-addition-emphasis-override: color-mix(
49
- in srgb,
50
- var(--code-background) 80%,
51
- var(--success)
52
- );
53
-
54
- --diffs-bg-deletion-override: light-dark(
55
- color-mix(in srgb, var(--code-background) 50%, var(--destructive)),
56
- color-mix(in srgb, var(--code-background) 70%, var(--destructive))
57
- );
58
- --diffs-bg-deletion-number-override: light-dark(
59
- color-mix(in srgb, var(--code-background) 35%, var(--destructive)),
60
- color-mix(in srgb, var(--code-background) 60%, var(--destructive))
61
- );
62
- --diffs-bg-deletion-hover-override: color-mix(
63
- in srgb,
64
- var(--code-background) 85%,
65
- var(--destructive)
66
- );
67
- --diffs-bg-deletion-emphasis-override: color-mix(
68
- in srgb,
69
- var(--code-background) 80%,
70
- var(--destructive)
71
- );
72
-
73
- background-color: var(--diffs-bg) !important;
74
- color: var(--code-foreground) !important;
75
- }
76
- `,Xn=/^(?:https?:|data:|blob:|\/\/)/i,Zn=/^[A-Za-z][A-Za-z0-9+.-]*:/,Qn=/^[A-Za-z]:[\\/]/;function $n(e){try{return decodeURIComponent(e)}catch{return e}}function er(e){let t=e.trim();return t.startsWith(`<`)&&t.endsWith(`>`)?t.slice(1,-1):t}function tr(e){let t=er(e),n=t.indexOf(`#`);return n>=0?t.slice(n):``}function nr(e){return/^\/[A-Za-z]:[\\/]/.test(e)?e.slice(1):e}function rr(e){try{let t=new URL(e);if(t.protocol.toLowerCase()!==`file:`)return null;if(t.hostname.length>0&&t.hostname.toLowerCase()!==`localhost`){let e=$n(t.pathname).replaceAll(`/`,`\\`);return`\\\\${$n(t.hostname)}${e}`}let n=$n(t.pathname);return n.length===0?null:nr(n)}catch{return null}}function ir(e){let t=[e.indexOf(`?`),e.indexOf(`#`)].filter(e=>e>=0).reduce((e,t)=>Math.min(e,t),e.length);return e.slice(0,t)}function ar(e,t){let n=Qn.test(e)||e.startsWith(`\\\\`)?`\\`:`/`;return`${e.replace(/[\\/]+$/,``)}${n}${t.replace(/[\\/]/g,n).replace(/^[\\/]+/,``)}`}function or(e,t){if(e==null)return{_tag:`Blocked`};let n=er(e);if(n.length===0||n.startsWith(`#`)||n.startsWith(`?`))return{_tag:`Blocked`};if(Xn.test(n))return{_tag:`Direct`,uri:n};if(/^file:/i.test(n)){let e=rr(n);return e===null?{_tag:`Blocked`}:{_tag:`WorkspaceFile`,path:e}}let r=nr($n(ir(n)));return r.length===0?{_tag:`Blocked`}:r.startsWith(`/`)||Qn.test(r)||r.startsWith(`\\\\`)?{_tag:`WorkspaceFile`,path:r}:Zn.test(r)||r.startsWith(`~/`)||r.startsWith(`~\\`)||!t?{_tag:`Blocked`}:{_tag:`WorkspaceFile`,path:ar(t,r)}}var sr=[`.htm`,`.html`,`.pdf`],cr=[`.htm`,`.html`],lr=[`.avif`,`.gif`,`.ico`,`.jpeg`,`.jpg`,`.png`,`.svg`,`.webp`],ur=[`.docx`,`.pptx`,`.xlsx`];function dr(e,t){let n=e.split(/[?#]/,1)[0]?.toLowerCase()??``;return t.some(e=>n.endsWith(e))}function fr(e){return dr(e,sr)}function pr(e){return dr(e,cr)}function mr(e){return fr(e)&&!pr(e)}function hr(e){return dr(e,lr)}function gr(e){return dr(e,ur)}function _r(e){return fr(e)||hr(e)||gr(e)}var vr=/\.(?:md|mdx)$/i;function yr(e){if(hr(e))return`image`;if(fr(e))return`browser`;if(gr(e))return`document`;let t=e.split(/[?#]/,1)[0]??``;return vr.test(t)?`markdown`:`text`}var L=h();function br(e){return e.additions>0||e.deletions>0}function xr(e){if(e<1e3)return String(e);if(e<1e6){let t=e/1e3;return`${t<10?t.toFixed(1).replace(/\.0$/,``):Math.round(t)}k`}if(e<1e9){let t=e/1e6;return`${t<10?t.toFixed(1).replace(/\.0$/,``):Math.round(t)}m`}let t=e/1e9;return`${t<10?t.toFixed(1).replace(/\.0$/,``):Math.round(t)}b`}var Sr=(0,j.memo)(function(e){let t=(0,Ke.c)(24),{additions:n,deletions:r,className:i,showParentheses:a,layout:o}=e,s=a===void 0?!1:a,c=o===void 0?`aligned`:o,l;t[0]===s?l=t[1]:(l=s&&(0,L.jsx)(`span`,{className:`text-muted-foreground/70`,children:`(`}),t[0]=s,t[1]=l);let u=`${n} additions, ${r} deletions`,d=c===`inline`?`inline-flex items-center gap-1 tabular-nums align-middle`:`inline-grid grid-cols-[4ch_4ch] gap-2 text-right tabular-nums align-middle`,f;t[2]!==i||t[3]!==d?(f=T(d,i),t[2]=i,t[3]=d,t[4]=f):f=t[4];let p;t[5]===n?p=t[6]:(p=xr(n),t[5]=n,t[6]=p);let m;t[7]===p?m=t[8]:(m=(0,L.jsxs)(`span`,{"aria-hidden":`true`,className:`font-mono text-success`,children:[`+`,p]}),t[7]=p,t[8]=m);let h;t[9]===r?h=t[10]:(h=xr(r),t[9]=r,t[10]=h);let g;t[11]===h?g=t[12]:(g=(0,L.jsxs)(`span`,{"aria-hidden":`true`,className:`font-mono text-destructive`,children:[`-`,h]}),t[11]=h,t[12]=g);let _;t[13]!==u||t[14]!==f||t[15]!==m||t[16]!==g?(_=(0,L.jsxs)(`span`,{role:`group`,"aria-label":u,className:f,children:[m,g]}),t[13]=u,t[14]=f,t[15]=m,t[16]=g,t[17]=_):_=t[17];let v;t[18]===s?v=t[19]:(v=s&&(0,L.jsx)(`span`,{className:`text-muted-foreground/70`,children:`)`}),t[18]=s,t[19]=v);let y;return t[20]!==_||t[21]!==v||t[22]!==l?(y=(0,L.jsxs)(L.Fragment,{children:[l,_,v]}),t[20]=_,t[21]=v,t[22]=l,t[23]=y):y=t[23],y}),Cr={position:`absolute`,top:0,bottom:0,textAlign:`center`,whiteSpace:`normal`,touchAction:`none`},wr={display:`contents`};function Tr(){return null}function Er(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function Dr(e){let t=(0,j.useRef)(e);return(0,j.useInsertionEffect)(()=>void(t.current=e)),(0,j.useCallback)((...e)=>t.current(...e),[])}function Or(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function kr(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}var Ar=new Set;function jr(e){let t=[],n=new Set;for(let r of Mr(e.themes)){let e=Fr(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return jr({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return jr({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function Mr(e){return Nr(e)?[e]:e}function Nr(e){return Fr(e)||Pr(e)}function Pr(e){return typeof e.name==`string`&&typeof e.load==`function`}function Fr(e){return typeof e.getThemes==`function`}function Ir(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var Lr=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},Rr=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},zr=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function Br(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new Lr(t);e.set(t,n)}function a(t,n){return e.has(t)?!1:(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new Rr(i));let c=r,l=s().then(e=>{let a=Ir(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new zr(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var R=Br();function Vr(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=R.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,R.getResolvedTheme(n)??R.seedResolvedTheme(n,e);Ar.has(n)||(Ar.add(n),t.loadThemeSync(e))}}var Hr=new Map,Ur=new Map,Wr=new Map,Gr=new Set;function Kr(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Gr.has(n.name))continue;let e=Hr.get(n.name);e??(e=n,Hr.set(n.name,e)),Gr.add(e.name),t.loadLanguageSync(e.data)}}function qr(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var Jr=Object.defineProperty,Yr=Object.getOwnPropertyDescriptor,Xr=Object.getOwnPropertyNames,Zr=Object.prototype.hasOwnProperty,Qr=(e,t)=>{let n={};for(var r in e)Jr(n,r,{get:e[r],enumerable:!0});return t||Jr(n,Symbol.toStringTag,{value:`Module`}),n},$r=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Xr(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Zr.call(e,s)&&s!==n&&Jr(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Yr(t,s))||r.enumerable});return e},ei=(e,t,n)=>($r(e,t,`default`),n&&$r(n,t,`default`)),ti=[{id:`abap`,name:`ABAP`,import:(()=>r(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>r(()=>import(`./actionscript-3--17pq3dv.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>r(()=>import(`./ada-C5qYipkI.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>r(()=>import(`./angular-html-r4nzjlvl.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>r(()=>import(`./angular-ts-BxqKd0Zc.js`),__vite__mapDeps([5,0,1,2,3,4,6])))},{id:`apache`,name:`Apache Conf`,import:(()=>r(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>r(()=>import(`./apex-VAyPSnFM.js`),[]))},{id:`apl`,name:`APL`,import:(()=>r(()=>import(`./apl-C04b0OjT.js`),__vite__mapDeps([7,3,1,4,2,8,9,10])))},{id:`applescript`,name:`AppleScript`,import:(()=>r(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>r(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>r(()=>import(`./asciidoc-DE70LPWp.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>r(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>r(()=>import(`./astro-AQ_iZfq_.js`),__vite__mapDeps([11,3,1,4,10,12,13,14])))},{id:`awk`,name:`AWK`,import:(()=>r(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>r(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>r(()=>import(`./bat-Bo4NYOV-.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>r(()=>import(`./beancount-D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>r(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>r(()=>import(`./bibtex-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>r(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>r(()=>import(`./bird2-C6vDhewU.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>r(()=>import(`./blade-DH22iKQU.js`),__vite__mapDeps([15,3,1,4,2,8,9,10,16,17])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>r(()=>import(`./bsl-BkkzgIyY.js`),__vite__mapDeps([18,19])))},{id:`c`,name:`C`,import:(()=>r(()=>import(`./c-Bp9SPJXV.js`).then(e=>e.n),__vite__mapDeps([20,1])))},{id:`c3`,name:`C3`,import:(()=>r(()=>import(`./c3-BFHwR3_K.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>r(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>r(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>r(()=>import(`./clarity-SemFz856.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>r(()=>import(`./clojure-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>r(()=>import(`./cmake-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>r(()=>import(`./cobol-j5M6C8cE.js`),__vite__mapDeps([23,2,1,3,4,9])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>r(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>r(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>r(()=>import(`./coffee-68oYHmZj.js`),__vite__mapDeps([24,3,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>r(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>r(()=>import(`./coq-BrsZFFmf.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>r(()=>import(`./cpp-dOwNr0lq.js`).then(e=>e.n),__vite__mapDeps([25,1,17,26,27,20])))},{id:`crystal`,name:`Crystal`,import:(()=>r(()=>import(`./crystal-BQKjzQ6q.js`),__vite__mapDeps([28,3,1,4,2,17,20,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>r(()=>import(`./csharp-oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>r(()=>import(`./css-BCANWTts.js`).then(e=>e.n),__vite__mapDeps([4,1])))},{id:`csv`,name:`CSV`,import:(()=>r(()=>import(`./csv-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>r(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>r(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>r(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>r(()=>import(`./dart-CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>r(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>r(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>r(()=>import(`./diff-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>r(()=>import(`./docker-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>r(()=>import(`./dotenv-_5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>r(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>r(()=>import(`./edge-D8ZvGBZ4.js`),__vite__mapDeps([30,2,1,3,4,12,16])))},{id:`elixir`,name:`Elixir`,import:(()=>r(()=>import(`./elixir-8PeAFHYj.js`),__vite__mapDeps([31,2,1,3,4])))},{id:`elm`,name:`Elm`,import:(()=>r(()=>import(`./elm-Aa2ys7L1.js`),__vite__mapDeps([32,27,1,20])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>r(()=>import(`./emacs-lisp-B4R74twV.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>r(()=>import(`./erb-e24MnpOC.js`),__vite__mapDeps([33,2,1,3,4,34,8,9,17,20,25,26,27,29,35,36,12,14,37,38,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>r(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>r(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>r(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>r(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>r(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>r(()=>import(`./fortran-free-form-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>r(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>r(()=>import(`./gdresource-C0sCabJj.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>r(()=>import(`./gdscript-Cp2uCuqX.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>r(()=>import(`./gdshader-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>r(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>r(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>r(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>r(()=>import(`./git-rebase-gx2II6xm.js`),__vite__mapDeps([50,29,1])))},{id:`gleam`,name:`Gleam`,import:(()=>r(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>r(()=>import(`./glimmer-js-BAhz69_J.js`),__vite__mapDeps([51,3,1,4,2,12])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>r(()=>import(`./glimmer-ts-DceI_LA7.js`),__vite__mapDeps([52,3,1,4,2,12])))},{id:`glsl`,name:`GLSL`,import:(()=>r(()=>import(`./glsl-fbNNN2Bp.js`).then(e=>e.n),__vite__mapDeps([27,1,20])))},{id:`gn`,name:`GN`,import:(()=>r(()=>import(`./gn-ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>r(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>r(()=>import(`./go-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>r(()=>import(`./graphql-BVCjFJgP.js`).then(e=>e.n),__vite__mapDeps([36,1,3,12,14,37])))},{id:`groovy`,name:`Groovy`,import:(()=>r(()=>import(`./groovy-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>r(()=>import(`./hack-DxPgm4F4.js`),__vite__mapDeps([53,2,1,3,4,17])))},{id:`haml`,name:`Ruby Haml`,import:(()=>r(()=>import(`./haml-BsIdCvCS.js`).then(e=>e.n),__vite__mapDeps([35,1,3,4])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>r(()=>import(`./handlebars-DdTlUnCd.js`),__vite__mapDeps([54,3,1,4,2,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>r(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>r(()=>import(`./haxe-OTjmBuCE.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>r(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>r(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>r(()=>import(`./hlsl-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>r(()=>import(`./html-BwPosJq7.js`).then(e=>e.n),__vite__mapDeps([2,1,3,4])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>r(()=>import(`./html-derivative-tMv-aKGZ.js`),__vite__mapDeps([16,2,1,3,4])))},{id:`http`,name:`HTTP`,import:(()=>r(()=>import(`./http-B1LJ0uJF.js`),__vite__mapDeps([55,8,1,9,10,29,36,3,12,14,37])))},{id:`hurl`,name:`Hurl`,import:(()=>r(()=>import(`./hurl-GKc7yueO.js`),__vite__mapDeps([56,8,1,9,57,36,3,12,14,37])))},{id:`hxml`,name:`HXML`,import:(()=>r(()=>import(`./hxml-B0Qn7Nwc.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>r(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>r(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>r(()=>import(`./ini-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>r(()=>import(`./java-DJul3uN_.js`).then(e=>e.n),__vite__mapDeps([9,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>r(()=>import(`./javascript-DC7Y13dy.js`).then(e=>e.n),__vite__mapDeps([3,1])))},{id:`jinja`,name:`Jinja`,import:(()=>r(()=>import(`./jinja-DHXIPVIS.js`),__vite__mapDeps([60,2,1,3,4])))},{id:`jison`,name:`Jison`,import:(()=>r(()=>import(`./jison-Bb-bjV_r.js`),__vite__mapDeps([61,3,1])))},{id:`json`,name:`JSON`,import:(()=>r(()=>import(`./json-DaZn6kP4.js`).then(e=>e.n),__vite__mapDeps([10,1])))},{id:`json5`,name:`JSON5`,import:(()=>r(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>r(()=>import(`./jsonc-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>r(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>r(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>r(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>r(()=>import(`./jsx-C97fCUqH.js`).then(e=>e.n),__vite__mapDeps([37,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>r(()=>import(`./julia-DjbOEOq7.js`),__vite__mapDeps([62,3,1,17,22,25,26,27,20,63])))},{id:`just`,name:`Just`,import:(()=>r(()=>import(`./just-e17iqfha.js`),__vite__mapDeps([64,3,1,12,22,29,34,4,2,8,9,17,20,25,26,27,35,36,14,37,38,39,65])))},{id:`kdl`,name:`KDL`,import:(()=>r(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>r(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>r(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>r(()=>import(`./latex-C_WFP2fs.js`),__vite__mapDeps([66,67,63,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>r(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>r(()=>import(`./less-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>r(()=>import(`./liquid-9ZAw5ESd.js`),__vite__mapDeps([68,3,1,4,2,10])))},{id:`llvm`,name:`LLVM IR`,import:(()=>r(()=>import(`./llvm-Cm23YOpf.js`),[]))},{id:`log`,name:`Log file`,import:(()=>r(()=>import(`./log-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>r(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>r(()=>import(`./lua-BF4pD4PQ.js`).then(e=>e.n),__vite__mapDeps([38,1,20])))},{id:`luau`,name:`Luau`,import:(()=>r(()=>import(`./luau-FMPmPwt6.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>r(()=>import(`./make-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>r(()=>import(`./markdown-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>r(()=>import(`./marko-BaTlCnew.js`),__vite__mapDeps([69,4,1,6,12,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>r(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>r(()=>import(`./mdc-V7J1bLNm.js`),__vite__mapDeps([71,16,2,1,3,4,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>r(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>r(()=>import(`./mermaid-Bk4SNUv9.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>r(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>r(()=>import(`./mojo-BgCJLMeH.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>r(()=>import(`./moonbit-CaWjb8XO.js`),[]))},{id:`move`,name:`Move`,import:(()=>r(()=>import(`./move-B1IS1UjX.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>r(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>r(()=>import(`./nextflow-BJtWHP5T.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>r(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>r(()=>import(`./nginx-YcT3QO7G.js`),__vite__mapDeps([74,38,1,20])))},{id:`nim`,name:`Nim`,import:(()=>r(()=>import(`./nim-BLaoQEWH.js`),__vite__mapDeps([75,3,1,4,2,8,9,20,27,41])))},{id:`nix`,name:`Nix`,import:(()=>r(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>r(()=>import(`./nushell-DcLAeLz5.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>r(()=>import(`./objective-c-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>r(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>r(()=>import(`./ocaml-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>r(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>r(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>r(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>r(()=>import(`./perl-CZJdECIs.js`),__vite__mapDeps([65,3,1,4,2,8,9,17])))},{id:`php`,name:`PHP`,import:(()=>r(()=>import(`./php-DIy4CEY0.js`),__vite__mapDeps([76,3,1,4,2,8,9,10,17])))},{id:`pkl`,name:`Pkl`,import:(()=>r(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>r(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>r(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>r(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>r(()=>import(`./postcss-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>r(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>r(()=>import(`./powershell-DshXNtvi.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>r(()=>import(`./prisma-BsRQq5mF.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>r(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>r(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>r(()=>import(`./pug-r52_xqX8.js`),__vite__mapDeps([77,3,1,4,2])))},{id:`puppet`,name:`Puppet`,import:(()=>r(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>r(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>r(()=>import(`./python-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>r(()=>import(`./qml-Be35LeVE.js`),__vite__mapDeps([78,3,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>r(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>r(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>r(()=>import(`./r-D9B56oy7.js`).then(e=>e.n),__vite__mapDeps([63,1])))},{id:`racket`,name:`Racket`,import:(()=>r(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>r(()=>import(`./raku-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>r(()=>import(`./razor-uUSeMB08.js`),__vite__mapDeps([79,2,1,3,4,80])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>r(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>r(()=>import(`./regexp-D77ZphON.js`).then(e=>e.n),__vite__mapDeps([26,1])))},{id:`rel`,name:`Rel`,import:(()=>r(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>r(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>r(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>r(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>r(()=>import(`./rst-DZtY-B3E.js`),__vite__mapDeps([81,3,1,16,2,4,22,82,25,17,26,27,20,29,39,34,8,9,35,36,12,14,37,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>r(()=>import(`./ruby-CuVu4KOG.js`),__vite__mapDeps([34,3,1,4,2,8,9,17,20,25,26,27,29,35,36,12,14,37,38,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>r(()=>import(`./rust-Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>r(()=>import(`./sas-BRgKo67P.js`),__vite__mapDeps([83,17,1])))},{id:`sass`,name:`Sass`,import:(()=>r(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>r(()=>import(`./scala-DKOlJaKm.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>r(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>r(()=>import(`./scss-CGgB8MuJ.js`).then(e=>e.n),__vite__mapDeps([6,1,4])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>r(()=>import(`./sdbl-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>r(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([84,85])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>r(()=>import(`./shellscript-xyv2Ai2R.js`).then(e=>e.n),__vite__mapDeps([29,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>r(()=>import(`./shellsession-BEUInF7X.js`),__vite__mapDeps([86,29,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>r(()=>import(`./smalltalk-B16xEiuN.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>r(()=>import(`./solidity-CKzVLygQ.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>r(()=>import(`./soy-DWSlVwxw.js`),__vite__mapDeps([87,2,1,3,4])))},{id:`sparql`,name:`SPARQL`,import:(()=>r(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([88,89])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>r(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>r(()=>import(`./sql-DvBUnkQP.js`).then(e=>e.n),__vite__mapDeps([17,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>r(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>r(()=>import(`./stata-DK4xd-1U.js`),__vite__mapDeps([90,17,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>r(()=>import(`./stylus-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>r(()=>import(`./surrealql-BQstUV05.js`),__vite__mapDeps([91,3,1])))},{id:`svelte`,name:`Svelte`,import:(()=>r(()=>import(`./svelte-COt-aqLJ.js`),__vite__mapDeps([92,3,1,4,12,13])))},{id:`swift`,name:`Swift`,import:(()=>r(()=>import(`./swift-DonLKvLd.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>r(()=>import(`./system-verilog-DJ5XKQeo.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>r(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>r(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>r(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>r(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>r(()=>import(`./templ-DUVqjRh3.js`),__vite__mapDeps([93,3,1,4,94])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>r(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>r(()=>import(`./tex-we3ORCro.js`),__vite__mapDeps([67,63,1])))},{id:`toml`,name:`TOML`,import:(()=>r(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>r(()=>import(`./ts-tags-BBqvRvIx.js`),__vite__mapDeps([95,3,1,4,2,8,9,12,17,27,20])))},{id:`tsv`,name:`TSV`,import:(()=>r(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>r(()=>import(`./tsx-Db8p8m2t.js`).then(e=>e.n),__vite__mapDeps([14,1])))},{id:`turtle`,name:`Turtle`,import:(()=>r(()=>import(`./turtle-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>r(()=>import(`./twig-BHAJLapx.js`),__vite__mapDeps([96,3,1,4,6,22,34,2,8,9,17,20,25,26,27,29,35,36,12,14,37,38,39,76,10])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>r(()=>import(`./typescript-DToX5D_l.js`).then(e=>e.n),__vite__mapDeps([12,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>r(()=>import(`./typespec-BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>r(()=>import(`./typst-DI99ib-x.js`),[]))},{id:`v`,name:`V`,import:(()=>r(()=>import(`./v-DETTlOr0.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>r(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>r(()=>import(`./vb-Djn5o6TS.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>r(()=>import(`./verilog-CiiDBU1e.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>r(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>r(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>r(()=>import(`./vue-CDP3wwGh.js`),__vite__mapDeps([97,3,1,4,2,10,12,16])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>r(()=>import(`./vue-html-Cj0ctcUy.js`),__vite__mapDeps([98,3,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>r(()=>import(`./vue-vine-O34tJq4k.js`),__vite__mapDeps([99,3,1,4,6,13,70,100])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>r(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>r(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>r(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>r(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>r(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>r(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>r(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>r(()=>import(`./xml-DzUK0Pry.js`).then(e=>e.n),__vite__mapDeps([8,1,9])))},{id:`xsl`,name:`XSL`,import:(()=>r(()=>import(`./xsl-B-eulOKn.js`),__vite__mapDeps([101,8,1,9])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>r(()=>import(`./yaml-uB2nBBeV.js`).then(e=>e.n),__vite__mapDeps([39,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>r(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>r(()=>import(`./zig-CMLA9XwU.js`),[]))}],ni=Object.fromEntries(ti.map(e=>[e.id,e.import])),ri=Object.fromEntries(ti.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ii={...ni,...ri},ai=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>r(()=>import(`./andromeeda-WkhI09AS.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>r(()=>import(`./aurora-x-C7CFqhAd.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>r(()=>import(`./ayu-dark-CRu61w6_.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>r(()=>import(`./ayu-light-Dn6O_aYR.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>r(()=>import(`./ayu-mirage-CTjYAbs-.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>r(()=>import(`./catppuccin-frappe-DFlFW5gh.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>r(()=>import(`./catppuccin-latte-CpxdcXpJ.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>r(()=>import(`./catppuccin-macchiato-DIdIQ04K.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>r(()=>import(`./catppuccin-mocha-Co3Xjl64.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>r(()=>import(`./dark-plus-GAt2ZgX8.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>r(()=>import(`./dracula-C2uKkzgK.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>r(()=>import(`./dracula-soft-D1bVjxWZ.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>r(()=>import(`./everforest-dark-D-DlICQR.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>r(()=>import(`./everforest-light-CeVdGHYG.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>r(()=>import(`./github-dark-DwbbXv51.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>r(()=>import(`./github-dark-default-CxjRwzl6.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>r(()=>import(`./github-dark-dimmed-Cr1oaoul.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>r(()=>import(`./github-dark-high-contrast-B4qJZLZa.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>r(()=>import(`./github-light-CsVXhIlR.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>r(()=>import(`./github-light-default-DB_IwZa6.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>r(()=>import(`./github-light-high-contrast-DLgVeSB-.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>r(()=>import(`./gruvbox-dark-hard-DXm60lX3.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>r(()=>import(`./gruvbox-dark-medium-GE2thSmD.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>r(()=>import(`./gruvbox-dark-soft-04Cj-4VZ.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>r(()=>import(`./gruvbox-light-hard-K6wSn29D.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>r(()=>import(`./gruvbox-light-medium-CVy3aSlc.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>r(()=>import(`./gruvbox-light-soft-DNgJjaY0.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>r(()=>import(`./horizon-0-RkHfro.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>r(()=>import(`./horizon-bright-BgL2X9oq.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>r(()=>import(`./houston-KyjWKfuY.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>r(()=>import(`./kanagawa-dragon-7TqgsUPC.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>r(()=>import(`./kanagawa-lotus-CqxMQulh.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>r(()=>import(`./kanagawa-wave-D8CNn6T_.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>r(()=>import(`./laserwave-CQkdhozh.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>r(()=>import(`./light-plus-CNQ8_7Y0.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>r(()=>import(`./material-theme-CAtLaHa3.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>r(()=>import(`./material-theme-darker-k-s5Bc6K.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>r(()=>import(`./material-theme-lighter-CD6a-c4d.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>r(()=>import(`./material-theme-ocean-B3mraInd.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>r(()=>import(`./material-theme-palenight-DEhAARHw.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>r(()=>import(`./min-dark-BFqTAwCr.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>r(()=>import(`./min-light-O7UdaaxX.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>r(()=>import(`./monokai-C0p7Qecz.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>r(()=>import(`./night-owl-BsnCLAKc.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>r(()=>import(`./night-owl-light-BODRhcTU.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>r(()=>import(`./nord-Cd-F4txO.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>r(()=>import(`./one-dark-pro-DUS_IGRK.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>r(()=>import(`./one-light-CVUd7yD5.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>r(()=>import(`./plastic-CF8VZTnn.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>r(()=>import(`./poimandres-BX2TyY6j.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>r(()=>import(`./red-7ga_dcKu.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>r(()=>import(`./rose-pine-rh6ipraJ.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>r(()=>import(`./rose-pine-dawn-DSuRaP6u.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>r(()=>import(`./rose-pine-moon-DdHjCvFQ.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>r(()=>import(`./slack-dark-DYvUXyrP.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>r(()=>import(`./slack-ochin-bqtMVDfH.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>r(()=>import(`./snazzy-light-D8dzFmq5.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>r(()=>import(`./solarized-dark-BQwPDzxK.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>r(()=>import(`./solarized-light-BLaijb3X.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>r(()=>import(`./synthwave-84-CIknw8y7.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>r(()=>import(`./tokyo-night-iIspnLcq.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>r(()=>import(`./vesper-BIFK_oDq.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>r(()=>import(`./vitesse-black-D082JcaE.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>r(()=>import(`./vitesse-dark-z-nr_5O8.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>r(()=>import(`./vitesse-light-ojz42ZLy.js`),[]))}].map(e=>[e.id,e.import])),oi=t({createOnigurumaEngine:()=>Mi,getDefaultWasmLoader:()=>ji,loadWasm:()=>Ti,setDefaultWasmLoader:()=>Ai}),si=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function ci(){return 2147483648}function li(){return typeof performance<`u`?performance.now():Date.now()}var ui=(e,t)=>e+(t-e%t)%t;async function di(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=ci();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,ui(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:li,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var fi=Object.defineProperty,pi=(e,t,n)=>t in e?fi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,z=(e,t,n)=>pi(e,typeof t==`symbol`?t:t+``,n),B=null;function mi(e){throw new si(e.UTF8ToString(e.getLastOnigError()))}var hi=class e{constructor(t){z(this,`utf16Length`),z(this,`utf8Length`),z(this,`utf16Value`),z(this,`utf8Value`),z(this,`utf16OffsetToUtf8`),z(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},gi=class e{constructor(t){if(z(this,`id`,++e.LAST_ID),z(this,`_onigBinding`),z(this,`content`),z(this,`utf16Length`),z(this,`utf8Length`),z(this,`utf16OffsetToUtf8`),z(this,`utf8OffsetToUtf16`),z(this,`ptr`),!B)throw new si(`Must invoke loadWasm first.`);this._onigBinding=B,this.content=t;let n=new hi(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=B.omalloc(1e4),e._sharedPtrInUse=!0,B.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(B)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};z(gi,`LAST_ID`,0),z(gi,`_sharedPtr`,0),z(gi,`_sharedPtrInUse`,!1);var _i=gi,vi=class{constructor(e){if(z(this,`_onigBinding`),z(this,`_ptr`),!B)throw new si(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new hi(e[r]);t[r]=i.createString(B),n[r]=i.utf8Length}let r=B.omalloc(4*e.length);B.HEAPU32.set(t,r/4);let i=B.omalloc(4*e.length);B.HEAPU32.set(n,i/4);let a=B.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)B.ofree(t[n]);B.ofree(i),B.ofree(r),a===0&&mi(B),this._onigBinding=B,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new _i(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function yi(e){return typeof e.instantiator==`function`}function bi(e){return typeof e.default==`function`}function xi(e){return e.data!==void 0}function Si(e){return typeof Response<`u`&&e instanceof Response}function Ci(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var wi;function Ti(e){if(wi)return wi;async function t(){B=await di(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),yi(n)?n=await n.instantiator(t):bi(n)?n=await n.default(t):(xi(n)&&(n=n.data),Si(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Di(n)(t):await Oi(n)(t):Ci(n)||n instanceof WebAssembly.Module?n=await Ei(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Ei(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return wi=t(),wi}function Ei(e){return t=>WebAssembly.instantiate(e,t)}function Di(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Oi(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var ki;function Ai(e){ki=e}function ji(){return ki}async function Mi(e){return e&&await Ti(e),{createScanner(e){return new vi(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new _i(e)}}}var Ni=Qr({});ei(Ni,oi);var V=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Pi(e){return Fi(e)}function Fi(e){return Array.isArray(e)?Ii(e):e instanceof RegExp?e:typeof e==`object`?Li(e):e}function Ii(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Fi(e[n]);return t}function Li(e){let t={};for(let n in e)t[n]=Fi(e[n]);return t}function Ri(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function zi(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?zi(e.substring(0,e.length-1)):e.substr(~t+1)}var Bi=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Vi=class{static hasCaptures(e){return e===null?!1:(Bi.lastIndex=0,Bi.test(e))}static replaceCaptures(e,t,n){return e.replace(Bi,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Hi(e,t){return e<t?-1:+(e>t)}function Ui(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Hi(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Wi(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Gi(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Ki=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},qi=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Qi(e),t)}static createFromParsedTheme(e,t){return ea(e,t)}_cachedMatchRoot=new Ki(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Yi(e.parent,t.parentScopes));return n?new Zi(n.fontStyle,n.foreground,n.background):null}},Ji=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Yi(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Xi(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Xi(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Zi=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Qi(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&Wi(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Wi(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new $i(l,u,e,o,s,c)}}return n}var $i=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},H=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(H||{});function ea(e,t){e.sort((e,t)=>{let n=Hi(e.scope,t.scope);return n!==0||(n=Ui(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new ta(t),o=new Zi(n,a.getId(r),a.getId(i)),s=new ia(new ra(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new qi(a,o,s)}var ta=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},na=Object.freeze([]),ra=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||na,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},ia=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),ra.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Ui(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new ra(e,t,n,r,i))}},aa=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=sa(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function oa(e){return e}function sa(e){return e}function ca(e,t){let n=[],r=ua(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(la(i)){let e=[];do e.push(i),i=r.next();while(la(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function la(e){return!!e&&!!e.match(/[\w\.:]+/)}function ua(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function da(e){typeof e.dispose==`function`&&e.dispose()}var fa=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},pa=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},ma=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},ha=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new fa(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new ma;for(let n of e)ga(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof fa){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function ga(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof fa?va({baseGrammar:a,selfGrammar:i},r):_a(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new fa(e))}function _a(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];ya([r],t,n)}}function va(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ya(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ya(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ya(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Ri({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&ya(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Ta(i);switch(a.kind){case 0:va({...t,selfGrammar:t.baseGrammar},n);break;case 1:va(t,n);break;case 2:_a(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?_a(a.ruleName,i,n):va(i,n)}else a.kind===4?n.add(new pa(a.scopeName,a.ruleName)):n.add(new fa(a.scopeName));break}}}var ba=class{kind=0},xa=class{kind=1},Sa=class{constructor(e){this.ruleName=e}kind=2},Ca=class{constructor(e){this.scopeName=e}kind=3},wa=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Ta(e){if(e===`$base`)return new ba;if(e===`$self`)return new xa;let t=e.indexOf(`#`);return t===-1?new Ca(e):t===0?new Sa(e.substring(1)):new wa(e.substring(0,t),e.substring(t+1))}var Ea=/\\(\d+)/,Da=/\\(\d+)/g,Oa=-1,ka=-2;function Aa(e){return e}function ja(e){return e}var Ma=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Vi.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Vi.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${zi(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Vi.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Vi.replaceCaptures(this._contentName,e,t)}},Na=class extends Ma{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Pa=class extends Ma{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new za(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ba,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Fa=class extends Ma{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ba,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ia=class extends Ma{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new za(i,this.id),this.beginCaptures=a,this._end=new za(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ba;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},La=class extends Ma{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new za(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new za(o,ka),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ba;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ba,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},Ra=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Na(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Pa(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Ri({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Fa(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new La(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Ia(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Ta(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Fa||e instanceof Ia||e instanceof La)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},za=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=Ea.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Da.lastIndex=0,this.source.replace(Da,(e,t)=>Gi(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ba=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Va(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Va(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Va=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
77
- `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Ha=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Ua=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Ha(e,8),this._embeddedLanguagesMatcher=new Wa(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Ha(0,0);_getBasicScopeAttributes=new Ki(e=>new Ha(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Wa=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Gi(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Ga=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Ka(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=qa(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Ga(i,!0);f()}return new Ga(i,!1);function f(){let o=Ja(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Oa){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),$a(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Ia){let r=o;$a(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof La){let r=o;$a(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if($a(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function qa(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof La&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Qa(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==ka){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),$a(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Ja(e,t,n,r,i,a){let o=Ya(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Xa(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Ya(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Za(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Xa(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Za(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Za(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Qa(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function $a(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Ka(e,p,n&&d.start===0,d.start,f,i,!1,0),da(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new eo(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var eo=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function to(e,t,n,r,i,a,o,s){return new ao(e,t,n,r,i,a,o,s)}function no(e,t,n,r,i){let a=ca(t,ro),o=Ra.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function ro(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(io(t[r],e))return n=r+1,!0;return!1})}function io(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var ao=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Ua(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=oo(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=ca(e,ro);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)no(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&no(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(Aa(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[ja(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=oo(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Ra.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===co.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=aa.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?so.createRootAndLookUpScopeName(a,r,this):so.createRoot(`unknown`,r),t=new co(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
78
- `;let a=this.createOnigString(e),o=a.content.length,s=new uo(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Ka(this,a,i,0,t,s,!0,r);return da(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function oo(e,t){return e=Pi(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var so=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Ji.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Ji(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Ji(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),aa.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},co=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?so.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:ja(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=so.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Aa(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,so.fromExtension(r,n.contentNameScopesList))}},lo=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):ca(e,ro).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>ca(e,ro).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},uo=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=aa.set(n,0,oa(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=aa.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},fo=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,to(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},po=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new fo(qi.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(qi.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new lo(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new ha(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},mo=co.NULL;function ho(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function go(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function _o(e){return Array.isArray(e)?e:[e]}async function vo(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function yo(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function bo(e){return e===`ansi`||yo(e)}function xo(e){return e===`none`}function So(e){return xo(e)}var Co=/(\r?\n)/g;function wo(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Co),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var To={light:`#333333`,dark:`#bbbbbb`},Eo={light:`#fffffe`,dark:`#1e1e1e`},Do=`__shiki_resolved`;function Oo(e){if(e?.[Do])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?To.light:To.dark,n||=t.type===`light`?Eo.light:Eo.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Do,{enumerable:!1,writable:!1,value:!0}),t}async function ko(e){return[...new Set((await Promise.all(e.filter(e=>!bo(e)).map(async e=>await vo(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Ao(e){return(await Promise.all(e.map(async e=>So(e)?null:Oo(await vo(e))))).filter(e=>!!e)}function jo(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new V(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Mo=class extends po{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Oo(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=qi.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=jo(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new V(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},No=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},Po=0;function Fo(e){Po+=1,e.warnings!==!1&&Po>=10&&Po%10==0&&console.warn(`[Shiki] ${Po} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new V("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Oo),i=new Mo(new No(e.engine,n),r,n,e.langAlias),a;function o(t){return jo(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new V(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new V(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await ko(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Ao(e))}function g(){if(t)throw new V(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Po)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function Io(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Ao(e.themes||[]),ko(e.langs||[]),e.engine]);return Fo({...e,themes:t,langs:n,engine:r})}var Lo=new WeakMap;function Ro(e,t){Lo.set(e,t)}function zo(e){return Lo.get(e)}var Bo=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(_o(n).map(e=>[e,mo])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Vo(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Vo(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function Ho(e,t){if(!(e instanceof Bo))throw new V(`Invalid grammar state`);return e.getInternalStack(t)}var Uo=/,/,Wo=/ /;function Go(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(yo(e.resolveLangAlias(n.lang||`text`))||xo(r))return wo(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new V(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new V(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return qo(t,o,i,a,n)}function Ko(...e){if(e.length===2)return zo(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(yo(i)||xo(a))throw new V(`Plain language does not have grammar state`);if(i===`ansi`)throw new V(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new Bo(Jo(n,c,o,s,r).stateStack,c.name,o.name)}function qo(e,t,n,r,i){let a=Jo(e,t,n,r,i),o=new Bo(a.stateStack,t.name,n.name);return Ro(a.tokens,o),a.tokens}function Jo(e,t,n,r,i){let a=ho(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=wo(e),l=i.grammarState?Ho(i.grammarState,n.name)??mo:i.grammarContextCode==null?mo:Jo(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=go(r[aa.getForeground(s)],a),l=aa.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(Uo).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(Wo))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?Yo(t.scopes):Xo(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Yo(e){return e.map(e=>({scopeName:e}))}function Xo(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:$o(e,i,t.slice(0,r))}}return n}function Zo(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Qo(e,t,n){if(!Zo(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Zo(e[r],n[i])&&--r,--i;return r===-1}function $o(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Qo(e,t,n)){r.push(a);break}return r}function es(e,t,n,r=Go){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:zo(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=ts(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new Bo(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Ro(s,c),s}function ts(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var ns=/\s+/g;function rs(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(ns)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(ns);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var is=/:?lang=["']([^"']+)["']/g,as=/(?:```|~~~)([\w-]+)/g,os=/\\begin\{([\w-]+)\}/g,ss=/<script\s+(?:type|lang)=["']([^"']+)["']/gi;function cs(e){let t=wo(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function ls(e,t,n){let r=new Set;for(let t of e.matchAll(is)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(as)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(os)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(ss)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var us=[`color`,`background-color`];function ds(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function fs(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?ds(e,t):e})):e}function ps(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>ms(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&us.includes(a))if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new V('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function ms(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&H.Italic&&(t[`font-style`]=`italic`),e.fontStyle&H.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&H.Underline&&n.push(`underline`),e.fontStyle&H.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function hs(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function gs(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=cs(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new V(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}else{let t=n.lines[e.line];if(t===void 0)throw new V(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new V(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));_s(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return fs(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new V(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=vs(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new V(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new V(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&rs(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function _s(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new V(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new V(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function vs(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(vs).join(``):``}var ys=[gs()];function bs(e){let t=xs(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...ys]}function xs(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Ss=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Cs={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function ws(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Ts(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function Es(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)Cs[r]&&t.push({type:`setDecoration`,value:Cs[r]});else if(r<=29){let e=Cs[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Ss[r-30]}});else if(r===38){let n=Ts(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Ss[r-40]}});else if(r===48){let n=Ts(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Ss[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Ss[r-100+8]}})}return t}function Ds(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=ws(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=Es(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Os={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function ks(e=Os){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Ss.length;e++)r.push(t(Ss[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var As=/#([0-9a-f]{3,8})/i,js=/var\((--[\w-]+-ansi-[\w-]+)\)/,Ms={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function Ns(e,t,n){let r=ho(e,n),i=wo(t),a=ks(Object.fromEntries(Ss.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Ms[t]]}))),o=Ds();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=go(i,r),o=go(o,r),n.decorations.has(`dim`)&&(i=Ps(i));let s=H.None;return n.decorations.has(`bold`)&&(s|=H.Bold),n.decorations.has(`italic`)&&(s|=H.Italic),n.decorations.has(`underline`)&&(s|=H.Underline),n.decorations.has(`strikethrough`)&&(s|=H.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Ps(e){let t=e.match(As);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(js);return n?`var(${n[1]}-dim)`:e}function Fs(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!yo(r)&&!xo(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return Ns(r,t,n)}return Go(e,t,n)}function Is(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new V("`themes` option must not be empty");let p=es(e,t,n,Fs);if(c=zo(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new V(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>ps(e,h,u,l,d))),c&&Ro(a,c);let g=f.map(e=>ho(e.theme,n));i=Ls(f,m,g,u,l,`fg`,d),r=Ls(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=ho(n.theme,n);a=Fs(e,t,n);let l=e.getTheme(n.theme);r=go(l.bg,s),i=go(l.fg,s),o=l.name,c=zo(a)}else throw new V("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function Ls(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=go(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new V('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${go(t[r][a],n[r])||`inherit`}, ${go(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var Rs=/^\s+$/,zs=/^(\s*)(.*?)(\s*)$/;function Bs(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Bs(e,t,n),codeToTokens:(t,n)=>Is(e,t,n)}){let i=t;for(let e of bs(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=Is(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=Hs(a):d===`never`&&(a=Us(a)),f&&(a=Ws(a));let p={...r,get source(){return i}};for(let e of bs(n))a=e.tokens?.call(p,a)||a;return Vs(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function Vs(e,t,n,r=zo(e)){let i=bs(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:rs,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
79
- `}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=hs(a.htmlStyle||ms(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&Ro(m,r),m}function Hs(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&H.Underline||i.fontStyle&H.Strikethrough));o&&Rs.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Us(e){return e.map(e=>e.flatMap(e=>{if(Rs.test(e.content))return e;let t=e.content.match(zs);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Ws(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=hs(e.htmlStyle||ms(e)),i=hs(n.htmlStyle||ms(n)),a=e.fontStyle&&(e.fontStyle&H.Underline||e.fontStyle&H.Strikethrough),o=n.fontStyle&&(n.fontStyle&H.Underline||n.fontStyle&H.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Gs=A;function Ks(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Bs(e,t,n),codeToTokens:(t,n)=>Is(e,t,n)},i=Gs(Bs(e,t,n,r));for(let e of bs(n))i=e.postprocess?.call(r,i,n)||i;return i}async function qs(e){let t=await Io(e);return{getLastGrammarState:(...e)=>Ko(t,...e),codeToTokensBase:(e,n)=>Fs(t,e,n),codeToTokensWithThemes:(e,n)=>es(t,e,n),codeToTokens:(e,n)=>Is(t,e,n),codeToHast:(e,n)=>Bs(t,e,n),codeToHtml:(e,n)=>Ks(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Js(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,bo(n))return[];let r=t[n];if(!r)throw new V(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(So(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new V(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await qs({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function Ys(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function Xs(e,t){let n=Ys(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var Zs=Js({langs:ii,themes:ai,engine:()=>(0,Ni.createOnigurumaEngine)(r(()=>import(`./wasm-BnjxR4X6.js`),[]))}),{codeToHtml:Qs,codeToHast:$s,codeToTokens:ec,codeToTokensBase:tc,codeToTokensWithThemes:nc,getSingletonHighlighter:rc,getLastGrammarState:ic}=Xs(Zs,{guessEmbeddedLanguages:ls}),ac=4294967295,oc=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:ac,end:ac,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function sc(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function cc(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var lc=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),U=String.raw;function uc(e,t){if(e==null)throw Error(t??`Value expected`);return e}var dc=U`\[\^?`,fc=`c.? | C(?:-.?)?|${U`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${U`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${U`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${U`o\{[^\}]*\}?`}|${U`\d{1,3}`}`,pc=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,mc=new RegExp(U`
80
- \\ (?:
81
- ${fc}
82
- | [gk]<[^>]*>?
83
- | [gk]'[^']*'?
84
- | .
85
- )
86
- | \( (?:
87
- \? (?:
88
- [:=!>({]
89
- | <[=!]
90
- | <[^>]*>
91
- | '[^']*'
92
- | ~\|?
93
- | #(?:[^)\\]|\\.?)*
94
- | [^:)]*[:)]
95
- )?
96
- | \*[^\)]*\)?
97
- )?
98
- | (?:${pc.source})+
99
- | ${dc}
100
- | .
101
- `.replace(/\s+/g,``),`gsu`),hc=new RegExp(U`
102
- \\ (?:
103
- ${fc}
104
- | .
105
- )
106
- | \[:(?:\^?\p{Alpha}+|\^):\]
107
- | ${dc}
108
- | &&
109
- | .
110
- `.replace(/\s+/g,``),`gsu`);function gc(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=Kc(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(mc.lastIndex=0;s=mc.exec(e);){let t=_c(a,e,s[0],mc.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(mc.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?Jc(e,u):e).flat(),flags:r}}function _c(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=vc(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:Sc(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:Ic(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:Cc(n)}}if(a===`K`)return{token:Ac(`keep`,n)};if(a===`N`||a===`R`)return{token:kc(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:kc(`any`,n)};if(a===`X`)return{token:kc(`text_segment`,n)};let e=bc(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:Vc(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:Bc(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:Nc(`group`,n)};if(n===`(?>`)return{token:Nc(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:Nc(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:Nc(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:Nc(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:Mc(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
111
- `,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:kc(`dot`,n)}:n===`^`||n===`$`?{token:Sc(e.singleline?{"^":U`\A`,$:U`\Z`}[n]:n,n)}:n===`|`?{token:xc(n)}:pc.test(n)?{tokens:Yc(n)}:{token:wc(sc(n),n)}}function vc(e,t,n){let r=[Oc(t[1]===`^`,t)],i=1,a;for(hc.lastIndex=n;a=hc.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(Oc(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(wc(93,e));else if(i--,r.push(Tc(e)),!i)break}else{let t=yc(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:hc.lastIndex||e.length}}function yc(e){if(e[0]===`\\`)return bc(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!lc.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return kc(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?Ec(e):e===`&&`?Dc(e):wc(sc(e),e)}function bc(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return zc(e);if(`dDhHsSwW`.includes(n))return Uc(e);if(e.startsWith(U`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return Wc(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return wc(sc(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return wc(qc(e),e);if(Rc.has(n))return wc(Rc.get(n),e);if(/\d/.test(n))return jc(t,e);if(e===`\\`)throw Error(U`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return wc(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function xc(e){return{type:`Alternator`,raw:e}}function Sc(e,t){return{type:`Assertion`,kind:e,raw:t}}function Cc(e){return{type:`Backreference`,raw:e}}function wc(e,t){return{type:`Character`,value:e,raw:t}}function Tc(e){return{type:`CharacterClassClose`,raw:e}}function Ec(e){return{type:`CharacterClassHyphen`,raw:e}}function Dc(e){return{type:`CharacterClassIntersector`,raw:e}}function Oc(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function kc(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function Ac(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:uc(n.flags),raw:t}}function jc(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function Mc(e){return{type:`GroupClose`,raw:e}}function Nc(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function Pc(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function Fc(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function Ic(e){return{type:`Subroutine`,raw:e}}var Lc=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),Rc=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function zc(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return wc(sc(t.toUpperCase())-64,e)}function Bc(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=Gc(n),o=Gc(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),Ac(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,Nc(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function Vc(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=Lc.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return Pc(l,r??null,i?.split(`,`)??null,e)}function Hc(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return Fc(t,n,r,e)}function Uc(e){let t=e[1].toLowerCase();return kc({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function Wc(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return kc(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function Gc(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function Kc(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function qc(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function Jc(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[Cc(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(U`Octal encoded byte above 177 unsupported "${n}"`)}else r=sc(t);a.push(wc(r,(e===0?`\\`:``)+t))}return a}function Yc(e){let t=[],n=new RegExp(pc,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(Hc(e.slice(0,-1)));continue}}}t.push(Hc(e))}return t}function Xc(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function Zc(e){return Qc.has(e.type)}var Qc=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function $c(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=gc(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return ll();case`Assertion`:return el(n);case`Backreference`:return tl(n,a);case`Character`:return pl(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return nl(n,a,t);case`CharacterClassOpen`:return rl(n,a,t);case`CharacterSet`:return il(n,a);case`Directive`:return _l(n.kind,{flags:n.flags});case`GroupOpen`:return al(n,a,t);case`NamedCallout`:return bl(n.kind,n.tag,n.arguments);case`Quantifier`:return ol(n,a);case`Subroutine`:return sl(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=Cl(vl(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(U`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(U`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function el({kind:e}){return ul(uc({"^":`line_start`,$:`line_end`,"\\A":`string_start`,"\\b":`word_boundary`,"\\B":`word_boundary`,"\\G":`search_start`,"\\y":`text_segment_boundary`,"\\Y":`text_segment_boundary`,"\\z":`string_end`,"\\Z":`string_end_newline`}[e],`Unexpected assertion kind "${e}"`),{negate:e===U`\B`||e===U`\Y`})}function tl({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,dl(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return dl(r)}return i(+r)}function nl(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),hl(o,e);throw Error(`Invalid character class range`)}return pl(sc(`-`))}function rl({negate:e},t,n){let{tokens:r,walk:i}=t,a=[ml()],o=r[t.nextIndex],s=Pl(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(ml()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=Pl(r[t.nextIndex],o)}let c=ml({negate:e});return a.length===1?c.body=a[0].body:(c.kind=`intersection`,c.body=a.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function il({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=Nl(n);if(lc.has(r)&&!o?.has(r))e=`posix`,n=r;else return Tl(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?xl(n,{negate:t}):gl(e,{negate:t})}function al(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=El(e),l=c.type===`AbsenceFunction`,u=Al(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&cc(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=Fl(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(ll()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(kl(t)||t.type===`CapturingGroup`)throw Error(e)}else if(kl(t)||Al(t)&&t.negate)throw Error(e)}}f=Fl(r[t.nextIndex])}return t.nextIndex++,c}function ol({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!Zc(a))throw Error(`Quantifier requires a repeatable token`);let o=Sl(e,t,n,a);return i.body.pop(),o}function sl({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=wl(i);return r.push(o),o}function cl(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:Dl(t?.body)}}function ll(e){return{type:`Alternative`,body:Ol(e?.body)}}function ul(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function dl(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function fl(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!jl(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Dl(t?.body)}}function pl(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function ml(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:Ol(e?.body)}}function hl(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function gl(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function _l(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:uc(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function vl(e){return{type:`Flags`,...e}}function W(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:Dl(e?.body)}}function yl(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:Dl(e?.body)}}function bl(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function xl(e,t){let n=!!t?.negate;if(!lc.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function Sl(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function Cl(e,t){return{type:`Regex`,body:Dl(t?.body),flags:e}}function wl(e){return{type:`Subroutine`,ref:e}}function Tl(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(Nl(e));if(!r){if(n.normalizeUnknownPropertyNames)r=Ml(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(U`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function El({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return cl(`repeater`);case`atomic`:return W({atomic:!0});case`capturing`:return fl(i,{name:n});case`group`:return W({flags:e});case`lookahead`:case`lookbehind`:return yl({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function Dl(e){if(e===void 0)e=[ll()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function Ol(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function kl(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function Al(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function jl(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Ml(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function Nl(e){return e.replace(/[- _]+/g,``).toLowerCase()}function Pl(e,t){let n=t;return uc(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function Fl(e){return uc(e,`Unclosed group`)}function Il(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){Ll(c).splice(Math.max(0,Rl(s)+l),1),l--,u=!0},removeAllNextSiblings(){return Ll(c).splice(Rl(s)+1)},removeAllPrevSiblings(){let e=Rl(s)+l;return l-=e,Ll(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,Rl(s)+l)]=e:uc(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(Ll(c).splice(Math.max(0,Rl(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,Rl(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`Alternative`:case`CapturingGroup`:case`CharacterClass`:case`Group`:case`LookaroundAssertion`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function Ll(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function Rl(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var zl=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Bl(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Vl(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var G=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function Hl(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===G.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?G.CHAR_CLASS:G.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function Ul(e,t,n,r){Hl(e,t,n,r)}function Wl(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===G.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function Gl(e,t,n){return!!Wl(e,t,0,n)}function Kl(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var ql=new RegExp(String.raw`(?<noncapturingStart>${zl})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function Jl(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(ql.lastIndex=Number.isNaN(c)?0:c+7;f=ql.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),Bl(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=Hl(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},G.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var Yl=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Xl=new RegExp(String.raw`
112
- \\(?: \d+
113
- | c[A-Za-z]
114
- | [gk]<[^>]+>
115
- | [pPu]\{[^\}]+\}
116
- | u[A-Fa-f\d]{4}
117
- | x[A-Fa-f\d]{2}
118
- )
119
- | \((?: \? (?: [:=!>]
120
- | <(?:[=!]|[^>]+>)
121
- | [A-Za-z\-]+:
122
- | \(DEFINE\)
123
- ))?
124
- | (?<qBase>${Yl})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
125
- | \\?.
126
- `.replace(/\s+/g,``),`gsu`);function Zl(e){if(!RegExp(`${Yl}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(Xl.lastIndex=0;o=Xl.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a)if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=Vl(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}Xl.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null);i=s}return{pattern:e}}var K=String.raw,Ql=K`\(\?R=(?<rDepth>[^\)]+)\)|${K`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,$l=K`\(\?<(?![=!])(?<captureName>[^>]+)>`,eu=K`${$l}|(?<unnamed>\()(?!\?)`,tu=new RegExp(K`${$l}|${Ql}|\(\?|\\?.`,`gsu`),nu=`Cannot use multiple overlapping recursions`;function ru(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(Ql,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&Gl(e,K`\(\?\(DEFINE\)`,G.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=Gl(e,K`\\[1-9]`,G.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(tu.lastIndex=0;f=tu.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else if(m){if(iu(m),l)throw Error(nu);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(tu.lastIndex);if(Gl(s,Ql,G.DEFAULT))throw Error(nu);let c=m-1;e=au(t,s,c,!1,n,a,d),i=cu(i,t,c,a.length,0,d);break}else if(h){iu(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(nu);break}if(!u)throw Error(K`Recursive \g cannot be used outside the referenced group "${r===`external`?h:K`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=Kl(e,p);if(o&&Gl(m,K`${$l}|\((?!\?)`,G.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=au(_,v,b,!0,n,a,d);i=cu(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,tu.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),tu.lastIndex),s.set(p,tu.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),tu.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function iu(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function au(e,t,n,r,i,a,o){let s=new Set;r&&Ul(e+t,$l,({groups:{captureName:e}})=>{s.add(e)},G.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${ou(`(?:${e}`,`forward`,...c)}(?:)${ou(`${t})`,`backward`,...c)}${t}`}function ou(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=Hl(e,K`${eu}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),su(i,n),s?e:`(?<${t}${l}>`}return K`\k<${c}${l}>`},G.DEFAULT)}return c}function su(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function cu(e,t,n,r,i,a){if(e.size&&r){let o=0;Ul(t,eu,()=>o++,G.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var q=String.fromCodePoint,J=String.raw,Y={},lu=globalThis.RegExp;Y.flagGroups=(()=>{try{new lu(`(?i:)`)}catch{return!1}return!0})(),Y.unicodeSets=(()=>{try{new lu(`[[]]`,`v`)}catch{return!1}return!0})(),Y.bugFlagVLiteralHyphenIsRange=Y.unicodeSets?(()=>{try{new lu(J`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,Y.bugNestedClassIgnoresNegation=Y.unicodeSets&&new lu(`[[^a]]`,`v`).test(`a`);function uu(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function du(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function fu(e,t){return mu[e]>=mu[t]}function pu(e,t){if(e==null)throw Error(t??`Value expected`);return e}var mu={ES2025:2025,ES2024:2024,ES2018:2018},hu={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function gu(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!hu[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=Y.flagGroups?`ES2025`:Y.unicodeSets?`ES2024`:`ES2018`),t}var _u=`[ -\r ]`,vu=new Set([q(304),q(305)]),yu=J`[\p{L}\p{M}\p{N}\p{Pc}]`;function bu(e){if(vu.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=wu.get(n),a=Su.get(n),o=Cu.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var xu=new Map(`C Other
127
- Cc Control cntrl
128
- Cf Format
129
- Cn Unassigned
130
- Co Private_Use
131
- Cs Surrogate
132
- L Letter
133
- LC Cased_Letter
134
- Ll Lowercase_Letter
135
- Lm Modifier_Letter
136
- Lo Other_Letter
137
- Lt Titlecase_Letter
138
- Lu Uppercase_Letter
139
- M Mark Combining_Mark
140
- Mc Spacing_Mark
141
- Me Enclosing_Mark
142
- Mn Nonspacing_Mark
143
- N Number
144
- Nd Decimal_Number digit
145
- Nl Letter_Number
146
- No Other_Number
147
- P Punctuation punct
148
- Pc Connector_Punctuation
149
- Pd Dash_Punctuation
150
- Pe Close_Punctuation
151
- Pf Final_Punctuation
152
- Pi Initial_Punctuation
153
- Po Other_Punctuation
154
- Ps Open_Punctuation
155
- S Symbol
156
- Sc Currency_Symbol
157
- Sk Modifier_Symbol
158
- Sm Math_Symbol
159
- So Other_Symbol
160
- Z Separator
161
- Zl Line_Separator
162
- Zp Paragraph_Separator
163
- Zs Space_Separator
164
- ASCII
165
- ASCII_Hex_Digit AHex
166
- Alphabetic Alpha
167
- Any
168
- Assigned
169
- Bidi_Control Bidi_C
170
- Bidi_Mirrored Bidi_M
171
- Case_Ignorable CI
172
- Cased
173
- Changes_When_Casefolded CWCF
174
- Changes_When_Casemapped CWCM
175
- Changes_When_Lowercased CWL
176
- Changes_When_NFKC_Casefolded CWKCF
177
- Changes_When_Titlecased CWT
178
- Changes_When_Uppercased CWU
179
- Dash
180
- Default_Ignorable_Code_Point DI
181
- Deprecated Dep
182
- Diacritic Dia
183
- Emoji
184
- Emoji_Component EComp
185
- Emoji_Modifier EMod
186
- Emoji_Modifier_Base EBase
187
- Emoji_Presentation EPres
188
- Extended_Pictographic ExtPict
189
- Extender Ext
190
- Grapheme_Base Gr_Base
191
- Grapheme_Extend Gr_Ext
192
- Hex_Digit Hex
193
- IDS_Binary_Operator IDSB
194
- IDS_Trinary_Operator IDST
195
- ID_Continue IDC
196
- ID_Start IDS
197
- Ideographic Ideo
198
- Join_Control Join_C
199
- Logical_Order_Exception LOE
200
- Lowercase Lower
201
- Math
202
- Noncharacter_Code_Point NChar
203
- Pattern_Syntax Pat_Syn
204
- Pattern_White_Space Pat_WS
205
- Quotation_Mark QMark
206
- Radical
207
- Regional_Indicator RI
208
- Sentence_Terminal STerm
209
- Soft_Dotted SD
210
- Terminal_Punctuation Term
211
- Unified_Ideograph UIdeo
212
- Uppercase Upper
213
- Variation_Selector VS
214
- White_Space space
215
- XID_Continue XIDC
216
- XID_Start XIDS`.split(/\s/).map(e=>[Nl(e),e])),Su=new Map([[`s`,q(383)],[q(383),`s`]]),Cu=new Map([[q(223),q(7838)],[q(107),q(8490)],[q(229),q(8491)],[q(969),q(8486)]]),wu=new Map([Du(453),Du(456),Du(459),Du(498),...Ou(8072,8079),...Ou(8088,8095),...Ou(8104,8111),Du(8124),Du(8140),Du(8188)]),Tu=new Map([[`alnum`,J`[\p{Alpha}\p{Nd}]`],[`alpha`,J`\p{Alpha}`],[`ascii`,J`\p{ASCII}`],[`blank`,J`[\p{Zs}\t]`],[`cntrl`,J`\p{Cc}`],[`digit`,J`\p{Nd}`],[`graph`,J`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,J`\p{Lower}`],[`print`,J`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,J`[\p{P}\p{S}]`],[`space`,J`\p{space}`],[`upper`,J`\p{Upper}`],[`word`,J`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,J`\p{AHex}`]]);function Eu(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Du(e){let t=q(e);return[t.toLowerCase(),t]}function Ou(e,t){return Eu(e,t).map(e=>Du(e))}var ku=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function Au(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};Pu(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:fu(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Il(e,ju,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return Il(e,Mu,a),Il(e,Nu,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var ju={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=W();e.body[0].body.push(yl({negate:!0,body:r}),Tl(`Any`));let i=W();i.body[0].body.push(Sl(`greedy`,0,1/0,e)),n(X(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];du(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=Vu(t.get(e));if(n){let t=W({flags:n});t.body[0].body=e.body,e.body=[X(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(X(yl({body:[ll({body:[ul(`string_end`)]}),ll({body:[pl(10)]})]}),t));else if(c===`line_start`)o(X(Xu(J`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`)if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&qu(e))o(X(yl({negate:!0}),t));else if(d)throw Error(J`Uses "\G" in a way that requires a subclass`);else o(Qu(ul(`string_start`),t)),s.strategy=`clip_search`}else if(!(c===`string_end`||c===`string_start`))if(c===`string_end_newline`)o(X(Xu(J`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${yu})(?!${yu})|(?<!${yu})(?=${yu}))`,n=`(?:(?<=${yu})(?=${yu})|(?<!${yu})(?!${yu}))`;o(X(Xu(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!Yu(n)&&(n=Bu(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Yu(r)&&(r=Bu(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(X(ml({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(Qu(gl(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(X(Zu(Xu(_u),l),t));return}if(s&&(c===`word`||u===`word`)){n(Qu(gl(`word`,{negate:l}),t));return}if(c===`any`)n(Qu(Tl(`Any`),t));else if(c===`digit`)n(Qu(Tl(`Nd`,{negate:l}),t));else if(c!==`dot`)if(c===`text_segment`){if(r===`strict`)throw Error(J`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=J`\p{RI}{2}|${e}(?:\u200D${e})*`;n(X(Xu(J`(?>\r\n|${i?J`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(Qu(Tl(`AHex`,{negate:l}),t));else if(c===`newline`)n(X(Xu(l?`[^
217
- ]`:`(?>\r
218
- ?|[
219
- \v\f…\u2028\u2029])`),t));else if(c===`posix`)if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${q(e.codePointAt(0)-1)}${q(e.codePointAt(2)+1)}-\u{10FFFF}`),n(X(Xu(`[${e}]`),t))}else n(X(Zu(Xu(Tu.get(u)),l),t));else if(c===`property`)xu.has(Nl(u))||(e.key=`sc`);else if(c===`space`)n(Qu(Tl(`space`,{negate:l}),t));else if(c===`word`)n(X(Zu(Xu(yu),l),t));else throw Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`)if(!c.enable&&!c.disable)r();else{let e=W({flags:c});e.body[0].body=o(),i(X(e,t),{traverse:!0})}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&Xc(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(J`Uses "\K" in a way that's unsupported`);let o=yl({behind:!0});o.body[0].body=a(),i(X(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(X(yl({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=W();t.body[0].body.push(e.body),e.body=X(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=Wu(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error(J`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!Yu(n)&&(n=Bu(n,t),e.ref=n)}},Mu={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=Qu(Ru(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&du(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=du(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=uu(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&!(n.type===`CapturingGroup`&&(n.name===a||n.number===a)););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?Ru(0):Lu(o,r.groupOriginByCopy,null),l=c;if(!s){let e=Vu(zu(o,e=>e.type===`Group`&&!!e.flags)),t=e?uu(r.globalFlags,e):r.globalFlags;Fu(t,r.currentFlags)||(l=W({flags:Hu(t)}),l.body[0].body.push(c))}n(X(l,t),{traverse:!s})}},Nu={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>Iu(t,e));i.length?i.length>1?n(X(W({atomic:!0,body:i.reverse().map(e=>ll({body:[dl(e.number)]}))}),t)):e.ref=i[0].number:n(X(yl({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=fl();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Pu(e){Il(e,{"*"({node:e,parent:t}){e.parent=t}})}function Fu(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Iu(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=Uu(n.parent);for(let r of t){if(r===n)break;if(r===e||Gu(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function Lu(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=Lu(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function Ru(e){let t=wl(e);return t.isRecursive=!0,t}function zu(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Bu(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function Vu(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Hu({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function Uu(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Wu(e){let t=e.find(e=>e.kind===`search_start`||Ju(e,{negate:!1})||!Ku(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=Wu(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function Gu(e,t){let n=Uu(e)??[];for(let e of n)if(e===t||Gu(e,t))return!0;return!1}function Ku({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function qu(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function Ju(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Xc(e.body[0],{type:`Assertion`,kind:`search_start`})}function Yu(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Xu(e,t){let n=$c(e,{...t,unicodePropertyMap:xu}).body;return n.length>1||n[0].body.length>1?W({body:n}):n[0].body[0]}function Zu(e,t){return e.negate=t,e}function Qu(e,t){return e.parent=t,e}function X(e,t){return Pu(e),e.parent=t,e}function $u(e,t){let n=gu(t),r=fu(n.target,`ES2024`),i=fu(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];Il(e,ed,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,pu(td[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&du(f._captureTransfers,e.transferTo,[]).push(t)}),f}var ed={"*":{enter({node:e},t){if(pd(e)){let n=t.getCurrentModI();t.pushModI(e.flags?uu({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){pd(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){sd(q(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),cd(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&ku.has(e.value)&&t.setHasCasedChar()}},td={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?J`\B`:J`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=q(e),r=ld(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&sd(n)){let e=bu(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);Y.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(hd)&&(o=[pl(45),...o.filter(e=>!hd(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||Y.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=W(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=ll({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(Y.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=ld(n,i),o=ld(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&ud(cd(e)).forEach(e=>{s.add(Array.isArray(e)?`${ld(e[0],i)}-${ld(e[1],i)}`:ld(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:J`[^\n]`;if(e===`digit`)return t?J`\D`:J`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&ku.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?J`\P`:J`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?J`\W`:J`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=uu(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${dd(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+fd(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:J`\g<${t}&R=${r}>`}},nd=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),rd=new Set([`-`,`\\`,`]`,`^`,`[`]),id=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),ad=new Map([[9,J`\t`],[10,J`\n`],[11,J`\v`],[12,J`\f`],[13,J`\r`],[8232,J`\u2028`],[8233,J`\u2029`],[65279,J`\uFEFF`]]),od=/^\p{Cased}$/u;function sd(e){return od.test(e)}function cd(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=q(e);if(!sd(t))continue;let o=bu(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function ld(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(ad.has(e))return ad.get(e);if(e<32||e>126&&e<160||e>262143||t&&md(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?id:rd:nd,a=q(e);return(i.has(a)?`\\`:``)+a}function ud(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function dd(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function fd({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function pd({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function md(e){return e>47&&e<58}function hd({type:e,value:t}){return e===`Character`&&t===45}var gd=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=vd(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(_d(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=yd(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function _d(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function vd(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)du(n,t,{}).transferTo=e;return n}function yd(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function bd(e,t){let n=xd(e,t);return n.options?new gd(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function xd(e,t){let n=gu(t),r=Au($c(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:xu}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=$u(r,n),a=ru(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=Jl(Zl(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}function Sd(e,t){return bd(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Cd(e={}){let t={target:`auto`,cache:new Map,...e};return t.regexConstructor||=e=>Sd(e,{target:t.target}),{createScanner(e){return new oc(e,t)},createString(e){return{content:e}}}}async function wd(e){if(qr())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=Ur.get(e);if(t!=null)return t;try{let t=Wr.get(e);if(t==null&&Object.prototype.hasOwnProperty.call(ii,e)&&(t=ii[e]),t==null)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return Hr.has(e)||Hr.set(e,n),n});return Ur.set(e,n),await n}finally{Ur.delete(e)}}function Td(e){return Hr.get(e)??wd(e)}function Ed({name:e,load:t,colorScheme:n,collection:r,displayName:i}){return{name:e,colorScheme:n,collection:r,displayName:i,load:Dd(t)}}function Dd(e){return async()=>Oo(Ir(await e()))}var Od=`pierre`,kd=[`pierre-dark`,`pierre-dark-soft`,`pierre-dark-vibrant`,`pierre-dark-protanopia-deuteranopia`,`pierre-dark-tritanopia`],Ad=[`pierre-light`,`pierre-light-soft`,`pierre-light-vibrant`,`pierre-light-protanopia-deuteranopia`,`pierre-light-tritanopia`],jd=[...Ad,...kd],Md=new Set(Ad);function Nd(e){return Md.has(e)?`light`:`dark`}var Pd={"pierre-dark":`Pierre Dark`,"pierre-dark-soft":`Pierre Dark Soft`,"pierre-dark-vibrant":`Pierre Dark Vibrant`,"pierre-dark-protanopia-deuteranopia":`Pierre Dark Protanopia & Deuteranopia`,"pierre-dark-tritanopia":`Pierre Dark Tritanopia`,"pierre-light":`Pierre Light`,"pierre-light-soft":`Pierre Light Soft`,"pierre-light-vibrant":`Pierre Light Vibrant`,"pierre-light-protanopia-deuteranopia":`Pierre Light Protanopia & Deuteranopia`,"pierre-light-tritanopia":`Pierre Light Tritanopia`},Fd={"pierre-dark":()=>r(()=>import(`./pierre-dark-CpLgRqie.js`),[]),"pierre-dark-soft":()=>r(()=>import(`./pierre-dark-soft-kZQmAZld.js`),[]),"pierre-dark-vibrant":()=>r(()=>import(`./pierre-dark-vibrant-CpQYzh95.js`),[]),"pierre-dark-protanopia-deuteranopia":()=>r(()=>import(`./pierre-dark-protanopia-deuteranopia-B35FxJx-.js`),[]),"pierre-dark-tritanopia":()=>r(()=>import(`./pierre-dark-tritanopia-CpjhbsIL.js`),[]),"pierre-light":()=>r(()=>import(`./pierre-light-CoaEpmwp.js`),[]),"pierre-light-soft":()=>r(()=>import(`./pierre-light-soft-lWLdNTOI.js`),[]),"pierre-light-vibrant":()=>r(()=>import(`./pierre-light-vibrant-D80Fkn33.js`),[]),"pierre-light-protanopia-deuteranopia":()=>r(()=>import(`./pierre-light-protanopia-deuteranopia-0fSaH845.js`),[]),"pierre-light-tritanopia":()=>r(()=>import(`./pierre-light-tritanopia-CEbqgOJL.js`),[])};function Id(e){return Ed({name:e,collection:Od,colorScheme:Nd(e),displayName:Pd[e],load:Fd[e]})}var Ld=jr({themes:jd.map(e=>Id(e))}),Rd=`shiki`,zd=[`ayu-light`,`catppuccin-latte`,`everforest-light`,`github-light`,`github-light-default`,`github-light-high-contrast`,`gruvbox-light-hard`,`gruvbox-light-medium`,`gruvbox-light-soft`,`horizon-bright`,`kanagawa-lotus`,`light-plus`,`material-theme-lighter`,`min-light`,`night-owl-light`,`one-light`,`rose-pine-dawn`,`slack-ochin`,`snazzy-light`,`solarized-light`,`vitesse-light`],Bd=`andromeeda.aurora-x.ayu-dark.ayu-mirage.catppuccin-frappe.catppuccin-macchiato.catppuccin-mocha.dark-plus.dracula.dracula-soft.everforest-dark.github-dark.github-dark-default.github-dark-dimmed.github-dark-high-contrast.gruvbox-dark-hard.gruvbox-dark-medium.gruvbox-dark-soft.horizon.houston.kanagawa-dragon.kanagawa-wave.laserwave.material-theme.material-theme-darker.material-theme-ocean.material-theme-palenight.min-dark.monokai.night-owl.nord.one-dark-pro.plastic.poimandres.red.rose-pine.rose-pine-moon.slack-dark.solarized-dark.synthwave-84.tokyo-night.vesper.vitesse-black.vitesse-dark`.split(`.`),Vd=new Set(zd);function Hd(e){return Vd.has(e)?`light`:`dark`}var Ud={andromeeda:()=>r(()=>import(`./andromeeda-vGVdxbeo.js`),[]),"aurora-x":()=>r(()=>import(`./aurora-x-CDeNXAV0.js`),[]),"ayu-dark":()=>r(()=>import(`./ayu-dark-DluEY0Gj.js`),[]),"ayu-light":()=>r(()=>import(`./ayu-light-C3h-C4tm.js`),[]),"ayu-mirage":()=>r(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]),"catppuccin-frappe":()=>r(()=>import(`./catppuccin-frappe-3VR1Za6u.js`),[]),"catppuccin-latte":()=>r(()=>import(`./catppuccin-latte-DwIHMF0Q.js`),[]),"catppuccin-macchiato":()=>r(()=>import(`./catppuccin-macchiato-DYnBP6_5.js`),[]),"catppuccin-mocha":()=>r(()=>import(`./catppuccin-mocha-DYhrFGRu.js`),[]),"dark-plus":()=>r(()=>import(`./dark-plus-Cs2F2srj.js`),[]),dracula:()=>r(()=>import(`./dracula-BHWKrbxM.js`),[]),"dracula-soft":()=>r(()=>import(`./dracula-soft-5eyTD99u.js`),[]),"everforest-dark":()=>r(()=>import(`./everforest-dark-sB-x3p7T.js`),[]),"everforest-light":()=>r(()=>import(`./everforest-light-Df2xbC6M.js`),[]),"github-dark":()=>r(()=>import(`./github-dark-C-LZuMrd.js`),[]),"github-dark-default":()=>r(()=>import(`./github-dark-default-DXG-b-1a.js`),[]),"github-dark-dimmed":()=>r(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]),"github-dark-high-contrast":()=>r(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]),"github-light":()=>r(()=>import(`./github-light-EUqPIrTm.js`),[]),"github-light-default":()=>r(()=>import(`./github-light-default-BXViO-2h.js`),[]),"github-light-high-contrast":()=>r(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]),"gruvbox-dark-hard":()=>r(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]),"gruvbox-dark-medium":()=>r(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]),"gruvbox-dark-soft":()=>r(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]),"gruvbox-light-hard":()=>r(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]),"gruvbox-light-medium":()=>r(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]),"gruvbox-light-soft":()=>r(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]),horizon:()=>r(()=>import(`./horizon-CE9ld1lL.js`),[]),"horizon-bright":()=>r(()=>import(`./horizon-bright-DSNQnXHK.js`),[]),houston:()=>r(()=>import(`./houston-CsvMBhTu.js`),[]),"kanagawa-dragon":()=>r(()=>import(`./kanagawa-dragon-CXtmUGW6.js`),[]),"kanagawa-lotus":()=>r(()=>import(`./kanagawa-lotus-BN08jTvb.js`),[]),"kanagawa-wave":()=>r(()=>import(`./kanagawa-wave-CTweb8Dz.js`),[]),laserwave:()=>r(()=>import(`./laserwave-C_8bwKvT.js`),[]),"light-plus":()=>r(()=>import(`./light-plus-DVQuIRkW.js`),[]),"material-theme":()=>r(()=>import(`./material-theme-Bm3Qr25_.js`),[]),"material-theme-darker":()=>r(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]),"material-theme-lighter":()=>r(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]),"material-theme-ocean":()=>r(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]),"material-theme-palenight":()=>r(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]),"min-dark":()=>r(()=>import(`./min-dark-BSWPekZh.js`),[]),"min-light":()=>r(()=>import(`./min-light-DDpmG2fV.js`),[]),monokai:()=>r(()=>import(`./monokai-CdkpiU2Y.js`),[]),"night-owl":()=>r(()=>import(`./night-owl-DhmEMT88.js`),[]),"night-owl-light":()=>r(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]),nord:()=>r(()=>import(`./nord-Cb4Vim4T.js`),[]),"one-dark-pro":()=>r(()=>import(`./one-dark-pro-CLwyXe_n.js`),[]),"one-light":()=>r(()=>import(`./one-light-D7Lr4KcI.js`),[]),plastic:()=>r(()=>import(`./plastic-DQwYfKfQ.js`),[]),poimandres:()=>r(()=>import(`./poimandres-DRFjx7u4.js`),[]),red:()=>r(()=>import(`./red-CJ3rzSJv.js`),[]),"rose-pine":()=>r(()=>import(`./rose-pine-BthvhNj6.js`),[]),"rose-pine-dawn":()=>r(()=>import(`./rose-pine-dawn-Dg85fqjY.js`),[]),"rose-pine-moon":()=>r(()=>import(`./rose-pine-moon-hon4tzzS.js`),[]),"slack-dark":()=>r(()=>import(`./slack-dark-DnToyrRv.js`),[]),"slack-ochin":()=>r(()=>import(`./slack-ochin-B2OO5cIa.js`),[]),"snazzy-light":()=>r(()=>import(`./snazzy-light-4G7pJPwS.js`),[]),"solarized-dark":()=>r(()=>import(`./solarized-dark-DV17i1UV.js`),[]),"solarized-light":()=>r(()=>import(`./solarized-light-DSh2HLQt.js`),[]),"synthwave-84":()=>r(()=>import(`./synthwave-84-nFMaYfgc.js`),[]),"tokyo-night":()=>r(()=>import(`./tokyo-night-oM2G3aXe.js`),[]),vesper:()=>r(()=>import(`./vesper-DdrHHSXu.js`),[]),"vitesse-black":()=>r(()=>import(`./vitesse-black-fwtXNY1n.js`),[]),"vitesse-dark":()=>r(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]),"vitesse-light":()=>r(()=>import(`./vitesse-light-VbXTXTou.js`),[])};function Wd(e){return Ed({name:e,collection:Rd,colorScheme:Hd(e),load:Ud[e]})}var Gd=jr({themes:Object.freeze([...zd.map(e=>Wd(e)),...Bd.map(e=>Wd(e))])});function Kd(e){if(qr())throw Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(R.hasRegisteredTheme(e))return;let t=Gd.getTheme(e);if(t!=null){R.registerThemeIfAbsent(t.name,t.load);return}throw Error(`No valid theme loader registered for "${e}"`)}function qd(e,t){if(t.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function Jd(e){Kd(e);let t=await R.resolveTheme(e);return qd(e,t),t}function Yd(e){return R.getResolvedTheme(e)??Jd(e)}var Xd;async function Zd({themes:e,langs:t,preferredHighlighter:n=`shiki-js`}){Xd??=Zs({themes:[],langs:[`text`],engine:n===`shiki-wasm`?Mi(r(()=>import(`./wasm-BnjxR4X6.js`),[])):Cd()});let i=$d(Xd)?await Xd:Xd;Xd=i;let a=[];for(let e of t){if(e===`text`||e===`ansi`)continue;let t=Td(e);`then`in t?a.push(t):Kr(t,i)}let o=[];for(let t of e){let e=Yd(t);`then`in e?o.push(e):Vr(e,Xd)}return(a.length>0||o.length>0)&&await Promise.all([Promise.all(a).then(e=>{Kr(e,i)}),Promise.all(o).then(e=>{Vr(e,i)})]),i}function Qd(){if(Xd!=null&&!(`then`in Xd))return Xd}function $d(e=Xd){return e!=null&&`then`in e}for(let e of Ld.getThemes())R.registerThemeIfAbsent(e.name,e.load);function ef(e=At){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}function tf(e){return R.hasResolvedThemes(e)}function nf(e,t){return Or(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}var rf=new Map,af=0,of={"1c":`1c`,abap:`abap`,as:`actionscript-3`,ada:`ada`,adb:`ada`,ads:`ada`,adoc:`asciidoc`,asciidoc:`asciidoc`,"component.html":`angular-html`,"component.ts":`angular-ts`,conf:`nginx`,htaccess:`apache`,cls:`tex`,trigger:`apex`,apl:`apl`,applescript:`applescript`,scpt:`applescript`,ara:`ara`,asm:`asm`,s:`riscv`,astro:`astro`,awk:`awk`,bal:`ballerina`,sh:`zsh`,bash:`zsh`,bat:`cmd`,cmd:`cmd`,be:`berry`,beancount:`beancount`,bib:`bibtex`,bicep:`bicep`,"blade.php":`blade`,bsl:`bsl`,c:`c`,h:`objective-cpp`,cs:`csharp`,cpp:`cpp`,hpp:`cpp`,cc:`cpp`,cxx:`cpp`,hh:`cpp`,cdc:`cdc`,cairo:`cairo`,clar:`clarity`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,soy:`soy`,cmake:`cmake`,"CMakeLists.txt":`cmake`,cob:`cobol`,cbl:`cobol`,cobol:`cobol`,CODEOWNERS:`codeowners`,ql:`ql`,coffee:`coffeescript`,lisp:`lisp`,cl:`lisp`,lsp:`lisp`,log:`log`,v:`verilog`,cql:`cql`,cr:`crystal`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cypher`,cyp:`cypher`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,patch:`diff`,Dockerfile:`dockerfile`,dockerfile:`dockerfile`,env:`dotenv`,dm:`dream-maker`,edge:`edge`,el:`emacs-lisp`,ex:`elixir`,exs:`elixir`,elm:`elm`,erb:`erb`,erl:`erlang`,hrl:`erlang`,f:`fortran-fixed-form`,for:`fortran-fixed-form`,fs:`fsharp`,fsi:`fsharp`,fsx:`fsharp`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`fortran-free-form`,f95:`fortran-free-form`,fnl:`fennel`,fish:`fish`,ftl:`ftl`,tres:`gdresource`,res:`gdresource`,gd:`gdscript`,gdshader:`gdshader`,gs:`genie`,feature:`gherkin`,COMMIT_EDITMSG:`git-commit`,"git-rebase-todo":`git-rebase`,gjs:`glimmer-js`,gleam:`gleam`,gts:`glimmer-ts`,glsl:`glsl`,vert:`glsl`,frag:`glsl`,shader:`shaderlab`,gp:`gnuplot`,plt:`gnuplot`,gnuplot:`gnuplot`,go:`go`,graphql:`graphql`,gql:`graphql`,groovy:`groovy`,gvy:`groovy`,hack:`hack`,haml:`haml`,hbs:`handlebars`,handlebars:`handlebars`,hs:`haskell`,lhs:`haskell`,hx:`haxe`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,fx:`hlsl`,html:`html`,htm:`html`,http:`http`,rest:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,cfg:`ini`,jade:`pug`,pug:`pug`,java:`java`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jinja:`jinja`,jinja2:`jinja`,j2:`jinja`,jison:`jison`,jl:`julia`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,libsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,kt:`kotlin`,kts:`kts`,kql:`kusto`,tex:`tex`,ltx:`tex`,lean:`lean4`,less:`less`,liquid:`liquid`,lit:`lit`,ll:`llvm`,logo:`logo`,lua:`lua`,luau:`luau`,Makefile:`makefile`,mk:`makefile`,makefile:`makefile`,md:`markdown`,markdown:`markdown`,marko:`marko`,m:`wolfram`,mat:`matlab`,mdc:`mdc`,mdx:`mdx`,wiki:`wikitext`,mediawiki:`wikitext`,mmd:`mermaid`,mermaid:`mermaid`,mips:`mipsasm`,mojo:`mojo`,"🔥":`mojo`,move:`move`,nar:`narrat`,nf:`nextflow`,nim:`nim`,nims:`nim`,nimble:`nim`,nix:`nix`,nu:`nushell`,mm:`objective-cpp`,ml:`ocaml`,mli:`ocaml`,mll:`ocaml`,mly:`ocaml`,pas:`pascal`,p:`pascal`,pl:`prolog`,pm:`perl`,t:`perl`,raku:`raku`,p6:`raku`,pl6:`raku`,php:`php`,phtml:`php`,pls:`plsql`,sql:`sql`,po:`po`,polar:`polar`,pcss:`postcss`,pot:`pot`,potx:`potx`,pq:`powerquery`,pqm:`powerquery`,ps1:`powershell`,psm1:`powershell`,psd1:`powershell`,prisma:`prisma`,pro:`prolog`,P:`prolog`,properties:`properties`,proto:`protobuf`,pp:`puppet`,purs:`purescript`,py:`python`,pyw:`python`,pyi:`python`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,R:`r`,rkt:`racket`,rktl:`racket`,razor:`razor`,cshtml:`razor`,rb:`ruby`,rbw:`ruby`,reg:`reg`,regex:`regexp`,rel:`rel`,rs:`rust`,rst:`rst`,rake:`ruby`,gemspec:`ruby`,jbuilder:`ruby`,builder:`ruby`,rabl:`ruby`,arb:`ruby`,ru:`ruby`,podspec:`ruby`,Gemfile:`ruby`,Rakefile:`ruby`,Guardfile:`ruby`,Capfile:`ruby`,Berksfile:`ruby`,Brewfile:`ruby`,Vagrantfile:`ruby`,Thorfile:`ruby`,Appraisals:`ruby`,Dangerfile:`ruby`,sas:`sas`,sass:`sass`,scala:`scala`,sc:`scala`,scm:`scheme`,ss:`scheme`,sld:`scheme`,scss:`scss`,sdbl:`sdbl`,shadergraph:`shader`,st:`smalltalk`,sol:`solidity`,sparql:`sparql`,rq:`sparql`,spl:`splunk`,config:`ssh-config`,do:`stata`,ado:`stata`,dta:`stata`,styl:`stylus`,stylus:`stylus`,svelte:`svelte`,swift:`swift`,sv:`system-verilog`,svh:`system-verilog`,service:`systemd`,socket:`systemd`,device:`systemd`,timer:`systemd`,talon:`talonscript`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsp:`typespec`,tsv:`tsv`,tsx:`tsx`,ttl:`turtle`,twig:`twig`,typ:`typst`,vv:`v`,vala:`vala`,vapi:`vala`,vb:`vb`,vbs:`vb`,bas:`vb`,vh:`verilog`,vhd:`vhdl`,vhdl:`vhdl`,vim:`vimscript`,vue:`vue`,"vine.ts":`vue-vine`,vy:`vyper`,wasm:`wasm`,wat:`wasm`,wy:`文言`,wgsl:`wgsl`,wit:`wit`,wl:`wolfram`,nb:`wolfram`,xml:`xml`,xsl:`xsl`,xslt:`xsl`,yaml:`yaml`,yml:`yml`,zs:`zenscript`,zig:`zig`,zsh:`zsh`,sty:`tex`};function sf(e){if(rf.has(e))return rf.get(e)??`text`;if(of[e]!=null)return of[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(rf.has(t[1]))return rf.get(t[1])??`text`;if(of[t[1]]!=null)return of[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return rf.has(n)?rf.get(n)??`text`:of[n]??`text`}function cf(){return af}function lf(){return Object.fromEntries(rf)}function uf(e){return(e.lang??sf(e.name))===`text`}var df=10,ff=13;function pf(e){let t=[0];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);(r===df||r===ff)&&(r===ff&&n+1<e.length&&e.charCodeAt(n+1)===df&&n++,t.push(n+1))}return t}function mf(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);(r===df||r===ff)&&(r===ff&&n+1<e.length&&e.charCodeAt(n+1)===df&&n++,t++)}return t}function hf(e){let t=pf(e);return Array.from({length:t.length},(n,r)=>{let i=t[r],a=t[r+1]??e.length;return e.slice(i,a)})}function gf(e){return{type:`text`,value:e}}function Z({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function _f({name:e,width:t=16,height:n=16,properties:r}){return Z({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[Z({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function vf(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t;t=`children`in t?t.children[0]:null}}function yf(e){return Z({tagName:`div`,properties:{"data-gutter":``},children:e})}function bf(e,t,n,r={}){return Z({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[Z({tagName:`span`,properties:{"data-line-number-content":``},children:[gf(`${t}`)]})]})}function xf(e,t,n){return Z({tagName:`div`,properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t===`annotation`?void 0:e,style:t===`annotation`?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function Sf(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t-1];if(r==null){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}return e.tagName=`div`,e.properties[`data-line`]=r.lineNumber,e.properties[`data-alt-line`]=r.altLineNumber,e.properties[`data-line-type`]=r.type,e.properties[`data-line-index`]=r.lineIndex,e.children.length===0&&e.children.push(gf(`
220
- `)),e}var Cf=Symbol(`no-token`),wf=Symbol(`multiple-tokens`);function Tf(e){let t=Ef(e);if(t!=null)return t;let n=Cf,r=[],i=[],a,o=()=>{if(i.length===0||a==null){i=[],a=void 0;return}if(i.length===1){let e=i[0];if(e?.type===`element`){Of(e,a);for(let t of e.children)Df(t)}else Df(e);r.push(e),i=[],a=void 0;return}for(let e of i)Df(e);r.push(Z({tagName:`span`,properties:{"data-char":a},children:i})),i=[],a=void 0},s=e=>{if(e!==Cf){if(e===wf){n=wf;return}if(n===Cf){n=e;return}n!==e&&(n=wf)}};for(let t of e.children){let e=t.type===`element`?Tf(t):Cf;if(s(e),typeof e!=`number`){o(),r.push(t);continue}a!=null&&a!==e&&o(),a??=e,i.push(t)}return o(),e.children=r,n}function Ef(e){let t=e.properties[`data-char`];if(typeof t==`number`)return t}function Df(e){if(e.type===`element`){e.properties[`data-char`]=void 0;for(let t of e.children)Df(t)}}function Of(e,t){e.properties[`data-char`]=t}function kf(e={}){let{classPrefix:t=`__shiki_`,classSuffix:n=``,classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function o(e){let o=t+Af(typeof e==`string`?e:a(e))+n;return o=r(o),i.has(o)||i.set(o,typeof e==`string`?e:{...e}),o}return{name:`@shikijs/transformers:style-to-class`,pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry(){return i},getCSS(){let e=``;for(let[t,n]of i.entries())e+=`.${t}{${typeof n==`string`?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}function Af(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function jf(e=!1,t=!1){let n={lineInfo:[]},r=[{line(e){return delete e.properties.class,e},pre(t){let r=vf(t),i=[];if(r!=null){let t=1;for(let a of r.children)a.type===`element`&&(e&&Tf(a),i.push(Sf(a,t,n)),t++);r.children=i}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t){let t=n;t.__lineChar??=e,e+=n.content.length}}},preprocess(e,t){t.mergeWhitespaces=`never`},span(e,t,n,r,i){if(i?.offset!=null&&i.content!=null){let t=i.__lineChar;return t!=null&&(e.properties[`data-char`]=t),e}return e}}:null}];return t&&r.push(Nf,Mf),e&&r.push({line:e=>(e.type===`element`&&e.children.length===0&&e.children.push({type:`element`,tagName:`br`,properties:{},children:[]}),e)}),{state:n,transformers:r,toClass:Mf}}var Mf=kf({classPrefix:`hl-`}),Nf={name:`token-style-normalizer`,tokens(e){for(let t of e)for(let e of t){if(e.htmlStyle!=null)continue;let t={};e.color!=null&&(t.color=e.color),e.bgColor!=null&&(t[`background-color`]=e.bgColor),e.fontStyle!=null&&e.fontStyle!==0&&(e.fontStyle&1&&(t[`font-style`]=`italic`),e.fontStyle&2&&(t[`font-weight`]=`bold`),e.fontStyle&4&&(t[`text-decoration`]=`underline`)),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function Q(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}var Pf=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,Ff=/^0(?:\.0+)?%?$/;function If(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function Lf(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;let n=t[1],r,i=1;return n.length===3?r=n.split(``).map(e=>e+e).join(``):n.length===6?r=n:(r=n.slice(0,6),i=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),i]}function Rf(e){if(e==null)return null;let t=Lf(e);if(t==null)return null;let n=t[0]/255,r=t[1]/255,i=t[2]/255,a=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*a(n)+.7152*a(r)+.0722*a(i)}function zf(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||Pf.test(t))return!0;let n=If(t);return n!=null&&Ff.test(n)}function Bf(e,t,n){if(t==null||n==null)return!1;let r=Rf(e),i=Rf(t),a=Rf(n);return r==null||i==null||a==null?!1:Math.abs(r-a)<Math.abs(r-i)}var Vf=new WeakMap;function Hf(e){let t=Vf.get(e);if(t!=null)return t;let n=e.colors??{},r={...n},i=n[`editor.background`]??e.bg,a=n[`editor.foreground`]??e.fg,o=n[`sideBar.background`]??i,s=n[`sideBar.foreground`]??a;Uf(r,`editor.background`,i),Uf(r,`editor.foreground`,a),Uf(r,`sideBar.background`,o),Uf(r,`sideBar.foreground`,s),Uf(r,`input.background`,n[`input.background`]??o),Uf(r,`sideBarSectionHeader.foreground`,n[`sideBarSectionHeader.foreground`]??s),Uf(r,`list.activeSelectionForeground`,n[`list.activeSelectionForeground`]??s),Uf(r,`gitDecoration.addedResourceForeground`,Wf(n[`gitDecoration.addedResourceForeground`],n[`terminal.ansiGreen`],n[`editorGutter.addedBackground`])),Uf(r,`gitDecoration.modifiedResourceForeground`,Wf(n[`gitDecoration.modifiedResourceForeground`],n[`terminal.ansiBlue`],n[`editorGutter.modifiedBackground`])),Uf(r,`gitDecoration.deletedResourceForeground`,Wf(n[`gitDecoration.deletedResourceForeground`],n[`terminal.ansiRed`],n[`editorGutter.deletedBackground`]));let c=(zf(n[`list.focusOutline`])?void 0:n[`list.focusOutline`])??(zf(n.focusBorder)?void 0:n.focusBorder);c==null?delete r[`list.focusOutline`]:r[`list.focusOutline`]=c;let l=n[`list.hoverBackground`];l!=null&&(Gf(l,o)||Bf(l,o,s))&&delete r[`list.hoverBackground`];let u=Object.freeze({...e,colors:Object.freeze(r)});return Vf.set(e,u),u}function Uf(e,t,n){n!=null&&n!==``&&(e[t]=n)}function Wf(...e){for(let t of e)if(t!=null&&t!==``)return t}function Gf(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function Kf({theme:e=At,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e),a=Hf(i);r+=`color:${a.fg};`,r+=`background-color:${a.bg};`,r+=`${Q(`global`)}fg:${a.fg};`,r+=`${Q(`global`)}bg:${a.bg};`,r+=qf(i,n)}else{let n=t.getTheme(e.dark),i=Hf(n);r+=`${Q(`global`)}dark:${i.fg};`,r+=`${Q(`global`)}dark-bg:${i.bg};`,r+=qf(n,`dark`),n=t.getTheme(e.light),i=Hf(n),r+=`${Q(`global`)}light:${i.fg};`,r+=`${Q(`global`)}light-bg:${i.bg};`,r+=qf(n,`light`)}return r}function qf(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${Q(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${Q(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${Q(`global`)}${t}modified-color:${a};`),n}function Jf(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t.children;t=`children`in t?t.children[0]:null}throw console.error(e),Error(`getLineNodes: Unable to find children`)}var Yf={forcePlainText:!1};function Xf(e,t,{theme:n=At,tokenizeMaxLineLength:r,useTokenTransformer:i},{forcePlainText:a,startingLine:o,totalLines:s,lines:c}=Yf){a?(o??=0,s??=1/0):(o=0,s=1/0);let l=o>0||s<1/0,{state:u,transformers:d}=jf(i),f=a?`text`:e.lang??sf(e.name),p=typeof n==`string`?t.getTheme(n).type:void 0,m=Kf({theme:n,highlighter:t});u.lineInfo=e=>({type:`context`,lineIndex:e-1+o,lineNumber:e+o});let h=typeof n==`string`?{lang:f,theme:n,transformers:d,defaultColor:!1,cssVariablePrefix:Q(`token`),tokenizeMaxLineLength:r,tokenizeTimeLimit:0}:{lang:f,themes:n,transformers:d,defaultColor:!1,cssVariablePrefix:Q(`token`),tokenizeMaxLineLength:r,tokenizeTimeLimit:0},g=Jf(t.codeToHast(l?Zf(c??hf(e.contents),o,s):e.contents,h)),_=l?Array(o):g;return l&&_.push(...g),{code:_,themeStyles:m,baseThemeType:p}}function Zf(e,t,n){if(e.length===0)return``;let r=Math.min(t+n,e.length);return e.slice(t,r).join(``)}function Qf(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function $f(e,t){return Or(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function ep(e){let t=e.lang??sf(e.name),n=e.lang??(e.prevName==null?`text`:sf(e.prevName));return t===`text`&&n===`text`}function tp(e){return{...zt,...e}}function np(e,t){let n=rp(e,t);return t?n:e.diffHeaderHeight+n}function rp(e,t){return e.paddingTop??(t?e.spacing:0)}function ip(e){return e.paddingBottom??e.spacing}function ap(e){switch(e){case`simple`:return 4;case`metadata`:case`line-info`:case`line-info-basic`:case`custom`:return 32}}function op({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){let a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(n===!0||a<=i)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(r),s=Math.min(Math.max(o?.fromStart??0,0),a),c=Math.min(Math.max(o?.fromEnd??0,0),a),l=s+c,u=l>=a;return{fromStart:u?a:s,fromEnd:u?0:c,rangeSize:a,collapsedLines:Math.max(a-l,0),renderAll:u}}function sp(e){let t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;let n=e.additionLines.length-(t.additionLineIndex+t.additionCount),r=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);return n<=0&&r<=0?!1:n!==r}function cp({fileDiff:e,errorPrefix:t}){let n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let r=e.additionLines.length-(n.additionLineIndex+n.additionCount),i=e.deletionLines.length-(n.deletionLineIndex+n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function lp({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;let a=cp({fileDiff:e,errorPrefix:i});if(a<=0)return;if(n===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(e.hunks.length),s=Math.min(Math.max(o?.fromStart??0,0),a);return{fromStart:s,fromEnd:0,rangeSize:a,collapsedLines:a-s,renderAll:s>=a}}function up({fileDiff:e,lineNumber:t,expandedHunks:n,collapsedContextThreshold:r}){if(n===!0||e.isPartial)return!0;for(let[i,a]of e.hunks.entries()){if(t<a.additionStart){let o=op({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:r}),s=a.additionStart-o.rangeSize;return o.renderAll||t<s+o.fromStart||t>=a.additionStart-o.fromEnd}if(t<a.additionStart+a.additionCount)return!0}let i=lp({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:`isAdditionLineRenderable`});if(i==null||i.renderAll)return!0;let a=e.hunks[e.hunks.length-1],o=a.additionStart+a.additionCount;return t<o+i.fromStart||t>=o+i.rangeSize}function dp({fileDiff:e,lineNumber:t,direction:n,expandedHunks:r,collapsedContextThreshold:i}){if(r===!0||e.isPartial)return t;let a=[],o=1;for(let[t,n]of e.hunks.entries()){let s=op({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:r,hunkIndex:t,collapsedContextThreshold:i}),c=n.additionStart-s.rangeSize;s.renderAll?a.push([c,n.additionStart]):(s.fromStart>0&&a.push([c,c+s.fromStart]),s.fromEnd>0&&a.push([n.additionStart-s.fromEnd,n.additionStart])),a.push([n.additionStart,n.additionStart+n.additionCount]),o=n.additionStart+n.additionCount}let s=lp({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:r,collapsedContextThreshold:i,errorPrefix:`getNearestRenderableAdditionLine`});if(s!=null){let e=o;o=e+s.rangeSize,s.renderAll?a.push([e,o]):s.fromStart>0&&a.push([e,e+s.fromStart])}if(t>=o)return t;if(n===`down`){for(let[e,n]of a)if(n>t)return Math.max(e,t);return}for(let e=a.length-1;e>=0;e--){let[n,r]=a[e];if(n<=t)return Math.min(r-1,t)}}function fp({type:e,metrics:t}){return t.hunkSeparatorHeight??ap(e)}function pp({type:e,metrics:t}){return e===`simple`||e===`metadata`||e===`line-info-basic`?0:t.spacing}function mp({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case`simple`:return t>0;case`metadata`:return n!=null;case`line-info`:case`line-info-basic`:case`custom`:return!0}}function hp(e){return e!==`simple`&&e!==`metadata`}function gp({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!mp({type:e,hunkIndex:n,hunkSpecs:r}))return;let i=fp({type:e,metrics:t}),a=pp({type:e,metrics:t}),o=n>0?a:0,s=a;return{height:i,gapBefore:o,gapAfter:s,totalHeight:o+i+s}}function _p({type:e,metrics:t}){if(!hp(e))return;let n=fp({type:e,metrics:t}),r=pp({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function vp({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s=yp({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:a}),c={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:s.splitCount,unifiedCount:s.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;let e=c.unifiedCount>=n+r,i=c.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!c.isWindowedHighlight)return!1;let i=e>0&&c.unifiedCount+e<=n,a=r>0&&c.splitCount+r<=n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(c.unifiedCount+=e),(t===`split`||t===`both`)&&(c.splitCount+=n)},isInWindow(e,n){if(!c.isWindowedHighlight)return!0;let r=c.isInUnifiedWindow(e),i=c.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!c.isWindowedHighlight||c.unifiedCount>=n-e&&c.unifiedCount<n+r},isInSplitWindow(e){return!c.isWindowedHighlight||c.splitCount>=n-e&&c.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?c.incrementCounts(1,0):t===`split`?c.incrementCounts(0,1):c.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let n=s.hunkIndex;n<e.hunks.length;n++){let r=e.hunks[n];if(r==null)throw Error(`iterateOverDiff: invalid hunk index`);if(c.shouldBreak())break;let o=op({isPartial:e.isPartial,rangeSize:r.collapsedBefore,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:a}),s=n===c.finalHunkIndex?lp({fileDiff:e,hunkIndex:n,expandedHunks:i,collapsedContextThreshold:a,errorPrefix:`iterateOverDiff`}):void 0,l=o.fromStart+o.fromEnd;function u(e,n){return s==null||s.collapsedLines<=0||s.fromStart+s.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?s.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?s.collapsedLines:0}let d=o.collapsedLines===0;function f(){return d?0:(d=!0,o.collapsedLines)}if(c.shouldSkip(l,l))c.incrementCounts(l,l),f();else{let e=r.unifiedLineStart-o.rangeSize,i=r.splitLineStart-o.rangeSize,a=r.deletionLineIndex-o.rangeSize,s=r.additionLineIndex-o.rangeSize,l=r.deletionStart-o.rangeSize,u=r.additionStart-o.rangeSize;if(Sp(c,o.fromStart,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:l+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:s+t,lineNumber:u+t,noEOFCR:!1}}))||(e=r.unifiedLineStart-o.fromEnd,i=r.splitLineStart-o.fromEnd,a=r.deletionLineIndex-o.fromEnd,s=r.additionLineIndex-o.fromEnd,l=r.deletionStart-o.fromEnd,u=r.additionStart-o.fromEnd,Sp(c,o.fromEnd,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:f(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:l+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:s+t,lineNumber:u+t,noEOFCR:!1}}),()=>{f()})))break hunkIterator}let p=r.unifiedLineStart,m=r.splitLineStart,h=r.deletionLineIndex,g=r.additionLineIndex,_=r.deletionStart,v=r.additionStart,y=r.hunkContent.at(-1);for(let e of r.hunkContent){if(c.shouldBreak())break hunkIterator;let i=e===y;if(e.type===`context`){if(c.shouldSkip(e.lines,e.lines))c.incrementCounts(e.lines,e.lines),f();else if(Sp(c,e.lines,t,t=>{let a=i&&t===e.lines-1,o=p+t,s=m+t;return c.emit({hunkIndex:n,hunk:r,collapsedBefore:f(),collapsedAfter:u(o,s),type:`context`,deletionLine:{lineNumber:_+t,lineIndex:h+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:s},additionLine:{unifiedLineIndex:o,splitLineIndex:s,lineIndex:g+t,lineNumber:v+t,noEOFCR:a&&r.noEOFCRAdditions}})},()=>{f()}))break hunkIterator;p+=e.lines,m+=e.lines,h+=e.lines,g+=e.lines,_+=e.lines,v+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!c.shouldSkip(o,a)){let s=Cp(c,e,t);(s[0]?.[0]??0)>0&&f();for(let[l,d]of s)for(let s=l;s<d;s++){let l=u(p+s,t===`unified`?m+(s<e.deletions?s:s-e.deletions):m+s);if(c.emit(wp({hunkIndex:n,hunk:r,collapsedBefore:f(),collapsedAfter:l,diffStyle:t,index:s,unifiedLineIndex:p,splitLineIndex:m,additionLineIndex:g,deletionLineIndex:h,additionLineNumber:v,deletionLineNumber:_,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}f(),c.incrementCounts(o,a),p+=o,m+=a,h+=e.deletions,g+=e.additions,_+=e.deletions,v+=e.additions}}if(s!=null){let{collapsedLines:n,fromStart:r,fromEnd:i}=s,a=r+i;if(Sp(c,a,t,t=>{let r=t===a-1;return c.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:r?n:0,type:`context-expanded`,deletionLine:{lineNumber:_+t,lineIndex:h+t,noEOFCR:!1,unifiedLineIndex:p+t,splitLineIndex:m+t},additionLine:{unifiedLineIndex:p+t,splitLineIndex:m+t,lineIndex:g+t,lineNumber:v+t,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break hunkIterator}}}function yp({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t===`both`)return{hunkIndex:0,splitCount:0,unifiedCount:0};let a=bp({diff:e,expandedHunks:r,collapsedContextThreshold:i}),o=0,s=e.hunks.length-1,c=e.hunks.length;for(;o<=s;){let e=o+s>>1,r=a[e+1];if(r==null)throw Error(`iterateOverDiff: invalid hunk prefix index`);(t===`unified`?r.unifiedCount:r.splitCount)>n?(c=e,s=e-1):o=e+1}if(c>=e.hunks.length){let t=a[e.hunks.length];if(t==null)throw Error(`iterateOverDiff: invalid terminal hunk prefix index`);return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let l=a[c];if(l==null)throw Error(`iterateOverDiff: invalid selected hunk prefix index`);return{hunkIndex:c,splitCount:l.splitCount,unifiedCount:l.unifiedCount}}function bp({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0,a=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let s=0;s<e.hunks.length;s++){let c=e.hunks[s];if(c==null)throw Error(`iterateOverDiff: invalid hunk summary index`);let l=op({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n}),u=l.fromStart+l.fromEnd;r+=u+c.splitLineCount,i+=u+c.unifiedLineCount;let d=s===a?lp({fileDiff:e,hunkIndex:s,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`iterateOverDiff`}):void 0;if(d!=null){let e=d.fromStart+d.fromEnd;r+=e,i+=e}o.push({splitCount:r,unifiedCount:i})}return o}function xp(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let r=[];function i(n){let i=Math.max(0,e.viewportStart-n),a=Math.min(t,e.viewportEnd-n);a>i&&r.push([i,a])}if(n!==`split`&&i(e.unifiedCount),n!==`unified`&&i(e.splitCount),r.length===0)return[0,0];let a=r[0][0],o=r[0][1];for(let e=1;e<r.length;e++){let t=r[e];a=Math.min(a,t[0]),o=Math.max(o,t[1])}return[a,o]}function Sp(e,t,n,r,i,a){let[o,s]=xp(e,t,n);o>0&&(e.incrementCounts(o,o),i?.());let c=o;for(;c<t;){if(a?.()===!0)return!0;if(c>=s){e.incrementCounts(t-c,t-c);break}if(e.isInWindow(0,0)){if(r(c)===!0)return!0}else e.incrementCounts(1,1);c++}return!1}function Cp(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function wp({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,ee=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,te=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,C=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:ee,unifiedLineIndex:g,splitLineIndex:v}:void 0,w=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:te}:void 0;if(C==null&&w!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:w};if(C!=null&&w==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:C,additionLine:void 0};if(C==null||w==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:C,additionLine:w}}var Tp=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},Ep=new class extends Tp{};function Dp(e,t,n){return Ep.diff(e,t,n)}function Op(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function kp(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function Ap(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function jp(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function Mp(e,t){return Ap(e,t,``)}function Np(e,t){return jp(e,t,``)}function Pp(e,t){return t.slice(0,Fp(e,t))}function Fp(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function Ip(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function Lp(e,t){if(t)return zp(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function Rp(e,t){if(t)return zp(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function zp(e,t){if(!t)return[Rp(e),Lp(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=Ip(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var Bp=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,Vp=RegExp(`[${Bp}]+|\\s+|[^${Bp}]`,`ug`);new class extends Tp{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=Ip(e,r)}else n=e.match(Vp)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&Hp(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&Hp(n,i,r,null,t.intlSegmenter),e}};function Hp(e,t,n,r,i){if(t&&n){let[a,o]=zp(t.value,i),[s,c]=zp(n.value,i);if(e){let r=Op(a,s);e.value=jp(e.value,s,r),t.value=Mp(t.value,r),n.value=Mp(n.value,r)}if(r){let e=kp(o,c);r.value=Ap(r.value,c,e),t.value=Np(t.value,e),n.value=Np(n.value,e)}}else if(n){if(e){let e=Rp(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=Rp(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=Rp(r.value,i),[a,o]=zp(t.value,i),s=Op(n,a);t.value=Mp(t.value,s);let c=kp(Mp(n,s),o);t.value=Np(t.value,c),r.value=Ap(r.value,n,c),e.value=jp(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=Rp(r.value,i),n=Pp(Lp(t.value,i),e);t.value=Np(t.value,n)}else if(e){let n=Pp(Lp(e.value,i),Rp(t.value,i));t.value=Mp(t.value,n)}}var Up=new class extends Tp{tokenize(e){let t=RegExp(`(\\r?\\n)|[${Bp}]+|[^\\S\\n\\r]+|[^${Bp}]`,`ug`);return e.match(t)||[]}};function Wp(e,t,n){return Up.diff(e,t,n)}var Gp=new class extends Tp{constructor(){super(...arguments),this.tokenize=qp}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
221
- `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
222
- `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
223
- `)&&(e=e.slice(0,-1)),t.endsWith(`
224
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function Kp(e,t,n){return Gp.diff(e,t,n)}function qp(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
225
- `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function Jp(e){return e==`.`||e==`!`||e==`?`}new class extends Tp{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(Jp(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends Tp{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends Tp{constructor(){super(...arguments),this.tokenize=qp}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(Yp(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function Yp(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=Yp(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=Yp(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends Tp{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function Xp(e){for(let t=0;t<e.length;t++)if(e[t]<` `||e[t]>`~`||e[t]===`"`||e[t]===`\\`)return!0;return!1}function Zp(e){if(!Xp(e))return e;let t=`"`,n=new TextEncoder().encode(e),r=0;for(;r<n.length;){let e=n[r];e===7?t+=`\\a`:e===8?t+=`\\b`:e===9?t+=`\\t`:e===10?t+=`\\n`:e===11?t+=`\\v`:e===12?t+=`\\f`:e===13?t+=`\\r`:e===34?t+=`\\"`:e===92?t+=`\\\\`:e>=32&&e<=126?t+=String.fromCharCode(e):t+=`\\`+e.toString(8).padStart(3,`0`),r++}return t+=`"`,t}var Qp={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function $p(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;Kp(n,r,Object.assign(Object.assign({},s),{callback:t=>{let n=l(t);e(n)}}))}else return l(Kp(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||nm(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s)if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
226
- `)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function em(e,t){if(t||=Qp,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>em(e,t)).join(`
227
- `)}let n=[];if(e.isGit){if(t=Qp,!e.oldFileName)throw Error(`oldFileName must be specified for Git patches`);if(!e.newFileName)throw Error(`newFileName must be specified for Git patches`);let r=e.oldFileName,i=e.newFileName;e.isCreate&&r===`/dev/null`?r=i.replace(/^b\//,`a/`):e.isDelete&&i===`/dev/null`&&(i=r.replace(/^a\//,`b/`)),n.push(`diff --git `+Zp(r)+` `+Zp(i)),e.isDelete&&n.push(`deleted file mode `+(e.oldMode??`100644`)),e.isCreate&&n.push(`new file mode `+(e.newMode??`100644`)),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(n.push(`old mode `+e.oldMode),n.push(`new mode `+e.newMode)),e.isRename&&(n.push(`rename from `+Zp((e.oldFileName??``).replace(/^a\//,``))),n.push(`rename to `+Zp((e.newFileName??``).replace(/^b\//,``)))),e.isCopy&&(n.push(`copy from `+Zp((e.oldFileName??``).replace(/^a\//,``))),n.push(`copy to `+Zp((e.newFileName??``).replace(/^b\//,``))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`);let r=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||r)&&(n.push(`--- `+Zp(e.oldFileName)+(e.oldHeader?` `+e.oldHeader:``)),n.push(`+++ `+Zp(e.newFileName)+(e.newHeader?` `+e.newHeader:``)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t],i=r.oldLines===0?r.oldStart-1:r.oldStart,a=r.newLines===0?r.newStart-1:r.newStart;n.push(`@@ -`+i+`,`+r.oldLines+` +`+a+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
228
- `)+`
229
- `}function tm(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;$p(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?em(e,o.headerOptions):void 0)}}))}else{let s=$p(e,t,n,r,i,a,o);return s?em(s,o?.headerOptions):void 0}}function nm(e){let t=e.endsWith(`
230
- `),n=e.split(`
231
- `).map(e=>e+`
232
- `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function rm({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function im({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;if(r===o||r&&e.value.length===1&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}var am={forcePlainText:!1};function om(e,t,n,{forcePlainText:r,startingLine:i,totalLines:a,expandedHunks:o,collapsedContextThreshold:s=1}=am){r?(i??=0,a??=1/0):(i=0,a=1/0);let c=i>0||a<1/0,l=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,u=Kf({theme:n.theme,highlighter:t}),d=r&&!c&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:p}=n,m=!r&&!e.isPartial,h=r?o:void 0,g=new Map;function _(e){let t=m?0:e,n=g.get(t)??cm();return g.set(t,n),n}function v(e,t,n,r){if(c){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}vp({diff:e,diffStyle:`both`,startingLine:i,totalLines:a,expandedHunks:c?h:!0,collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=_(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&sm({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:d,maxLineDiffLength:p}),r!=null&&(v(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(v(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let i of g.values()){if(i.deletionContent.length===0&&i.additionContent.length===0)continue;let a={name:e.prevName??e.name,contents:i.deletionContent.value},o={name:e.name,contents:i.additionContent.value},{deletionLines:s,additionLines:c}=lm({deletionFile:a,deletionInfo:i.deletionInfo,deletionDecorations:i.deletionDecorations,additionFile:o,additionInfo:i.additionInfo,additionDecorations:i.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang});if(m){f.deletionLines=s,f.additionLines=c;continue}if(i.deletionSegments.length>0)for(let e of i.deletionSegments)for(let t=0;t<e.count;t++)f.deletionLines[e.targetIndex+t]=s[e.originalOffset+t];else f.deletionLines.push(...s);if(i.additionSegments.length>0)for(let e of i.additionSegments)for(let t=0;t<e.count;t++)f.additionLines[e.targetIndex+t]=c[e.originalOffset+t];else f.additionLines.push(...c)}return{code:f,themeStyles:u,baseThemeType:l}}function sm({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=Kt(e),t=Kt(t),e.length>s||t.length>s))return;let c=o===`char`?Dp(e,t):Wp(e,t),l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(im({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),im({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?im({item:e,arr:l,enableJoin:d,isLastItem:t}):im({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(rm({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(rm({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function cm(){return{deletionContent:{push(e){this.value+=e,this.length++},value:``,length:0},additionContent:{push(e){this.value+=e,this.length++},value:``,length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function lm({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:a,additionDecorations:o,languageOverride:s,options:{theme:c=At,...l}}){let u=s??sf(e.name),d=s??sf(t.name),{state:f,transformers:p}=jf(l.useTokenTransformer),m=typeof c==`string`?{...l,lang:`text`,theme:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:Q(`token`),tokenizeTimeLimit:0}:{...l,lang:`text`,themes:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:Q(`token`),tokenizeTimeLimit:0};return{deletionLines:e.contents===``?[]:(m.lang=u,f.lineInfo=n,m.decorations=a,Jf(i.codeToHast(Kt(e.contents),m))),additionLines:t.contents===``?[]:(m.lang=d,m.decorations=o,f.lineInfo=r,Jf(i.codeToHast(Kt(t.contents),m)))}}function um(e){let t=[];for(let n of e){let e=Hr.get(n);if(e==null)throw Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(e)}return t}function dm(e){for(let t of Array.isArray(e)?e:[e])if(!Hr.has(t))return!1;return!0}async function fm(e){let t=[],n=[];for(let r of e){if(r===`text`||r===`ansi`)continue;let e=Td(r)??wd(r);`then`in e?n.push(e):t.push(e)}return n.length>0&&await Promise.all(n).then(e=>{for(let n of e){if(n==null)throw Error(`resolvedLanguages: unable to resolve language`);t.push(n)}}),t}function pm(e){return R.getResolvedThemes(e)}async function mm(e){for(let t of e)Kd(t);let t=await R.resolveThemes(e);for(let n=0;n<e.length;n++)qd(e[n],t[n]);return t}var hm=e(n(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r((n||=self).lru_map=n.lru_map||{})})(e,function(e){let t=Symbol(`newer`),n=Symbol(`older`);class r{constructor(e,t){typeof e!=`number`&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)}assign(e){let r,a=this.limit||Number.MAX_VALUE;this._keymap.clear();let o=e[Symbol.iterator]();for(let e=o.next();!e.done;e=o.next()){let o=new i(e.value[0],e.value[1]);if(this._keymap.set(o.key,o),r?(r[t]=o,o[n]=r):this.oldest=o,r=o,a--==0)throw Error(`overflow`)}this.newest=r,this.size=this._keymap.size}get(e){var t=this._keymap.get(e);return t?(this._markEntryAsUsed(t),t.value):void 0}set(e,r){var a=this._keymap.get(e);return a?(a.value=r,this._markEntryAsUsed(a),this):(this._keymap.set(e,a=new i(e,r)),this.newest?(this.newest[t]=a,a[n]=this.newest):this.oldest=a,this.newest=a,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){var r=this._keymap.get(e);return r?(this._keymap.delete(r.key),r[t]&&r[n]?(r[n][t]=r[t],r[t][n]=r[n]):r[t]?(r[t][n]=void 0,this.oldest=r[t]):r[n]?(r[n][t]=void 0,this.newest=r[n]):this.oldest=this.newest=void 0,this.size--,r.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new o(this.oldest)}values(){return new s(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(e,n){typeof n!=`object`&&(n=this);let r=this.oldest;for(;r;)e.call(n,r.value,r.key,this),r=r[t]}toJSON(){for(var e=Array(this.size),n=0,r=this.oldest;r;)e[n++]={key:r.key,value:r.value},r=r[t];return e}toString(){for(var e=``,n=this.oldest;n;)e+=String(n.key)+`:`+n.value,n=n[t],n&&(e+=` < `);return e}}e.LRUMap=r;function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}function a(e){this.entry=e}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}};function o(e){this.entry=e}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}};function s(e){this.entry=e}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}}})}))(),1),gm=Symbol(`IGNORE_RESPONSE`),_m=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled because the pool terminated`)}},vm=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled before the task completed`)}},ym=class{options;highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:n=At,useTokenTransformer:r=!1,lineDiffType:i=`word-alt`,maxLineDiffLength:a=1e3,tokenizeMaxLineLength:o=1e3,preferredHighlighter:s=`shiki-js`}){this.options=e,this.preferredHighlighter=s,this.renderOptions={theme:n,useTokenTransformer:r,lineDiffType:i,maxLineDiffLength:a,tokenizeMaxLineLength:o},this.fileCache=new hm.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new hm.default.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey==null?void 0:this.fileCache.get(e.cacheKey)}getDiffResultCache(e){return e.cacheKey==null?void 0:this.diffCache.get(e.cacheKey)}inspectCaches(){let{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??At,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??`word-alt`,maxLineDiffLength:r=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:i=this.renderOptions.tokenizeMaxLineLength??1e3}){let{lifecycleGeneration:a}=this,o=++this.renderOptionsRequestVersion,s=()=>this.isCurrentLifecycle(a)&&this.renderOptionsRequestVersion===o;try{let a={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:r,tokenizeMaxLineLength:i};if(this.isInitialized()||await this.initialize(),!s()||$f(a,this.renderOptions))return;let o=ef(e),c=[];if(Or(a.theme,this.renderOptions.theme)||(c=tf(o)?pm(o):await mm(o)),!s())return;if(this.highlighter!=null)Vr(c,this.highlighter);else{let e=await Zd({themes:o,langs:[`text`],preferredHighlighter:this.preferredHighlighter});if(!s())return;this.highlighter=e}let l=this.setRenderOptionsOnWorkers(a,c);this.renderOptions=a,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(let e of this.themeSubscribers)e.onThemeChange();await l}catch(e){if(e instanceof _m||!s())return;throw e}}getFileRenderOptions(){let{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();let n=[];for(let r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),Error(`setRenderOptionsOnWorkers: Somehow we have an uninitialized worker`);n.push(new Promise((n,i)=>{let a=this.generateRequestId(),o={type:`set-render-options`,id:a,request:{type:`set-render-options`,id:a,renderOptions:e,resolvedThemes:t},resolve:n,reject:i,requestStart:Date.now()};this.activeTaskById.set(a,o),r.pendingSetupRequestId=a,r.worker.postMessage(o.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast??=requestAnimationFrame(this._broadcastStateChanges)}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);let e=this.getStats();for(let t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);let t=this.activeRequestByInstance.get(e);if(t!=null){let n=this.activeTaskById.get(t);Sm(n)?(this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeActiveTask(n)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0)if(this.initialized===!1){let{lifecycleGeneration:t}=this;this.initialized=new Promise((n,r)=>{(async()=>{try{let r=ef(this.renderOptions.theme),i=[];if(i=tf(r)?pm(r):await mm(r),!this.isCurrentLifecycle(t)){n();return}let a=[];if(a=dm(e)?um(e):await fm(e),!this.isCurrentLifecycle(t)){n();return}let[o]=await Promise.all([Zd({themes:r,langs:[`text`,...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(i,a)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=o,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(e){if(e instanceof _m||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0;for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,wm(e));this.queueBroadcastStateChanges(),r(e)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}async initializeWorkers(e,t){this.workersFailed=!1;let n=[],r=cf(),i=r>0?lf():void 0;this.workers.length>0&&this.terminateWorkers();for(let a=0;a<(this.options.poolSize??8);a++){let a=this.options.workerFactory(),o={worker:a,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set([`text`,...t.map(({name:e})=>e)]),customExtensionsVersion:0};a.addEventListener(`message`,e=>{this.handleWorkerMessage(o,e.data)}),a.addEventListener(`error`,e=>console.error(`Worker error:`,e,o)),this.workers.push(o),n.push(new Promise((n,a)=>{let s=this.generateRequestId(),c={type:`initialize`,id:s,request:{type:`initialize`,id:s,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:i==null?void 0:r,customExtensionMap:i},resolve(){o.initialized=!0,n()},reject:a,requestStart:Date.now()};this.activeTaskById.set(s,c),this.executeTask(o,c)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,!(this.initialized!==!0||this.queuedTasks.length===0)){for(let e=0;e<this.queuedTasks.length;){let t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}let n=xm(t),r=this.getAvailableWorker(n);if(r==null)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,r),this.resolveLanguagesAndExecuteTask(r,t,n)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){let n=this.getFileResultCache(t);uf(t)||n!=null&&nf(n.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:`file`,file:t})}primeFileHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(Error(`WorkerPoolManager.primeFileHighlightCache: worker pool is not working`));let t=this.getOrCreateFileHighlightCacheTask(e);return t==null?Promise.resolve():this.createRenderTaskCallbacks(t)}getOrCreateFileHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}let t=this.getFileResultCache(e),n=this.getFileHighlightKey(e);if(n==null||uf(e)||t!=null&&nf(t.options,this.getFileRenderOptions()))return;let r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type===`file`?r:void 0;{let t=this.submitCacheTask({type:`file`,file:e},n);return t.type===`file`?t:void 0}}getPlainFileAST(e,t,n,r){if(this.highlighter==null){this.queueInitialization();return}return Xf(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){let n=this.getDiffResultCache(t);ep(t)||n!=null&&$f(n.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:`diff`,diff:t})}primeDiffHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(Error(`WorkerPoolManager.primeDiffHighlightCache: worker pool is not working`));let t=this.getOrCreateDiffHighlightCacheTask(e);return t==null?Promise.resolve():this.createRenderTaskCallbacks(t)}getOrCreateDiffHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}let t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||ep(e)||t!=null&&$f(t.options,this.getDiffRenderOptions()))return;let r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type===`diff`?r:void 0;{let t=this.submitCacheTask({type:`diff`,diff:e},n);return t.type===`diff`?t:void 0}}getPlainDiffAST(e,t,n,r,i){return this.highlighter==null?void 0:om(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:i})}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers();let e=new _m;for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,e);this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(e=>{console.error(e)})}cancelActiveWorkerTasks(){let e=new _m;for(let t of this.activeTaskById.values())`reject`in t?t.reject(e):Sm(t)&&this.rejectRenderTaskCallbacks(t,e)}terminateWorkers(){for(let e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?`waiting`:this.initialized===!0?`initialized`:`initializing`,totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.getHighlightKeyForRequest(t),r=n==null?void 0:this.getTaskByHighlightKey(n);if(r!=null){this.detachInstanceFromQueuedTasks(e,r),this.addInstanceToTask(r,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);let i=this.generateRequestId(),a=Date.now(),{renderOptionsVersion:o}=this,s=(()=>{switch(t.type){case`file`:return{type:`file`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:o,requestStart:a};case`diff`:return{type:`diff`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:o,requestStart:a}}})();this.enqueueRenderTask(s,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.generateRequestId(),r=Date.now(),{renderOptionsVersion:i}=this,a=(()=>{switch(e.type){case`file`:return{type:`file`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:i,requestStart:r};case`diff`:return{type:`diff`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:i,requestStart:r}}})();return this.enqueueRenderTask(a),a}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{let r=n.filter(t=>!e.langs.has(t));if(r.length>0&&(dm(r)?t.request.resolvedLanguages=um(r):t.request.resolvedLanguages=await fm(r)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch(n){this.rejectRenderTaskCallbacks(t,wm(n)),this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){let n=this.activeTaskById.get(t.id);try{if(n==null)throw gm;if(t.type===`error`){let e=Error(t.error);if(t.stack&&(e.stack=t.stack),`reject`in n)n.reject(e);else if(Sm(n))this.notifyHighlightError(n,e),this.rejectRenderTaskCallbacks(n,e);else throw Error(`handleWorkerMessage: unknown task type`);throw e}else switch(t.requestType){case`initialize`:if(n.type!==`initialize`)throw Error(`handleWorkerMessage: task/response dont match`);this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case`set-render-options`:if(n.type!==`set-render-options`)throw Error(`handleWorkerMessage: task/response dont match`);n.resolve();break;case`file`:{if(n.type!==`file`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!nf(i,this.getFileRenderOptions()))throw gm;let{request:a}=n;this.syncCustomExtensionVersion(e,a),n.cacheKeyAtDispatch!=null&&this.fileCache.set(n.cacheKeyAtDispatch,{result:r,options:i}),this.resolveRenderTaskCallbacks(n),this.notifyFileInstances(n,r,i);break}case`diff`:{if(n.type!==`diff`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!$f(i,this.getDiffRenderOptions()))throw gm;let{request:a}=n;this.syncCustomExtensionVersion(e,a),n.cacheKeyAtDispatch!=null&&this.diffCache.set(n.cacheKeyAtDispatch,{result:r,options:i}),this.resolveRenderTaskCallbacks(n),this.notifyDiffInstances(n,r,i);break}}}catch(e){e!==gm&&console.error(e,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain??(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,Sm(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,n=t?.id){e.requestId===n&&(e.requestId=void 0),e.pendingSetupRequestId===n&&(e.pendingSetupRequestId=void 0),t!=null&&(Sm(t)&&(this.rejectRenderTaskCallbacks(t,new vm),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){bm(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(let n of xm(t))e.langs.add(n);try{t.type===`file`?t.cacheKeyAtDispatch=t.request.file.cacheKey:t.type===`diff`&&(t.cacheKeyAtDispatch=t.request.diff.cacheKey),e.worker.postMessage(t.request)}catch(n){console.error(`Failed to post message to worker:`,n),Sm(t)?(this.notifyHighlightError(t,n),this.rejectRenderTaskCallbacks(t,wm(n))):`reject`in t&&t.reject(n),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;let n=cf();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=lf())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(let n of this.workers){if(n.requestId!=null||n.pendingSetupRequestId!=null||!n.initialized)continue;if(t=n,e.length===0)break;let r=!0;for(let t of e)if(!n.langs.has(t)){r=!1;break}if(r)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case`file`:return this.getFileHighlightKey(e.file);case`diff`:return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(let t of Cm(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){let n=this.queuedTaskByInstance.get(e);n==null||n===t||(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeQueuedTask(n))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){let t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.rejectRenderTaskCallbacks(e,new vm),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new vm),this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}createRenderTaskCallbacks(e){return new Promise((t,n)=>{e.callbacks.add({resolve:t,reject:n})})}resolveRenderTaskCallbacks(e){for(let t of e.callbacks)t.resolve();e.callbacks.clear()}rejectRenderTaskCallbacks(e,t){for(let n of e.callbacks)n.reject(t);e.callbacks.clear()}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){let t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(let e of Array.from(this.activeTaskById.values()))Sm(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(let t of Cm(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(let t of Cm(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(let t of Cm(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(let n of Cm(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`file`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&kr(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`diff`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Qf(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){let t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(let e of this.queuedTasks)yield e;for(let e of this.activeTaskById.values())Sm(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function bm(e){return e.type===`initialize`||e.type===`file`||e.type===`diff`}function xm(e){let t=new Set;if(e.type===`initialize`||e.type===`set-render-options`)return[];switch(e.type){case`file`:t.add(e.request.file.lang??sf(e.request.file.name));break;case`diff`:t.add(e.request.diff.lang??sf(e.request.diff.name)),t.add(e.request.diff.lang??sf(e.request.diff.prevName??`-`));break}return t.delete(`text`),Array.from(t)}function Sm(e){return e?.type===`file`||e?.type===`diff`}function Cm(e){return e.instances}function wm(e){return e instanceof Error?e:Error(String(e))}var Tm;function Em({poolOptions:e,highlighterOptions:t}){return Tm??=new ym(e,t),Tm}function Dm(){Tm!=null&&(Tm.terminate(),Tm=void 0)}var Om=(0,j.createContext)(void 0),km=0;function Am({children:e,poolOptions:t,highlighterOptions:n}){let[r]=(0,j.useState)(()=>{if(!(typeof window>`u`))return Em({poolOptions:t,highlighterOptions:n})});return(0,j.useInsertionEffect)(()=>{if(r!=null)return km++,()=>{km--}},[r]),(0,j.useEffect)(()=>()=>{km===0&&Dm()},[]),(0,L.jsx)(Om.Provider,{value:r,children:e})}function jm(){return(0,j.useContext)(Om)}function Mm(e,t,n){if(e===t||e==null||t==null)return e===t;let r=new Set(n),i=Object.keys(e),a=new Set(Object.keys(t));for(let n of i)if(a.delete(n),!r.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!r.has(e))return!1;return!0}function Nm(e,t){let n=e?.theme??At,r=t?.theme??At,i=Pm(e),a=Pm(t);return Or(n,r)&&Mm(e,t,[`theme`,`parseDiffOptions`])&&Mm(i,a)}function Pm(e){if(e!=null&&`parseDiffOptions`in e)return e.parseDiffOptions}var Fm=new Set,Im=null;function Lm(e){Fm.add(e),Im??=requestAnimationFrame(zm)}function Rm(e){Fm.delete(e),Fm.size===0&&Im!=null&&(cancelAnimationFrame(Im),Im=null)}function zm(e){let t=new Set(Fm);Fm.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}Im=Fm.size>0?requestAnimationFrame(zm):null}function Bm(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Vm({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:r=!1,fitPerfectlyOverscroll:i=0,overscrollSize:a}){let o=n+a*2,s=r?n+i*2:o;if(t=Math.max(t,s),o>=t||r){let n=Math.max(e-i,0),r=Math.min(e+s,t);return{top:n,bottom:Math.max(r,n)}}let c=e+n/2-o/2,l=c+o;return c<0&&(c=0),l>t&&(l=t),c=Math.floor(Math.max(c,0)),{top:c,bottom:Math.ceil(Math.max(Math.min(l,t),c))}}function Hm(e){if(typeof HTMLStyleElement<`u`&&e instanceof HTMLStyleElement)return!0;let t=e.tagName??e.nodeName;return typeof t==`string`&&t.toLowerCase()===`style`}var Um=`-1,-1`;function Wm(e){return e?.some(e=>e.lineNumber===0)??!1}function Gm(e){let t=e[0];return t!=null&&t.length>0?t:void 0}function Km(e){return e.startingLine===0&&e.totalLines>0}function qm(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function Jm(){return Z({tagName:`button`,properties:{"data-utility-button":``,type:`button`},children:[_f({name:`diffs-icon-plus`,properties:{"data-icon":``}})]})}var Ym=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;activeLineHighlightSide;activeLineNumberOnly=!1;editorAttached=!1;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}setEditorAttached(e){this.editorAttached!==e&&(this.editorAttached=e,this.setSelectionDirty(),this.renderSelection())}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){let n=!(e===this.selectedRange||Bm(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.activeLineHighlightSide=t?.activeLineSide,this.activeLineNumberOnly=t?.lineNumberOnly??!1,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;t==null&&n==null&&r==null&&a==null&&i==null||this.options.onGutterUtilityClick!=null&&fh(e.composedPath())||(ph(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e}))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(ph(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(ph(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){ph(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();ph(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);ph(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=eh(i)&&this.hoveredLine?.lineElement===i.lineElement;$m(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),$m(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),eh(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(nh(i)&&p!=null){p(i);break}if(th(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!eh(i))break;$m(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,ph(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),ph(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),ph(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();fh(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;let r=this.currentSelectionEnds(),i=r?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),a=r?.top??i;i==null||a==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:a,current:i},t&&(this.selectionAnchor={lineNumber:a.lineNumber,side:a.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{let{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let n=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(qm(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(this.pointerSession.current=r,t&&this.updateSelection(r.lineNumber,r.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=A(Jm());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);Qm(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(!(r==null||i==null))return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(ah(t));if(Qm(n)&&!(this.mode===`diff`&&e.side!=null&&n.side!==e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(Qm(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(Qm(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&fh(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=ah(e);if(t&&fh(n))return;let r=oh(e);return r==null?this.pathFromAnnotationSlot(e):ah(r)}pathFromAnnotationSlot(e){let t=ch(sh(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:ah(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=lh(t)?t:lh(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}Bm(r??void 0,i??void 0)||(this.activeLineHighlightSide=void 0,this.activeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}highlightLineNumberOnly(){return this.activeLineHighlightSide==null?this.activeLineNumberOnly||this.editorAttached:this.activeLineNumberOnly}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;let e=this.pre.querySelectorAll(`[data-selected-line]`);for(let t of e)t.removeAttribute(`data-selected-line`);if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;let{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let n=this.pre.getAttribute(`data-diff-type`)===`split`,r=this.getIndexesFromSelection(this.selectedRange,n);if(r==null)throw console.error({rowRange:r,selectedRange:this.selectedRange}),Error(`InteractionManager.renderSelection: No valid rowRange`);let i=r.start===r.end,a=Math.min(r.start,r.end),o=Math.max(r.start,r.end),s=this.highlightLineNumberOnly();for(let e of t){let t=this.activeLineHighlightSide;if(t!=null&&(t===`additions`&&e.hasAttribute(`data-deletions`)||t===`deletions`&&e.hasAttribute(`data-additions`)))continue;let[r,c]=e.children,l=c.children.length;if(l!==r.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);for(let e=0;e<l;e++){let t=c.children[e],l=r.children[e];if(!(t instanceof HTMLElement)||!(l instanceof HTMLElement))continue;let u=this.parseLineIndex(t,n);if((u??0)>o)break;if(u==null||u<a)continue;let d=i?`single`:u===a?`first`:u===o?`last`:``;l.setAttribute(`data-selected-line`,d),!s&&(t.setAttribute(`data-selected-line`,d),l.nextSibling instanceof HTMLElement&&t.nextSibling instanceof HTMLElement&&(t.nextSibling.hasAttribute(`data-line-annotation`)||t.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(i?(d=`last`,t.setAttribute(`data-selected-line`,`first`)):u===a?d=``:u===o&&t.setAttribute(`data-selected-line`,``),t.nextSibling.setAttribute(`data-selected-line`,d),l.nextSibling.setAttribute(`data-selected-line`,d)))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);rh(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=dh(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=dh(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:ih(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:ih(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:uh(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:uh(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Xm({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:Zm({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function Zm({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function Qm(e){return e!=null&&`kind`in e&&e.kind===`line`}function $m(e){return e!=null&&`kind`in e&&e.kind===`token`}function eh(e){return Qm(e)||$m(e)}function th(e){return`type`in e&&e.type===`line-info`}function nh(e){return`kind`in e&&e.kind===`merge-conflict-action`}function rh(e){return e===`current`||e===`incoming`||e===`both`}function ih(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function ah(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function oh(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function sh(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function ch(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function lh(e){return e!=null&&typeof e.elementFromPoint==`function`}function uh(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function dh(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function fh(e){for(let t of e)if(t instanceof HTMLElement&&(t.hasAttribute(`data-utility-button`)||t.hasAttribute(`data-gutter-utility-slot`)||t.getAttribute(`slot`)===`gutter-utility-slot`||t.getAttribute(`name`)===`gutter-utility-slot`))return!0;return!1}function ph(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return;break}console.log(...n)}var mh=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),_h(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?bh(t):xh(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:hh(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:gh(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&vh(t,{codeWidthChanged:i,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function hh(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function gh(e){return Math.max(Math.ceil(e),0)}function _h(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?vh(e,{codeWidthChanged:!0,numberWidthChanged:!0}):yh(e))}function vh(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function yh(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function bh(e){e.codeElement.isConnected&&yh(e)}function xh(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}function Sh(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function Ch(e){for(let t of Array.isArray(e)?e:[e])if(!(t===`text`||t===`ansi`)&&!Gr.has(t))return!1;return!0}function wh(e){for(let t of ef(e))if(!Ar.has(t))return!1;return!0}function Th(e,t){return e.endsWith(`\r
233
- `)?t+`\r
234
- `:e.endsWith(`\r`)?t+`\r`:e.endsWith(`
235
- `)?t+`
236
- `:t}function Eh(e){return Z({tagName:`div`,children:[Z({tagName:`div`,children:e.annotations?.map(e=>Z({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function Dh(e,t){return Z({tagName:`div`,children:e,properties:{"data-content":``,style:`grid-row: span ${t}`}})}function Oh(e){switch(e){case`file`:return`diffs-icon-file-code`;case`change`:return`diffs-icon-symbol-modified`;case`new`:return`diffs-icon-symbol-added`;case`deleted`:return`diffs-icon-symbol-deleted`;case`rename-pure`:case`rename-changed`:return`diffs-icon-symbol-moved`}}function kh({fileOrDiff:e,mode:t,stickyHeader:n}){let r=`type`in e?e:void 0,i={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?``:void 0};return Z({tagName:`div`,children:[t===`custom`?Z({tagName:`slot`,properties:{name:kt}}):Ah({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:r?.type??`file`}),...t===`custom`?[]:[jh(r)]],properties:i})}function Ah({name:e,prevName:t,iconType:n}){let r=[Z({tagName:`slot`,properties:{name:Et}}),_f({name:Oh(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(Z({tagName:`div`,children:[Z({tagName:`bdi`,children:[gf(t)]})],properties:{"data-prev-name":``}})),r.push(_f({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push(Z({tagName:`div`,children:[Z({tagName:`bdi`,children:[gf(e)]})],properties:{"data-title":``}})),r.push(Z({tagName:`slot`,properties:{name:Dt}})),Z({tagName:`div`,children:r,properties:{"data-header-content":``}})}function jh(e){let t=[];if(e!=null){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||n===0)&&t.push(Z({tagName:`span`,children:[gf(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push(Z({tagName:`span`,children:[gf(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push(Z({tagName:`slot`,properties:{name:Ot}})),Z({tagName:`div`,children:t,properties:{"data-metadata":``}})}function Mh(e){return Z({tagName:`pre`,properties:Nh(e)})}function Nh({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:a,type:o,customProperties:s}){return{...s,"data-diff":o===`diff`?``:void 0,"data-file":o===`file`?``:void 0,"data-diff-type":o===`diff`?i?`split`:`single`:void 0,"data-overflow":r,"data-disable-line-numbers":n?``:void 0,"data-background":t?void 0:``,"data-indicators":e===`bars`||e===`classic`?e:void 0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}function Ph(e,{theme:t,preferredHighlighter:n=`shiki-js`}){return{langs:[e??`text`],themes:ef(t),preferredHighlighter:n}}function Fh(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}var Ih=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
237
- <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
238
- <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
239
- </symbol>
240
- <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
241
- <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
242
- </symbol>
243
- <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
244
- <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
245
- </symbol>
246
- <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
247
- <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
248
- </symbol>
249
- <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
250
- <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
251
- </symbol>
252
- <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
253
- <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
254
- </symbol>
255
- <symbol id="diffs-icon-expand" viewBox="0 0 16 16">
256
- <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
257
- </symbol>
258
- <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
259
- <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
260
- </symbol>
261
- <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
262
- <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
263
- </symbol>
264
- <symbol id="diffs-icon-plus" viewBox="0 0 16 16">
265
- <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
266
- </symbol>
267
- <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
268
- <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
269
- </symbol>
270
- <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
271
- <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
272
- </symbol>
273
- <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
274
- <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
275
- </symbol>
276
- <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
277
- <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
278
- </symbol>
279
- <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
280
- <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
281
- </symbol>
282
- <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
283
- <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
284
- </symbol>
285
- <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
286
- <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
287
- </symbol>
288
- </svg>`;function Lh(e,t){return e==null||t==null?e===t:zh(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}var Rh={};function zh(e=Rh,t=Rh){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function Bh(e){let t=document.createElement(`div`);return t.dataset.annotationSlot=``,t.slot=e,t.style.whiteSpace=`normal`,t}function Vh(){let e=document.createElement(`div`);return e.slot=`gutter-utility-slot`,e.style.position=`absolute`,e.style.top=`0`,e.style.bottom=`0`,e.style.textAlign=`center`,e.style.whiteSpace=`normal`,e.style.touchAction=`none`,e}function Hh(){let e=document.createElement(`style`);return e.setAttribute(Mt,``),e}var Uh;function Wh(e){if(Uh!=null)return Uh;let t=e.host;if(typeof HTMLElement<`u`&&t instanceof HTMLElement&&!t.isConnected)return;let n=document.createElement(`div`);n.setAttribute(`data-code`,``),n.setAttribute(Pt,`true`);let r=document.createElement(`div`);return r.style.position=`relative`,r.style.width=`200%`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n),Uh=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),Uh}function Gh(e){return`${Lt}: ${e==null?`var(--diffs-scrollbar-gutter-fallback)`:`${e}px`};`}var Kh=`@layer base {
289
- :host {
290
- --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
291
- "Courier New", monospace;
292
- --diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
293
- "Noto Sans", "Liberation Sans", Arial, sans-serif;
294
- --diffs-mixer: light-dark(#000, #fff);
295
- --diffs-gap-fallback: 8px;
296
- --diffs-scrollbar-gutter-fallback: 6px;
297
- --diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
298
- --diffs-added-light: #0dbe4e;
299
- --diffs-added-dark: #5ecc71;
300
- --diffs-modified-light: #009fff;
301
- --diffs-modified-dark: #69b1ff;
302
- --diffs-deleted-light: #ff2e3f;
303
- --diffs-deleted-dark: #ff6762;
304
- --diffs-warning-light: #d5a910;
305
- --diffs-warning-dark: #ffd452;
306
- color-scheme: light dark;
307
- font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
308
- font-size: var(--diffs-font-size, 13px);
309
- line-height: var(--diffs-line-height, 20px);
310
- font-feature-settings: var(--diffs-font-features);
311
- --diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
312
- --diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));
313
- --diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));
314
- --diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));
315
- --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));
316
- --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
317
- --diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));
318
- --diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
319
- --diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));
320
- --diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));
321
- --diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));
322
- --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));
323
- --diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));
324
- --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));
325
- --diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));
326
- --diffs-selection-base: var(--diffs-modified-base);
327
- --diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));
328
- background-color: var(--diffs-bg);
329
- color: var(--diffs-fg);
330
- display: block;
331
- }
332
-
333
- pre, code, [data-error-wrapper] {
334
- isolation: isolate;
335
- font-family: var(--diffs-font-family, var(--diffs-font-fallback));
336
- outline: none;
337
- margin: 0;
338
- padding: 0;
339
- display: block;
340
- }
341
-
342
- pre, code {
343
- background-color: var(--diffs-bg);
344
- }
345
-
346
- code {
347
- contain: content;
348
- }
349
-
350
- input, button {
351
- font-family: inherit;
352
- font-size: inherit;
353
- line-height: inherit;
354
- }
355
-
356
- *, :before, :after {
357
- box-sizing: border-box;
358
- }
359
-
360
- [data-icon-sprite] {
361
- display: none;
362
- }
363
-
364
- [data-diffs-header], [data-separator] {
365
- font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
366
- }
367
-
368
- [data-diffs-header][data-sticky] {
369
- z-index: 1;
370
- background-color: var(--diffs-bg);
371
- position: sticky;
372
- top: 0;
373
- }
374
-
375
- [data-file-info] {
376
- color: var(--fg);
377
- background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
378
- border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
379
- padding: 10px;
380
- font-weight: 700;
381
- }
382
-
383
- [data-diff], [data-file] {
384
- --diffs-grid-number-column-width: minmax(min-content, max-content);
385
- --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
386
-
387
- &[data-dehydrated] {
388
- --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
389
- }
390
-
391
- &:hover [data-code]::-webkit-scrollbar-thumb {
392
- background-color: var(--diffs-bg-context);
393
- }
394
- }
395
-
396
- @supports (-webkit-touch-callout: none) {
397
- :host {
398
- --diffs-scrollbar-gutter-fallback: 0px;
399
- }
400
- }
401
-
402
- [data-line] span {
403
- color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
404
- background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
405
- font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
406
- font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
407
- text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
408
- }
409
-
410
- [data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions], [data-editor-overlay] {
411
- --diffs-computed-decoration-bg: var(--diffs-bg);
412
- --diffs-computed-diff-line-bg: var(--diffs-bg);
413
- --diffs-computed-selected-line-bg: var(--diffs-bg);
414
- color: var(--diffs-fg);
415
- background-color: var(--diffs-line-bg, var(--diffs-bg));
416
-
417
- @media (pointer: fine) {
418
- &:where([data-hovered]) {
419
- --diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
420
- var(--diffs-computed-selected-line-bg) 97%,
421
- var(--diffs-bg-hover-override, var(--diffs-mixer))), color-mix(in lab,
422
- var(--diffs-computed-selected-line-bg) 91%,
423
- var(--diffs-bg-hover-override, var(--diffs-mixer))));
424
- --diffs-line-bg: var(--diffs-computed-hovered-line-bg, inherit);
425
- }
426
- }
427
- }
428
-
429
- [data-line], [data-no-newline] {
430
- &[data-decoration-bg] {
431
- --mix-deco-light: 92%;
432
- --mix-deco-dark: 85%;
433
-
434
- &[data-decoration-bg-depth="2"] {
435
- --mix-deco-light: 88%;
436
- --mix-deco-dark: 80%;
437
- }
438
-
439
- &[data-decoration-bg-depth="3"] {
440
- --mix-deco-light: 85%;
441
- --mix-deco-dark: 78%;
442
- }
443
-
444
- @media (pointer: fine) {
445
- &[data-hovered]:not([data-selected-line]) {
446
- --mix-deco-light: 85%;
447
- --mix-deco-dark: 85%;
448
- }
449
-
450
- &[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="2"] {
451
- --mix-deco-light: 83%;
452
- --mix-deco-dark: 83%;
453
- }
454
-
455
- &[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="3"] {
456
- --mix-deco-light: 81%;
457
- --mix-deco-dark: 81%;
458
- }
459
- }
460
-
461
- --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
462
- var(--diffs-bg) var(--mix-deco-light),
463
- var(--diffs-decoration-bg)), color-mix(in lab,
464
- var(--diffs-bg) var(--mix-deco-dark),
465
- var(--diffs-decoration-bg)));
466
- --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
467
- --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
468
- --diffs-line-bg: var(--diffs-computed-decoration-bg);
469
- }
470
- }
471
-
472
- [data-line-annotation], [data-gutter-buffer="annotation"] {
473
- --diffs-annotation-bg: var(--diffs-bg-context);
474
- --diffs-computed-decoration-bg: var(--diffs-annotation-bg);
475
- --diffs-computed-diff-line-bg: var(--diffs-annotation-bg);
476
- --diffs-computed-selected-line-bg: var(--diffs-annotation-bg);
477
- --diffs-line-bg: var(--diffs-annotation-bg);
478
- }
479
-
480
- [data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {
481
- --diffs-computed-decoration-bg: var(--diffs-bg-context);
482
- --diffs-computed-diff-line-bg: var(--diffs-bg-context);
483
- --diffs-computed-selected-line-bg: var(--diffs-bg-context);
484
- --diffs-line-bg: var(--diffs-bg-context);
485
- }
486
-
487
- [data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
488
- --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
489
- var(--diffs-bg) 78%,
490
- var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
491
- var(--diffs-bg) 68%,
492
- var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
493
- --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
494
- --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
495
- --diffs-line-bg: var(--diffs-computed-decoration-bg);
496
- }
497
-
498
- [data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
499
- --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
500
- var(--diffs-bg) 78%,
501
- var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
502
- var(--diffs-bg) 68%,
503
- var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
504
- --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
505
- --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
506
- --diffs-line-bg: var(--diffs-computed-decoration-bg);
507
- }
508
-
509
- [data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
510
- --diffs-computed-decoration-bg: var(--diffs-bg);
511
- --diffs-computed-diff-line-bg: var(--diffs-bg);
512
- --diffs-computed-selected-line-bg: var(--diffs-bg);
513
- --diffs-line-bg: var(--diffs-bg);
514
- }
515
-
516
- :where([data-background]) {
517
- & [data-gutter-buffer], & [data-column-number] {
518
- --mix-light: 91%;
519
- --mix-dark: 85%;
520
- }
521
-
522
- & [data-line], & [data-no-newline] {
523
- --mix-light: 88%;
524
- --mix-dark: 80%;
525
- }
526
-
527
- & [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
528
- --diffs-diff-line-mix-target: var(--diffs-bg);
529
-
530
- &[data-line-type="change-deletion"] {
531
- --diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
532
-
533
- @media (pointer: fine) {
534
- &[data-hovered] {
535
- --mix-light: 80%;
536
- --mix-dark: 75%;
537
- }
538
- }
539
-
540
- &:where([data-gutter-buffer], [data-column-number]) {
541
- color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
542
- --diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
543
- }
544
-
545
- --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
546
- var(--diffs-computed-decoration-bg) var(--mix-light),
547
- var(--diffs-diff-line-mix-target)), color-mix(in lab,
548
- var(--diffs-computed-decoration-bg) var(--mix-dark),
549
- var(--diffs-diff-line-mix-target)));
550
- --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
551
- --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
552
- }
553
-
554
- &[data-line-type="change-addition"] {
555
- --diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
556
-
557
- @media (pointer: fine) {
558
- &[data-hovered] {
559
- --mix-light: 80%;
560
- --mix-dark: 70%;
561
- }
562
- }
563
-
564
- &:where([data-gutter-buffer], [data-column-number]) {
565
- color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
566
- --diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
567
- }
568
-
569
- --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
570
- var(--diffs-computed-decoration-bg) var(--mix-light),
571
- var(--diffs-diff-line-mix-target)), color-mix(in lab,
572
- var(--diffs-computed-decoration-bg) var(--mix-dark),
573
- var(--diffs-diff-line-mix-target)));
574
- --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
575
- --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
576
- }
577
-
578
- &[data-merge-conflict="current"] {
579
- --diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
580
-
581
- &:where([data-gutter-buffer], [data-column-number]) {
582
- color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
583
- --diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
584
- }
585
-
586
- @media (pointer: fine) {
587
- &[data-hovered] {
588
- --mix-light: 80%;
589
- --mix-dark: 70%;
590
- }
591
- }
592
-
593
- --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
594
- var(--diffs-computed-decoration-bg) var(--mix-light),
595
- var(--diffs-diff-line-mix-target)), color-mix(in lab,
596
- var(--diffs-computed-decoration-bg) var(--mix-dark),
597
- var(--diffs-diff-line-mix-target)));
598
- --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
599
- --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
600
- }
601
-
602
- &[data-merge-conflict="incoming"] {
603
- --diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
604
-
605
- &:where([data-gutter-buffer], [data-column-number]) {
606
- color: var(--diffs-modified-base);
607
- --diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
608
- }
609
-
610
- @media (pointer: fine) {
611
- &[data-hovered] {
612
- --mix-light: 80%;
613
- --mix-dark: 70%;
614
- }
615
- }
616
-
617
- --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
618
- var(--diffs-computed-decoration-bg) var(--mix-light),
619
- var(--diffs-diff-line-mix-target)), color-mix(in lab,
620
- var(--diffs-computed-decoration-bg) var(--mix-dark),
621
- var(--diffs-diff-line-mix-target)));
622
- --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
623
- --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
624
- }
625
- }
626
- }
627
-
628
- [data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline], [data-editor-overlay] {
629
- --diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
630
-
631
- &:where([data-editor-overlay]), &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
632
- --mix-selection-light: 82%;
633
- --mix-selection-dark: 75%;
634
-
635
- @media (pointer: fine) {
636
- &[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
637
- --mix-selection-light: 75%;
638
- --mix-selection-dark: 70%;
639
- }
640
- }
641
- }
642
-
643
- &:where([data-gutter-buffer], [data-column-number])[data-selected-line] {
644
- --mix-selection-light: 75%;
645
- --mix-selection-dark: 60%;
646
- --diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
647
-
648
- @media (pointer: fine) {
649
- &[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
650
- --mix-selection-light: 70%;
651
- --mix-selection-dark: 55%;
652
- }
653
- }
654
- }
655
-
656
- &:where([data-editor-overlay]), &[data-selected-line] {
657
- --diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
658
- var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
659
- var(--diffs-selection-mix-target)), color-mix(in lab,
660
- var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
661
- var(--diffs-selection-mix-target)));
662
- --diffs-line-bg: var(--diffs-computed-selected-line-bg, inherit);
663
- }
664
- }
665
-
666
- [data-gutter-buffer], [data-column-number] {
667
- &[data-selected-line] {
668
- color: var(--diffs-selection-number-fg);
669
- }
670
- }
671
-
672
- [data-no-newline] {
673
- user-select: none;
674
-
675
- & span {
676
- opacity: .6;
677
- }
678
- }
679
-
680
- [data-diff-type="split"][data-overflow="scroll"] {
681
- grid-template-columns: 1fr 1fr;
682
- display: grid;
683
-
684
- & [data-additions] {
685
- border-left: 1px solid var(--diffs-bg);
686
- }
687
-
688
- & [data-deletions] {
689
- border-right: 1px solid var(--diffs-bg);
690
- }
691
- }
692
-
693
- [data-code] {
694
- grid-auto-flow: dense;
695
- grid-template-columns: var(--diffs-code-grid);
696
- overflow: var(--diffs-overflow-override, scroll) clip;
697
- overscroll-behavior-x: none;
698
- tab-size: var(--diffs-tab-size, 2);
699
- padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
700
- padding-bottom: max(0px,
701
- calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
702
- var(--diffs-scrollbar-gutter)));
703
- scrollbar-gutter: stable;
704
- align-self: flex-start;
705
- display: grid;
706
- }
707
-
708
- [data-diffs-scrollbar-measure] {
709
- opacity: 0;
710
- pointer-events: none;
711
- scrollbar-gutter: auto;
712
- grid-template-columns: none;
713
- width: 100px;
714
- height: 100px;
715
- padding: 0;
716
- position: absolute;
717
- top: -200px;
718
- left: -200px;
719
- }
720
-
721
- [data-container-size] {
722
- container-type: inline-size;
723
- }
724
-
725
- [data-code]::-webkit-scrollbar {
726
- width: 0;
727
- height: var(--diffs-scrollbar-gutter);
728
- }
729
-
730
- [data-code]::-webkit-scrollbar-track {
731
- background: none;
732
- }
733
-
734
- [data-code]::-webkit-scrollbar-thumb {
735
- background-color: #0000;
736
- background-clip: content-box;
737
- border: 1px solid #0000;
738
- border-radius: 3px;
739
- }
740
-
741
- [data-code]::-webkit-scrollbar-corner {
742
- background-color: #0000;
743
- }
744
-
745
- @supports ((-moz-appearance: none)) {
746
- [data-code] {
747
- scrollbar-width: thin;
748
- scrollbar-color: var(--diffs-bg-context) transparent;
749
- padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
750
- }
751
- }
752
-
753
- [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
754
- & [data-code], &[data-overflow="wrap"] {
755
- padding-top: 0;
756
- }
757
- }
758
-
759
- [data-gutter] {
760
- grid-template-rows: subgrid;
761
- grid-template-columns: subgrid;
762
- z-index: 3;
763
- background-color: var(--diffs-bg);
764
- grid-column: 1;
765
- display: grid;
766
- position: relative;
767
-
768
- & [data-gutter-buffer], & [data-column-number] {
769
- border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
770
- }
771
- }
772
-
773
- [data-content] {
774
- grid-template-rows: subgrid;
775
- grid-template-columns: subgrid;
776
- background-color: var(--diffs-bg);
777
- grid-column: 2;
778
- min-width: 0;
779
- display: grid;
780
- }
781
-
782
- [data-diff-type="split"][data-overflow="wrap"] {
783
- grid-auto-flow: dense;
784
- grid-template-columns: repeat(2, var(--diffs-code-grid));
785
- padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
786
- display: grid;
787
-
788
- & [data-deletions] {
789
- display: contents;
790
-
791
- & [data-gutter] {
792
- grid-column: 1;
793
- }
794
-
795
- & [data-content] {
796
- border-right: 1px solid var(--diffs-bg);
797
- grid-column: 2;
798
- }
799
- }
800
-
801
- & [data-additions] {
802
- display: contents;
803
-
804
- & [data-gutter] {
805
- border-left: 1px solid var(--diffs-bg);
806
- grid-column: 3;
807
- }
808
-
809
- & [data-content] {
810
- grid-column: 4;
811
- }
812
- }
813
- }
814
-
815
- [data-overflow="scroll"] [data-gutter] {
816
- position: sticky;
817
- left: 0;
818
- }
819
-
820
- [data-interactive-lines] [data-line] {
821
- cursor: pointer;
822
- }
823
-
824
- [data-interactive-line-numbers] [data-column-number] {
825
- cursor: pointer;
826
- touch-action: none;
827
- }
828
-
829
- [data-content-buffer], [data-gutter-buffer] {
830
- user-select: none;
831
- min-height: 1lh;
832
- position: relative;
833
- }
834
-
835
- [data-gutter-buffer] {
836
- padding-left: 2ch;
837
- padding-right: 1ch;
838
-
839
- &:before {
840
- content: "";
841
- min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
842
- display: block;
843
- }
844
- }
845
-
846
- [data-gutter-buffer="annotation"] {
847
- --diffs-annotation-bg: var(--diffs-bg-context-gutter);
848
- min-height: 0;
849
- }
850
-
851
- [data-gutter-buffer="buffer"] {
852
- --diffs-line-bg: var(--diffs-bg-context-gutter);
853
- }
854
-
855
- [data-content-buffer] {
856
- background-position: 5px 0;
857
- background-size: 8px 8px;
858
- background-origin: border-box;
859
- background-image: repeating-linear-gradient(-45deg,
860
- transparent,
861
- transparent calc(3px * 1.414),
862
- var(--diffs-bg-buffer) calc(3px * 1.414),
863
- var(--diffs-bg-buffer) calc(4px * 1.414));
864
- grid-column: 1;
865
- }
866
-
867
- [data-separator] {
868
- box-sizing: content-box;
869
- background-color: var(--diffs-bg);
870
- }
871
-
872
- [data-separator="simple"] {
873
- min-height: 4px;
874
- }
875
-
876
- [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
877
- background-color: var(--diffs-bg-separator);
878
- }
879
-
880
- [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
881
- height: 32px;
882
- position: relative;
883
- }
884
-
885
- [data-separator-wrapper] {
886
- user-select: none;
887
- fill: currentColor;
888
- background-color: var(--diffs-bg);
889
- align-items: center;
890
- height: 100%;
891
- display: flex;
892
- position: absolute;
893
- inset-inline: 0;
894
- }
895
-
896
- [data-content] [data-separator-wrapper] {
897
- display: none;
898
- }
899
-
900
- [data-separator="metadata"] [data-separator-wrapper] {
901
- background-color: var(--diffs-bg-separator);
902
- height: 100%;
903
- color: var(--diffs-fg-number);
904
- white-space: nowrap;
905
- text-overflow: ellipsis;
906
- min-width: min-content;
907
- padding-inline: 1ch;
908
- inset-inline: 100% auto;
909
- overflow: hidden;
910
- }
911
-
912
- [data-separator="line-info"] {
913
- margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
914
-
915
- & [data-separator-wrapper] {
916
- min-width: 16px;
917
- }
918
- }
919
-
920
- [data-separator="line-info-basic"], [data-separator="metadata"] {
921
- margin-block: 0;
922
- }
923
-
924
- [data-separator="line-info"][data-separator-first] {
925
- margin-top: 0;
926
- }
927
-
928
- [data-separator="line-info"][data-separator-last] {
929
- margin-bottom: 0;
930
- }
931
-
932
- [data-expand-index] [data-separator-wrapper] {
933
- grid-template-columns: 32px auto;
934
- display: grid;
935
- }
936
-
937
- [data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
938
- grid-template-columns: 32px 32px auto;
939
- }
940
-
941
- [data-expand-button], [data-separator-content] {
942
- background-color: var(--diffs-bg-separator);
943
- flex: none;
944
- align-items: center;
945
- display: flex;
946
- }
947
-
948
- [data-expand-index] [data-separator-content]:hover {
949
- cursor: pointer;
950
- text-decoration: underline;
951
- }
952
-
953
- [data-expand-button] {
954
- cursor: pointer;
955
- min-width: 32px;
956
- color: var(--diffs-fg-number);
957
- border-right: 2px solid var(--diffs-bg);
958
- flex-shrink: 0;
959
- justify-content: center;
960
- align-self: stretch;
961
-
962
- &:hover {
963
- color: var(--diffs-fg);
964
- }
965
-
966
- &[data-expand-all-button] {
967
- display: none;
968
- }
969
- }
970
-
971
- [data-expand-down] [data-icon] {
972
- transform: scaleY(-1);
973
- }
974
-
975
- [data-separator-content] {
976
- height: 100%;
977
- color: var(--diffs-fg-number);
978
- flex: auto;
979
- justify-content: flex-start;
980
- padding: 0 1ch;
981
- overflow: hidden;
982
- }
983
-
984
- [data-separator="line-info"], [data-separator="line-info-basic"] {
985
- & [data-separator-content] {
986
- user-select: none;
987
- height: 100%;
988
- overflow: clip;
989
- }
990
- }
991
-
992
- [data-unmodified-lines] {
993
- text-overflow: ellipsis;
994
- white-space: nowrap;
995
- flex: 0 auto;
996
- min-width: 0;
997
- display: block;
998
- overflow: hidden;
999
- }
1000
-
1001
- @supports (width: 1cqi) {
1002
- [data-unified] {
1003
- & [data-separator="line-info"] [data-separator-wrapper] {
1004
- padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1005
- width: 100cqi;
1006
-
1007
- & [data-separator-content] {
1008
- border-radius: 6px;
1009
- }
1010
- }
1011
-
1012
- & [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
1013
- border-top-left-radius: unset;
1014
- border-bottom-left-radius: unset;
1015
- }
1016
- }
1017
-
1018
- [data-gutter] {
1019
- & [data-separator="line-info"] [data-separator-wrapper] {
1020
- padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1021
- }
1022
-
1023
- & [data-separator="line-info"] [data-separator-content] {
1024
- border-top-left-radius: 6px;
1025
- border-bottom-left-radius: 6px;
1026
- }
1027
-
1028
- & [data-separator="line-info"][data-expand-index] [data-separator-content] {
1029
- border-top-left-radius: unset;
1030
- border-bottom-left-radius: unset;
1031
- }
1032
- }
1033
-
1034
- [data-additions] {
1035
- & [data-content] [data-separator="line-info"] {
1036
- background-color: var(--diffs-bg);
1037
-
1038
- & [data-separator-wrapper] {
1039
- display: none;
1040
- }
1041
- }
1042
-
1043
- & [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
1044
- background-color: var(--diffs-bg-separator);
1045
- border-top-right-radius: 6px;
1046
- border-bottom-right-radius: 6px;
1047
- height: 100%;
1048
- display: block;
1049
-
1050
- & [data-separator-content], & [data-expand-button] {
1051
- display: none;
1052
- }
1053
- }
1054
- }
1055
-
1056
- [data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
1057
- width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
1058
- }
1059
-
1060
- [data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
1061
- background-color: var(--diffs-bg-separator);
1062
- height: 100%;
1063
- margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1064
- border-top-right-radius: 6px;
1065
- border-bottom-right-radius: 6px;
1066
- display: block;
1067
-
1068
- & [data-separator-content], & [data-expand-button] {
1069
- display: none;
1070
- }
1071
- }
1072
-
1073
- [data-separator="line-info"] [data-separator-wrapper] {
1074
- & [data-expand-both], & [data-expand-down], & [data-expand-up] {
1075
- border-top-left-radius: 6px;
1076
- border-bottom-left-radius: 6px;
1077
- }
1078
- }
1079
-
1080
- @media (pointer: fine) {
1081
- [data-separator="line-info"] [data-separator-wrapper] {
1082
- &[data-separator-multi-button] {
1083
- & [data-expand-up] {
1084
- border-top-left-radius: 6px;
1085
- border-bottom-left-radius: unset;
1086
- }
1087
-
1088
- & [data-expand-down] {
1089
- border-bottom-left-radius: 6px;
1090
- border-top-left-radius: unset;
1091
- }
1092
- }
1093
- }
1094
- }
1095
- }
1096
-
1097
- @media (pointer: coarse) {
1098
- [data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
1099
- grid-template-columns: 34px 34px auto;
1100
-
1101
- & [data-separator-content] {
1102
- grid-column: unset;
1103
- grid-row: unset;
1104
- }
1105
- }
1106
-
1107
- @supports (width: 1cqi) {
1108
- [data-separator="line-info"] [data-separator-wrapper] {
1109
- & [data-expand-both], & [data-expand-down], & [data-expand-up] {
1110
- border-top-left-radius: 6px;
1111
- border-bottom-left-radius: 6px;
1112
- }
1113
-
1114
- &[data-separator-multi-button] {
1115
- & [data-expand-up] {
1116
- border-top-left-radius: 6px;
1117
- border-bottom-left-radius: 6px;
1118
- }
1119
-
1120
- & [data-expand-down] {
1121
- border-bottom-left-radius: unset;
1122
- border-top-left-radius: unset;
1123
- }
1124
- }
1125
- }
1126
- }
1127
- }
1128
-
1129
- @media (pointer: fine) {
1130
- [data-separator-wrapper][data-separator-multi-button] {
1131
- grid-template-rows: 50% 50%;
1132
- display: grid;
1133
-
1134
- & [data-separator-content] {
1135
- grid-area: 1 / 2 / -1;
1136
- min-width: min-content;
1137
- }
1138
-
1139
- & [data-expand-button] {
1140
- grid-column: 1;
1141
- }
1142
- }
1143
-
1144
- [data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
1145
- grid-template-columns: 34px auto;
1146
- }
1147
-
1148
- [data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
1149
- grid-template-columns: 100% auto;
1150
- }
1151
-
1152
- [data-separator="line-info"], [data-separator="line-info-basic"] {
1153
- & [data-separator-multi-button] {
1154
- & [data-expand-up] {
1155
- border-bottom: 1px solid var(--diffs-bg);
1156
- border-right: 2px solid var(--diffs-bg);
1157
- }
1158
-
1159
- & [data-expand-down] {
1160
- border-top: 1px solid var(--diffs-bg);
1161
- border-right: 2px solid var(--diffs-bg);
1162
- }
1163
- }
1164
- }
1165
- }
1166
-
1167
- [data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
1168
- display: none;
1169
- }
1170
-
1171
- [data-line-annotation] {
1172
- min-height: var(--diffs-annotation-min-height, 0);
1173
- z-index: 2;
1174
- }
1175
-
1176
- [data-merge-conflict-actions] {
1177
- z-index: 2;
1178
- }
1179
-
1180
- [data-separator="custom"] {
1181
- grid-template-columns: subgrid;
1182
- display: grid;
1183
- }
1184
-
1185
- [data-line], [data-column-number], [data-no-newline] {
1186
- padding-inline: 1ch;
1187
- position: relative;
1188
- }
1189
-
1190
- [data-indicators="classic"] [data-line] {
1191
- padding-inline-start: 2ch;
1192
- }
1193
-
1194
- [data-indicators="classic"] {
1195
- & [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
1196
- &[data-no-newline], &[data-line] {
1197
- &:before {
1198
- user-select: none;
1199
- width: 1ch;
1200
- height: 1lh;
1201
- display: inline-block;
1202
- position: absolute;
1203
- top: 0;
1204
- left: 0;
1205
- }
1206
- }
1207
- }
1208
-
1209
- & [data-line-type="change-addition"] {
1210
- &[data-line], &[data-no-newline] {
1211
- &:before {
1212
- content: "+";
1213
- color: var(--diffs-addition-base);
1214
- }
1215
- }
1216
- }
1217
-
1218
- & [data-line-type="change-deletion"] {
1219
- &[data-line], &[data-no-newline] {
1220
- &:before {
1221
- content: "-";
1222
- color: var(--diffs-deletion-base);
1223
- }
1224
- }
1225
- }
1226
- }
1227
-
1228
- [data-indicators="bars"] {
1229
- & [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
1230
- &[data-column-number] {
1231
- &:before {
1232
- content: "";
1233
- user-select: none;
1234
- contain: strict;
1235
- width: 4px;
1236
- height: 100%;
1237
- display: block;
1238
- position: absolute;
1239
- top: 0;
1240
- left: 0;
1241
- }
1242
- }
1243
- }
1244
-
1245
- & [data-line-type="change-deletion"] {
1246
- &[data-column-number] {
1247
- &:before {
1248
- background-image: linear-gradient(0deg,
1249
- var(--diffs-bg-deletion) 50%,
1250
- var(--diffs-deletion-base) 50%);
1251
- background-repeat: repeat;
1252
- background-size: 2px 2px;
1253
- background-size: calc(1lh / round(1lh / 2px))
1254
- calc(1lh / round(1lh / 2px));
1255
- }
1256
- }
1257
- }
1258
-
1259
- & [data-line-type="change-addition"] {
1260
- &[data-column-number] {
1261
- &:before {
1262
- background-color: var(--diffs-addition-base);
1263
- }
1264
- }
1265
- }
1266
- }
1267
-
1268
- [data-overflow="wrap"] {
1269
- & [data-line], & [data-annotation-content] {
1270
- white-space: pre-wrap;
1271
- word-break: break-word;
1272
- }
1273
- }
1274
-
1275
- [data-overflow="scroll"] [data-line] {
1276
- white-space: pre;
1277
- min-height: 1lh;
1278
- }
1279
-
1280
- [data-column-number] {
1281
- box-sizing: content-box;
1282
- text-align: right;
1283
- user-select: none;
1284
- color: var(--diffs-fg-number);
1285
- padding-left: 2ch;
1286
- }
1287
-
1288
- [data-line-number-content] {
1289
- min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
1290
- z-index: 1;
1291
- display: inline-block;
1292
- position: relative;
1293
- }
1294
-
1295
- [data-disable-line-numbers] {
1296
- & [data-gutter-buffer], & [data-column-number] {
1297
- min-width: 4px;
1298
- padding: 0;
1299
-
1300
- &:before {
1301
- min-width: 0;
1302
- }
1303
- }
1304
-
1305
- & [data-line-number-content] {
1306
- display: none;
1307
- }
1308
-
1309
- & [data-gutter-utility-slot] {
1310
- right: unset;
1311
- justify-content: flex-start;
1312
- left: 0;
1313
- }
1314
-
1315
- &[data-indicators="bars"] [data-gutter-utility-slot] {
1316
- left: 6px;
1317
- }
1318
- }
1319
-
1320
- [data-file][data-disable-line-numbers] {
1321
- & [data-gutter-buffer], & [data-column-number] {
1322
- border-right: 0;
1323
- min-width: 0;
1324
- }
1325
- }
1326
-
1327
- [data-diff-span] {
1328
- box-decoration-break: clone;
1329
- border-radius: 3px;
1330
- }
1331
-
1332
- [data-line-type="change-addition"] [data-diff-span] {
1333
- background-color: var(--diffs-bg-addition-emphasis);
1334
- }
1335
-
1336
- [data-line-type="change-deletion"] [data-diff-span] {
1337
- background-color: var(--diffs-bg-deletion-emphasis);
1338
- }
1339
-
1340
- [data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
1341
- color: var(--diffs-fg);
1342
- padding-left: 1ch;
1343
- }
1344
-
1345
- [data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
1346
- align-items: center;
1347
- display: flex;
1348
-
1349
- &:after {
1350
- color: var(--diffs-fg-conflict-marker);
1351
- font-size: .75rem;
1352
- font-style: normal;
1353
- line-height: 1.25rem;
1354
- font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1355
- padding-left: 1ch;
1356
- }
1357
- }
1358
-
1359
- [data-merge-conflict="marker-start"]:after {
1360
- content: "(Current Change)";
1361
- }
1362
-
1363
- [data-merge-conflict="marker-end"]:after {
1364
- content: "(Incoming Change)";
1365
- }
1366
-
1367
- [data-merge-conflict-actions-content] {
1368
- min-height: 1.75rem;
1369
- font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1370
- color: var(--diffs-fg);
1371
- align-items: center;
1372
- gap: .25rem;
1373
- padding-inline: .5rem;
1374
- font-size: .75rem;
1375
- line-height: 1.2;
1376
- display: flex;
1377
- }
1378
-
1379
- [data-merge-conflict-action] {
1380
- appearance: none;
1381
- color: var(--diffs-fg-number);
1382
- font: inherit;
1383
- cursor: pointer;
1384
- background: none;
1385
- border: 0;
1386
- padding: 0;
1387
- font-style: normal;
1388
- }
1389
-
1390
- [data-merge-conflict-action]:hover {
1391
- color: var(--diffs-fg);
1392
- }
1393
-
1394
- [data-merge-conflict-action="current"]:hover {
1395
- color: var(--diffs-addition-base);
1396
- }
1397
-
1398
- [data-merge-conflict-action="incoming"]:hover {
1399
- color: var(--diffs-modified-base);
1400
- }
1401
-
1402
- [data-merge-conflict-action-separator] {
1403
- color: var(--diffs-fg-number);
1404
- opacity: .6;
1405
- user-select: none;
1406
- }
1407
-
1408
- [data-diffs-header="default"] {
1409
- background-color: var(--diffs-bg);
1410
- justify-content: space-between;
1411
- align-items: center;
1412
- gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1413
- min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
1414
- z-index: 2;
1415
- flex-direction: row;
1416
- padding-inline: 16px;
1417
- display: flex;
1418
- position: relative;
1419
- top: 0;
1420
- }
1421
-
1422
- [data-header-content] {
1423
- align-items: center;
1424
- gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1425
- white-space: nowrap;
1426
- flex-direction: row;
1427
- min-width: 0;
1428
- display: flex;
1429
- }
1430
-
1431
- [data-header-content] [data-prev-name], [data-header-content] [data-title] {
1432
- text-overflow: ellipsis;
1433
- white-space: nowrap;
1434
- direction: rtl;
1435
- min-width: 0;
1436
- overflow: hidden;
1437
- }
1438
-
1439
- [data-prev-name] {
1440
- opacity: .7;
1441
- }
1442
-
1443
- [data-rename-icon] {
1444
- fill: currentColor;
1445
- flex-grow: 0;
1446
- flex-shrink: 0;
1447
- }
1448
-
1449
- [data-diffs-header="default"] [data-metadata] {
1450
- white-space: nowrap;
1451
- align-items: center;
1452
- gap: 1ch;
1453
- display: flex;
1454
- }
1455
-
1456
- [data-diffs-header="default"] [data-additions-count] {
1457
- font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1458
- color: var(--diffs-addition-base);
1459
- }
1460
-
1461
- [data-diffs-header="default"] [data-deletions-count] {
1462
- font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1463
- color: var(--diffs-deletion-base);
1464
- }
1465
-
1466
- [data-change-icon] {
1467
- fill: currentColor;
1468
- flex-shrink: 0;
1469
- }
1470
-
1471
- [data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
1472
- color: var(--diffs-modified-base);
1473
- }
1474
-
1475
- [data-change-icon="new"] {
1476
- color: var(--diffs-addition-base);
1477
- }
1478
-
1479
- [data-change-icon="deleted"] {
1480
- color: var(--diffs-deletion-base);
1481
- }
1482
-
1483
- [data-change-icon="file"] {
1484
- opacity: .6;
1485
- }
1486
-
1487
- [data-annotation-content] {
1488
- z-index: 2;
1489
- isolation: isolate;
1490
- align-self: flex-start;
1491
- min-width: 0;
1492
- display: flow-root;
1493
- position: relative;
1494
- }
1495
-
1496
- [data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
1497
- width: var(--diffs-column-content-width, auto);
1498
- left: var(--diffs-column-number-width, 0);
1499
- position: sticky;
1500
- }
1501
-
1502
- [data-annotation-slot] {
1503
- text-wrap-mode: wrap;
1504
- word-break: normal;
1505
- white-space-collapse: collapse;
1506
- }
1507
-
1508
- [data-gutter-utility-slot] {
1509
- touch-action: none;
1510
- justify-content: flex-end;
1511
- display: flex;
1512
- position: absolute;
1513
- top: 0;
1514
- bottom: 0;
1515
- right: 0;
1516
- }
1517
-
1518
- [data-utility-button] {
1519
- appearance: none;
1520
- cursor: pointer;
1521
- width: 1lh;
1522
- height: 1lh;
1523
- font-size: var(--diffs-font-size, 13px);
1524
- line-height: var(--diffs-line-height, 20px);
1525
- background-color: var(--diffs-modified-base);
1526
- color: var(--diffs-bg);
1527
- fill: currentColor;
1528
- z-index: 4;
1529
- touch-action: none;
1530
- border: none;
1531
- border-radius: 4px;
1532
- justify-content: center;
1533
- align-items: center;
1534
- margin-right: calc(-1lh + 1ch);
1535
- padding: 0;
1536
- display: flex;
1537
- position: relative;
1538
-
1539
- &:before {
1540
- content: "";
1541
- display: block;
1542
- position: absolute;
1543
- inset: 0 0 0 -4px;
1544
- }
1545
- }
1546
-
1547
- [data-decoration-bar-stack] {
1548
- pointer-events: none;
1549
- isolation: isolate;
1550
- z-index: 1;
1551
- background-color: var(--diffs-decoration-bar-color, transparent);
1552
- box-sizing: content-box;
1553
- border-left: 2px solid var(--diffs-bg);
1554
- border-right: 2px solid var(--diffs-bg);
1555
- width: 6px;
1556
- position: absolute;
1557
- top: 0;
1558
- bottom: 0;
1559
- right: -2px;
1560
-
1561
- [data-decoration-bar-depth="1"] & {
1562
- background-color: color-mix(in lab,
1563
- var(--diffs-bg) 20%,
1564
- var(--diffs-decoration-bar-color, transparent));
1565
- }
1566
-
1567
- [data-decoration-bar-depth="2"] & {
1568
- background-color: color-mix(in lab,
1569
- var(--diffs-bg) 45%,
1570
- var(--diffs-decoration-bar-color, transparent));
1571
- }
1572
-
1573
- [data-decoration-bar-depth="3"] & {
1574
- background-color: color-mix(in lab,
1575
- var(--diffs-bg) 65%,
1576
- var(--diffs-decoration-bar-color, transparent));
1577
- }
1578
-
1579
- [data-decoration-bar-start] & {
1580
- border-top-left-radius: 5px;
1581
- border-top-right-radius: 5px;
1582
- }
1583
-
1584
- [data-decoration-bar-end] & {
1585
- z-index: 3;
1586
- border-bottom-right-radius: 5px;
1587
- border-bottom-left-radius: 5px;
1588
- }
1589
- }
1590
-
1591
- [data-placeholder] {
1592
- contain: strict;
1593
- }
1594
-
1595
- [data-error-wrapper] {
1596
- padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
1597
- var(--diffs-gap-inline, var(--diffs-gap-fallback));
1598
- scrollbar-width: none;
1599
- max-height: 400px;
1600
- overflow: auto;
1601
-
1602
- & [data-error-message] {
1603
- color: var(--diffs-deletion-base);
1604
- font-size: 18px;
1605
- font-weight: bold;
1606
- }
1607
-
1608
- & [data-error-stack] {
1609
- color: var(--diffs-fg-number);
1610
- }
1611
- }
1612
- }
1613
-
1614
- @layer theme, rendered, unsafe;
1615
- `,qh=`@layer base, theme, rendered, unsafe;`,Jh=RegExp(`${$h(Lt)}\\s*:\\s*[^;]+;`);function Yh(e){return`${qh}
1616
- ${Kh}
1617
- @layer theme {
1618
- ${e}
1619
- }`}function Xh(e){return`${qh}
1620
- @layer unsafe {
1621
- ${e}
1622
- }`}function Zh(e,t=`system`,n){return`${qh}
1623
- @layer rendered {
1624
- :host {${t===`system`?``:`
1625
- color-scheme: ${t};`}
1626
- ${Gh(n)}
1627
- ${e}
1628
- }
1629
- }`}function Qh(e,t){let n=Gh(t);return e.replace(Jh,n)}function $h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function eg({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e??(e=document.createElement(`code`),e.setAttribute(`data-code`,``),n!=null&&e.setAttribute(`data-${n}`,``),t?.appendChild(e)),r==null?e.style.removeProperty(`grid-row`):e.style.setProperty(`grid-row`,`span ${r}`),i?e.setAttribute(`data-container-size`,``):e.removeAttribute(`data-container-size`),e}function tg({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===``){t?.remove();return}return t??=ng(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function ng(){let e=document.createElement(`style`);return e.setAttribute(jt,``),e}function rg(e,t){if(t==null)return;let n=e.shadowRoot??e.attachShadow({mode:`open`});n.innerHTML===``&&(n.innerHTML=t)}function ig(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:a,split:o,totalLines:s,customProperties:c}){if(c!=null)for(let t in c){let n=c[t];n!=null&&e.setAttribute(t,`${n}`)}switch(t===`diff`?(e.setAttribute(`data-diff`,``),e.removeAttribute(`data-file`)):(e.setAttribute(`data-file`,``),e.removeAttribute(`data-diff`)),n){case`bars`:case`classic`:e.setAttribute(`data-indicators`,n);break;case`none`:e.removeAttribute(`data-indicators`);break}return i?e.setAttribute(`data-disable-line-numbers`,``):e.removeAttribute(`data-disable-line-numbers`),r?e.removeAttribute(`data-background`):e.setAttribute(`data-background`,``),t===`diff`?e.setAttribute(`data-diff-type`,o?`split`:`single`):e.removeAttribute(`data-diff-type`),e.setAttribute(`data-overflow`,a),e.style.setProperty(`--diffs-min-number-column-width-default`,`${`${s}`.length}ch`),e}if(typeof HTMLElement<`u`&&customElements.get(`diffs-container`)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;let t=this.attachShadow({mode:`open`});e??(e=new CSSStyleSheet,e.replaceSync(Kh)),t.adoptedStyleSheets=[e]}connectedCallback(){Wh(this.shadowRoot??this.attachShadow({mode:`open`}))}}customElements.define(_t,t)}var ag=j.createContext(void 0);function og(){let e=j.useContext(ag);if(e===void 0)throw Error(x(53));return e}var sg=function(e){return e.scrollAreaCornerHeight=`--scroll-area-corner-height`,e.scrollAreaCornerWidth=`--scroll-area-corner-width`,e}({});function $(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=n===`x`?`Inline`:`Block`;return n===`x`&&t===`margin`?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${i}Start`])+parseFloat(r[`${t}${i}End`])}var cg=function(e){return e.orientation=`data-orientation`,e.hovering=`data-hovering`,e.scrolling=`data-scrolling`,e.hasOverflowX=`data-has-overflow-x`,e.hasOverflowY=`data-has-overflow-y`,e.overflowXStart=`data-overflow-x-start`,e.overflowXEnd=`data-overflow-x-end`,e.overflowYStart=`data-overflow-y-start`,e.overflowYEnd=`data-overflow-y-end`,e}({}),lg=`base-ui-disable-scrollbar`,ug={className:lg,getElement(e){return(0,L.jsx)(`style`,{nonce:e,href:lg,precedence:`base-ui:low`,children:`.${lg}{scrollbar-width:none}.${lg}::-webkit-scrollbar{display:none}`})}},dg=function(e){return e.scrolling=`data-scrolling`,e.hasOverflowX=`data-has-overflow-x`,e.hasOverflowY=`data-has-overflow-y`,e.overflowXStart=`data-overflow-x-start`,e.overflowXEnd=`data-overflow-x-end`,e.overflowYStart=`data-overflow-y-start`,e.overflowYEnd=`data-overflow-y-end`,e}({}),fg={hasOverflowX:e=>e?{[dg.hasOverflowX]:``}:null,hasOverflowY:e=>e?{[dg.hasOverflowY]:``}:null,overflowXStart:e=>e?{[dg.overflowXStart]:``}:null,overflowXEnd:e=>e?{[dg.overflowXEnd]:``}:null,overflowYStart:e=>e?{[dg.overflowYStart]:``}:null,overflowYEnd:e=>e?{[dg.overflowYEnd]:``}:null,cornerHidden:()=>null},pg=j.createContext(void 0),mg={disableStyleElements:!1};function hg(){return j.useContext(pg)??mg}var gg={x:0,y:0},_g={width:0,height:0},vg={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},yg={x:!0,y:!0,corner:!0},bg=j.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,s=xg(i),c=_(),l=ne(),u=ne(),{nonce:d,disableStyleElements:f}=hg(),[p,m]=j.useState(!1),[h,g]=j.useState(!1),[y,b]=j.useState(!1),[x,te]=j.useState(!1),[C,w]=j.useState(!1),[T,E]=j.useState(_g),[D,re]=j.useState(_g),[O,ie]=j.useState(vg),[k,ae]=j.useState(yg),A=j.useRef(null),M=j.useRef(null),N=j.useRef(null),oe=j.useRef(null),P=j.useRef(null),F=j.useRef(null),se=j.useRef(null),ce=j.useRef(!1),le=j.useRef(0),ue=j.useRef(0),de=j.useRef(0),fe=j.useRef(0),pe=j.useRef(`vertical`),me=j.useRef(gg),he=ee(e=>{let t=e.x-me.current.x,n=e.y-me.current.y;me.current=e,n!==0&&(b(!0),l.start(500,()=>{b(!1)})),t!==0&&(g(!0),u.start(500,()=>{g(!1)}))}),ge=ee(e=>{e.button===0&&(ce.current=!0,le.current=e.clientY,ue.current=e.clientX,pe.current=e.currentTarget.getAttribute(cg.orientation),M.current&&(de.current=M.current.scrollTop,fe.current=M.current.scrollLeft),P.current&&pe.current===`vertical`&&P.current.setPointerCapture(e.pointerId),F.current&&pe.current===`horizontal`&&F.current.setPointerCapture(e.pointerId))}),_e=ee(e=>{if(!ce.current)return;let t=e.clientY-le.current,n=e.clientX-ue.current;if(M.current){let r=M.current.scrollHeight,i=M.current.clientHeight,a=M.current.scrollWidth,o=M.current.clientWidth;if(P.current&&N.current&&pe.current===`vertical`){let n=$(N.current,`padding`,`y`),a=$(P.current,`margin`,`y`),o=P.current.offsetHeight,s=t/(N.current.offsetHeight-o-n-a);M.current.scrollTop=de.current+s*(r-i),e.preventDefault(),b(!0),l.start(500,()=>{b(!1)})}if(F.current&&oe.current&&pe.current===`horizontal`){let t=$(oe.current,`padding`,`x`),r=$(F.current,`margin`,`x`),i=F.current.offsetWidth,s=n/(oe.current.offsetWidth-i-t-r);M.current.scrollLeft=fe.current+s*(a-o),e.preventDefault(),g(!0),u.start(500,()=>{g(!1)})}}}),ve=ee(e=>{ce.current=!1,P.current&&pe.current===`vertical`&&P.current.releasePointerCapture(e.pointerId),F.current&&pe.current===`horizontal`&&F.current.releasePointerCapture(e.pointerId)});function ye(e){te(e.pointerType===`touch`)}function be(e){if(ye(e),e.pointerType!==`touch`){let t=v(A.current,e.target);m(t)}}let xe=j.useMemo(()=>({scrolling:h||y,hasOverflowX:!k.x,hasOverflowY:!k.y,overflowXStart:O.xStart,overflowXEnd:O.xEnd,overflowYStart:O.yStart,overflowYEnd:O.yEnd,cornerHidden:k.corner}),[h,y,k.x,k.y,k.corner,O]),Se={role:`presentation`,onPointerEnter:be,onPointerMove:be,onPointerDown:ye,onPointerLeave(){m(!1)},style:{position:`relative`,[sg.scrollAreaCornerHeight]:`${T.height}px`,[sg.scrollAreaCornerWidth]:`${T.width}px`}},Ce=S(`div`,e,{state:xe,ref:[t,A],props:[Se,o],stateAttributesMapping:fg}),we=j.useMemo(()=>({handlePointerDown:ge,handlePointerMove:_e,handlePointerUp:ve,handleScroll:he,cornerSize:T,setCornerSize:E,thumbSize:D,setThumbSize:re,hasMeasuredScrollbar:C,setHasMeasuredScrollbar:w,touchModality:x,cornerRef:se,scrollingX:h,setScrollingX:g,scrollingY:y,setScrollingY:b,hovering:p,setHovering:m,viewportRef:M,rootRef:A,scrollbarYRef:N,scrollbarXRef:oe,thumbYRef:P,thumbXRef:F,rootId:c,hiddenState:k,setHiddenState:ae,overflowEdges:O,setOverflowEdges:ie,viewportState:xe,overflowEdgeThreshold:s}),[ge,_e,ve,he,T,D,C,x,h,g,y,b,p,m,c,k,O,xe,s]);return(0,L.jsxs)(ag.Provider,{value:we,children:[!f&&ug.getElement(d),Ce]})});function xg(e){if(typeof e==`number`){let t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,e?.xStart||0),xEnd:Math.max(0,e?.xEnd||0),yStart:Math.max(0,e?.yStart||0),yEnd:Math.max(0,e?.yEnd||0)}}var Sg=j.createContext(void 0),Cg=function(e){return e.scrollAreaOverflowXStart=`--scroll-area-overflow-x-start`,e.scrollAreaOverflowXEnd=`--scroll-area-overflow-x-end`,e.scrollAreaOverflowYStart=`--scroll-area-overflow-y-start`,e.scrollAreaOverflowYEnd=`--scroll-area-overflow-y-end`,e}({});function wg(e,t){return Math.max(0,e-t)}function Tg(e,t){if(t<=0)return 0;let n=ae(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}var Eg=!1;function Dg(){Eg||E||(typeof CSS<`u`&&`registerProperty`in CSS&&[Cg.scrollAreaOverflowXStart,Cg.scrollAreaOverflowXEnd,Cg.scrollAreaOverflowYStart,Cg.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),Eg=!0)}var Og=j.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{viewportRef:o,scrollbarYRef:s,scrollbarXRef:c,thumbYRef:l,thumbXRef:u,cornerRef:d,cornerSize:f,setCornerSize:p,setThumbSize:m,rootId:h,setHiddenState:g,hiddenState:_,setHasMeasuredScrollbar:v,handleScroll:y,setHovering:b,setOverflowEdges:x,overflowEdges:w,overflowEdgeThreshold:T,scrollingX:E,scrollingY:D}=og(),re=te(),O=j.useRef(!0),ie=j.useRef([NaN,NaN,NaN,NaN]),k=ne(),A=ne(),M=ee(()=>{let e=o.current,t=s.current,n=c.current,r=l.current,i=u.current,a=d.current;if(!e)return;let h=e.scrollHeight,_=e.scrollWidth,y=e.clientHeight,b=e.clientWidth,S=e.scrollTop,ee=e.scrollLeft,te=ie.current,C=Number.isNaN(te[0]);if(te[0]=y,te[1]=h,te[2]=b,te[3]=_,C&&v(!0),h===0||_===0)return;let w=kg(e),E=w.y,D=w.x,ne=b/_,O=y/h,k=Math.max(0,_-b),A=Math.max(0,h-y),j=0,M=0;if(!D){let e=0;e=ae(re===`rtl`?-ee:ee,0,k),j=Tg(e,k),M=k-j}let N=E?0:ae(S,0,A),oe=E?0:Tg(N,A),P=E?0:A-oe,F=D?0:b,se=E?0:y,ce=0,le=0;!D&&!E&&(ce=t?.offsetWidth||0,le=n?.offsetHeight||0);let ue=f.width===0&&f.height===0,de=ue?ce:0,fe=ue?le:0,pe=$(n,`padding`,`x`),me=$(t,`padding`,`y`),he=$(i,`margin`,`x`),ge=$(r,`margin`,`y`),_e=F-pe-he,ve=se-me-ge,ye=n?Math.min(n.offsetWidth-de,_e):_e,be=t?Math.min(t.offsetHeight-fe,ve):ve,xe=Math.max(16,ye*ne),Se=Math.max(16,be*O);if(m(e=>e.height===Se&&e.width===xe?e:{width:xe,height:Se}),t&&r){let e=t.offsetHeight-Se-me-ge,n=h-y,i=n===0?0:S/n,a=Math.min(e,Math.max(0,i*e));r.style.transform=`translate3d(0,${a}px,0)`}if(n&&i){let e=n.offsetWidth-xe-pe-he,t=_-b,r=t===0?0:ee/t,a=re===`rtl`?ae(r*e,-e,0):ae(r*e,0,e);i.style.transform=`translate3d(${a}px,0,0)`}let Ce=[[Cg.scrollAreaOverflowXStart,j],[Cg.scrollAreaOverflowXEnd,M],[Cg.scrollAreaOverflowYStart,oe],[Cg.scrollAreaOverflowYEnd,P]];for(let[t,n]of Ce)e.style.setProperty(t,`${n}px`);a&&(D||E?p({width:0,height:0}):!D&&!E&&p({width:ce,height:le})),g(e=>Ag(e,w));let we={xStart:!D&&j>T.xStart,xEnd:!D&&M>T.xEnd,yStart:!E&&oe>T.yStart,yEnd:!E&&P>T.yEnd};x(e=>e.xStart===we.xStart&&e.xEnd===we.xEnd&&e.yStart===we.yStart&&e.yEnd===we.yEnd?e:we)});C(()=>{o.current&&Dg()},[o]),C(()=>{queueMicrotask(M)},[M,_,re]),C(()=>{o.current?.matches(`:hover`)&&b(!0)},[o,b]),j.useEffect(()=>{let e=o.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=ie.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}M()});return n.observe(e),A.start(0,()=>{let t=e.getAnimations({subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished)).then(M).catch(()=>{})}),()=>{n.disconnect(),A.clear()}},[M,o,A]);function N(){O.current=!1}let oe={role:`presentation`,...h&&{"data-id":`${h}-viewport`},tabIndex:_.x&&_.y?-1:0,className:ug.className,style:{overflow:`scroll`},onScroll(){o.current&&(M(),O.current||y({x:o.current.scrollLeft,y:o.current.scrollTop}),k.start(100,()=>{O.current=!0}))},onWheel:N,onTouchMove:N,onPointerMove:N,onPointerEnter:N,onKeyDown:N},P=j.useMemo(()=>({scrolling:E||D,hasOverflowX:!_.x,hasOverflowY:!_.y,overflowXStart:w.xStart,overflowXEnd:w.xEnd,overflowYStart:w.yStart,overflowYEnd:w.yEnd,cornerHidden:_.corner}),[E,D,_.x,_.y,_.corner,w]),F=S(`div`,e,{ref:[t,o],state:P,props:[oe,a],stateAttributesMapping:fg}),se=j.useMemo(()=>({computeThumbPosition:M}),[M]);return(0,L.jsx)(Sg.Provider,{value:se,children:F})});function kg(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function Ag(e,t){return e.y===t.y&&e.x===t.x&&e.corner===t.corner?e:t}var jg=j.createContext(void 0);function Mg(){let e=j.useContext(jg);if(e===void 0)throw Error(x(54));return e}var Ng=function(e){return e.scrollAreaThumbHeight=`--scroll-area-thumb-height`,e.scrollAreaThumbWidth=`--scroll-area-thumb-width`,e}({}),Pg=j.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:a=!1,style:o,...s}=e,{hovering:c,scrollingX:l,scrollingY:u,hiddenState:d,overflowEdges:f,scrollbarYRef:p,scrollbarXRef:m,viewportRef:h,thumbYRef:g,thumbXRef:_,handlePointerDown:x,handlePointerUp:ee,rootId:C,thumbSize:w,hasMeasuredScrollbar:T}=og(),E={hovering:c,scrolling:{horizontal:l,vertical:u}[i],orientation:i,hasOverflowX:!d.x,hasOverflowY:!d.y,overflowXStart:f.xStart,overflowXEnd:f.xEnd,overflowYStart:f.yStart,overflowYEnd:f.yEnd,cornerHidden:d.corner},D=te(),ne=!T&&!a,re=i===`vertical`?d.y:d.x,O=a||!re;j.useEffect(()=>{if(!O)return;let e=h.current,t=i===`vertical`?p.current:m.current;if(!t)return;function n(n){if(!e||!t||n.ctrlKey)return;n.preventDefault();let r=i===`horizontal`,a=r?`scrollLeft`:`scrollTop`,o=r?n.deltaX:n.deltaY,s=r?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,c=r&&D===`rtl`?-s:0,l=r&&D===`rtl`?0:s,u=e[a];u<=c&&o<0||u>=l&&o>0||(e[a]=Math.min(l,Math.max(c,u+o)))}return y(t,`wheel`,n,{passive:!1})},[D,i,m,p,O,h]);let ie={...C&&{"data-id":`${C}-scrollbar`},onPointerDown(e){if(e.button!==0)return;let t=b(e.nativeEvent),n=i===`vertical`?g.current:_.current;if(!(n&&v(n,t))&&h.current){if(g.current&&p.current&&i===`vertical`){let t=$(g.current,`margin`,`y`),n=$(p.current,`padding`,`y`),r=g.current.offsetHeight,i=p.current.getBoundingClientRect(),a=e.clientY-i.top-r/2-n+t/2,o=h.current.scrollHeight,s=h.current.clientHeight,c=a/(p.current.offsetHeight-r-n-t)*(o-s);h.current.scrollTop=c}if(_.current&&m.current&&i===`horizontal`){let t=$(_.current,`margin`,`x`),n=$(m.current,`padding`,`x`),r=_.current.offsetWidth,i=m.current.getBoundingClientRect(),a=e.clientX-i.left-r/2-n+t/2,o=h.current.scrollWidth,s=h.current.clientWidth,c=a/(m.current.offsetWidth-r-n-t),l;D===`rtl`?(l=(1-c)*(o-s),h.current.scrollLeft<=0&&(l=-l)):l=c*(o-s),h.current.scrollLeft=l}x(e)}},onPointerUp:ee,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:ne?`hidden`:void 0,...i===`vertical`&&{top:0,bottom:`var(${sg.scrollAreaCornerHeight})`,insetInlineEnd:0,[Ng.scrollAreaThumbHeight]:`${w.height}px`},...i===`horizontal`&&{insetInlineStart:0,insetInlineEnd:`var(${sg.scrollAreaCornerWidth})`,bottom:0,[Ng.scrollAreaThumbWidth]:`${w.width}px`}}},k=S(`div`,e,{ref:[t,i===`vertical`?p:m],state:E,props:[ie,s],stateAttributesMapping:fg}),ae=j.useMemo(()=>({orientation:i}),[i]);return O?(0,L.jsx)(jg.Provider,{value:ae,children:k}):null}),Fg=j.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:s,handlePointerDown:c,handlePointerMove:l,handlePointerUp:u,setScrollingX:d,setScrollingY:f,hasMeasuredScrollbar:p}=og(),{orientation:m}=Mg();return S(`div`,e,{ref:[t,m===`vertical`?o:s],state:{orientation:m},props:[{onPointerDown:c,onPointerMove:l,onPointerUp(e){m===`vertical`&&f(!1),m===`horizontal`&&d(!1),u(e)},style:{visibility:p?void 0:`hidden`,...m===`vertical`&&{height:`var(${Ng.scrollAreaThumbHeight})`},...m===`horizontal`&&{width:`var(${Ng.scrollAreaThumbWidth})`}}},a]})}),Ig=j.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{cornerRef:o,cornerSize:s,hiddenState:c}=og(),l=S(`div`,e,{ref:[t,o],props:[{style:{position:`absolute`,bottom:0,insetInlineEnd:0,width:s.width,height:s.height}},a]});return c.corner?null:l});function Lg({top:e,bottom:t}){if(!(!e&&!t))return T(`virtualized-scroll-fade [--fade-size:1.5rem]`,e&&t&&`[--virtualized-scroll-fade-mask:linear-gradient(to_bottom,transparent,black_var(--fade-size),black_calc(100%-var(--fade-size)),transparent)]`,e&&!t&&`[--virtualized-scroll-fade-mask:linear-gradient(to_bottom,transparent,black_var(--fade-size))]`,!e&&t&&`[--virtualized-scroll-fade-mask:linear-gradient(to_bottom,black_calc(100%-var(--fade-size)),transparent)]`)}function Rg(e){let t=(0,Ke.c)(25),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,children:n,scrollFade:a,scrollbarGutter:o,hideScrollbars:s,chainVerticalScroll:c,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?!1:a,u=o===void 0?!1:o,d=s===void 0?!1:s,f=c===void 0?!1:c,p;t[8]===r?p=t[9]:(p=T(`relative size-full min-h-0 overflow-hidden rounded-[inherit]`,r),t[8]=r,t[9]=p);let m=f&&`overscroll-y-auto`,h=l&&`scroll-p-[var(--fade-size)] mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]`,g=u&&`scrollbar-gutter-stable`,_=d&&`[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,v;t[10]!==m||t[11]!==h||t[12]!==g||t[13]!==_?(v=T(`h-full max-h-[inherit] overflow-auto overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-has-overflow-x:overscroll-x-contain`,m,h,g,_),t[10]=m,t[11]=h,t[12]=g,t[13]=_,t[14]=v):v=t[14];let y;t[15]!==n||t[16]!==v?(y=(0,L.jsx)(Og,{className:v,"data-slot":`scroll-area-viewport`,children:n}),t[15]=n,t[16]=v,t[17]=y):y=t[17];let b;t[18]===d?b=t[19]:(b=!d&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(zg,{orientation:`vertical`}),(0,L.jsx)(zg,{orientation:`horizontal`}),(0,L.jsx)(Ig,{"data-slot":`scroll-area-corner`})]}),t[18]=d,t[19]=b);let x;return t[20]!==i||t[21]!==y||t[22]!==b||t[23]!==p?(x=(0,L.jsxs)(bg,{className:p,...i,children:[y,b]}),t[20]=i,t[21]=y,t[22]=b,t[23]=p,t[24]=x):x=t[24],x}function zg(e){let t=(0,Ke.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`vertical`:i,o;t[4]===n?o=t[5]:(o=T(`flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:mx-1 data-[orientation=horizontal]:mb-px data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:my-1 data-[orientation=vertical]:mr-px data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100`,n),t[4]=n,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,L.jsx)(Fg,{className:`relative flex-1 rounded-full bg-[var(--app-scrollbar-thumb)] transition-colors hover:bg-[var(--app-scrollbar-thumb-hover)]`,"data-slot":`scroll-area-thumb`}),t[6]=s):s=t[6];let c;return t[7]!==a||t[8]!==r||t[9]!==o?(c=(0,L.jsx)(Pg,{className:o,"data-slot":`scroll-area-scrollbar`,orientation:a,...r,children:s}),t[7]=a,t[8]=r,t[9]=o,t[10]=c):c=t[10],c}export{dp as $,Fn as $t,Sh as A,pt as An,kr as At,Bm as B,he as Bn,pr as Bt,Mh as C,Et as Cn,nf as Ct,Th as D,mt as Dn,Zd as Dt,Eh as E,Mt as En,Qd as Et,Gm as F,Qe as Fn,wr as Ft,Om as G,or as Gt,Lm as H,mr as Ht,Wm as I,Xe as In,Tr as It,om as J,qn as Jt,Am as K,tr as Kt,Km as L,Ge as Ln,Sr as Lt,Ym as M,dt as Mn,Dr as Mt,Xm as N,Je as Nn,Er as Nt,wh as O,ft as On,aa as Ot,Um as P,Ze as Pn,Cr as Pt,gp as Q,Wn as Qt,Hm as R,Fe as Rn,br as Rt,Ph as S,Ot as Sn,sf as St,Dh as T,jt as Tn,ef as Tt,Nm as U,_r as Ut,Rm as V,hr as Vt,Mm as W,yr as Wt,vp as X,Jn as Xt,tm as Y,Bn as Yt,op as Z,Hn as Zt,Vh as _,zt as _n,gf as _t,hg as a,Kt as an,tp as at,Ih as b,Gt as bn,hf as bt,rg as c,Nt as cn,ep as ct,Qh as d,Vt as dn,Xf as dt,Gn as en,cp as et,Yh as f,Ut as fn,xf as ft,Hh as g,Rt as gn,_f as gt,Wh as h,At as hn,Z as ht,Tg as i,nn as in,up as it,mh as j,gt as jn,Or as jt,Ch as k,ht as kn,mo as kt,tg as l,kt as ln,$f as lt,Xh as m,Ht as mn,yf as mt,Lg as n,fn as nn,_p as nt,ug as o,It as on,np as ot,Zh as p,Wt as pn,bf as pt,jm as q,Yn as qt,wg as r,un as rn,sp as rt,ig as s,Ft as sn,ip as st,Rg as t,Kn as tn,lp as tt,eg as u,Bt as un,Qf as ut,Bh as v,vt as vn,pf as vt,kh as w,xt as wn,tf as wt,Fh as x,Dt as xn,uf as xt,Lh as y,_t as yn,mf as yt,Vm as z,Te as zn,fr as zt};
1630
- //# sourceMappingURL=scroll-area-DhT-7J-n.js.map