@reviewflow/app 6.24.0 → 6.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/build/index-node.mjs +94 -19
  2. package/client/_expo/static/css/code-token-colors-d41d427a41903cf1d478f2bcf7a82927.css +1 -0
  3. package/client/_expo/static/css/global-a244c8d2cac31b99e7a710a48cdf6474.css +2 -0
  4. package/client/_expo/static/css/markdown-editor-5619ae81343488ae262e6dd3350aef4a.css +1 -0
  5. package/client/_expo/static/js/web/{AppEntry-5fa5eb5221040ae540f14b5734c1aa9d.js → AppEntry-17db9b09237740c52980adeecf895fa5.js} +249 -223
  6. package/client/_expo/static/js/web/{__common-0bf7e9515874f1f9320cf614d3471ccf.js → __common-a229c1110a11f9f5226aac4c3a888034.js} +431 -84
  7. package/client/_expo/static/js/web/{abap-4735ba0bdab40e1fa6833c169536f78c.js → abap-df8e603fa29bd1161ad0c894cecf4c84.js} +1 -1
  8. package/client/_expo/static/js/web/{actionscript-3-81b92065ca770efc579fbe835d5b5c61.js → actionscript-3-c21d4f3e943dd47846cdd4e635f2f4d5.js} +1 -1
  9. package/client/_expo/static/js/web/{ada-0ac873023b427e6536460c39ed965204.js → ada-c52e08d1c2f62f97aee3dc331b7695c1.js} +1 -1
  10. package/client/_expo/static/js/web/{ahk-8f37a629778b454039b5b427f13e60c6.js → ahk-9ceee3c75c0d7a609ee6bfd01c80d436.js} +1 -1
  11. package/client/_expo/static/js/web/{ahk2-9c6a36defc615c621f5c5c121484836d.js → ahk2-eb3d4aa8b16ea2b4a0b623d9379d741f.js} +1 -1
  12. package/client/_expo/static/js/web/{andromeeda-4eb7627ed7e2027a3014eb9b0fc7d48b.js → andromeeda-0c4cfd189b2a5858c5006455e7996492.js} +1 -1
  13. package/client/_expo/static/js/web/{angular-ts-c09f4196061b512445ec47fec285c235.js → angular-ts-0bae9322cf875e7ba879cbeecb86727f.js} +3 -3
  14. package/client/_expo/static/js/web/{apache-be79fef870bd11dd899557620223cb88.js → apache-fbee2c6ce8c5350b117dff3fa453fbbc.js} +1 -1
  15. package/client/_expo/static/js/web/{apex-bdc5a5b7e16e171235114a0716d9aba8.js → apex-3b34e8e719c5f3179587981e9cac0cf9.js} +1 -1
  16. package/client/_expo/static/js/web/{apl-200d3b29a04b6133f2f117036d62fe06.js → apl-48c68c61a23e3d6e63a08babffbf00a7.js} +1 -1
  17. package/client/_expo/static/js/web/{applescript-a84b102f9eb8d92b88dd52a2d9753528.js → applescript-92008435b07703478624b1b396a3a1b0.js} +1 -1
  18. package/client/_expo/static/js/web/{ara-7805d62ccceac7742d37fbda450d8d40.js → ara-0339aa99af428e930516e9c6eb2fefb9.js} +1 -1
  19. package/client/_expo/static/js/web/{asciidoc-07f9276f66d1c37c4bdde8625666201e.js → asciidoc-7fc416412bb9b0ad22b6c70c64e11cfc.js} +1 -1
  20. package/client/_expo/static/js/web/{asm-c8588fb8637190115a2e469d912abe3e.js → asm-f89243ecfb0cce03f6c6ec6bbdbe5f4f.js} +1 -1
  21. package/client/_expo/static/js/web/{astro-ba02102e8e986fd6a513ee4cdb7bf6af.js → astro-74217750ff01ac2a47a5adc699de418b.js} +1 -1
  22. package/client/_expo/static/js/web/{aurora-x-eca7c4dbcf2fe31dd1a876b4646d8a5c.js → aurora-x-640c33a2258f29ac211b5dcac83d6ff5.js} +1 -1
  23. package/client/_expo/static/js/web/{awk-1c0b0a74fd6edd411d2ef5882d0aaaf7.js → awk-5107cb0ed1b2e4114476189ea54f9ec0.js} +1 -1
  24. package/client/_expo/static/js/web/{ayu-dark-8f6e385b58df92299befb1001c0071e9.js → ayu-dark-df205d6df11fd1d3bbb35667e3613431.js} +1 -1
  25. package/client/_expo/static/js/web/{ayu-light-a1b60d58cbfcccc85725df01470c5fbf.js → ayu-light-207208a0af25b22a24823fdf8b2419cb.js} +1 -1
  26. package/client/_expo/static/js/web/{ayu-mirage-7f2d3450fc7c1c924319e16b522036ee.js → ayu-mirage-514b0687fea9756250a854a02b27fe20.js} +1 -1
  27. package/client/_expo/static/js/web/{ballerina-f64970fa40c72dc778abb0564518a98f.js → ballerina-4f59900af55bfdfefe3c77f16f8445c9.js} +1 -1
  28. package/client/_expo/static/js/web/{beancount-1314c5487f7091980779654e7984108c.js → beancount-6e590e684619037afca6ae84f5f59c4b.js} +1 -1
  29. package/client/_expo/static/js/web/{berry-88aff98d4e112e3ae1d671779a5fa36a.js → berry-02f9a11813bd78276082a1ee9e7e0271.js} +1 -1
  30. package/client/_expo/static/js/web/{bicep-a7701a656518580c2a958c6a3dbfe235.js → bicep-686cb67da63b2984bc3686548ef1c726.js} +1 -1
  31. package/client/_expo/static/js/web/{bird2-53b955850b24b4e577226638a896efb7.js → bird2-9a2eaa50eea45d4ef3d3fdc90a1b6076.js} +1 -1
  32. package/client/_expo/static/js/web/{blade-5a3ef0b2ac698f1ee7bb030d8f9dbf31.js → blade-cb85e775d1acdd43b795bd9a368dae6e.js} +1 -1
  33. package/client/_expo/static/js/web/{bsl-4a20028ae57a060115c57c0463b9ea05.js → bsl-6132747a29bc49fb593786756b59e2d0.js} +1 -1
  34. package/client/_expo/static/js/web/{c3-ab2edffb963d45e007c8e5c691b4b8b4.js → c3-fe39148be0597b005f9a1cf05cc3aed7.js} +1 -1
  35. package/client/_expo/static/js/web/{cadence-563ae61bdcc894bef5f515b62afd96b4.js → cadence-2d36d4b2c9f54d0e71382b2700b5b047.js} +1 -1
  36. package/client/_expo/static/js/web/{cairo-526ea28326e3fe8ef4aa133427732df4.js → cairo-31cfd007b807e03f0667ddcb8a3a2ab5.js} +1 -1
  37. package/client/_expo/static/js/web/{catppuccin-frappe-aff087ba4e9b896d0e137ffa80f49c02.js → catppuccin-frappe-8f443c9f629d3116618724ecf5c85606.js} +1 -1
  38. package/client/_expo/static/js/web/{catppuccin-latte-c3b1c912e97e8f624e6cbf45ef3b5edf.js → catppuccin-latte-4ed931439b72d33306318d8e34bcb87a.js} +1 -1
  39. package/client/_expo/static/js/web/{catppuccin-macchiato-b6c416a52b907946bcdca920c48ae599.js → catppuccin-macchiato-9183bf25ab1a11e53097b9cd3feec650.js} +1 -1
  40. package/client/_expo/static/js/web/{catppuccin-mocha-c4f1c6d94ae481022cf6033197e7c316.js → catppuccin-mocha-b58d3a71385cd7f641d5ee2a12747977.js} +1 -1
  41. package/client/_expo/static/js/web/{chapel-ecc6587f6df0296e17d0fc2dd4103be0.js → chapel-5327d6237d842395dbde4fc21ac83a02.js} +1 -1
  42. package/client/_expo/static/js/web/{clarity-d543239d6330f98092f5e889705ed3fb.js → clarity-dc9d11ab59ffa92a6dbd935dd7ff0525.js} +1 -1
  43. package/client/_expo/static/js/web/{cobol-c57a69db2e2be60f8c0f855dfd8a141e.js → cobol-ca2b44632070a86c33173fa484724bdc.js} +1 -1
  44. package/client/_expo/static/js/web/{codeowners-f094d7c5bde36bd4b8de1340e9f2753e.js → codeowners-9baf11ba39b84f5e20e8ef1bce4fc059.js} +1 -1
  45. package/client/_expo/static/js/web/{codeql-eb6c8f1e179daa8ce4293a47cc3e1a8d.js → codeql-2d5d42d1e8fc98ce64e45ef9507ba2e6.js} +1 -1
  46. package/client/_expo/static/js/web/{common-lisp-e429e6d0b651d9bb8b9198bf9c042640.js → common-lisp-e360f08ed2da3b37582088b413a428ed.js} +1 -1
  47. package/client/_expo/static/js/web/{coq-2e4b203c67e94de0542862b10126c41b.js → coq-2400ab3ca38eb6760e18793c7bf8efcd.js} +1 -1
  48. package/client/_expo/static/js/web/{crystal-8db749c37fa425a054f0c8fd2173e33c.js → crystal-8b0822cefafd1526cbca80d2b5abe119.js} +1 -1
  49. package/client/_expo/static/js/web/{cue-5d370a199e1c72323a20afbec35ba6c9.js → cue-9394d983c39094a38de98c82a4b83bbb.js} +1 -1
  50. package/client/_expo/static/js/web/{cypher-5b4d613585056c9fa0a71223b7018ab1.js → cypher-3b5f80344fbdb64af01610e18ceff981.js} +1 -1
  51. package/client/_expo/static/js/web/{d-768bf198eee9288830ebd5857b7b709e.js → d-f482975607f010aff8ba5b523d81043c.js} +1 -1
  52. package/client/_expo/static/js/web/{dark-plus-8efbaa1eeb06bc065204597a49a4c817.js → dark-plus-a7e538ed154d7f58f418c1037c642e21.js} +1 -1
  53. package/client/_expo/static/js/web/{dax-5adb19c303322a5557edb42ce91bffcc.js → dax-4a58beb3b76d04a29d16472c77f1ed4b.js} +1 -1
  54. package/client/_expo/static/js/web/{desktop-a6842704f4c0d83b77b519c61601ca10.js → desktop-63a905c342d34a676b3c7717610531c5.js} +1 -1
  55. package/client/_expo/static/js/web/diff-theme-preview-c9227126480ef59705dc607f1f8e384b.js +1 -0
  56. package/client/_expo/static/js/web/{diff-worker-b7f0838466311e17f09dece725c3751c.js → diff-worker-70234e325b1c1500b5f32495b077685c.js} +5 -5
  57. package/client/_expo/static/js/web/{dotenv-2f5c183cc1dc663a26ed01bbd4a9100a.js → dotenv-90778746ec7c21651b58f0bf064ead98.js} +1 -1
  58. package/client/_expo/static/js/web/{dracula-eecb97e7b36410a96fb803022fd6b8c5.js → dracula-1e521e97ea2f127d617b5a4e50251cae.js} +1 -1
  59. package/client/_expo/static/js/web/{dracula-soft-c37421bf19373d1501a67d19cdff4c2c.js → dracula-soft-072301cf0936d4c9c984aee24d07dd21.js} +1 -1
  60. package/client/_expo/static/js/web/{dream-maker-96e47b6c7716ccb459c77759655af066.js → dream-maker-7b08fee0accb0e107449af8a4654839a.js} +1 -1
  61. package/client/_expo/static/js/web/{edge-6e8c7be3ab99156b52b7fcb369004c80.js → edge-8bc73985f1dd5a7916edf0fa248e164e.js} +1 -1
  62. package/client/_expo/static/js/web/{elm-b0b1de475dbaac917dd19149fa5d441d.js → elm-a180cf62c6e5efa8336aac94f7f674b4.js} +1 -1
  63. package/client/_expo/static/js/web/{emacs-lisp-9cff2aecbf62a1830c5006dca532a4f1.js → emacs-lisp-e128291c148876f7dd5549aecba8a68d.js} +1 -1
  64. package/client/_expo/static/js/web/{erb-031b78fcd931747ecf9ce49dafed67a1.js → erb-92d9a6a3c88badb76aa0920a30d7cd92.js} +1 -1
  65. package/client/_expo/static/js/web/{everforest-dark-e1912e469a04a00fd747bc8b40d6e5d9.js → everforest-dark-48e4f9dfec1d82f63b1516f59696e264.js} +1 -1
  66. package/client/_expo/static/js/web/{everforest-light-f71487bd99881ff31b99f0cb31c8b2c5.js → everforest-light-7ad1adaa47785656e79a6875116084de.js} +1 -1
  67. package/client/_expo/static/js/web/{fennel-28ee9eba0d84aa6e4eef0ba3fe7a4179.js → fennel-c77f797098fb7582de4fb96470da91a6.js} +1 -1
  68. package/client/_expo/static/js/web/{fish-a593031d1709937e59ca81932958155f.js → fish-500cac3a230e581075bbb0a949f6bdb3.js} +1 -1
  69. package/client/_expo/static/js/web/{fluent-2892b395eca9e3efcd02c2dcb29a2bd0.js → fluent-619078f15d73a1a38a415f6f9a96f9e5.js} +1 -1
  70. package/client/_expo/static/js/web/{fortran-fixed-form-eca389c7b742d74213a97276ec031cde.js → fortran-fixed-form-9bfac86b66246d8818eba7077e5a2109.js} +1 -1
  71. package/client/_expo/static/js/web/{gdresource-13b1edf942704452c05651f8d7b2a82c.js → gdresource-3232406db179662be374b5cf32dbd90d.js} +1 -1
  72. package/client/_expo/static/js/web/{genie-74334394e49b534143856b5bf5ad1109.js → genie-4a369ac7d3ae93a2fd2c4c58394dc139.js} +1 -1
  73. package/client/_expo/static/js/web/{gherkin-943953323f4fcc0c4e94c0e38aea6764.js → gherkin-a2eddd2fabe8db965a88faf410e975c6.js} +1 -1
  74. package/client/_expo/static/js/web/{github-dark-67d6d2700d0980eec4ed099e8f20aca9.js → github-dark-55e6ec51c77c75fd1fe2c452b4522831.js} +1 -1
  75. package/client/_expo/static/js/web/{github-dark-default-852bc3f6ba454a19ff7a853b298c497d.js → github-dark-default-9a95e99155d92c5bad455f3637aac0e0.js} +1 -1
  76. package/client/_expo/static/js/web/{github-dark-dimmed-848bfec052e08ccc61b50e1ba0211dae.js → github-dark-dimmed-70f370c6e9845140fcca3ff6bdf29095.js} +1 -1
  77. package/client/_expo/static/js/web/{github-dark-high-contrast-02ad87bc06cf6c6d4a04337ea66fb3fe.js → github-dark-high-contrast-65896af6db1c7b8848df6e57d3ae72b0.js} +1 -1
  78. package/client/_expo/static/js/web/{github-light-aee863509fe4005fb41822fbcfbf4f5d.js → github-light-7ed1b6a767bb54404e2d718f38ad4d97.js} +1 -1
  79. package/client/_expo/static/js/web/{github-light-default-65ebc4810f41b7a01bf124f11a8172e2.js → github-light-default-a411fd333ddd09b17a92763d8a0c710f.js} +1 -1
  80. package/client/_expo/static/js/web/{github-light-high-contrast-196180f150b6ef3cc97a39de2a2b2f8b.js → github-light-high-contrast-cfb5ef5dea35163c3cf9096a5f2550d5.js} +1 -1
  81. package/client/_expo/static/js/web/{gleam-79b91fddec1360ac7f8cf7daea792591.js → gleam-6e7a0fbdf2ef3af2f74ba2a289646667.js} +1 -1
  82. package/client/_expo/static/js/web/{glimmer-js-1f4910e07fa1e22f120f68f68bb3c08a.js → glimmer-js-b201b0d52c2104c86d33d4481b4acbe0.js} +1 -1
  83. package/client/_expo/static/js/web/{glimmer-ts-2097d03c4e69281827288a90a5197d0d.js → glimmer-ts-bbbffff6a8156d82390a611624d28620.js} +1 -1
  84. package/client/_expo/static/js/web/{gn-fafa80e4acc9146d7a25266ac65d7b89.js → gn-7396a6a85ab275f01a27713f2114384b.js} +1 -1
  85. package/client/_expo/static/js/web/{gnuplot-5c59d972041ce9635de890e828dcd7d0.js → gnuplot-d7958bcdc22111e4adad0bc118f126d5.js} +1 -1
  86. package/client/_expo/static/js/web/{gruvbox-dark-hard-d093dcf62f1dd3246281d6ab41798f16.js → gruvbox-dark-hard-8e8c1b9b53c2dc5435ffa622b26ac462.js} +1 -1
  87. package/client/_expo/static/js/web/{gruvbox-dark-medium-2abd600034b3e3a2b441c89d1fe44068.js → gruvbox-dark-medium-589693da088c4c6933160d683ddf335d.js} +1 -1
  88. package/client/_expo/static/js/web/{gruvbox-dark-soft-051c5796a1d88da4a4470b085c65bc49.js → gruvbox-dark-soft-eb176dffc2716f452bc0f6127a202f33.js} +1 -1
  89. package/client/_expo/static/js/web/{gruvbox-light-hard-424ef3a5580340c0dd4eb4e419d3e1a5.js → gruvbox-light-hard-4c9f38b7c44906787dec3b6ae49dc8e2.js} +1 -1
  90. package/client/_expo/static/js/web/{gruvbox-light-medium-e2a70413d829902f52edabf945c7652c.js → gruvbox-light-medium-09723a187d7ca2a89a5ca655077fd0aa.js} +1 -1
  91. package/client/_expo/static/js/web/{gruvbox-light-soft-fe7ba8399ee825f6a29c03134917f108.js → gruvbox-light-soft-8fa4584951d960e5db514dcf6095dca6.js} +1 -1
  92. package/client/_expo/static/js/web/{hack-741ff14fb4368512374e63a5686b5e80.js → hack-71166fae8f80a6673870e088a6f8b4f8.js} +1 -1
  93. package/client/_expo/static/js/web/{haskell-d8925555eed50c8faa3a246b92ea7091.js → haskell-a07434fb3132db42641441d25eb8940e.js} +1 -1
  94. package/client/_expo/static/js/web/{hcl-3a096fdc22197144e0faa83efd496d7f.js → hcl-d5081807f938d995a14825fdfacf4ae1.js} +1 -1
  95. package/client/_expo/static/js/web/{hjson-8ab26f76bf8783d747415819ab7259e4.js → hjson-77681448ab49125a5983c5e80049db7e.js} +1 -1
  96. package/client/_expo/static/js/web/{horizon-7853a4f0bf06efbb6c5da2af76897819.js → horizon-101ff8824156955c3788f10f25de795d.js} +1 -1
  97. package/client/_expo/static/js/web/{horizon-bright-995f5ccd6d4a2e1b69e02004207fb484.js → horizon-bright-e4256129ab2df6dffa3b1d38a41c821e.js} +1 -1
  98. package/client/_expo/static/js/web/{houston-e3d8f813cdd8cf306c9262bdc97877d2.js → houston-f20f1eb7863d9ec8224f4cb67e81b428.js} +1 -1
  99. package/client/_expo/static/js/web/{http-57b4c879ff536e63c328a3ecb10e784e.js → http-8273bed0d695a66b80933572838787c9.js} +1 -1
  100. package/client/_expo/static/js/web/{hurl-500d250085e16ddd5290dadcfdde1aab.js → hurl-17cb1a99e7b0a772ef2adb8a3e574914.js} +1 -1
  101. package/client/_expo/static/js/web/{hxml-7513c7b2821f49dfe514cb49b49568e3.js → hxml-1c093244b5df141cc4da98219a484127.js} +1 -1
  102. package/client/_expo/static/js/web/{hy-e2e07339df61790a24f9b081fff9759f.js → hy-cb7d706c027fc438d125e03812a0e3f2.js} +1 -1
  103. package/client/_expo/static/js/web/{imba-c5beacdd96cef3903009116b1100ed66.js → imba-e71eacabaa3250c2ce2f04223dbec8bf.js} +1 -1
  104. package/client/_expo/static/js/web/{jinja-c068ef212856c97522b6d73e5b92dce2.js → jinja-fee492db3b49a93b38bf4b991c87f1a0.js} +2 -2
  105. package/client/_expo/static/js/web/{jison-d6153f30ec4835a08a689c0d2d09244b.js → jison-f7a3ad3228b14dc1e9b44668e1311646.js} +1 -1
  106. package/client/_expo/static/js/web/{json5-f8dafd6287e97923b2b9a1c1ce878898.js → json5-81ad1c525ad048b21570f85dfaaf2366.js} +1 -1
  107. package/client/_expo/static/js/web/{jsonl-fbbaef3aa7fbc9796e31d1e1fe3c1cad.js → jsonl-3ddff8e61b69f0aaafe6efba19976161.js} +1 -1
  108. package/client/_expo/static/js/web/{jsonnet-e3e1b39c15e76111dd4e84613bccf62b.js → jsonnet-f1e38c886593cf8e4ca75bee3e05b2aa.js} +1 -1
  109. package/client/_expo/static/js/web/{jssm-10f9446c8c358c77e7691ae7f28b5f3f.js → jssm-0a783fc84393abe6c83946f6ea060790.js} +1 -1
  110. package/client/_expo/static/js/web/{just-8bc1bfe7bdefd52a47f21e6b435dcb76.js → just-5c41420c87fe5b6f55e8c6295c90e945.js} +1 -1
  111. package/client/_expo/static/js/web/{kanagawa-dragon-16f4ae1d4fd25abc84e49eba46012955.js → kanagawa-dragon-709d225b688d1046eb698ea8b94072c4.js} +1 -1
  112. package/client/_expo/static/js/web/{kanagawa-lotus-ac4c2129c97d65c65b75a862f09b07cf.js → kanagawa-lotus-89cd670bbab9e6a41aed71a14984dc5a.js} +1 -1
  113. package/client/_expo/static/js/web/{kanagawa-wave-767c26e2b69b21ada102ecd923c87b85.js → kanagawa-wave-fc5be10165df1968e2148b9136c6ccce.js} +1 -1
  114. package/client/_expo/static/js/web/{kdl-b81ef2d3c420ec48e5a0fdf8281013bc.js → kdl-447428e8d1b4d43f86e569631624ad8b.js} +1 -1
  115. package/client/_expo/static/js/web/{kotlin-d6bfd9578918e22d6dfa1d062ed92209.js → kotlin-fffde2cffe6f5298e2853b17302c1156.js} +1 -1
  116. package/client/_expo/static/js/web/{kusto-12f51989b99672e31a3230ebbfe961b5.js → kusto-d1247608d8870735c6c9da5d2dc511b0.js} +1 -1
  117. package/client/_expo/static/js/web/{laserwave-45badd528dd94d751862cca15c4203d9.js → laserwave-3fac33ed71c50f622dfe563d98651250.js} +1 -1
  118. package/client/_expo/static/js/web/{lean-5ac412a8baf5a050e3cda593232e8324.js → lean-6bdc20d02b5983ec5750020911647ba7.js} +1 -1
  119. package/client/_expo/static/js/web/{light-plus-ae803d1c1be4aa2f5d2e66aa6d957d21.js → light-plus-e657f61c43141947e84b0fbc20b8b5e9.js} +1 -1
  120. package/client/_expo/static/js/web/{liquid-16a7f6d037d6caa883ff0fa6e34e4ced.js → liquid-1cd6223178098410fc529d341c8eeeb1.js} +1 -1
  121. package/client/_expo/static/js/web/{llvm-020c858fb8c305e12f04cd47591466f0.js → llvm-9abe0b05d93c73c5f0224c617c5f9e2a.js} +1 -1
  122. package/client/_expo/static/js/web/{logo-5b3ad65c367b09df7f0110b4702319df.js → logo-5a163ecd6d626f8e5ed8a4077579d3d8.js} +1 -1
  123. package/client/_expo/static/js/web/{luau-eebfdab4001c92788be99d32acf4f497.js → luau-12bf324f86fa7baf668cbc63076fb183.js} +1 -1
  124. package/client/_expo/static/js/web/{marko-088cf2eff5354112b15132c81b3bfea0.js → marko-553ea83ca2f36381d39a8bda41e54311.js} +1 -1
  125. package/client/_expo/static/js/web/{material-theme-d691611feaace08a6c1b7775cb0cca88.js → material-theme-5166d33f1b5a30ebaf5d3d3290aa1232.js} +1 -1
  126. package/client/_expo/static/js/web/{material-theme-darker-79c5a137780d2cf5727a38321ab80d64.js → material-theme-darker-13f4ba99d1d561fde3f1b28a6bc7c10a.js} +1 -1
  127. package/client/_expo/static/js/web/{material-theme-lighter-861a07f0b6a2e21d346b98df48ff9abe.js → material-theme-lighter-f952f8c45b9f3191721ba8203239794f.js} +1 -1
  128. package/client/_expo/static/js/web/{material-theme-ocean-3641081bcbedb42f932e6e2fb25fa3c9.js → material-theme-ocean-7ce75ade4179e37d83b03cd0b29dd56b.js} +1 -1
  129. package/client/_expo/static/js/web/{material-theme-palenight-9ac0ddc015df2941d7b8bb3a79248c1d.js → material-theme-palenight-335619fdadb328b9afa23ce676bf9c48.js} +1 -1
  130. package/client/_expo/static/js/web/{matlab-5d90aee4f2a2e6f028feab7a7a623819.js → matlab-84461aabc57774a506c3c4b46fe13f5c.js} +1 -1
  131. package/client/_expo/static/js/web/{mdc-402584995594f461ce0b07aaefc30172.js → mdc-a0cd6f70fa5ec2b4ef376f46c6b4c8d6.js} +1 -1
  132. package/client/_expo/static/js/web/{mdx-e5377ef1fa0fe2ffb1b3822cfc3242a4.js → mdx-0f83459c6aa0863193f2da1fc04b2b20.js} +1 -1
  133. package/client/_expo/static/js/web/{mermaid-522edb82f5413dab4fb73bfb9d45d0fc.js → mermaid-37a6e7ea3261ee8acbab39fd19a07f8d.js} +1 -1
  134. package/client/_expo/static/js/web/{min-dark-7eaa81dd2d281c61eb8e647d4afea43e.js → min-dark-367287bd7dd58074d7d3f218cac750e3.js} +1 -1
  135. package/client/_expo/static/js/web/{min-light-ebb1c5bdae7b8f8a195a117b4ee99db0.js → min-light-aaa01f450a773f07b82c41948aa41812.js} +1 -1
  136. package/client/_expo/static/js/web/{mipsasm-41ec91aa572d7c833f664788f10cc4f7.js → mipsasm-33ee071bad6f1bf17c710ccdc4e46d38.js} +1 -1
  137. package/client/_expo/static/js/web/{mojo-eef08402b9f886b96412b4498102deb8.js → mojo-aa8f3aaf797d33752dfa129c28a6b8e2.js} +1 -1
  138. package/client/_expo/static/js/web/{monokai-bd9568f8ff5d71123df0b5bbea4f850a.js → monokai-e2a95f3ea27155cd88e1858efa8dd33c.js} +1 -1
  139. package/client/_expo/static/js/web/{moonbit-b91b4a8752c337d5b2273333b1804a5b.js → moonbit-78e32abe6cc7c881d341b9eda1c5eb39.js} +1 -1
  140. package/client/_expo/static/js/web/{move-20c7e9d32de2cf5fe3de49f7e1b2789f.js → move-76c6a980b5c687d8cc16d2007612c2f3.js} +1 -1
  141. package/client/_expo/static/js/web/{narrat-a80c5ce69d674df5852b82f69db29a43.js → narrat-26dc3699ad303231b9ab4409cb309e6b.js} +1 -1
  142. package/client/_expo/static/js/web/{nextflow-d4e438f34fab6cc5dfa0035aeaabbb6f.js → nextflow-a109a2a004267d44bd1ef72a2b006aa4.js} +1 -1
  143. package/client/_expo/static/js/web/{nginx-122816f874cd4a787abb5b66fdeec130.js → nginx-ea805a98f1af2900441de4c0994715a0.js} +1 -1
  144. package/client/_expo/static/js/web/{night-owl-30f07b074b58fbcf20839277856b6ade.js → night-owl-65ad45c55948d35b562331b8274d1941.js} +1 -1
  145. package/client/_expo/static/js/web/{night-owl-light-4cf45e7350820fc9b1c7727438addffa.js → night-owl-light-3282d47289b108e80ffea5afaa92bb84.js} +1 -1
  146. package/client/_expo/static/js/web/{nix-69ea2ae75a24644d5c5b6e0a445e4f6d.js → nix-9ba7fca1cb7494643cfb4660fbbb91cb.js} +2 -2
  147. package/client/_expo/static/js/web/{nord-76e3b00d398183f372c031623b1dacf3.js → nord-8f491dcb7d9c99032fd582cc7e4e3597.js} +1 -1
  148. package/client/_expo/static/js/web/{nsis-44b1e69a743b2afeb0ec64f9bc5d9901.js → nsis-e29c8b296a6239a0d58226aa00c59f91.js} +1 -1
  149. package/client/_expo/static/js/web/{nushell-c9cd36c69ec5db528c4db6dd00de1c2a.js → nushell-67c7fd2229b06355b58be59be717dd0b.js} +1 -1
  150. package/client/_expo/static/js/web/{objective-cpp-a52362c7b9ccce99dd0dfac4b7a63a8d.js → objective-cpp-9794abfb5ad71ab3807ee6d3a70a72d2.js} +1 -1
  151. package/client/_expo/static/js/web/{odin-44c535447b690aa0d77ba036c068852e.js → odin-9a3ca372b4d6b5134514d0c632e356a2.js} +1 -1
  152. package/client/_expo/static/js/web/{one-dark-pro-b51b692455010e20ccaaaa654ea5a385.js → one-dark-pro-b34fc0dc2af92d0d61665166edced909.js} +1 -1
  153. package/client/_expo/static/js/web/{one-light-4d89f0b9cda956af9b4d5f51bc09097e.js → one-light-1ca65343c827c65ead58291635eb61fa.js} +1 -1
  154. package/client/_expo/static/js/web/{openscad-5ec6c694fdbb50f8fea2d65102aa6cd7.js → openscad-205ae321a013394a57ae55c8453a61bc.js} +1 -1
  155. package/client/_expo/static/js/web/{org-d738b1bc1e99cf4b05be8f418a1e7c94.js → org-9b940a47a0d260622752a7de8ea032a3.js} +1 -1
  156. package/client/_expo/static/js/web/{pascal-631adcc5411f436fae301c65633017f8.js → pascal-c565618b9e42059509b145a8772f9515.js} +1 -1
  157. package/client/_expo/static/js/web/{pierre-dark-e4cd7da1462852b4fe741289c191863b.js → pierre-dark-523b1db73e2769b703d7d7198cfed266.js} +1 -1
  158. package/client/_expo/static/js/web/{pierre-dark-protanopia-deuteranopia-46e88d22571b58c36d9e4a63c794d97e.js → pierre-dark-protanopia-deuteranopia-fbf069ad47bceb6cbcfa79e25e1ff5b5.js} +1 -1
  159. package/client/_expo/static/js/web/{pierre-dark-soft-114e4550d5ead7b15b5f58aa59f638d1.js → pierre-dark-soft-f88457a740f776f737b23b019de88646.js} +1 -1
  160. package/client/_expo/static/js/web/{pierre-dark-tritanopia-572ab36b2062841e8bd376e7632fc3b6.js → pierre-dark-tritanopia-3f2ce99bef32b2ffd9107991d3f9184b.js} +1 -1
  161. package/client/_expo/static/js/web/{pierre-dark-vibrant-ccc0accb393617a0d51cda253e67e498.js → pierre-dark-vibrant-c26349565320879c5006619d9a44ffb2.js} +1 -1
  162. package/client/_expo/static/js/web/{pierre-light-286ce1059deb32357cebfd5b6d0de5db.js → pierre-light-2ec9bdde0a4243d51deb112bb8e6a929.js} +1 -1
  163. package/client/_expo/static/js/web/{pierre-light-protanopia-deuteranopia-0f16990b1e641da1e79274563b969fd5.js → pierre-light-protanopia-deuteranopia-34680663bc05fc95865a29002f64baf2.js} +1 -1
  164. package/client/_expo/static/js/web/{pierre-light-soft-4911d52ee8434e95c5efce251c72019e.js → pierre-light-soft-61e14b62a2757f5f14c233c4f06ad4df.js} +1 -1
  165. package/client/_expo/static/js/web/{pierre-light-tritanopia-53760e9200ef38c0a5cb8f5b2094d627.js → pierre-light-tritanopia-0d21a1d51a9f77877850eb57a0783fde.js} +1 -1
  166. package/client/_expo/static/js/web/{pierre-light-vibrant-d09f62ed235dc5b05ac8d16e7dbc05d7.js → pierre-light-vibrant-09452f1ad4566081f9e80d1289bc04ed.js} +1 -1
  167. package/client/_expo/static/js/web/{pkl-35dc1cebaaa8f2be40084fbf22e611f8.js → pkl-16ce61ca355963ccc212e5ea98a89b1b.js} +1 -1
  168. package/client/_expo/static/js/web/{plastic-2e497d0fb45790b8c5330cfc4e9df676.js → plastic-543269a42ae44e61394c0cb4dc7d8ae5.js} +1 -1
  169. package/client/_expo/static/js/web/{plsql-5f0006ab5797d24e968231360a18bbfe.js → plsql-2e3590aea074f59c8a30844a6c8608ee.js} +1 -1
  170. package/client/_expo/static/js/web/{po-9940da5d989b562c26df29713751c0b2.js → po-b0e50bc628c9f47d0c76a3d935c7d124.js} +1 -1
  171. package/client/_expo/static/js/web/{poimandres-1c7638b17564aeacf97f6aa7c31d2094.js → poimandres-1d17bada934d6fcb58ae2bf94514ea77.js} +1 -1
  172. package/client/_expo/static/js/web/{polar-536f243d5dc5de0a5f82fccffc472d7d.js → polar-1dffbc6305eb98d800be6162b091116d.js} +1 -1
  173. package/client/_expo/static/js/web/{powerquery-f2895b08e2d47ec76926718a2b1ec52b.js → powerquery-ed97159d4ec556774e274e0ce9aea4f8.js} +1 -1
  174. package/client/_expo/static/js/web/{prisma-5e8bdc66d59774abae66404742dc639f.js → prisma-303a556424858f198538d4245b50ac4e.js} +1 -1
  175. package/client/_expo/static/js/web/{prolog-d26809df5beda5b44f6e2d40cf267732.js → prolog-88979484ae212b7ddaf1ca5120b12d79.js} +1 -1
  176. package/client/_expo/static/js/web/{proto-d512cc6c62da98fbc35e710a33b8ff65.js → proto-67b23a5f650d4d3595cf368e99e1b3c4.js} +1 -1
  177. package/client/_expo/static/js/web/pull-request-diff-tree-e8d8e1159210923e19b43d9e7e18a9f4.js +73 -0
  178. package/client/_expo/static/js/web/pull-request-diff-viewer-a7e98be6fd208bfd0c5ab76509220f7f.js +5 -0
  179. package/client/_expo/static/js/web/{puppet-e56c9fd9ed8c3499ef6837f151280ea5.js → puppet-a5454a78b181c5b46159af43c0d00357.js} +1 -1
  180. package/client/_expo/static/js/web/{purescript-fb351352914738eaf496e177c23047e2.js → purescript-b6def9b2c575e461a567631f1c3548a5.js} +1 -1
  181. package/client/_expo/static/js/web/{qml-baf3a5e90488cf7ea8de4291ca9077ef.js → qml-e0e67324462b51671ebf30f91e3e79fd.js} +1 -1
  182. package/client/_expo/static/js/web/{qmldir-9c30979faddb027febfda0dd11d5bd1c.js → qmldir-5a5ae383737bfa7b7f33752356bf8426.js} +1 -1
  183. package/client/_expo/static/js/web/{qss-cd406fcf69c48198d2076b13540464ee.js → qss-70264a032f26510ffcb3e46584e66449.js} +1 -1
  184. package/client/_expo/static/js/web/{racket-c99848afde907e0760bef4ce1ef71dfb.js → racket-3c2091096f1e2f18b6c920bf7f804a5e.js} +1 -1
  185. package/client/_expo/static/js/web/{razor-292d924a75ff36778291011c016a1b57.js → razor-ca6931a33a0a98010043e8a720ebc502.js} +1 -1
  186. package/client/_expo/static/js/web/{rbs-58f0736b406f70faa7a04b95c080c2ba.js → rbs-0488fce4601875d269b7aea8c18266ec.js} +1 -1
  187. package/client/_expo/static/js/web/{red-1f89277b65ca53154645e670088de774.js → red-37cbc90755a24007895361447b24598a.js} +1 -1
  188. package/client/_expo/static/js/web/{reg-5202ff3a1e37bdd5916bf617d50b6534.js → reg-13a39fd1ecb78ff99ea56d6683d10a1d.js} +1 -1
  189. package/client/_expo/static/js/web/{rel-d62e4fd3ead02996a8c14c03cb4c3b04.js → rel-0a44a9eb56b90858b45b194192acc29c.js} +1 -1
  190. package/client/_expo/static/js/web/reviewflow-diff-themes-a0e7cb9a34cdf67a8b3d3b0c903926a1.js +1 -0
  191. package/client/_expo/static/js/web/{riscv-bd4e42bb7b9dad9aa613e351c25d9508.js → riscv-dbb7c2829c1b84033bab4cf90889c1b8.js} +1 -1
  192. package/client/_expo/static/js/web/{ron-3538d449bff8091a0d7d4b622c3ecdea.js → ron-8343e74681223fdb4861bae67ac440b5.js} +1 -1
  193. package/client/_expo/static/js/web/{rose-pine-4215d61d54c23918ebf8dee8165f5ad9.js → rose-pine-0e92dc4f01294c84ea085918628f98f2.js} +1 -1
  194. package/client/_expo/static/js/web/{rose-pine-dawn-f9173373dddc074d10012a3bc28154e0.js → rose-pine-dawn-7cb8e90bba38cb32ef5ee82f7d41c11b.js} +1 -1
  195. package/client/_expo/static/js/web/{rose-pine-moon-3dfcf6693bcbadc26f2e83a52fc3739b.js → rose-pine-moon-61242d263ab5c7bbf9d8042036eab34f.js} +1 -1
  196. package/client/_expo/static/js/web/{rosmsg-e6fdc5f23a72e574e0b70ecb103a0ffc.js → rosmsg-a0e514434a55fbe8a467fafe7a92be86.js} +1 -1
  197. package/client/_expo/static/js/web/{rst-5fbf85b0528f3237d2b26c0b3fddfffc.js → rst-cd73ab4fc883d1ba4012f57157cbbec8.js} +1 -1
  198. package/client/_expo/static/js/web/{sas-ce0b7778b88c027bf5c6cbcc7cf9faa9.js → sas-a7400b0f6cdf05663c3e16d641cde499.js} +1 -1
  199. package/client/_expo/static/js/web/{sass-24c0b54022c4ed838728d4959aa7e07c.js → sass-ff59737ad676fd4258b86f317a2a35f9.js} +1 -1
  200. package/client/_expo/static/js/web/{scheme-e3fecd19bb25a4c316d4280051de9db1.js → scheme-804b675a4fbbcb49fde1066087d36485.js} +1 -1
  201. package/client/_expo/static/js/web/{shaderlab-850c47c05f4ea22d89ea36a075397a70.js → shaderlab-ceaa71b5bec4bbd31fd7e999c9ec47dc.js} +1 -1
  202. package/client/_expo/static/js/web/{shellsession-742f72a9dabdd4ea97261401cbbc5a32.js → shellsession-5551a0feb7f9fafdec65a34d03f43fe5.js} +1 -1
  203. package/client/_expo/static/js/web/{slack-dark-7c948e3333f9c227b4c9335876685335.js → slack-dark-789df38546731cb305c09a73cd91143f.js} +1 -1
  204. package/client/_expo/static/js/web/{slack-ochin-5273f8fac997ed9b28fcf609ad724235.js → slack-ochin-b62308b92b49c8ac340d0a6b3a43140d.js} +1 -1
  205. package/client/_expo/static/js/web/{smalltalk-21f9b0351a75ea1518a646e3025ed3d0.js → smalltalk-20c64cd2d8de4ed6cfc6e4e59a653a9c.js} +1 -1
  206. package/client/_expo/static/js/web/{smithy-db5ff52f9d2ee9434d05812d71d42c86.js → smithy-3b8cac9a864f76fc16648aca42b409d0.js} +1 -1
  207. package/client/_expo/static/js/web/{snazzy-light-28bda9577aa06b400d103778f0bd8eb4.js → snazzy-light-b95a55a39fcbf8a2fb749c8cd72b6d01.js} +1 -1
  208. package/client/_expo/static/js/web/{solarized-dark-70bc90aa98ddfc224de066877686c33e.js → solarized-dark-d602c6f13b5d22a3b9c089ba8ab5dc20.js} +1 -1
  209. package/client/_expo/static/js/web/{solarized-light-0653372b053411837650543284957bd7.js → solarized-light-8ff3caa0e783c6b9c7f03e0b44717c7c.js} +1 -1
  210. package/client/_expo/static/js/web/{solidity-f6a275ab1513d3a2f4b43ea1a7d206d7.js → solidity-16e2515b497f51fd5601f1c38da51e8b.js} +1 -1
  211. package/client/_expo/static/js/web/{soy-5caabeefcf08fb97c03ffdb7c00b6df2.js → soy-e3be0e30baf39d4def047f4853a41445.js} +1 -1
  212. package/client/_expo/static/js/web/{sparql-437b5b88fcac5afdd07c6fca6b0e08c7.js → sparql-32469a0ca638a69e240367f2e2f4427a.js} +1 -1
  213. package/client/_expo/static/js/web/{splunk-c5acc3ed729dc0a3655dcc2043006dea.js → splunk-b85a0d7f9017a8d03268b884ec3a7552.js} +1 -1
  214. package/client/_expo/static/js/web/{ssh-config-db333f5eb25667aea9bd61553f3d6e97.js → ssh-config-da103d2f93f3bf74e5fa0e53c69d44cb.js} +1 -1
  215. package/client/_expo/static/js/web/{stata-ef0ff801fceefcac00df8da1da32c6c7.js → stata-267a78f4fb1f8d729fb6c2a32d3da6a9.js} +1 -1
  216. package/client/_expo/static/js/web/{surrealql-545a9306f965e5a1ed822aafc281a724.js → surrealql-7c80a6eb761edcf02b619926af0cab24.js} +1 -1
  217. package/client/_expo/static/js/web/{svelte-492f428cd4092777760140bd281be264.js → svelte-2702f9614e69656cfe9ac42869c79513.js} +1 -1
  218. package/client/_expo/static/js/web/{synthwave-84-c48f7924d1c41fc97a933fa3d2ce8039.js → synthwave-84-26ff933249cae5700819d17b436dd0ba.js} +1 -1
  219. package/client/_expo/static/js/web/{systemd-358d760f94953ed82fe7d66c91cdb3b6.js → systemd-c4521ad3a8a263637f954b35403e30a0.js} +1 -1
  220. package/client/_expo/static/js/web/{talonscript-fb44c0a25815bf97764179ee839118c4.js → talonscript-77e846352186ff201be4e726bc3e6726.js} +1 -1
  221. package/client/_expo/static/js/web/{tasl-cdd8b4eda1ec7d03b5c8e3f6684030f4.js → tasl-8afa609fdccdb5d3d86fe89c5460765b.js} +1 -1
  222. package/client/_expo/static/js/web/{tcl-5f9ddf22ff9e039754f069b5a7886c83.js → tcl-388b4eb8b4c89554bce0d9dd3568f8f5.js} +1 -1
  223. package/client/_expo/static/js/web/{templ-66ff1d6e31c1060ae22bca697eb62b62.js → templ-968966b129140621b61b21785c3198bb.js} +1 -1
  224. package/client/_expo/static/js/web/{terraform-fab275e5a64ae65b9abd9bed86990629.js → terraform-fdc251ecef43c8e24e908b74e7e2f00c.js} +1 -1
  225. package/client/_expo/static/js/web/{tokyo-night-d2d0895c47dd694142a5e67ac0168a22.js → tokyo-night-d1aa090362c18d1d5d74a74fca898dfe.js} +1 -1
  226. package/client/_expo/static/js/web/{toml-f3ce877af33e49aed0d30f47d5c22660.js → toml-ca15fde86642f72feeb7d7c9188d9f51.js} +1 -1
  227. package/client/_expo/static/js/web/{ts-tags-d2a3724ce898cf3faeb0d0b780aed1b9.js → ts-tags-f533eba2db73e18cebed7046b1be53d9.js} +6 -6
  228. package/client/_expo/static/js/web/{tsv-152b42c14a6479077e649b4b75d6340e.js → tsv-5890117927240fc2095272f0a68b5079.js} +1 -1
  229. package/client/_expo/static/js/web/{typespec-71b5bf68eeb6dc3da7b138062462be4c.js → typespec-a9d0556ba9b784ae22d03bbf97d50529.js} +1 -1
  230. package/client/_expo/static/js/web/{typst-b54901ec5c7cf65e199402d878189e3b.js → typst-89f7ea3665628a8ebe7486d4d4917489.js} +1 -1
  231. package/client/_expo/static/js/web/{v-4d8c1cbf4becfea4213de9e4738e3fca.js → v-6e77391c446c3ef6fda1f20d99ecef2e.js} +1 -1
  232. package/client/_expo/static/js/web/{vala-c9ac96911c1a5dcf44074303805b5b06.js → vala-406f769c1fc988d559c17f7cd8b78a6b.js} +1 -1
  233. package/client/_expo/static/js/web/{vesper-c20f28343a0d43999b97548858f7b11f.js → vesper-6c77aca86b4f35d5f9b9e7b3c2dbd791.js} +1 -1
  234. package/client/_expo/static/js/web/{vhdl-1ab74f9a9920eda21f7276af6a1ab176.js → vhdl-f08dc57e0f0ce6fdf2437a4d68f7934a.js} +1 -1
  235. package/client/_expo/static/js/web/{viml-6b66a6c22cebe05775e92087033e95a3.js → viml-e4dd48f57bc8687dd44fd51749c1a6a8.js} +1 -1
  236. package/client/_expo/static/js/web/{vitesse-black-8643c070fae86be9164c8b471e13935a.js → vitesse-black-add6f6ab191f5f6255ada93e18d5627c.js} +1 -1
  237. package/client/_expo/static/js/web/{vitesse-dark-5d0643f35aa5bc9a82af1de69ec8fd45.js → vitesse-dark-4c1ac96701240c173cbe2de209bb6523.js} +1 -1
  238. package/client/_expo/static/js/web/{vitesse-light-fc7c2693080913234e3ed41cfbadd4de.js → vitesse-light-8338524e68c5eed1b442a6be72cfdc6b.js} +1 -1
  239. package/client/_expo/static/js/web/{vue-1c802df5d8ef4b58fd74b501e685dbe8.js → vue-304d58f1806ae9127cfb8dfe8627c9e2.js} +5 -5
  240. package/client/_expo/static/js/web/{vue-html-568322337823edb0fe58d7a29c6d0d0c.js → vue-html-a681e3fc5392feec40098d4f9c37e8f7.js} +1 -1
  241. package/client/_expo/static/js/web/{vue-vine-ee75d1d803ed485990576ae40b053aa5.js → vue-vine-407d7545cec3d3cc13187ee22694c676.js} +1 -1
  242. package/client/_expo/static/js/web/{vyper-5494c7c332db25ceb8e9e739b526dd7e.js → vyper-da913bf303b960b1f6aed6ddbd774aef.js} +1 -1
  243. package/client/_expo/static/js/web/{wasm-8d1dc2d5e47ed2868d4a7989a7d2d046.js → wasm-295026821c54ecf9b4c855e0a011b0d5.js} +1 -1
  244. package/client/_expo/static/js/web/{wasm-B9ZqxnKj-27616270c19c1db790eb714bb283eafa.js → wasm-B9ZqxnKj-2f19dbc959bc7f4760f6ad5c45c05a79.js} +1 -1
  245. package/client/_expo/static/js/web/{wasm-8e559c711833716a87b3a6d463949a3f.js → wasm-ca6dbcb46b9be37d56623c9b7d1098ff.js} +2 -2
  246. package/client/_expo/static/js/web/{wenyan-b5be3fd49d29b67f88bc19f45f1df861.js → wenyan-e784d41c3440569972e99d4171233172.js} +1 -1
  247. package/client/_expo/static/js/web/{wgsl-e663bf311a25b8bb8a66a89f18c28cd0.js → wgsl-69878295dc2966642a5ae08e8a1d96da.js} +1 -1
  248. package/client/_expo/static/js/web/{wikitext-dc6a65e659426ac05e1b75662a2c7fc8.js → wikitext-adf14174cfcbbe805e0a228ea7dd4872.js} +1 -1
  249. package/client/_expo/static/js/web/{wit-9e5c50f4849d35eaa6532d681a03da50.js → wit-3f3d75dbb9395afec717fe84d13a998c.js} +1 -1
  250. package/client/_expo/static/js/web/{wolfram-3ea4b948a43c65c32e1557bc9418dd08.js → wolfram-b92b73cad7abe8a48c89536e1a99475f.js} +1 -1
  251. package/client/_expo/static/js/web/{zenscript-01d906e3bbb9926e2675b70ea3cfee28.js → zenscript-120150b12704596c9dcc0ce857757c40.js} +1 -1
  252. package/client/index.html +5 -4
  253. package/package.json +2 -2
  254. package/client/_expo/static/css/global-3568a12353da04e86e0e4e66ce71ba3a.css +0 -2
  255. package/client/_expo/static/css/markdown-editor-d136c3bf58017f1b41842876da69354a.css +0 -1
  256. package/client/_expo/static/js/web/pull-request-diff-viewer-56a3ba3355efeb9f4c322fde6c99eb78.js +0 -350
@@ -1,350 +0,0 @@
1
- __d(function(g,r,i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return ae}});var t=e(r(d[0])),n=e(r(d[1])),a=r(d[2]),s=r(d[3]),o=r(d[4]),l=r(d[5]),c=r(d[6]),p=r(d[7]),h=r(d[8]),u=r(d[9]),f=r(d[10]),x=r(d[11]),w=r(d[12]),v=r(d[13]),j=r(d[14]),y=r(d[15]),b=r(d[16]),C=r(d[17]),N=r(d[18]),k=r(d[19]);const S=e=>e.name,T=(e,t)=>{if(void 0===t)return[];const n=new Map,a=(e,t,a)=>{const s=(0,C.annotationSideOf)(e),o=`${s}:${String(t)}`,l=n.get(o);void 0===l?n.set(o,{side:s,lineNumber:t,metadata:{items:[a]}}):l.metadata.items.push(a)};for(const e of t.threads)null!==e.line&&a(e.side,e.line,{kind:"thread",thread:e});for(const e of t.pending)a(e.side,e.line,{kind:"pending",comment:e});const{composer:s}=t;return s?.fileKey===S(e)&&a(s.anchor.side,s.anchor.line,{kind:"composer",anchor:s.anchor,suggestionLines:(0,C.rightSideLines)(e,s.anchor)}),[...n.values()]},F=(e,t)=>"thread"===e.kind?"thread"===t?.kind&&e.thread===t.thread:"pending"===e.kind?"pending"===t?.kind&&e.comment===t.comment:"composer"===t?.kind&&e.anchor===t.anchor,V=(e,t)=>{const[n,a]=(0,u.useState)({file:e,annotations:t}),s=n.file===e&&(o=n.annotations,l=t,o.length===l.length&&o.every((e,t)=>{const n=l[t];return void 0!==n&&e.side===n.side&&e.lineNumber===n.lineNumber&&e.metadata.items.length===n.metadata.items.length&&e.metadata.items.every((e,t)=>F(e,n.metadata.items[t]))}));var o,l;return s||a({file:e,annotations:t}),s?n.annotations:t},$=e=>(0,o.pluralOf)(e,"comment"),P=(e,t)=>"changedSince"===e?`${$(t)} on code changed since your review started`:"whitespace"===e?`${$(t)} on lines hidden with whitespace changes`:(0,o.pluralOf)(t,"outdated comment"),O=(e,{path:t,line:n,originalLine:a})=>"changedSince"===e&&null!==n?`On line ${String(n)} of the latest version`:"whitespace"===e&&null!==n?`On line ${String(n)} of ${t}`:null===a?"Line no longer in the diff":`Was on line ${String(a)}`;function E({kind:e,threads:t,onEdit:n}){const[a,s]=(0,u.useState)(!1);if(0===t.length)return null;const o=t.reduce((e,t)=>e+t.commentsTotal,0);return(0,k.jsxs)(l.View,{className:"gap-xs",children:[(0,k.jsx)(l.View,{className:"flex-row items-center gap-xs",children:(0,k.jsx)(l.Button,{size:"sm",accent:"neutral",variant:"soft",text:P(e,o),onPress:()=>{s(!a)}})}),a?t.map(t=>(0,k.jsxs)(l.View,{className:"gap-xxs",children:[(0,k.jsx)(l.Text,{className:"text-xs text-muted",children:O(e,t)}),(0,k.jsx)(j.ThreadAnnotation,{thread:t,onEdit:n})]},t.id)):null]})}function R({threads:e,pending:t,onEdit:n,draft:a}){return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(E,{kind:"whitespace",threads:e,onEdit:n}),t.map(e=>(0,k.jsxs)(l.View,{className:"gap-xxs",children:[(0,k.jsx)(l.Text,{className:"text-xs text-muted",children:`Pending, on line ${String(e.line)} of ${e.path}, hidden with whitespace changes`}),(0,k.jsx)(j.PendingAnnotation,{comment:e,draft:a})]},e.key))]})}function M({accent:e,children:t}){return(0,k.jsx)(l.View,{children:(0,k.jsx)(l.Badge,{accent:e,size:"sm",children:t})})}function L({anchoring:e}){return"commit"===e?(0,k.jsx)(M,{accent:"info",children:"Changed again in a later commit"}):"head"===e?(0,k.jsx)(M,{accent:"info",children:"Also changed in an earlier commit"}):null}function I({viewed:e,locked:t}){return t?(0,k.jsx)(M,{accent:"warning",children:"Changed since your review started"}):"dismissed"===e?(0,k.jsx)(M,{accent:"warning",children:"Changed since viewed"}):null}const A=(e,t,n)=>async a=>{const s=a.prevName??a.name,[o,l]=await Promise.all(["rename-pure"===a.type?null:n(e,t.old,s),n(e,t.new,a.name)]),c={name:a.name,contents:l};return null===o?{oldFile:null,newFile:c}:{oldFile:{name:s,contents:o},newFile:c}},q="1rem",D=`:host { border-radius: ${q}; overflow: clip; box-shadow: inset 0 1px 2px var(--color-shadow-highlight, #ffffff40), 0 1px 2px var(--color-dark-shadow, #00000040), 0 2px 4px var(--color-soft-shadow, #00000025); }`,W=(e,t)=>{null!==e&&(0,N.revealTopOf)(e,t)};function z({impacts:e}){const t=(0,y.countImpacts)([e]),n=t.files+t.tests<=y.maxImporterNames;return(0,k.jsxs)(l.View,{className:"gap-sm p-xs",children:[(0,k.jsx)(l.Text,{className:"font-body-bold text-sm text-sharp",children:`${(0,o.pluralOf)(t.exports,"touched export")} used outside the diff`}),(0,k.jsxs)(l.View,{className:"gap-sm",children:[e.exports.map(t=>(0,k.jsxs)(l.View,{className:"gap-xxs",children:[(0,k.jsxs)(l.View,{className:"flex-row flex-wrap items-center gap-xs",children:[(0,k.jsx)(l.Code,{className:"text-sm",children:t.name}),t.removed?(0,k.jsx)(l.Badge,{size:"sm",accent:"warning",children:"removed"}):null,n?null:(0,k.jsx)(l.Text,{className:"text-xs text-muted",children:`used in ${(0,y.usageLabel)((0,y.countImpacts)([{path:e.path,exports:[t]}]))}`})]}),n?t.importers.map(({path:e,test:t})=>(0,k.jsxs)(l.Text,{className:"pl-m text-xs",children:[e,t?(0,k.jsx)(l.Text,{className:"text-xs text-muted",children:" \xb7 test"}):null]},e)):null]},t.name)),n?null:(0,k.jsx)(l.Text,{className:"text-xs text-muted",children:`Files are left out past ${String(y.maxImporterNames)}.`})]})]})}function B({impacts:e}){const t=(0,u.useRef)(null),[n,a]=(0,u.useState)(!1),s=(0,y.countImpacts)([e]);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(l.View,{ref:t,children:(0,k.jsx)(l.PressableBox,{variant:"soft",accent:"info","aria-haspopup":"dialog","aria-expanded":n,className:"flex-row items-center gap-xxs rounded-full border border-border-muted px-xs py-xxs",onPress:()=>{a(!n)},children:(0,k.jsxs)(l.AccentScope,{accent:"info",children:[(0,k.jsx)(l.Icon,{icon:(0,k.jsx)(h.ShareNetworkRegularIcon,{}),size:12,className:"text-accent"}),(0,k.jsx)(l.Text,{className:"font-body-bold text-xs text-accent",children:`Used in ${(0,y.usageLabel)(s)}`})]})})}),(0,k.jsx)(l.Popover,{open:n,anchorRef:t,align:"end",width:"content","aria-label":`Users of ${e.path}`,onClose:()=>{a(!1)},children:(0,k.jsx)(l.View,{className:"pt-xs",children:(0,k.jsx)(l.Box,{className:"surface-popover max-h-[60vh] max-w-[640px] overflow-y-auto",children:(0,k.jsx)(z,{impacts:e})})})})]})}function _({entry:e,impacts:t,review:n,onViewedPress:a}){return(0,k.jsxs)(l.View,{className:"flex-row items-center gap-xs",children:[e?(0,k.jsx)(M,{accent:"info",children:"Entry point"}):null,void 0===t?null:(0,k.jsx)(B,{impacts:t}),!0===t?.exports.some(({removed:e})=>e)?(0,k.jsx)(M,{accent:"warning",children:"Removed export"}):null,(0,k.jsx)(L,{anchoring:n?.anchoring??null}),!0===n?.ofPullRequest?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(I,{viewed:n.viewed,locked:n.viewedLocked}),(0,k.jsx)(l.Checkbox,{label:"Viewed",checked:"viewed"===n.viewed,disabled:n.viewedLocked,onValueChange:a})]}):null]})}const H=(e,t)=>{if(null===e)return"";const n="shown"===e.phase?`inset 0 0 0 2px ${e.color}, inset 0 0 0 999px color-mix(in srgb, ${e.color} 14%, transparent)`:"inset 0 0 0 2px transparent, inset 0 0 0 999px transparent";return`[data-diffs-header] { border-radius: ${t?q:`${q} ${q} 0 0`}; box-shadow: ${n}; transition: box-shadow var(--motion-duration-collapse) ease-out; }`};function U({file:e,diffStyle:t,theme:n,themeType:a,wordWrap:o,stickyTop:h,collapsed:f,onToggleCollapsed:x,loadFiles:v,entry:y,impacts:N,review:F}){const $=S(e),P=V(e,T(e,F)),O=!0===F?.commentable,M=(0,u.useRef)(()=>{});(0,u.useLayoutEffect)(()=>{M.current=t=>{if(void 0===F)return;const n=(0,C.anchorOfRange)(e.name,t),a="LEFT"===n.side||"LEFT"===n.startSide;F.rightOnly&&a||F.onOpenComposer({fileKey:$,anchor:n,range:t})}});const L=(0,u.useCallback)(e=>{M.current(e)},[]),I=(0,u.useRef)(null),A=(0,b.useDiffFileElements)(),q=(0,b.useDiffFileHighlight)($),z=(0,u.useCallback)(e=>{I.current=e;const t=A?.register($,e);return()=>{I.current=null,t?.()}},[A,$]),B=()=>{f||W(I.current,h)};return(0,k.jsxs)(l.View,{ref:z,className:"gap-xs",children:[void 0===F?null:(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(E,{kind:"outdated",threads:F.outdated,onEdit:F.onEdit}),(0,k.jsx)(E,{kind:"changedSince",threads:F.changedSince,onEdit:F.onEdit}),(0,k.jsx)(R,{threads:F.hiddenThreads,pending:F.hiddenPending,draft:F.draft,onEdit:F.onEdit})]}),(0,k.jsx)(s.FileDiff,{fileDiff:e,lineAnnotations:P,selectedLines:F?.composer?.fileKey===$?F.composer.range:null,options:{diffStyle:t,theme:(0,w.diffThemeNames)(n),themeType:a,overflow:o?"wrap":"scroll",collapsed:f,stickyHeader:!0,unsafeCSS:`${U=h,`[data-diffs-header][data-sticky] { top: ${String(U)}px; }`} [data-diffs-header=default] { padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback)); } ${D} @supports not (-moz-appearance: none) { [data-code] { scrollbar-width: auto; scrollbar-color: auto; } } ${H(q,f)}`,loadDiffFiles:v,enableGutterUtility:O,onGutterUtilityClick:O?L:void 0},renderHeaderPrefix:()=>(0,k.jsx)(l.IconButton,{icon:f?(0,k.jsx)(p.CaretRightRegularIcon,{}):(0,k.jsx)(c.CaretDownRegularIcon,{}),size:"sm",variant:"soft",accent:"neutral","aria-label":f?`Open ${e.name}`:`Close ${e.name}`,"aria-expanded":!f,onPress:()=>{B(),x()}}),renderHeaderMetadata:y||void 0!==N||!0===F?.ofPullRequest||null!==(F?.anchoring??null)?()=>(0,k.jsx)(_,{entry:y,impacts:N,review:F,onViewedPress:e=>{e&&B(),F?.onViewed(e)}}):void 0,renderAnnotation:({metadata:e})=>(0,k.jsx)(l.View,{children:e.items.map(e=>void 0===F?null:"thread"===e.kind?(0,k.jsx)(j.ThreadAnnotation,{thread:e.thread,onEdit:F.onEdit},e.thread.id):"pending"===e.kind?(0,k.jsx)(j.PendingAnnotation,{comment:e.comment,draft:F.draft},e.comment.key):(0,k.jsx)(j.ComposerAnnotation,{anchor:e.anchor,suggestionLines:e.suggestionLines,commitId:F.commitId,draft:F.ofPullRequest&&F.reviewable?F.draft:null,onEdit:F.onEdit,onClose:F.onCloseComposer},"composer"))})})]});var U}const G=e=>({file:e,entry:!1,attached:[]}),K=(e,t)=>{const n=new Map;for(const{name:e,paths:a}of t)for(const t of a)n.set(t,e);const a=new Map(t.map(({name:e})=>[e,[]]));for(const t of e){const e=n.get(t.name)??"",s=a.get(e);void 0===s?a.set(e,[t]):s.push(t)}return[...a].filter(([,e])=>e.length>0).map(([e,t])=>({name:e,items:t.map(G)}))},J=(e,t,n)=>{const a=new Map(e.map(e=>[e.name,e])),s=new Set,o=e=>{const t=a.get(e);return void 0===t||s.has(e)?[]:(s.add(e),[t])},l=n.groups.map(({name:e,files:t})=>({name:e,items:t.flatMap(({path:e,entry:t,attached:n})=>o(e).map(e=>({file:e,entry:t,attached:n.flatMap(o)})))}));for(const n of K(e.filter(e=>!s.has(e.name)),t)){const e=l.find(({name:e})=>e===n.name);void 0===e?l.push(n):e.items.push(...n.items)}return l.filter(({items:e})=>e.length>0)},Q=({file:e,attached:t})=>[e,...t];function X({groups:e,renderFile:t}){return(0,k.jsx)(l.View,{className:"gap-xxl",children:e.map(e=>{const n=e.items.flatMap(Q).length;return(0,k.jsxs)(l.View,{className:"gap-sm",children:[(0,k.jsxs)(l.View,{className:"flex-row items-baseline gap-sm",children:[(0,k.jsx)(l.Text,{role:"heading","aria-level":2,className:"font-heading-bold text-xl",children:""===e.name?"Root":e.name}),(0,k.jsx)(l.Text,{className:"text-sm text-muted",children:1===n?"1 changed file":`${String(n)} changed files`})]}),(0,k.jsx)(l.View,{className:"gap-m",children:e.items.map(({file:e,entry:n,attached:a})=>(0,k.jsxs)(l.View,{className:"gap-xs",children:[t(e,{entry:n,attached:!1}),0===a.length?null:(0,k.jsx)(l.View,{className:"ml-l gap-xs",children:a.map(e=>(0,k.jsx)(l.View,{children:t(e,{entry:!1,attached:!0})},S(e)))})]},S(e)))})]},e.name)})})}const Y=(e,t)=>null!=e&&(null===e.paths||e.paths.has(t)),Z=(e,t)=>Y(e,t.path)||!0===e?.baseMoved&&"LEFT"===t.side,ee=(e,t)=>void 0===e?t??"unviewed":e?"viewed":"unviewed";function te({groups:e,review:a,whitespace:s,diffStyle:o,theme:c,themeType:p,wordWrap:h,stickyTop:f,collapse:w,loadFiles:v,impactsOf:j,commitComposer:y,onCommitComposerChange:b}){const N=(0,x.usePullRequestReviewDraft)(),S=e=>void 0!==a.commitOid?"commit":void 0===a.commitFiles?"pullRequest":a.commitFiles.anchorings.get(e)??"commit",T=e=>"commit"!==S(e),F=e=>a.rightOnly||"pullRequest"!==S(e),V=e=>t=>{if(e)return b(null),void N.openComposer(t);void 0!==a.commitFiles&&N.closeComposer(),b(t)},$=e=>e?N.closeComposer:()=>{b(null)},[P,O]=(0,u.useState)({}),E=a.threads??[],M=new Map((a.files??[]).map(({path:e,viewed:t})=>[e,t])),L={hasPending:N.comments.length>0,add:N.add,update:N.update,remove:N.remove},I=({path:e,side:t})=>!F(e)||"RIGHT"===t,A=N.comments.filter(e=>T(e.path)&&I(e)),q=new Set(e.flatMap(({items:e})=>e.flatMap(Q).map(({name:e})=>e))),D=({path:e})=>"hide"===s&&!q.has(e),W=(e,{side:t,line:n})=>"hide"===s&&null!==n&&!(0,C.isLineInPatch)(e,t,n),z=(e,s)=>{w.set(e,s),O(t=>Object.assign({},t,{[e]:s})),a.onViewed(e,s).then(()=>{O(a=>(0,t.default)(a,[e].map(n.default)))}).catch(()=>{})};return(0,k.jsxs)(l.View,{className:"gap-m",children:[(0,k.jsx)(R,{threads:E.filter(e=>T(e.path)&&!e.outdated&&null!==e.line&&I(e)&&D(e)),pending:A.filter(D),draft:L,onEdit:a.onEdit}),(0,k.jsx)(X,{groups:e,renderFile:(e,{entry:t,attached:n})=>{const s=e.name,l=S(s),u="commit"!==l,x=F(s),b=P[s],C=u?ee(b,M.get(s)):"unviewed",T=n||"viewed"===C,O=E.filter(e=>e.path===s),R=O.filter(e=>u&&!e.outdated&&null!==e.line&&I(e)),q=R.filter(e=>!Z(a.movedOn,e)),D=A.filter(e=>e.path===s);return(0,k.jsx)(U,{file:e,diffStyle:o,theme:c,themeType:p,wordWrap:h,stickyTop:f,loadFiles:v,entry:t,impacts:j(s),collapsed:w.isCollapsed(s,T),review:{viewed:C,onViewed:e=>{z(s,e)},threads:q.filter(t=>!W(e,t)),outdated:x?[]:O.filter(e=>e.outdated),changedSince:R.filter(e=>Z(a.movedOn,e)),hiddenThreads:q.filter(t=>W(e,t)),hiddenPending:D.filter(t=>W(e,t)),viewedLocked:u&&Y(a.movedOn,s),pending:D.filter(t=>!W(e,t)),commentable:a.commentable,rightOnly:x,commitId:u?a.headSha:a.commitOid??a.commitFiles?.oid??a.headSha,ofPullRequest:u,reviewable:!1!==a.reviewable,anchoring:void 0===a.commitFiles?null:l,composer:u?N.composer:y,onOpenComposer:V(u),onCloseComposer:$(u),onEdit:a.onEdit,draft:L},onToggleCollapsed:()=>{w.set(s,!w.isCollapsed(s,T))}})}})]})}function ne({pullRequest:e,patch:t,groups:n,readingOrder:s,impacts:o,sides:l,whitespace:c,diffStyle:p,theme:h,themeType:x,wordWrap:w,stickyTop:j,collapse:y,review:b,commitComposer:C,onCommitComposerChange:N}){const S=(0,u.useMemo)(()=>(0,a.parsePatchFiles)(t).flatMap(e=>e.files),[t]),T=(0,u.useMemo)(()=>null===s?K(S,n):J(S,n,s),[S,n,s]),F=(0,u.useMemo)(()=>new Map(null===o||o.tooLarge?[]:o.files.filter(({exports:e})=>e.length>0).map(e=>[e.path,e])),[o]),V=e=>F.get(e),{ownerRepo:$,number:P}=e,{readFileAtSha:O}=(0,f.usePullRequestDataSource)(),E=(0,u.useMemo)(()=>null===l?void 0:A({ownerRepo:$,number:P},l,O),[$,P,l,O]);return(0,k.jsx)(v.DiffWorkerPool,{theme:h,children:void 0===b?(0,k.jsx)(X,{groups:T,renderFile:(e,{entry:t,attached:n})=>(0,k.jsx)(U,{file:e,diffStyle:p,theme:h,themeType:x,wordWrap:w,stickyTop:j,loadFiles:E,entry:t,impacts:V(e.name),collapsed:y.isCollapsed(e.name,n),onToggleCollapsed:()=>{y.set(e.name,!y.isCollapsed(e.name,n))}})}):(0,k.jsx)(te,{groups:T,review:b,whitespace:c,diffStyle:p,theme:h,themeType:x,wordWrap:w,stickyTop:j,collapse:y,loadFiles:E,impactsOf:V,commitComposer:C,onCommitComposerChange:N})})}var ae=(0,u.memo)(ne)},1146,[25,479,1147,1425,903,64,370,360,984,15,941,946,1108,1447,1448,985,977,1449,986,7]);
2
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AttachedLanguages",{enumerable:!0,get:function(){return n.AttachedLanguages}}),Object.defineProperty(e,"AttachedThemes",{enumerable:!0,get:function(){return O.AttachedThemes}}),Object.defineProperty(e,"CODE_VIEW_DIFF_OPTION_KEYS",{enumerable:!0,get:function(){return Ne.CODE_VIEW_DIFF_OPTION_KEYS}}),Object.defineProperty(e,"CODE_VIEW_FILE_OPTION_KEYS",{enumerable:!0,get:function(){return Ne.CODE_VIEW_FILE_OPTION_KEYS}}),Object.defineProperty(e,"CODE_VIEW_FOOTER_ATTRIBUTE",{enumerable:!0,get:function(){return t.CODE_VIEW_FOOTER_ATTRIBUTE}}),Object.defineProperty(e,"CODE_VIEW_HEADER_ATTRIBUTE",{enumerable:!0,get:function(){return t.CODE_VIEW_HEADER_ATTRIBUTE}}),Object.defineProperty(e,"COMMIT_METADATA_SPLIT",{enumerable:!0,get:function(){return t.COMMIT_METADATA_SPLIT}}),Object.defineProperty(e,"CORE_CSS_ATTRIBUTE",{enumerable:!0,get:function(){return t.CORE_CSS_ATTRIBUTE}}),Object.defineProperty(e,"CUSTOM_HEADER_SLOT_ID",{enumerable:!0,get:function(){return t.CUSTOM_HEADER_SLOT_ID}}),Object.defineProperty(e,"CodeToTokenTransformStream",{enumerable:!0,get:function(){return Ue.CodeToTokenTransformStream}}),Object.defineProperty(e,"CodeView",{enumerable:!0,get:function(){return Ne.CodeView}}),Object.defineProperty(e,"DEFAULT_CODE_VIEW_FILE_METRICS",{enumerable:!0,get:function(){return t.DEFAULT_CODE_VIEW_FILE_METRICS}}),Object.defineProperty(e,"DEFAULT_CODE_VIEW_LAYOUT",{enumerable:!0,get:function(){return t.DEFAULT_CODE_VIEW_LAYOUT}}),Object.defineProperty(e,"DEFAULT_COLLAPSED_CONTEXT_THRESHOLD",{enumerable:!0,get:function(){return t.DEFAULT_COLLAPSED_CONTEXT_THRESHOLD}}),Object.defineProperty(e,"DEFAULT_EXPANDED_REGION",{enumerable:!0,get:function(){return t.DEFAULT_EXPANDED_REGION}}),Object.defineProperty(e,"DEFAULT_RENDER_RANGE",{enumerable:!0,get:function(){return t.DEFAULT_RENDER_RANGE}}),Object.defineProperty(e,"DEFAULT_SMOOTH_SCROLL_SETTINGS",{enumerable:!0,get:function(){return t.DEFAULT_SMOOTH_SCROLL_SETTINGS}}),Object.defineProperty(e,"DEFAULT_THEMES",{enumerable:!0,get:function(){return t.DEFAULT_THEMES}}),Object.defineProperty(e,"DEFAULT_TOKENIZE_MAX_LENGTH",{enumerable:!0,get:function(){return t.DEFAULT_TOKENIZE_MAX_LENGTH}}),Object.defineProperty(e,"DEFAULT_VIRTUAL_FILE_METRICS",{enumerable:!0,get:function(){return t.DEFAULT_VIRTUAL_FILE_METRICS}}),Object.defineProperty(e,"DIFFS_DEVELOPMENT_BUILD",{enumerable:!0,get:function(){return t.DIFFS_DEVELOPMENT_BUILD}}),Object.defineProperty(e,"DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY",{enumerable:!0,get:function(){return t.DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY}}),Object.defineProperty(e,"DIFFS_SCROLLBAR_MEASURE_ATTRIBUTE",{enumerable:!0,get:function(){return t.DIFFS_SCROLLBAR_MEASURE_ATTRIBUTE}}),Object.defineProperty(e,"DIFFS_TAG_NAME",{enumerable:!0,get:function(){return t.DIFFS_TAG_NAME}}),Object.defineProperty(e,"DiffHunksRenderer",{enumerable:!0,get:function(){return Fe.DiffHunksRenderer}}),Object.defineProperty(e,"EMPTY_RENDER_RANGE",{enumerable:!0,get:function(){return t.EMPTY_RENDER_RANGE}}),Object.defineProperty(e,"EXTENSION_TO_FILE_FORMAT",{enumerable:!0,get:function(){return q.EXTENSION_TO_FILE_FORMAT}}),Object.defineProperty(e,"FILENAME_HEADER_REGEX",{enumerable:!0,get:function(){return t.FILENAME_HEADER_REGEX}}),Object.defineProperty(e,"FILE_CONTEXT_BLOB",{enumerable:!0,get:function(){return t.FILE_CONTEXT_BLOB}}),Object.defineProperty(e,"File",{enumerable:!0,get:function(){return fe.File}}),Object.defineProperty(e,"FileDiff",{enumerable:!0,get:function(){return he.FileDiff}}),Object.defineProperty(e,"FileRenderer",{enumerable:!0,get:function(){return J.FileRenderer}}),Object.defineProperty(e,"FileStream",{enumerable:!0,get:function(){return Ge.FileStream}}),Object.defineProperty(e,"GIT_DIFF_FILE_BREAK_REGEX",{enumerable:!0,get:function(){return t.GIT_DIFF_FILE_BREAK_REGEX}}),Object.defineProperty(e,"HEADER_FILENAME_SUFFIX_SLOT_ID",{enumerable:!0,get:function(){return t.HEADER_FILENAME_SUFFIX_SLOT_ID}}),Object.defineProperty(e,"HEADER_METADATA_SLOT_ID",{enumerable:!0,get:function(){return t.HEADER_METADATA_SLOT_ID}}),Object.defineProperty(e,"HEADER_PREFIX_SLOT_ID",{enumerable:!0,get:function(){return t.HEADER_PREFIX_SLOT_ID}}),Object.defineProperty(e,"HUNK_HEADER",{enumerable:!0,get:function(){return t.HUNK_HEADER}}),Object.defineProperty(e,"INDEX_LINE_METADATA",{enumerable:!0,get:function(){return t.INDEX_LINE_METADATA}}),Object.defineProperty(e,"InteractionManager",{enumerable:!0,get:function(){return C.InteractionManager}}),Object.defineProperty(e,"MERGE_CONFLICT_BASE_MARKER_REGEX",{enumerable:!0,get:function(){return t.MERGE_CONFLICT_BASE_MARKER_REGEX}}),Object.defineProperty(e,"MERGE_CONFLICT_END_MARKER_REGEX",{enumerable:!0,get:function(){return t.MERGE_CONFLICT_END_MARKER_REGEX}}),Object.defineProperty(e,"MERGE_CONFLICT_SEPARATOR_MARKER_REGEX",{enumerable:!0,get:function(){return t.MERGE_CONFLICT_SEPARATOR_MARKER_REGEX}}),Object.defineProperty(e,"MERGE_CONFLICT_START_MARKER_REGEX",{enumerable:!0,get:function(){return t.MERGE_CONFLICT_START_MARKER_REGEX}}),Object.defineProperty(e,"RegisteredCustomLanguages",{enumerable:!0,get:function(){return n.RegisteredCustomLanguages}}),Object.defineProperty(e,"ResizeManager",{enumerable:!0,get:function(){return N.ResizeManager}}),Object.defineProperty(e,"ResolvedLanguages",{enumerable:!0,get:function(){return n.ResolvedLanguages}}),Object.defineProperty(e,"ResolvingLanguages",{enumerable:!0,get:function(){return n.ResolvingLanguages}}),Object.defineProperty(e,"SPLIT_WITH_NEWLINES",{enumerable:!0,get:function(){return t.SPLIT_WITH_NEWLINES}}),Object.defineProperty(e,"SVGSpriteSheet",{enumerable:!0,get:function(){return Q.SVGSpriteSheet}}),Object.defineProperty(e,"ScrollSyncManager",{enumerable:!0,get:function(){return Pe.ScrollSyncManager}}),Object.defineProperty(e,"ShikiStreamTokenizer",{enumerable:!0,get:function(){return He.ShikiStreamTokenizer}}),Object.defineProperty(e,"THEME_CSS_ATTRIBUTE",{enumerable:!0,get:function(){return t.THEME_CSS_ATTRIBUTE}}),Object.defineProperty(e,"UNIFIED_DIFF_FILE_BREAK_REGEX",{enumerable:!0,get:function(){return t.UNIFIED_DIFF_FILE_BREAK_REGEX}}),Object.defineProperty(e,"UNSAFE_CSS_ATTRIBUTE",{enumerable:!0,get:function(){return t.UNSAFE_CSS_ATTRIBUTE}}),Object.defineProperty(e,"UnresolvedFile",{enumerable:!0,get:function(){return We.UnresolvedFile}}),Object.defineProperty(e,"VIRTUALIZED_FILE_DIFF_LAYOUT_CHECKPOINT_INTERVAL",{enumerable:!0,get:function(){return Ce.VIRTUALIZED_FILE_DIFF_LAYOUT_CHECKPOINT_INTERVAL}}),Object.defineProperty(e,"VirtualizedFile",{enumerable:!0,get:function(){return le.VirtualizedFile}}),Object.defineProperty(e,"VirtualizedFileDiff",{enumerable:!0,get:function(){return Ce.VirtualizedFileDiff}}),Object.defineProperty(e,"Virtualizer",{enumerable:!0,get:function(){return Be.Virtualizer}}),Object.defineProperty(e,"areDiffLineAnnotationsEqual",{enumerable:!0,get:function(){return Ie.areDiffLineAnnotationsEqual}}),Object.defineProperty(e,"areDiffRenderOptionsEqual",{enumerable:!0,get:function(){return _e.areDiffRenderOptionsEqual}}),Object.defineProperty(e,"areDiffTargetsEqual",{enumerable:!0,get:function(){return be.areDiffTargetsEqual}}),Object.defineProperty(e,"areFileRenderOptionsEqual",{enumerable:!0,get:function(){return U.areFileRenderOptionsEqual}}),Object.defineProperty(e,"areFilesEqual",{enumerable:!0,get:function(){return ge.areFilesEqual}}),Object.defineProperty(e,"areHunkDataEqual",{enumerable:!0,get:function(){return De.areHunkDataEqual}}),Object.defineProperty(e,"areLanguagesAttached",{enumerable:!0,get:function(){return u.areLanguagesAttached}}),Object.defineProperty(e,"areLineAnnotationsEqual",{enumerable:!0,get:function(){return $.areLineAnnotationsEqual}}),Object.defineProperty(e,"areObjectsEqual",{enumerable:!0,get:function(){return j.areObjectsEqual}}),Object.defineProperty(e,"areOptionsEqual",{enumerable:!0,get:function(){return L.areOptionsEqual}}),Object.defineProperty(e,"arePrePropertiesEqual",{enumerable:!0,get:function(){return ee.arePrePropertiesEqual}}),Object.defineProperty(e,"areRenderRangesEqual",{enumerable:!0,get:function(){return M.areRenderRangesEqual}}),Object.defineProperty(e,"areSelectionsEqual",{enumerable:!0,get:function(){return A.areSelectionsEqual}}),Object.defineProperty(e,"areThemesAttached",{enumerable:!0,get:function(){return p.areThemesAttached}}),Object.defineProperty(e,"areThemesEqual",{enumerable:!0,get:function(){return S.areThemesEqual}}),Object.defineProperty(e,"areVirtualWindowSpecsEqual",{enumerable:!0,get:function(){return qe.areVirtualWindowSpecsEqual}}),Object.defineProperty(e,"areWorkerStatsEqual",{enumerable:!0,get:function(){return Qe.areWorkerStatsEqual}}),Object.defineProperty(e,"attachResolvedLanguages",{enumerable:!0,get:function(){return o.attachResolvedLanguages}}),Object.defineProperty(e,"attachResolvedThemes",{enumerable:!0,get:function(){return s.attachResolvedThemes}}),Object.defineProperty(e,"cleanLastNewline",{enumerable:!0,get:function(){return Oe.cleanLastNewline}}),Object.defineProperty(e,"cleanUpResolvedLanguages",{enumerable:!0,get:function(){return c.cleanUpResolvedLanguages}}),Object.defineProperty(e,"cleanUpResolvedThemes",{enumerable:!0,get:function(){return P.cleanUpResolvedThemes}}),Object.defineProperty(e,"clearRenderQueue",{enumerable:!0,get:function(){return R.clearRenderQueue}}),Object.defineProperty(e,"cloneFileDiffMetadata",{enumerable:!0,get:function(){return Ee.cloneFileDiffMetadata}}),Object.defineProperty(e,"cloneHunks",{enumerable:!0,get:function(){return Ee.cloneHunks}}),Object.defineProperty(e,"codeToHtml",{enumerable:!0,get:function(){return at.codeToHtml}}),Object.defineProperty(e,"createAnnotationElement",{enumerable:!0,get:function(){return G.createAnnotationElement}}),Object.defineProperty(e,"createAnnotationWrapperNode",{enumerable:!0,get:function(){return te.createAnnotationWrapperNode}}),Object.defineProperty(e,"createCSSVariablesTheme",{enumerable:!0,get:function(){return at.createCssVariablesTheme}}),Object.defineProperty(e,"createDiffSpanDecoration",{enumerable:!0,get:function(){return Le.createDiffSpanDecoration}}),Object.defineProperty(e,"createEmptyRowBuffer",{enumerable:!0,get:function(){return Te.createEmptyRowBuffer}}),Object.defineProperty(e,"createFileHeaderElement",{enumerable:!0,get:function(){return V.createFileHeaderElement}}),Object.defineProperty(e,"createGutterGap",{enumerable:!0,get:function(){return D.createGutterGap}}),Object.defineProperty(e,"createGutterItem",{enumerable:!0,get:function(){return D.createGutterItem}}),Object.defineProperty(e,"createGutterUtilityContentNode",{enumerable:!0,get:function(){return re.createGutterUtilityContentNode}}),Object.defineProperty(e,"createGutterUtilityElement",{enumerable:!0,get:function(){return h.createGutterUtilityElement}}),Object.defineProperty(e,"createGutterWrapper",{enumerable:!0,get:function(){return D.createGutterWrapper}}),Object.defineProperty(e,"createHastElement",{enumerable:!0,get:function(){return D.createHastElement}}),Object.defineProperty(e,"createIconElement",{enumerable:!0,get:function(){return D.createIconElement}}),Object.defineProperty(e,"createNoNewlineElement",{enumerable:!0,get:function(){return ye.createNoNewlineElement}}),Object.defineProperty(e,"createPreElement",{enumerable:!0,get:function(){return W.createPreElement}}),Object.defineProperty(e,"createPreWrapperProperties",{enumerable:!0,get:function(){return W.createPreWrapperProperties}}),Object.defineProperty(e,"createRowNodes",{enumerable:!0,get:function(){return $e.createRowNodes}}),Object.defineProperty(e,"createSeparator",{enumerable:!0,get:function(){return Re.createSeparator}}),Object.defineProperty(e,"createSpanFromToken",{enumerable:!0,get:function(){return Me.createSpanFromToken}}),Object.defineProperty(e,"createStyleElement",{enumerable:!0,get:function(){return et.createStyleElement}}),Object.defineProperty(e,"createTextNodeElement",{enumerable:!0,get:function(){return D.createTextNodeElement}}),Object.defineProperty(e,"createThemeStyleElement",{enumerable:!0,get:function(){return et.createThemeStyleElement}}),Object.defineProperty(e,"createTransformerWithState",{enumerable:!0,get:function(){return w.createTransformerWithState}}),Object.defineProperty(e,"createUnsafeCSSStyleNode",{enumerable:!0,get:function(){return ne.createUnsafeCSSStyleNode}}),Object.defineProperty(e,"createWindowFromScrollPosition",{enumerable:!0,get:function(){return F.createWindowFromScrollPosition}}),Object.defineProperty(e,"dequeueRender",{enumerable:!0,get:function(){return R.dequeueRender}}),Object.defineProperty(e,"detachString",{enumerable:!0,get:function(){return me.detachString}}),Object.defineProperty(e,"diffAcceptRejectHunk",{enumerable:!0,get:function(){return tt.diffAcceptRejectHunk}}),Object.defineProperty(e,"disposeHighlighter",{enumerable:!0,get:function(){return y.disposeHighlighter}}),Object.defineProperty(e,"findCodeElement",{enumerable:!0,get:function(){return D.findCodeElement}}),Object.defineProperty(e,"formatCSSVariablePrefix",{enumerable:!0,get:function(){return x.formatCSSVariablePrefix}}),Object.defineProperty(e,"getCustomExtensionsMap",{enumerable:!0,get:function(){return q.getCustomExtensionsMap}}),Object.defineProperty(e,"getCustomExtensionsVersion",{enumerable:!0,get:function(){return q.getCustomExtensionsVersion}}),Object.defineProperty(e,"getFiletypeFromFileName",{enumerable:!0,get:function(){return q.getFiletypeFromFileName}}),Object.defineProperty(e,"getHighlighterIfLoaded",{enumerable:!0,get:function(){return y.getHighlighterIfLoaded}}),Object.defineProperty(e,"getHighlighterOptions",{enumerable:!0,get:function(){return B.getHighlighterOptions}}),Object.defineProperty(e,"getHighlighterThemeStyles",{enumerable:!0,get:function(){return z.getHighlighterThemeStyles}}),Object.defineProperty(e,"getHunkSeparatorSlotName",{enumerable:!0,get:function(){return je.getHunkSeparatorSlotName}}),Object.defineProperty(e,"getIconForType",{enumerable:!0,get:function(){return v.getIconForType}}),Object.defineProperty(e,"getLineAnnotationName",{enumerable:!0,get:function(){return X.getLineAnnotationName}}),Object.defineProperty(e,"getLineAnnotationSource",{enumerable:!0,get:function(){return ie.getLineAnnotationSource}}),Object.defineProperty(e,"getLineEndingType",{enumerable:!0,get:function(){return rt.getLineEndingType}}),Object.defineProperty(e,"getLineNodes",{enumerable:!0,get:function(){return Y.getLineNodes}}),Object.defineProperty(e,"getOrCreateCodeNode",{enumerable:!0,get:function(){return oe.getOrCreateCodeNode}}),Object.defineProperty(e,"getResolvedLanguages",{enumerable:!0,get:function(){return Xe.getResolvedLanguages}}),Object.defineProperty(e,"getResolvedOrResolveLanguage",{enumerable:!0,get:function(){return b.getResolvedOrResolveLanguage}}),Object.defineProperty(e,"getResolvedOrResolveTheme",{enumerable:!0,get:function(){return T.getResolvedOrResolveTheme}}),Object.defineProperty(e,"getResolvedThemes",{enumerable:!0,get:function(){return xe.getResolvedThemes}}),Object.defineProperty(e,"getSharedHighlighter",{enumerable:!0,get:function(){return y.getSharedHighlighter}}),Object.defineProperty(e,"getSingularPatch",{enumerable:!0,get:function(){return nt.getSingularPatch}}),Object.defineProperty(e,"getThemes",{enumerable:!0,get:function(){return E.getThemes}}),Object.defineProperty(e,"getTotalLineCountFromHunks",{enumerable:!0,get:function(){return Se.getTotalLineCountFromHunks}}),Object.defineProperty(e,"getUnresolvedDiffHunksRendererOptions",{enumerable:!0,get:function(){return We.getUnresolvedDiffHunksRendererOptions}}),Object.defineProperty(e,"hasResolvedLanguages",{enumerable:!0,get:function(){return ke.hasResolvedLanguages}}),Object.defineProperty(e,"hasResolvedThemes",{enumerable:!0,get:function(){return H.hasResolvedThemes}}),Object.defineProperty(e,"hydratePartialDiff",{enumerable:!0,get:function(){return de.hydratePartialDiff}}),Object.defineProperty(e,"isDefaultRenderRange",{enumerable:!0,get:function(){return k.isDefaultRenderRange}}),Object.defineProperty(e,"isDiffAnnotation",{enumerable:!0,get:function(){return Je.isDiffAnnotation}}),Object.defineProperty(e,"isDiffAnnotationCollection",{enumerable:!0,get:function(){return Je.isDiffAnnotationCollection}}),Object.defineProperty(e,"isFileAnnotation",{enumerable:!0,get:function(){return Je.isFileAnnotation}}),Object.defineProperty(e,"isFileAnnotationCollection",{enumerable:!0,get:function(){return Je.isFileAnnotationCollection}}),Object.defineProperty(e,"isHighlighterLoaded",{enumerable:!0,get:function(){return y.isHighlighterLoaded}}),Object.defineProperty(e,"isHighlighterLoading",{enumerable:!0,get:function(){return y.isHighlighterLoading}}),Object.defineProperty(e,"isHighlighterNull",{enumerable:!0,get:function(){return y.isHighlighterNull}}),Object.defineProperty(e,"isWorkerContext",{enumerable:!0,get:function(){return f.isWorkerContext}}),Object.defineProperty(e,"parseDiffFromFile",{enumerable:!0,get:function(){return se.parseDiffFromFile}}),Object.defineProperty(e,"parseLineType",{enumerable:!0,get:function(){return ut.parseLineType}}),Object.defineProperty(e,"parsePatchFiles",{enumerable:!0,get:function(){return pe.parsePatchFiles}}),Object.defineProperty(e,"patchScrollbarGutterSize",{enumerable:!0,get:function(){return ue.patchScrollbarGutterSize}}),Object.defineProperty(e,"pluckInteractionOptions",{enumerable:!0,get:function(){return C.pluckInteractionOptions}}),Object.defineProperty(e,"prefersReducedMotion",{enumerable:!0,get:function(){return I.prefersReducedMotion}}),Object.defineProperty(e,"preloadHighlighter",{enumerable:!0,get:function(){return y.preloadHighlighter}}),Object.defineProperty(e,"prerenderHTMLIfNecessary",{enumerable:!0,get:function(){return ae.prerenderHTMLIfNecessary}}),Object.defineProperty(e,"processFile",{enumerable:!0,get:function(){return pe.processFile}}),Object.defineProperty(e,"processLine",{enumerable:!0,get:function(){return K.processLine}}),Object.defineProperty(e,"processPatch",{enumerable:!0,get:function(){return pe.processPatch}}),Object.defineProperty(e,"pushOrJoinSpan",{enumerable:!0,get:function(){return Le.pushOrJoinSpan}}),Object.defineProperty(e,"queueRender",{enumerable:!0,get:function(){return R.queueRender}}),Object.defineProperty(e,"recordLineAnnotationSource",{enumerable:!0,get:function(){return ie.recordLineAnnotationSource}}),Object.defineProperty(e,"registerCustomCSSVariableTheme",{enumerable:!0,get:function(){return Ye.registerCustomCSSVariableTheme}}),Object.defineProperty(e,"registerCustomLanguage",{enumerable:!0,get:function(){return Ke.registerCustomLanguage}}),Object.defineProperty(e,"registerCustomTheme",{enumerable:!0,get:function(){return ze.registerCustomTheme}}),Object.defineProperty(e,"releaseStringDetachBuffer",{enumerable:!0,get:function(){return me.releaseStringDetachBuffer}}),Object.defineProperty(e,"renderDiffWithHighlighter",{enumerable:!0,get:function(){return Ae.renderDiffWithHighlighter}}),Object.defineProperty(e,"renderFileWithHighlighter",{enumerable:!0,get:function(){return Z.renderFileWithHighlighter}}),Object.defineProperty(e,"replaceCustomExtensions",{enumerable:!0,get:function(){return q.replaceCustomExtensions}}),Object.defineProperty(e,"resolveConflict",{enumerable:!0,get:function(){return Ve.resolveConflict}}),Object.defineProperty(e,"resolveLanguage",{enumerable:!0,get:function(){return l.resolveLanguage}}),Object.defineProperty(e,"resolveLanguages",{enumerable:!0,get:function(){return we.resolveLanguages}}),Object.defineProperty(e,"resolveRegion",{enumerable:!0,get:function(){return ve.resolveRegion}}),Object.defineProperty(e,"resolveTheme",{enumerable:!0,get:function(){return _.resolveTheme}}),Object.defineProperty(e,"resolveThemes",{enumerable:!0,get:function(){return Ze.resolveThemes}}),Object.defineProperty(e,"setCustomExtension",{enumerable:!0,get:function(){return q.setCustomExtension}}),Object.defineProperty(e,"setLanguageOverride",{enumerable:!0,get:function(){return it.setLanguageOverride}}),Object.defineProperty(e,"setPreNodeProperties",{enumerable:!0,get:function(){return ce.setPreNodeProperties}}),Object.defineProperty(e,"trimPatchContext",{enumerable:!0,get:function(){return ot.trimPatchContext}}),Object.defineProperty(e,"wrapCoreCSS",{enumerable:!0,get:function(){return ue.wrapCoreCSS}}),Object.defineProperty(e,"wrapThemeCSS",{enumerable:!0,get:function(){return ue.wrapThemeCSS}}),Object.defineProperty(e,"wrapUnsafeCSS",{enumerable:!0,get:function(){return ue.wrapUnsafeCSS}});var t=r(d[0]),n=r(d[1]),u=r(d[2]),o=r(d[3]),c=r(d[4]),f=r(d[5]),l=r(d[6]),b=r(d[7]),E=r(d[8]),O=r(d[9]),p=r(d[10]),s=r(d[11]),P=r(d[12]),_=r(d[13]),T=r(d[14]),y=r(d[15]),R=r(d[16]),j=r(d[17]),S=r(d[18]),L=r(d[19]),A=r(d[20]),F=r(d[21]),I=r(d[22]),D=r(d[23]),h=r(d[24]),C=r(d[25]),N=r(d[26]),H=r(d[27]),U=r(d[28]),M=r(d[29]),G=r(d[30]),v=r(d[31]),V=r(d[32]),W=r(d[33]),q=r(d[34]),B=r(d[35]),X=r(d[36]),k=r(d[37]),K=r(d[38]),w=r(d[39]),x=r(d[40]),z=r(d[41]),Y=r(d[42]),Z=r(d[43]),J=r(d[44]),Q=r(d[45]),$=r(d[46]),ee=r(d[47]),te=r(d[48]),re=r(d[49]),ne=r(d[50]),ue=r(d[51]),ie=r(d[52]),oe=r(d[53]),ae=r(d[54]),ce=r(d[55]),fe=r(d[56]),le=r(d[57]),be=r(d[58]),ge=r(d[59]),Ee=r(d[60]),de=r(d[61]),Oe=r(d[62]),me=r(d[63]),pe=r(d[64]),se=r(d[65]),Pe=r(d[66]),_e=r(d[67]),Te=r(d[68]),ye=r(d[69]),Re=r(d[70]),je=r(d[71]),Se=r(d[72]),Le=r(d[73]),Ae=r(d[74]),Fe=r(d[75]),Ie=r(d[76]),De=r(d[77]),he=r(d[78]),Ce=r(d[79]),Ne=r(d[80]),He=r(d[81]),Ue=r(d[82]),Me=r(d[83]),Ge=r(d[84]),ve=r(d[85]),Ve=r(d[86]),We=r(d[87]),qe=r(d[88]),Be=r(d[89]),Xe=r(d[90]),ke=r(d[91]),Ke=r(d[92]),we=r(d[93]),xe=r(d[94]),ze=r(d[95]),Ye=r(d[96]),Ze=r(d[97]),Je=r(d[98]),Qe=r(d[99]),$e=r(d[100]),et=r(d[101]),tt=r(d[102]),rt=r(d[103]),nt=r(d[104]),ut=r(d[105]),it=r(d[106]),ot=r(d[107]),at=r(d[108])},1147,[1148,1149,1150,1151,1152,1153,1154,1231,1232,1233,1234,1235,1243,1244,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1294,1295,1299,1300,1303,1309,1310,1311,1312,1313,1314,1315,1318,1319,1320,1321,1322,1332,1334,1335,1336,1337,1341,1342,1343,1346,1366,1367,1368,1369,1370,1371,1372,1373,1374,1377,1381,1382,1383,1387,1389,1393,1394,1395,1396,1397,1398,1400,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1155]);
3
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CODE_VIEW_FOOTER_ATTRIBUTE",{enumerable:!0,get:function(){return C}}),Object.defineProperty(e,"CODE_VIEW_HEADER_ATTRIBUTE",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"COMMIT_METADATA_SPLIT",{enumerable:!0,get:function(){return E}}),Object.defineProperty(e,"CORE_CSS_ATTRIBUTE",{enumerable:!0,get:function(){return y}}),Object.defineProperty(e,"CUSTOM_HEADER_SLOT_ID",{enumerable:!0,get:function(){return P}}),Object.defineProperty(e,"DEFAULT_CODE_VIEW_FILE_METRICS",{enumerable:!0,get:function(){return H}}),Object.defineProperty(e,"DEFAULT_CODE_VIEW_LAYOUT",{enumerable:!0,get:function(){return B}}),Object.defineProperty(e,"DEFAULT_COLLAPSED_CONTEXT_THRESHOLD",{enumerable:!0,get:function(){return N}}),Object.defineProperty(e,"DEFAULT_EXPANDED_REGION",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"DEFAULT_RENDER_RANGE",{enumerable:!0,get:function(){return K}}),Object.defineProperty(e,"DEFAULT_SMOOTH_SCROLL_SETTINGS",{enumerable:!0,get:function(){return X}}),Object.defineProperty(e,"DEFAULT_THEMES",{enumerable:!0,get:function(){return D}}),Object.defineProperty(e,"DEFAULT_TOKENIZE_MAX_LENGTH",{enumerable:!0,get:function(){return U}}),Object.defineProperty(e,"DEFAULT_VIRTUAL_FILE_METRICS",{enumerable:!0,get:function(){return G}}),Object.defineProperty(e,"DIFFS_DEVELOPMENT_BUILD",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY",{enumerable:!0,get:function(){return M}}),Object.defineProperty(e,"DIFFS_SCROLLBAR_MEASURE_ATTRIBUTE",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"DIFFS_TAG_NAME",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"EMPTY_RENDER_RANGE",{enumerable:!0,get:function(){return V}}),Object.defineProperty(e,"FILENAME_HEADER_REGEX",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"FILE_CONTEXT_BLOB",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"GIT_DIFF_FILE_BREAK_REGEX",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"HEADER_FILENAME_SUFFIX_SLOT_ID",{enumerable:!0,get:function(){return L}}),Object.defineProperty(e,"HEADER_METADATA_SLOT_ID",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"HEADER_PREFIX_SLOT_ID",{enumerable:!0,get:function(){return I}}),Object.defineProperty(e,"HUNK_HEADER",{enumerable:!0,get:function(){return _}}),Object.defineProperty(e,"INDEX_LINE_METADATA",{enumerable:!0,get:function(){return T}}),Object.defineProperty(e,"MERGE_CONFLICT_BASE_MARKER_REGEX",{enumerable:!0,get:function(){return R}}),Object.defineProperty(e,"MERGE_CONFLICT_END_MARKER_REGEX",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"MERGE_CONFLICT_SEPARATOR_MARKER_REGEX",{enumerable:!0,get:function(){return A}}),Object.defineProperty(e,"MERGE_CONFLICT_START_MARKER_REGEX",{enumerable:!0,get:function(){return O}}),Object.defineProperty(e,"SPLIT_WITH_NEWLINES",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"THEME_CSS_ATTRIBUTE",{enumerable:!0,get:function(){return F}}),Object.defineProperty(e,"UNIFIED_DIFF_FILE_BREAK_REGEX",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"UNSAFE_CSS_ATTRIBUTE",{enumerable:!0,get:function(){return j}});const t="diffs-container",n=(()=>{try{return!1}catch{return!1}})(),E=/(?=^From [a-f0-9]+ .+$)/m,u=/(?=^diff --git)/gm,f=/(?=^---\s+\S)/gm,o=/(?=^@@ )/gm,_=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,c=/(?<=\n)/,b=/^(---|\+\+\+)\s+([^\t\r\n]+)/,T=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,O=/^<{7,}(?:\s.*)?$/,R=/^\|{7,}(?:\s.*)?$/,A=/^={7,}$/,l=/^>{7,}(?:\s.*)?$/,I="header-prefix",L="header-filename-suffix",p="header-metadata",P="header-custom",D={dark:"pierre-dark",light:"pierre-light"},F="data-theme-css",j="data-unsafe-css",y="data-core-css",S="data-diffs-scrollbar-measure",s="data-diffs-code-view-header",C="data-diffs-code-view-footer",M="--diffs-scrollbar-gutter-measured",N=1,U=1e5,G={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},H=Object.assign({},G,{hunkLineCount:1}),B={paddingTop:8,paddingBottom:8,gap:8},X={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},h=Object.freeze({fromStart:0,fromEnd:0}),K={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},V={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0}},1148,[]);
4
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AttachedLanguages",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"RegisteredCustomLanguages",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"ResolvedLanguages",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ResolvingLanguages",{enumerable:!0,get:function(){return t}});const n=new Map,t=new Map,u=new Map,o=new Set},1149,[]);
5
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areLanguagesAttached",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){for(const u of Array.isArray(n)?n:[n])if("text"!==u&&"ansi"!==u&&!t.AttachedLanguages.has(u))return!1;return!0}},1150,[1149]);
6
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"attachResolvedLanguages",{enumerable:!0,get:function(){return t}});var n=r(d[0]);function t(t,s){t=Array.isArray(t)?t:[t];for(const o of t){if(n.AttachedLanguages.has(o.name))continue;let t=n.ResolvedLanguages.get(o.name);null==t&&(t=o,n.ResolvedLanguages.set(o.name,t));const u=t.data.find(n=>n.name===t.name||!0===n.aliases?.includes(t.name));if(null==u)throw new Error(`attachResolvedLanguages: No returned grammar declares "${t.name}" as its name or an alias.`);s.loadLanguageSync(t.data);try{s.getLanguage(t.name)}catch{throw new Error(`attachResolvedLanguages: "${u.name}" is already loaded without alias "${t.name}". Load the alias first or give the grammar a unique name.`)}n.AttachedLanguages.add(t.name)}}},1151,[1149]);
7
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"cleanUpResolvedLanguages",{enumerable:!0,get:function(){return t}});var n=r(d[0]);function t(){n.ResolvedLanguages.clear(),n.AttachedLanguages.clear()}},1152,[1149]);
8
- __d(function(g,r,i,a,m,e,d){"use strict";function n(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"isWorkerContext",{enumerable:!0,get:function(){return n}})},1153,[]);
9
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"resolveLanguage",{enumerable:!0,get:function(){return s}});var n=r(d[0]),t=r(d[1]),o=r(d[2]);async function s(s){if((0,t.isWorkerContext)())throw new Error(`resolveLanguage("${s}") 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.`);const u=n.ResolvingLanguages.get(s);if(null!=u)return u;try{let t=n.RegisteredCustomLanguages.get(s);if(null==t&&Object.prototype.hasOwnProperty.call(o.bundledLanguages,s)&&(t=o.bundledLanguages[s]),null==t)throw new Error(`resolveLanguage: "${s}" not found in bundled or custom languages`);const u=t().then(({default:t})=>{const o={name:s,data:t};return n.ResolvedLanguages.has(s)||n.ResolvedLanguages.set(s,o),o});return n.ResolvingLanguages.set(s,u),await u}finally{n.ResolvingLanguages.delete(s)}}},1154,[1149,1153,1155]);
10
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"bundledLanguages",{enumerable:!0,get:function(){return t.t}}),Object.defineProperty(e,"bundledLanguagesAlias",{enumerable:!0,get:function(){return t.n}}),Object.defineProperty(e,"bundledLanguagesBase",{enumerable:!0,get:function(){return t.r}}),Object.defineProperty(e,"bundledLanguagesInfo",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(e,"bundledThemes",{enumerable:!0,get:function(){return n.bundledThemes}}),Object.defineProperty(e,"bundledThemesInfo",{enumerable:!0,get:function(){return n.bundledThemesInfo}}),Object.defineProperty(e,"codeToHast",{enumerable:!0,get:function(){return o.codeToHast}}),Object.defineProperty(e,"codeToHtml",{enumerable:!0,get:function(){return o.codeToHtml}}),Object.defineProperty(e,"codeToTokens",{enumerable:!0,get:function(){return o.codeToTokens}}),Object.defineProperty(e,"codeToTokensBase",{enumerable:!0,get:function(){return o.codeToTokensBase}}),Object.defineProperty(e,"codeToTokensWithThemes",{enumerable:!0,get:function(){return o.codeToTokensWithThemes}}),Object.defineProperty(e,"createHighlighter",{enumerable:!0,get:function(){return o.createHighlighter}}),Object.defineProperty(e,"createJavaScriptRegexEngine",{enumerable:!0,get:function(){return c.createJavaScriptRegexEngine}}),Object.defineProperty(e,"createOnigurumaEngine",{enumerable:!0,get:function(){return u.createOnigurumaEngine}}),Object.defineProperty(e,"defaultJavaScriptRegexConstructor",{enumerable:!0,get:function(){return c.defaultJavaScriptRegexConstructor}}),Object.defineProperty(e,"getLastGrammarState",{enumerable:!0,get:function(){return o.getLastGrammarState}}),Object.defineProperty(e,"getSingletonHighlighter",{enumerable:!0,get:function(){return o.getSingletonHighlighter}}),Object.defineProperty(e,"loadWasm",{enumerable:!0,get:function(){return u.loadWasm}}),r(d[0]);var t=r(d[1]),n=r(d[2]),o=r(d[3]),u=r(d[4]),c=r(d[5]),b=r(d[6]);Object.keys(b).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return b[t]}})})},1155,[1156,1157,1158,1159,1161,1215,1162]);
11
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"t",{enumerable:!0,get:function(){return l}});var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=(n,o)=>{let u={};for(var l in n)t(u,l,{get:n[l],enumerable:!0});return o||t(u,Symbol.toStringTag,{value:"Module"}),u},b=(l,b,c,f)=>{if(b&&"object"==typeof b||"function"==typeof b)for(var i,p=o(b),y=0,O=p.length;y<O;y++)i=p[y],u.call(l,i)||i===c||t(l,i,{get:(t=>b[t]).bind(null,i),enumerable:!(f=n(b,i))||f.enumerable});return l},c=(t,n,o)=>(b(t,n,"default"),o&&b(o,n,"default"))},1156,[]);
12
- __d(function(g,r,_i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"i",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"n",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"r",{enumerable:!0,get:function(){return i}}),Object.defineProperty(e,"t",{enumerable:!0,get:function(){return s}});const a=[{id:"abap",name:"ABAP",import:()=>r(d[1])(d[0],d.paths)},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:()=>r(d[1])(d[2],d.paths)},{id:"ada",name:"Ada",import:()=>r(d[1])(d[3],d.paths)},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:()=>r(d[1])(d[4],d.paths)},{id:"ahk2",name:"AutoHotkey2",import:()=>r(d[1])(d[5],d.paths)},{id:"angular-html",name:"Angular HTML",import:()=>r(d[1])(d[6],d.paths)},{id:"angular-ts",name:"Angular TypeScript",import:()=>r(d[1])(d[7],d.paths)},{id:"apache",name:"Apache Conf",import:()=>r(d[1])(d[8],d.paths)},{id:"apex",name:"Apex",import:()=>r(d[1])(d[9],d.paths)},{id:"apl",name:"APL",import:()=>r(d[1])(d[10],d.paths)},{id:"applescript",name:"AppleScript",import:()=>r(d[1])(d[11],d.paths)},{id:"ara",name:"Ara",import:()=>r(d[1])(d[12],d.paths)},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>r(d[1])(d[13],d.paths)},{id:"asm",name:"Assembly",import:()=>r(d[1])(d[14],d.paths)},{id:"astro",name:"Astro",import:()=>r(d[1])(d[15],d.paths)},{id:"awk",name:"AWK",import:()=>r(d[1])(d[16],d.paths)},{id:"ballerina",name:"Ballerina",import:()=>r(d[1])(d[17],d.paths)},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:()=>r(d[1])(d[18],d.paths)},{id:"beancount",name:"Beancount",import:()=>r(d[1])(d[19],d.paths)},{id:"berry",name:"Berry",aliases:["be"],import:()=>r(d[1])(d[20],d.paths)},{id:"bibtex",name:"BibTeX",import:()=>r(d[1])(d[21],d.paths)},{id:"bicep",name:"Bicep",import:()=>r(d[1])(d[22],d.paths)},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:()=>r(d[1])(d[23],d.paths)},{id:"blade",name:"Blade",import:()=>r(d[1])(d[24],d.paths)},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>r(d[1])(d[25],d.paths)},{id:"c",name:"C",import:()=>r(d[1])(d[26],d.paths)},{id:"c3",name:"C3",import:()=>r(d[1])(d[27],d.paths)},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>r(d[1])(d[28],d.paths)},{id:"cairo",name:"Cairo",import:()=>r(d[1])(d[29],d.paths)},{id:"chapel",name:"Chapel",aliases:["chpl"],import:()=>r(d[1])(d[30],d.paths)},{id:"clarity",name:"Clarity",import:()=>r(d[1])(d[31],d.paths)},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>r(d[1])(d[32],d.paths)},{id:"cmake",name:"CMake",import:()=>r(d[1])(d[33],d.paths)},{id:"cobol",name:"COBOL",import:()=>r(d[1])(d[34],d.paths)},{id:"codeowners",name:"CODEOWNERS",import:()=>r(d[1])(d[35],d.paths)},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>r(d[1])(d[36],d.paths)},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>r(d[1])(d[37],d.paths)},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>r(d[1])(d[38],d.paths)},{id:"coq",name:"Rocq",import:()=>r(d[1])(d[39],d.paths)},{id:"cpp",name:"C++",aliases:["c++"],import:()=>r(d[1])(d[40],d.paths)},{id:"crystal",name:"Crystal",import:()=>r(d[1])(d[41],d.paths)},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>r(d[1])(d[42],d.paths)},{id:"css",name:"CSS",import:()=>r(d[1])(d[43],d.paths)},{id:"csv",name:"CSV",import:()=>r(d[1])(d[44],d.paths)},{id:"cue",name:"CUE",import:()=>r(d[1])(d[45],d.paths)},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>r(d[1])(d[46],d.paths)},{id:"d",name:"D",import:()=>r(d[1])(d[47],d.paths)},{id:"dart",name:"Dart",import:()=>r(d[1])(d[48],d.paths)},{id:"dax",name:"DAX",import:()=>r(d[1])(d[49],d.paths)},{id:"desktop",name:"Desktop",import:()=>r(d[1])(d[50],d.paths)},{id:"diff",name:"Diff",import:()=>r(d[1])(d[51],d.paths)},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>r(d[1])(d[52],d.paths)},{id:"dotenv",name:"dotEnv",import:()=>r(d[1])(d[53],d.paths)},{id:"dream-maker",name:"Dream Maker",import:()=>r(d[1])(d[54],d.paths)},{id:"edge",name:"Edge",import:()=>r(d[1])(d[55],d.paths)},{id:"elixir",name:"Elixir",import:()=>r(d[1])(d[56],d.paths)},{id:"elm",name:"Elm",import:()=>r(d[1])(d[57],d.paths)},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>r(d[1])(d[58],d.paths)},{id:"erb",name:"ERB",import:()=>r(d[1])(d[59],d.paths)},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>r(d[1])(d[60],d.paths)},{id:"fennel",name:"Fennel",import:()=>r(d[1])(d[61],d.paths)},{id:"fish",name:"Fish",import:()=>r(d[1])(d[62],d.paths)},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>r(d[1])(d[63],d.paths)},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>r(d[1])(d[64],d.paths)},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>r(d[1])(d[65],d.paths)},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>r(d[1])(d[66],d.paths)},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>r(d[1])(d[67],d.paths)},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>r(d[1])(d[68],d.paths)},{id:"gdshader",name:"GDShader",import:()=>r(d[1])(d[69],d.paths)},{id:"genie",name:"Genie",import:()=>r(d[1])(d[70],d.paths)},{id:"gherkin",name:"Gherkin",import:()=>r(d[1])(d[71],d.paths)},{id:"git-commit",name:"Git Commit Message",import:()=>r(d[1])(d[72],d.paths)},{id:"git-rebase",name:"Git Rebase Message",import:()=>r(d[1])(d[73],d.paths)},{id:"gleam",name:"Gleam",import:()=>r(d[1])(d[74],d.paths)},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>r(d[1])(d[75],d.paths)},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>r(d[1])(d[76],d.paths)},{id:"glsl",name:"GLSL",import:()=>r(d[1])(d[77],d.paths)},{id:"gn",name:"GN",import:()=>r(d[1])(d[78],d.paths)},{id:"gnuplot",name:"Gnuplot",import:()=>r(d[1])(d[79],d.paths)},{id:"go",name:"Go",import:()=>r(d[1])(d[80],d.paths)},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>r(d[1])(d[81],d.paths)},{id:"groovy",name:"Groovy",import:()=>r(d[1])(d[82],d.paths)},{id:"hack",name:"Hack",import:()=>r(d[1])(d[83],d.paths)},{id:"haml",name:"Ruby Haml",import:()=>r(d[1])(d[84],d.paths)},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>r(d[1])(d[85],d.paths)},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>r(d[1])(d[86],d.paths)},{id:"haxe",name:"Haxe",import:()=>r(d[1])(d[87],d.paths)},{id:"hcl",name:"HashiCorp HCL",import:()=>r(d[1])(d[88],d.paths)},{id:"hjson",name:"Hjson",import:()=>r(d[1])(d[89],d.paths)},{id:"hlsl",name:"HLSL",import:()=>r(d[1])(d[90],d.paths)},{id:"html",name:"HTML",import:()=>r(d[1])(d[91],d.paths)},{id:"html-derivative",name:"HTML (Derivative)",import:()=>r(d[1])(d[92],d.paths)},{id:"http",name:"HTTP",import:()=>r(d[1])(d[93],d.paths)},{id:"hurl",name:"Hurl",import:()=>r(d[1])(d[94],d.paths)},{id:"hxml",name:"HXML",import:()=>r(d[1])(d[95],d.paths)},{id:"hy",name:"Hy",import:()=>r(d[1])(d[96],d.paths)},{id:"imba",name:"Imba",import:()=>r(d[1])(d[97],d.paths)},{id:"ini",name:"INI",aliases:["properties"],import:()=>r(d[1])(d[98],d.paths)},{id:"java",name:"Java",import:()=>r(d[1])(d[99],d.paths)},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>r(d[1])(d[100],d.paths)},{id:"jinja",name:"Jinja",import:()=>r(d[1])(d[101],d.paths)},{id:"jison",name:"Jison",import:()=>r(d[1])(d[102],d.paths)},{id:"json",name:"JSON",import:()=>r(d[1])(d[103],d.paths)},{id:"json5",name:"JSON5",import:()=>r(d[1])(d[104],d.paths)},{id:"jsonc",name:"JSON with Comments",import:()=>r(d[1])(d[105],d.paths)},{id:"jsonl",name:"JSON Lines",import:()=>r(d[1])(d[106],d.paths)},{id:"jsonnet",name:"Jsonnet",import:()=>r(d[1])(d[107],d.paths)},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>r(d[1])(d[108],d.paths)},{id:"jsx",name:"JSX",import:()=>r(d[1])(d[109],d.paths)},{id:"julia",name:"Julia",aliases:["jl"],import:()=>r(d[1])(d[110],d.paths)},{id:"just",name:"Just",aliases:["justfile"],import:()=>r(d[1])(d[111],d.paths)},{id:"kdl",name:"KDL",import:()=>r(d[1])(d[112],d.paths)},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>r(d[1])(d[113],d.paths)},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>r(d[1])(d[114],d.paths)},{id:"latex",name:"LaTeX",import:()=>r(d[1])(d[115],d.paths)},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>r(d[1])(d[116],d.paths)},{id:"less",name:"Less",import:()=>r(d[1])(d[117],d.paths)},{id:"liquid",name:"Liquid",import:()=>r(d[1])(d[118],d.paths)},{id:"llvm",name:"LLVM IR",import:()=>r(d[1])(d[119],d.paths)},{id:"log",name:"Log file",import:()=>r(d[1])(d[120],d.paths)},{id:"logo",name:"Logo",import:()=>r(d[1])(d[121],d.paths)},{id:"lua",name:"Lua",import:()=>r(d[1])(d[122],d.paths)},{id:"luau",name:"Luau",import:()=>r(d[1])(d[123],d.paths)},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>r(d[1])(d[124],d.paths)},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>r(d[1])(d[125],d.paths)},{id:"marko",name:"Marko",import:()=>r(d[1])(d[126],d.paths)},{id:"matlab",name:"MATLAB",import:()=>r(d[1])(d[127],d.paths)},{id:"mdc",name:"MDC",import:()=>r(d[1])(d[128],d.paths)},{id:"mdx",name:"MDX",import:()=>r(d[1])(d[129],d.paths)},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>r(d[1])(d[130],d.paths)},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>r(d[1])(d[131],d.paths)},{id:"mojo",name:"Mojo",import:()=>r(d[1])(d[132],d.paths)},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>r(d[1])(d[133],d.paths)},{id:"move",name:"Move",import:()=>r(d[1])(d[134],d.paths)},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>r(d[1])(d[135],d.paths)},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>r(d[1])(d[136],d.paths)},{id:"nextflow-groovy",name:"Nextflow Groovy",import:()=>r(d[1])(d[137],d.paths)},{id:"nginx",name:"Nginx",import:()=>r(d[1])(d[138],d.paths)},{id:"nim",name:"Nim",import:()=>r(d[1])(d[139],d.paths)},{id:"nix",name:"Nix",import:()=>r(d[1])(d[140],d.paths)},{id:"nsis",name:"NSIS",import:()=>r(d[1])(d[141],d.paths)},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>r(d[1])(d[142],d.paths)},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>r(d[1])(d[143],d.paths)},{id:"objective-cpp",name:"Objective-C++",import:()=>r(d[1])(d[144],d.paths)},{id:"ocaml",name:"OCaml",import:()=>r(d[1])(d[145],d.paths)},{id:"odin",name:"Odin",import:()=>r(d[1])(d[146],d.paths)},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>r(d[1])(d[147],d.paths)},{id:"org",name:"Org Markup",import:()=>r(d[1])(d[148],d.paths)},{id:"pascal",name:"Pascal",import:()=>r(d[1])(d[149],d.paths)},{id:"perl",name:"Perl",import:()=>r(d[1])(d[150],d.paths)},{id:"php",name:"PHP",import:()=>r(d[1])(d[151],d.paths)},{id:"pkl",name:"Pkl",import:()=>r(d[1])(d[152],d.paths)},{id:"plsql",name:"PL/SQL",import:()=>r(d[1])(d[153],d.paths)},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>r(d[1])(d[154],d.paths)},{id:"polar",name:"Polar",import:()=>r(d[1])(d[155],d.paths)},{id:"postcss",name:"PostCSS",import:()=>r(d[1])(d[156],d.paths)},{id:"powerquery",name:"PowerQuery",import:()=>r(d[1])(d[157],d.paths)},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:()=>r(d[1])(d[158],d.paths)},{id:"prisma",name:"Prisma",import:()=>r(d[1])(d[159],d.paths)},{id:"prolog",name:"Prolog",import:()=>r(d[1])(d[160],d.paths)},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>r(d[1])(d[161],d.paths)},{id:"pug",name:"Pug",aliases:["jade"],import:()=>r(d[1])(d[162],d.paths)},{id:"puppet",name:"Puppet",import:()=>r(d[1])(d[163],d.paths)},{id:"purescript",name:"PureScript",import:()=>r(d[1])(d[164],d.paths)},{id:"python",name:"Python",aliases:["py"],import:()=>r(d[1])(d[165],d.paths)},{id:"qml",name:"QML",import:()=>r(d[1])(d[166],d.paths)},{id:"qmldir",name:"QML Directory",import:()=>r(d[1])(d[167],d.paths)},{id:"qss",name:"Qt Style Sheets",import:()=>r(d[1])(d[168],d.paths)},{id:"r",name:"R",import:()=>r(d[1])(d[169],d.paths)},{id:"racket",name:"Racket",import:()=>r(d[1])(d[170],d.paths)},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>r(d[1])(d[171],d.paths)},{id:"razor",name:"ASP.NET Razor",import:()=>r(d[1])(d[172],d.paths)},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:()=>r(d[1])(d[173],d.paths)},{id:"reg",name:"Windows Registry Script",import:()=>r(d[1])(d[174],d.paths)},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>r(d[1])(d[175],d.paths)},{id:"rel",name:"Rel",import:()=>r(d[1])(d[176],d.paths)},{id:"riscv",name:"RISC-V",import:()=>r(d[1])(d[177],d.paths)},{id:"ron",name:"RON",import:()=>r(d[1])(d[178],d.paths)},{id:"rosmsg",name:"ROS Interface",import:()=>r(d[1])(d[179],d.paths)},{id:"rst",name:"reStructuredText",import:()=>r(d[1])(d[180],d.paths)},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>r(d[1])(d[181],d.paths)},{id:"rust",name:"Rust",aliases:["rs"],import:()=>r(d[1])(d[182],d.paths)},{id:"sas",name:"SAS",import:()=>r(d[1])(d[183],d.paths)},{id:"sass",name:"Sass",import:()=>r(d[1])(d[184],d.paths)},{id:"scala",name:"Scala",import:()=>r(d[1])(d[185],d.paths)},{id:"scheme",name:"Scheme",import:()=>r(d[1])(d[186],d.paths)},{id:"scss",name:"SCSS",import:()=>r(d[1])(d[187],d.paths)},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>r(d[1])(d[188],d.paths)},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>r(d[1])(d[189],d.paths)},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>r(d[1])(d[190],d.paths)},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>r(d[1])(d[191],d.paths)},{id:"smalltalk",name:"GNU Smalltalk",import:()=>r(d[1])(d[192],d.paths)},{id:"smithy",name:"Smithy",import:()=>r(d[1])(d[193],d.paths)},{id:"solidity",name:"Solidity",import:()=>r(d[1])(d[194],d.paths)},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>r(d[1])(d[195],d.paths)},{id:"sparql",name:"SPARQL",import:()=>r(d[1])(d[196],d.paths)},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>r(d[1])(d[197],d.paths)},{id:"sql",name:"SQL",import:()=>r(d[1])(d[198],d.paths)},{id:"ssh-config",name:"SSH Config",import:()=>r(d[1])(d[199],d.paths)},{id:"stata",name:"Stata",import:()=>r(d[1])(d[200],d.paths)},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>r(d[1])(d[201],d.paths)},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>r(d[1])(d[202],d.paths)},{id:"svelte",name:"Svelte",import:()=>r(d[1])(d[203],d.paths)},{id:"swift",name:"Swift",import:()=>r(d[1])(d[204],d.paths)},{id:"system-verilog",name:"SystemVerilog",import:()=>r(d[1])(d[205],d.paths)},{id:"systemd",name:"Systemd Units",import:()=>r(d[1])(d[206],d.paths)},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>r(d[1])(d[207],d.paths)},{id:"tasl",name:"Tasl",import:()=>r(d[1])(d[208],d.paths)},{id:"tcl",name:"Tcl",import:()=>r(d[1])(d[209],d.paths)},{id:"templ",name:"Templ",import:()=>r(d[1])(d[210],d.paths)},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>r(d[1])(d[211],d.paths)},{id:"tex",name:"TeX",import:()=>r(d[1])(d[212],d.paths)},{id:"toml",name:"TOML",import:()=>r(d[1])(d[213],d.paths)},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>r(d[1])(d[214],d.paths)},{id:"tsv",name:"TSV",import:()=>r(d[1])(d[215],d.paths)},{id:"tsx",name:"TSX",import:()=>r(d[1])(d[216],d.paths)},{id:"turtle",name:"Turtle",import:()=>r(d[1])(d[217],d.paths)},{id:"twig",name:"Twig",import:()=>r(d[1])(d[218],d.paths)},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>r(d[1])(d[219],d.paths)},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>r(d[1])(d[220],d.paths)},{id:"typst",name:"Typst",aliases:["typ"],import:()=>r(d[1])(d[221],d.paths)},{id:"v",name:"V",import:()=>r(d[1])(d[222],d.paths)},{id:"vala",name:"Vala",import:()=>r(d[1])(d[223],d.paths)},{id:"vb",name:"Visual Basic",import:()=>r(d[1])(d[224],d.paths)},{id:"verilog",name:"Verilog",import:()=>r(d[1])(d[225],d.paths)},{id:"vhdl",name:"VHDL",import:()=>r(d[1])(d[226],d.paths)},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>r(d[1])(d[227],d.paths)},{id:"vue",name:"Vue",import:()=>r(d[1])(d[228],d.paths)},{id:"vue-html",name:"Vue HTML",import:()=>r(d[1])(d[229],d.paths)},{id:"vue-vine",name:"Vue Vine",import:()=>r(d[1])(d[230],d.paths)},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>r(d[1])(d[231],d.paths)},{id:"wasm",name:"WebAssembly",import:()=>r(d[1])(d[232],d.paths)},{id:"wenyan",name:"Wenyan",aliases:["\u6587\u8a00"],import:()=>r(d[1])(d[233],d.paths)},{id:"wgsl",name:"WGSL",import:()=>r(d[1])(d[234],d.paths)},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>r(d[1])(d[235],d.paths)},{id:"wit",name:"WebAssembly Interface Types",import:()=>r(d[1])(d[236],d.paths)},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>r(d[1])(d[237],d.paths)},{id:"xml",name:"XML",import:()=>r(d[1])(d[238],d.paths)},{id:"xsl",name:"XSL",import:()=>r(d[1])(d[239],d.paths)},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>r(d[1])(d[240],d.paths)},{id:"zenscript",name:"ZenScript",import:()=>r(d[1])(d[241],d.paths)},{id:"zig",name:"Zig",import:()=>r(d[1])(d[242],d.paths)}],i=Object.fromEntries(a.map(a=>[a.id,a.import])),t=Object.fromEntries(a.flatMap(a=>a.aliases?.map(i=>[i,a.import])||[])),s=Object.assign({},i,t)},1157,{"0":1450,"1":987,"2":1451,"3":1452,"4":1453,"5":1454,"6":1455,"7":1456,"8":1457,"9":1458,"10":1459,"11":1460,"12":1461,"13":1462,"14":1463,"15":1464,"16":1465,"17":1466,"18":1467,"19":1468,"20":1469,"21":1470,"22":1471,"23":1472,"24":1473,"25":1474,"26":1475,"27":1476,"28":1477,"29":1478,"30":1479,"31":1480,"32":1481,"33":1482,"34":1483,"35":1484,"36":1485,"37":1486,"38":1487,"39":1488,"40":1489,"41":1490,"42":1491,"43":1492,"44":1493,"45":1494,"46":1495,"47":1496,"48":1497,"49":1498,"50":1499,"51":1500,"52":1501,"53":1502,"54":1503,"55":1504,"56":1505,"57":1506,"58":1507,"59":1508,"60":1509,"61":1510,"62":1511,"63":1512,"64":1513,"65":1514,"66":1515,"67":1516,"68":1517,"69":1518,"70":1519,"71":1520,"72":1521,"73":1522,"74":1523,"75":1524,"76":1525,"77":1526,"78":1527,"79":1528,"80":1529,"81":1530,"82":1531,"83":1532,"84":1533,"85":1534,"86":1535,"87":1536,"88":1537,"89":1538,"90":1539,"91":1540,"92":1541,"93":1542,"94":1543,"95":1544,"96":1545,"97":1546,"98":1547,"99":1548,"100":1549,"101":1550,"102":1551,"103":1552,"104":1553,"105":1554,"106":1555,"107":1556,"108":1557,"109":1558,"110":1559,"111":1560,"112":1561,"113":1562,"114":1563,"115":1564,"116":1565,"117":1566,"118":1567,"119":1568,"120":1569,"121":1570,"122":1571,"123":1572,"124":1573,"125":1574,"126":1575,"127":1576,"128":1577,"129":1578,"130":1579,"131":1580,"132":1581,"133":1582,"134":1583,"135":1584,"136":1585,"137":1586,"138":1587,"139":1588,"140":1589,"141":1590,"142":1591,"143":1592,"144":1593,"145":1594,"146":1595,"147":1596,"148":1597,"149":1598,"150":1599,"151":1600,"152":1601,"153":1602,"154":1603,"155":1604,"156":1605,"157":1606,"158":1607,"159":1608,"160":1609,"161":1610,"162":1611,"163":1612,"164":1613,"165":1614,"166":1615,"167":1616,"168":1617,"169":1618,"170":1619,"171":1620,"172":1621,"173":1622,"174":1623,"175":1624,"176":1625,"177":1626,"178":1627,"179":1628,"180":1629,"181":1630,"182":1631,"183":1632,"184":1633,"185":1634,"186":1635,"187":1636,"188":1637,"189":1638,"190":1639,"191":1640,"192":1641,"193":1642,"194":1643,"195":1644,"196":1645,"197":1646,"198":1647,"199":1648,"200":1649,"201":1650,"202":1651,"203":1652,"204":1653,"205":1654,"206":1655,"207":1656,"208":1657,"209":1658,"210":1659,"211":1660,"212":1661,"213":1662,"214":1663,"215":1664,"216":1665,"217":1666,"218":1667,"219":1668,"220":1669,"221":1670,"222":1671,"223":1672,"224":1673,"225":1674,"226":1675,"227":1676,"228":1677,"229":1678,"230":1679,"231":1680,"232":1681,"233":1682,"234":1683,"235":1684,"236":1685,"237":1686,"238":1687,"239":1688,"240":1689,"241":1690,"242":1691,"paths":{"1450":"/_expo/static/js/web/abap-4735ba0bdab40e1fa6833c169536f78c.js","1451":"/_expo/static/js/web/actionscript-3-81b92065ca770efc579fbe835d5b5c61.js","1452":"/_expo/static/js/web/ada-0ac873023b427e6536460c39ed965204.js","1453":"/_expo/static/js/web/ahk-8f37a629778b454039b5b427f13e60c6.js","1454":"/_expo/static/js/web/ahk2-9c6a36defc615c621f5c5c121484836d.js","1456":"/_expo/static/js/web/angular-ts-c09f4196061b512445ec47fec285c235.js","1457":"/_expo/static/js/web/apache-be79fef870bd11dd899557620223cb88.js","1458":"/_expo/static/js/web/apex-bdc5a5b7e16e171235114a0716d9aba8.js","1459":"/_expo/static/js/web/apl-200d3b29a04b6133f2f117036d62fe06.js","1460":"/_expo/static/js/web/applescript-a84b102f9eb8d92b88dd52a2d9753528.js","1461":"/_expo/static/js/web/ara-7805d62ccceac7742d37fbda450d8d40.js","1462":"/_expo/static/js/web/asciidoc-07f9276f66d1c37c4bdde8625666201e.js","1463":"/_expo/static/js/web/asm-c8588fb8637190115a2e469d912abe3e.js","1464":"/_expo/static/js/web/astro-ba02102e8e986fd6a513ee4cdb7bf6af.js","1465":"/_expo/static/js/web/awk-1c0b0a74fd6edd411d2ef5882d0aaaf7.js","1466":"/_expo/static/js/web/ballerina-f64970fa40c72dc778abb0564518a98f.js","1468":"/_expo/static/js/web/beancount-1314c5487f7091980779654e7984108c.js","1469":"/_expo/static/js/web/berry-88aff98d4e112e3ae1d671779a5fa36a.js","1471":"/_expo/static/js/web/bicep-a7701a656518580c2a958c6a3dbfe235.js","1472":"/_expo/static/js/web/bird2-53b955850b24b4e577226638a896efb7.js","1473":"/_expo/static/js/web/blade-5a3ef0b2ac698f1ee7bb030d8f9dbf31.js","1474":"/_expo/static/js/web/bsl-4a20028ae57a060115c57c0463b9ea05.js","1476":"/_expo/static/js/web/c3-ab2edffb963d45e007c8e5c691b4b8b4.js","1477":"/_expo/static/js/web/cadence-563ae61bdcc894bef5f515b62afd96b4.js","1478":"/_expo/static/js/web/cairo-526ea28326e3fe8ef4aa133427732df4.js","1479":"/_expo/static/js/web/chapel-ecc6587f6df0296e17d0fc2dd4103be0.js","1480":"/_expo/static/js/web/clarity-d543239d6330f98092f5e889705ed3fb.js","1483":"/_expo/static/js/web/cobol-c57a69db2e2be60f8c0f855dfd8a141e.js","1484":"/_expo/static/js/web/codeowners-f094d7c5bde36bd4b8de1340e9f2753e.js","1485":"/_expo/static/js/web/codeql-eb6c8f1e179daa8ce4293a47cc3e1a8d.js","1487":"/_expo/static/js/web/common-lisp-e429e6d0b651d9bb8b9198bf9c042640.js","1488":"/_expo/static/js/web/coq-2e4b203c67e94de0542862b10126c41b.js","1490":"/_expo/static/js/web/crystal-8db749c37fa425a054f0c8fd2173e33c.js","1494":"/_expo/static/js/web/cue-5d370a199e1c72323a20afbec35ba6c9.js","1495":"/_expo/static/js/web/cypher-5b4d613585056c9fa0a71223b7018ab1.js","1496":"/_expo/static/js/web/d-768bf198eee9288830ebd5857b7b709e.js","1498":"/_expo/static/js/web/dax-5adb19c303322a5557edb42ce91bffcc.js","1499":"/_expo/static/js/web/desktop-a6842704f4c0d83b77b519c61601ca10.js","1502":"/_expo/static/js/web/dotenv-2f5c183cc1dc663a26ed01bbd4a9100a.js","1503":"/_expo/static/js/web/dream-maker-96e47b6c7716ccb459c77759655af066.js","1504":"/_expo/static/js/web/edge-6e8c7be3ab99156b52b7fcb369004c80.js","1506":"/_expo/static/js/web/elm-b0b1de475dbaac917dd19149fa5d441d.js","1507":"/_expo/static/js/web/emacs-lisp-9cff2aecbf62a1830c5006dca532a4f1.js","1508":"/_expo/static/js/web/erb-031b78fcd931747ecf9ce49dafed67a1.js","1510":"/_expo/static/js/web/fennel-28ee9eba0d84aa6e4eef0ba3fe7a4179.js","1511":"/_expo/static/js/web/fish-a593031d1709937e59ca81932958155f.js","1512":"/_expo/static/js/web/fluent-2892b395eca9e3efcd02c2dcb29a2bd0.js","1513":"/_expo/static/js/web/fortran-fixed-form-eca389c7b742d74213a97276ec031cde.js","1516":"/_expo/static/js/web/gdresource-13b1edf942704452c05651f8d7b2a82c.js","1519":"/_expo/static/js/web/genie-74334394e49b534143856b5bf5ad1109.js","1520":"/_expo/static/js/web/gherkin-943953323f4fcc0c4e94c0e38aea6764.js","1523":"/_expo/static/js/web/gleam-79b91fddec1360ac7f8cf7daea792591.js","1524":"/_expo/static/js/web/glimmer-js-1f4910e07fa1e22f120f68f68bb3c08a.js","1525":"/_expo/static/js/web/glimmer-ts-2097d03c4e69281827288a90a5197d0d.js","1527":"/_expo/static/js/web/gn-fafa80e4acc9146d7a25266ac65d7b89.js","1528":"/_expo/static/js/web/gnuplot-5c59d972041ce9635de890e828dcd7d0.js","1532":"/_expo/static/js/web/hack-741ff14fb4368512374e63a5686b5e80.js","1535":"/_expo/static/js/web/haskell-d8925555eed50c8faa3a246b92ea7091.js","1537":"/_expo/static/js/web/hcl-3a096fdc22197144e0faa83efd496d7f.js","1538":"/_expo/static/js/web/hjson-8ab26f76bf8783d747415819ab7259e4.js","1542":"/_expo/static/js/web/http-57b4c879ff536e63c328a3ecb10e784e.js","1543":"/_expo/static/js/web/hurl-500d250085e16ddd5290dadcfdde1aab.js","1544":"/_expo/static/js/web/hxml-7513c7b2821f49dfe514cb49b49568e3.js","1545":"/_expo/static/js/web/hy-e2e07339df61790a24f9b081fff9759f.js","1546":"/_expo/static/js/web/imba-c5beacdd96cef3903009116b1100ed66.js","1550":"/_expo/static/js/web/jinja-c068ef212856c97522b6d73e5b92dce2.js","1551":"/_expo/static/js/web/jison-d6153f30ec4835a08a689c0d2d09244b.js","1553":"/_expo/static/js/web/json5-f8dafd6287e97923b2b9a1c1ce878898.js","1555":"/_expo/static/js/web/jsonl-fbbaef3aa7fbc9796e31d1e1fe3c1cad.js","1556":"/_expo/static/js/web/jsonnet-e3e1b39c15e76111dd4e84613bccf62b.js","1557":"/_expo/static/js/web/jssm-10f9446c8c358c77e7691ae7f28b5f3f.js","1560":"/_expo/static/js/web/just-8bc1bfe7bdefd52a47f21e6b435dcb76.js","1561":"/_expo/static/js/web/kdl-b81ef2d3c420ec48e5a0fdf8281013bc.js","1562":"/_expo/static/js/web/kotlin-d6bfd9578918e22d6dfa1d062ed92209.js","1563":"/_expo/static/js/web/kusto-12f51989b99672e31a3230ebbfe961b5.js","1565":"/_expo/static/js/web/lean-5ac412a8baf5a050e3cda593232e8324.js","1567":"/_expo/static/js/web/liquid-16a7f6d037d6caa883ff0fa6e34e4ced.js","1568":"/_expo/static/js/web/llvm-020c858fb8c305e12f04cd47591466f0.js","1570":"/_expo/static/js/web/logo-5b3ad65c367b09df7f0110b4702319df.js","1572":"/_expo/static/js/web/luau-eebfdab4001c92788be99d32acf4f497.js","1575":"/_expo/static/js/web/marko-088cf2eff5354112b15132c81b3bfea0.js","1576":"/_expo/static/js/web/matlab-5d90aee4f2a2e6f028feab7a7a623819.js","1577":"/_expo/static/js/web/mdc-402584995594f461ce0b07aaefc30172.js","1578":"/_expo/static/js/web/mdx-e5377ef1fa0fe2ffb1b3822cfc3242a4.js","1579":"/_expo/static/js/web/mermaid-522edb82f5413dab4fb73bfb9d45d0fc.js","1580":"/_expo/static/js/web/mipsasm-41ec91aa572d7c833f664788f10cc4f7.js","1581":"/_expo/static/js/web/mojo-eef08402b9f886b96412b4498102deb8.js","1582":"/_expo/static/js/web/moonbit-b91b4a8752c337d5b2273333b1804a5b.js","1583":"/_expo/static/js/web/move-20c7e9d32de2cf5fe3de49f7e1b2789f.js","1584":"/_expo/static/js/web/narrat-a80c5ce69d674df5852b82f69db29a43.js","1585":"/_expo/static/js/web/nextflow-d4e438f34fab6cc5dfa0035aeaabbb6f.js","1587":"/_expo/static/js/web/nginx-122816f874cd4a787abb5b66fdeec130.js","1589":"/_expo/static/js/web/nix-69ea2ae75a24644d5c5b6e0a445e4f6d.js","1590":"/_expo/static/js/web/nsis-44b1e69a743b2afeb0ec64f9bc5d9901.js","1591":"/_expo/static/js/web/nushell-c9cd36c69ec5db528c4db6dd00de1c2a.js","1593":"/_expo/static/js/web/objective-cpp-a52362c7b9ccce99dd0dfac4b7a63a8d.js","1595":"/_expo/static/js/web/odin-44c535447b690aa0d77ba036c068852e.js","1596":"/_expo/static/js/web/openscad-5ec6c694fdbb50f8fea2d65102aa6cd7.js","1597":"/_expo/static/js/web/org-d738b1bc1e99cf4b05be8f418a1e7c94.js","1598":"/_expo/static/js/web/pascal-631adcc5411f436fae301c65633017f8.js","1601":"/_expo/static/js/web/pkl-35dc1cebaaa8f2be40084fbf22e611f8.js","1602":"/_expo/static/js/web/plsql-5f0006ab5797d24e968231360a18bbfe.js","1603":"/_expo/static/js/web/po-9940da5d989b562c26df29713751c0b2.js","1604":"/_expo/static/js/web/polar-536f243d5dc5de0a5f82fccffc472d7d.js","1606":"/_expo/static/js/web/powerquery-f2895b08e2d47ec76926718a2b1ec52b.js","1608":"/_expo/static/js/web/prisma-5e8bdc66d59774abae66404742dc639f.js","1609":"/_expo/static/js/web/prolog-d26809df5beda5b44f6e2d40cf267732.js","1610":"/_expo/static/js/web/proto-d512cc6c62da98fbc35e710a33b8ff65.js","1612":"/_expo/static/js/web/puppet-e56c9fd9ed8c3499ef6837f151280ea5.js","1613":"/_expo/static/js/web/purescript-fb351352914738eaf496e177c23047e2.js","1615":"/_expo/static/js/web/qml-baf3a5e90488cf7ea8de4291ca9077ef.js","1616":"/_expo/static/js/web/qmldir-9c30979faddb027febfda0dd11d5bd1c.js","1617":"/_expo/static/js/web/qss-cd406fcf69c48198d2076b13540464ee.js","1619":"/_expo/static/js/web/racket-c99848afde907e0760bef4ce1ef71dfb.js","1621":"/_expo/static/js/web/razor-292d924a75ff36778291011c016a1b57.js","1622":"/_expo/static/js/web/rbs-58f0736b406f70faa7a04b95c080c2ba.js","1623":"/_expo/static/js/web/reg-5202ff3a1e37bdd5916bf617d50b6534.js","1625":"/_expo/static/js/web/rel-d62e4fd3ead02996a8c14c03cb4c3b04.js","1626":"/_expo/static/js/web/riscv-bd4e42bb7b9dad9aa613e351c25d9508.js","1627":"/_expo/static/js/web/ron-3538d449bff8091a0d7d4b622c3ecdea.js","1628":"/_expo/static/js/web/rosmsg-e6fdc5f23a72e574e0b70ecb103a0ffc.js","1629":"/_expo/static/js/web/rst-5fbf85b0528f3237d2b26c0b3fddfffc.js","1632":"/_expo/static/js/web/sas-ce0b7778b88c027bf5c6cbcc7cf9faa9.js","1633":"/_expo/static/js/web/sass-24c0b54022c4ed838728d4959aa7e07c.js","1635":"/_expo/static/js/web/scheme-e3fecd19bb25a4c316d4280051de9db1.js","1638":"/_expo/static/js/web/shaderlab-850c47c05f4ea22d89ea36a075397a70.js","1640":"/_expo/static/js/web/shellsession-742f72a9dabdd4ea97261401cbbc5a32.js","1641":"/_expo/static/js/web/smalltalk-21f9b0351a75ea1518a646e3025ed3d0.js","1642":"/_expo/static/js/web/smithy-db5ff52f9d2ee9434d05812d71d42c86.js","1643":"/_expo/static/js/web/solidity-f6a275ab1513d3a2f4b43ea1a7d206d7.js","1644":"/_expo/static/js/web/soy-5caabeefcf08fb97c03ffdb7c00b6df2.js","1645":"/_expo/static/js/web/sparql-437b5b88fcac5afdd07c6fca6b0e08c7.js","1646":"/_expo/static/js/web/splunk-c5acc3ed729dc0a3655dcc2043006dea.js","1648":"/_expo/static/js/web/ssh-config-db333f5eb25667aea9bd61553f3d6e97.js","1649":"/_expo/static/js/web/stata-ef0ff801fceefcac00df8da1da32c6c7.js","1651":"/_expo/static/js/web/surrealql-545a9306f965e5a1ed822aafc281a724.js","1652":"/_expo/static/js/web/svelte-492f428cd4092777760140bd281be264.js","1655":"/_expo/static/js/web/systemd-358d760f94953ed82fe7d66c91cdb3b6.js","1656":"/_expo/static/js/web/talonscript-fb44c0a25815bf97764179ee839118c4.js","1657":"/_expo/static/js/web/tasl-cdd8b4eda1ec7d03b5c8e3f6684030f4.js","1658":"/_expo/static/js/web/tcl-5f9ddf22ff9e039754f069b5a7886c83.js","1659":"/_expo/static/js/web/templ-66ff1d6e31c1060ae22bca697eb62b62.js","1660":"/_expo/static/js/web/terraform-fab275e5a64ae65b9abd9bed86990629.js","1662":"/_expo/static/js/web/toml-f3ce877af33e49aed0d30f47d5c22660.js","1663":"/_expo/static/js/web/ts-tags-d2a3724ce898cf3faeb0d0b780aed1b9.js","1664":"/_expo/static/js/web/tsv-152b42c14a6479077e649b4b75d6340e.js","1669":"/_expo/static/js/web/typespec-71b5bf68eeb6dc3da7b138062462be4c.js","1670":"/_expo/static/js/web/typst-b54901ec5c7cf65e199402d878189e3b.js","1671":"/_expo/static/js/web/v-4d8c1cbf4becfea4213de9e4738e3fca.js","1672":"/_expo/static/js/web/vala-c9ac96911c1a5dcf44074303805b5b06.js","1675":"/_expo/static/js/web/vhdl-1ab74f9a9920eda21f7276af6a1ab176.js","1676":"/_expo/static/js/web/viml-6b66a6c22cebe05775e92087033e95a3.js","1677":"/_expo/static/js/web/vue-1c802df5d8ef4b58fd74b501e685dbe8.js","1678":"/_expo/static/js/web/vue-html-568322337823edb0fe58d7a29c6d0d0c.js","1679":"/_expo/static/js/web/vue-vine-ee75d1d803ed485990576ae40b053aa5.js","1680":"/_expo/static/js/web/vyper-5494c7c332db25ceb8e9e739b526dd7e.js","1681":"/_expo/static/js/web/wasm-8d1dc2d5e47ed2868d4a7989a7d2d046.js","1682":"/_expo/static/js/web/wenyan-b5be3fd49d29b67f88bc19f45f1df861.js","1683":"/_expo/static/js/web/wgsl-e663bf311a25b8bb8a66a89f18c28cd0.js","1684":"/_expo/static/js/web/wikitext-dc6a65e659426ac05e1b75662a2c7fc8.js","1685":"/_expo/static/js/web/wit-9e5c50f4849d35eaa6532d681a03da50.js","1686":"/_expo/static/js/web/wolfram-3ea4b948a43c65c32e1557bc9418dd08.js","1690":"/_expo/static/js/web/zenscript-01d906e3bbb9926e2675b70ea3cfee28.js"}});
13
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"bundledThemes",{enumerable:!0,get:function(){return i}}),Object.defineProperty(e,"bundledThemesInfo",{enumerable:!0,get:function(){return t}});const t=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>r(d[1])(d[0],d.paths)},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>r(d[1])(d[2],d.paths)},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>r(d[1])(d[3],d.paths)},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>r(d[1])(d[4],d.paths)},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>r(d[1])(d[5],d.paths)},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xe9",type:"dark",import:()=>r(d[1])(d[6],d.paths)},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>r(d[1])(d[7],d.paths)},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>r(d[1])(d[8],d.paths)},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>r(d[1])(d[9],d.paths)},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>r(d[1])(d[10],d.paths)},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>r(d[1])(d[11],d.paths)},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>r(d[1])(d[12],d.paths)},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>r(d[1])(d[13],d.paths)},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>r(d[1])(d[14],d.paths)},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>r(d[1])(d[15],d.paths)},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>r(d[1])(d[16],d.paths)},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>r(d[1])(d[17],d.paths)},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>r(d[1])(d[18],d.paths)},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>r(d[1])(d[19],d.paths)},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>r(d[1])(d[20],d.paths)},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>r(d[1])(d[21],d.paths)},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>r(d[1])(d[22],d.paths)},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>r(d[1])(d[23],d.paths)},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>r(d[1])(d[24],d.paths)},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>r(d[1])(d[25],d.paths)},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>r(d[1])(d[26],d.paths)},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>r(d[1])(d[27],d.paths)},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>r(d[1])(d[28],d.paths)},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:()=>r(d[1])(d[29],d.paths)},{id:"houston",displayName:"Houston",type:"dark",import:()=>r(d[1])(d[30],d.paths)},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>r(d[1])(d[31],d.paths)},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>r(d[1])(d[32],d.paths)},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>r(d[1])(d[33],d.paths)},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>r(d[1])(d[34],d.paths)},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>r(d[1])(d[35],d.paths)},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>r(d[1])(d[36],d.paths)},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>r(d[1])(d[37],d.paths)},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>r(d[1])(d[38],d.paths)},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>r(d[1])(d[39],d.paths)},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>r(d[1])(d[40],d.paths)},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>r(d[1])(d[41],d.paths)},{id:"min-light",displayName:"Min Light",type:"light",import:()=>r(d[1])(d[42],d.paths)},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>r(d[1])(d[43],d.paths)},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>r(d[1])(d[44],d.paths)},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>r(d[1])(d[45],d.paths)},{id:"nord",displayName:"Nord",type:"dark",import:()=>r(d[1])(d[46],d.paths)},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>r(d[1])(d[47],d.paths)},{id:"one-light",displayName:"One Light",type:"light",import:()=>r(d[1])(d[48],d.paths)},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>r(d[1])(d[49],d.paths)},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>r(d[1])(d[50],d.paths)},{id:"red",displayName:"Red",type:"dark",import:()=>r(d[1])(d[51],d.paths)},{id:"rose-pine",displayName:"Ros\xe9 Pine",type:"dark",import:()=>r(d[1])(d[52],d.paths)},{id:"rose-pine-dawn",displayName:"Ros\xe9 Pine Dawn",type:"light",import:()=>r(d[1])(d[53],d.paths)},{id:"rose-pine-moon",displayName:"Ros\xe9 Pine Moon",type:"dark",import:()=>r(d[1])(d[54],d.paths)},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>r(d[1])(d[55],d.paths)},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>r(d[1])(d[56],d.paths)},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>r(d[1])(d[57],d.paths)},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>r(d[1])(d[58],d.paths)},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>r(d[1])(d[59],d.paths)},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>r(d[1])(d[60],d.paths)},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>r(d[1])(d[61],d.paths)},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>r(d[1])(d[62],d.paths)},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>r(d[1])(d[63],d.paths)},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>r(d[1])(d[64],d.paths)},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>r(d[1])(d[65],d.paths)}],i=Object.fromEntries(t.map(t=>[t.id,t.import]))},1158,{"0":1692,"1":987,"2":1693,"3":1694,"4":1695,"5":1696,"6":1697,"7":1698,"8":1699,"9":1700,"10":1701,"11":1702,"12":1703,"13":1704,"14":1705,"15":1706,"16":1707,"17":1708,"18":1709,"19":1710,"20":1711,"21":1712,"22":1713,"23":1714,"24":1715,"25":1716,"26":1717,"27":1718,"28":1719,"29":1720,"30":1721,"31":1722,"32":1723,"33":1724,"34":1725,"35":1726,"36":1727,"37":1728,"38":1729,"39":1730,"40":1731,"41":1732,"42":1733,"43":1734,"44":1735,"45":1736,"46":1737,"47":1738,"48":1739,"49":1740,"50":1741,"51":1742,"52":1743,"53":1744,"54":1745,"55":1746,"56":1747,"57":1748,"58":1749,"59":1750,"60":1751,"61":1752,"62":1753,"63":1754,"64":1755,"65":1756,"paths":{"1692":"/_expo/static/js/web/andromeeda-4eb7627ed7e2027a3014eb9b0fc7d48b.js","1693":"/_expo/static/js/web/aurora-x-eca7c4dbcf2fe31dd1a876b4646d8a5c.js","1694":"/_expo/static/js/web/ayu-dark-8f6e385b58df92299befb1001c0071e9.js","1695":"/_expo/static/js/web/ayu-light-a1b60d58cbfcccc85725df01470c5fbf.js","1696":"/_expo/static/js/web/ayu-mirage-7f2d3450fc7c1c924319e16b522036ee.js","1697":"/_expo/static/js/web/catppuccin-frappe-aff087ba4e9b896d0e137ffa80f49c02.js","1698":"/_expo/static/js/web/catppuccin-latte-c3b1c912e97e8f624e6cbf45ef3b5edf.js","1699":"/_expo/static/js/web/catppuccin-macchiato-b6c416a52b907946bcdca920c48ae599.js","1700":"/_expo/static/js/web/catppuccin-mocha-c4f1c6d94ae481022cf6033197e7c316.js","1701":"/_expo/static/js/web/dark-plus-8efbaa1eeb06bc065204597a49a4c817.js","1702":"/_expo/static/js/web/dracula-eecb97e7b36410a96fb803022fd6b8c5.js","1703":"/_expo/static/js/web/dracula-soft-c37421bf19373d1501a67d19cdff4c2c.js","1704":"/_expo/static/js/web/everforest-dark-e1912e469a04a00fd747bc8b40d6e5d9.js","1705":"/_expo/static/js/web/everforest-light-f71487bd99881ff31b99f0cb31c8b2c5.js","1706":"/_expo/static/js/web/github-dark-67d6d2700d0980eec4ed099e8f20aca9.js","1707":"/_expo/static/js/web/github-dark-default-852bc3f6ba454a19ff7a853b298c497d.js","1708":"/_expo/static/js/web/github-dark-dimmed-848bfec052e08ccc61b50e1ba0211dae.js","1709":"/_expo/static/js/web/github-dark-high-contrast-02ad87bc06cf6c6d4a04337ea66fb3fe.js","1710":"/_expo/static/js/web/github-light-aee863509fe4005fb41822fbcfbf4f5d.js","1711":"/_expo/static/js/web/github-light-default-65ebc4810f41b7a01bf124f11a8172e2.js","1712":"/_expo/static/js/web/github-light-high-contrast-196180f150b6ef3cc97a39de2a2b2f8b.js","1713":"/_expo/static/js/web/gruvbox-dark-hard-d093dcf62f1dd3246281d6ab41798f16.js","1714":"/_expo/static/js/web/gruvbox-dark-medium-2abd600034b3e3a2b441c89d1fe44068.js","1715":"/_expo/static/js/web/gruvbox-dark-soft-051c5796a1d88da4a4470b085c65bc49.js","1716":"/_expo/static/js/web/gruvbox-light-hard-424ef3a5580340c0dd4eb4e419d3e1a5.js","1717":"/_expo/static/js/web/gruvbox-light-medium-e2a70413d829902f52edabf945c7652c.js","1718":"/_expo/static/js/web/gruvbox-light-soft-fe7ba8399ee825f6a29c03134917f108.js","1719":"/_expo/static/js/web/horizon-7853a4f0bf06efbb6c5da2af76897819.js","1720":"/_expo/static/js/web/horizon-bright-995f5ccd6d4a2e1b69e02004207fb484.js","1721":"/_expo/static/js/web/houston-e3d8f813cdd8cf306c9262bdc97877d2.js","1722":"/_expo/static/js/web/kanagawa-dragon-16f4ae1d4fd25abc84e49eba46012955.js","1723":"/_expo/static/js/web/kanagawa-lotus-ac4c2129c97d65c65b75a862f09b07cf.js","1724":"/_expo/static/js/web/kanagawa-wave-767c26e2b69b21ada102ecd923c87b85.js","1725":"/_expo/static/js/web/laserwave-45badd528dd94d751862cca15c4203d9.js","1726":"/_expo/static/js/web/light-plus-ae803d1c1be4aa2f5d2e66aa6d957d21.js","1727":"/_expo/static/js/web/material-theme-d691611feaace08a6c1b7775cb0cca88.js","1728":"/_expo/static/js/web/material-theme-darker-79c5a137780d2cf5727a38321ab80d64.js","1729":"/_expo/static/js/web/material-theme-lighter-861a07f0b6a2e21d346b98df48ff9abe.js","1730":"/_expo/static/js/web/material-theme-ocean-3641081bcbedb42f932e6e2fb25fa3c9.js","1731":"/_expo/static/js/web/material-theme-palenight-9ac0ddc015df2941d7b8bb3a79248c1d.js","1732":"/_expo/static/js/web/min-dark-7eaa81dd2d281c61eb8e647d4afea43e.js","1733":"/_expo/static/js/web/min-light-ebb1c5bdae7b8f8a195a117b4ee99db0.js","1734":"/_expo/static/js/web/monokai-bd9568f8ff5d71123df0b5bbea4f850a.js","1735":"/_expo/static/js/web/night-owl-30f07b074b58fbcf20839277856b6ade.js","1736":"/_expo/static/js/web/night-owl-light-4cf45e7350820fc9b1c7727438addffa.js","1737":"/_expo/static/js/web/nord-76e3b00d398183f372c031623b1dacf3.js","1738":"/_expo/static/js/web/one-dark-pro-b51b692455010e20ccaaaa654ea5a385.js","1739":"/_expo/static/js/web/one-light-4d89f0b9cda956af9b4d5f51bc09097e.js","1740":"/_expo/static/js/web/plastic-2e497d0fb45790b8c5330cfc4e9df676.js","1741":"/_expo/static/js/web/poimandres-1c7638b17564aeacf97f6aa7c31d2094.js","1742":"/_expo/static/js/web/red-1f89277b65ca53154645e670088de774.js","1743":"/_expo/static/js/web/rose-pine-4215d61d54c23918ebf8dee8165f5ad9.js","1744":"/_expo/static/js/web/rose-pine-dawn-f9173373dddc074d10012a3bc28154e0.js","1745":"/_expo/static/js/web/rose-pine-moon-3dfcf6693bcbadc26f2e83a52fc3739b.js","1746":"/_expo/static/js/web/slack-dark-7c948e3333f9c227b4c9335876685335.js","1747":"/_expo/static/js/web/slack-ochin-5273f8fac997ed9b28fcf609ad724235.js","1748":"/_expo/static/js/web/snazzy-light-28bda9577aa06b400d103778f0bd8eb4.js","1749":"/_expo/static/js/web/solarized-dark-70bc90aa98ddfc224de066877686c33e.js","1750":"/_expo/static/js/web/solarized-light-0653372b053411837650543284957bd7.js","1751":"/_expo/static/js/web/synthwave-84-c48f7924d1c41fc97a933fa3d2ce8039.js","1752":"/_expo/static/js/web/tokyo-night-d2d0895c47dd694142a5e67ac0168a22.js","1753":"/_expo/static/js/web/vesper-c20f28343a0d43999b97548858f7b11f.js","1754":"/_expo/static/js/web/vitesse-black-8643c070fae86be9164c8b471e13935a.js","1755":"/_expo/static/js/web/vitesse-dark-5d0643f35aa5bc9a82af1de69ec8fd45.js","1756":"/_expo/static/js/web/vitesse-light-fc7c2693080913234e3ed41cfbadd4de.js"}});
14
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"bundledLanguages",{enumerable:!0,get:function(){return t.t}}),Object.defineProperty(e,"bundledLanguagesAlias",{enumerable:!0,get:function(){return t.n}}),Object.defineProperty(e,"bundledLanguagesBase",{enumerable:!0,get:function(){return t.r}}),Object.defineProperty(e,"bundledLanguagesInfo",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(e,"bundledThemes",{enumerable:!0,get:function(){return o.bundledThemes}}),Object.defineProperty(e,"bundledThemesInfo",{enumerable:!0,get:function(){return o.bundledThemesInfo}}),Object.defineProperty(e,"codeToHast",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"codeToHtml",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"codeToTokens",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"codeToTokensBase",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"codeToTokensWithThemes",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"createHighlighter",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"getLastGrammarState",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"getSingletonHighlighter",{enumerable:!0,get:function(){return T}}),r(d[0]);var n=r(d[1]),t=r(d[2]),o=r(d[3]),u=r(d[4]);Object.keys(u).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return u[n]}})});const c=(0,u.createBundledHighlighter)({langs:t.t,themes:o.bundledThemes,engine:()=>(0,n.t.createOnigurumaEngine)(r(d[6])(d[5],d.paths))}),{codeToHtml:b,codeToHast:l,codeToTokens:s,codeToTokensBase:f,codeToTokensWithThemes:h,getSingletonHighlighter:T,getLastGrammarState:p}=(0,u.createSingletonShorthands)(c,{guessEmbeddedLanguages:u.guessEmbeddedLanguages})},1159,{"0":1156,"1":1160,"2":1157,"3":1158,"4":1162,"5":1757,"6":987,"paths":{"1757":"/_expo/static/js/web/wasm-8e559c711833716a87b3a6d463949a3f.js"}});
15
- __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"t",{enumerable:!0,get:function(){return n}});var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),n=(0,e.t)({});(0,e.n)(n,t)},1160,[1156,1161]);
16
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createOnigurumaEngine",{enumerable:!0,get:function(){return E}}),Object.defineProperty(e,"getDefaultWasmLoader",{enumerable:!0,get:function(){return v}}),Object.defineProperty(e,"loadWasm",{enumerable:!0,get:function(){return L}}),Object.defineProperty(e,"setDefaultWasmLoader",{enumerable:!0,get:function(){return B}});var t=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function n(){return"undefined"!=typeof performance?performance.now():Date.now()}const f=(t,n)=>t+(n-t%n)%n;async function i(t){let i,s;const o={};function u(t){s=t,o.HEAPU8=new Uint8Array(t),o.HEAPU32=new Uint32Array(t)}function c(t){try{return i.grow(t-s.byteLength+65535>>>16),u(i.buffer),1}catch{}}const h="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function l(t,n,f=1024){const i=n+f;let s=n;for(;t[s]&&!(s>=i);)++s;if(s-n>16&&t.buffer&&h)return h.decode(t.subarray(n,s));let o="";for(;n<s;){let f=t[n++];if(!(128&f)){o+=String.fromCharCode(f);continue}const i=63&t[n++];if(192==(224&f)){o+=String.fromCharCode((31&f)<<6|i);continue}const s=63&t[n++];if(f=224==(240&f)?(15&f)<<12|i<<6|s:(7&f)<<18|i<<12|s<<6|63&t[n++],f<65536)o+=String.fromCharCode(f);else{const t=f-65536;o+=String.fromCharCode(55296|t>>10,56320|1023&t)}}return o}function y(t,n){return t?l(o.HEAPU8,t,n):""}const p={emscripten_get_now:n,emscripten_memcpy_big:function(t,n,f){o.HEAPU8.copyWithin(t,n,n+f)},emscripten_resize_heap:function(t){const n=o.HEAPU8.length,i=2147483648;if((t>>>=0)>i)return!1;for(let s=1;s<=4;s*=2){let o=n*(1+.2/s);o=Math.min(o,t+100663296);if(c(Math.min(i,f(Math.max(t,o),65536))))return!0}return!1},fd_write:()=>0};return await(async function(){const n={env:p,wasi_snapshot_preview1:p},f=await t(n);i=f.memory,u(i.buffer),Object.assign(o,f),o.UTF8ToString=y})(),o}var s=Object.defineProperty,o=(t,n,f)=>n in t?s(t,n,{enumerable:!0,configurable:!0,writable:!0,value:f}):t[n]=f,u=(t,n,f)=>o(t,"symbol"!=typeof n?n+"":n,f);let c=null;function h(n){throw new t(n.UTF8ToString(n.getLastOnigError()))}class l{constructor(t){u(this,"utf16Length"),u(this,"utf8Length"),u(this,"utf16Value"),u(this,"utf8Value"),u(this,"utf16OffsetToUtf8"),u(this,"utf8OffsetToUtf16");const n=t.length,f=l._utf8ByteLength(t),i=f!==n,s=i?new Uint32Array(n+1):null;i&&(s[n]=f);const o=i?new Uint32Array(f+1):null;i&&(o[f]=n);const c=new Uint8Array(f);let h=0;for(let f=0;f<n;f++){const u=t.charCodeAt(f);let l=u,y=!1;if(u>=55296&&u<=56319&&f+1<n){const n=t.charCodeAt(f+1);n>=56320&&n<=57343&&(l=65536+(u-55296<<10)|n-56320,y=!0)}i&&(s[f]=h,y&&(s[f+1]=h),l<=127?o[h+0]=f:l<=2047?(o[h+0]=f,o[h+1]=f):l<=65535?(o[h+0]=f,o[h+1]=f,o[h+2]=f):(o[h+0]=f,o[h+1]=f,o[h+2]=f,o[h+3]=f)),l<=127?c[h++]=l:l<=2047?(c[h++]=192|(1984&l)>>>6,c[h++]=128|(63&l)>>>0):l<=65535?(c[h++]=224|(61440&l)>>>12,c[h++]=128|(4032&l)>>>6,c[h++]=128|(63&l)>>>0):(c[h++]=240|(1835008&l)>>>18,c[h++]=128|(258048&l)>>>12,c[h++]=128|(4032&l)>>>6,c[h++]=128|(63&l)>>>0),y&&f++}this.utf16Length=n,this.utf8Length=f,this.utf16Value=t,this.utf8Value=c,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}static _utf8ByteLength(t){let n=0;for(let f=0,i=t.length;f<i;f++){const s=t.charCodeAt(f);let o=s,u=!1;if(s>=55296&&s<=56319&&f+1<i){const n=t.charCodeAt(f+1);n>=56320&&n<=57343&&(o=65536+(s-55296<<10)|n-56320,u=!0)}n+=o<=127?1:o<=2047?2:o<=65535?3:4,u&&f++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const y=class n{constructor(f){if(u(this,"id",++n.LAST_ID),u(this,"_onigBinding"),u(this,"content"),u(this,"utf16Length"),u(this,"utf8Length"),u(this,"utf16OffsetToUtf8"),u(this,"utf8OffsetToUtf16"),u(this,"ptr"),!c)throw new t("Must invoke loadWasm first.");this._onigBinding=c,this.content=f;const i=new l(f);this.utf16Length=i.utf16Length,this.utf8Length=i.utf8Length,this.utf16OffsetToUtf8=i.utf16OffsetToUtf8,this.utf8OffsetToUtf16=i.utf8OffsetToUtf16,this.utf8Length<1e4&&!n._sharedPtrInUse?(n._sharedPtr||(n._sharedPtr=c.omalloc(1e4)),n._sharedPtrInUse=!0,c.HEAPU8.set(i.utf8Value,n._sharedPtr),this.ptr=n._sharedPtr):this.ptr=i.createString(c)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===n._sharedPtr?n._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};u(y,"LAST_ID",0),u(y,"_sharedPtr",0),u(y,"_sharedPtrInUse",!1);let p,U,_=y;class w{constructor(n){if(u(this,"_onigBinding"),u(this,"_ptr"),!c)throw new t("Must invoke loadWasm first.");const f=[],i=[];for(let t=0,s=n.length;t<s;t++){const s=new l(n[t]);f[t]=s.createString(c),i[t]=s.utf8Length}const s=c.omalloc(4*n.length);c.HEAPU32.set(f,s/4);const o=c.omalloc(4*n.length);c.HEAPU32.set(i,o/4);const y=c.createOnigScanner(s,o,n.length);for(let t=0,i=n.length;t<i;t++)c.ofree(f[t]);c.ofree(o),c.ofree(s),0===y&&h(c),this._onigBinding=c,this._ptr=y}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,f){let i=0;if("number"==typeof f&&(i=f),"string"==typeof t){t=new _(t);const f=this._findNextMatchSync(t,n,!1,i);return t.dispose(),f}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,f,i){const s=this._onigBinding,o=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(0===o)return null;const u=s.HEAPU32;let c=o/4;const h=u[c++],l=u[c++],y=[];for(let n=0;n<l;n++){const f=t.convertUtf8OffsetToUtf16(u[c++]),i=t.convertUtf8OffsetToUtf16(u[c++]);y[n]={start:f,end:i,length:i-f}}return{index:h,captureIndices:y}}}function b(t){return"function"==typeof t.default}function A(t){return void 0!==t.data}function O(t){return"undefined"!=typeof Response&&t instanceof Response}function T(t){return"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||"undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&t instanceof Uint32Array}function L(t){if(p)return p;return p=(async function(){c=await i(async n=>{let f=t;var i;return f=await f,"function"==typeof f&&(f=await f(n)),"function"==typeof f&&(f=await f(n)),"function"==typeof f.instantiator?f=await f.instantiator(n):b(f)?f=await f.default(n):(A(f)&&(f=f.data),O(f)?f="function"==typeof WebAssembly.instantiateStreaming?await(i=f,t=>WebAssembly.instantiateStreaming(i,t))(n):await S(f)(n):T(f)||f instanceof WebAssembly.Module?f=await P(f)(n):"default"in f&&f.default instanceof WebAssembly.Module&&(f=await P(f.default)(n))),"instance"in f&&(f=f.instance),"exports"in f&&(f=f.exports),f})})(),p}function P(t){return n=>WebAssembly.instantiate(t,n)}function S(t){return async n=>{const f=await t.arrayBuffer();return WebAssembly.instantiate(f,n)}}function B(t){U=t}function v(){return U}async function E(t){return t&&await L(t),{createScanner:t=>new w(t.map(t=>"string"==typeof t?t:t.source)),createString:t=>new _(t)}}},1161,[]);
17
- __d(function(_g,_r,_i,_a,m,e,_d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ShikiError",{enumerable:!0,get:function(){return n.ShikiError}}),Object.defineProperty(e,"addClassToHast",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"applyColorReplacements",{enumerable:!0,get:function(){return n.applyColorReplacements}}),Object.defineProperty(e,"codeToHast",{enumerable:!0,get:function(){return z}}),Object.defineProperty(e,"codeToHtml",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(e,"codeToTokens",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(e,"codeToTokensBase",{enumerable:!0,get:function(){return D}}),Object.defineProperty(e,"codeToTokensWithThemes",{enumerable:!0,get:function(){return n.codeToTokensWithThemes}}),Object.defineProperty(e,"createBundledHighlighter",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(e,"createCssVariablesTheme",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(e,"createHighlighterCore",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(e,"createHighlighterCoreSync",{enumerable:!0,get:function(){return te}}),Object.defineProperty(e,"createPositionConverter",{enumerable:!0,get:function(){return g}}),Object.defineProperty(e,"createShikiInternal",{enumerable:!0,get:function(){return n.createShikiInternal}}),Object.defineProperty(e,"createShikiInternalSync",{enumerable:!0,get:function(){return n.createShikiInternalSync}}),Object.defineProperty(e,"createShikiPrimitive",{enumerable:!0,get:function(){return n.createShikiPrimitive}}),Object.defineProperty(e,"createShikiPrimitiveAsync",{enumerable:!0,get:function(){return n.createShikiPrimitiveAsync}}),Object.defineProperty(e,"createSingletonShorthands",{enumerable:!0,get:function(){return se}}),Object.defineProperty(e,"flatTokenVariants",{enumerable:!0,get:function(){return k}}),Object.defineProperty(e,"getLastGrammarState",{enumerable:!0,get:function(){return n.getLastGrammarState}}),Object.defineProperty(e,"getSingletonHighlighterCore",{enumerable:!0,get:function(){return re}}),Object.defineProperty(e,"getTokenStyleObject",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"guessEmbeddedLanguages",{enumerable:!0,get:function(){return d}}),Object.defineProperty(e,"hastToHtml",{enumerable:!0,get:function(){return X}}),Object.defineProperty(e,"isNoneTheme",{enumerable:!0,get:function(){return n.isNoneTheme}}),Object.defineProperty(e,"isPlainLang",{enumerable:!0,get:function(){return n.isPlainLang}}),Object.defineProperty(e,"isSpecialLang",{enumerable:!0,get:function(){return n.isSpecialLang}}),Object.defineProperty(e,"isSpecialTheme",{enumerable:!0,get:function(){return n.isSpecialTheme}}),Object.defineProperty(e,"makeSingletonHighlighter",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(e,"makeSingletonHighlighterCore",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(e,"normalizeGetter",{enumerable:!0,get:function(){return n.normalizeGetter}}),Object.defineProperty(e,"normalizeTheme",{enumerable:!0,get:function(){return n.normalizeTheme}}),Object.defineProperty(e,"resolveColorReplacements",{enumerable:!0,get:function(){return n.resolveColorReplacements}}),Object.defineProperty(e,"splitLines",{enumerable:!0,get:function(){return n.splitLines}}),Object.defineProperty(e,"splitToken",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"splitTokens",{enumerable:!0,get:function(){return y}}),Object.defineProperty(e,"stringifyTokenStyle",{enumerable:!0,get:function(){return T}}),Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return n.toArray}}),Object.defineProperty(e,"tokenizeAnsiWithTheme",{enumerable:!0,get:function(){return G}}),Object.defineProperty(e,"tokenizeWithTheme",{enumerable:!0,get:function(){return n.tokenizeWithTheme}}),Object.defineProperty(e,"tokensToHast",{enumerable:!0,get:function(){return U}}),Object.defineProperty(e,"transformerDecorations",{enumerable:!0,get:function(){return w}});var t=_r(_d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=_r(_d[1]),r=_r(_d[2]),o=_r(_d[3]);const i=/\s+/g;function s(t,n){if(!n)return t;t.properties||={},t.properties.class||=[],"string"==typeof t.properties.class&&(t.properties.class=t.properties.class.split(i)),Array.isArray(t.properties.class)||(t.properties.class=[]);const r=Array.isArray(n)?n:n.split(i);for(const n of r)n&&!t.properties.class.includes(n)&&t.properties.class.push(n);return t}const a=/:?lang=["']([^"']+)["']/g,l=/(?:```|~~~)([\w-]+)/g,c=/\\begin\{([\w-]+)\}/g,u=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,f=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function g(t){const r=(0,n.splitLines)(t,!0),o=r.map(([t])=>t),i=r.map(([,t])=>t);return{lines:o,indexToPos:function(n){if(n===t.length)return{line:o.length-1,character:o.at(-1).length};let r=0,s=o.length-1;for(;r<s;){const t=r+s+1>>>1;i[t]<=n?r=t:s=t-1}return{line:r,character:n-i[r]}},posToIndex:function(t,n){return i[t]+n}}}function d(t,n,r){const o=new Set;for(const n of t.matchAll(a)){const t=n[1].toLowerCase().trim();t&&o.add(t)}for(const n of t.matchAll(l)){const t=n[1].toLowerCase().trim();t&&o.add(t)}for(const n of t.matchAll(c)){const t=n[1].toLowerCase().trim();t&&o.add(t)}for(const n of t.matchAll(u)){const t=n[1].toLowerCase().trim(),r=t.includes("/")?t.split("/").pop():t;r&&o.add(r)}if(f.test(t)&&o.add("yaml"),!r)return[...o];const i=r.getBundledLanguages();return[...o].filter(t=>t&&i[t])}const h=["color","background-color"];function p(t,n){let r=0;const o=[];for(const i of n)i>r&&o.push(Object.assign({},t,{content:t.content.slice(r,i),offset:t.offset+r})),r=i;return r<t.content.length&&o.push(Object.assign({},t,{content:t.content.slice(r),offset:t.offset+r})),o}function b(t,n){let r=0,o=t.length;for(;r<o;){const i=r+(o-r>>1);t[i]<=n?r=i+1:o=i}return r}function y(t,n){const r=[...n instanceof Set?n:new Set(n)].sort((t,n)=>t-n);return r.length?t.map(t=>t.flatMap(t=>{const n=t.offset+t.content.length,o=b(r,t.offset);let i=o;for(;i<r.length&&r[i]<n;)i++;if(o===i)return t;const s=r.slice(o,i);for(let n=0;n<s.length;n++)s[n]-=t.offset;return p(t,s)})):t}function k(n,r,o,i,s="css-vars"){const a={content:n.content,explanation:n.explanation,offset:n.offset},l=r.map(t=>S(n.variants[t])),c=new Set(l.flatMap(t=>Object.keys(t))),u={},f=(t,n)=>{const i="color"===n?"":"background-color"===n?"-bg":`-${n}`;return o+r[t]+("color"===n?"":i)};return l.forEach((n,o)=>{for(const a of c){const c=n[a]||"inherit";if(0===o&&i&&h.includes(a))if("light-dark()"===i&&l.length>1){const n=r.findIndex(t=>"light"===t),i=r.findIndex(t=>"dark"===t);if(-1===n||-1===i)throw new t.ShikiError("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");const g=l[n][a]||"inherit",d=l[i][a]||"inherit";u[a]=`light-dark(${g}, ${d})`,"css-vars"===s&&(u[f(o,a)]=c)}else u[a]=c;else"css-vars"===s&&(u[f(o,a)]=c)}}),a.htmlStyle=u,a}function S(t){const n={};if(t.color&&(n.color=t.color),t.bgColor&&(n["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&r.FontStyle.Italic&&(n["font-style"]="italic"),t.fontStyle&r.FontStyle.Bold&&(n["font-weight"]="bold");const o=[];t.fontStyle&r.FontStyle.Underline&&o.push("underline"),t.fontStyle&r.FontStyle.Strikethrough&&o.push("line-through"),o.length&&(n["text-decoration"]=o.join(" "))}return n}function T(t){return"string"==typeof t?t:Object.entries(t).map(([t,n])=>`${t}:${n}`).join(";")}function w(){const n=new WeakMap;function r(r){if(!n.has(r.meta)){const o=g(r.source);function i(n){if("number"==typeof n){if(n<0||n>r.source.length)throw new t.ShikiError(`Invalid decoration offset: ${n}. Code length: ${r.source.length}`);return Object.assign({},o.indexToPos(n),{offset:n})}{const r=o.lines[n.line];if(void 0===r)throw new t.ShikiError(`Invalid decoration position ${JSON.stringify(n)}. Lines length: ${o.lines.length}`);let i=n.character;if(i<0&&(i=r.length+i),i<0||i>r.length)throw new t.ShikiError(`Invalid decoration position ${JSON.stringify(n)}. Line ${n.line} length: ${r.length}`);return Object.assign({},n,{character:i,offset:o.posToIndex(n.line,i)})}}const s=(r.options.decorations||[]).map(t=>Object.assign({},t,{start:i(t.start),end:i(t.end)}));v(s),n.set(r.meta,{decorations:s,converter:o,source:r.source})}return n.get(r.meta)}return{name:"shiki:decorations",tokens(t){if(this.options.decorations?.length)return y(t,r(this).decorations.flatMap(t=>[t.start.offset,t.end.offset]))},code(n){if(!this.options.decorations?.length)return;const o=r(this),i=[...n.children].filter(t=>"element"===t.type&&"span"===t.tagName);if(i.length!==o.converter.lines.length)throw new t.ShikiError(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${o.converter.lines.length}). Failed to apply decorations.`);function a(n,r,o,s){const a=i[n];let l="",u=-1,f=-1;if(0===r&&(u=0),0===o&&(f=0),o===Number.POSITIVE_INFINITY&&(f=a.children.length),-1===u||-1===f)for(let t=0;t<a.children.length;t++)l+=j(a.children[t]),-1===u&&l.length===r&&(u=t+1),-1===f&&l.length===o&&(f=t+1);if(-1===u)throw new t.ShikiError(`Failed to find start index for decoration ${JSON.stringify(s.start)}`);if(-1===f)throw new t.ShikiError(`Failed to find end index for decoration ${JSON.stringify(s.end)}`);const g=a.children.slice(u,f);if(s.alwaysWrap||g.length!==a.children.length)if(s.alwaysWrap||1!==g.length||"element"!==g[0].type){const t={type:"element",tagName:"span",properties:{},children:g};c(t,s,"wrapper"),a.children.splice(u,g.length,t)}else c(g[0],s,"token");else c(a,s,"line")}function l(t,n){i[t]=c(i[t],n,"line")}function c(t,n,r){const o=n.properties||{},i=n.transform||(t=>t);return t.tagName=n.tagName||"span",t.properties=Object.assign({},t.properties,o,{class:t.properties.class}),n.properties?.class&&s(t,n.properties.class),t=i(t,r)||t}const u=[],f=o.decorations.sort((t,n)=>n.start.offset-t.start.offset||t.end.offset-n.end.offset);for(const t of f){const{start:n,end:r}=t;if(n.line===r.line)a(n.line,n.character,r.character,t);else if(n.line<r.line){a(n.line,n.character,Number.POSITIVE_INFINITY,t);for(let o=n.line+1;o<r.line;o++)u.push(()=>l(o,t));a(r.line,0,r.character,t)}}for(let t=u.length-1;t>=0;t--)u[t]()}}}function v(n){if(!O(n))for(let r=0;r<n.length;r++){const o=n[r];if(o.start.offset>o.end.offset)throw new t.ShikiError(`Invalid decoration range: ${JSON.stringify(o.start)} - ${JSON.stringify(o.end)}`);for(let i=r+1;i<n.length;i++){const r=n[i],s=o.start.offset<=r.start.offset&&r.start.offset<o.end.offset,a=o.start.offset<r.end.offset&&r.end.offset<=o.end.offset,l=r.start.offset<=o.start.offset&&o.start.offset<r.end.offset,c=r.start.offset<o.end.offset&&o.end.offset<=r.end.offset;if(s||a||l||c){if(s&&a)continue;if(l&&c)continue;if(l&&o.start.offset===o.end.offset)continue;if(a&&r.start.offset===r.end.offset)continue;throw new t.ShikiError(`Decorations ${JSON.stringify(o.start)} and ${JSON.stringify(r.start)} intersect.`)}}}}function O(t){const n=[],r=new Map,o=new Map;for(let i=0;i<t.length;i++){const{start:s,end:a}=t[i];if(s.offset>a.offset)return!1;s.offset!==a.offset&&(n.push(t[i]),r.has(s.offset)||r.set(s.offset,i),o.set(a.offset,i))}for(let n=0;n<t.length;n++){const{start:i,end:s}=t[n];if(i.offset===s.offset&&((r.get(i.offset)??n)<n||(o.get(i.offset)??n)>n))return!1}n.sort((t,n)=>t.start.offset-n.start.offset||n.end.offset-t.end.offset);const i=[];for(const{start:t,end:r}of n){for(;i.length&&i.at(-1)<=t.offset;)i.pop();if(i.length&&r.offset>i.at(-1))return!1;i.push(r.offset)}return!0}function j(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(j).join(""):""}const P=[w()];function C(t){const n=$(t.transformers||[]);return[...n.pre,...n.normal,...n.post,...P]}function $(t){const n=[],r=[],o=[];for(const i of t)switch(i.enforce){case"pre":n.push(i);break;case"post":r.push(i);break;default:o.push(i)}return{pre:n,post:r,normal:o}}var N=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],B={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function L(t,n){const r=t.indexOf("\x1b",n);if(-1!==r&&"["===t[r+1]){const n=t.indexOf("m",r);if(-1!==n)return{sequence:t.substring(r+2,n).split(";"),startPosition:r,position:n+1}}return{position:t.length}}function F(t){const n=t.shift();if("2"===n){const n=t.splice(0,3).map(t=>Number.parseInt(t));if(3!==n.length||n.some(t=>Number.isNaN(t)))return;return{type:"rgb",rgb:n}}if("5"===n){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function x(t){const n=[];for(;t.length>0;){const r=t.shift();if(!r)continue;const o=Number.parseInt(r);if(!Number.isNaN(o))if(0===o)n.push({type:"resetAll"});else if(o<=9)B[o]&&n.push({type:"setDecoration",value:B[o]});else if(o<=29){const t=B[o-20];t&&(n.push({type:"resetDecoration",value:t}),"dim"===t&&n.push({type:"resetDecoration",value:"bold"}))}else if(o<=37)n.push({type:"setForegroundColor",value:{type:"named",name:N[o-30]}});else if(38===o){const r=F(t);r&&n.push({type:"setForegroundColor",value:r})}else if(39===o)n.push({type:"resetForegroundColor"});else if(o<=47)n.push({type:"setBackgroundColor",value:{type:"named",name:N[o-40]}});else if(48===o){const r=F(t);r&&n.push({type:"setBackgroundColor",value:r})}else 49===o?n.push({type:"resetBackgroundColor"}):53===o?n.push({type:"setDecoration",value:"overline"}):55===o?n.push({type:"resetDecoration",value:"overline"}):o>=90&&o<=97?n.push({type:"setForegroundColor",value:{type:"named",name:N[o-90+8]}}):o>=100&&o<=107&&n.push({type:"setBackgroundColor",value:{type:"named",name:N[o-100+8]}})}return n}function E(){let t=null,n=null,r=new Set;return{parse(o){const i=[];let s=0;do{const a=L(o,s),l=a.sequence?o.substring(s,a.startPosition):o.substring(s);if(l.length>0&&i.push({value:l,foreground:t,background:n,decorations:new Set(r)}),a.sequence){const o=x(a.sequence);for(const i of o)"resetAll"===i.type?(t=null,n=null,r.clear()):"resetForegroundColor"===i.type?t=null:"resetBackgroundColor"===i.type?n=null:"resetDecoration"===i.type&&r.delete(i.value);for(const i of o)"setForegroundColor"===i.type?t=i.value:"setBackgroundColor"===i.type?n=i.value:"setDecoration"===i.type&&r.add(i.value)}s=a.position}while(s<o.length);return i}}}var I={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 H(t=I){function n(n){return t[n]}function r(t){return`#${t.map(t=>Math.max(0,Math.min(t,255)).toString(16).padStart(2,"0")).join("")}`}let o;function i(){if(o)return o;o=[];for(let t=0;t<N.length;t++)o.push(n(N[t]));let t=[0,95,135,175,215,255];for(let n=0;n<6;n++)for(let i=0;i<6;i++)for(let s=0;s<6;s++)o.push(r([t[n],t[i],t[s]]));let i=8;for(let t=0;t<24;t++,i+=10)o.push(r([i,i,i]));return o}return{value:function(t){switch(t.type){case"named":return n(t.name);case"rgb":return r(t.rgb);case"table":return o=t.index,i()[o]}var o}}}const W=/#([0-9a-f]{3,8})/i,M=/var\((--[\w-]+-ansi-[\w-]+)\)/,A={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 G(t,o,i){const s=(0,n.resolveColorReplacements)(t,i),a=(0,n.splitLines)(o),l=H(Object.fromEntries(N.map(n=>{const r=`terminal.ansi${n[0].toUpperCase()}${n.substring(1)}`;return[n,t.colors?.[r]||A[n]]}))),c=E();return a.map(o=>c.parse(o[0]).map(i=>{let a,c;i.decorations.has("reverse")?(a=i.background?l.value(i.background):t.bg,c=i.foreground?l.value(i.foreground):t.fg):(a=i.foreground?l.value(i.foreground):t.fg,c=i.background?l.value(i.background):void 0),a=(0,n.applyColorReplacements)(a,s),c=(0,n.applyColorReplacements)(c,s),i.decorations.has("dim")&&(a=R(a));let u=r.FontStyle.None;return i.decorations.has("bold")&&(u|=r.FontStyle.Bold),i.decorations.has("italic")&&(u|=r.FontStyle.Italic),i.decorations.has("underline")&&(u|=r.FontStyle.Underline),i.decorations.has("strikethrough")&&(u|=r.FontStyle.Strikethrough),{content:i.value,offset:o[1],color:a,bgColor:c,fontStyle:u}}))}function R(t){const n=t.match(W);if(n){const t=n[1];if(8===t.length){const n=Math.round(Number.parseInt(t.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${t.slice(0,6)}${n}`}if(6===t.length)return`#${t}80`;if(4===t.length){const n=t[0],r=t[1],o=t[2],i=t[3];return`#${n}${n}${r}${r}${o}${o}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0")}`}if(3===t.length){const n=t[0],r=t[1],o=t[2];return`#${n}${n}${r}${r}${o}${o}80`}}const r=t.match(M);return r?`var(${r[1]}-dim)`:t}function D(t,r,o={}){const i=t.resolveLangAlias(o.lang||"text"),{theme:s=t.getLoadedThemes()[0]}=o;if(!(0,n.isPlainLang)(i)&&!(0,n.isNoneTheme)(s)&&"ansi"===i){const{theme:n}=t.setTheme(s);return G(n,r,o)}return(0,n.codeToTokensBase)(t,r,o)}function Y(r,o,i){let s,a,l,c,u,f;if("themes"in i){const{defaultColor:g="light",cssVariablePrefix:d="--shiki-",colorsRendering:h="css-vars"}=i,p=Object.entries(i.themes).filter(t=>t[1]).map(t=>({color:t[0],theme:t[1]})).sort((t,n)=>t.color===g?-1:n.color===g?1:0);if(0===p.length)throw new t.ShikiError("`themes` option must not be empty");const b=(0,n.codeToTokensWithThemes)(r,o,i,D);if(f=(0,n.getLastGrammarStateFromMap)(b),g&&"light-dark()"!==g&&!p.some(t=>t.color===g))throw new t.ShikiError(`\`themes\` option must contain the defaultColor key \`${g}\``);const y=p.map(t=>r.getTheme(t.theme)),S=p.map(t=>t.color);l=b.map(t=>t.map(t=>k(t,S,d,g,h))),f&&(0,n.setLastGrammarStateToMap)(l,f);const T=p.map(t=>(0,n.resolveColorReplacements)(t.theme,i));a=_(p,y,T,d,g,"fg",h),s=_(p,y,T,d,g,"bg",h),c=`shiki-themes ${y.map(t=>t.name).join(" ")}`,u=g?void 0:[a,s].join(";")}else{if(!("theme"in i))throw new t.ShikiError("Invalid options, either `theme` or `themes` must be provided");{const t=(0,n.resolveColorReplacements)(i.theme,i);l=D(r,o,i);const u=r.getTheme(i.theme);s=(0,n.applyColorReplacements)(u.bg,t),a=(0,n.applyColorReplacements)(u.fg,t),c=u.name,f=(0,n.getLastGrammarStateFromMap)(l)}}return{tokens:l,fg:a,bg:s,themeName:c,rootStyle:u,grammarState:f}}function _(r,o,i,s,a,l,c){return r.map((u,f)=>{const g=(0,n.applyColorReplacements)(o[f][l],i[f])||"inherit",d=`${s+u.color}${"bg"===l?"-bg":""}:${g}`;if(0===f&&a){if("light-dark()"===a&&r.length>1){const s=r.findIndex(t=>"light"===t.color),a=r.findIndex(t=>"dark"===t.color);if(-1===s||-1===a)throw new t.ShikiError("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");return`light-dark(${(0,n.applyColorReplacements)(o[s][l],i[s])||"inherit"}, ${(0,n.applyColorReplacements)(o[a][l],i[a])||"inherit"});${d}`}return g}return"css-vars"===c?d:null}).filter(t=>!!t).join(";")}const J=/^\s+$/,q=/^(\s*)(.*?)(\s*)$/;function z(t,n,r,o={meta:{},options:r,codeToHast:(n,r)=>z(t,n,r),codeToTokens:(n,r)=>Y(t,n,r)}){let i=n;for(const t of C(r))i=t.preprocess?.call(o,i,r)||i;let{tokens:s,fg:a,bg:l,themeName:c,rootStyle:u,grammarState:f}=Y(t,i,r);const{mergeWhitespaces:g=!0,mergeSameStyleTokens:d=!1}=r;!0===g?s=V(s):"never"===g&&(s=K(s)),d&&(s=Q(s));const h=Object.assign({},o,{get source(){return i}});for(const t of C(r))s=t.tokens?.call(h,s)||s;return U(s,Object.assign({},r,{fg:a,bg:l,themeName:c,rootStyle:!1!==r.rootStyle&&(r.rootStyle??u)}),h,f)}function U(t,r,o,i=(0,n.getLastGrammarStateFromMap)(t)){const a=C(r),l=[],c={type:"root",children:[]},{structure:u="classic",tabindex:f="0"}=r,g={class:`shiki ${r.themeName||""}`};!1!==r.rootStyle&&(null!=r.rootStyle?g.style=r.rootStyle:g.style=`background-color:${r.bg};color:${r.fg}`),!1!==f&&null!=f&&(g.tabindex=f.toString());for(const[t,n]of Object.entries(r.meta||{}))t.startsWith("_")||(g[t]=n);let d={type:"element",tagName:"pre",properties:g,children:[],data:r.data},h={type:"element",tagName:"code",properties:{},children:l};const p=[],b=Object.assign({},o,{structure:u,addClassToHast:s,get source(){return o.source},get tokens(){return t},get options(){return r},get root(){return c},get pre(){return d},get code(){return h},get lines(){return p}});if(t.forEach((t,n)=>{n&&("inline"===u?c.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===u&&l.push({type:"text",value:"\n"}));let r={type:"element",tagName:"span",properties:{class:"line"},children:[]},o=0;for(const i of t){let t={type:"element",tagName:"span",properties:Object.assign({},i.htmlAttrs),children:[{type:"text",value:i.content}]};const s=T(i.htmlStyle||S(i));s&&(t.properties.style=s);for(const s of a)t=s?.span?.call(b,t,n+1,o,r,i)||t;"inline"===u?c.children.push(t):"classic"===u&&r.children.push(t),o+=i.content.length}if("classic"===u){for(const t of a)r=t?.line?.call(b,r,n+1)||r;p.push(r),l.push(r)}else"inline"===u&&p.push(r)}),"classic"===u){for(const t of a)h=t?.code?.call(b,h)||h;d.children.push(h);for(const t of a)d=t?.pre?.call(b,d)||d;c.children.push(d)}else if("inline"===u){const t=[];let n={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const r of c.children)"element"===r.type&&"br"===r.tagName?(t.push(n),n={type:"element",tagName:"span",properties:{class:"line"},children:[]}):"element"!==r.type&&"text"!==r.type||n.children.push(r);t.push(n);let r={type:"element",tagName:"code",properties:{},children:t};for(const t of a)r=t?.code?.call(b,r)||r;c.children=[];for(let t=0;t<r.children.length;t++){t>0&&c.children.push({type:"element",tagName:"br",properties:{},children:[]});const n=r.children[t];"element"===n.type&&c.children.push(...n.children)}}let y=c;for(const t of a)y=t?.root?.call(b,y)||y;return i&&(0,n.setLastGrammarStateToMap)(y,i),y}function V(t){return t.map(t=>{const n=[];let o,i="";return t.forEach((s,a)=>{const l=!(s.fontStyle&&(s.fontStyle&r.FontStyle.Underline||s.fontStyle&r.FontStyle.Strikethrough));l&&J.test(s.content)&&t[a+1]?(void 0===o&&(o=s.offset),i+=s.content):i?(l?n.push(Object.assign({},s,{offset:o,content:i+s.content})):n.push({content:i,offset:o},s),o=void 0,i=""):n.push(s)}),n})}function K(t){return t.map(t=>t.flatMap(t=>{if(J.test(t.content))return t;const n=t.content.match(q);if(!n)return t;const[,r,o,i]=n;if(!r&&!i)return t;const s=[Object.assign({},t,{offset:t.offset+r.length,content:o})];return r&&s.unshift({content:r,offset:t.offset}),i&&s.push({content:i,offset:t.offset+r.length+o.length}),s}))}function Q(t){return t.map(t=>{const n=[];for(const o of t){if(0===n.length){n.push(Object.assign({},o));continue}const t=n.at(-1),i=T(t.htmlStyle||S(t)),s=T(o.htmlStyle||S(o)),a=t.fontStyle&&(t.fontStyle&r.FontStyle.Underline||t.fontStyle&r.FontStyle.Strikethrough),l=o.fontStyle&&(o.fontStyle&r.FontStyle.Underline||o.fontStyle&r.FontStyle.Strikethrough);a||l||i!==s?n.push(Object.assign({},o)):t.content+=o.content}return n})}const X=o.toHtml;function Z(t,n,r){const o={meta:{},options:r,codeToHast:(n,r)=>z(t,n,r),codeToTokens:(n,r)=>Y(t,n,r)};let i=X(z(t,n,r,o));for(const t of C(r))i=t.postprocess?.call(o,i,r)||i;return i}async function ee(t){const r=await(0,n.createShikiPrimitiveAsync)(t);return Object.assign({getLastGrammarState:(...t)=>(0,n.getLastGrammarState)(r,...t),codeToTokensBase:(t,n)=>D(r,t,n),codeToTokensWithThemes:(t,o)=>(0,n.codeToTokensWithThemes)(r,t,o),codeToTokens:(t,n)=>Y(r,t,n),codeToHast:(t,n)=>z(r,t,n),codeToHtml:(t,n)=>Z(r,t,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({})},r,{getInternalContext:()=>r})}function te(t){const r=(0,n.createShikiPrimitive)(t);return Object.assign({getLastGrammarState:(...t)=>(0,n.getLastGrammarState)(r,...t),codeToTokensBase:(t,n)=>D(r,t,n),codeToTokensWithThemes:(t,o)=>(0,n.codeToTokensWithThemes)(r,t,o),codeToTokens:(t,n)=>Y(r,t,n),codeToHast:(t,n)=>z(r,t,n),codeToHtml:(t,n)=>Z(r,t,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({})},r,{getInternalContext:()=>r})}function ne(t){let n;return async function(r){if(n){const t=await n;return await Promise.all([t.loadTheme(...r.themes||[]),t.loadLanguage(...r.langs||[])]),t}return n=t(Object.assign({},r,{themes:r.themes||[],langs:r.langs||[]})),n}}const re=ne(ee);function oe(r){const o=r.langs,i=r.themes,s=r.engine;return async function(r){function a(i){if("string"==typeof i){if(i=r.langAlias?.[i]||i,(0,n.isSpecialLang)(i))return[];const s=o[i];if(!s)throw new t.ShikiError(`Language \`${i}\` is not included in this bundle. You may want to load it from external source.`);return s}return i}function l(r){if((0,n.isSpecialTheme)(r))return"none";if("string"==typeof r){const n=i[r];if(!n)throw new t.ShikiError(`Theme \`${r}\` is not included in this bundle. You may want to load it from external source.`);return n}return r}const c=(r.themes??[]).map(t=>l(t)),u=(r.langs??[]).map(t=>a(t)),f=await ee(Object.assign({engine:r.engine??s()},r,{themes:c,langs:u}));return Object.assign({},f,{loadLanguage:(...t)=>f.loadLanguage(...t.map(a)),loadTheme:(...t)=>f.loadTheme(...t.map(l)),getBundledLanguages:()=>o,getBundledThemes:()=>i})}}function ie(t){let n;return async function(r={}){if(n){const t=await n;return await Promise.all([t.loadTheme(...r.themes||[]),t.loadLanguage(...r.langs||[])]),t}{n=t(Object.assign({},r,{themes:[],langs:[]}));const o=await n;return await Promise.all([o.loadTheme(...r.themes||[]),o.loadLanguage(...r.langs||[])]),o}}}function se(t,n){const r=ie(t);async function o(t,o){const i=await r({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),s=await(n?.guessEmbeddedLanguages?.(t,o.lang,i));return s&&await i.loadLanguage(...s),i}return{getSingletonHighlighter:t=>r(t),codeToHtml:async(t,n)=>(await o(t,n)).codeToHtml(t,n),codeToHast:async(t,n)=>(await o(t,n)).codeToHast(t,n),codeToTokens:async(t,n)=>(await o(t,n)).codeToTokens(t,n),codeToTokensBase:async(t,n)=>(await o(t,n)).codeToTokensBase(t,n),codeToTokensWithThemes:async(t,n)=>(await o(t,n)).codeToTokensWithThemes(t,n),getLastGrammarState:async(t,n)=>(await r({langs:[n.lang],themes:[n.theme]})).getLastGrammarState(t,n)}}function ae(t={}){const{name:n="css-variables",variablePrefix:r="--shiki-",fontStyle:o=!0}=t,i=n=>t.variableDefaults?.[n]?`var(${r}${n}, ${t.variableDefaults[n]})`:`var(${r}${n})`,s={name:n,type:"dark",colors:{"editor.foreground":i("foreground"),"editor.background":i("background"),"terminal.ansiBlack":i("ansi-black"),"terminal.ansiRed":i("ansi-red"),"terminal.ansiGreen":i("ansi-green"),"terminal.ansiYellow":i("ansi-yellow"),"terminal.ansiBlue":i("ansi-blue"),"terminal.ansiMagenta":i("ansi-magenta"),"terminal.ansiCyan":i("ansi-cyan"),"terminal.ansiWhite":i("ansi-white"),"terminal.ansiBrightBlack":i("ansi-bright-black"),"terminal.ansiBrightRed":i("ansi-bright-red"),"terminal.ansiBrightGreen":i("ansi-bright-green"),"terminal.ansiBrightYellow":i("ansi-bright-yellow"),"terminal.ansiBrightBlue":i("ansi-bright-blue"),"terminal.ansiBrightMagenta":i("ansi-bright-magenta"),"terminal.ansiBrightCyan":i("ansi-bright-cyan"),"terminal.ansiBrightWhite":i("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:i("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:i("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:i("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:i("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:i("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:i("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:i("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:i("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:i("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:i("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:i("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:i("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:i("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:i("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:i("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:i("token-changed")}}]};return o||(s.tokenColors=s.tokenColors?.map(t=>(t.settings?.fontStyle&&delete t.settings.fontStyle,t))),s}},1162,[1163,1164,1165,1166]);
18
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ShikiError",{enumerable:!0,get:function(){return t}});var t=class extends Error{constructor(t){super(t),this.name="ShikiError"}}},1163,[]);
19
- __d(function(_g,_r,_i,_a,m,_e,d){"use strict";const e=["content","explanation","offset"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"GrammarState",{enumerable:!0,get:function(){return N}}),Object.defineProperty(_e,"Registry",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"Resolver",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"alignThemesTokenization",{enumerable:!0,get:function(){return V}}),Object.defineProperty(_e,"applyColorReplacements",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"codeToTokensBase",{enumerable:!0,get:function(){return z}}),Object.defineProperty(_e,"codeToTokensWithThemes",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(_e,"createShikiInternal",{enumerable:!0,get:function(){return E}}),Object.defineProperty(_e,"createShikiInternalSync",{enumerable:!0,get:function(){return C}}),Object.defineProperty(_e,"createShikiPrimitive",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"createShikiPrimitiveAsync",{enumerable:!0,get:function(){return M}}),Object.defineProperty(_e,"getGrammarStack",{enumerable:!0,get:function(){return $}}),Object.defineProperty(_e,"getLastGrammarState",{enumerable:!0,get:function(){return B}}),Object.defineProperty(_e,"getLastGrammarStateFromMap",{enumerable:!0,get:function(){return I}}),Object.defineProperty(_e,"isNoneTheme",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_e,"isPlainLang",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"isSpecialLang",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"isSpecialTheme",{enumerable:!0,get:function(){return f}}),Object.defineProperty(_e,"normalizeGetter",{enumerable:!0,get:function(){return g}}),Object.defineProperty(_e,"normalizeTheme",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"resolveColorReplacements",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"resolveLangAlias",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"resolveLangs",{enumerable:!0,get:function(){return L}}),Object.defineProperty(_e,"resolveThemes",{enumerable:!0,get:function(){return S}}),Object.defineProperty(_e,"setLastGrammarStateToMap",{enumerable:!0,get:function(){return x}}),Object.defineProperty(_e,"splitLines",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"toArray",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"tokenizeWithTheme",{enumerable:!0,get:function(){return F}});var t,n=_r(d[0]),r=(t=n)&&t.__esModule?t:{default:t},s=_r(d[1]);Object.keys(s).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return s[e]}})});var a=_r(d[2]);function o(e,t){const n="string"==typeof e?{}:Object.assign({},e.colorReplacements),r="string"==typeof e?e:e.name;for(const[e,s]of Object.entries(t?.colorReplacements||{}))"string"==typeof s?n[e]=s:e===r&&Object.assign(n,s);return n}function i(e,t){return e&&t?.[e?.toLowerCase()]||e}function c(e){return Array.isArray(e)?e:[e]}async function g(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function l(e){return!e||["plaintext","txt","text","plain"].includes(e)}function u(e){return"ansi"===e||l(e)}function h(e){return"none"===e}function f(e){return h(e)}const p=/(\r?\n)/g;function b(e,t=!1){if(0===e.length)return[["",0]];const n=e.split(p);let r=0;const s=[];for(let e=0;e<n.length;e+=2){const a=t?n[e]+(n[e+1]||""):n[e];s.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return s}const y={light:"#333333",dark:"#bbbbbb"},k={light:"#fffffe",dark:"#1e1e1e"},_="__shiki_resolved";function j(e){if(e?.[_])return e;const t=Object.assign({},e);t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements=Object.assign({},t.colorReplacements),t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const 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||(r="light"===t.type?y.light:y.dark),n||(n="light"===t.type?k.light:k.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 s=0;const a=new Map;function o(e){if(a.has(e))return a.get(e);s+=1;const n=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{const n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;const s=Object.assign({},e,{settings:Object.assign({},e.settings)});if(n){const n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,s.settings.foreground=n}if(r){const n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,s.settings.background=n}return s});for(const e of Object.keys(t.colors||{}))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){const n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,_,{enumerable:!1,writable:!1,value:!0}),t}async function L(e){return[...new Set((await Promise.all(e.filter(e=>!u(e)).map(async e=>await g(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function S(e){return(await Promise.all(e.map(async e=>f(e)?null:j(await g(e))))).filter(e=>!!e)}function T(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new s.ShikiError(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var w=class extends a.Registry{_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"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=j(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=a.Theme.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=T(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null;for(const e of t)this.reloadLanguage(e);if(e.injectTo){const t=[...this._langMap.values()].filter(t=>t!==e&&this._resolvedGrammars.has(t.name)&&e.injectTo.some(e=>t.scopeName===e||t.scopeName.startsWith(`${e}.`))&&!this.hasCurrentInjections(t.scopeName));for(const e of t)this.reloadLanguage(e)}}hasCurrentInjections(e){const t=this._syncRegistry?._injectionGrammars?.get(e)||[],n=this._resolver.getInjections(e)||[];return t.length===n.length&&t.every((e,t)=>e===n[t])}reloadLanguage(e){this._syncRegistry?._grammars?.get(e.scopeName)?.dispose(),this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._grammars?.delete(e.scopeName),this._syncRegistry?._injectionGrammars?.set(e.scopeName,this._resolver.getInjections(e.scopeName)||[]),this.loadLanguage(this._langMap.get(e.name)||e)}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const t of e)this.resolveEmbeddedLanguages(t);const t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){const e=t.filter(([e,t])=>!!t&&(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e))).filter(e=>!n.includes(e));throw new s.ShikiError(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(const[e,n]of t)this._resolver.addLanguage(n);for(const[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(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);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const e of t)this._langGraph.set(e,this._langMap.get(e))}},O=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;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).includes(e.scopeName)||this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let e=1;e<=t.length;e++){const r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}};let v=0;function P(e){v+=1,!1!==e.warnings&&v>=10&&v%10==0&&console.warn(`[Shiki] ${v} 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 s.ShikiError("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(j),a=new w(new O(e.engine,n),r,n,e.langAlias);let o;function i(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};l();const t=a.getTheme(e);if(!t)throw new s.ShikiError(`Theme \`${e}\` not found, you may need to load it first`);return t}function c(...e){l(),a.loadLanguages(e.flat(1))}function g(...e){l();for(const t of e.flat(1))a.loadTheme(t)}function l(){if(t)throw new s.ShikiError("Shiki instance has been disposed")}function u(){t||(t=!0,a.dispose(),v-=1)}return{setTheme:function(e){l();const t=i(e);return o!==e&&(a.setTheme(t),o=e),{theme:t,colorMap:a.getColorMap()}},getTheme:i,getLanguage:function(e){l();const t=a.getGrammar("string"==typeof e?e:e.name);if(!t)throw new s.ShikiError(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return l(),a.getLoadedThemes()},getLoadedLanguages:function(){return l(),a.getLoadedLanguages()},resolveLangAlias:function(t){return T(t,e.langAlias)},loadLanguage:async function(...e){return c(await L(e))},loadLanguageSync:c,loadTheme:async function(...e){return l(),g(await S(e))},loadThemeSync:g,dispose:u,[Symbol.dispose]:u}}const C=P;async function M(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([S(e.themes||[]),L(e.langs||[]),e.engine]);return P(Object.assign({},e,{themes:t,langs:n,engine:r}))}const E=M,G=new WeakMap;function x(e,t){G.set(e,t)}function I(e){return G.get(e)}var N=class e{_stacks={};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(c(n).map(e=>[e,a.INITIAL])),t)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return R(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function R(e){const t=[],n=new Set;return(function e(r){if(n.has(r))return;n.add(r);const s=r?.nameScopesList?.scopeName;s&&t.push(s),r.parent&&e(r.parent)})(e),t}function $(e,t){if(!(e instanceof N))throw new s.ShikiError("Invalid grammar state");return e.getInternalStack(t)}const A=/,/,W=/ /;function z(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(l(e.resolveLangAlias(n.lang||"text"))||h(r))return b(t).map(e=>[{content:e[0],offset:e[1]}]);const{theme:a,colorMap:o}=e.setTheme(r),i=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==i.name)throw new s.ShikiError(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(a.name))throw new s.ShikiError(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return F(t,i,a,o,n)}function B(...e){if(2===e.length)return I(e[1]);const[t,n,r={}]=e,{lang:a="text",theme:o=t.getLoadedThemes()[0]}=r;if(l(a)||h(o))throw new s.ShikiError("Plain language does not have grammar state");if("ansi"===a)throw new s.ShikiError("ANSI language does not have grammar state");const{theme:i,colorMap:c}=t.setTheme(o),g=t.getLanguage(a);return new N(q(n,g,i,c,r).stateStack,g.name,i.name)}function F(e,t,n,r,s){const a=q(e,t,n,r,s),o=new N(a.stateStack,t.name,n.name);return x(a.tokens,o),a.tokens}function q(e,t,n,r,s){const c=o(n,s),{tokenizeMaxLineLength:g=0,tokenizeTimeLimit:l=500,includeExplanation:u=!1}=s,h=b(e);let f=s.grammarState?$(s.grammarState,n.name)??a.INITIAL:null!=s.grammarContextCode?q(s.grammarContextCode,t,n,r,Object.assign({},s,{grammarState:void 0,grammarContextCode:void 0})).stateStack:a.INITIAL,p=[];const y=[];for(let e=0,s=h.length;e<s;e++){const[s,o]=h[e];if(""===s){p=[],y.push([]);continue}if(g>0&&s.length>=g){p=[],y.push([{content:s,offset:o,color:"",fontStyle:0}]);continue}let b,k,_;u&&"tokenType"!==u&&(b=t.tokenizeLine(s,f,l),k=b.tokens,_=0);const j=t.tokenizeLine2(s,f,l),L=j.tokens.length/2;for(let e=0;e<L;e++){const t=j.tokens[2*e],g=e+1<L?j.tokens[2*e+2]:s.length;if(t===g)continue;const l=j.tokens[2*e+1],h=i(r[a.EncodedTokenMetadata.getForeground(l)],c),f=a.EncodedTokenMetadata.getFontStyle(l),b={content:s.substring(t,g),offset:o+t,color:h,fontStyle:f};if("tokenType"===u)b.type=a.EncodedTokenMetadata.getTokenType(l);else if(u){const e=[];if("scopeName"!==u)for(const t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(A).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(W))})}b.explanation=[];let r=0;for(;t+r<g;){const t=k[_],n=s.substring(t.startIndex,t.endIndex);r+=n.length,b.explanation.push({content:n,scopes:"scopeName"===u?J(t.scopes):U(e,t.scopes)}),_+=1}}p.push(b)}y.push(p),p=[],f=j.ruleStack}return{tokens:y,stateStack:f}}function J(e){return e.map(e=>({scopeName:e}))}function U(e,t){const n=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];n[r]={scopeName:s,themeMatches:K(e,s,t.slice(0,r))}}return n}function D(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function H(e,t,n){if(!D(e.at(-1),t))return!1;let r=e.length-2,s=n.length-1;for(;r>=0&&s>=0;)D(e[r],n[s])&&(r-=1),s-=1;return-1===r}function K(e,t,n){const r=[];for(const{selectors:s,settings:a}of e)for(const e of s)if(H(e,t,n)){r.push(a);break}return r}function Q(t,n,s,a=z){const o=Object.entries(s.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=o.map(e=>{const r=a(t,n,Object.assign({},s,{theme:e.theme}));return{tokens:r,state:I(r),theme:"string"==typeof e.theme?e.theme:e.theme.name}}),c=V(...i.map(e=>e.tokens)),g=c[0].map((t,n)=>t.map((t,a)=>{const i={content:t.content,variants:{},offset:t.offset};return"includeExplanation"in s&&s.includeExplanation&&(i.explanation=t.explanation),c.forEach((t,s)=>{const c=t[n][a],g=(0,r.default)(c,e);i.variants[o[s].color]=g}),i})),l=i[0].state?new N(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return l&&x(g,l),g}function V(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const s=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));const o=s.map(()=>0),i=s.map(e=>e[0]);for(;i.every(e=>e);){const e=Math.min(...i.map(e=>e.content.length));for(let t=0;t<n;t++){const n=i[t];n.content.length===e?(a[t].push(n),o[t]+=1,i[t]=s[t][o[t]]):(a[t].push(Object.assign({},n,{content:n.content.slice(0,e)})),i[t]=Object.assign({},n,{content:n.content.slice(e),offset:n.offset+e}))}}}return t}},1164,[25,1163,1165]);
20
- __d(function(g,_r,_i,_a,_m,_e,d){"use strict";function e(e){return Array.isArray(e)?t(e):e instanceof RegExp?e:"object"==typeof e?s(e):e}function t(t){let s=[];for(let n=0,r=t.length;n<r;n++)s[n]=e(t[n]);return s}function s(t){let s={};for(let n in t)s[n]=e(t[n]);return s}function n(e,...t){return t.forEach(t=>{for(let s in t)e[s]=t[s]}),e}function r(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t===e.length-1?r(e.substring(0,e.length-1)):e.substr(1+~t)}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"EncodedTokenMetadata",{enumerable:!0,get:function(){return N}}),Object.defineProperty(_e,"FindOption",{enumerable:!0,get:function(){return L}}),Object.defineProperty(_e,"FontStyle",{enumerable:!0,get:function(){return C}}),Object.defineProperty(_e,"INITIAL",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(_e,"Registry",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(_e,"Theme",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"disposeOnigString",{enumerable:!0,get:function(){return v}});var i=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,o=class{static hasCaptures(e){return null!==e&&(i.lastIndex=0,i.test(e))}static replaceCaptures(e,t,s){return e.replace(i,(e,n,r,i)=>{let o=s[parseInt(n||r,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(i){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function a(e,t){return e<t?-1:e>t?1:0}function c(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let s=e.length,n=t.length;if(s===n){for(let n=0;n<s;n++){let s=a(e[n],t[n]);if(0!==s)return s}return 0}return s-n}function h(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 l(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var u=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},p=class{constructor(e,t,s){this._colorMap=e,this._defaults=t,this._root=s}static createFromRawTheme(e,t){return this.createFromParsedTheme(b(e),t)}static createFromParsedTheme(e,t){return k(e,t)}_cachedMatchRoot=new u(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,s=this._cachedMatchRoot.get(t).find(t=>_(e.parent,t.parentScopes));return s?new S(s.fontStyle,s.foreground,s.background):null}},m=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,s){for(const n of s)t=new e(t,n);return t}static from(...t){let s=null;for(let n=0;n<t.length;n++)s=new e(s,t[n]);return s}push(t){return new e(this,t)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let s=this;for(;s&&s!==e;)t.push(s.scopeName),s=s.parent;return s===e?t.reverse():void 0}};function _(e,t){if(0===t.length)return!0;for(let s=0;s<t.length;s++){let n=t[s],r=!1;if(">"===n){if(s===t.length-1)return!1;n=t[++s],r=!0}for(;e&&!f(e.scopeName,n);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function f(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}var S=class{constructor(e,t,s){this.fontStyle=e,this.foregroundId=t,this.backgroundId=s}};function b(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,s=[],n=0;for(let e=0,r=t.length;e<r;e++){let r,i=t[e];if(!i.settings)continue;if("string"==typeof i.scope){let e=i.scope;e=e.replace(/^[,]+/,""),e=e.replace(/[,]+$/,""),r=e.split(",")}else r=Array.isArray(i.scope)?i.scope:[""];let o=-1;if("string"==typeof i.settings.fontStyle){o=0;let e=i.settings.fontStyle.split(" ");for(let t=0,s=e.length;t<s;t++){switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}}let a=null;"string"==typeof i.settings.foreground&&h(i.settings.foreground)&&(a=i.settings.foreground);let c=null;"string"==typeof i.settings.background&&h(i.settings.background)&&(c=i.settings.background);for(let t=0,i=r.length;t<i;t++){let i=r[t].trim().split(" "),h=i[i.length-1],l=null;i.length>1&&(l=i.slice(0,i.length-1),l.reverse()),s[n++]=new y(h,l,e,o,a,c)}}return s}var y=class{constructor(e,t,s,n,r,i){this.scope=e,this.parentScopes=t,this.index=s,this.fontStyle=n,this.foreground=r,this.background=i}},C=(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))(C||{});function k(e,t){e.sort((e,t)=>{let s=a(e.scope,t.scope);return 0!==s?s:(s=c(e.parentScopes,t.parentScopes),0!==s?s:e.index-t.index)});let s=0,n="#000000",r="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(s=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(r=t.background)}let i=new w(t),o=new S(s,i.getId(n),i.getId(r)),h=new R(new P(0,null,-1,0,0),[]);for(let t=0,s=e.length;t<s;t++){let s=e[t];h.insert(0,s.scope,s.parentScopes,s.fontStyle,i.getId(s.foreground),i.getId(s.background))}return new p(i,o,h)}var w=class{constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,s=e.length;t<s;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new 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)}},A=Object.freeze([]),P=class e{constructor(e,t,s,n,r){this.scopeDepth=e,this.parentScopes=t||A,this.fontStyle=s,this.foreground=n,this.background=r}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let s=0,n=e.length;s<n;s++)t[s]=e[s].clone();return t}acceptOverwrite(e,t,s,n){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==s&&(this.foreground=s),0!==n&&(this.background=n)}},R=class e{constructor(e,t=[],s={}){this._mainRule=e,this._children=s,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let s=0,n=0;for(;">"===e.parentScopes[s]&&s++,">"===t.parentScopes[n]&&n++,!(s>=e.parentScopes.length||n>=t.parentScopes.length);){const r=t.parentScopes[n].length-e.parentScopes[s].length;if(0!==r)return r;s++,n++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,s,n=t.indexOf(".");if(-1===n?(e=t,s=""):(e=t.substring(0,n),s=t.substring(n+1)),this._children.hasOwnProperty(e))return this._children[e].match(s)}const s=this._rulesWithParentScopes.concat(this._mainRule);return s.sort(e._cmpBySpecificity),s}insert(t,s,n,r,i,o){if(""===s)return void this._doInsertHere(t,n,r,i,o);let a,c,h,l=s.indexOf(".");-1===l?(a=s,c=""):(a=s.substring(0,l),c=s.substring(l+1)),this._children.hasOwnProperty(a)?h=this._children[a]:(h=new e(this._mainRule.clone(),P.cloneArr(this._rulesWithParentScopes)),this._children[a]=h),h.insert(t+1,c,n,r,i,o)}_doInsertHere(e,t,s,n,r){if(null!==t){for(let i=0,o=this._rulesWithParentScopes.length;i<o;i++){let o=this._rulesWithParentScopes[i];if(0===c(o.parentScopes,t))return void o.acceptOverwrite(e,s,n,r)}-1===s&&(s=this._mainRule.fontStyle),0===n&&(n=this._mainRule.foreground),0===r&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new P(e,t,s,n,r))}else this._mainRule.acceptOverwrite(e,s,n,r)}},N=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){const s=e.getLanguageId(t),n=e.getTokenType(t),r=e.getFontStyle(t),i=e.getForeground(t),o=e.getBackground(t);console.log({languageId:s,tokenType:n,fontStyle:r,foreground:i,background:o})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static set(t,s,n,r,i,o,a){let c=e.getLanguageId(t),h=e.getTokenType(t),l=e.containsBalancedBrackets(t)?1:0,u=e.getFontStyle(t),p=e.getForeground(t),m=e.getBackground(t);return 0!==s&&(c=s),8!==n&&(h=n),null!==r&&(l=r?1:0),-1!==i&&(u=i),0!==o&&(p=o),0!==a&&(m=a),(c|h<<8|l<<10|u<<11|p<<15|m<<24)>>>0}};function I(e){return e}function G(e,t){const s=[],n=T(e);let r=n.next();for(;null!==r;){let e=0;if(2===r.length&&":"===r.charAt(1)){switch(r.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=n.next()}let t=o();if(s.push({matcher:t,priority:e}),","!==r)break;r=n.next()}return s;function i(){if("-"===r){r=n.next();const e=i();return t=>!!e&&!e(t)}if("("===r){r=n.next();const e=a();return")"===r&&(r=n.next()),e}if(E(r)){const e=[];do{e.push(r),r=n.next()}while(E(r));return s=>t(e,s)}return null}function o(){const e=[];let t=i();for(;t;)e.push(t),t=i();return t=>e.every(e=>e(t))}function a(){const e=[];let t=o();for(;t&&(e.push(t),"|"===r||","===r);){do{r=n.next()}while("|"===r||","===r);t=o()}return t=>e.some(e=>e(t))}}function E(e){return!!e&&!!e.match(/[\w\.:]+/)}function T(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,s=t.exec(e);return{next:()=>{if(!s)return null;const n=s[0];return s=t.exec(e),n}}}var L=(e=>(e[e.None=0]="None",e[e.NotBeginString=1]="NotBeginString",e[e.NotEndString=2]="NotEndString",e[e.NotBeginPosition=4]="NotBeginPosition",e[e.DebugCall=8]="DebugCall",e))(L||{});function v(e){"function"==typeof e.dispose&&e.dispose()}var x=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},B=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},O=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},M=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new x(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;processQueue(){const e=this.Q;this.Q=[];const t=new O;for(const s of e)$(s,this.initialScopeName,this.repo,t);for(const e of t.references)if(e instanceof x){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName))continue;if(this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function $(e,t,s,n){const r=s.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const i=s.lookup(t);e instanceof x?F({baseGrammar:i,selfGrammar:r},n):j(e.ruleName,{baseGrammar:i,selfGrammar:r,repository:r.repository},n);const o=s.injections(e.scopeName);if(o)for(const e of o)n.add(new x(e))}function j(e,t,s){if(t.repository&&t.repository[e]){W([t.repository[e]],t,s)}}function F(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&W(e.selfGrammar.patterns,Object.assign({},e,{repository:e.selfGrammar.repository}),t),e.selfGrammar.injections&&W(Object.values(e.selfGrammar.injections),Object.assign({},e,{repository:e.selfGrammar.repository}),t)}function W(e,t,s){for(const r of e){if(s.visitedRule.has(r))continue;s.visitedRule.add(r);const e=r.repository?n({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&W(r.patterns,Object.assign({},t,{repository:e}),s);const i=r.include;if(!i)continue;const o=Q(i);switch(o.kind){case 0:F(Object.assign({},t,{selfGrammar:t.baseGrammar}),s);break;case 1:F(t,s);break;case 2:j(o.ruleName,Object.assign({},t,{repository:e}),s);break;case 3:case 4:const n=o.scopeName===t.selfGrammar.scopeName?t.selfGrammar:o.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(n){const r={baseGrammar:t.baseGrammar,selfGrammar:n,repository:e};4===o.kind?j(o.ruleName,r,s):F(r,s)}else 4===o.kind?s.add(new B(o.scopeName,o.ruleName)):s.add(new x(o.scopeName))}}}var D=class{kind=0},q=class{kind=1},U=class{constructor(e){this.ruleName=e}kind=2},z=class{constructor(e){this.scopeName=e}kind=3},K=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Q(e){if("$base"===e)return new D;if("$self"===e)return new q;const t=e.indexOf("#");if(-1===t)return new z(e);if(0===t)return new U(e.substring(1));{const s=e.substring(0,t),n=e.substring(t+1);return new K(s,n)}}var H=/\\(\d+)/,X=/\\(\d+)/g;var V=class{constructor(e,t,s,n){this.$location=e,this.id=t,this._name=s||null,this._nameIsCapturing=o.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=o.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${r(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?o.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?o.replaceCaptures(this._contentName,e,t):this._contentName}},Y=class extends V{constructor(e,t,s,n,r){super(e,t,s,n),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,s,n){throw new Error("Not supported!")}},J=class extends V{constructor(e,t,s,n,r){super(e,t,s,null),this._match=new ne(n,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=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,s,n){return this._getCachedCompiledPatterns(e).compileAG(e,s,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Z=class extends V{constructor(e,t,s,n,r){super(e,t,s,n),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const s of this.patterns){e.getRule(s).collectPatterns(e,t)}}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,n){return this._getCachedCompiledPatterns(e).compileAG(e,s,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ee=class extends V{constructor(e,t,s,n,r,i,o,a,c,h){super(e,t,s,n),this._begin=new ne(r,this.id),this.beginCaptures=i,this._end=new ne(o||"\uffff",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=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,s,n){return this._getCachedCompiledPatterns(e,t).compileAG(e,s,n)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const 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}},te=class extends V{constructor(e,t,s,n,r,i,o,a,c){super(e,t,s,n),this._begin=new ne(r,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new ne(o,-2),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(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=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,s,n){return this._getCachedCompiledPatterns(e).compileAG(e,s,n)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const 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,s,n){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,s,n)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"\uffff"),this._cachedCompiledWhilePatterns}},se=class e{static createCaptureRule(e,t,s,n,r){return e.registerRule(e=>new Y(t,e,s,n,r))}static getCompiledRuleId(t,s,r){return t.id||s.registerRule(i=>{if(t.id=i,t.match)return new J(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,s,r));if(void 0===t.begin){t.repository&&(r=n({},r,t.repository));let i=t.patterns;return void 0===i&&t.include&&(i=[{include:t.include}]),new Z(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,s,r))}return t.while?new te(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,s,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,s,r),e._compilePatterns(t.patterns,s,r)):new ee(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,s,r),t.end,e._compileCaptures(t.endCaptures||t.captures,s,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,s,r))}),t.id}static _compileCaptures(t,s,n){let r=[];if(t){let i=0;for(const e in t){if("$vscodeTextmateLocation"===e)continue;const t=parseInt(e,10);t>i&&(i=t)}for(let e=0;e<=i;e++)r[e]=null;for(const i in t){if("$vscodeTextmateLocation"===i)continue;const o=parseInt(i,10);let a=0;t[i].patterns&&(a=e.getCompiledRuleId(t[i],s,n)),r[o]=e.createCaptureRule(s,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,a)}}return r}static _compilePatterns(t,s,n){let r=[];if(t)for(let i=0,o=t.length;i<o;i++){const o=t[i];let a=-1;if(o.include){const t=Q(o.include);switch(t.kind){case 0:case 1:a=e.getCompiledRuleId(n[o.include],s,n);break;case 2:let r=n[t.ruleName];r&&(a=e.getCompiledRuleId(r,s,n));break;case 3:case 4:const i=t.scopeName,c=4===t.kind?t.ruleName:null,h=s.getExternalGrammar(i,n);if(h)if(c){let t=h.repository[c];t&&(a=e.getCompiledRuleId(t,s,h.repository))}else a=e.getCompiledRuleId(h.repository.$self,s,h.repository)}}else a=e.getCompiledRuleId(o,s,n);if(-1!==a){const e=s.getRule(a);let t=!1;if((e instanceof Z||e instanceof ee||e instanceof te)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},ne=class e{constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let s=0,n=[],r=!1;for(let i=0;i<t;i++){if("\\"===e.charAt(i)&&i+1<t){const t=e.charAt(i+1);"z"===t?(n.push(e.substring(s,i)),n.push("$(?!\\n)(?<!\\n)"),s=i+2):"A"!==t&&"G"!==t||(r=!0),i++}}this.hasAnchor=r,0===s?this.source=e:(n.push(e.substring(s,t)),this.source=n.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=H.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("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let s=t.map(t=>e.substring(t.start,t.end));return X.lastIndex=0,this.source.replace(X,(e,t)=>l(s[parseInt(t,10)]||""))}_buildAnchorCache(){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let e,t,s,n,r=[],i=[],o=[],a=[];for(e=0,t=this.source.length;e<t;e++)s=this.source.charAt(e),r[e]=s,i[e]=s,o[e]=s,a[e]=s,"\\"===s&&e+1<t&&(n=this.source.charAt(e+1),"A"===n?(r[e+1]="\uffff",i[e+1]="\uffff",o[e+1]="A",a[e+1]="A"):"G"===n?(r[e+1]="\uffff",i[e+1]="G",o[e+1]="\uffff",a[e+1]="G"):(r[e+1]=n,i[e+1]=n,o[e+1]=n,a[e+1]=n),e++);return{A0_G0:r.join(""),A0_G1:i.join(""),A1_G0:o.join(""),A1_G1:a.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache&&"string"==typeof this.source?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},re=class{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(),this._cached=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 ie(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,s){return this._hasAnchors?t?s?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,s)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,s)),this._anchorCache.A1_G0):s?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,s)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,s)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,s){let n=this._items.map(e=>e.resolveAnchors(t,s));return new ie(e,n,this._items.map(e=>e.ruleId))}},ie=class{constructor(e,t,s){this.regExps=t,this.rules=s,this.scanner=e.createOnigScanner(t)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,s=this.rules.length;t<s;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,s){const n=this.scanner.findNextMatchSync(e,t,s);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},oe=class{constructor(e,t){this.languageId=e,this.tokenType=t}},ae=class e{constructor(e,t){this._defaultAttributes=new oe(e,8),this._embeddedLanguagesMatcher=new ce(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new oe(0,0);_getBasicScopeAttributes=new u(e=>{const t=this._scopeToLanguage(e),s=this._toStandardTokenType(e);return new oe(t,s)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){const s=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!s)return 8;switch(s[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ce=class{constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>l(e));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}},he=("undefined"!=typeof process&&process.env.VSCODE_TEXTMATE_DEBUG,class{constructor(e,t){this.stack=e,this.stoppedEarly=t}});function le(e,t,s,n,r,i,o,a){const c=t.content.length;let h=!1,l=-1;if(o){const o=ue(e,t,s,n,r,i);r=o.stack,n=o.linePos,s=o.isFirstLine,l=o.anchorPosition}const u=Date.now();for(;!h;){if(0!==a){if(Date.now()-u>a)return new he(r,!0)}p()}return new he(r,!1);function p(){const o=pe(e,t,s,n,r,l);if(!o)return i.produce(r,c),void(h=!0);const a=o.captureIndices,u=o.matchedRuleId,p=!!(a&&a.length>0)&&a[0].end>n;if(-1===u){const o=r.getRule(e);i.produce(r,a[0].start),r=r.withContentNameScopesList(r.nameScopesList),Se(e,t,s,r,i,o.endCaptures,a),i.produce(r,a[0].end);const u=r;if(r=r.parent,l=u.getAnchorPos(),!p&&u.getEnterPos()===n)return r=u,i.produce(r,c),void(h=!0)}else{const o=e.getRule(u);i.produce(r,a[0].start);const m=r,_=o.getName(t.content,a),f=r.contentNameScopesList.pushAttributed(_,e);if(r=r.push(u,n,l,a[0].end===c,null,f,f),o instanceof ee){const n=o;Se(e,t,s,r,i,n.beginCaptures,a),i.produce(r,a[0].end),l=a[0].end;const u=n.getContentName(t.content,a),_=f.pushAttributed(u,e);if(r=r.withContentNameScopesList(_),n.endHasBackReferences&&(r=r.withEndRule(n.getEndWithResolvedBackReferences(t.content,a))),!p&&m.hasSameRuleAs(r))return r=r.pop(),i.produce(r,c),void(h=!0)}else if(o instanceof te){const n=o;Se(e,t,s,r,i,n.beginCaptures,a),i.produce(r,a[0].end),l=a[0].end;const u=n.getContentName(t.content,a),_=f.pushAttributed(u,e);if(r=r.withContentNameScopesList(_),n.whileHasBackReferences&&(r=r.withEndRule(n.getWhileWithResolvedBackReferences(t.content,a))),!p&&m.hasSameRuleAs(r))return r=r.pop(),i.produce(r,c),void(h=!0)}else{if(Se(e,t,s,r,i,o.captures,a),i.produce(r,a[0].end),r=r.pop(),!p)return r=r.safePop(),i.produce(r,c),void(h=!0)}}a[0].end>n&&(n=a[0].end,s=!1)}}function ue(e,t,s,n,r,i){let o=r.beginRuleCapturedEOL?0:-1;const a=[];for(let t=r;t;t=t.pop()){const s=t.getRule(e);s instanceof te&&a.push({rule:s,stack:t})}for(let c=a.pop();c;c=a.pop()){const{ruleScanner:a,findOptions:h}=fe(c.rule,e,c.stack.endRule,s,n===o),l=a.findNextMatchSync(t,n,h);if(!l){r=c.stack.pop();break}if(-2!==l.ruleId){r=c.stack.pop();break}l.captureIndices&&l.captureIndices.length&&(i.produce(c.stack,l.captureIndices[0].start),Se(e,t,s,c.stack,i,c.rule.whileCaptures,l.captureIndices),i.produce(c.stack,l.captureIndices[0].end),o=l.captureIndices[0].end,l.captureIndices[0].end>n&&(n=l.captureIndices[0].end,s=!1))}return{stack:r,linePos:n,anchorPosition:o,isFirstLine:s}}function pe(e,t,s,n,r,i){const o=de(e,t,s,n,r,i),a=e.getInjections();if(0===a.length)return o;const c=me(a,e,t,s,n,r,i);if(!c)return o;if(!o)return c;const h=o.captureIndices[0].start,l=c.captureIndices[0].start;return l<h||c.priorityMatch&&l===h?c:o}function de(e,t,s,n,r,i){const o=r.getRule(e),{ruleScanner:a,findOptions:c}=ge(o,e,r.endRule,s,n===i),h=a.findNextMatchSync(t,n,c);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function me(e,t,s,n,r,i,o){let a,c=Number.MAX_VALUE,h=null,l=0;const u=i.contentNameScopesList.getScopeNames();for(let i=0,p=e.length;i<p;i++){const p=e[i];if(!p.matcher(u))continue;const m=t.getRule(p.ruleId),{ruleScanner:_,findOptions:f}=ge(m,t,null,n,r===o),S=_.findNextMatchSync(s,r,f);if(!S)continue;const b=S.captureIndices[0].start;if(!(b>=c)&&(c=b,h=S.captureIndices,a=S.ruleId,l=p.priority,c===r))break}return h?{priorityMatch:-1===l,captureIndices:h,matchedRuleId:a}:null}function ge(e,t,s,n,r){return{ruleScanner:e.compileAG(t,s,n,r),findOptions:0}}function fe(e,t,s,n,r){return{ruleScanner:e.compileWhileAG(t,s,n,r),findOptions:0}}function Se(e,t,s,n,r,i,o){if(0===i.length)return;const a=t.content,c=Math.min(i.length,o.length),h=[],l=o[0].end;for(let t=0;t<c;t++){const c=i[t];if(null===c)continue;const u=o[t];if(0===u.length)continue;if(u.start>l)break;for(;h.length>0&&h[h.length-1].endPos<=u.start;)r.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?r.produceFromScopes(h[h.length-1].scopes,u.start):r.produce(n,u.start),c.retokenizeCapturedWithRuleId){const t=c.getName(a,o),i=n.contentNameScopesList.pushAttributed(t,e),h=c.getContentName(a,o),l=i.pushAttributed(h,e),p=n.push(c.retokenizeCapturedWithRuleId,u.start,-1,!1,null,i,l),m=e.createOnigString(a.substring(0,u.end));le(e,m,s&&0===u.start,u.start,p,r,!1,0),v(m);continue}const p=c.getName(a,o);if(null!==p){const t=(h.length>0?h[h.length-1].scopes:n.contentNameScopesList).pushAttributed(p,e);h.push(new be(t,u.end))}}for(;h.length>0;)r.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var be=class{constructor(e,t){this.scopes=e,this.endPos=t}};function ye(e,t,s,n,r,i,o,a){return new Ae(e,t,s,n,r,i,o,a)}function Ce(e,t,s,n,r){const i=G(t,ke),o=se.getCompiledRuleId(s,n,r.repository);for(const s of i)e.push({debugSelector:t,matcher:s.matcher,ruleId:o,grammar:r,priority:s.priority})}function ke(e,t){if(t.length<e.length)return!1;let s=0;return e.every(e=>{for(let n=s;n<t.length;n++)if(we(t[n],e))return s=n+1,!0;return!1})}function we(e,t){if(!e)return!1;if(e===t)return!0;const s=t.length;return e.length>s&&e.substr(0,s)===t&&"."===e[s]}var Ae=class{constructor(e,t,s,n,r,i,o,a){if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=a,this._basicScopeAttributesProvider=new ae(s,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Pe(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const e of Object.keys(r)){const t=G(e,ke);for(const s of t)this._tokenTypeMatchers.push({matcher:s.matcher,type:r[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const 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(){const e=e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),t=[],s=this._rootScopeName,n=e(s);if(n){const e=n.injections;if(e)for(let s in e)Ce(t,s,e[s],this,n);const r=this._grammarRepository.injections(s);r&&r.forEach(e=>{const s=this.getExternalGrammar(e);if(s){const e=s.injectionSelector;e&&Ce(t,e,s,this,s)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,s=e(t);return this._ruleId2desc[t]=s,s}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const s=this._grammarRepository.lookup(e);if(s)return this._includedGrammars[e]=Pe(s,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,s=0){const n=this._tokenize(e,t,!1,s);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(e,t,s=0){const n=this._tokenize(e,t,!0,s);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(e,t,s,n){let r;if(-1===this._rootId&&(this._rootId=se.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==Ne.NULL)r=!1,t.reset();else{r=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),s=this.themeProvider.getDefaults(),n=N.set(0,e.languageId,e.tokenType,null,s.fontStyle,s.foregroundId,s.backgroundId),i=this.getRule(this._rootId).getName(null,null);let o;o=i?Re.createRootAndLookUpScopeName(i,n,this):Re.createRoot("unknown",n),t=new Ne(null,this._rootId,-1,-1,!1,null,o,o)}e+="\n";const i=this.createOnigString(e),o=i.content.length,a=new Ge(s,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=le(this,i,r,0,t,a,!0,n);return v(i),{lineLength:o,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Pe(t,s){return(t=e(t)).repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=s||t.repository.$self,t}var Re=class e{constructor(e,t,s){this.parent=e,this.scopePath=t,this.tokenAttributes=s}static fromExtension(t,s){let n=t,r=t?.scopePath??null;for(const t of s)r=m.push(r,t.scopeNames),n=new e(n,r,t.encodedTokenAttributes);return n}static createRoot(t,s){return new e(null,new m(null,t),s)}static createRootAndLookUpScopeName(t,s,n){const r=n.getMetadataForScope(t),i=new m(null,t),o=n.themeProvider.themeMatch(i),a=e.mergeAttributes(s,r,o);return new e(null,i,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,s){let n=-1,r=0,i=0;return null!==s&&(n=s.fontStyle,r=s.foregroundId,i=s.backgroundId),N.set(e,t.languageId,t.tokenType,null,n,r,i)}pushAttributed(t,s){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,s);const n=t.split(/ /g);let r=this;for(const t of n)r=e._pushAttributed(r,t,s);return r}static _pushAttributed(t,s,n){const r=n.getMetadataForScope(s),i=t.scopePath.push(s),o=n.themeProvider.themeMatch(i),a=e.mergeAttributes(t.tokenAttributes,r,o);return new e(t,i,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let s=this;for(;s&&s!==e;)t.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(s.parent?.scopePath??null)}),s=s.parent;return s===e?t.reverse():void 0}},Ne=class e{constructor(e,t,s,n,r,i,o,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=r,this.endRule=i,this.nameScopesList=o,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=n}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&Re.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}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,s,n,r,i,o,a){return new e(this,t,s,n,r,i,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const 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: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,s){const n=Re.fromExtension(t?.nameScopesList??null,s.nameScopesList);return new e(t,s.ruleId,s.enterPos??-1,s.anchorPos??-1,s.beginRuleCapturedEOL,s.endRule,n,Re.fromExtension(n,s.contentNameScopesList))}},Ie=class{allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):G(e,ke).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>G(e,ke).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Ge=class{constructor(e,t,s,n){this.balancedBracketSelectors=n,this._emitBinaryTokens=e,this._tokenTypeOverrides=s,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let s=e?.tokenAttributes??0,n=!1;if(this.balancedBracketSelectors?.matchesAlways&&(n=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e?.getScopeNames()??[];for(const e of this._tokenTypeOverrides)e.matcher(t)&&(s=N.set(s,0,I(e.type),null,-1,0,0));this.balancedBracketSelectors&&(n=this.balancedBracketSelectors.match(t))}return n&&(s=N.set(s,0,8,n,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s?void(this._lastTokenEndIndex=t):(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(s),void(this._lastTokenEndIndex=t))}const s=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:s}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(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()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const s=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)s[e]=this._binaryTokens[e];return s}},Ee=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;dispose(){for(const 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,s,n,r){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,ye(e,i,t,s,n,r,this,this._onigLib))}return this._grammars.get(e)}},Te=class{constructor(e){this._options=e,this._syncRegistry=new Ee(p.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(p.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,s){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:s})}loadGrammarWithConfiguration(e,t,s){return this._loadGrammar(e,t,s.embeddedLanguages,s.tokenTypes,new Ie(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,s,n,r){const i=new M(this._syncRegistry,e);for(;i.Q.length>0;)i.Q.map(e=>this._loadSingleGrammar(e.scopeName)),i.processQueue();return this._grammarForScopeName(e,t,s,n,r)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const s="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,s)}}addGrammar(e,t=[],s=0,n=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,s,n)}_grammarForScopeName(e,t=0,s=null,n=null,r=null){return this._syncRegistry.grammarForScopeName(e,t,s,n,r)}},Le=Ne.NULL},1165,[]);
21
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"toHtml",{enumerable:!0,get:function(){return t.toHtml}});var t=r(d[0])},1166,[1167]);
22
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.toHtml=function(s,c){const h=c||l,f=h.quote||'"';if('"'!==f&&"'"!==f)throw new Error('Invalid quote `'+f+'`, expected `\'` or `"`');const y='"'===f?"'":'"';return{one:u,all:p,settings:{omitOptionalTags:h.omitOptionalTags||!1,allowParseErrors:h.allowParseErrors||!1,allowDangerousCharacters:h.allowDangerousCharacters||!1,quoteSmart:h.quoteSmart||!1,preferUnquoted:h.preferUnquoted||!1,tightAttributes:h.tightAttributes||!1,upperDoctype:h.upperDoctype||!1,tightDoctype:h.tightDoctype||!1,bogusComments:h.bogusComments||!1,tightCommaSeparatedLists:h.tightCommaSeparatedLists||!1,tightSelfClosing:h.tightSelfClosing||!1,collapseEmptyAttributes:h.collapseEmptyAttributes||!1,allowDangerousHtml:h.allowDangerousHtml||!1,voids:h.voids||t.htmlVoidElements,characterReferences:h.characterReferences||n,closeSelfClosing:h.closeSelfClosing||!1,closeEmptyElements:h.closeEmptyElements||!1},schema:'svg'===h.space?o.svg:o.html,quote:f,alternative:y}.one(Array.isArray(s)?{type:'root',children:s}:s,void 0,void 0)},e.all=p;var t=r(d[0]),o=r(d[1]),s=r(d[2]);const l={},n={},c=[];function u(t,o,l){return(0,s.handle)(t,o,l,this)}function p(t){const o=[],s=t&&t.children||c;let l=-1;for(;++l<s.length;)o[l]=this.one(s[l],l,t);return o.join('')}},1167,[1168,1169,1187]);
23
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"htmlVoidElements",{enumerable:!0,get:function(){return t}});const t=['area','base','basefont','bgsound','br','col','command','embed','frame','hr','image','img','input','keygen','link','meta','param','source','track','wbr']},1168,[]);
24
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"hastToReact",{enumerable:!0,get:function(){return b.hastToReact}}),Object.defineProperty(e,"find",{enumerable:!0,get:function(){return s.find}}),Object.defineProperty(e,"normalize",{enumerable:!0,get:function(){return j.normalize}}),Object.defineProperty(e,"html",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"svg",{enumerable:!0,get:function(){return x}});var t=r(d[0]),n=r(d[1]),u=r(d[2]),l=r(d[3]),o=r(d[4]),c=r(d[5]),f=r(d[6]),b=r(d[7]),s=r(d[8]),j=r(d[9]);const p=(0,t.merge)([n.aria,u.html,o.xlink,c.xmlns,f.xml],'html'),x=(0,t.merge)([n.aria,l.svg,o.xlink,c.xmlns,f.xml],'svg')},1169,[1170,1172,1178,1181,1182,1183,1184,1185,1186,1174]);
25
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.merge=function(t,o){const c={},s={};for(const n of t)Object.assign(c,n.property),Object.assign(s,n.normal);return new n.Schema(c,s,o)};var n=r(d[0])},1170,[1171]);
26
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"Schema",{enumerable:!0,get:function(){return t}});class t{constructor(t,o,p){this.normal=o,this.property=t,p&&(this.space=p)}}t.prototype.normal={},t.prototype.property={},t.prototype.space=void 0},1171,[]);
27
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"aria",{enumerable:!0,get:function(){return o}});var l=r(d[0]),n=r(d[1]);const o=(0,l.create)({properties:{ariaActiveDescendant:null,ariaAtomic:n.booleanish,ariaAutoComplete:null,ariaBusy:n.booleanish,ariaChecked:n.booleanish,ariaColCount:n.number,ariaColIndex:n.number,ariaColSpan:n.number,ariaControls:n.spaceSeparated,ariaCurrent:null,ariaDescribedBy:n.spaceSeparated,ariaDetails:null,ariaDisabled:n.booleanish,ariaDropEffect:n.spaceSeparated,ariaErrorMessage:null,ariaExpanded:n.booleanish,ariaFlowTo:n.spaceSeparated,ariaGrabbed:n.booleanish,ariaHasPopup:null,ariaHidden:n.booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:n.spaceSeparated,ariaLevel:n.number,ariaLive:null,ariaModal:n.booleanish,ariaMultiLine:n.booleanish,ariaMultiSelectable:n.booleanish,ariaOrientation:null,ariaOwns:n.spaceSeparated,ariaPlaceholder:null,ariaPosInSet:n.number,ariaPressed:n.booleanish,ariaReadOnly:n.booleanish,ariaRelevant:null,ariaRequired:n.booleanish,ariaRoleDescription:n.spaceSeparated,ariaRowCount:n.number,ariaRowIndex:n.number,ariaRowSpan:n.number,ariaSelected:n.booleanish,ariaSetSize:n.number,ariaSort:null,ariaValueMax:n.number,ariaValueMin:n.number,ariaValueNow:n.number,ariaValueText:null,role:null},transform:(l,n)=>'role'===n?n:'aria-'+n.slice(4).toLowerCase()})},1172,[1173,1177]);
28
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.create=function(o){const c={},u={};for(const[n,f]of Object.entries(o.properties)){const p=new s.DefinedInfo(n,o.transform(o.attributes||{},n),f,o.space);o.mustUseProperty&&o.mustUseProperty.includes(n)&&(p.mustUseProperty=!0),c[n]=p,u[(0,t.normalize)(n)]=n,u[(0,t.normalize)(p.attribute)]=n}return new n.Schema(c,u,o.space)};var t=r(d[0]),s=r(d[1]),n=r(d[2])},1173,[1174,1175,1171]);
29
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.normalize=function(t){return t.toLowerCase()}},1174,[]);
30
- __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DefinedInfo",{enumerable:!0,get:function(){return o}});var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1]));const n=Object.keys(t);class o extends e.Info{constructor(e,o,u,f){let s=-1;if(super(e,o),c(this,'space',f),'number'==typeof u)for(;++s<n.length;){const e=n[s];c(this,n[s],(u&t[e])===t[e])}}}function c(e,t,n){n&&(e[t]=n)}o.prototype.defined=!0},1175,[1176,1177]);
31
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"Info",{enumerable:!0,get:function(){return t}});class t{constructor(t,o){this.attribute=o,this.property=t}}t.prototype.attribute='',t.prototype.booleanish=!1,t.prototype.boolean=!1,t.prototype.commaOrSpaceSeparated=!1,t.prototype.commaSeparated=!1,t.prototype.defined=!1,t.prototype.mustUseProperty=!1,t.prototype.number=!1,t.prototype.overloadedBoolean=!1,t.prototype.property='',t.prototype.spaceSeparated=!1,t.prototype.space=void 0},1176,[]);
32
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"booleanish",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"overloadedBoolean",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"number",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"spaceSeparated",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"commaSeparated",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"commaOrSpaceSeparated",{enumerable:!0,get:function(){return l}});let t=0;const n=p(),o=p(),u=p(),c=p(),b=p(),f=p(),l=p();function p(){return 2**++t}},1177,[]);
33
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"html",{enumerable:!0,get:function(){return u}});var l=r(d[0]),n=r(d[1]),o=r(d[2]);const u=(0,n.create)({attributes:{acceptcharset:'accept-charset',classname:'class',htmlfor:'for',httpequiv:'http-equiv'},mustUseProperty:['checked','multiple','muted','selected'],properties:{abbr:null,accept:o.commaSeparated,acceptCharset:o.spaceSeparated,accessKey:o.spaceSeparated,action:null,allow:null,allowFullScreen:o.boolean,allowPaymentRequest:o.boolean,allowUserMedia:o.boolean,alpha:o.boolean,alt:null,as:null,async:o.boolean,autoCapitalize:null,autoComplete:o.spaceSeparated,autoFocus:o.boolean,autoPlay:o.boolean,blocking:o.spaceSeparated,capture:null,charSet:null,checked:o.boolean,cite:null,className:o.spaceSeparated,closedBy:null,colorSpace:null,cols:o.number,colSpan:o.number,command:null,commandFor:null,content:null,contentEditable:o.booleanish,controls:o.boolean,controlsList:o.spaceSeparated,coords:o.number|o.commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:o.boolean,defer:o.boolean,dir:null,dirName:null,disabled:o.boolean,download:o.overloadedBoolean,draggable:o.booleanish,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:o.boolean,formTarget:null,headers:o.spaceSeparated,height:o.number,hidden:o.overloadedBoolean,high:o.number,href:null,hrefLang:null,htmlFor:o.spaceSeparated,httpEquiv:o.spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inert:o.boolean,inputMode:null,integrity:null,is:null,isMap:o.boolean,itemId:null,itemProp:o.spaceSeparated,itemRef:o.spaceSeparated,itemScope:o.boolean,itemType:o.spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:o.boolean,low:o.number,manifest:null,max:null,maxLength:o.number,media:null,method:null,min:null,minLength:o.number,multiple:o.boolean,muted:o.boolean,name:null,nonce:null,noModule:o.boolean,noValidate:o.boolean,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:o.boolean,optimum:o.number,pattern:null,ping:o.spaceSeparated,placeholder:null,playsInline:o.boolean,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:o.boolean,referrerPolicy:null,rel:o.spaceSeparated,required:o.boolean,reversed:o.boolean,rows:o.number,rowSpan:o.number,sandbox:o.spaceSeparated,scope:null,scoped:o.boolean,seamless:o.boolean,selected:o.boolean,shadowRootClonable:o.boolean,shadowRootCustomElementRegistry:o.boolean,shadowRootDelegatesFocus:o.boolean,shadowRootMode:null,shadowRootSerializable:o.boolean,shape:null,size:o.number,sizes:null,slot:null,span:o.number,spellCheck:o.booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:o.number,step:null,style:null,tabIndex:o.number,target:null,title:null,translate:null,type:null,typeMustMatch:o.boolean,useMap:null,value:o.booleanish,width:o.number,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:o.spaceSeparated,axis:null,background:null,bgColor:null,border:o.number,borderColor:null,bottomMargin:o.number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:o.boolean,declare:o.boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:o.number,leftMargin:o.number,link:null,longDesc:null,lowSrc:null,marginHeight:o.number,marginWidth:o.number,noResize:o.boolean,noHref:o.boolean,noShade:o.boolean,noWrap:o.boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:o.number,rules:null,scheme:null,scrolling:o.booleanish,standby:null,summary:null,text:null,topMargin:o.number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:o.number,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:o.boolean,disablePictureInPicture:o.boolean,disableRemotePlayback:o.boolean,exportParts:o.commaSeparated,part:o.spaceSeparated,prefix:null,property:null,results:o.number,security:null,unselectable:null},space:'html',transform:l.caseInsensitiveTransform})},1178,[1179,1173,1177]);
34
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.caseInsensitiveTransform=function(s,t){return(0,n.caseSensitiveTransform)(s,t.toLowerCase())};var n=r(d[0])},1179,[1180]);
35
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.caseSensitiveTransform=function(n,t){return t in n?n[t]:t}},1180,[]);
36
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"svg",{enumerable:!0,get:function(){return t}});var n=r(d[0]),l=r(d[1]),o=r(d[2]);const t=(0,l.create)({attributes:{accentHeight:'accent-height',alignmentBaseline:'alignment-baseline',arabicForm:'arabic-form',baselineShift:'baseline-shift',capHeight:'cap-height',className:'class',clipPath:'clip-path',clipRule:'clip-rule',colorInterpolation:'color-interpolation',colorInterpolationFilters:'color-interpolation-filters',colorProfile:'color-profile',colorRendering:'color-rendering',crossOrigin:'crossorigin',dataType:'datatype',dominantBaseline:'dominant-baseline',enableBackground:'enable-background',fillOpacity:'fill-opacity',fillRule:'fill-rule',floodColor:'flood-color',floodOpacity:'flood-opacity',fontFamily:'font-family',fontSize:'font-size',fontSizeAdjust:'font-size-adjust',fontStretch:'font-stretch',fontStyle:'font-style',fontVariant:'font-variant',fontWeight:'font-weight',glyphName:'glyph-name',glyphOrientationHorizontal:'glyph-orientation-horizontal',glyphOrientationVertical:'glyph-orientation-vertical',hrefLang:'hreflang',horizAdvX:'horiz-adv-x',horizOriginX:'horiz-origin-x',horizOriginY:'horiz-origin-y',imageRendering:'image-rendering',letterSpacing:'letter-spacing',lightingColor:'lighting-color',markerEnd:'marker-end',markerMid:'marker-mid',markerStart:'marker-start',maskType:'mask-type',navDown:'nav-down',navDownLeft:'nav-down-left',navDownRight:'nav-down-right',navLeft:'nav-left',navNext:'nav-next',navPrev:'nav-prev',navRight:'nav-right',navUp:'nav-up',navUpLeft:'nav-up-left',navUpRight:'nav-up-right',onAbort:'onabort',onActivate:'onactivate',onAfterPrint:'onafterprint',onBeforePrint:'onbeforeprint',onBegin:'onbegin',onCancel:'oncancel',onCanPlay:'oncanplay',onCanPlayThrough:'oncanplaythrough',onChange:'onchange',onClick:'onclick',onClose:'onclose',onCopy:'oncopy',onCueChange:'oncuechange',onCut:'oncut',onDblClick:'ondblclick',onDrag:'ondrag',onDragEnd:'ondragend',onDragEnter:'ondragenter',onDragExit:'ondragexit',onDragLeave:'ondragleave',onDragOver:'ondragover',onDragStart:'ondragstart',onDrop:'ondrop',onDurationChange:'ondurationchange',onEmptied:'onemptied',onEnd:'onend',onEnded:'onended',onError:'onerror',onFocus:'onfocus',onFocusIn:'onfocusin',onFocusOut:'onfocusout',onHashChange:'onhashchange',onInput:'oninput',onInvalid:'oninvalid',onKeyDown:'onkeydown',onKeyPress:'onkeypress',onKeyUp:'onkeyup',onLoad:'onload',onLoadedData:'onloadeddata',onLoadedMetadata:'onloadedmetadata',onLoadStart:'onloadstart',onMessage:'onmessage',onMouseDown:'onmousedown',onMouseEnter:'onmouseenter',onMouseLeave:'onmouseleave',onMouseMove:'onmousemove',onMouseOut:'onmouseout',onMouseOver:'onmouseover',onMouseUp:'onmouseup',onMouseWheel:'onmousewheel',onOffline:'onoffline',onOnline:'ononline',onPageHide:'onpagehide',onPageShow:'onpageshow',onPaste:'onpaste',onPause:'onpause',onPlay:'onplay',onPlaying:'onplaying',onPopState:'onpopstate',onProgress:'onprogress',onRateChange:'onratechange',onRepeat:'onrepeat',onReset:'onreset',onResize:'onresize',onScroll:'onscroll',onSeeked:'onseeked',onSeeking:'onseeking',onSelect:'onselect',onShow:'onshow',onStalled:'onstalled',onStorage:'onstorage',onSubmit:'onsubmit',onSuspend:'onsuspend',onTimeUpdate:'ontimeupdate',onToggle:'ontoggle',onUnload:'onunload',onVolumeChange:'onvolumechange',onWaiting:'onwaiting',onZoom:'onzoom',overlinePosition:'overline-position',overlineThickness:'overline-thickness',paintOrder:'paint-order',panose1:'panose-1',pointerEvents:'pointer-events',referrerPolicy:'referrerpolicy',renderingIntent:'rendering-intent',shapeRendering:'shape-rendering',stopColor:'stop-color',stopOpacity:'stop-opacity',strikethroughPosition:'strikethrough-position',strikethroughThickness:'strikethrough-thickness',strokeDashArray:'stroke-dasharray',strokeDashOffset:'stroke-dashoffset',strokeLineCap:'stroke-linecap',strokeLineJoin:'stroke-linejoin',strokeMiterLimit:'stroke-miterlimit',strokeOpacity:'stroke-opacity',strokeWidth:'stroke-width',tabIndex:'tabindex',textAnchor:'text-anchor',textDecoration:'text-decoration',textRendering:'text-rendering',transformOrigin:'transform-origin',typeOf:'typeof',underlinePosition:'underline-position',underlineThickness:'underline-thickness',unicodeBidi:'unicode-bidi',unicodeRange:'unicode-range',unitsPerEm:'units-per-em',vAlphabetic:'v-alphabetic',vHanging:'v-hanging',vIdeographic:'v-ideographic',vMathematical:'v-mathematical',vectorEffect:'vector-effect',vertAdvY:'vert-adv-y',vertOriginX:'vert-origin-x',vertOriginY:'vert-origin-y',wordSpacing:'word-spacing',writingMode:'writing-mode',xHeight:'x-height',playbackOrder:'playbackorder',timelineBegin:'timelinebegin'},properties:{about:o.commaOrSpaceSeparated,accentHeight:o.number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:o.number,amplitude:o.number,arabicForm:null,ascent:o.number,attributeName:null,attributeType:null,azimuth:o.number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:o.number,by:null,calcMode:null,capHeight:o.number,className:o.spaceSeparated,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:o.number,diffuseConstant:o.number,direction:null,display:null,dur:null,divisor:o.number,dominantBaseline:null,download:o.boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:o.number,enableBackground:null,end:null,event:null,exponent:o.number,externalResourcesRequired:null,fill:null,fillOpacity:o.number,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:o.commaSeparated,g2:o.commaSeparated,glyphName:o.commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:o.number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:o.number,horizOriginX:o.number,horizOriginY:o.number,id:null,ideographic:o.number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:o.number,k:o.number,k1:o.number,k2:o.number,k3:o.number,k4:o.number,kernelMatrix:o.commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:o.number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:o.number,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:o.number,overlineThickness:o.number,paintOrder:null,panose1:null,path:null,pathLength:o.number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:o.spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:o.number,pointsAtY:o.number,pointsAtZ:o.number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:o.commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:o.commaOrSpaceSeparated,rev:o.commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:o.commaOrSpaceSeparated,requiredFeatures:o.commaOrSpaceSeparated,requiredFonts:o.commaOrSpaceSeparated,requiredFormats:o.commaOrSpaceSeparated,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:o.number,specularExponent:o.number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:o.number,strikethroughThickness:o.number,string:null,stroke:null,strokeDashArray:o.commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:o.number,strokeOpacity:o.number,strokeWidth:null,style:null,surfaceScale:o.number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:o.commaOrSpaceSeparated,tabIndex:o.number,tableValues:null,target:null,targetX:o.number,targetY:o.number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:o.commaOrSpaceSeparated,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:o.number,underlineThickness:o.number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:o.number,values:null,vAlphabetic:o.number,vMathematical:o.number,vectorEffect:null,vHanging:o.number,vIdeographic:o.number,version:null,vertAdvY:o.number,vertOriginX:o.number,vertOriginY:o.number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:o.number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:'svg',transform:n.caseSensitiveTransform})},1181,[1180,1173,1177]);
37
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"xlink",{enumerable:!0,get:function(){return n}});const n=(0,r(d[0]).create)({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:'xlink',transform:(n,l)=>'xlink:'+l.slice(5).toLowerCase()})},1182,[1173]);
38
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"xmlns",{enumerable:!0,get:function(){return t}});var n=r(d[0]),s=r(d[1]);const t=(0,n.create)({attributes:{xmlnsxlink:'xmlns:xlink'},properties:{xmlnsXLink:null,xmlns:null},space:'xmlns',transform:s.caseInsensitiveTransform})},1183,[1173,1179]);
39
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"xml",{enumerable:!0,get:function(){return l}});const l=(0,r(d[0]).create)({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:'xml',transform:(l,t)=>'xml:'+t.slice(3).toLowerCase()})},1184,[1173]);
40
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"hastToReact",{enumerable:!0,get:function(){return t}});const t={classId:'classID',dataType:'datatype',itemId:'itemID',strokeDashArray:'strokeDasharray',strokeDashOffset:'strokeDashoffset',strokeLineCap:'strokeLinecap',strokeLineJoin:'strokeLinejoin',strokeMiterLimit:'strokeMiterlimit',typeOf:'typeof',xLinkActuate:'xlinkActuate',xLinkArcRole:'xlinkArcrole',xLinkHref:'xlinkHref',xLinkRole:'xlinkRole',xLinkShow:'xlinkShow',xLinkTitle:'xlinkTitle',xLinkType:'xlinkType',xmlnsXLink:'xmlnsXlink'}},1185,[]);
41
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.find=function(p,h){const A=(0,c.normalize)(h);let _=h,w=n.Info;if(A in p.normal)return p.property[p.normal[A]];if(A.length>4&&'data'===A.slice(0,4)&&l.test(h)){if('-'===h.charAt(4)){const t=h.slice(5).replace(s,u);_='data'+t.charAt(0).toUpperCase()+t.slice(1)}else{const t=h.slice(4);if(!s.test(t)){let n=t.replace(o,f);'-'!==n.charAt(0)&&(n='-'+n),h='data'+n}}w=t.DefinedInfo}return new w(_,h)};var t=r(d[0]),n=r(d[1]),c=r(d[2]);const o=/[A-Z]/g,s=/-[a-z]/g,l=/^data[-\w.:]+$/i;function f(t){return'-'+t.toLowerCase()}function u(t){return t.charAt(1).toUpperCase()}},1186,[1175,1176,1174]);
42
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"handle",{enumerable:!0,get:function(){return p}});var n=r(d[0]),t=r(d[1]),o=r(d[2]),c=r(d[3]),u=r(d[4]),l=r(d[5]),w=r(d[6]);const p=(0,n.zwitch)('type',{invalid:function(n){throw new Error('Expected node, not `'+n+'`')},unknown:function(n){throw new Error('Cannot compile unknown node `'+n.type+'`')},handlers:{comment:t.comment,doctype:o.doctype,element:c.element,raw:u.raw,root:l.root,text:w.text}})},1187,[1188,1189,1201,1202,1212,1214,1213]);
43
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.zwitch=function(t,l){const c=l||{};function o(l,...c){let s=o.invalid;const u=o.handlers;if(l&&n.call(l,t)){const c=String(l[t]);s=n.call(u,c)?u[c]:o.unknown}if(s)return s.call(this,l,...c)}return o.handlers=c.handlers||{},o.invalid=c.invalid,o.unknown=c.unknown,o};const n={}.hasOwnProperty},1188,[]);
44
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.comment=function(u,o,f,b){return b.settings.bogusComments?'<?'+(0,t.stringifyEntities)(u.value,Object.assign({},b.settings.characterReferences,{subset:n}))+'>':'\x3c!--'+u.value.replace(s,function(s){return(0,t.stringifyEntities)(s,Object.assign({},b.settings.characterReferences,{subset:c}))})+'--\x3e'};var t=r(d[0]);const s=/^>|^->|<!--|-->|--!>|<!-$/g,n=['>'],c=['<','>']},1189,[1190]);
45
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})},1190,[1191]);
46
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.stringifyEntities=function(s,o){return(0,t.core)(s,Object.assign({format:n.formatSmart},o))},e.stringifyEntitiesLight=function(n,o){return(0,t.core)(n,Object.assign({format:s.formatBasic},o))};var t=r(d[0]),n=r(d[1]),s=r(d[2])},1191,[1192,1193,1200]);
47
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.core=function(c,o){if(c=c.replace(o.subset?s(o.subset):t,f),o.subset||o.escapeOnly)return c;return c.replace(n,function(t,n,u){return o.format(1024*(t.charCodeAt(0)-55296)+t.charCodeAt(1)-56320+65536,u.charCodeAt(n+2),o)}).replace(u,f);function f(t,n,u){return o.format(t.charCodeAt(0),u.charCodeAt(n+1),o)}};const t=/["&'<>`]/g,n=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,c=/[|\\{}()[\]^$+*?.]/g,o=new WeakMap;function s(t){let n=o.get(t);return n||(n=f(t),o.set(t,n)),n}function f(t){const n=[];let u=-1;for(;++u<t.length;)n.push(t[u].replace(c,'\\$&'));return new RegExp('(?:'+n.join('|')+')','g')}},1192,[]);
48
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.formatSmart=function(s,c,l){let u,f=(0,t.toHexadecimal)(s,c,l.omitOptionalSemicolons);(l.useNamedReferences||l.useShortestReferences)&&(u=(0,n.toNamed)(s,c,l.omitOptionalSemicolons,l.attribute));if((l.useShortestReferences||!u)&&l.useShortestReferences){const t=(0,o.toDecimal)(s,c,l.omitOptionalSemicolons);t.length<f.length&&(f=t)}return u&&(!l.useShortestReferences||u.length<f.length)?u:f};var t=r(d[0]),o=r(d[1]),n=r(d[2])},1193,[1194,1195,1196]);
49
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.toHexadecimal=function(o,n,c){const s='&#x'+o.toString(16).toUpperCase();return c&&n&&!t.test(String.fromCharCode(n))?s:s+';'};const t=/[\dA-Fa-f]/},1194,[]);
50
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.toDecimal=function(n,o,c){const s='&#'+String(n);return c&&o&&!t.test(String.fromCharCode(o))?s:s+';'};const t=/\d/},1195,[]);
51
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.toNamed=function(n,l,f,h){const C=String.fromCharCode(n);if(o.call(s,C)){const n=s[C],o='&'+n;return f&&t.characterEntitiesLegacy.includes(n)&&!c.dangerous.includes(n)&&(!h||l&&61!==l&&u.test(String.fromCharCode(l)))?o:o+';'}return''};var t=r(d[0]),n=r(d[1]),c=r(d[2]);const o={}.hasOwnProperty,s={};let l;for(l in n.characterEntitiesHtml4)o.call(n.characterEntitiesHtml4,l)&&(s[n.characterEntitiesHtml4[l]]=l);const u=/[^\dA-Za-z]/},1196,[1197,1198,1199]);
52
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"characterEntitiesLegacy",{enumerable:!0,get:function(){return c}});const c=['AElig','AMP','Aacute','Acirc','Agrave','Aring','Atilde','Auml','COPY','Ccedil','ETH','Eacute','Ecirc','Egrave','Euml','GT','Iacute','Icirc','Igrave','Iuml','LT','Ntilde','Oacute','Ocirc','Ograve','Oslash','Otilde','Ouml','QUOT','REG','THORN','Uacute','Ucirc','Ugrave','Uuml','Yacute','aacute','acirc','acute','aelig','agrave','amp','aring','atilde','auml','brvbar','ccedil','cedil','cent','copy','curren','deg','divide','eacute','ecirc','egrave','eth','euml','frac12','frac14','frac34','gt','iacute','icirc','iexcl','igrave','iquest','iuml','laquo','lt','macr','micro','middot','nbsp','not','ntilde','oacute','ocirc','ograve','ordf','ordm','oslash','otilde','ouml','para','plusmn','pound','quot','raquo','reg','sect','shy','sup1','sup2','sup3','szlig','thorn','times','uacute','ucirc','ugrave','uml','uuml','yacute','yen','yuml']},1197,[]);
53
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"characterEntitiesHtml4",{enumerable:!0,get:function(){return l}});const l={nbsp:'\xa0',iexcl:'\xa1',cent:'\xa2',pound:'\xa3',curren:'\xa4',yen:'\xa5',brvbar:'\xa6',sect:'\xa7',uml:'\xa8',copy:'\xa9',ordf:'\xaa',laquo:'\xab',not:'\xac',shy:'\xad',reg:'\xae',macr:'\xaf',deg:'\xb0',plusmn:'\xb1',sup2:'\xb2',sup3:'\xb3',acute:'\xb4',micro:'\xb5',para:'\xb6',middot:'\xb7',cedil:'\xb8',sup1:'\xb9',ordm:'\xba',raquo:'\xbb',frac14:'\xbc',frac12:'\xbd',frac34:'\xbe',iquest:'\xbf',Agrave:'\xc0',Aacute:'\xc1',Acirc:'\xc2',Atilde:'\xc3',Auml:'\xc4',Aring:'\xc5',AElig:'\xc6',Ccedil:'\xc7',Egrave:'\xc8',Eacute:'\xc9',Ecirc:'\xca',Euml:'\xcb',Igrave:'\xcc',Iacute:'\xcd',Icirc:'\xce',Iuml:'\xcf',ETH:'\xd0',Ntilde:'\xd1',Ograve:'\xd2',Oacute:'\xd3',Ocirc:'\xd4',Otilde:'\xd5',Ouml:'\xd6',times:'\xd7',Oslash:'\xd8',Ugrave:'\xd9',Uacute:'\xda',Ucirc:'\xdb',Uuml:'\xdc',Yacute:'\xdd',THORN:'\xde',szlig:'\xdf',agrave:'\xe0',aacute:'\xe1',acirc:'\xe2',atilde:'\xe3',auml:'\xe4',aring:'\xe5',aelig:'\xe6',ccedil:'\xe7',egrave:'\xe8',eacute:'\xe9',ecirc:'\xea',euml:'\xeb',igrave:'\xec',iacute:'\xed',icirc:'\xee',iuml:'\xef',eth:'\xf0',ntilde:'\xf1',ograve:'\xf2',oacute:'\xf3',ocirc:'\xf4',otilde:'\xf5',ouml:'\xf6',divide:'\xf7',oslash:'\xf8',ugrave:'\xf9',uacute:'\xfa',ucirc:'\xfb',uuml:'\xfc',yacute:'\xfd',thorn:'\xfe',yuml:'\xff',fnof:'\u0192',Alpha:'\u0391',Beta:'\u0392',Gamma:'\u0393',Delta:'\u0394',Epsilon:'\u0395',Zeta:'\u0396',Eta:'\u0397',Theta:'\u0398',Iota:'\u0399',Kappa:'\u039a',Lambda:'\u039b',Mu:'\u039c',Nu:'\u039d',Xi:'\u039e',Omicron:'\u039f',Pi:'\u03a0',Rho:'\u03a1',Sigma:'\u03a3',Tau:'\u03a4',Upsilon:'\u03a5',Phi:'\u03a6',Chi:'\u03a7',Psi:'\u03a8',Omega:'\u03a9',alpha:'\u03b1',beta:'\u03b2',gamma:'\u03b3',delta:'\u03b4',epsilon:'\u03b5',zeta:'\u03b6',eta:'\u03b7',theta:'\u03b8',iota:'\u03b9',kappa:'\u03ba',lambda:'\u03bb',mu:'\u03bc',nu:'\u03bd',xi:'\u03be',omicron:'\u03bf',pi:'\u03c0',rho:'\u03c1',sigmaf:'\u03c2',sigma:'\u03c3',tau:'\u03c4',upsilon:'\u03c5',phi:'\u03c6',chi:'\u03c7',psi:'\u03c8',omega:'\u03c9',thetasym:'\u03d1',upsih:'\u03d2',piv:'\u03d6',bull:'\u2022',hellip:'\u2026',prime:'\u2032',Prime:'\u2033',oline:'\u203e',frasl:'\u2044',weierp:'\u2118',image:'\u2111',real:'\u211c',trade:'\u2122',alefsym:'\u2135',larr:'\u2190',uarr:'\u2191',rarr:'\u2192',darr:'\u2193',harr:'\u2194',crarr:'\u21b5',lArr:'\u21d0',uArr:'\u21d1',rArr:'\u21d2',dArr:'\u21d3',hArr:'\u21d4',forall:'\u2200',part:'\u2202',exist:'\u2203',empty:'\u2205',nabla:'\u2207',isin:'\u2208',notin:'\u2209',ni:'\u220b',prod:'\u220f',sum:'\u2211',minus:'\u2212',lowast:'\u2217',radic:'\u221a',prop:'\u221d',infin:'\u221e',ang:'\u2220',and:'\u2227',or:'\u2228',cap:'\u2229',cup:'\u222a',int:'\u222b',there4:'\u2234',sim:'\u223c',cong:'\u2245',asymp:'\u2248',ne:'\u2260',equiv:'\u2261',le:'\u2264',ge:'\u2265',sub:'\u2282',sup:'\u2283',nsub:'\u2284',sube:'\u2286',supe:'\u2287',oplus:'\u2295',otimes:'\u2297',perp:'\u22a5',sdot:'\u22c5',lceil:'\u2308',rceil:'\u2309',lfloor:'\u230a',rfloor:'\u230b',lang:'\u2329',rang:'\u232a',loz:'\u25ca',spades:'\u2660',clubs:'\u2663',hearts:'\u2665',diams:'\u2666',quot:'"',amp:'&',lt:'<',gt:'>',OElig:'\u0152',oelig:'\u0153',Scaron:'\u0160',scaron:'\u0161',Yuml:'\u0178',circ:'\u02c6',tilde:'\u02dc',ensp:'\u2002',emsp:'\u2003',thinsp:'\u2009',zwnj:'\u200c',zwj:'\u200d',lrm:'\u200e',rlm:'\u200f',ndash:'\u2013',mdash:'\u2014',lsquo:'\u2018',rsquo:'\u2019',sbquo:'\u201a',ldquo:'\u201c',rdquo:'\u201d',bdquo:'\u201e',dagger:'\u2020',Dagger:'\u2021',permil:'\u2030',lsaquo:'\u2039',rsaquo:'\u203a',euro:'\u20ac'}},1198,[]);
54
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"dangerous",{enumerable:!0,get:function(){return t}});const t=['cent','copy','divide','gt','lt','not','para','times']},1199,[]);
55
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.formatBasic=function(t){return'&#x'+t.toString(16).toUpperCase()+';'}},1200,[]);
56
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.doctype=function(t,c,n,o){return'<!'+(o.settings.upperDoctype?'DOCTYPE':'doctype')+(o.settings.tightDoctype?'':' ')+'html>'}},1201,[]);
57
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.element=function(t,s,l,o){const{schema:p}=o,b='svg'!==p.space&&o.settings.omitOptionalTags;let v='svg'===p.space?o.settings.closeEmptyElements:o.settings.voids.includes(t.tagName.toLowerCase());const y=[];'html'===p.space&&'svg'===t.tagName&&(o.schema=n.svg);const N=h(o,t.properties);'svg'===o.schema.space&&f.has(t.tagName)&&(o.schema=n.html);const j=o.all('html'===p.space&&'template'===t.tagName?t.content:t);o.schema=p,j&&(v=!1);if(N||!b||!(0,u.opening)(t,s,l)){if(y.push('<',t.tagName,N?' '+N:''),v&&('svg'===p.space||o.settings.closeSelfClosing)){const t=N.charAt(N.length-1);(!o.settings.tightSelfClosing||'/'===t||t&&'"'!==t&&"'"!==t)&&y.push(' '),y.push('/')}y.push('>')}y.push(j),v||b&&(0,c.closing)(t,s,l)||y.push('</'+t.tagName+'>');return y.join('')};var t=r(d[0]),s=r(d[1]),n=r(d[2]),l=r(d[3]),o=r(d[4]),c=r(d[5]),u=r(d[6]);const p={name:[['\t\n\f\r &/=>'.split(''),'\t\n\f\r "&\'/=>`'.split('')],['\0\t\n\f\r "&\'/<=>'.split(''),'\0\t\n\f\r "&\'/<=>`'.split('')]],unquoted:[['\t\n\f\r &>'.split(''),'\0\t\n\f\r "&\'<=>`'.split('')],['\0\t\n\f\r "&\'<=>`'.split(''),'\0\t\n\f\r "&\'<=>`'.split('')]],single:[["&'".split(''),'"&\'`'.split('')],["\0&'".split(''),'\0"&\'`'.split('')]],double:[['"&'.split(''),'"&\'`'.split('')],['\0"&'.split(''),'\0"&\'`'.split('')]]},f=new Set(['desc','foreignObject','title']);function h(t,s){const n=[];let l,o=-1;if(s)for(l in s)if(null!==s[l]&&void 0!==s[l]){const o=b(t,l,s[l]);o&&n.push(o)}for(;++o<n.length;){const s=t.settings.tightAttributes?n[o].charAt(n[o].length-1):void 0;o!==n.length-1&&'"'!==s&&"'"!==s&&(n[o]+=' ')}return n.join('')}function b(c,u,f){const h=(0,n.find)(c.schema,u),b=c.settings.allowParseErrors&&'html'===c.schema.space?0:1,v=c.settings.allowDangerousCharacters?0:1;if(!h.overloadedBoolean||f!==h.attribute&&''!==f?!h.boolean&&!h.overloadedBoolean||'string'==typeof f&&f!==h.attribute&&''!==f||(f=Boolean(f)):f=!0,null==f||!1===f||'number'==typeof f&&Number.isNaN(f))return'';const y=(0,o.stringifyEntities)(h.attribute,Object.assign({},c.settings.characterReferences,{subset:p.name[b][v]}));if(!0===f)return y;if(f=Array.isArray(f)?(h.commaSeparated?s.stringify:l.stringify)(f,{padLeft:!c.settings.tightCommaSeparatedLists}):String(f),c.settings.collapseEmptyAttributes&&!f)return y;let N;if(c.settings.preferUnquoted&&(N=(0,o.stringifyEntities)(f,Object.assign({},c.settings.characterReferences,{attribute:!0,subset:p.unquoted[b][v]}))),N!==f){let{quote:s}=c;c.settings.quoteSmart&&(0,t.ccount)(f,s)>(0,t.ccount)(f,c.alternative)&&(s=c.alternative),N=s+(0,o.stringifyEntities)(f,Object.assign({},c.settings.characterReferences,{subset:("'"===s?p.single:p.double)[b][v],attribute:!0}))+s}return y+(N?'='+N:N)}},1202,[1203,1204,1169,1205,1190,1206,1211]);
58
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ccount=function(t,n){const c=String(t);if('string'!=typeof n)throw new TypeError('Expected character');let o=0,f=c.indexOf(n);for(;-1!==f;)o++,f=c.indexOf(n,f+n.length);return o}},1203,[]);
59
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.parse=function(t){const n=[],o=String(t||'');let s=o.indexOf(','),c=0,f=!1;for(;!f;){-1===s&&(s=o.length,f=!0);const t=o.slice(c,s).trim();!t&&f||n.push(t),c=s+1,s=o.indexOf(',',c)}return n},e.stringify=function(t,n){const o=n||{};return(''===t[t.length-1]?[...t,'']:t).join((o.padRight?' ':'')+','+(!1===o.padLeft?'':' ')).trim()}},1204,[]);
60
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.parse=function(t){const n=String(t||'').trim();return n?n.split(/[ \t\n\r\f]+/g):[]},e.stringify=function(t){return t.join(' ').trim()}},1205,[]);
61
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"closing",{enumerable:!0,get:function(){return o}});var t=r(d[0]),n=r(d[1]);const o=(0,r(d[2]).omission)({body:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'comment'!==c.type},caption:N,colgroup:N,dd:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&('dt'===c.tagName||'dd'===c.tagName)},dt:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return Boolean(c&&'element'===c.type&&('dt'===c.tagName||'dd'===c.tagName))},head:N,html:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'comment'!==c.type},li:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&'li'===c.tagName},optgroup:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&'optgroup'===c.tagName},option:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&('option'===c.tagName||'optgroup'===c.tagName)},p:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return c?'element'===c.type&&('address'===c.tagName||'article'===c.tagName||'aside'===c.tagName||'blockquote'===c.tagName||'details'===c.tagName||'div'===c.tagName||'dl'===c.tagName||'fieldset'===c.tagName||'figcaption'===c.tagName||'figure'===c.tagName||'footer'===c.tagName||'form'===c.tagName||'h1'===c.tagName||'h2'===c.tagName||'h3'===c.tagName||'h4'===c.tagName||'h5'===c.tagName||'h6'===c.tagName||'header'===c.tagName||'hgroup'===c.tagName||'hr'===c.tagName||'main'===c.tagName||'menu'===c.tagName||'nav'===c.tagName||'ol'===c.tagName||'p'===c.tagName||'pre'===c.tagName||'section'===c.tagName||'table'===c.tagName||'ul'===c.tagName):!N||!('element'===N.type&&('a'===N.tagName||'audio'===N.tagName||'del'===N.tagName||'ins'===N.tagName||'map'===N.tagName||'noscript'===N.tagName||'video'===N.tagName||N.tagName.includes('-')))},rp:c,rt:c,tbody:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&('tbody'===c.tagName||'tfoot'===c.tagName)},td:u,tfoot:function(t,o,N){return!(0,n.siblingAfter)(N,o)},th:u,thead:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return Boolean(c&&'element'===c.type&&('tbody'===c.tagName||'tfoot'===c.tagName))},tr:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&'tr'===c.tagName}});function N(o,N,c){const u=(0,n.siblingAfter)(c,N,!0);return!u||'comment'!==u.type&&!('text'===u.type&&(0,t.whitespace)(u.value.charAt(0)))}function c(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&('rp'===c.tagName||'rt'===c.tagName)}function u(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&('td'===c.tagName||'th'===c.tagName)}},1206,[1207,1209,1210]);
62
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"whitespace",{enumerable:!0,get:function(){return t.whitespace}});var t=r(d[0])},1207,[1208]);
63
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.whitespace=function(t){return'object'==typeof t?'text'===t.type&&n(t.value):n(t)};const t=/[ \t\n\f\r]/g;function n(n){return''===n.replace(t,'')}},1208,[]);
64
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"siblingAfter",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"siblingBefore",{enumerable:!0,get:function(){return u}});var n=r(d[0]);const t=o(1),u=o(-1),c=[];function o(t){return function(u,o,f){const l=u?u.children:c;let s=(o||0)+t,b=l[s];if(!f)for(;b&&(0,n.whitespace)(b);)s+=t,b=l[s];return b}}},1209,[1207]);
65
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.omission=function(n){return function(o,u,c){return t.call(n,o.tagName)&&n[o.tagName](o,u,c)}};const t={}.hasOwnProperty},1210,[]);
66
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"opening",{enumerable:!0,get:function(){return c}});var t=r(d[0]),n=r(d[1]),o=r(d[2]);const c=(0,r(d[3]).omission)({body:function(o){const c=(0,n.siblingAfter)(o,-1,!0);return!(c&&('comment'===c.type||'text'===c.type&&(0,t.whitespace)(c.value.charAt(0))||'element'===c.type&&('meta'===c.tagName||'link'===c.tagName||'script'===c.tagName||'style'===c.tagName||'template'===c.tagName)))},colgroup:function(t,c,l){const s=(0,n.siblingBefore)(l,c);if(l&&s&&'element'===s.type&&'colgroup'===s.tagName&&(0,o.closing)(s,l.children.indexOf(s),l))return!1;const f=(0,n.siblingAfter)(t,-1,!0);return Boolean(f&&'element'===f.type&&'col'===f.tagName)},head:function(t){const n=new Set;for(const o of t.children)if('element'===o.type&&('base'===o.tagName||'title'===o.tagName)){if(n.has(o.tagName))return!1;n.add(o.tagName)}const o=t.children[0];return!o||'element'===o.type},html:function(t){const o=(0,n.siblingAfter)(t,-1);return!o||'comment'!==o.type},tbody:function(t,c,l){const s=(0,n.siblingBefore)(l,c);if(l&&s&&'element'===s.type&&('thead'===s.tagName||'tbody'===s.tagName)&&(0,o.closing)(s,l.children.indexOf(s),l))return!1;const f=(0,n.siblingAfter)(t,-1);return Boolean(f&&'element'===f.type&&'tr'===f.tagName)}})},1211,[1207,1209,1206,1210]);
67
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.raw=function(n,u,l,o){return o.settings.allowDangerousHtml?n.value:(0,t.text)(n,u,l,o)};var t=r(d[0])},1212,[1213]);
68
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.text=function(n,c,u,l){return!u||'element'!==u.type||'script'!==u.tagName&&'style'!==u.tagName?(0,t.stringifyEntities)(n.value,Object.assign({},l.settings.characterReferences,{subset:s})):n.value};var t=r(d[0]);const s=['<','&']},1213,[1190]);
69
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.root=function(t,n,o,u){return u.all(t)}},1214,[]);
70
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"JavaScriptScanner",{enumerable:!0,get:function(){return c.n}}),Object.defineProperty(e,"createJavaScriptRawEngine",{enumerable:!0,get:function(){return n.createJavaScriptRawEngine}}),Object.defineProperty(e,"createJavaScriptRegexEngine",{enumerable:!0,get:function(){return t.createJavaScriptRegexEngine}}),Object.defineProperty(e,"defaultJavaScriptRegexConstructor",{enumerable:!0,get:function(){return t.defaultJavaScriptRegexConstructor}});var t=r(d[0]),n=r(d[1]),c=r(d[2])},1215,[1216,1230,1217]);
71
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createJavaScriptRegexEngine",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"defaultJavaScriptRegexConstructor",{enumerable:!0,get:function(){return c}});var t=r(d[0]),n=r(d[1]);function c(t,c){return(0,n.toRegExp)(t,Object.assign({global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0}},c))}function o(n={}){const o=Object.assign({target:"auto",cache:new Map},n);return o.regexConstructor||=t=>c(t,{target:o.target}),{createScanner:n=>new t.n(n,o),createString:t.t}}},1216,[1217,1218]);
72
- __d(function(g,r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"t",{enumerable:!0,get:function(){return c}});const t=4294967295;function e(t){return!t.sticky&&!t.rawOptions?.strategy}function n(e,n){return{index:e,captureIndices:n.map(e=>null==e?{start:t,end:t,length:0}:{start:e[0],end:e[1],length:e[1]-e[0]})}}var i=class{constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:i=!1,cache:s,regexConstructor:c}=n;if(!c)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(t=>{if("string"!=typeof t)return t;const e=s?.get(t);if(e){if(e instanceof RegExp)return e;if(i)return null;throw e}try{const e=c(t);return s?.set(t,e),e}catch(e){if(s?.set(t,e),i)return null;throw e}}),this.lastSearches=this.regexps.map(t=>t&&e(t)?{strId:0,searchedFrom:0,matchIndex:-1,indices:null}:null)}findNextMatchSync(t,e,i){const s="string"==typeof t?t:t.content,c="string"==typeof t?0:t.id||0;let o=-1,u=0,l=null;for(let t=0;t<this.regexps.length;t++){const i=this.regexps[t];if(i)try{const h=c?this.lastSearches[t]:null;let f,p;if(h&&h.strId===c&&h.searchedFrom<=e&&(-1===h.matchIndex||h.matchIndex>=e))f=h.matchIndex,p=h.indices;else{i.lastIndex=e;const t=i.exec(s);f=t?t.index:-1,p=t?t.indices:null,h&&(h.strId=c,h.searchedFrom=e,h.matchIndex=f,h.indices=p)}if(-1===f)continue;if(f===e)return n(t,p);(-1===o||f<u)&&(o=t,u=f,l=p)}catch(t){if(this.options.forgiving)continue;throw t}}return-1===o?null:n(o,l)}};let s=0;function c(t){return{content:t,id:++s}}},1217,[]);
73
- __d(function(_g,_r,_i,_a,_m,_e,_d){"use strict";const e=["lazyCompile"];var t,r,n,a,s,o;function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"EmulatedRegExp",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(_e,"toRegExp",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(_e,"toRegExpDetails",{enumerable:!0,get:function(){return Pe}});var c=i(_r(_d[0])),l=i(_r(_d[1])),u=i(_r(_d[2])),d=_r(_d[3]),p=_r(_d[4]),f=_r(_d[5]),g=_r(_d[6]),h=String.fromCodePoint,y=String.raw,b={},C=globalThis.RegExp;function m(e,{enable:t,disable:r}){return{dotAll:!(r?.dotAll||!t?.dotAll&&!e.dotAll),ignoreCase:!(r?.ignoreCase||!t?.ignoreCase&&!e.ignoreCase)}}function w(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}function _(e,t){return A[e]>=A[t]}function v(e,t){if(null==e)throw new Error(t??"Value expected");return e}b.flagGroups=(()=>{try{new C("(?i:)")}catch{return!1}return!0})(),b.unicodeSets=(()=>{try{new C("[[]]","v")}catch{return!1}return!0})(),b.bugFlagVLiteralHyphenIsRange=!!b.unicodeSets&&(()=>{try{new C(y`[\d\-a]`,"v")}catch{return!0}return!1})(),b.bugNestedClassIgnoresNegation=b.unicodeSets&&new C("[[^a]]","v").test("a");var A={ES2025:2025,ES2024:2024,ES2018:2018},S={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function E(e={}){if("[object Object]"!=={}.toString.call(e))throw new Error("Unexpected options");if(void 0!==e.target&&!S[e.target])throw new Error(`Unexpected target "${e.target}"`);const t=Object.assign({accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1},e,{rules:Object.assign({allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1},e.rules)});return"auto"===t.target&&(t.target=b.flagGroups?"ES2025":b.unicodeSets?"ES2024":"ES2018"),t}var k=new Set([h(304),h(305)]),x=y`[\p{L}\p{M}\p{N}\p{Pc}]`;function M(e){if(k.has(e))return[e];const t=new Set,r=e.toLowerCase(),n=r.toUpperCase(),a=L.get(r),s=P.get(r),o=$.get(r);return 1===[...n].length&&t.add(n),o&&t.add(o),a&&t.add(a),t.add(r),s&&t.add(s),[...t]}var I=new Map("C Other\nCc Control cntrl\nCf Format\nCn Unassigned\nCo Private_Use\nCs Surrogate\nL Letter\nLC Cased_Letter\nLl Lowercase_Letter\nLm Modifier_Letter\nLo Other_Letter\nLt Titlecase_Letter\nLu Uppercase_Letter\nM Mark Combining_Mark\nMc Spacing_Mark\nMe Enclosing_Mark\nMn Nonspacing_Mark\nN Number\nNd Decimal_Number digit\nNl Letter_Number\nNo Other_Number\nP Punctuation punct\nPc Connector_Punctuation\nPd Dash_Punctuation\nPe Close_Punctuation\nPf Final_Punctuation\nPi Initial_Punctuation\nPo Other_Punctuation\nPs Open_Punctuation\nS Symbol\nSc Currency_Symbol\nSk Modifier_Symbol\nSm Math_Symbol\nSo Other_Symbol\nZ Separator\nZl Line_Separator\nZp Paragraph_Separator\nZs Space_Separator\nASCII\nASCII_Hex_Digit AHex\nAlphabetic Alpha\nAny\nAssigned\nBidi_Control Bidi_C\nBidi_Mirrored Bidi_M\nCase_Ignorable CI\nCased\nChanges_When_Casefolded CWCF\nChanges_When_Casemapped CWCM\nChanges_When_Lowercased CWL\nChanges_When_NFKC_Casefolded CWKCF\nChanges_When_Titlecased CWT\nChanges_When_Uppercased CWU\nDash\nDefault_Ignorable_Code_Point DI\nDeprecated Dep\nDiacritic Dia\nEmoji\nEmoji_Component EComp\nEmoji_Modifier EMod\nEmoji_Modifier_Base EBase\nEmoji_Presentation EPres\nExtended_Pictographic ExtPict\nExtender Ext\nGrapheme_Base Gr_Base\nGrapheme_Extend Gr_Ext\nHex_Digit Hex\nIDS_Binary_Operator IDSB\nIDS_Trinary_Operator IDST\nID_Continue IDC\nID_Start IDS\nIdeographic Ideo\nJoin_Control Join_C\nLogical_Order_Exception LOE\nLowercase Lower\nMath\nNoncharacter_Code_Point NChar\nPattern_Syntax Pat_Syn\nPattern_White_Space Pat_WS\nQuotation_Mark QMark\nRadical\nRegional_Indicator RI\nSentence_Terminal STerm\nSoft_Dotted SD\nTerminal_Punctuation Term\nUnified_Ideograph UIdeo\nUppercase Upper\nVariation_Selector VS\nWhite_Space space\nXID_Continue XIDC\nXID_Start XIDS".split(/\s/).map(e=>[(0,d.slug)(e),e])),P=new Map([["s",h(383)],[h(383),"s"]]),$=new Map([[h(223),h(7838)],[h(107),h(8490)],[h(229),h(8491)],[h(969),h(8486)]]),L=new Map([j(453),j(456),j(459),j(498),...B(8072,8079),...B(8088,8095),...B(8104,8111),j(8124),j(8140),j(8188)]),O=new Map([["alnum",y`[\p{Alpha}\p{Nd}]`],["alpha",y`\p{Alpha}`],["ascii",y`\p{ASCII}`],["blank",y`[\p{Zs}\t]`],["cntrl",y`\p{Cc}`],["digit",y`\p{Nd}`],["graph",y`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",y`\p{Lower}`],["print",y`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",y`[\p{P}\p{S}]`],["space",y`\p{space}`],["upper",y`\p{Upper}`],["word",y`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",y`\p{AHex}`]]);function F(e,t){const r=[];for(let n=e;n<=t;n++)r.push(n);return r}function j(e){const t=h(e);return[t.toLowerCase(),t]}function B(e,t){return F(e,t).map(e=>j(e))}var N=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function R(e,t){const r=Object.assign({accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025"},t);T(e);const n={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:_(r.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};(0,p.traverse)(e,G,n);const a={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:a,prevFlags:null,globalFlags:a,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:n.subroutineRefMap};(0,p.traverse)(e,U,s);const o={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return(0,p.traverse)(e,D,o),e._originMap=s.groupOriginByCopy,e._strategy=n.strategy,e}var G={AbsenceFunction({node:e,parent:t,replaceWith:r}){const{body:n,kind:a}=e;if("repeater"!==a)throw new Error("Unsupported absence function \"(?~|\"");{const e=(0,d.createGroup)();e.body[0].body.push((0,d.createLookaroundAssertion)({negate:!0,body:n}),(0,d.createUnicodeProperty)("Any"));const a=(0,d.createGroup)();a.body[0].body.push((0,d.createQuantifier)("greedy",0,1/0,e)),r(oe(a,t),{traverse:!0})}},Alternative:{enter({node:e,parent:t,key:r},{flagDirectivesByAlt:n}){const a=e.body.filter(e=>"flags"===e.kind);for(let e=r+1;e<t.body.length;e++){w(n,t.body[e],[]).push(...a)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const r=Q(t.get(e));if(r){const t=(0,d.createGroup)({flags:r});t.body[0].body=e.body,e.body=[oe(t,e)]}}}},Assertion({node:e,parent:t,key:r,container:n,root:a,remove:s,replaceWith:o},i){const{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:p,supportedGNodes:f,wordIsAscii:g}=i;if("text_segment_boundary"===c)throw new Error(`Unsupported text segment boundary "\\${l?"Y":"y"}"`);if("line_end"===c)o(oe((0,d.createLookaroundAssertion)({body:[(0,d.createAlternative)({body:[(0,d.createAssertion)("string_end")]}),(0,d.createAlternative)({body:[(0,d.createCharacter)(10)]})]}),t));else if("line_start"===c)o(oe(ne(y`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if("search_start"===c)if(f.has(e))a.flags.sticky=!0,s();else{const e=n[r-1];if(e&&ee(e))o(oe((0,d.createLookaroundAssertion)({negate:!0}),t));else{if(p)throw new Error(y`Uses "\G" in a way that requires a subclass`);o(se((0,d.createAssertion)("string_start"),t)),i.strategy="clip_search"}}else if("string_end"===c||"string_start"===c);else if("string_end_newline"===c)o(oe(ne(y`(?=\n?\z)`),t));else{if("word_boundary"!==c)throw new Error(`Unexpected assertion kind "${c}"`);if(!g&&!u){o(oe(ne(l?`(?:(?<=${x})(?=${x})|(?<!${x})(?!${x}))`:`(?:(?<=${x})(?!${x})|(?<!${x})(?=${x}))`),t))}}},Backreference({node:e},{jsGroupNameMap:t}){let{ref:r}=e;"string"!=typeof r||re(r)||(r=q(r,t),e.ref=r)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:r}){let{name:n}=e;n&&!re(n)&&(n=q(n,t),e.name=n),r.set(e.number,e),n&&r.set(n,e)},CharacterClassRange({node:e,parent:t,replaceWith:r}){if("intersection"===t.kind){r(oe((0,d.createCharacterClass)({body:[e]}),t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:r},{accuracy:n,minTargetEs2024:a,digitIsAscii:s,spaceIsAscii:o,wordIsAscii:i}){const{kind:c,negate:l,value:u}=e;if(!s||"digit"!==c&&"digit"!==u)if(!o||"space"!==c&&"space"!==u)if(!i||"word"!==c&&"word"!==u)if("any"===c)r(se((0,d.createUnicodeProperty)("Any"),t));else if("digit"===c)r(se((0,d.createUnicodeProperty)("Nd",{negate:l}),t));else if("dot"===c);else if("text_segment"===c){if("strict"===n)throw new Error(y`Use of "\X" requires non-strict accuracy`);const e="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",s=y`\p{RI}{2}|${e}(?:\u200D${e})*`;r(oe(ne(y`(?>\r\n|${a?y`\p{RGI_Emoji}`:s}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if("hex"===c)r(se((0,d.createUnicodeProperty)("AHex",{negate:l}),t));else if("newline"===c)r(oe(ne(l?"[^\n]":"(?>\r\n?|[\n\v\f\x85\u2028\u2029])"),t));else if("posix"===c)if(a||"graph"!==u&&"print"!==u)r(oe(ae(ne(O.get(u)),l),t));else{if("strict"===n)throw new Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:"!-~",print:" -~"}[u];l&&(e=`\0-${h(e.codePointAt(0)-1)}${h(e.codePointAt(2)+1)}-\udbff\udfff`),r(oe(ne(`[${e}]`),t))}else if("property"===c)I.has((0,d.slug)(u))||(e.key="sc");else if("space"===c)r(se((0,d.createUnicodeProperty)("space",{negate:l}),t));else{if("word"!==c)throw new Error(`Unexpected character set kind "${c}"`);r(oe(ae(ne(x),l),t))}else r(se((0,d.createCharacterSet)("word",{negate:l}),t));else r(oe(ae(ne("[\t-\r ]"),l),t));else r(se((0,d.createCharacterSet)("digit",{negate:l}),t))},Directive({node:e,parent:t,root:r,remove:n,replaceWith:a,removeAllPrevSiblings:s,removeAllNextSiblings:o}){const{kind:i,flags:c}=e;if("flags"===i)if(c.enable||c.disable){const e=(0,d.createGroup)({flags:c});e.body[0].body=o(),a(oe(e,t),{traverse:!0})}else n();else{if("keep"!==i)throw new Error(`Unexpected directive kind "${i}"`);{const e=r.body[0],n=1===r.body.length&&(0,d.hasOnlyChild)(e,{type:"Group"})&&1===e.body[0].body.length?e.body[0]:r;if(t.parent!==n||n.body.length>1)throw new Error(y`Uses "\K" in a way that's unsupported`);const o=(0,d.createLookaroundAssertion)({behind:!0});o.body[0].body=s(),a(oe(o,t))}}},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if("word"===e.textSegmentMode)throw new 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;const{enable:t,disable:r}=e.flags;t?.extended&&delete t.extended,r?.extended&&delete r.extended,t?.dotAll&&r?.dotAll&&delete t.dotAll,t?.ignoreCase&&r?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:r}=e;"lookbehind"===r&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:r}){const{kind:n}=e;if("fail"!==n)throw new Error(`Unsupported named callout "(*${n.toUpperCase()}"`);r(oe((0,d.createLookaroundAssertion)({negate:!0}),t))},Quantifier({node:e}){if("Quantifier"===e.body.type){const t=(0,d.createGroup)();t.body[0].body.push(e.body),e.body=oe(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const r=[];let n=!1,a=!1;for(const t of e.body)if(1===t.body.length&&"search_start"===t.body[0].kind)t.body.pop();else{const e=K(t.body);e?(n=!0,Array.isArray(e)?r.push(...e):r.push(e)):a=!0}n&&!a&&r.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:r,strategy:n}){if("strict"===t&&r&&n)throw new Error(y`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:r}=e;"string"!=typeof r||re(r)||(r=q(r,t),e.ref=r)}},U={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:r}){const{orphan:n,ref:a}=e;n||r.set(e,[...t.get(a).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:r,skip:n},{groupOriginByCopy:a,groupsByName:s,multiplexCapturesToLeftByRef:o,openRefs:i,reffedNodesByReferencer:c}){const l=a.get(e);if(l&&i.has(e.number)){const n=se(H(e.number),t);return c.set(n,i.get(e.number)),void r(n)}i.set(e.number,e),o.set(e.number,[]),e.name&&w(o,e.name,[]);const u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){const r=u[t];if(l===r.node||l&&l===r.origin||e===r.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){const t=w(s,e.name,new Map);let r=!1;if(l)r=!0;else for(const e of t.values())if(!e.hasDuplicateNameToRemove){r=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:r})}},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=m(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:r},n){const{isRecursive:a,ref:s}=e;if(a){let r=t;for(;(r=r.parent)&&("CapturingGroup"!==r.type||r.name!==s&&r.number!==s););return void n.reffedNodesByReferencer.set(e,r)}const o=n.subroutineRefMap.get(s),i=0===s,c=i?H(0):V(o,n.groupOriginByCopy,null);let l=c;if(!i){const e=Q(z(o,e=>"Group"===e.type&&!!e.flags)),t=e?m(n.globalFlags,e):n.globalFlags;u=t,p=n.currentFlags,(u.dotAll!==p.dotAll||u.ignoreCase!==p.ignoreCase)&&(l=(0,d.createGroup)({flags:X(t)}),l.body[0].body.push(c))}var u,p;r(oe(l,t),{traverse:!i})}},D={Backreference({node:e,parent:t,replaceWith:r},n){if(e.orphan)return void(n.highestOrphanBackref=Math.max(n.highestOrphanBackref,e.ref));const a=n.reffedNodesByReferencer.get(e).filter(t=>W(t,e));if(a.length)if(a.length>1){r(oe((0,d.createGroup)({atomic:!0,body:a.reverse().map(e=>(0,d.createAlternative)({body:[(0,d.createBackreference)(e.number)]}))}),t))}else e.ref=a[0].number;else r(oe((0,d.createLookaroundAssertion)({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){const r=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<r;t++){const t=(0,d.createCapturingGroup)();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&0!==e.ref&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function T(e){(0,p.traverse)(e,{"*"({node:e,parent:t}){e.parent=t}})}function W(e,t){let r=t;do{if("Regex"===r.type)return!1;if("Alternative"===r.type)continue;if(r===e)return!1;const t=Z(r.parent);for(const n of t){if(n===r)break;if(n===e||J(n,e))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function V(e,t,r,n){const a=Array.isArray(e)?[]:{};for(const[s,o]of Object.entries(e))"parent"===s?a.parent=Array.isArray(r)?n:r:o&&"object"==typeof o?a[s]=V(o,t,a,r):("type"===s&&"CapturingGroup"===o&&t.set(a,t.get(e)??e),a[s]=o);return a}function H(e){const t=(0,d.createSubroutine)(e);return t.isRecursive=!0,t}function z(e,t){const r=[];for(;e=e.parent;)t&&!t(e)||r.push(e);return r}function q(e,t){if(t.has(e))return t.get(e);const r=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,"_")}`;return t.set(e,r),r}function Q(e){const t=["dotAll","ignoreCase"],r={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete r.disable[t],r.enable[t]=!0),e.disable?.[t]&&(r.disable[t]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function X({dotAll:e,ignoreCase:t}){const r={};return(e||t)&&(r.enable={},e&&(r.enable.dotAll=!0),t&&(r.enable.ignoreCase=!0)),e&&t||(r.disable={},!e&&(r.disable.dotAll=!0),!t&&(r.disable.ignoreCase=!0)),r}function Z(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function K(e){const t=e.find(e=>"search_start"===e.kind||te(e,{negate:!1})||!Y(e));if(!t)return null;if("search_start"===t.kind)return t;if("LookaroundAssertion"===t.type)return t.body[0].body[0];if("CapturingGroup"===t.type||"Group"===t.type){const e=[];for(const r of t.body){const t=K(r.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function J(e,t){const r=Z(e)??[];for(const e of r)if(e===t||J(e,t))return!0;return!1}function Y({type:e}){return"Assertion"===e||"Directive"===e||"LookaroundAssertion"===e}function ee(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||"Quantifier"===e.type&&e.min&&t.includes(e.body.type)}function te(e,t){const r=Object.assign({negate:null},t);return"LookaroundAssertion"===e.type&&(null===r.negate||e.negate===r.negate)&&1===e.body.length&&(0,d.hasOnlyChild)(e.body[0],{type:"Assertion",kind:"search_start"})}function re(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function ne(e,t){const r=(0,d.parse)(e,Object.assign({},t,{unicodePropertyMap:I})).body;return r.length>1||r[0].body.length>1?(0,d.createGroup)({body:r}):r[0].body[0]}function ae(e,t){return e.negate=t,e}function se(e,t){return e.parent=t,e}function oe(e,t){return T(e),e.parent=t,e}function ie(e,t){const r=E(t),n=_(r.target,"ES2024"),a=_(r.target,"ES2025"),s=r.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let o=null,i=null;if(!a){const t=[e.flags.ignoreCase];(0,p.traverse)(e,ce,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:i=!0}})}const c={dotAll:e.flags.dotAll,ignoreCase:!(!e.flags.ignoreCase&&!o||i)};let l=e;const u={accuracy:r.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!(a||!o||!i),useFlagMods:a,useFlagV:n,verbose:r.verbose};function d(e){u.lastNode=l,l=e;return v(le[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}const f={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:Object.assign({},e.options)};return n||(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&&w(f._captureTransfers,e.transferTo,[]).push(t)}),f}var ce={"*":{enter({node:e},t){if(ve(e)){const r=t.getCurrentModI();t.pushModI(e.flags?m({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},t){ve(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){he(h(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},r){t(),ye(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},t){"property"===e.kind&&N.has(e.value)&&t.setHasCasedChar()}},le={Alternative:({body:e},t,r)=>e.map(r).join(""),Assertion({kind:e,negate:t}){if("string_end"===e)return"$";if("string_start"===e)return"^";if("word_boundary"===e)return t?y`\B`:y`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if("number"!=typeof e)throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&"strict"===t.accuracy&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,r){const{body:n,name:a,number:s}=e,o={ignoreCase:t.currentFlags.ignoreCase},i=t.originMap.get(e);return i&&(o.hidden=!0,s>i.number&&(o.transferTo=i.number)),t.captureMap.set(s,o),`(${a?`?<${a}>`:""}${n.map(r).join("|")})`},Character({value:e},t){const r=h(e),n=be(e,{escDigit:"Backreference"===t.lastNode.type,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(n!==r)return n;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&he(r)){const e=M(r);return t.inCharClass?e.join(""):e.length>1?`[${e.join("")}]`:e[0]}return r},CharacterClass(e,t,r){const{kind:n,negate:a,parent:s}=e;let{body:o}=e;if("intersection"===n&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");b.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(Ae)&&(o=[(0,d.createCharacter)(45),...o.filter(e=>!Ae(e))]);const i=()=>`[${a?"^":""}${o.map(r).join("intersection"===n?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||b.bugNestedClassIgnoresNegation)&&!a){const t=o.filter(e=>"CharacterClass"===e.type&&"union"===e.kind&&e.negate);if(t.length){const n=(0,d.createGroup)(),a=n.body[0];return n.parent=s,a.parent=n,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=a,a.body.push(e)):n.body.pop(),t.forEach(e=>{const t=(0,d.createAlternative)({body:[e]});e.parent=t,t.parent=n,n.body.push(t)}),r(n)}}t.inCharClass=!0;const n=i();return t.inCharClass=!1,n}const c=o[0];if("union"===n&&!a&&c&&((!t.useFlagV||!t.verbose)&&"union"===s.kind&&(!b.bugFlagVLiteralHyphenIsRange||!t.useFlagV)||!t.verbose&&"intersection"===s.kind&&1===o.length&&"CharacterClassRange"!==c.type))return o.map(r).join("");if(!t.useFlagV&&"CharacterClass"===s.type)throw new Error("Uses nested character class in a way that requires min target ES2024");return i()},CharacterClassRange(e,t){const r=e.min.value,n=e.max.value,a={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=be(r,a),o=be(n,a),i=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){Ce(ye(e)).forEach(e=>{i.add(Array.isArray(e)?`${be(e[0],a)}-${be(e[1],a)}`:be(e,a))})}return`${s}-${o}${[...i].join("")}`},CharacterSet({kind:e,negate:t,value:r,key:n},a){if("dot"===e)return a.currentFlags.dotAll?a.appliedGlobalFlags.dotAll||a.useFlagMods?".":"[^]":y`[^\n]`;if("digit"===e)return t?y`\D`:y`\d`;if("property"===e){if(a.useAppliedIgnoreCase&&a.currentFlags.ignoreCase&&N.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${t?y`\P`:y`\p`}{${n?`${n}=`:""}${r}}`}if("word"===e)return t?y`\W`:y`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags:(e,t)=>(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":""),Group({atomic:e,body:t,flags:r,parent:n},a,s){const o=a.currentFlags;r&&(a.currentFlags=m(o,r));const i=t.map(s).join("|"),c=a.verbose||1!==t.length||"Quantifier"===n.type||e||a.useFlagMods&&r?`(?${me(e,r,a.useFlagMods)}${i})`:i;return a.currentFlags=o,c},LookaroundAssertion:({body:e,kind:t,negate:r},n,a)=>`(?${`${"lookahead"===t?"":"<"}${r?"!":"="}`}${e.map(a).join("|")})`,Quantifier:(e,t,r)=>r(e.body)+we(e),Subroutine({isRecursive:e,ref:t},r){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const n=r.recursionLimit;return 0===t?`(?R=${n})`:y`\g<${t}&R=${n}>`}},ue=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),de=new Set(["-","\\","]","^","["]),pe=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),fe=new Map([[9,y`\t`],[10,y`\n`],[11,y`\v`],[12,y`\f`],[13,y`\r`],[8232,y`\u2028`],[8233,y`\u2029`],[65279,y`\uFEFF`]]),ge=/^\p{Cased}$/u;function he(e){return ge.test(e)}function ye(e,t){const r=!!t?.firstOnly,n=e.min.value,a=e.max.value,s=[];if(n<65&&(65535===a||a>=131071)||65536===n&&a>=131071)return s;for(let e=n;e<=a;e++){const t=h(e);if(!he(t))continue;const o=M(t).filter(e=>{const t=e.codePointAt(0);return t<n||t>a});if(o.length&&(s.push(...o),r))break}return s}function be(e,{escDigit:t,inCharClass:r,useFlagV:n}){if(fe.has(e))return fe.get(e);if(e<32||e>126&&e<160||e>262143||t&&((a=e)>47&&a<58))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;var a;const s=r?n?pe:de:ue,o=h(e);return(s.has(o)?"\\":"")+o}function Ce(e){const t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),r=[];let n=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?n??=t[e]:null===n?r.push(t[e]):(r.push([n,t[e]]),n=null);return r}function me(e,t,r){if(e)return">";let n="";if(t&&r){const{enable:e,disable:r}=t;n=(e?.ignoreCase?"i":"")+(e?.dotAll?"s":"")+(r?"-":"")+(r?.ignoreCase?"i":"")+(r?.dotAll?"s":"")}return`${n}:`}function we({kind:e,max:t,min:r}){let n;return n=r||1!==t?r||t!==1/0?1===r&&t===1/0?"+":r===t?`{${r}}`:`{${r},${t===1/0?"":t}}`:"*":"?",n+{greedy:"",lazy:"?",possessive:"+"}[e]}function ve({type:e}){return"CapturingGroup"===e||"Group"===e||"LookaroundAssertion"===e}function Ae({type:e,value:t}){return"Character"===e&&45===t}var Se=(t=(0,u.default)("captureMap"),r=(0,u.default)("compiled"),n=(0,u.default)("pattern"),a=(0,u.default)("nameMap"),s=(0,u.default)("strategy"),o=(0,u.default)("execCore"),class i extends RegExp{get source(){return(0,l.default)(this,n)[n]||"(?:)"}constructor(e,c,u){const d=!!u?.lazyCompile;if(e instanceof RegExp){if(u)throw new Error("Cannot provide options when copying a regexp");const d=e;super(d,c),Object.defineProperty(this,o,{value:Ee}),Object.defineProperty(this,t,{writable:!0,value:new Map}),Object.defineProperty(this,r,{writable:!0,value:null}),Object.defineProperty(this,n,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:null}),Object.defineProperty(this,s,{writable:!0,value:null}),this.rawOptions={},(0,l.default)(this,n)[n]=d.source,d instanceof i&&((0,l.default)(this,t)[t]=(0,l.default)(d,t)[t],(0,l.default)(this,a)[a]=(0,l.default)(d,a)[a],(0,l.default)(this,s)[s]=(0,l.default)(d,s)[s],this.rawOptions=d.rawOptions)}else{const i=Object.assign({hiddenCaptures:[],strategy:null,transfers:[]},u);super(d?"":e,c),Object.defineProperty(this,o,{value:Ee}),Object.defineProperty(this,t,{writable:!0,value:new Map}),Object.defineProperty(this,r,{writable:!0,value:null}),Object.defineProperty(this,n,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:null}),Object.defineProperty(this,s,{writable:!0,value:null}),this.rawOptions={},(0,l.default)(this,n)[n]=e,(0,l.default)(this,t)[t]=xe(i.hiddenCaptures,i.transfers),(0,l.default)(this,s)[s]=i.strategy,this.rawOptions=u??{}}d||((0,l.default)(this,r)[r]=this)}exec(t){if(!(0,l.default)(this,r)[r]){const t=this.rawOptions,a=(0,c.default)(t,e);(0,l.default)(this,r)[r]=new i((0,l.default)(this,n)[n],this.flags,a)}const a=this.global||this.sticky,u=this.lastIndex;if("clip_search"===(0,l.default)(this,s)[s]&&a&&u){this.lastIndex=0;const e=(0,l.default)(this,o)[o](t.slice(u));return e&&(ke(e,u,t,this.hasIndices),this.lastIndex+=u),e}return(0,l.default)(this,o)[o](t)}});function Ee(e){(0,l.default)(this,r)[r].lastIndex=this.lastIndex;const n=RegExp.prototype.exec.call((0,l.default)(this,r)[r],e);if(this.lastIndex=(0,l.default)(this,r)[r].lastIndex,!n||!(0,l.default)(this,t)[t].size)return n;const s=[...n];let o;n.length=1,this.hasIndices&&(o=[...n.indices],n.indices.length=1);const i=[0];for(let e=1;e<s.length;e++){const{hidden:r,transferTo:c}=(0,l.default)(this,t)[t].get(e)??{};if(r?i.push(null):(i.push(n.length),n.push(s[e]),this.hasIndices&&n.indices.push(o[e])),c&&void 0!==s[e]){const t=i[c];if(!t)throw new Error(`Invalid capture transfer to "${t}"`);if(n[t]=s[e],this.hasIndices&&(n.indices[t]=o[e]),n.groups){(0,l.default)(this,a)[a]||((0,l.default)(this,a)[a]=Me(this.source));const t=(0,l.default)(this,a)[a].get(c);t&&(n.groups[t]=s[e],this.hasIndices&&(n.indices.groups[t]=o[e]))}}}return n}function ke(e,t,r,n){if(e.index+=t,e.input=r,n){const r=e.indices;for(let e=0;e<r.length;e++){const n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])}const n=r.groups;n&&Object.keys(n).forEach(e=>{const r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])})}}function xe(e,t){const r=new Map;for(const t of e)r.set(t,{hidden:!0});for(const[e,n]of t)for(const t of n)w(r,t,{}).transferTo=e;return r}function Me(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let n,a=0,s=0;for(;n=t.exec(e);){const{0:e,groups:{capture:t,name:o}}=n;"["===e?a++:a?"]"===e&&a--:t&&(s++,o&&r.set(s,o))}return r}function Ie(e,t){const r=Pe(e,t);return r.options?new Se(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function Pe(e,t){const r=E(t),n=R((0,d.parse)(e,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:I}),{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),a=ie(n,r),s=(0,g.recursion)(a.pattern,{captureTransfers:a._captureTransfers,hiddenCaptures:a._hiddenCaptures,mode:"external"}),o=(0,f.possessive)(s.pattern),i=(0,f.atomic)(o.pattern,{captureTransfers:s.captureTransfers,hiddenCaptures:s.hiddenCaptures}),c={pattern:i.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${a.flags}${a.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const e=i.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(i.captureTransfers),a=n._strategy,s=c.pattern.length>=r.lazyCompileLength;(e.length||t.length||a||s)&&(c.options=Object.assign({},e.length&&{hiddenCaptures:e},t.length&&{transfers:t},a&&{strategy:a},s&&{lazyCompile:s}))}return c}},1218,[25,30,31,1219,1223,1224,1229]);
74
- __d(function(g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"createAbsenceFunction",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"createAlternative",{enumerable:!0,get:function(){return f}}),Object.defineProperty(_e,"createAssertion",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"createBackreference",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"createCapturingGroup",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_e,"createCharacter",{enumerable:!0,get:function(){return m}}),Object.defineProperty(_e,"createCharacterClass",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_e,"createCharacterClassRange",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"createCharacterSet",{enumerable:!0,get:function(){return C}}),Object.defineProperty(_e,"createDirective",{enumerable:!0,get:function(){return x}}),Object.defineProperty(_e,"createFlags",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"createGroup",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"createLookaroundAssertion",{enumerable:!0,get:function(){return v}}),Object.defineProperty(_e,"createNamedCallout",{enumerable:!0,get:function(){return I}}),Object.defineProperty(_e,"createPosixClass",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"createQuantifier",{enumerable:!0,get:function(){return N}}),Object.defineProperty(_e,"createRegex",{enumerable:!0,get:function(){return A}}),Object.defineProperty(_e,"createSubroutine",{enumerable:!0,get:function(){return E}}),Object.defineProperty(_e,"createUnicodeProperty",{enumerable:!0,get:function(){return _}}),Object.defineProperty(_e,"hasOnlyChild",{enumerable:!0,get:function(){return r.hasOnlyChild}}),Object.defineProperty(_e,"isAlternativeContainer",{enumerable:!0,get:function(){return r.isAlternativeContainer}}),Object.defineProperty(_e,"isQuantifiable",{enumerable:!0,get:function(){return r.isQuantifiable}}),Object.defineProperty(_e,"parse",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"slug",{enumerable:!0,get:function(){return z}});var e=_r(_d[0]),n=_r(_d[1]),r=_r(_d[2]);function t(r,t={}){const l=Object.assign({flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null},t,{rules:Object.assign({captureGroup:!1,singleline:!1},t.rules)}),b=(0,e.tokenize)(r,{flags:l.flags,rules:{captureGroup:l.rules.captureGroup,singleline:l.rules.singleline}}),y=(e,n)=>{const r=b.tokens[h.nextIndex];switch(h.parent=e,h.nextIndex++,r.type){case"Alternator":return f();case"Assertion":return o(r);case"Backreference":return a(r,h);case"Character":return m(r.value,{useLastValid:!!n.isCheckingRangeEnd});case"CharacterClassHyphen":return i(r,h,n);case"CharacterClassOpen":return u(r,h,n);case"CharacterSet":return s(r,h);case"Directive":return x(r.kind,{flags:r.flags});case"GroupOpen":return c(r,h,n);case"NamedCallout":return I(r.kind,r.tag,r.arguments);case"Quantifier":return d(r,h);case"Subroutine":return p(r,h);default:throw new Error(`Unexpected token type "${r.type}"`)}},h={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:l.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:l.skipBackrefValidation,skipLookbehindValidation:l.skipLookbehindValidation,skipPropertyNameValidation:l.skipPropertyNameValidation,subroutines:[],tokens:b.tokens,unicodePropertyMap:l.unicodePropertyMap,walk:y},k=A(P(b.flags));let w=k.body[0];for(;h.nextIndex<b.tokens.length;){const e=y(w,{});"Alternative"===e.type?(k.body.push(e),w=e):w.body.push(e)}const{capturingGroups:C,hasNumberedRef:O,namedGroupsByName:v,subroutines:j}=h;if(O&&v.size&&!l.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:e}of j)if("number"==typeof e){if(e>C.length)throw new Error("Subroutine uses a group number that's not defined");e&&(C[e-1].isSubroutined=!0)}else{if(!v.has(e))throw new Error(n.r`Subroutine uses a group name that's not defined "\g<${e}>"`);if(v.get(e).length>1)throw new Error(n.r`Subroutine uses a duplicate group name "\g<${e}>"`);v.get(e)[0].isSubroutined=!0}return k}function o({kind:e}){return b((0,n.throwIfNullish)({"^":"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===n.r`\B`||e===n.r`\Y`})}function a({raw:e},n){const r=/^\\k[<']/.test(e),t=r?e.slice(3,-1):e.slice(1),o=(r,t=!1)=>{const o=n.capturingGroups.length;let a=!1;if(r>o){if(!n.skipBackrefValidation)throw new Error(`Not enough capturing groups defined to the left "${e}"`);a=!0}return n.hasNumberedRef=!0,y(t?o+1-r:r,{orphan:a})};if(r){const r=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(t);if(r)return o(+r.groups.num,!!r.groups.sign);if(/[-+]/.test(t))throw new Error(`Invalid backref name "${e}"`);if(!n.namedGroupsByName.has(t))throw new Error(`Group name not defined to the left "${e}"`);return y(t)}return o(+t)}function i(e,r,t){const{tokens:o,walk:a}=r,i=r.parent,u=i.body.at(-1),s=o[r.nextIndex];if(!t.isCheckingRangeEnd&&u&&"CharacterClass"!==u.type&&"CharacterClassRange"!==u.type&&s&&"CharacterClassOpen"!==s.type&&"CharacterClassClose"!==s.type&&"CharacterClassIntersector"!==s.type){const e=a(i,Object.assign({},t,{isCheckingRangeEnd:!0}));if("Character"===u.type&&"Character"===e.type)return i.body.pop(),w(u,e);throw new Error("Invalid character class range")}return m((0,n.cpOf)("-"))}function u({negate:e},n,r){const{tokens:t,walk:o}=n,a=[k()],i=t[n.nextIndex];let u=R(i);for(;"CharacterClassClose"!==u.type;){if("CharacterClassIntersector"===u.type)a.push(k()),n.nextIndex++;else{const e=a.at(-1);e.body.push(o(e,r))}u=R(t[n.nextIndex],i)}const s=k({negate:e});return 1===a.length?s.body=a[0].body:(s.kind="intersection",s.body=a.map(e=>1===e.body.length?e.body[0]:e)),n.nextIndex++,s}function s({kind:e,negate:r,value:t},o){const{normalizeUnknownPropertyNames:a,skipPropertyNameValidation:i,unicodePropertyMap:u}=o;if("property"===e){const o=z(t);if(!n.PosixClassNames.has(o)||u?.has(o))return _(t,{negate:r,normalizeUnknownPropertyNames:a,skipPropertyNameValidation:i,unicodePropertyMap:u});e="posix",t=o}return"posix"===e?j(t,{negate:r}):C(e,{negate:r})}function c(e,r,t){const{tokens:o,capturingGroups:a,namedGroupsByName:i,skipLookbehindValidation:u,walk:s}=r,c=G(e),d="AbsenceFunction"===c.type,p=V(c),l=p&&c.negate;if("CapturingGroup"===c.type&&(a.push(c),c.name&&(0,n.getOrInsert)(i,c.name,[]).push(c)),d&&t.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let b=M(o[r.nextIndex]);for(;"GroupClose"!==b.type;){if("Alternator"===b.type)c.body.push(f()),r.nextIndex++;else{const e=c.body.at(-1),n=s(e,Object.assign({},t,{isInAbsenceFunction:t.isInAbsenceFunction||d,isInLookbehind:t.isInLookbehind||p,isInNegLookbehind:t.isInNegLookbehind||l}));if(e.body.push(n),(p||t.isInLookbehind)&&!u){const e="Lookbehind includes a pattern not allowed by Oniguruma";if(l||t.isInNegLookbehind){if($(n)||"CapturingGroup"===n.type)throw new Error(e)}else if($(n)||V(n)&&n.negate)throw new Error(e)}}b=M(o[r.nextIndex])}return r.nextIndex++,c}function d({kind:e,min:n,max:t},o){const a=o.parent,i=a.body.at(-1);if(!i||!(0,r.isQuantifiable)(i))throw new Error("Quantifier requires a repeatable token");const u=N(e,n,t,i);return a.body.pop(),u}function p({raw:e},n){const{capturingGroups:r,subroutines:t}=n;let o=e.slice(3,-1);const a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(a){const e=+a.groups.num,t=r.length;if(n.hasNumberedRef=!0,o={"":e,"+":t+e,"-":t+1-e}[a.groups.sign],o<1)throw new Error("Invalid subroutine number")}else"0"===o&&(o=0);const i=E(o);return t.push(i),i}function l(e,n){if("repeater"!==e)throw new Error(`Unexpected absence function kind "${e}"`);return{type:"AbsenceFunction",kind:e,body:L(n?.body)}}function f(e){return{type:"Alternative",body:S(e?.body)}}function b(e,n){const r={type:"Assertion",kind:e};return("word_boundary"===e||"text_segment_boundary"===e)&&(r.negate=!!n?.negate),r}function y(e,n){const r=!!n?.orphan;return Object.assign({type:"Backreference",ref:e},r&&{orphan:r})}function h(e,n){const r=Object.assign({name:void 0,isSubroutined:!1},n);if(void 0!==r.name&&!U(r.name))throw new Error(`Group name "${r.name}" invalid in Oniguruma`);return Object.assign({type:"CapturingGroup",number:e},r.name&&{name:r.name},r.isSubroutined&&{isSubroutined:r.isSubroutined},{body:L(n?.body)})}function m(e,n){const r=Object.assign({useLastValid:!1},n);if(e>1114111){const n=e.toString(16);if(!r.useLastValid)throw e>1310719?new Error(`Invalid code point out of range "\\x{${n}}"`):new Error(`Invalid code point out of range in JS "\\x{${n}}"`);e=1114111}return{type:"Character",value:e}}function k(e){const n=Object.assign({kind:"union",negate:!1},e);return{type:"CharacterClass",kind:n.kind,negate:n.negate,body:S(e?.body)}}function w(e,n){if(n.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:n}}function C(e,n){const r=!!n?.negate,t={type:"CharacterSet",kind:e};return("digit"===e||"hex"===e||"newline"===e||"space"===e||"word"===e)&&(t.negate=r),("text_segment"===e||"newline"===e&&!r)&&(t.variableLength=!0),t}function x(e,r={}){if("keep"===e)return{type:"Directive",kind:e};if("flags"===e)return{type:"Directive",kind:e,flags:(0,n.throwIfNullish)(r.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function P(e){return Object.assign({type:"Flags"},e)}function O(e){const n=e?.atomic,r=e?.flags;if(n&&r)throw new Error("Atomic group cannot have flags");return Object.assign({type:"Group"},n&&{atomic:n},r&&{flags:r},{body:L(e?.body)})}function v(e){const n=Object.assign({behind:!1,negate:!1},e);return{type:"LookaroundAssertion",kind:n.behind?"lookbehind":"lookahead",negate:n.negate,body:L(e?.body)}}function I(e,n,r){return{type:"NamedCallout",kind:e,tag:n,arguments:r}}function j(e,r){const t=!!r?.negate;if(!n.PosixClassNames.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:t}}function N(e,n,r,t){if(n>r)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:n,max:r,body:t}}function A(e,n){return{type:"Regex",body:L(n?.body),flags:e}}function E(e){return{type:"Subroutine",ref:e}}function _(e,r){const t=Object.assign({negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null},r);let o=t.unicodePropertyMap?.get(z(e));if(!o)if(t.normalizeUnknownPropertyNames)o=B(e);else if(t.unicodePropertyMap&&!t.skipPropertyNameValidation)throw new Error(n.r`Invalid Unicode property "\p{${e}}"`);return{type:"CharacterSet",kind:"property",value:o??e,negate:t.negate}}function G({flags:e,kind:n,name:r,negate:t,number:o}){switch(n){case"absence_repeater":return l("repeater");case"atomic":return O({atomic:!0});case"capturing":return h(o,{name:r});case"group":return O({flags:e});case"lookahead":case"lookbehind":return v({behind:"lookbehind"===n,negate:t});default:throw new Error(`Unexpected group kind "${n}"`)}}function L(e){if(void 0===e)e=[f()];else if(!Array.isArray(e)||!e.length||!e.every(e=>"Alternative"===e.type))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function S(e){if(void 0===e)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw new Error("Invalid body; expected array of nodes");return e}function $(e){return"LookaroundAssertion"===e.type&&"lookahead"===e.kind}function V(e){return"LookaroundAssertion"===e.type&&"lookbehind"===e.kind}function U(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function B(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 z(e){return e.replace(/[- _]+/g,"").toLowerCase()}function R(e,r){const t=r;return(0,n.throwIfNullish)(e,"Unclosed character class"+("Character"===t?.type&&93===t.value&&"]"===t.raw?' (started with "]")':""))}function M(e){return(0,n.throwIfNullish)(e,"Unclosed group")}},1219,[1220,1221,1222]);
75
- __d(function(_g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"tokenize",{enumerable:!0,get:function(){return a}});var e=_r(_d[0]);const t=e.r`\[\^?`,r=`c.? | C(?:-.?)?|${e.r`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${e.r`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${e.r`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${e.r`o\{[^\}]*\}?`}|${e.r`\d{1,3}`}`,n=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,o=new RegExp(e.r`
76
- \\ (?:
77
- ${r}
78
- | [gk]<[^>]*>?
79
- | [gk]'[^']*'?
80
- | .
81
- )
82
- | \( (?:
83
- \? (?:
84
- [:=!>({]
85
- | <[=!]
86
- | <[^>]*>
87
- | '[^']*'
88
- | ~\|?
89
- | #(?:[^)\\]|\\.?)*
90
- | [^:)]*[:)]
91
- )?
92
- | \*[^\)]*\)?
93
- )?
94
- | (?:${n.source})+
95
- | ${t}
96
- | .
97
- `.replace(/\s+/g,""),"gsu"),s=new RegExp(e.r`
98
- \\ (?:
99
- ${r}
100
- | .
101
- )
102
- | \[:(?:\^?\p{Alpha}+|\^):\]
103
- | ${t}
104
- | &&
105
- | .
106
- `.replace(/\s+/g,""),"gsu");function a(e,t={}){const r=Object.assign({flags:""},t,{rules:Object.assign({captureGroup:!1,singleline:!1},t.rules)});if("string"!=typeof e)throw new Error("String expected as pattern");const n=_(r.flags),s=[n.extended],a={captureGroup:r.rules.captureGroup,getCurrentModX:()=>s.at(-1),numOpenGroups:0,popModX(){s.pop()},pushModX(e){s.push(e)},replaceCurrentModX(e){s[s.length-1]=e},singleline:r.rules.singleline};let u,c=[];for(o.lastIndex=0;u=o.exec(e);){const t=i(a,e,u[0],o.lastIndex);t.tokens?c.push(...t.tokens):t.token&&c.push(t.token),void 0!==t.lastIndex&&(o.lastIndex=t.lastIndex)}const l=[];let p=0;c.filter(e=>"GroupOpen"===e.type).forEach(e=>{"capturing"===e.kind?e.number=++p:"("===e.raw&&l.push(e)}),p||l.forEach((e,t)=>{e.kind="capturing",e.number=t+1});const f=p||l.length;return{tokens:c.map(e=>"EscapedNumber"===e.type?z(e,f):e).flat(),flags:n}}function i(t,r,o,s){const[a,i]=o;if("["===o||"[^"===o){const e=u(r,o,s);return{tokens:e.tokens,lastIndex:e.lastIndex}}if("\\"===a){if("AbBGyYzZ".includes(i))return{token:f(o,o)};if(/^\\g[<']/.test(o)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(o))throw new Error(`Invalid group name "${o}"`);return{token:C(o)}}if(/^\\k[<']/.test(o)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(o))throw new Error(`Invalid group name "${o}"`);return{token:d(o)}}if("K"===i)return{token:$("keep",o)};if("N"===i||"R"===i)return{token:k("newline",o,{negate:"N"===i})};if("O"===i)return{token:k("any",o)};if("X"===i)return{token:k("text_segment",o)};const e=l(o,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if("("===a){if("*"===i)return{token:X(o)};if("(?{"===o)throw new Error(`Unsupported callout "${o}"`);if(o.startsWith("(?#")){if(")"!==r[s])throw new Error('Unclosed comment group "(?#"');return{lastIndex:s+1}}if(/^\(\?[-imx]+[:)]$/.test(o))return{token:N(o,t)};if(t.pushModX(t.getCurrentModX()),t.numOpenGroups++,"("===o&&!t.captureGroup||"(?:"===o)return{token:b("group",o)};if("(?>"===o)return{token:b("atomic",o)};if("(?="===o||"(?!"===o||"(?<="===o||"(?<!"===o)return{token:b("<"===o[2]?"lookbehind":"lookahead",o,{negate:o.endsWith("!")})};if("("===o&&t.captureGroup||o.startsWith("(?<")&&o.endsWith(">")||o.startsWith("(?'")&&o.endsWith("'"))return{token:b("capturing",o,Object.assign({},"("!==o&&{name:o.slice(3,-1)}))};if(o.startsWith("(?~")){if("(?~|"===o)throw new Error(`Unsupported absence function kind "${o}"`);return{token:b("absence_repeater",o)}}throw"(?("===o?new Error(`Unsupported conditional "${o}"`):new Error(`Invalid or unsupported group option "${o}"`)}if(")"===o){if(t.popModX(),t.numOpenGroups--,t.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:E(o)}}if(t.getCurrentModX()){if("#"===o){const e=r.indexOf("\n",s);return{lastIndex:-1===e?r.length:e}}if(/^\s$/.test(o)){const e=/\s+/y;return e.lastIndex=s,{lastIndex:e.exec(r)?e.lastIndex:s}}}if("."===o)return{token:k("dot",o)};if("^"===o||"$"===o){return{token:f(t.singleline?{"^":e.r`\A`,$:e.r`\Z`}[o]:o,o)}}return"|"===o?{token:p(o)}:n.test(o)?{tokens:H(o)}:{token:w((0,e.cpOf)(o),o)}}function u(e,t,r){const n=[x("^"===t[1],t)];let o,a=1;for(s.lastIndex=r;o=s.exec(e);){const e=o[0];if("["===e[0]&&":"!==e[1])a++,n.push(x("^"===e[1],e));else if("]"===e){if("CharacterClassOpen"===n.at(-1).type)n.push(w(93,e));else if(a--,n.push(g(e)),!a)break}else{const t=c(e);Array.isArray(t)?n.push(...t):n.push(t)}}return{tokens:n,lastIndex:s.lastIndex||e.length}}function c(t){if("\\"===t[0])return l(t,{inCharClass:!0});if("["===t[0]){const r=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);if(!r||!e.PosixClassNames.has(r.groups.name))throw new Error(`Invalid POSIX class "${t}"`);return k("posix",t,{value:r.groups.name,negate:!!r.groups.negate})}return"-"===t?h(t):"&&"===t?m(t):w((0,e.cpOf)(t),t)}function l(t,{inCharClass:r}){const n=t[1];if("c"===n||"C"===n)return M(t);if("dDhHsSwW".includes(n))return U(t);if(t.startsWith(e.r`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);if(/^\\[pP]\{/.test(t)){if(3===t.length)throw new Error(`Incomplete or invalid Unicode property "${t}"`);return W(t)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(t))try{const r=t.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...n].map(t=>{const r=[...o.encode(t)].map(e=>`\\x${e.toString(16)}`).join("");return w((0,e.cpOf)(t),r)})}catch{throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`)}if("u"===n||"x"===n)return w(P(t),t);if(O.has(n))return w(O.get(n),t);if(/\d/.test(n))return y(r,t);if("\\"===t)throw new Error(e.r`Incomplete escape "\"`);if("M"===n)throw new Error(`Unsupported meta "${t}"`);if(2===[...t].length)return w(t.codePointAt(1),t);throw new Error(`Unexpected escape "${t}"`)}function p(e){return{type:"Alternator",raw:e}}function f(e,t){return{type:"Assertion",kind:e,raw:t}}function d(e){return{type:"Backreference",raw:e}}function w(e,t){return{type:"Character",value:e,raw:t}}function g(e){return{type:"CharacterClassClose",raw:e}}function h(e){return{type:"CharacterClassHyphen",raw:e}}function m(e){return{type:"CharacterClassIntersector",raw:e}}function x(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function k(e,t,r={}){return Object.assign({type:"CharacterSet",kind:e},r,{raw:t})}function $(t,r,n={}){return"keep"===t?{type:"Directive",kind:t,raw:r}:{type:"Directive",kind:t,flags:(0,e.throwIfNullish)(n.flags),raw:r}}function y(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function E(e){return{type:"GroupClose",raw:e}}function b(e,t,r={}){return Object.assign({type:"GroupOpen",kind:e},r,{raw:t})}function A(e,t,r,n){return{type:"NamedCallout",kind:e,tag:t,arguments:r,raw:n}}function I(e,t,r,n){return{type:"Quantifier",kind:e,min:t,max:r,raw:n}}function C(e){return{type:"Subroutine",raw:e}}const v=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),O=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function M(t){const r="c"===t[1]?t[2]:t[3];if(!r||!/[A-Za-z]/.test(r))throw new Error(`Unsupported control character "${t}"`);return w((0,e.cpOf)(r.toUpperCase())-64,t)}function N(e,t){let{on:r,off:n}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;n??="";const o=(t.getCurrentModX()||r.includes("x"))&&!n.includes("x"),s=G(r),a=G(n),i={};if(s&&(i.enable=s),a&&(i.disable=a),e.endsWith(")"))return t.replaceCurrentModX(o),$("flags",e,{flags:i});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,b("group",e,Object.assign({},(s||a)&&{flags:i}));throw new Error(`Unexpected flag modifier "${e}"`)}function X(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:r,tag:n,args:o}=t.groups;if(!r)throw new Error(`Invalid named callout "${e}"`);if(""===n)throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=o?o.split(",").filter(e=>""!==e).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[a,i,u]=s,c=v.has(r)?r.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if("string"==typeof a)throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if("string"==typeof a&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(2===s.length&&("number"==typeof i||!/^[<>X]$/.test(i)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${i}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(1===s.length&&("number"==typeof a||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(3!==s.length)throw new Error(`Named callout must have three arguments "${s}"`);if("string"==typeof a&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if("number"==typeof i||!/^(?:[<>!=]=|[<>])$/.test(i))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${i}"`);if("string"==typeof u&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument three must be a tag or number "${u}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return A(c,n??null,o?.split(",")??null,e)}function S(e){let t,r,n=null;if("{"===e[0]){const{minStr:o,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+o>a||s&&+s>a)throw new Error("Quantifier value unsupported in Oniguruma");if(t=+o,r=void 0===s?+o:""===s?1/0:+s,t>r&&(n="possessive",[t,r]=[r,t]),e.endsWith("?")){if("possessive"===n)throw new Error('Unsupported possessive interval quantifier chain with "?"');n="lazy"}else n||(n="greedy")}else t="+"===e[0]?1:0,r="?"===e[0]?1:1/0,n="+"===e[1]?"possessive":"?"===e[1]?"lazy":"greedy";return I(n,t,r,e)}function U(e){const t=e[1].toLowerCase();return k({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function W(e){const{p:t,neg:r,value:n}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return k("property",e,{value:n,negate:"P"===t&&!r||"p"===t&&!!r})}function G(e){const 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 _(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<e.length;r++){const n=e[r];if(!"imxDPSWy".includes(n))throw new Error(`Invalid flag "${n}"`);if("y"!==n)t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[n]]=!0;else{if(!/^y{[gw]}/.test(e.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode="g"===e[r+2]?"grapheme":"word",r+=3}}return t}function P(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t="{"===e[2]?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function z(t,r){const{raw:n,inCharClass:o}=t,s=n.slice(1);if(!o&&("0"!==s&&1===s.length||"0"!==s[0]&&+s<=r))return[d(n)];const a=[],i=s.match(/^[0-7]+|\d/g);for(let t=0;t<i.length;t++){const r=i[t];let o;if(0===t&&"8"!==r&&"9"!==r){if(o=parseInt(r,8),o>127)throw new Error(e.r`Octal encoded byte above 177 unsupported "${n}"`)}else o=(0,e.cpOf)(r);a.push(w(o,(0===t?"\\":"")+r))}return a}function H(e){const t=[],r=new RegExp(n,"gy");let o;for(;o=r.exec(e);){const e=o[0];if("{"===e[0]){const n=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(n){const{min:o,max:s}=n.groups;if(+o>+s&&e.endsWith("?")){r.lastIndex--,t.push(S(e.slice(0,-1)));continue}}}t.push(S(e))}return t}},1220,[1221]);
107
- __d(function(g,_r,_i,a,m,_e,d){"use strict";function e(e){if(1!==[...e].length)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function t(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"cpOf",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"getOrInsert",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"PosixClassNames",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"r",{enumerable:!0,get:function(){return n}}),Object.defineProperty(_e,"throwIfNullish",{enumerable:!0,get:function(){return i}});const r=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),n=String.raw;function i(e,t){if(null==e)throw new Error(t??"Value expected");return e}},1221,[]);
108
- __d(function(g,_r,_i,_a,m,_e,d){"use strict";function e(e,r){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(1!==e.body.length)return!1;const n=e.body[0];return!r||Object.keys(r).every(e=>r[e]===n[e])}function r(e){return!(!n.has(e.type)||"AbsenceFunction"===e.type&&"repeater"!==e.kind)}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"hasOnlyChild",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"isAlternativeContainer",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"isQuantifiable",{enumerable:!0,get:function(){return t}});const n=new Set(["AbsenceFunction","CapturingGroup","Group","LookaroundAssertion","Regex"]);function t(e){return o.has(e.type)}const o=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"])},1222,[]);
109
- __d(function(_g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"traverse",{enumerable:!0,get:function(){return r}});var e=_r(_d[0]);function r(r,n,c=null){function o(e,r){for(let t=0;t<e.length;t++){const a=s(e[t],r,t,e);t=Math.max(-1,t+a)}}function s(i,l=null,u=null,f=null){let p=0,h=!1;const b={node:i,parent:l,key:u,container:f,root:r,remove(){t(f).splice(Math.max(0,a(u)+p),1),p--,h=!0},removeAllNextSiblings:()=>t(f).splice(a(u)+1),removeAllPrevSiblings(){const e=a(u)+p;return p-=e,t(f).splice(0,Math.max(0,e))},replaceWith(r,t={}){const n=!!t.traverse;f?f[Math.max(0,a(u)+p)]=r:(0,e.throwIfNullish)(l,"Can't replace root node")[u]=r,n&&s(r,l,u,f),h=!0},replaceWithMultiple(e,r={}){const n=!!r.traverse;if(t(f).splice(Math.max(0,a(u)+p),1,...e),p+=e.length-1,n){let r=0;for(let t=0;t<e.length;t++)r+=s(e[t],l,a(u)+t+r,f)}h=!0},skip(){h=!0}},{type:d}=i,m=n["*"],y=n[d],x="function"==typeof m?m:m?.enter,g="function"==typeof y?y:y?.enter;if(x?.(b,c),g?.(b,c),!h)switch(d){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":o(i.body,i);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(i.min,i,"min"),s(i.max,i,"max");break;case"Quantifier":s(i.body,i,"body");break;case"Regex":o(i.body,i),s(i.flags,i,"flags");break;default:throw new Error(`Unexpected node type "${d}"`)}return y?.exit?.(b,c),m?.exit?.(b,c),p}return s(r),r}function t(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function a(e){if("number"!=typeof e)throw new Error("Numeric key expected");return e}},1223,[1221]);
110
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"atomic",{enumerable:!0,get:function(){return t.atomic}}),Object.defineProperty(e,"possessive",{enumerable:!0,get:function(){return t.possessive}}),Object.defineProperty(e,"RegExpSubclass",{enumerable:!0,get:function(){return n.RegExpSubclass}});var t=r(d[0]),n=r(d[1])},1224,[1225,1228]);
111
- __d(function(g,r,i,a,_m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"atomic",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"possessive",{enumerable:!0,get:function(){return f}});var t=r(d[0]),n=r(d[1]);const s=new RegExp(String.raw`(?<noncapturingStart>${t.noncapturingDelim})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,'gsu');function l(l,u){const c=u?.hiddenCaptures??[];let f=u?.captureTransfers??new Map;if(!/\(\?>/.test(l))return{pattern:l,captureTransfers:f,hiddenCaptures:c};const p='(?:(?=(',o=[0],$=[];let h,w=0,m=0,x=NaN;do{h=!1;let n,u=0,b=0,E=!1;for(s.lastIndex=Number.isNaN(x)?0:x+7;n=s.exec(l);){const{0:s,index:N,groups:{capturingStart:S,noncapturingStart:k}}=n;if('['===s)u++;else if(u)']'===s&&u--;else if("(?>"!==s||E){if(E&&k)b++;else if(S)E?b++:(w++,o.push(w+m));else if(')'===s&&E){if(!b){m++;const n=w+m;if(l=`${l.slice(0,x)}${p}${l.slice(x+3,N)}))<$$${n}>)${l.slice(N+1)}`,h=!0,$.push(n),(0,t.incrementIfAtLeast)(c,n),f.size){const t=new Map;f.forEach((s,l)=>{t.set(l>=n?l+1:l,s.map(t=>t>=n?t+1:t))}),f=t}break}b--}}else x=N,E=!0}}while(h);return c.push(...$),{pattern:l=(0,n.replaceUnescaped)(l,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:t,groups:{backrefNum:n,wrappedBackrefNum:s}})=>{if(n){const s=+n;if(s>o.length-1)throw new Error(`Backref "${t}" greater than number of captures`);return`\\${o[s]}`}return`\\${s}`},n.Context.DEFAULT),captureTransfers:f,hiddenCaptures:c}}const u=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,c=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>${u})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
125
- | \\?.
126
- `.replace(/\s+/g,''),'gsu');function f(n){if(!new RegExp(`${u}\\+`).test(n))return{pattern:n};const s=[];let l,f=null,p=null,o='',$=0;for(c.lastIndex=0;l=c.exec(n);){const{0:u,index:h,groups:{qBase:w,qMod:m,invalidQ:x}}=l;if('['===u)$||(p=h),$++;else if(']'===u)$?$--:p=null;else if(!$)if('+'===m&&o&&!o.startsWith('(')){if(x)throw new Error(`Invalid quantifier "${u}"`);let s=-1;if(/^\{\d+\}$/.test(w))n=(0,t.spliceStr)(n,h+w.length,m,'');else{if(')'===o||']'===o){const t=')'===o?f:p;if(null===t)throw new Error(`Invalid unmatched "${o}"`);n=`${n.slice(0,t)}(?>${n.slice(t,h)}${w})${n.slice(h+u.length)}`}else n=`${n.slice(0,h-o.length)}(?>${o}${w})${n.slice(h+u.length)}`;s+=4}c.lastIndex+=s}else'('===u[0]?s.push(h):')'===u&&(f=s.length?s.pop():null);o=u}return{pattern:n}}},1225,[1226,1227]);
127
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"incrementIfAtLeast",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"noncapturingDelim",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"spliceStr",{enumerable:!0,get:function(){return i}});const t=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function n(t,n){for(let i=0;i<t.length;i++)t[i]>=n&&t[i]++}function i(t,n,i,c){return t.slice(0,n)+c+t.slice(n+i.length)}},1226,[]);
128
- __d(function(g,r,i,a,_m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"Context",{enumerable:!0,get:function(){return n}}),e.replaceUnescaped=t,e.forEachUnescaped=function(n,s,c,o){t(n,s,c,o)},e.execUnescaped=s,e.hasUnescaped=function(n,t,c){return!!s(n,t,0,c)},e.getGroupContents=function(n,t){const s=/\\?./gsu;s.lastIndex=t;let c,o=n.length,u=0,l=1;for(;c=s.exec(n);){const[n]=c;if('['===n)u++;else if(u)']'===n&&u--;else if('('===n)l++;else if(')'===n&&(l--,!l)){o=c.index;break}}return n.slice(t,o)};const n=Object.freeze({DEFAULT:'DEFAULT',CHAR_CLASS:'CHAR_CLASS'});function t(t,s,c,o){const u=new RegExp(String.raw`${s}|(?<$skip>\[\^?|\\?.)`,'gsu'),l=[!1];let f=0,p='';for(const s of t.matchAll(u)){const{0:t,groups:{$skip:u}}=s;u||o&&o===n.DEFAULT!=!f?('['===t[0]?(f++,l.push('^'===t[1])):']'===t&&f&&(f--,l.pop()),p+=t):p+=c instanceof Function?c(s,{context:f?n.CHAR_CLASS:n.DEFAULT,negated:l[l.length-1]}):c}return p}function s(t,s,c=0,o){if(!new RegExp(s,'su').test(t))return null;const u=new RegExp(`${s}|(?<$skip>\\\\?.)`,'gsu');u.lastIndex=c;let l,f=0;for(;l=u.exec(t);){const{0:t,groups:{$skip:s}}=l;if(!(s||o&&o===n.DEFAULT!=!f))return l;'['===t?f++:']'===t&&f&&f--,u.lastIndex==l.index&&u.lastIndex++}return null}},1227,[]);
129
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"RegExpSubclass",{enumerable:!0,get:function(){return t}});class t extends RegExp{constructor(s,i,c){if(s instanceof RegExp){if(c)throw new Error('Cannot provide options when copying a regexp');super(s,i),this._captureMap=s instanceof t?s._captureMap:new Map}else{super(s,i);const t=c?.hiddenCaptures??[];this._captureMap=n(t)}}exec(t){const n=super.exec(t);if(!n||!this._captureMap.size)return n;const s=[...n];let i;n.length=1,this.hasIndices&&(i=[...n.indices],n.indices.length=1);for(let t=1;t<s.length;t++)this._captureMap.get(t)?.hidden||(n.push(s[t]),this.hasIndices&&n.indices.push(i[t]));return n}}function n(t){const n=new Map;for(const s of t)n.set(s,{hidden:!0});return n}},1228,[]);
130
- __d(function(_g,_r,_i,a,_m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"recursion",{enumerable:!0,get:function(){return f}});var t=_r(d[0]);const n=String.raw,r=n`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,s=n`\(\?R=(?<rDepth>[^\)]+)\)|${r}`,o=n`\(\?<(?![=!])(?<captureName>[^>]+)>`,c=n`${o}|(?<unnamed>\()(?!\?)`,u=new RegExp(n`${o}|${s}|\(\?|\\?.`,'gsu'),i='Cannot use multiple overlapping recursions';function f(r,c){const{hiddenCaptures:f,mode:h}=Object.assign({hiddenCaptures:[],mode:'plugin'},c);let g=c?.captureTransfers??new Map;if(!new RegExp(s,'su').test(r))return{pattern:r,captureTransfers:g,hiddenCaptures:f};if('plugin'===h&&(0,t.hasUnescaped)(r,n`\(\?\(DEFINE\)`,t.Context.DEFAULT))throw new Error('DEFINE groups cannot be used with recursion');const E=[],$=(0,t.hasUnescaped)(r,n`\\[1-9]`,t.Context.DEFAULT),m=new Map,x=[];let b,U=!1,C=0,D=0;for(u.lastIndex=0;b=u.exec(r);){const{0:c,groups:{captureName:N,rDepth:R,gRNameOrNum:k,gRDepth:T}}=b;if('['===c)C++;else if(C)']'===c&&C--;else{if(R){if(l(R),U)throw new Error(i);if($)throw new Error(('external'===h?'Backrefs':'Numbered backrefs')+" cannot be used with global recursion");const n=r.slice(0,b.index),o=r.slice(u.lastIndex);if((0,t.hasUnescaped)(o,s,t.Context.DEFAULT))throw new Error(i);const c=+R-1;r=p(n,o,c,!1,f,E,D),g=w(g,n,c,E.length,0,D);break}if(k){l(T);let s=!1;for(const t of x)if(t.name===k||t.num===+k){if(s=!0,t.hasRecursedWithin)throw new Error(i);break}if(!s)throw new Error(n`Recursive \g cannot be used outside the referenced group "${'external'===h?k:n`\g<${k}&R=${T}>`}"`);const C=m.get(k),N=(0,t.getGroupContents)(r,C);if($&&(0,t.hasUnescaped)(N,n`${o}|\((?!\?)`,t.Context.DEFAULT))throw new Error(('external'===h?'Backrefs':'Numbered backrefs')+" cannot be used with recursion of capturing groups");const R=r.slice(C,b.index),F=N.slice(R.length+c.length),I=E.length,A=+T-1,L=p(R,F,A,!0,f,E,D);g=w(g,R,A,E.length-I,I,D);const M=r.slice(0,C),O=r.slice(C+N.length);r=`${M}${L}${O}`,u.lastIndex+=L.length-c.length-R.length-F.length,x.forEach(t=>t.hasRecursedWithin=!0),U=!0}else if(N)D++,m.set(String(D),u.lastIndex),m.set(N,u.lastIndex),x.push({num:D,name:N});else if('('===c[0]){const t='('===c;t&&(D++,m.set(String(D),u.lastIndex)),x.push(t?{num:D}:{})}else')'===c&&x.pop()}}return f.push(...E),{pattern:r,captureTransfers:g,hiddenCaptures:f}}function l(t){const n=`Max depth must be integer between 2 and 100; used ${t}`;if(!/^[1-9]\d*$/.test(t))throw new Error(n);if((t=+t)<2||t>100)throw new Error(n)}function p(n,r,s,c,u,i,f){const l=new Set;c&&(0,t.forEachUnescaped)(n+r,o,({groups:{captureName:t}})=>{l.add(t)},t.Context.DEFAULT);const p=[s,c?l:null,u,i,f];return`${n}${h(`(?:${n}`,'forward',...p)}(?:)${h(`${r})`,'backward',...p)}${r}`}function h(r,s,o,u,i,f,l){const p=t=>'forward'===s?t+2:o-t+2-1;let h='';for(let s=0;s<o;s++){const o=p(s);h+=(0,t.replaceUnescaped)(r,n`${c}|\\k<(?<backref>[^>]+)>`,({0:t,groups:{captureName:r,unnamed:s,backref:c}})=>{if(c&&u&&!u.has(c))return t;const p=`_$${o}`;if(s||r){const n=l+f.length+1;return f.push(n),g(i,n),s?t:`(?<${r}${p}>`}return n`\k<${c}${p}>`},t.Context.DEFAULT)}return h}function g(t,n){for(let r=0;r<t.length;r++)t[r]>=n&&t[r]++}function w(n,r,s,o,u,i){if(n.size&&o){let f=0;(0,t.forEachUnescaped)(r,c,()=>f++,t.Context.DEFAULT);const l=i-f+u,p=new Map;return n.forEach((t,n)=>{const r=(o-f*s)/s,c=f*s,u=n>l+f?n+o:n,i=[];for(const n of t)if(n<=l)i.push(n);else if(n>l+f+r)i.push(n+o);else if(n<=l+f)for(let t=0;t<=s;t++)i.push(n+f*t);else for(let t=0;t<=s;t++)i.push(n+c+r*t);p.set(u,i)}),p}return n}},1229,[1227]);
131
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createJavaScriptRawEngine",{enumerable:!0,get:function(){return t}});var n=r(d[0]);function t(){const t={cache:new Map,regexConstructor:()=>{throw new Error("JavaScriptRawEngine: only support precompiled grammar")}};return{createScanner:c=>new n.n(c,t),createString:n.t}}},1230,[1217]);
132
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getResolvedOrResolveLanguage",{enumerable:!0,get:function(){return u}});var n=r(d[0]),t=r(d[1]);function u(u){return n.ResolvedLanguages.get(u)??(0,t.resolveLanguage)(u)}},1231,[1149,1154]);
133
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getThemes",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n=t.DEFAULT_THEMES){const u=[];return"string"==typeof n?u.push(n):(u.push(n.dark),u.push(n.light)),u}},1232,[1148]);
134
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AttachedThemes",{enumerable:!0,get:function(){return t}});const t=new Set},1233,[]);
135
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areThemesAttached",{enumerable:!0,get:function(){return u}});var t=r(d[0]),n=r(d[1]);function u(u){for(const c of(0,t.getThemes)(u))if(!n.AttachedThemes.has(c))return!1;return!0}},1234,[1232,1233]);
136
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"attachResolvedThemes",{enumerable:!0,get:function(){return l}});var t=r(d[0]),o=r(d[1]);function l(l,s){l=Array.isArray(l)?l:[l];for(let n of l){let l;if("string"==typeof n){if(l=o.themeResolver.getResolvedTheme(n),null==l)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else l=n,n=n.name,null==o.themeResolver.getResolvedTheme(n)&&o.themeResolver.seedResolvedTheme(n,l);t.AttachedThemes.has(n)||(t.AttachedThemes.add(n),s.loadThemeSync(l))}}},1235,[1233,1236]);
137
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"themeResolver",{enumerable:!0,get:function(){return t}});const t=(0,r(d[0]).createThemeResolver)()},1236,[1237]);
138
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DuplicateThemeError",{enumerable:!0,get:function(){return o.DuplicateThemeError}}),Object.defineProperty(e,"UnregisteredThemeError",{enumerable:!0,get:function(){return o.UnregisteredThemeError}}),Object.defineProperty(e,"UnresolvedThemeError",{enumerable:!0,get:function(){return o.UnresolvedThemeError}}),Object.defineProperty(e,"createThemeCatalog",{enumerable:!0,get:function(){return n.createThemeCatalog}}),Object.defineProperty(e,"createThemeCollection",{enumerable:!0,get:function(){return t.createThemeCollection}}),Object.defineProperty(e,"createThemeController",{enumerable:!0,get:function(){return c.createThemeController}}),Object.defineProperty(e,"createThemeResolver",{enumerable:!0,get:function(){return o.createThemeResolver}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),c=r(d[3])},1237,[1238,1239,1240,1242]);
139
- __d(function(g,r,i,_a,m,e,d){"use strict";function t(o){const c=[],a=new Set;for(const t of n(o.themes)){const n=l(t)?t.getThemes():[t];for(const t of n){if(a.has(t.name))throw new Error(`Theme collection already contains theme "${t.name}"`);a.add(t.name),c.push(t)}}const s=Object.freeze([...c]),f=Object.freeze(s.filter(t=>"light"===t.colorScheme)),h=Object.freeze(s.filter(t=>"dark"===t.colorScheme)),u=new Map(s.map(t=>[t.name,t])),p=Object.freeze(s.map(t=>t.name)),T=Object.freeze(f.map(t=>t.name)),b=Object.freeze(h.map(t=>t.name));function w(t){if(null==t)return s;const{colorScheme:n,collection:o}=t;return null==o?"light"===n?f:"dark"===n?h:s:s.filter(t=>t.collection===o&&(null==n||t.colorScheme===n))}return{getTheme:t=>u.get(t),getThemes:t=>w(t),getThemeNames:t=>null==t?.collection?"light"===t?.colorScheme?T:"dark"===t?.colorScheme?b:p:w(t).map(t=>t.name),hasTheme:t=>u.has(t),orderBy:n=>t({themes:s.map((t,n)=>({descriptor:t,index:n})).sort((t,o)=>{const c=n(t.descriptor,o.descriptor);return 0!==c?c:t.index-o.index}).map(t=>t.descriptor)}),pick(n){const o=[],c=new Set;for(const t of n){if(c.has(t))throw new Error(`Theme collection pick already includes theme "${t}"`);c.add(t);const n=u.get(t);if(null==n)throw new Error(`Theme collection does not contain theme "${t}"`);o.push(n)}return t({themes:o})},registerInto(t){for(const n of s)t.registerThemeIfAbsent(n.name,n.load)}}}function n(t){return o(t)?[t]:t}function o(t){return l(t)||c(t)}function c(t){return"string"==typeof t.name&&"function"==typeof t.load}function l(t){return"function"==typeof t.getThemes}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createThemeCollection",{enumerable:!0,get:function(){return t}})},1238,[]);
140
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createThemeCatalog",{enumerable:!0,get:function(){return h}});var t=r(d[0]);function h(h){const n=(0,t.createThemeCollection)({themes:h.themes});if(!n.hasTheme(h.defaultLightThemeName))throw new Error(`Default light theme "${h.defaultLightThemeName}" is not in the catalog`);if(!n.hasTheme(h.defaultDarkThemeName))throw new Error(`Default dark theme "${h.defaultDarkThemeName}" is not in the catalog`);return Object.assign({},n,{defaultLightThemeName:h.defaultLightThemeName,defaultDarkThemeName:h.defaultDarkThemeName})}},1239,[1238]);
141
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DuplicateThemeError",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"UnregisteredThemeError",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"UnresolvedThemeError",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"createThemeResolver",{enumerable:!0,get:function(){return u}});var t=r(d[0]),n=class extends Error{constructor(t){super(`Theme "${t}" is already registered`),this.name="DuplicateThemeError"}},o=class extends Error{constructor(t){super(`No loader registered for theme "${t}"`),this.name="UnregisteredThemeError"}},s=class extends Error{constructor(t){super(`Theme "${t}" has not been resolved`),this.name="UnresolvedThemeError"}};function u(){const u=new Map,c=new Map,h=new Map;let f=0;function l(n){const s=c.get(n);if(void 0!==s)return Promise.resolve(s);const l=h.get(n);if(void 0!==l)return l;const v=u.get(n);if(void 0===v)return Promise.reject(new o(n));const T=f,p=v().then(o=>{const s=(0,t.unwrapDefault)(o);return T===f&&c.set(n,s),h.get(n)===p&&h.delete(n),s}).catch(t=>{throw h.get(n)===p&&h.delete(n),t});return h.set(n,p),p}function v(t,n){c.set(t,n)}return{clearResolvedThemes:function(){f++,c.clear(),h.clear()},getResolvedOrResolveTheme:function(t){const n=c.get(t);return void 0!==n?n:l(t)},getResolvedTheme:function(t){return c.get(t)},getResolvedThemes:function(t){const n=[];for(const o of t){const t=c.get(o);if(void 0===t)throw new s(o);n.push(t)}return n},hasRegisteredTheme:function(t){return u.has(t)},hasResolvedTheme:function(t){return c.has(t)},hasResolvedThemes:function(t){for(const n of t)if(!c.has(n))return!1;return!0},registerTheme:function(t,o){if(u.has(t))throw new n(t);u.set(t,o)},registerThemeIfAbsent:function(t,n){return!u.has(t)&&(u.set(t,n),!0)},resolveTheme:l,resolveThemes:function(t){return Promise.all(t.map(t=>l(t)))},seedResolvedTheme:v,seedResolvedThemes:function(t){for(const[n,o]of t)v(n,o)}}}},1240,[1241]);
142
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return null!==t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"unwrapDefault",{enumerable:!0,get:function(){return t}})},1241,[]);
143
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createThemeController",{enumerable:!0,get:function(){return u}});var o=r(d[0]);const t="pierre-light",n="pierre-dark";function l(){try{if("undefined"!=typeof globalThis&&null!=globalThis.localStorage)return globalThis.localStorage}catch{}}function s(o,t){return{load(){const n=l()?.getItem(o);if(null==n)return null;try{const o=JSON.parse(n);return null==o.mode?null:{darkThemeName:o.darkThemeName??t.darkThemeName,lightThemeName:o.lightThemeName??t.lightThemeName,mode:o.mode}}catch{return null}},save(t){const n=l();try{n?.setItem(o,JSON.stringify(t))}catch{}}}}function c(){try{if("undefined"!=typeof globalThis&&null!=globalThis.matchMedia)return globalThis.matchMedia("(prefers-color-scheme: dark)").matches}catch{}return!1}function h(o){return"dark"===o?"dark":"light"===o?"light":c()?"dark":"light"}function u(l){const{storageKey:c,preloadInactive:u=!1}=l,f="catalog"in l&&null!=l.catalog?l.catalog:void 0,T=l.resolver??(null!=f?(0,o.createThemeResolver)():void 0);if(null==T)throw new Error("createThemeController requires a catalog or resolver");const v=T;f?.registerInto(v);const N=l.defaultDarkThemeName??f?.defaultDarkThemeName??n,S=l.defaultLightThemeName??f?.defaultLightThemeName??t,b=l.persistence??(null!=c?s(c,{darkThemeName:N,lightThemeName:S}):void 0),k=l.defaultMode??"system";let y={darkThemeName:N,lightThemeName:S,mode:k,resolvedTheme:void 0,resolvedColorScheme:h(k)};const p=new Set;let O,C,j=0;function E(){for(const o of p)o()}function R(){b?.save({darkThemeName:y.darkThemeName,lightThemeName:y.lightThemeName,mode:y.mode})}function M(o){return"dark"===o.resolvedColorScheme?o.darkThemeName:o.lightThemeName}function P(o={}){return Object.assign({},y,O,o)}function I(o,t){null==l.onResolutionError?console.error(`[theming] Failed to resolve theme "${t.name}" for ${t.colorScheme} color scheme`,o):l.onResolutionError(o,t)}function L(o){if(!u)return;const t=M(o),n="dark"===o.resolvedColorScheme?o.lightThemeName:o.darkThemeName;n!==t&&void 0===v.getResolvedTheme(n)&&v.resolveTheme(n).catch(()=>{})}function _(o={},{notifyPending:t=!1,persistOnSuccess:n=!1}={}){const l=Object.assign({},O,o),s=P(o),c=M(s),h=s.resolvedColorScheme,u=v.getResolvedTheme(c);if(void 0!==u)return j++,O=void 0,y=Object.assign({},y,l,{pendingThemeResolution:void 0,resolutionError:void 0,resolvedTheme:u}),n&&R(),E(),void L(y);const f=++j;O=l,y=Object.assign({},y,{pendingThemeResolution:{colorScheme:h,name:c},resolutionError:void 0}),t&&E(),v.resolveTheme(c).then(o=>{if(f!==j)return;const t=P();if(t.resolvedColorScheme!==h||M(t)!==c)return;const l=O??{};O=void 0,y=Object.assign({},y,l,{pendingThemeResolution:void 0,resolutionError:void 0,resolvedTheme:o}),n&&R(),E(),L(y)}).catch(o=>{f===j&&(O=void 0,y=Object.assign({},y,{pendingThemeResolution:void 0,resolutionError:{colorScheme:h,error:o,name:c}}),I(o,{colorScheme:h,name:c}),E())})}function w(o,t){y=Object.assign({},y,{[o]:t,resolutionError:void 0}),R(),E(),L(y)}function D(o,t={}){return P(t).resolvedColorScheme===o}function F(o){_(o,{notifyPending:!0,persistOnSuccess:!0})}function J(o,t,n){D(o,{[t]:n})?F({[t]:n}):w(t,n)}function $(o){F({mode:o,resolvedColorScheme:h(o)})}function q(){if("system"!==P().mode)return;const o=h("system");o!==P().resolvedColorScheme&&_({resolvedColorScheme:o},{notifyPending:!0})}function K(o,t){return P()[o]===t}const x=()=>{q()};return(function(){const o=b?.load();null!=o&&(y=Object.assign({},y,{darkThemeName:o.darkThemeName,lightThemeName:o.lightThemeName,mode:o.mode,resolvedColorScheme:h(o.mode)}))})(),(function(){try{"undefined"!=typeof globalThis&&null!=globalThis.matchMedia&&(C=globalThis.matchMedia("(prefers-color-scheme: dark)"),C.addEventListener("change",x))}catch{}})(),_(),{resolver:v,destroy(){null!=C&&(C.removeEventListener("change",x),C=void 0),p.clear()},getState:()=>y,setColorMode(o){K("mode",o)||$(o)},setThemeNameForScheme(o,t){const n="light"===o?"lightThemeName":"darkThemeName";K(n,t)||J(o,n,t)},subscribe:o=>(p.add(o),()=>{p.delete(o)})}}},1242,[1240]);
144
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"cleanUpResolvedThemes",{enumerable:!0,get:function(){return c}});var t=r(d[0]),n=r(d[1]);function c(){n.themeResolver.clearResolvedThemes(),t.AttachedThemes.clear()}},1243,[1233,1236]);
145
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"resolveTheme",{enumerable:!0,get:function(){return o}});var t=r(d[0]),n=r(d[1]);async function o(o){(0,n.prepareThemeResolution)(o);const s=await t.themeResolver.resolveTheme(o);return(0,n.validateResolvedThemeName)(o,s),s}},1244,[1236,1245]);
146
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"prepareThemeResolution",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"validateResolvedThemeName",{enumerable:!0,get:function(){return h}});var t=r(d[0]),o=r(d[1]),n=r(d[2]);function s(s){if((0,t.isWorkerContext)())throw new Error(`Theme "${s}" 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(o.themeResolver.hasRegisteredTheme(s))return;const h=n.shikiThemes.getTheme(s);if(null==h)throw new Error(`No valid theme loader registered for "${s}"`);o.themeResolver.registerThemeIfAbsent(h.name,h.load)}function h(t,o){if(o.name!==t)throw new Error(`resolvedTheme: themeName: ${t} does not match theme.name: ${o.name}`)}},1245,[1153,1236,1246]);
147
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return n.createTheme}}),Object.defineProperty(e,"pierreThemes",{enumerable:!0,get:function(){return c.pierreThemes}}),Object.defineProperty(e,"shikiThemes",{enumerable:!0,get:function(){return u.shikiThemes}}),Object.defineProperty(e,"themes",{enumerable:!0,get:function(){return s}});var t=r(d[0]),n=r(d[1]),c=r(d[2]),u=r(d[3]);const s=(0,t.createThemeCollection)({themes:[c.pierreThemes,u.shikiThemes]})},1246,[1238,1247,1249,1250]);
148
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return t}});var n=r(d[0]),o=r(d[1]);function t({name:t,load:c,colorScheme:l,collection:u,displayName:f}){return{name:t,colorScheme:l,collection:u,displayName:f,load:(s=c,async()=>(0,o.normalizeTheme)((0,n.unwrapDefault)(await s())))};var s}},1247,[1241,1248]);
149
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),r(d[0]);var t=r(d[1]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})},1248,[1156,1162]);
150
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"pierreThemes",{enumerable:!0,get:function(){return c}});var t=r(d[0]),p=r(d[1]);const o=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],n=[...o,"pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],h=new Set(o);function l(t){return h.has(t)?"light":"dark"}const s={"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"},k={"pierre-dark":()=>r(d[3])(d[2],d.paths),"pierre-dark-soft":()=>r(d[3])(d[4],d.paths),"pierre-dark-vibrant":()=>r(d[3])(d[5],d.paths),"pierre-dark-protanopia-deuteranopia":()=>r(d[3])(d[6],d.paths),"pierre-dark-tritanopia":()=>r(d[3])(d[7],d.paths),"pierre-light":()=>r(d[3])(d[8],d.paths),"pierre-light-soft":()=>r(d[3])(d[9],d.paths),"pierre-light-vibrant":()=>r(d[3])(d[10],d.paths),"pierre-light-protanopia-deuteranopia":()=>r(d[3])(d[11],d.paths),"pierre-light-tritanopia":()=>r(d[3])(d[12],d.paths)};function u(t){return(0,p.createTheme)({name:t,collection:"pierre",colorScheme:l(t),displayName:s[t],load:k[t]})}const c=(0,t.createThemeCollection)({themes:n.map(t=>u(t))})},1249,{"0":1238,"1":1247,"2":1758,"3":987,"4":1759,"5":1760,"6":1761,"7":1762,"8":1763,"9":1764,"10":1765,"11":1766,"12":1767,"paths":{"1758":"/_expo/static/js/web/pierre-dark-e4cd7da1462852b4fe741289c191863b.js","1759":"/_expo/static/js/web/pierre-dark-soft-114e4550d5ead7b15b5f58aa59f638d1.js","1760":"/_expo/static/js/web/pierre-dark-vibrant-ccc0accb393617a0d51cda253e67e498.js","1761":"/_expo/static/js/web/pierre-dark-protanopia-deuteranopia-46e88d22571b58c36d9e4a63c794d97e.js","1762":"/_expo/static/js/web/pierre-dark-tritanopia-572ab36b2062841e8bd376e7632fc3b6.js","1763":"/_expo/static/js/web/pierre-light-286ce1059deb32357cebfd5b6d0de5db.js","1764":"/_expo/static/js/web/pierre-light-soft-4911d52ee8434e95c5efce251c72019e.js","1765":"/_expo/static/js/web/pierre-light-vibrant-d09f62ed235dc5b05ac8d16e7dbc05d7.js","1766":"/_expo/static/js/web/pierre-light-protanopia-deuteranopia-0f16990b1e641da1e79274563b969fd5.js","1767":"/_expo/static/js/web/pierre-light-tritanopia-53760e9200ef38c0a5cb8f5b2094d627.js"}});
151
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"shikiThemes",{enumerable:!0,get:function(){return u}});var t=r(d[0]),h=r(d[1]);const s=["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"],p=new Set(s);function o(t){return p.has(t)?"light":"dark"}const n={andromeeda:()=>r(d[3])(d[2],d.paths),"aurora-x":()=>r(d[3])(d[4],d.paths),"ayu-dark":()=>r(d[3])(d[5],d.paths),"ayu-light":()=>r(d[3])(d[6],d.paths),"ayu-mirage":()=>r(d[3])(d[7],d.paths),"catppuccin-frappe":()=>r(d[3])(d[8],d.paths),"catppuccin-latte":()=>r(d[3])(d[9],d.paths),"catppuccin-macchiato":()=>r(d[3])(d[10],d.paths),"catppuccin-mocha":()=>r(d[3])(d[11],d.paths),"dark-plus":()=>r(d[3])(d[12],d.paths),dracula:()=>r(d[3])(d[13],d.paths),"dracula-soft":()=>r(d[3])(d[14],d.paths),"everforest-dark":()=>r(d[3])(d[15],d.paths),"everforest-light":()=>r(d[3])(d[16],d.paths),"github-dark":()=>r(d[3])(d[17],d.paths),"github-dark-default":()=>r(d[3])(d[18],d.paths),"github-dark-dimmed":()=>r(d[3])(d[19],d.paths),"github-dark-high-contrast":()=>r(d[3])(d[20],d.paths),"github-light":()=>r(d[3])(d[21],d.paths),"github-light-default":()=>r(d[3])(d[22],d.paths),"github-light-high-contrast":()=>r(d[3])(d[23],d.paths),"gruvbox-dark-hard":()=>r(d[3])(d[24],d.paths),"gruvbox-dark-medium":()=>r(d[3])(d[25],d.paths),"gruvbox-dark-soft":()=>r(d[3])(d[26],d.paths),"gruvbox-light-hard":()=>r(d[3])(d[27],d.paths),"gruvbox-light-medium":()=>r(d[3])(d[28],d.paths),"gruvbox-light-soft":()=>r(d[3])(d[29],d.paths),horizon:()=>r(d[3])(d[30],d.paths),"horizon-bright":()=>r(d[3])(d[31],d.paths),houston:()=>r(d[3])(d[32],d.paths),"kanagawa-dragon":()=>r(d[3])(d[33],d.paths),"kanagawa-lotus":()=>r(d[3])(d[34],d.paths),"kanagawa-wave":()=>r(d[3])(d[35],d.paths),laserwave:()=>r(d[3])(d[36],d.paths),"light-plus":()=>r(d[3])(d[37],d.paths),"material-theme":()=>r(d[3])(d[38],d.paths),"material-theme-darker":()=>r(d[3])(d[39],d.paths),"material-theme-lighter":()=>r(d[3])(d[40],d.paths),"material-theme-ocean":()=>r(d[3])(d[41],d.paths),"material-theme-palenight":()=>r(d[3])(d[42],d.paths),"min-dark":()=>r(d[3])(d[43],d.paths),"min-light":()=>r(d[3])(d[44],d.paths),monokai:()=>r(d[3])(d[45],d.paths),"night-owl":()=>r(d[3])(d[46],d.paths),"night-owl-light":()=>r(d[3])(d[47],d.paths),nord:()=>r(d[3])(d[48],d.paths),"one-dark-pro":()=>r(d[3])(d[49],d.paths),"one-light":()=>r(d[3])(d[50],d.paths),plastic:()=>r(d[3])(d[51],d.paths),poimandres:()=>r(d[3])(d[52],d.paths),red:()=>r(d[3])(d[53],d.paths),"rose-pine":()=>r(d[3])(d[54],d.paths),"rose-pine-dawn":()=>r(d[3])(d[55],d.paths),"rose-pine-moon":()=>r(d[3])(d[56],d.paths),"slack-dark":()=>r(d[3])(d[57],d.paths),"slack-ochin":()=>r(d[3])(d[58],d.paths),"snazzy-light":()=>r(d[3])(d[59],d.paths),"solarized-dark":()=>r(d[3])(d[60],d.paths),"solarized-light":()=>r(d[3])(d[61],d.paths),"synthwave-84":()=>r(d[3])(d[62],d.paths),"tokyo-night":()=>r(d[3])(d[63],d.paths),vesper:()=>r(d[3])(d[64],d.paths),"vitesse-black":()=>r(d[3])(d[65],d.paths),"vitesse-dark":()=>r(d[3])(d[66],d.paths),"vitesse-light":()=>r(d[3])(d[67],d.paths)};function l(t){return(0,h.createTheme)({name:t,collection:"shiki",colorScheme:o(t),load:n[t]})}const u=(0,t.createThemeCollection)({themes:Object.freeze([...s.map(t=>l(t)),...["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"].map(t=>l(t))])})},1250,{"0":1238,"1":1247,"2":1692,"3":987,"4":1693,"5":1694,"6":1695,"7":1696,"8":1697,"9":1698,"10":1699,"11":1700,"12":1701,"13":1702,"14":1703,"15":1704,"16":1705,"17":1706,"18":1707,"19":1708,"20":1709,"21":1710,"22":1711,"23":1712,"24":1713,"25":1714,"26":1715,"27":1716,"28":1717,"29":1718,"30":1719,"31":1720,"32":1721,"33":1722,"34":1723,"35":1724,"36":1725,"37":1726,"38":1727,"39":1728,"40":1729,"41":1730,"42":1731,"43":1732,"44":1733,"45":1734,"46":1735,"47":1736,"48":1737,"49":1738,"50":1739,"51":1740,"52":1741,"53":1742,"54":1743,"55":1744,"56":1745,"57":1746,"58":1747,"59":1748,"60":1749,"61":1750,"62":1751,"63":1752,"64":1753,"65":1754,"66":1755,"67":1756,"paths":{"1692":"/_expo/static/js/web/andromeeda-4eb7627ed7e2027a3014eb9b0fc7d48b.js","1693":"/_expo/static/js/web/aurora-x-eca7c4dbcf2fe31dd1a876b4646d8a5c.js","1694":"/_expo/static/js/web/ayu-dark-8f6e385b58df92299befb1001c0071e9.js","1695":"/_expo/static/js/web/ayu-light-a1b60d58cbfcccc85725df01470c5fbf.js","1696":"/_expo/static/js/web/ayu-mirage-7f2d3450fc7c1c924319e16b522036ee.js","1697":"/_expo/static/js/web/catppuccin-frappe-aff087ba4e9b896d0e137ffa80f49c02.js","1698":"/_expo/static/js/web/catppuccin-latte-c3b1c912e97e8f624e6cbf45ef3b5edf.js","1699":"/_expo/static/js/web/catppuccin-macchiato-b6c416a52b907946bcdca920c48ae599.js","1700":"/_expo/static/js/web/catppuccin-mocha-c4f1c6d94ae481022cf6033197e7c316.js","1701":"/_expo/static/js/web/dark-plus-8efbaa1eeb06bc065204597a49a4c817.js","1702":"/_expo/static/js/web/dracula-eecb97e7b36410a96fb803022fd6b8c5.js","1703":"/_expo/static/js/web/dracula-soft-c37421bf19373d1501a67d19cdff4c2c.js","1704":"/_expo/static/js/web/everforest-dark-e1912e469a04a00fd747bc8b40d6e5d9.js","1705":"/_expo/static/js/web/everforest-light-f71487bd99881ff31b99f0cb31c8b2c5.js","1706":"/_expo/static/js/web/github-dark-67d6d2700d0980eec4ed099e8f20aca9.js","1707":"/_expo/static/js/web/github-dark-default-852bc3f6ba454a19ff7a853b298c497d.js","1708":"/_expo/static/js/web/github-dark-dimmed-848bfec052e08ccc61b50e1ba0211dae.js","1709":"/_expo/static/js/web/github-dark-high-contrast-02ad87bc06cf6c6d4a04337ea66fb3fe.js","1710":"/_expo/static/js/web/github-light-aee863509fe4005fb41822fbcfbf4f5d.js","1711":"/_expo/static/js/web/github-light-default-65ebc4810f41b7a01bf124f11a8172e2.js","1712":"/_expo/static/js/web/github-light-high-contrast-196180f150b6ef3cc97a39de2a2b2f8b.js","1713":"/_expo/static/js/web/gruvbox-dark-hard-d093dcf62f1dd3246281d6ab41798f16.js","1714":"/_expo/static/js/web/gruvbox-dark-medium-2abd600034b3e3a2b441c89d1fe44068.js","1715":"/_expo/static/js/web/gruvbox-dark-soft-051c5796a1d88da4a4470b085c65bc49.js","1716":"/_expo/static/js/web/gruvbox-light-hard-424ef3a5580340c0dd4eb4e419d3e1a5.js","1717":"/_expo/static/js/web/gruvbox-light-medium-e2a70413d829902f52edabf945c7652c.js","1718":"/_expo/static/js/web/gruvbox-light-soft-fe7ba8399ee825f6a29c03134917f108.js","1719":"/_expo/static/js/web/horizon-7853a4f0bf06efbb6c5da2af76897819.js","1720":"/_expo/static/js/web/horizon-bright-995f5ccd6d4a2e1b69e02004207fb484.js","1721":"/_expo/static/js/web/houston-e3d8f813cdd8cf306c9262bdc97877d2.js","1722":"/_expo/static/js/web/kanagawa-dragon-16f4ae1d4fd25abc84e49eba46012955.js","1723":"/_expo/static/js/web/kanagawa-lotus-ac4c2129c97d65c65b75a862f09b07cf.js","1724":"/_expo/static/js/web/kanagawa-wave-767c26e2b69b21ada102ecd923c87b85.js","1725":"/_expo/static/js/web/laserwave-45badd528dd94d751862cca15c4203d9.js","1726":"/_expo/static/js/web/light-plus-ae803d1c1be4aa2f5d2e66aa6d957d21.js","1727":"/_expo/static/js/web/material-theme-d691611feaace08a6c1b7775cb0cca88.js","1728":"/_expo/static/js/web/material-theme-darker-79c5a137780d2cf5727a38321ab80d64.js","1729":"/_expo/static/js/web/material-theme-lighter-861a07f0b6a2e21d346b98df48ff9abe.js","1730":"/_expo/static/js/web/material-theme-ocean-3641081bcbedb42f932e6e2fb25fa3c9.js","1731":"/_expo/static/js/web/material-theme-palenight-9ac0ddc015df2941d7b8bb3a79248c1d.js","1732":"/_expo/static/js/web/min-dark-7eaa81dd2d281c61eb8e647d4afea43e.js","1733":"/_expo/static/js/web/min-light-ebb1c5bdae7b8f8a195a117b4ee99db0.js","1734":"/_expo/static/js/web/monokai-bd9568f8ff5d71123df0b5bbea4f850a.js","1735":"/_expo/static/js/web/night-owl-30f07b074b58fbcf20839277856b6ade.js","1736":"/_expo/static/js/web/night-owl-light-4cf45e7350820fc9b1c7727438addffa.js","1737":"/_expo/static/js/web/nord-76e3b00d398183f372c031623b1dacf3.js","1738":"/_expo/static/js/web/one-dark-pro-b51b692455010e20ccaaaa654ea5a385.js","1739":"/_expo/static/js/web/one-light-4d89f0b9cda956af9b4d5f51bc09097e.js","1740":"/_expo/static/js/web/plastic-2e497d0fb45790b8c5330cfc4e9df676.js","1741":"/_expo/static/js/web/poimandres-1c7638b17564aeacf97f6aa7c31d2094.js","1742":"/_expo/static/js/web/red-1f89277b65ca53154645e670088de774.js","1743":"/_expo/static/js/web/rose-pine-4215d61d54c23918ebf8dee8165f5ad9.js","1744":"/_expo/static/js/web/rose-pine-dawn-f9173373dddc074d10012a3bc28154e0.js","1745":"/_expo/static/js/web/rose-pine-moon-3dfcf6693bcbadc26f2e83a52fc3739b.js","1746":"/_expo/static/js/web/slack-dark-7c948e3333f9c227b4c9335876685335.js","1747":"/_expo/static/js/web/slack-ochin-5273f8fac997ed9b28fcf609ad724235.js","1748":"/_expo/static/js/web/snazzy-light-28bda9577aa06b400d103778f0bd8eb4.js","1749":"/_expo/static/js/web/solarized-dark-70bc90aa98ddfc224de066877686c33e.js","1750":"/_expo/static/js/web/solarized-light-0653372b053411837650543284957bd7.js","1751":"/_expo/static/js/web/synthwave-84-c48f7924d1c41fc97a933fa3d2ce8039.js","1752":"/_expo/static/js/web/tokyo-night-d2d0895c47dd694142a5e67ac0168a22.js","1753":"/_expo/static/js/web/vesper-c20f28343a0d43999b97548858f7b11f.js","1754":"/_expo/static/js/web/vitesse-black-8643c070fae86be9164c8b471e13935a.js","1755":"/_expo/static/js/web/vitesse-dark-5d0643f35aa5bc9a82af1de69ec8fd45.js","1756":"/_expo/static/js/web/vitesse-light-fc7c2693080913234e3ed41cfbadd4de.js"}});
152
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getResolvedOrResolveTheme",{enumerable:!0,get:function(){return o}});var t=r(d[0]),n=r(d[1]);function o(o){return t.themeResolver.getResolvedTheme(o)??(0,n.resolveTheme)(o)}},1251,[1236,1244]);
153
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"disposeHighlighter",{enumerable:!0,get:function(){return L}}),Object.defineProperty(e,"getHighlighterIfLoaded",{enumerable:!0,get:function(){return O}}),Object.defineProperty(e,"getSharedHighlighter",{enumerable:!0,get:function(){return y}}),Object.defineProperty(e,"isHighlighterLoaded",{enumerable:!0,get:function(){return R}}),Object.defineProperty(e,"isHighlighterLoading",{enumerable:!0,get:function(){return P}}),Object.defineProperty(e,"isHighlighterNull",{enumerable:!0,get:function(){return j}}),Object.defineProperty(e,"preloadHighlighter",{enumerable:!0,get:function(){return H}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]),u=r(d[5]),h=r(d[6]),c=r(d[7]),f=r(d[8]),p=r(d[9]),b=r(d[10]);let v;async function y({themes:t,langs:o,preferredHighlighter:s="shiki-js"}){v??=(0,p.createHighlighter)({themes:[],langs:["text"],engine:"shiki-wasm"===s?(0,p.createOnigurumaEngine)(r(d[12])(d[11],d.paths)):(0,p.createJavaScriptRegexEngine)()});const u=P(v)?await v:v;v=u;const c=[];for(const t of Array.from(new Set(o))){if("text"===t||"ansi"===t)continue;const o=(0,l.getResolvedOrResolveLanguage)(t);"then"in o?c.push(o):(0,n.attachResolvedLanguages)(o,u)}const b=[];for(const n of t){const t=(0,f.getResolvedOrResolveTheme)(n);"then"in t?b.push(t):(0,h.attachResolvedThemes)(t,v)}return(c.length>0||b.length>0)&&await Promise.all([Promise.all(c).then(t=>{(0,n.attachResolvedLanguages)(t,u)}),Promise.all(b).then(t=>{(0,h.attachResolvedThemes)(t,u)})]),u}function R(t=v){return null!=t&&!("then"in t)}function O(n){if(null!=v&&!("then"in v)&&(null==n||(0,s.areThemesAttached)(n.theme)&&(0,t.areLanguagesAttached)(n.lang)))return v}function P(t=v){return null!=t&&"then"in t}function j(t=v){return null==t}async function H(t){await y(t)}async function L(){null!=v&&((await v).dispose(),(0,o.cleanUpResolvedLanguages)(),(0,c.cleanUpResolvedThemes)(),v=void 0)}for(const t of b.pierreThemes.getThemes())u.themeResolver.registerThemeIfAbsent(t.name,t.load)},1252,{"0":1150,"1":1151,"2":1152,"3":1231,"4":1234,"5":1236,"6":1235,"7":1243,"8":1251,"9":1155,"10":1246,"11":1757,"12":987,"paths":{"1757":"/_expo/static/js/web/wasm-8e559c711833716a87b3a6d463949a3f.js"}});
154
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"clearRenderQueue",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"dequeueRender",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"queueRender",{enumerable:!0,get:function(){return u}});const n=new Set;let t=null;function u(u){n.add(u),t??=requestAnimationFrame(l)}function c(u){n.delete(u)&&0===n.size&&null!=t&&(cancelAnimationFrame(t),t=null)}function o(){n.clear(),null!=t&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(t),t=null}function l(u){const c=new Set(n);n.clear();for(const n of c)try{n(u)}catch(n){console.error(n)}t=n.size>0?requestAnimationFrame(l):null}},1253,[]);
155
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,n,u){if(t===n||null==t||null==n)return t===n;const o=new Set(u),f=Object.keys(t),c=new Set(Object.keys(n));for(const u of f)if(c.delete(u),!(o.has(u)||u in n&&t[u]===n[u]))return!1;for(const t of Array.from(c))if(!o.has(t))return!1;return!0}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areObjectsEqual",{enumerable:!0,get:function(){return t}})},1254,[]);
156
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){return null==t||null==n||"string"==typeof t||"string"==typeof n?t===n:t.dark===n.dark&&t.light===n.light}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areThemesEqual",{enumerable:!0,get:function(){return t}})},1255,[]);
157
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areOptionsEqual",{enumerable:!0,get:function(){return s}});var t=r(d[0]),n=r(d[1]),u=r(d[2]);function s(s,o){const c=s?.theme??t.DEFAULT_THEMES,E=o?.theme??t.DEFAULT_THEMES,l=f(s),p=f(o);return(0,u.areThemesEqual)(c,E)&&(0,n.areObjectsEqual)(s,o,["theme","parseDiffOptions"])&&(0,n.areObjectsEqual)(l,p)}function f(t){if(null!=t&&"parseDiffOptions"in t)return t.parseDiffOptions}},1256,[1148,1254,1255]);
158
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){return t?.start===n?.start&&t?.end===n?.end&&t?.side===n?.side&&t?.endSide===n?.endSide}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areSelectionsEqual",{enumerable:!0,get:function(){return t}})},1257,[]);
159
- __d(function(g,r,i,a,m,e,d){"use strict";function t({scrollTop:t,scrollHeight:o,height:l,fitPerfectly:n=!1,fitPerfectlyOverscroll:c=0,overscrollSize:h}){const f=l+2*h,s=n?l+2*c:f;if(f>=(o=Math.max(o,s))||n){const l=Math.max(t-c,0),n=Math.min(t+s,o);return{top:l,bottom:Math.max(n,l)}}let u=t+l/2-f/2,M=u+f;return u<0&&(u=0),M>o&&(M=o),u=Math.floor(Math.max(u,0)),{top:u,bottom:Math.ceil(Math.max(Math.min(M,o),u))}}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createWindowFromScrollPosition",{enumerable:!0,get:function(){return t}})},1258,[]);
160
- __d(function(g,r,i,a,m,e,d){"use strict";function n(){return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"prefersReducedMotion",{enumerable:!0,get:function(){return n}})},1259,[]);
161
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return{type:"text",value:t}}function n({tagName:t,children:n=[],properties:u={}}){return{type:"element",tagName:t,properties:u,children:n}}function u({name:t,width:u=16,height:o=16,properties:c}){return n({tagName:"svg",properties:Object.assign({width:u,height:o,viewBox:"0 0 16 16"},c),children:[n({tagName:"use",properties:{href:`#${t.replace(/^#/,"")}`}})]})}function o(t){let n=t.children[0];for(;null!=n;){if("element"===n.type&&"code"===n.tagName)return n;n="children"in n?n.children[0]:null}}function c(t){return n({tagName:"div",properties:{"data-gutter":""},children:t})}function l(u,o,c,l={}){return n({tagName:"div",properties:Object.assign({"data-line-type":u,"data-column-number":o,"data-line-index":c},l),children:null!=o?[n({tagName:"span",properties:{"data-line-number-content":""},children:[t(`${o}`)]})]:void 0})}function p(t,u,o){return n({tagName:"div",properties:{"data-gutter-buffer":u,"data-buffer-size":o,"data-line-type":"annotation"===u?void 0:t,style:"annotation"===u?`grid-row: span ${o};`:`grid-row: span ${o};min-height:calc(${o} * 1lh);`}})}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createGutterGap",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"createGutterItem",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"createGutterWrapper",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"createHastElement",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"createIconElement",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"createTextNodeElement",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"findCodeElement",{enumerable:!0,get:function(){return o}})},1260,[]);
162
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createGutterUtilityElement",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(){return(0,t.createHastElement)({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[(0,t.createIconElement)({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}},1261,[1260]);
163
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"InteractionManager",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"pluckInteractionOptions",{enumerable:!0,get:function(){return u}});var t=r(d[0]),n=r(d[1]),i=r(d[2]),o=r(d[3]),l=r(d[4]),s=r(d[5]),c=class{interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorLineNumberOnly=!1;pointerSession={mode:"idle"};constructor(t,n){this.mode=t,this.options=n}setOptions(t){this.options=t}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(),(0,t.dequeueRender)(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(t){this.setSelectionDirty();const{usesCustomGutterUtility:n=!1,enableGutterUtility:i=!1}=this.options;this.pre!==t&&(this.cleanUp(),this.pre=t),i?this.ensureGutterUtilityNode(n):null!=this.gutterUtilityContainer&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,"gutterSelecting"===this.pointerSession.mode&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(t),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return void 0===this.renderedSelectedLinesState||void 0===this.renderedEditorActiveLineState}setSelection(t,i){const o=!(t===this.selectedRange||(0,n.areSelectionsEqual)(t??void 0,this.selectedRange??void 0)),l=i?.lineNumberOnly??!1,s=i?.activeLineSide!==this.selectedRangeHighlightSide||l!==this.selectedRangeLineNumberOnly;(this.isSelectionDirty()||o||s)&&(this.proposedSelectedRange=void 0,this.selectedRange=t,this.selectedRangeHighlightSide=i?.activeLineSide,this.selectedRangeLineNumberOnly=l,this.renderSelection(),this.placeUtility(),o&&!1!==i?.notify&&this.notifySelectionCommitted(t))}setEditorActiveLine(t,{lineNumberOnly:n=!1,side:i}={}){const o=t!==this.editorActiveLine,l=i!==this.editorActiveLineSide||n!==this.editorLineNumberOnly;(this.isSelectionDirty()||o||l)&&(this.editorActiveLine=t,this.editorActiveLineSide=i,this.editorLineNumberOnly=n,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const t=this.gutterUtilityLine??this.hoveredLine;if(null!=t){if("diff"===this.mode&&"diff-line"===t.type)return{lineNumber:t.lineNumber,side:t.annotationSide};if("file"===this.mode&&"line"===t.type)return{lineNumber:t.lineNumber}}};handlePointerClick=t=>{const{onHunkExpand:n,onLineClick:i,onLineNumberClick:o,onTokenClick:s,onMergeConflictActionClick:c}=this.options;null==n&&null==i&&null==o&&null==c&&null==s||null!=this.options.onGutterUtilityClick&&(0,l.isGutterUtilityPath)(t.composedPath())||(R(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",t),this.handlePointerEvent({eventType:"click",event:t}))};handlePointerMove=t=>{if("mouse"!==t.pointerType)return;const{lineHoverHighlight:n="disabled",onLineEnter:i,onLineLeave:o,onTokenEnter:l,onTokenLeave:s,enableGutterUtility:c=!1}=this.options;("disabled"!==n||c||null!=i||null!=o||null!=l||null!=s)&&(R(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",t),this.handlePointerEvent({eventType:"move",event:t}))};handlePointerLeave=t=>{const{__debugPointerEvents:n}=this.options;R(n,"move","FileDiff.DEBUG.handlePointerLeave: no event"),null!=this.hoveredLine||null!=this.hoveredToken?(null!=this.hoveredToken&&(this.options.onTokenLeave?.(this.hoveredToken,t),this.clearHoveredToken()),null!=this.hoveredLine&&(this.options.onLineLeave?.(Object.assign({},this.hoveredLine,{event:t})),this.clearHoveredLine()),this.placeUtility()):R(n,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token")};handlePointerEvent({eventType:t,event:n}){const{__debugPointerEvents:i}=this.options,o=n.composedPath();R(i,t,"FileDiff.DEBUG.handlePointerEvent:",{eventType:t,composedPath:o});const l=this.resolvePointerTarget(o);R(i,t,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",l);const{onLineClick:s,onLineNumberClick:c,onLineEnter:u,onLineLeave:h,onTokenClick:v,onTokenEnter:L,onTokenLeave:y,onHunkExpand:E,onMergeConflictActionClick:P}=this.options;switch(t){case"move":{const t=S(l)&&this.hoveredLine?.lineElement===l.lineElement;p(l)&&this.hoveredToken?.tokenElement===l.tokenElement||(null!=this.hoveredToken&&(y?.(this.hoveredToken,n),this.clearHoveredToken()),p(l)&&(this.setHoveredToken(this.toTokenEventBaseProps(l)),L?.(this.hoveredToken,n))),t||(null!=this.hoveredLine&&(h?.(Object.assign({},this.hoveredLine,{event:n})),this.clearHoveredLine()),S(l)?(this.setHoveredLine(this.toEventBaseProps(l)),this.placeUtility(),u?.(Object.assign({},this.hoveredLine,{event:n}))):this.placeUtility());break}case"click":{if(null==l)break;if(b(l)&&null!=P){P(l);break}if(f(l)&&null!=E){E(l.hunkIndex,l.all||n.shiftKey?"both":l.direction,l.all||n.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!S(l))break;p(l)&&null!=v&&v(this.toTokenEventBaseProps(l),n);const t=this.toEventBaseProps(l);null!=c&&l.numberColumn?c(Object.assign({},t,{event:n})):null!=s&&s(Object.assign({},t,{event:n}));break}}}syncPointerListeners(t){const{__debugPointerEvents:n,lineHoverHighlight:i="disabled",onLineClick:o,onLineNumberClick:l,onLineEnter:s,onLineLeave:c,onTokenClick:u,onTokenEnter:h,onTokenLeave:v,onHunkExpand:p,onMergeConflictActionClick:S,enableGutterUtility:f=!1,enableLineSelection:b=!1,onGutterUtilityClick:L}=this.options,y=null!=L,E="disabled"!==i||null!=o||null!=l||null!=s||null!=c||null!=u||null!=h||null!=v||null!=p||null!=S||f||b||y;E&&!this.hasPointerListeners?(t.addEventListener("click",this.handlePointerClick),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointermove",this.handlePointerMove),t.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,R(n,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const t=[];return"both"!==n&&"click"!==n||(null!=o&&t.push("onLineClick"),null!=l&&t.push("onLineNumberClick"),null!=p&&t.push("expandable hunk separators"),null!=S&&t.push("merge conflict actions")),t})()),R(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),R(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!E&&this.hasPointerListeners&&(t.removeEventListener("click",this.handlePointerClick),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointermove",this.handlePointerMove),t.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const P="selecting"===this.pointerSession.mode||"pendingSingleLineUnselect"===this.pointerSession.mode,k="gutterSelecting"===this.pointerSession.mode;(!b&&P||!y&&k)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(null==this.pre)return;const{onLineClick:t,onLineNumberClick:n,enableLineSelection:i=!1}=this.options,o=null!=t,l=null!=n||i;o&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!o&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),l&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!l&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=t=>{if("mouse"===t.pointerType&&0!==t.button||null==this.pre||"idle"!==this.pointerSession.mode)return;const n=t.composedPath();(0,l.isGutterUtilityPath)(n)&&null!=this.options.onGutterUtilityClick?this.startGutterSelectionFromPointerDown(t):("mouse"!==t.pointerType&&this.revealUtilityFromGutterPath(n),this.startLineSelectionFromPointerDown(t))};startLineSelectionFromPointerDown(t){const{enableLineSelection:n=!1}=this.options;if(!n)return;const i=this.resolveSelectionInfo(t,{source:"event-path",requireNumberColumn:!0});if(null==i)return;const{pre:o}=this;if(null==o)return;const{lineNumber:l,eventSide:s,lineIndex:c}=i;if(t.shiftKey&&null!=this.selectedRange){const n=this.getIndexesFromSelection(this.selectedRange,"split"===o.getAttribute("data-diff-type"));if(null==n)return;const i=n.start<=n.end?c>=n.start:c<=n.end;return this.selectionAnchor={lineNumber:i?this.selectedRange.start:this.selectedRange.end,side:i?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(l,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:t.pointerId},void this.attachDocumentPointerListeners()}if(this.selectedRange?.start===l&&this.selectedRange?.end===l){const n={lineNumber:l,side:s};return this.selectionAnchor=n,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:t.pointerId,anchor:n,pending:n},void this.attachDocumentPointerListeners()}!0===this.options.controlledSelection?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:l,side:s},this.updateSelection(l,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:t.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(t){const{onGutterUtilityClick:n}=this.options;if(null==n)return;const i=this.currentSelectionEnds(),o=i?.bottom??this.resolveSelectionPoint(t,{source:"event-path",excludeUtility:!1}),l=i?.top??o;null!=o&&null!=l&&(t.preventDefault(),t.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:t.pointerId,anchor:l,current:o},this.selectionAnchor={lineNumber:l.lineNumber,side:l.side},this.updateSelection(o.lineNumber,o.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=t=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault();const n=this.resolveSelectionPoint(t,{source:"coordinates-first"});if(null==n)return;return this.pointerSession.current=n,void this.updateSelection(n.lineNumber,n.side)}case"selecting":{if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault();const n=this.resolveSelectionInfo(t,{source:"coordinates-first",requireNumberColumn:!1});if(null==n||null==this.selectionAnchor)return;return void this.updateSelection(n.lineNumber,n.eventSide)}case"pendingSingleLineUnselect":{if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault();const n=this.resolveSelectionInfo(t,{source:"coordinates-first",requireNumberColumn:!1});if(null==n||null==this.selectionAnchor)return;const o={lineNumber:n.lineNumber,side:n.eventSide};if((0,i.areSelectionPointsEqual)(this.pointerSession.pending,o))return;return this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),void(this.pointerSession={mode:"selecting",pointerId:t.pointerId})}}};handleDocumentPointerUp=t=>{const{onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{const{pointerSession:i}=this;if(t.pointerId!==i.pointerId)return;t.preventDefault();const o=this.resolveSelectionPoint(t,{source:"coordinates-first"});null!=o&&(i.current=o,this.updateSelection(o.lineNumber,o.side));const l=this.buildSelectedLineRange(i.anchor,i.current);return n?.(Object.assign({},l)),this.selectionAnchor=void 0,this.notifySelectionEnd(l),this.notifySelectionCommitted(l),this.clearProposedSelection(),this.clearPointerSession(),void this.detachDocumentPointerListeners()}case"pendingSingleLineUnselect":if(t.pointerId!==this.pointerSession.pointerId)return;return t.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),void this.clearProposedSelection();case"selecting":if(t.pointerId!==this.pointerSession.pointerId)return;t.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=t=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&t.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){null!=this.hoveredLine&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(t){const{lineHoverHighlight:n="disabled"}=this.options;null!=this.hoveredLine&&this.clearHoveredLine(),this.hoveredLine=t,"disabled"!==n&&("both"!==n&&"line"!==n||this.hoveredLine.lineElement.setAttribute("data-hovered",""),"both"!==n&&"number"!==n||this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){null!=this.hoveredToken&&(this.hoveredToken=void 0)}setHoveredToken(t){null!=this.hoveredToken&&this.clearHoveredToken(),this.hoveredToken=t}ensureGutterUtilityNode(t){if(null==this.gutterUtilityContainer&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),t)null!=this.gutterUtilityButton&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),null==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,null==this.gutterUtilityButton){const t=document.createElement("div");t.innerHTML=(0,s.toHtml)((0,o.createGutterUtilityElement)());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(t){if(this.placeUtilityFromSelection())return;const n=this.resolvePointerTarget(t);v(n)&&n.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(n))}placeUtility(){this.placeUtilityFromSelection()||(null==this.hoveredLine?this.hideUtility():this.showUtilityOnLine(this.hoveredLine))}placeUtilityFromSelection(){const t=this.currentSelectionEnds();if(null==t)return!1;const n=this.targetForSelectionPoint(t.bottom);return null==n?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(n)),!0}showUtilityOnLine(t){null!=this.gutterUtilityContainer&&(this.gutterUtilityLine=t,t.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const t=this.getCurrentSelectionRange();return null==t?void 0:this.selectionEnds(t)}selectionEnds(t){const n={lineNumber:t.start,side:t.side},i={lineNumber:t.end,side:t.endSide??t.side},o=this.selectionPointRowIndex(n),l=this.selectionPointRowIndex(i);if(null!=o&&null!=l)return o>l?{top:i,bottom:n}:{top:n,bottom:i}}selectionPointRowIndex(t){const n=this.getLineIndex(t.lineNumber,t.side);if(null!=n)return this.isSplitDiff()?n[1]:n[0]}targetForSelectionPoint(t){if(null==this.pre)return;const n=this.getLineIndex(t.lineNumber,t.side);if(null==n)return;const i="diff"===this.mode?`${n[0]},${n[1]}`:`${n[0]}`,o=this.pre.querySelectorAll(`[data-column-number="${t.lineNumber}"][data-line-index="${i}"]`);for(const n of o){if(!(n instanceof HTMLElement))continue;const i=this.resolvePointerTarget(E(n));if(v(i)&&("diff"!==this.mode||null==t.side||i.side===t.side))return i}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){"pendingSingleLineUnselect"===this.pointerSession.mode&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(t,n){const i=this.resolvePointerTarget(t);if(v(i)&&(!n||i.numberColumn)&&null!=i.splitLineIndex)return{lineIndex:i.splitLineIndex,lineNumber:i.lineNumber,eventSide:"diff"===this.mode?i.side:void 0}}resolveSelectionInfo(t,n){const i=this.resolveSelectionPath(t,n);return null!=i?this.selectionInfoFromPath(i,n.requireNumberColumn):void 0}selectionPointFromPath(t){const n=this.resolvePointerTarget(t);if(v(n))return{lineNumber:n.lineNumber,side:"diff"===this.mode?n.side:void 0}}resolveSelectionPoint(t,n){const i=this.resolveSelectionPath(t,n);return null!=i?this.selectionPointFromPath(i):void 0}resolveSelectionPath(t,n){const i=!1!==n.excludeUtility;switch(n.source){case"event-path":return this.pathFromEventPath(t.composedPath(),i);case"coordinates-first":{const n=this.pathFromCoordinates(t,i);return void 0!==n?n??void 0:this.pathFromEventPath(t.composedPath(),i)}}}pathFromCoordinates(t,n){const i=this.hitTest(t);if(void 0!==i)return null===i?null:this.pathFromElement(i,n)??null}pathFromEventPath(t,n){if(!n||!(0,l.isGutterUtilityPath)(t))for(const i of t)if(i instanceof Element)return this.pathFromElement(i,n)}pathFromElement(t,n){const i=E(t);if(n&&(0,l.isGutterUtilityPath)(i))return;const o=P(t);return null!=o?E(o):this.pathFromAnnotationSlot(t)}pathFromAnnotationSlot(t){const n=k(t)?.previousElementSibling;if(n instanceof HTMLElement&&(n.hasAttribute("data-line")||n.hasAttribute("data-column-number")))return E(n);const i=A(C(t));if(null==i)return;const o=this.targetForSelectionPoint(i);return null!=o?E(o.lineElement):void 0}hitTest(t){if(!Number.isFinite(t.clientX)||!Number.isFinite(t.clientY))return;const n=this.pre?.getRootNode(),i=N(n)?n:N(document)?document:void 0;return null!=i?i.elementFromPoint(t.clientX,t.clientY):void 0}getLineIndex(t,n){const{getLineIndex:i}=this.options;return null!=i?i(t,n):[t-1,t-1]}getCurrentSelectionRange(){return void 0!==this.proposedSelectedRange?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(i,o,l=!0){const s=this.getCurrentSelectionRange();let c;if(null==i)c=null;else{const t=this.selectionAnchor?.side??o,n=this.selectionAnchor?.lineNumber??i;c=this.buildSelectionRange(n,i,t,o)}(0,n.areSelectionsEqual)(s??void 0,c??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,!0===this.options.controlledSelection?this.proposedSelectedRange=c:(this.selectedRange=c,(0,t.queueRender)(this.renderSelection)),this.placeUtility(),l&&this.notifySelectionChangeDelta())}getIndexesFromSelection(t,n){if(null==this.pre)return;const i=this.getLineIndex(t.start,t.side),o=this.getLineIndex(t.end,t.endSide??t.side);return null!=i&&null!=o?{start:n?i[1]:i[0],end:n?o[1]:o[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:null==this.editorActiveLine?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(t,n,i){if(null==t.range)return;const o=this.getIndexesFromSelection(t.range,n);if(null==o)throw console.error({rowRange:o,range:t.range}),new Error(`InteractionManager.renderSelection: No valid ${i} rowRange`);return o}getLineRenderColumns(t,n,i,o){if(null==this.pre||null==n&&null==o)return[];const{children:l}=this.pre;if(l.length>2)throw console.error(l),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const s=[];for(const c of l){const l=c.hasAttribute("data-deletions")?"deletions":c.hasAttribute("data-additions")?"additions":void 0,u=null!=t&&null!=n&&(null==t.highlightSide||null==l||t.highlightSide===l),h=null!=i&&null!=o&&(null==i.highlightSide||null==l||i.highlightSide===l);if(!u&&!h)continue;const[v,p]=c.children;if(!(v instanceof HTMLElement&&p instanceof HTMLElement))throw new Error("InteractionManager.renderSelection: missing gutter or content element");if(p.children.length!==v.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");s.push({content:p,gutter:v,renderEditorActiveLine:h,renderSelectedLines:u})}return s}renderSelection=()=>{(0,t.dequeueRender)(this.renderSelection);const n=this.getSelectionRenderState();if(null==this.pre)return;const{editorActiveLine:i,selectedLines:o}=n,l=!T(this.renderedSelectedLinesState,o),s=!T(this.renderedEditorActiveLineState,i);if(!l&&!s)return;l&&(this.renderedSelectedLinesState=void 0),s&&(this.renderedEditorActiveLineState=void 0);const c="split"===this.pre.getAttribute("data-diff-type"),u=l?this.resolveLineRenderRange(o,c,"selected-lines"):void 0,h=s?this.resolveLineRenderRange(i,c,"editor-active-line"):void 0,v=this.getLineRenderColumns(l?o:void 0,u,s?i:void 0,h),p=null==o.range||v.some(t=>t.renderSelectedLines),S=null==i.range||v.some(t=>t.renderEditorActiveLine);if(l)for(const t of this.pre.querySelectorAll("[data-selected-line]"))t.removeAttribute("data-selected-line");if(s)for(const t of this.pre.querySelectorAll("[data-editor-active-line]"))t.removeAttribute("data-editor-active-line");const f=null==u?void 0:Math.min(u.start,u.end),b=null==u?void 0:Math.max(u.start,u.end),L=f===b,y=h?.start;for(const t of v){const{content:n,gutter:l,renderEditorActiveLine:s,renderSelectedLines:u}=t,h=Math.max(u?b??-1/0:-1/0,s?y??-1/0:-1/0),v=n.children.length;for(let t=0;t<v;t++){const v=n.children[t],p=l.children[t];if(!(v instanceof HTMLElement&&p instanceof HTMLElement))continue;const S=this.parseLineIndex(v,c);if((S??0)>h)break;if(null!=S){if(u&&null!=f&&null!=b&&S>=f&&S<=b){let t=L?"single":S===f?"first":S===b?"last":"";p.setAttribute("data-selected-line",t),o.lineNumberOnly||(v.setAttribute("data-selected-line",t),p.nextSibling instanceof HTMLElement&&v.nextSibling instanceof HTMLElement&&(v.nextSibling.hasAttribute("data-line-annotation")||v.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(L?(t="last",v.setAttribute("data-selected-line","first")):S===f?t="":S===b&&v.setAttribute("data-selected-line",""),v.nextSibling.setAttribute("data-selected-line",t),p.nextSibling.setAttribute("data-selected-line",t)))}s&&S===y&&(p.setAttribute("data-editor-active-line",""),i.lineNumberOnly||v.setAttribute("data-editor-active-line",""))}}}l&&p&&(this.renderedSelectedLinesState=o),s&&S&&(this.renderedEditorActiveLineState=i)};notifySelectionCommitted(t){this.options.onLineSelected?.(t)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(t){this.options.onLineSelectionStart?.(t)}notifySelectionEnd(t){this.options.onLineSelectionEnd?.(t)}toEventBaseProps(t){return"file"===this.mode?{type:"line",lineElement:t.lineElement,lineNumber:t.lineNumber,numberColumn:t.numberColumn,numberElement:t.numberElement}:{type:"diff-line",annotationSide:t.side,lineType:t.lineType,lineElement:t.lineElement,numberElement:t.numberElement,lineNumber:t.lineNumber,numberColumn:t.numberColumn}}toTokenEventBaseProps({lineCharEnd:t,lineCharStart:n,lineNumber:i,side:o,tokenElement:l,tokenText:s}){return"file"===this.mode?{type:"token",lineCharEnd:t,lineCharStart:n,lineNumber:i,tokenElement:l,tokenText:s}:{type:"token",lineCharEnd:t,lineCharStart:n,lineNumber:i,side:o,tokenElement:l,tokenText:s}}buildSelectedLineRange(t,n){return this.buildSelectionRange(t.lineNumber,n.lineNumber,t.side,n.side)}buildSelectionRange(t,n,i,o){return Object.assign({start:t,end:n},null!=i?{side:i}:{},i!==o&&null!=o?{endSide:o}:{})}resolvePointerTarget(t){let n,i,o,l,s,c,u,h,v,p,S=!1;for(const f of t){if(!(f instanceof HTMLElement))continue;if(null==p&&f.hasAttribute("data-merge-conflict-action")){const t=f.getAttribute("data-merge-conflict-action")??void 0,n=f.getAttribute("data-merge-conflict-conflict-index")??void 0,i=null!=n?Number.parseInt(n,10):NaN;L(t)&&Number.isFinite(i)&&(p={kind:"merge-conflict-action",resolution:t,conflictIndex:i})}if(null==c&&f.hasAttribute("data-char")){c=f;const t=f.getAttribute("data-char");if(null!=t){const n=Number.parseInt(t,10);if(!Number.isNaN(n)){const t=f.textContent??"",i=n+t.length;""===t.trim()&&!0!==this.options.enableTokenInteractionsOnWhitespace||(u={tokenElement:c,lineCharStart:n,lineCharEnd:i,tokenText:t});continue}}}const t=null==s?f.getAttribute("data-column-number")??void 0:void 0;if(null!=t){s=f,v=Number.parseInt(t,10),S=!0,n=D(f),l=f.getAttribute("data-line-index")??void 0;continue}const b=null==o?f.getAttribute("data-line")??void 0:void 0;if(null!=b){o=f,v=Number.parseInt(b,10),n=D(f),l=f.getAttribute("data-line-index")??void 0;continue}if(null==h&&(f.hasAttribute("data-expand-button")||f.hasAttribute("data-unmodified-lines"))){h={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}const y=null!=h?f.getAttribute("data-expand-index")??void 0:void 0;if(null!=h&&null!=y){const t=Number.parseInt(y,10);Number.isNaN(t)||(h.hunkIndex=t);continue}if(null==i&&f.hasAttribute("data-code")){i=f;break}}if(null!=p)return p;if(null!=h?.hunkIndex)return{type:"line-info",hunkIndex:h.hunkIndex,direction:h.direction,all:h.all};if(o??=null!=l?y(i,`[data-line][data-line-index="${l}"]`):void 0,s??=null!=l?y(i,`[data-column-number][data-line-index="${l}"]`):void 0,null==i||null==o||null==s||null==n||null==v||Number.isNaN(v))return;const f=this.parseLineIndex(o,this.isSplitDiff());return null!=u?"file"===this.mode?Object.assign({kind:"token",lineType:n,lineElement:o,lineNumber:v,numberColumn:S,numberElement:s,side:void 0,splitLineIndex:f},u):Object.assign({kind:"token",lineType:n,lineElement:o,lineNumber:v,numberColumn:S,numberElement:s,side:I(n,i),splitLineIndex:f},u):"file"===this.mode?{kind:"line",lineType:n,lineElement:o,lineNumber:v,numberColumn:S,numberElement:s,side:void 0,splitLineIndex:f}:{kind:"line",lineType:n,lineElement:o,lineNumber:v,numberColumn:S,numberElement:s,side:I(n,i),splitLineIndex:f}}isSplitDiff(){return"split"===this.pre?.getAttribute("data-diff-type")}parseLineIndex(t,n){const i=(t.getAttribute("data-line-index")??"").split(",").map(t=>Number.parseInt(t,10)).filter(t=>!Number.isNaN(t));return n&&2===i.length?i[1]:n?void 0:i[0]}};function u({enableTokenInteractionsOnWhitespace:t,enableGutterUtility:n,lineHoverHighlight:i,onGutterUtilityClick:o,onLineClick:l,onLineEnter:s,onLineLeave:c,onLineNumberClick:u,onTokenClick:v,onTokenEnter:p,onTokenLeave:S,renderGutterUtility:f,__debugPointerEvents:b,enableLineSelection:L,controlledSelection:y,onLineSelected:E,onLineSelectionStart:P,onLineSelectionChange:k,onLineSelectionEnd:C},A,N,U){return{enableTokenInteractionsOnWhitespace:t,enableGutterUtility:h({enableGutterUtility:n,renderGutterUtility:f,onGutterUtilityClick:o}),usesCustomGutterUtility:null!=f,lineHoverHighlight:i,onGutterUtilityClick:o,onHunkExpand:A,onMergeConflictActionClick:U,onLineClick:l,onLineEnter:s,onLineLeave:c,onLineNumberClick:u,onTokenClick:v,onTokenEnter:p,onTokenLeave:S,__debugPointerEvents:b,enableLineSelection:L,controlledSelection:y,onLineSelected:E,onLineSelectionStart:P,onLineSelectionChange:k,onLineSelectionEnd:C,getLineIndex:N}}function h({enableGutterUtility:t,renderGutterUtility:n,onGutterUtilityClick:i}){if(null!=i&&null!=n)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return t??!1}function v(t){return null!=t&&"kind"in t&&"line"===t.kind}function p(t){return null!=t&&"kind"in t&&"token"===t.kind}function S(t){return v(t)||p(t)}function f(t){return"type"in t&&"line-info"===t.type}function b(t){return"kind"in t&&"merge-conflict-action"===t.kind}function L(t){return"current"===t||"incoming"===t||"both"===t}function y(t,n){const i=t?.querySelector(n);return i instanceof HTMLElement?i:void 0}function E(t){const n=[];let i=t;for(;null!=i;)n.push(i),i=i.parentNode;return n}function P(t){const n=t.closest("[data-line], [data-column-number]");if(n instanceof HTMLElement)return n;const i=t.closest("[data-line-annotation], [data-gutter-buffer=\"annotation\"]");if(!(i instanceof HTMLElement))return;const o=i.previousElementSibling;return o instanceof HTMLElement&&(o.hasAttribute("data-line")||o.hasAttribute("data-column-number"))?o:void 0}function k(t){const n=t.closest("[slot^=\"annotation-\"]"),i=(n instanceof HTMLElement&&null!=n.assignedSlot?n.assignedSlot:"SLOT"===t.tagName?t:void 0)?.closest("[data-line-annotation]");return i instanceof HTMLElement?i:void 0}function C(t){const n=t.closest("[slot^=\"annotation-\"]");if(n instanceof HTMLElement)return n.getAttribute("slot")??void 0;if(t instanceof HTMLElement){const n=t.getAttribute("name")??void 0;return null!=n&&n.startsWith("annotation-")?n:void 0}}function A(t){if(null==t)return;const n=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(t);if(null==n)return;const i=Number.parseInt(n[2],10);return!Number.isFinite(i)||i<=0?void 0:{lineNumber:i,side:n[1]}}function N(t){return null!=t&&"function"==typeof t.elementFromPoint}function U(t,i){return t===i||(0,n.areSelectionsEqual)(t??void 0,i??void 0)}function T(t,n){return t?.highlightSide===n.highlightSide&&t?.lineNumberOnly===n.lineNumberOnly&&U(t?.range??null,n.range)}function I(t,n){switch(t){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return n.hasAttribute("data-deletions")?"deletions":"additions"}}function D(t){const n=t.getAttribute("data-line-type");if(null!=n)switch(n){case"change-deletion":case"change-addition":case"context":case"context-expanded":return n;default:return}}function R(t="none",n,...i){switch(t){case"none":return;case"both":break;case"click":if("click"!==n)return;break;case"move":if("move"!==n)return}console.log(...i)}},1262,[1253,1257,1263,1261,1264,1265]);
164
- __d(function(g,r,i,_a,m,e,d){"use strict";function n(n,t){return n.lineNumber===t.lineNumber&&n.side===t.side}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areSelectionPointsEqual",{enumerable:!0,get:function(){return n}})},1263,[]);
165
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){for(const u of t)if(u instanceof HTMLElement&&(u.hasAttribute("data-utility-button")||u.hasAttribute("data-gutter-utility-slot")||"gutter-utility-slot"===u.getAttribute("slot")||"gutter-utility-slot"===u.getAttribute("name")))return!0;return!1}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"isGutterUtilityPath",{enumerable:!0,get:function(){return t}})},1264,[]);
166
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"toHtml",{enumerable:!0,get:function(){return t.toHtml}});var t=r(d[0])},1265,[1266]);
167
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.toHtml=function(s,c){const h=c||l,f=h.quote||'"',y='"'===f?"'":'"';if('"'!==f&&"'"!==f)throw new Error('Invalid quote `'+f+'`, expected `\'` or `"`');return{one:u,all:p,settings:{omitOptionalTags:h.omitOptionalTags||!1,allowParseErrors:h.allowParseErrors||!1,allowDangerousCharacters:h.allowDangerousCharacters||!1,quoteSmart:h.quoteSmart||!1,preferUnquoted:h.preferUnquoted||!1,tightAttributes:h.tightAttributes||!1,upperDoctype:h.upperDoctype||!1,tightDoctype:h.tightDoctype||!1,bogusComments:h.bogusComments||!1,tightCommaSeparatedLists:h.tightCommaSeparatedLists||!1,tightSelfClosing:h.tightSelfClosing||!1,collapseEmptyAttributes:h.collapseEmptyAttributes||!1,allowDangerousHtml:h.allowDangerousHtml||!1,voids:h.voids||t.htmlVoidElements,characterReferences:h.characterReferences||n,closeSelfClosing:h.closeSelfClosing||!1,closeEmptyElements:h.closeEmptyElements||!1},schema:'svg'===h.space?o.svg:o.html,quote:f,alternative:y}.one(Array.isArray(s)?{type:'root',children:s}:s,void 0,void 0)},e.all=p;var t=r(d[0]),o=r(d[1]),s=r(d[2]);const l={},n={},c=[];function u(t,o,l){return(0,s.handle)(t,o,l,this)}function p(t){const o=[],s=t&&t.children||c;let l=-1;for(;++l<s.length;)o[l]=this.one(s[l],l,t);return o.join('')}},1266,[1168,1169,1267]);
168
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"handle",{enumerable:!0,get:function(){return p}});var n=r(d[0]),t=r(d[1]),o=r(d[2]),c=r(d[3]),u=r(d[4]),l=r(d[5]),w=r(d[6]);const p=(0,n.zwitch)('type',{invalid:function(n){throw new Error('Expected node, not `'+n+'`')},unknown:function(n){throw new Error('Cannot compile unknown node `'+n.type+'`')},handlers:{comment:t.comment,doctype:o.doctype,element:c.element,raw:u.raw,root:l.root,text:w.text}})},1267,[1188,1268,1269,1270,1275,1277,1276]);
169
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.comment=function(u,o,f,b){return b.settings.bogusComments?'<?'+(0,t.stringifyEntities)(u.value,Object.assign({},b.settings.characterReferences,{subset:n}))+'>':'\x3c!--'+u.value.replace(s,function(s){return(0,t.stringifyEntities)(s,Object.assign({},b.settings.characterReferences,{subset:c}))})+'--\x3e'};var t=r(d[0]);const s=/^>|^->|<!--|-->|--!>|<!-$/g,n=['>'],c=['<','>']},1268,[1190]);
170
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.doctype=function(t,c,n,o){return'<!'+(o.settings.upperDoctype?'DOCTYPE':'doctype')+(o.settings.tightDoctype?'':' ')+'html>'}},1269,[]);
171
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.element=function(t,s,l,o){const p=o.schema,h='svg'!==p.space&&o.settings.omitOptionalTags;let b='svg'===p.space?o.settings.closeEmptyElements:o.settings.voids.includes(t.tagName.toLowerCase());const v=[];let y;'html'===p.space&&'svg'===t.tagName&&(o.schema=n.svg);const N=f(o,t.properties),E=o.all('html'===p.space&&'template'===t.tagName?t.content:t);o.schema=p,E&&(b=!1);!N&&h&&(0,u.opening)(t,s,l)||(v.push('<',t.tagName,N?' '+N:''),b&&('svg'===p.space||o.settings.closeSelfClosing)&&(y=N.charAt(N.length-1),(!o.settings.tightSelfClosing||'/'===y||y&&'"'!==y&&"'"!==y)&&v.push(' '),v.push('/')),v.push('>'));v.push(E),b||h&&(0,c.closing)(t,s,l)||v.push('</'+t.tagName+'>');return v.join('')};var t=r(d[0]),s=r(d[1]),n=r(d[2]),l=r(d[3]),o=r(d[4]),c=r(d[5]),u=r(d[6]);const p={name:[['\t\n\f\r &/=>'.split(''),'\t\n\f\r "&\'/=>`'.split('')],['\0\t\n\f\r "&\'/<=>'.split(''),'\0\t\n\f\r "&\'/<=>`'.split('')]],unquoted:[['\t\n\f\r &>'.split(''),'\0\t\n\f\r "&\'<=>`'.split('')],['\0\t\n\f\r "&\'<=>`'.split(''),'\0\t\n\f\r "&\'<=>`'.split('')]],single:[["&'".split(''),'"&\'`'.split('')],["\0&'".split(''),'\0"&\'`'.split('')]],double:[['"&'.split(''),'"&\'`'.split('')],['\0"&'.split(''),'\0"&\'`'.split('')]]};function f(t,s){const n=[];let l,o=-1;if(s)for(l in s)if(null!==s[l]&&void 0!==s[l]){const o=h(t,l,s[l]);o&&n.push(o)}for(;++o<n.length;){const s=t.settings.tightAttributes?n[o].charAt(n[o].length-1):void 0;o!==n.length-1&&'"'!==s&&"'"!==s&&(n[o]+=' ')}return n.join('')}function h(c,u,f){const h=(0,n.find)(c.schema,u),b=c.settings.allowParseErrors&&'html'===c.schema.space?0:1,v=c.settings.allowDangerousCharacters?0:1;let y,N=c.quote;if(!h.overloadedBoolean||f!==h.attribute&&''!==f?!h.boolean&&!h.overloadedBoolean||'string'==typeof f&&f!==h.attribute&&''!==f||(f=Boolean(f)):f=!0,null==f||!1===f||'number'==typeof f&&Number.isNaN(f))return'';const E=(0,o.stringifyEntities)(h.attribute,Object.assign({},c.settings.characterReferences,{subset:p.name[b][v]}));return!0===f?E:(f=Array.isArray(f)?(h.commaSeparated?s.stringify:l.stringify)(f,{padLeft:!c.settings.tightCommaSeparatedLists}):String(f),c.settings.collapseEmptyAttributes&&!f?E:(c.settings.preferUnquoted&&(y=(0,o.stringifyEntities)(f,Object.assign({},c.settings.characterReferences,{attribute:!0,subset:p.unquoted[b][v]}))),y!==f&&(c.settings.quoteSmart&&(0,t.ccount)(f,N)>(0,t.ccount)(f,c.alternative)&&(N=c.alternative),y=N+(0,o.stringifyEntities)(f,Object.assign({},c.settings.characterReferences,{subset:("'"===N?p.single:p.double)[b][v],attribute:!0}))+N),E+(y?'='+y:y)))}},1270,[1203,1204,1169,1205,1190,1271,1274]);
172
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"closing",{enumerable:!0,get:function(){return o}});var t=r(d[0]),n=r(d[1]);const o=(0,r(d[2]).omission)({body:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'comment'!==c.type},caption:N,colgroup:N,dd:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&('dt'===c.tagName||'dd'===c.tagName)},dt:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return Boolean(c&&'element'===c.type&&('dt'===c.tagName||'dd'===c.tagName))},head:N,html:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'comment'!==c.type},li:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&'li'===c.tagName},optgroup:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&'optgroup'===c.tagName},option:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&('option'===c.tagName||'optgroup'===c.tagName)},p:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return c?'element'===c.type&&('address'===c.tagName||'article'===c.tagName||'aside'===c.tagName||'blockquote'===c.tagName||'details'===c.tagName||'div'===c.tagName||'dl'===c.tagName||'fieldset'===c.tagName||'figcaption'===c.tagName||'figure'===c.tagName||'footer'===c.tagName||'form'===c.tagName||'h1'===c.tagName||'h2'===c.tagName||'h3'===c.tagName||'h4'===c.tagName||'h5'===c.tagName||'h6'===c.tagName||'header'===c.tagName||'hgroup'===c.tagName||'hr'===c.tagName||'main'===c.tagName||'menu'===c.tagName||'nav'===c.tagName||'ol'===c.tagName||'p'===c.tagName||'pre'===c.tagName||'section'===c.tagName||'table'===c.tagName||'ul'===c.tagName):!N||!('element'===N.type&&('a'===N.tagName||'audio'===N.tagName||'del'===N.tagName||'ins'===N.tagName||'map'===N.tagName||'noscript'===N.tagName||'video'===N.tagName))},rp:c,rt:c,tbody:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&('tbody'===c.tagName||'tfoot'===c.tagName)},td:u,tfoot:function(t,o,N){return!(0,n.siblingAfter)(N,o)},th:u,thead:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return Boolean(c&&'element'===c.type&&('tbody'===c.tagName||'tfoot'===c.tagName))},tr:function(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&'tr'===c.tagName}});function N(o,N,c){const u=(0,n.siblingAfter)(c,N,!0);return!u||'comment'!==u.type&&!('text'===u.type&&(0,t.whitespace)(u.value.charAt(0)))}function c(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&('rp'===c.tagName||'rt'===c.tagName)}function u(t,o,N){const c=(0,n.siblingAfter)(N,o);return!c||'element'===c.type&&('td'===c.tagName||'th'===c.tagName)}},1271,[1207,1272,1273]);
173
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"siblingAfter",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"siblingBefore",{enumerable:!0,get:function(){return u}});var n=r(d[0]);const t=o(1),u=o(-1),c=[];function o(t){return function(u,o,f){const l=u?u.children:c;let s=(o||0)+t,b=l[s];if(!f)for(;b&&(0,n.whitespace)(b);)s+=t,b=l[s];return b}}},1272,[1207]);
174
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.omission=function(n){return function(o,u,c){return t.call(n,o.tagName)&&n[o.tagName](o,u,c)}};const t={}.hasOwnProperty},1273,[]);
175
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"opening",{enumerable:!0,get:function(){return l}});var t=r(d[0]),n=r(d[1]),o=r(d[2]);const l=(0,r(d[3]).omission)({body:function(o){const l=(0,n.siblingAfter)(o,-1,!0);return!(l&&('comment'===l.type||'text'===l.type&&(0,t.whitespace)(l.value.charAt(0))||'element'===l.type&&('meta'===l.tagName||'link'===l.tagName||'script'===l.tagName||'style'===l.tagName||'template'===l.tagName)))},colgroup:function(t,l,c){const s=(0,n.siblingBefore)(c,l),f=(0,n.siblingAfter)(t,-1,!0);if(c&&s&&'element'===s.type&&'colgroup'===s.tagName&&(0,o.closing)(s,c.children.indexOf(s),c))return!1;return Boolean(f&&'element'===f.type&&'col'===f.tagName)},head:function(t){const n=new Set;for(const o of t.children)if('element'===o.type&&('base'===o.tagName||'title'===o.tagName)){if(n.has(o.tagName))return!1;n.add(o.tagName)}const o=t.children[0];return!o||'element'===o.type},html:function(t){const o=(0,n.siblingAfter)(t,-1);return!o||'comment'!==o.type},tbody:function(t,l,c){const s=(0,n.siblingBefore)(c,l),f=(0,n.siblingAfter)(t,-1);if(c&&s&&'element'===s.type&&('thead'===s.tagName||'tbody'===s.tagName)&&(0,o.closing)(s,c.children.indexOf(s),c))return!1;return Boolean(f&&'element'===f.type&&'tr'===f.tagName)}})},1274,[1207,1272,1271,1273]);
176
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.raw=function(n,u,l,o){return o.settings.allowDangerousHtml?n.value:(0,t.text)(n,u,l,o)};var t=r(d[0])},1275,[1276]);
177
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.text=function(n,c,u,l){return!u||'element'!==u.type||'script'!==u.tagName&&'style'!==u.tagName?(0,t.stringifyEntities)(n.value,Object.assign({},l.settings.characterReferences,{subset:s})):n.value};var t=r(d[0]);const s=['<','&']},1276,[1190]);
178
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.root=function(t,n,o,u){return u.all(t)}},1277,[]);
179
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ResizeManager",{enumerable:!0,get:function(){return n}});var n=class n{static managersByElement=new Map;static getResizeObserver(){const t=n.resizeObserver??new ResizeObserver(n.handleSharedResizeEntries);return n.resizeObserver=t,t}static handleSharedResizeEntries(t){const o=new Map;for(const s of t){const t=n.managersByElement.get(s.target);if(null==t)continue;const l=o.get(t);null==l?o.set(t,[s]):l.push(s)}for(const[n,t]of o)n.handleResizeEntries(t)}observedNodes=new Map;setup(n,{disableAnnotations:t,columnVariables:o="apply"}){const l=new Set,c="apply"===o;let f=0;const b=new Map(this.observedNodes);this.observedNodes.clear();for(const t of n.children){if(2===f)break;const n=(()=>{if(t instanceof HTMLElement&&"CODE"===t.tagName)return t})();if(null==n)continue;f++;let o=b.get(n);if(null!=o&&"code"!==o.type)throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let l=n.firstElementChild;l instanceof HTMLElement||(l=null),null!=o?(this.observedNodes.set(n,o),b.delete(n),o.numberElement!==l?(null!=o.numberElement&&(this.unobserve(o.numberElement),b.delete(o.numberElement)),null!=l&&(this.observe(l),b.delete(l),this.observedNodes.set(l,o)),o.numberElement=l,o.numberWidth=0):null!=o.numberElement?(b.delete(o.numberElement),this.observedNodes.set(o.numberElement,o)):o.numberWidth=0,s(o,c)):(o={type:"code",codeElement:n,numberElement:l,codeWidth:"auto",numberWidth:0,applyColumnVariables:c},this.observedNodes.set(n,o),this.observe(n),null!=l&&(this.observedNodes.set(l,o),this.observe(l)))}if(f>1&&!t){const t=n.querySelectorAll("[data-line-annotation*=\",\"]"),o=new Map;for(const n of t){if(!(n instanceof HTMLElement))continue;const t=n.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(t)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:t,element:n});continue}let s=o.get(t);null==s&&(s=[],o.set(t,s)),s.push(n)}for(const[n,t]of o){if(2!==t.length){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",n,t);continue}const[o,s]=t,c=o.firstElementChild,h=s.firstElementChild;if(!(o instanceof HTMLElement&&s instanceof HTMLElement&&c instanceof HTMLElement&&h instanceof HTMLElement))continue;let u=b.get(c);if(null!=u){this.observedNodes.set(c,u),this.observedNodes.set(h,u),b.delete(c),b.delete(h);continue}const f=c.getBoundingClientRect().height,p=h.getBoundingClientRect().height;u={type:"annotations",column1:{container:o,child:c,childHeight:f},column2:{container:s,child:h,childHeight:p},currentHeight:"auto"},l.add({child1:c,child2:h,item:u,newHeight:Math.max(f,p)})}for(const n of l)this.applyNewHeight(n.item,n.newHeight),this.observedNodes.set(n.child1,n.item),this.observedNodes.set(n.child2,n.item),this.observe(n.child1),this.observe(n.child2);l.clear()}for(const[n,t]of b)this.unobserve(n),"code"===t.type?h(t):u(t);b.clear()}cleanUp(){for(const n of this.observedNodes.keys())this.unobserve(n);this.observedNodes.clear()}observe(t){const{managersByElement:o}=n,s=o.get(t);if(s!==this){if(null!=s&&s!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");o.set(t,this),n.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:o,resizeObserver:s}=n,l=o.get(t);if(null!=l){if(l!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");o.delete(t),s?.unobserve(t),null!=s&&0===o.size&&(s.disconnect(),n.resizeObserver=void 0)}}handleResizeEntries(n){const t=new Map,o=new Set;for(const s of n){const{target:n,borderBoxSize:l,contentBoxSize:c}=s;if(!(n instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",s);continue}const h=this.observedNodes.get(n);if(null!=h){if("annotations"===h.type){const t=(()=>n===h.column1.child?h.column1:n===h.column2.child?h.column2:void 0)();if(null==t){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:h,target:n});continue}t.childHeight=l[0].blockSize,o.add(h)}else if("code"===h.type){const o=t.get(h)??{},s=c[0].inlineSize;n===h.codeElement?o.codeInlineSize=s:n===h.numberElement&&(o.numberInlineSize=s),t.set(h,o)}}else console.error("ResizeManager.handleResizeEntries: Not a valid observed node",s)}this.applyAnnotationUpdates(o),o.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(n){for(const t of n)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=n=>{for(const[s,c]of n){const n=null!=c.codeInlineSize?t(c.codeInlineSize):s.codeWidth,h=null!=c.numberInlineSize?o(c.numberInlineSize):s.numberWidth,u=n!==s.codeWidth,f=h!==s.numberWidth;(u||f)&&(s.codeWidth=n,s.numberWidth=h,s.applyColumnVariables&&l(s,{codeWidthChanged:u,numberWidthChanged:f}))}};applyNewHeight(n,t){t!==n.currentHeight&&(n.currentHeight=Math.max(t,0),n.column1.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`),n.column2.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`))}};function t(n){const t=Math.max(Math.floor(n),0);return 0===t?"auto":t}function o(n){return Math.max(Math.ceil(n),0)}function s(n,t){n.applyColumnVariables!==t&&(n.applyColumnVariables=t,t?l(n,{codeWidthChanged:!0,numberWidthChanged:!0}):c(n))}function l(n,{codeWidthChanged:t,numberWidthChanged:o}){const{codeElement:s,codeWidth:l,numberWidth:c}=n;if(t&&s.style.setProperty("--diffs-column-width",""+("number"==typeof l?`${l}px`:"auto")),o&&s.style.setProperty("--diffs-column-number-width",""+(0===c?"auto":`${c}px`)),t||o&&"auto"!==l){const n="number"==typeof l?Math.max(l-c,0):0;s.style.setProperty("--diffs-column-content-width",""+(n>0?`${n}px`:"auto"))}}function c(n){n.codeElement.style.removeProperty("--diffs-column-content-width"),n.codeElement.style.removeProperty("--diffs-column-number-width"),n.codeElement.style.removeProperty("--diffs-column-width")}function h(n){n.codeElement.isConnected&&c(n)}function u(n){n.column1.container.isConnected&&n.column1.container.style.removeProperty("--diffs-annotation-min-height"),n.column2.container.isConnected&&n.column2.container.style.removeProperty("--diffs-annotation-min-height")}},1278,[]);
180
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"hasResolvedThemes",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){return t.themeResolver.hasResolvedThemes(n)}},1279,[1236]);
181
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areFileRenderOptionsEqual",{enumerable:!0,get:function(){return t}});var n=r(d[0]);function t(t,o){return(0,n.areThemesEqual)(t.theme,o.theme)&&t.useTokenTransformer===o.useTokenTransformer&&t.tokenizeMaxLineLength===o.tokenizeMaxLineLength}},1280,[1255]);
182
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){return null==t||null==n?t===n:t.startingLine===n.startingLine&&t.totalLines===n.totalLines&&t.bufferBefore===n.bufferBefore&&t.bufferAfter===n.bufferAfter}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areRenderRangesEqual",{enumerable:!0,get:function(){return t}})},1281,[]);
183
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createAnnotationElement",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){return(0,t.createHastElement)({tagName:"div",children:[(0,t.createHastElement)({tagName:"div",children:n.annotations?.map(n=>(0,t.createHastElement)({tagName:"slot",properties:{name:n}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${n.hunkIndex},${n.lineIndex}`}})}},1282,[1260]);
184
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n){switch(n){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"}}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getIconForType",{enumerable:!0,get:function(){return n}})},1283,[]);
185
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createFileHeaderElement",{enumerable:!0,get:function(){return c}});var t=r(d[0]),n=r(d[1]),o=r(d[2]);function c({fileOrDiff:o,mode:c,stickyHeader:l}){const E="type"in o?o:void 0,u={"data-diffs-header":c,"data-change-type":E?.type,"data-sticky":l?"":void 0};return(0,n.createHastElement)({tagName:"div",children:["custom"===c?(0,n.createHastElement)({tagName:"slot",properties:{name:t.CUSTOM_HEADER_SLOT_ID}}):s({name:o.name,prevName:"prevName"in o?o.prevName:void 0,iconType:E?.type??"file"}),..."custom"===c?[]:[p(E)]],properties:u})}function s({name:c,prevName:s,iconType:p}){const l=[(0,n.createHastElement)({tagName:"slot",properties:{name:t.HEADER_PREFIX_SLOT_ID}}),(0,n.createIconElement)({name:(0,o.getIconForType)(p),properties:{"data-change-icon":p}})];return null!=s&&(l.push((0,n.createHastElement)({tagName:"div",children:[(0,n.createHastElement)({tagName:"bdi",children:[(0,n.createTextNodeElement)(s)]})],properties:{"data-prev-name":""}})),l.push((0,n.createIconElement)({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),l.push((0,n.createHastElement)({tagName:"div",children:[(0,n.createHastElement)({tagName:"bdi",children:[(0,n.createTextNodeElement)(c)]})],properties:{"data-title":""}})),l.push((0,n.createHastElement)({tagName:"slot",properties:{name:t.HEADER_FILENAME_SUFFIX_SLOT_ID}})),(0,n.createHastElement)({tagName:"div",children:l,properties:{"data-header-content":""}})}function p(o){const c=[];if(null!=o){let t=0,s=0;for(const n of o.hunks)t+=n.additionLines,s+=n.deletionLines;(s>0||0===t)&&c.push((0,n.createHastElement)({tagName:"span",children:[(0,n.createTextNodeElement)(`-${s}`)],properties:{"data-deletions-count":""}})),(t>0||0===s)&&c.push((0,n.createHastElement)({tagName:"span",children:[(0,n.createTextNodeElement)(`+${t}`)],properties:{"data-additions-count":""}}))}return c.push((0,n.createHastElement)({tagName:"slot",properties:{name:t.HEADER_METADATA_SLOT_ID}})),(0,n.createHastElement)({tagName:"div",children:c,properties:{"data-metadata":""}})}},1284,[1148,1260,1283]);
186
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createPreElement",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"createPreWrapperProperties",{enumerable:!0,get:function(){return o}});var t=r(d[0]);function n(n){return(0,t.createHastElement)({tagName:"pre",properties:o(n)})}function o({diffIndicators:t,disableBackground:n,disableLineNumbers:o,overflow:s,split:f,totalLines:l,type:c,customProperties:u}){return Object.assign({},u,{"data-diff":"diff"===c?"":void 0,"data-file":"file"===c?"":void 0,"data-diff-type":"diff"===c?f?"split":"single":void 0,"data-overflow":s,"data-disable-line-numbers":o?"":void 0,"data-background":n?void 0:"","data-indicators":"bars"===t||"classic"===t?t:void 0,style:`--diffs-min-number-column-width-default:${`${l}`.length}ch;`})}},1285,[1260]);
187
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"EXTENSION_TO_FILE_FORMAT",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"getCustomExtensionsMap",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"getCustomExtensionsVersion",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"getFiletypeFromFileName",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"replaceCustomExtensions",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"setCustomExtension",{enumerable:!0,get:function(){return u}});const s=new Map;let t=0;const l={"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","\ud83d\udd25":"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",odin:"odin",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",BUCK:"python",BUILD:"python",PACKAGE:"python",WORKSPACE:"python",Tiltfile:"python",bazel:"python",bxl:"python",bzl:"python",bzlmod:"python",star:"python",sky:"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:"\u6587\u8a00",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 o(s){const t=n(s);if(null!=t)return t;const l=s.split(/[/\\]/).pop()??s;return l===s?"text":n(l)??"text"}function n(t){if(s.has(t))return s.get(t)??"text";if(Object.hasOwn(l,t))return l[t]??null;const o=t.match(/\.([^/\\]+\.[^/\\]+)$/);if(null!=o){if(s.has(o[1]))return s.get(o[1])??"text";if(Object.hasOwn(l,o[1]))return l[o[1]]??"text"}const n=t.match(/\.([^.]+)$/)?.[1]??"";return s.has(n)?s.get(n)??"text":Object.hasOwn(l,n)?l[n]??"text":null}function p(l,o){if(l<=t)return!1;s.clear();for(const t in o){const l=o[t];null!=l&&s.set(t,l)}return t=l,!0}function c(){return t}function u(l,o){const n=s.get(l);return n!==o&&(null!=n&&console.warn(`setCustomExtension: overriding custom mapping for "${l}" from "${n}" to "${o}"`),s.set(l,o),t++,!0)}function f(){return Object.fromEntries(s)}},1286,[]);
188
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getHighlighterOptions",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n,{theme:h,preferredHighlighter:s="shiki-js"}){return{langs:Array.isArray(n)?n:[n??"text"],themes:(0,t.getThemes)(h),preferredHighlighter:s}}},1287,[1232]);
189
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n){return`annotation-${"side"in n?`${n.side}-`:""}${n.lineNumber}`}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getLineAnnotationName",{enumerable:!0,get:function(){return n}})},1288,[]);
190
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return 0===t.startingLine&&t.totalLines===1/0&&0===t.bufferBefore&&0===t.bufferAfter}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"isDefaultRenderRange",{enumerable:!0,get:function(){return t}})},1289,[]);
191
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"processLine",{enumerable:!0,get:function(){return t}});var n=r(d[0]);function t(t,o,l){const s="function"==typeof l.lineInfo?l.lineInfo(o):l.lineInfo[o-1];if(null==s){const n=`processLine: line ${o}, contains no state.lineInfo`;throw console.error(n,{node:t,line:o,state:l}),new Error(n)}return t.tagName="div",t.properties["data-line"]=s.lineNumber,t.properties["data-alt-line"]=s.altLineNumber,t.properties["data-line-type"]=s.type,t.properties["data-line-index"]=s.lineIndex,0===t.children.length&&t.children.push((0,n.createTextNodeElement)("\n")),t}},1290,[1260]);
192
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createTransformerWithState",{enumerable:!0,get:function(){return l}});var t=r(d[0]),n=r(d[1]),o=r(d[2]);function l(l=!1,f=!1){const u={lineInfo:[]},p=[Object.assign({line:t=>(delete t.properties.class,t),pre(s){const c=(0,t.findCodeElement)(s),f=[];if(null!=c){let t=1;for(const s of c.children)"element"===s.type&&(l&&(0,o.wrapTokenFragments)(s),f.push((0,n.processLine)(s,t,u)),t++);c.children=f}return s}},l?{tokens(t){for(const n of t){let t=0;for(const o of n){const n=o;n.__lineChar??=t,t+=o.content.length}}},preprocess(t,n){n.mergeWhitespaces="never"},span(t,n,o,l,s){if(null!=s?.offset&&null!=s.content){const n=s.__lineChar;return null!=n&&(t.properties["data-char"]=n),t}return t}}:null)];return f&&p.push(c,s),l&&p.push({line:t=>("element"===t.type&&0===t.children.length&&t.children.push({type:"element",tagName:"br",properties:{},children:[]}),t)}),{state:u,transformers:p,toClass:s}}const s=(0,r(d[3]).transformerStyleToClass)({classPrefix:"hl-"}),c={name:"token-style-normalizer",tokens(t){for(const n of t)for(const t of n){if(null!=t.htmlStyle)continue;const n={};null!=t.color&&(n.color=t.color),null!=t.bgColor&&(n["background-color"]=t.bgColor),null!=t.fontStyle&&0!==t.fontStyle&&(1&t.fontStyle&&(n["font-style"]="italic"),2&t.fontStyle&&(n["font-weight"]="bold"),4&t.fontStyle&&(n["text-decoration"]="underline")),Object.keys(n).length>0&&(t.htmlStyle=n)}}}},1291,[1260,1290,1292,1293]);
193
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"wrapTokenFragments",{enumerable:!0,get:function(){return c}});var t=r(d[0]);const n=Symbol("no-token"),o=Symbol("multiple-tokens");function c(u){const f=l(u);if(null!=f)return f;let p=n;const h=[];let v,y=[];const b=()=>{if(0===y.length||null==v)return y=[],void(v=void 0);if(1===y.length){const t=y[0];if("element"===t?.type){n=v,t.properties["data-char"]=n;for(const n of t.children)s(n)}else s(t);return h.push(t),y=[],void(v=void 0)}var n;for(const t of y)s(t);h.push((0,t.createHastElement)({tagName:"span",properties:{"data-char":v},children:y})),y=[],v=void 0},_=t=>{t!==n&&(t!==o?p!==n?p!==t&&(p=o):p=t:p=o)};for(const t of u.children){const o="element"===t.type?c(t):n;_(o),"number"==typeof o?(null!=v&&v!==o&&b(),v??=o,y.push(t)):(b(),h.push(t))}return b(),u.children=h,p}function l(t){const n=t.properties["data-char"];if("number"==typeof n)return n}function s(t){if("element"===t.type){t.properties["data-char"]=void 0;for(const n of t.children)s(n)}}},1292,[1260]);
194
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createCommentNotationTransformer",{enumerable:!0,get:function(){return y}}),Object.defineProperty(e,"findAllSubstringIndexes",{enumerable:!0,get:function(){return N}}),Object.defineProperty(e,"parseMetaHighlightString",{enumerable:!0,get:function(){return j}}),Object.defineProperty(e,"parseMetaHighlightWords",{enumerable:!0,get:function(){return C}}),Object.defineProperty(e,"transformerCompactLineOptions",{enumerable:!0,get:function(){return v}}),Object.defineProperty(e,"transformerMetaHighlight",{enumerable:!0,get:function(){return O}}),Object.defineProperty(e,"transformerMetaWordHighlight",{enumerable:!0,get:function(){return P}}),Object.defineProperty(e,"transformerNotationDiff",{enumerable:!0,get:function(){return _}}),Object.defineProperty(e,"transformerNotationErrorLevel",{enumerable:!0,get:function(){return w}}),Object.defineProperty(e,"transformerNotationFocus",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"transformerNotationHighlight",{enumerable:!0,get:function(){return H}}),Object.defineProperty(e,"transformerNotationMap",{enumerable:!0,get:function(){return $}}),Object.defineProperty(e,"transformerNotationWordHighlight",{enumerable:!0,get:function(){return q}}),Object.defineProperty(e,"transformerRemoveComments",{enumerable:!0,get:function(){return z}}),Object.defineProperty(e,"transformerRemoveLineBreak",{enumerable:!0,get:function(){return D}}),Object.defineProperty(e,"transformerRemoveNotationEscape",{enumerable:!0,get:function(){return F}}),Object.defineProperty(e,"transformerRenderIndentGuides",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(e,"transformerRenderLineNumber",{enumerable:!0,get:function(){return U}}),Object.defineProperty(e,"transformerRenderWhitespace",{enumerable:!0,get:function(){return te}}),Object.defineProperty(e,"transformerStyleToClass",{enumerable:!0,get:function(){return ne}});const t=/(\s+\/\/)/,n=/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/,i=/(?:\/\/|#|;{1,2}|%{1,2}|--)(\s*)$/,s=/^(?:\/\/|["'#]|;{1,2}|%{1,2}|--)$/,o=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function l(n,i,o){const l=[];for(const f of n){if("v3"===o){const n=f.children.flatMap((n,i)=>{if("element"!==n.type)return n;const s=n.children[0];if("text"!==s.type)return n;const o=i===f.children.length-1;if(!h(s.value,o))return n;const l=s.value.split(t);if(l.length<=1)return n;let c=[l[0]];for(let t=1;t<l.length;t+=2)c.push(l[t]+(l[t+1]||""));return c=c.filter(Boolean),c.length<=1?n:c.map(t=>Object.assign({},n,{children:[{type:"text",value:t}]}))});n.length!==f.children.length&&(f.children=n)}const n=f.children;let u=n.length-1;"v1"===o?u=0:i&&(u=n.length-2);for(let t=Math.max(u,0);t<n.length;t++){const o=n[t];if("element"!==o.type)continue;const u=o.children.at(0);if("text"!==u?.type)continue;const p=t===n.length-1;let y,v=h(u.value,p);if(!v&&t>0&&u.value.trim().startsWith("[!code")){const i=n[t-1];if("element"===i?.type){const t=i.children.at(0);if("text"===t?.type&&(t.value.includes("//")||s.test(t.value.trim()))){const s=h(t.value+u.value,p);if(s){v=s,l.push({info:s,line:f,token:i,isLineCommentOnly:2===n.length&&1===i.children.length&&1===o.children.length,isJsxStyle:!1,additionalTokens:[o]});continue}}}}if(v)if(i&&!p&&0!==t){const i=c(n[t-1],"{")&&c(n[t+1],"}");l.push({info:v,line:f,token:o,isLineCommentOnly:3===n.length&&1===o.children.length,isJsxStyle:i,additionalTokens:y})}else l.push({info:v,line:f,token:o,isLineCommentOnly:1===n.length&&1===o.children.length,isJsxStyle:!1,additionalTokens:y})}}return l}function c(t,n){if("element"!==t.type)return!1;const i=t.children[0];return"text"===i.type&&i.value.trim()===n}function h(t,n){let i=t.trimStart();const s=t.length-i.length;i=i.trimEnd();const l=t.length-i.length-s;for(const[t,c]of o){if(c&&!n)continue;const o=t.exec(i);if(o)return[" ".repeat(s)+o[1],o[2],o[3]?o[3]+" ".repeat(l):void 0]}}function f(t){const i=t.match(n);return i&&0===i[1].trim().length?t.slice(0,i.index):t}function u(t){const n=t.match(i);return n&&0===n[1].trim().length?t.slice(0,n.index).trimEnd():t}const p=/#?\s*\[!code\b(?:\\.|[^\]])*\]/gi;function y(t,n,i,s){return s??="v3",{name:t,code(t){const o=t.children.filter(t=>"element"===t.type),c=[];t.data??={};const h=t.data;h._shiki_notation??=l(o,["jsx","tsx"].includes(this.options.lang),s);const y=h._shiki_notation;for(const t of y){if(0===t.info[1].length)continue;let l=o.indexOf(t.line);const h=0===t.info[1].replace(p,"").replace(n,"").trim().length;t.isLineCommentOnly&&h&&"v1"!==s&&l++;let y=!1;if(t.info[1]=t.info[1].replace(n,(...n)=>i.call(this,n,t.line,t.token,o,l)?(y=!0,""):n[0]),!y)continue;"v1"===s?t.info[1]=f(t.info[1]):"v3"===s&&(t.info[1]=u(t.info[1]));const v=0===t.info[1].trim().length;if(v&&(t.info[1]=""),v&&t.isLineCommentOnly)c.push(t.line);else if(v&&t.isJsxStyle)t.line.children.splice(t.line.children.indexOf(t.token)-1,3);else if(v){if(t.additionalTokens)for(let n=t.additionalTokens.length-1;n>=0;n--){const i=t.additionalTokens[n],s=t.line.children.indexOf(i);-1!==s&&t.line.children.splice(s,1)}t.line.children.splice(t.line.children.indexOf(t.token),1)}else{const n=t.token.children[0];if("text"===n.type&&(n.value=t.info.join(""),t.additionalTokens))for(const n of t.additionalTokens){const t=n.children[0];"text"===t?.type&&(t.value="")}}}for(const n of c){const i=t.children.indexOf(n),s=t.children[i+1];let o=1;"text"===s?.type&&"\n"===s?.value&&(o=2),t.children.splice(i,o)}}}}function v(t=[]){return{name:"@shikijs/transformers:compact-line-options",line(n,i){const s=t.find(t=>t.line===i);return s?.classes&&this.addClassToHast(n,s.classes),n}}}const b=/\{([\d,-]+)\}/;function j(t){if(!t)return null;const n=t.match(b);return n?n[1].split(",").flatMap(t=>{const n=t.split("-").map(t=>Number.parseInt(t,10));return 1===n.length?[n[0]]:Array.from({length:n[1]-n[0]+1},(t,i)=>n[0]+i)}):null}const x=Symbol("highlighted-lines");function O(t={}){const{className:n="highlighted",zeroIndexed:i=!1}=t;return{name:"@shikijs/transformers:meta-highlight",line(t,s){if(!this.options.meta?.__raw)return;const o=this.meta;o[x]??=j(this.options.meta.__raw);const l=o[x]??[],c=i?s-1:s;return l.includes(c)&&this.addClassToHast(t,n),t}}}const A=/\/((?:\\.|[^/])+)\//g,k=/\\(.)/g;function C(t){return t?[...t.matchAll(A)].map(t=>t[1].replace(k,"$1")):[]}function P(t={}){const{className:n="highlighted-word"}=t;return{name:"@shikijs/transformers:meta-word-highlight",preprocess(t,i){if(!this.options.meta?.__raw)return;const s=C(this.options.meta.__raw);i.decorations||=[];for(const o of s){const s=N(t,o);for(const t of s)i.decorations.push({start:t,end:t+o.length,properties:{class:n}})}}}}function N(t,n){const i=[];let s=0;for(;;){const o=t.indexOf(n,s);if(-1===o||o>=t.length)break;if(o<s)break;i.push(o),s=o+n.length}return i}const M=/[.*+?^${}()|[\]\\]/g;function T(t){return t.replace(M,"\\$&")}function $(t={},n="@shikijs/transformers:notation-map"){const{classMap:i={},classActivePre:s,classActiveCode:o}=t;return y(n,new RegExp(`#?\\s*\\[!code (${Object.keys(i).map(T).join("|")})(:\\d+)?\\]`,"gi"),function([t,n,l=":1"],c,h,f,u){const p=Number.parseInt(l.slice(1),10);for(let t=u;t<Math.min(u+p,f.length);t++)this.addClassToHast(f[t],i[n]);return s&&this.addClassToHast(this.pre,s),o&&this.addClassToHast(this.code,o),!0},t.matchAlgorithm)}function _(t={}){const{classLineAdd:n="diff add",classLineRemove:i="diff remove",classActivePre:s="has-diff",classActiveCode:o}=t;return $({classMap:{"++":n,"--":i},classActivePre:s,classActiveCode:o,matchAlgorithm:t.matchAlgorithm},"@shikijs/transformers:notation-diff")}function w(t={}){const{classMap:n={error:["highlighted","error"],warning:["highlighted","warning"],info:["highlighted","info"]},classActivePre:i="has-highlighted",classActiveCode:s}=t;return $({classMap:n,classActivePre:i,classActiveCode:s,matchAlgorithm:t.matchAlgorithm},"@shikijs/transformers:notation-error-level")}function S(t={}){const{classActiveLine:n="focused",classActivePre:i="has-focused",classActiveCode:s}=t;return $({classMap:{focus:n},classActivePre:i,classActiveCode:s,matchAlgorithm:t.matchAlgorithm},"@shikijs/transformers:notation-focus")}function H(t={}){const{classActiveLine:n="highlighted",classActivePre:i="has-highlighted",classActiveCode:s}=t;return $({classMap:{highlight:n,hl:n},classActivePre:i,classActiveCode:s,matchAlgorithm:t.matchAlgorithm},"@shikijs/transformers:notation-highlight")}function L(t,n,i,s){const o=E(t);let l=o.indexOf(i);for(;-1!==l;)R.call(this,t.children,n,l,i.length,s),l=o.indexOf(i,l+1)}function E(t){return"text"===t.type?t.value:"element"===t.type&&"span"===t.tagName?t.children.map(E).join(""):""}function R(t,n,i,s,o){let l=0;for(let c=0;c<t.length;c++){const h=t[c];if("element"!==h.type||"span"!==h.tagName||h===n)continue;const f=h.children[0];if("text"===f.type){if(W([l,l+f.value.length-1],[i,i+s])){const n=Math.max(0,i-l),u=s-Math.max(0,l-i);if(0===u)continue;const p=I(h,f,n,u);this.addClassToHast(p[1],o);const y=p.filter(Boolean);t.splice(c,1,...y),c+=y.length-1}l+=f.value.length}}}function W(t,n){return t[0]<=n[1]&&t[1]>=n[0]}function I(t,n,i,s){const o=n.value,l=n=>{return i=t,s={children:[{type:"text",value:n}]},Object.assign({},i,{properties:Object.assign({},i.properties)},s);var i,s};return[i>0?l(o.slice(0,i)):void 0,l(o.slice(i,i+s)),i+s<o.length?l(o.slice(i+s)):void 0]}const J=/\s*\[!code word:((?:\\.|[^:\]])+)(:\d+)?\]/,B=/\\(.)/g;function q(t={}){const{classActiveWord:n="highlighted-word",classActivePre:i,classActiveCode:s}=t;return y("@shikijs/transformers:notation-highlight-word",J,function([t,o,l],c,h,f,u){const p=l?Number.parseInt(l.slice(1),10):f.length;o=o.replace(B,"$1");for(let t=u;t<Math.min(u+p,f.length);t++)L.call(this,f[t],h,o,n);return i&&this.addClassToHast(this.pre,i),s&&this.addClassToHast(this.code,s),!0},t.matchAlgorithm)}function z(t={}){const{removeEmptyLines:n=!0}=t;return{name:"@shikijs/transformers:remove-comments",preprocess(t,n){if(!0!==n.includeExplanation&&"scopeName"!==n.includeExplanation)throw new Error("`transformerRemoveComments` requires `includeExplanation` to be set to `true` or `'scopeName'`")},tokens(t){const i=[];for(const s of t){const t=[];let o=!1;for(const n of s)n.explanation?.some(t=>t.scopes.some(t=>t.scopeName.startsWith("comment")))?o=!0:t.push(n);n&&o&&t.every(t=>!t.content.trim())||i.push(t)}return i}}}function D(){return{name:"@shikijs/transformers:remove-line-break",code(t){t.children=t.children.filter(t=>!("text"===t.type&&"\n"===t.value))}}}function F(){return{name:"@shikijs/transformers:remove-notation-escape",code:t=>((function t(n){if("text"===n.type)n.value=n.value.replace("[\\!code","[!code");else if("children"in n)for(const i of n.children)t(i)})(t),t)}}const G=/\{indent:(\d+|false)\}/,K=/[^ \t]/;function Q(t={}){return{name:"@shikijs/transformers:render-indent-guides",code(n){const i=Number(this.options.meta?.indent??this.options.meta?.__raw?.match(G)?.[1]??t.indent??2);if(Number.isNaN(i)||i<=0)return n;const s=new RegExp(` {${i}}| {0,${i-1}}\t| {1,}$`,"g"),o=[];let l=0;for(const t of n.children){if("element"!==t.type)continue;const n=t.children[0];if("element"!==n?.type||"text"!==n?.children[0]?.type){o.push([t,l]);continue}const c=n.children[0],h=c.value.split(K,1)[0],f=[];for(const t of h.matchAll(s)){const n=t.index,i=n+t[0].length;f.push([n,i])}for(const[t,n]of o)t.children.unshift(...Array.from({length:Math.min(f.length,n+1)},(t,n)=>({type:"element",tagName:"span",properties:{class:"indent",style:`--indent-offset: ${n*i}ch;`},children:[]})));o.length=0,l=f.length,f.length&&(t.children.unshift(...f.map(([t,n])=>({type:"element",tagName:"span",properties:{class:"indent"},children:[{type:"text",value:c.value.slice(t,n)}]}))),c.value=c.value.slice(f.at(-1)[1]))}return n}}}function U(t={}){const{classLineNumber:n="line-number",start:i=1}=t;return{name:"@shikijs/transformers:render-line-number",line(t,s){if("span"===t.tagName){const o=i+s-1;t.children.unshift({type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:String(o)}]})}}}}function V(t){return"\t"===t}function X(t){return" "===t||"\t"===t}function Y(t){const n=[];let i="";function s(){i.length&&n.push(i),i=""}return t.forEach((o,l)=>{V(o)||X(o)&&(X(t[l-1])||X(t[l+1]))?(s(),n.push(o)):i+=o}),s(),n}function Z(t,n,i=!0){if("all"===n)return t;let s=0,o=0;if("boundary"===n||"leading"===n)for(let n=0;n<t.length&&X(t[n]);n++)s++;if("boundary"===n||"trailing"===n)for(let n=t.length-1;n>=0&&X(t[n]);n--)o++;const l=t.slice(s,t.length-o);return[...t.slice(0,s),...i?Y(l):[l.join("")],...t.slice(t.length-o)]}const ee=/([ \t])/;function te(t={}){const n={" ":t.classSpace??"space","\t":t.classTab??"tab"},i=t.position??"all",s=Object.keys(n);return{name:"@shikijs/transformers:render-whitespace",root(t){const o=t.children[0];("pre"===o.tagName?o.children[0]:{children:[t]}).children.forEach(t=>{if("element"!==t.type&&"root"!==t.type)return;const o=t.children.filter(t=>"element"===t.type),l=o.length-1;t.children=t.children.flatMap(t=>{if("element"!==t.type)return t;const c=o.indexOf(t);if("boundary"===i&&0!==c&&c!==l)return t;if("trailing"===i&&c!==l)return t;if("leading"===i&&0!==c)return t;const h=t.children[0];if("text"!==h.type||!h.value)return t;const f=Z(h.value.split(ee).filter(t=>t.length),"boundary"===i&&c===l&&0!==l?"trailing":i,"trailing"!==i&&"leading"!==i);return f.length<=1?t:f.map(i=>{const o=Object.assign({},t,{properties:Object.assign({},t.properties)});return o.children=[{type:"text",value:i}],s.includes(i)&&(this.addClassToHast(o,n[i]),delete o.properties.style),o})})})}}}function ne(t={}){const{classPrefix:n="__shiki_",classSuffix:i="",classReplacer:s=t=>t}=t,o=new Map;function l(t){return Object.entries(t).map(([t,n])=>`${t}:${n}`).join(";")}function c(t){const c="string"==typeof t?t:l(t);let h=n+re(c)+i;return h=s(h),o.has(h)||o.set(h,"string"==typeof t?t:Object.assign({},t)),h}return{name:"@shikijs/transformers:style-to-class",pre(t){if(!t.properties.style)return;const n=c(t.properties.style);delete t.properties.style,this.addClassToHast(t,n)},span(t){if(!t.properties.style)return;const n=c(t.properties.style);delete t.properties.style,this.addClassToHast(t,n)},tokens(t){for(const n of t)for(const t of n){if(!t.htmlStyle)continue;const n=c(t.htmlStyle);t.htmlStyle={},t.htmlAttrs||={},t.htmlAttrs.class?t.htmlAttrs.class+=` ${n}`:t.htmlAttrs.class=n}},getClassRegistry:()=>o,getCSS(){let t="";for(const[n,i]of o.entries())t+=`.${n}{${"string"==typeof i?i:l(i)}}`;return t},clearRegistry(){o.clear()}}}function re(t,n=0){let i=3735928559^n,s=1103547991^n;for(let n,o=0;o<t.length;o++)n=t.charCodeAt(o),i=Math.imul(i^n,2654435761),s=Math.imul(s^n,1597334677);return i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(s^s>>>13,3266489909),s=Math.imul(s^s>>>16,2246822507),s^=Math.imul(i^i>>>13,3266489909),(4294967296*(2097151&s)+(i>>>0)).toString(36).slice(0,6)}},1293,[]);
195
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return`--${"token"===t?"diffs-token":"diffs"}-`}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"formatCSSVariablePrefix",{enumerable:!0,get:function(){return t}})},1294,[]);
196
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getHighlighterThemeStyles",{enumerable:!0,get:function(){return n}});var o=r(d[0]),l=r(d[1]),t=r(d[2]);function n({theme:n=o.DEFAULT_THEMES,highlighter:b,prefix:c}){let s="";if("string"==typeof n){const o=b.getTheme(n),$=(0,t.normalizeThemeColors)(o);s+=`color:${$.fg};`,s+=`background-color:${$.bg};`,s+=`${(0,l.formatCSSVariablePrefix)("global")}fg:${$.fg};`,s+=`${(0,l.formatCSSVariablePrefix)("global")}bg:${$.bg};`,s+=f(o,c)}else{let o=b.getTheme(n.dark),c=(0,t.normalizeThemeColors)(o);s+=`${(0,l.formatCSSVariablePrefix)("global")}dark:${c.fg};`,s+=`${(0,l.formatCSSVariablePrefix)("global")}dark-bg:${c.bg};`,s+=f(o,"dark"),o=b.getTheme(n.light),c=(0,t.normalizeThemeColors)(o),s+=`${(0,l.formatCSSVariablePrefix)("global")}light:${c.fg};`,s+=`${(0,l.formatCSSVariablePrefix)("global")}light-bg:${c.bg};`,s+=f(o,"light")}return s}function f(o,t){t=null!=t?`${t}-`:"";let n="";const f=o.colors?.["gitDecoration.addedResourceForeground"]??o.colors?.["terminal.ansiGreen"];null!=f&&(n+=`${(0,l.formatCSSVariablePrefix)("global")}${t}addition-color:${f};`);const b=o.colors?.["gitDecoration.deletedResourceForeground"]??o.colors?.["terminal.ansiRed"];null!=b&&(n+=`${(0,l.formatCSSVariablePrefix)("global")}${t}deletion-color:${b};`);const c=o.colors?.["gitDecoration.modifiedResourceForeground"]??o.colors?.["terminal.ansiBlue"];return null!=c&&(n+=`${(0,l.formatCSSVariablePrefix)("global")}${t}modified-color:${c};`),n}},1295,[1148,1294,1296]);
197
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"colorUtils",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"normalizeThemeColors",{enumerable:!0,get:function(){return o.normalizeThemeColors}});var t=r(d[0]),o=r(d[1]);const n={compositeOverBg:t.compositeOverBg,contrastRatio:t.contrastRatio,deriveMutedFg:t.deriveMutedFg,hoverWouldEraseText:t.hoverWouldEraseText,isDarkSurface:t.isDarkSurface,isFullyTransparent:t.isFullyTransparent,pickReadableForeground:t.pickReadableForeground,relativeLuminance:t.relativeLuminance,surfacesMatch:t.surfacesMatch}},1296,[1297,1298]);
198
- __d(function(_g,_r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MIN_MUTED_RATIO",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"MIN_READABLE_RATIO",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"compositeOverBg",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"contrastRatio",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"deriveMutedFg",{enumerable:!0,get:function(){return O}}),Object.defineProperty(e,"hoverWouldEraseText",{enumerable:!0,get:function(){return g}}),Object.defineProperty(e,"isDarkSurface",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"isFullyTransparent",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"parseHexRgba",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"pickReadableForeground",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"relativeLuminance",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"surfacesMatch",{enumerable:!0,get:function(){return p}});const n=3,t=4.5,r=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,u=/^0(?:\.0+)?%?$/;function l(n){const t=n.indexOf("(");if(t<=0||!n.endsWith(")"))return;const r=n.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(r))return;const u=n.slice(t+1,-1).trim();if(0===u.length)return;const l=u.lastIndexOf("/");if(-1!==l)return u.slice(l+1).trim();if(/^(?:rgba|hsla)$/i.test(r)){const n=u.split(",");if(4===n.length)return n[3]?.trim()}}function o(n){const t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(n.trim());if(null==t)return null;const r=t[1];let u,l=1;return 3===r.length?u=r.split("").map(n=>n+n).join(""):6===r.length?u=r:(u=r.slice(0,6),l=parseInt(r.slice(6,8),16)/255),[parseInt(u.slice(0,2),16),parseInt(u.slice(2,4),16),parseInt(u.slice(4,6),16),l]}function c(n){if(null==n)return null;const t=o(n);if(null==t)return null;const r=t[0]/255,u=t[1]/255,l=t[2]/255,c=n=>n<=.03928?n/12.92:((n+.055)/1.055)**2.4;return.2126*c(r)+.7152*c(u)+.0722*c(l)}function f(n,t){const[r,u]=n>t?[n,t]:[t,n];return(r+.05)/(u+.05)}function s(n,t){if(null==t)return;const r=o(n),u=o(t);if(null==r||null==u)return;const[l,c,f,s]=r,[a,b,p]=u;return"#"+[Math.round(l*s+a*(1-s)),Math.round(c*s+b*(1-s)),Math.round(f*s+p*(1-s))].map(n=>n.toString(16).padStart(2,"0")).join("")}function a(n){if(null==n)return!1;const t=n.trim().toLowerCase();if("transparent"===t)return!0;if(r.test(t))return!0;const o=l(t);return null!=o&&u.test(o)}function b(n,t){const r=c(n);if(null!=r)return r<.4;const u=c(t);return null!=u&&u>.6}function p(n,t){if(null==n||null==t)return!1;if(n.trim().toLowerCase()===t.trim().toLowerCase())return!0;const r=c(n),u=c(t);return null!=r&&null!=u&&Math.abs(r-u)<.06}function g(n,t,r){if(null==t||null==r)return!1;const u=c(n),l=c(t),o=c(r);return null!=u&&null!=l&&null!=o&&Math.abs(u-o)<Math.abs(u-l)}function h(n,t){const r=c(n),u=t.find(n=>null!=n&&""!==n);if(null==r)return u;let l,o=-1;for(const n of t){if(null==n||""===n)continue;const t=c(n);if(null==t)continue;const u=f(r,t);if(u>=3)return n;u>o&&(l=n,o=u)}return l??u}function O(n,t){if(null==t)return n;const r=o(n),u=o(t),l=c(t);if(null==r||null==u||null==l)return`color-mix(in srgb, ${n} 70%, ${t})`;const[s,a,b]=r,[p,g,h]=u;for(const n of[.6,.7,.8,.9]){const t="#"+[Math.round(s*n+p*(1-n)),Math.round(a*n+g*(1-n)),Math.round(b*n+h*(1-n))].map(n=>n.toString(16).padStart(2,"0")).join(""),r=c(t);if(null!=r&&f(l,r)>=4.5)return t}return n}},1297,[]);
199
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"normalizeThemeColors",{enumerable:!0,get:function(){return n}});var o=r(d[0]);const t=new WeakMap;function n(n){const s=t.get(n);if(null!=s)return s;const l=n.colors??{},f=Object.assign({},l),b=l["editor.background"]??n.bg,B=l["editor.foreground"]??n.fg,k=l["sideBar.background"]??b,v=l["sideBar.foreground"]??B;u(f,"editor.background",b),u(f,"editor.foreground",B),u(f,"sideBar.background",k),u(f,"sideBar.foreground",v),u(f,"input.background",l["input.background"]??k),u(f,"sideBarSectionHeader.foreground",l["sideBarSectionHeader.foreground"]??v),u(f,"list.activeSelectionForeground",l["list.activeSelectionForeground"]??v),u(f,"gitDecoration.addedResourceForeground",c(l["gitDecoration.addedResourceForeground"],l["terminal.ansiGreen"],l["editorGutter.addedBackground"])),u(f,"gitDecoration.modifiedResourceForeground",c(l["gitDecoration.modifiedResourceForeground"],l["terminal.ansiBlue"],l["editorGutter.modifiedBackground"])),u(f,"gitDecoration.deletedResourceForeground",c(l["gitDecoration.deletedResourceForeground"],l["terminal.ansiRed"],l["editorGutter.deletedBackground"]));const F=((0,o.isFullyTransparent)(l["list.focusOutline"])?void 0:l["list.focusOutline"])??((0,o.isFullyTransparent)(l.focusBorder)?void 0:l.focusBorder);null!=F?f["list.focusOutline"]=F:delete f["list.focusOutline"];const O=l["list.hoverBackground"];var p,R;null!=O&&(p=O,null!=(R=k)&&p.toLowerCase()===R.toLowerCase()||(0,o.hoverWouldEraseText)(O,k,v))&&delete f["list.hoverBackground"];const j=Object.freeze(Object.assign({},n,{colors:Object.freeze(f)}));return t.set(n,j),j}function u(o,t,n){null!=n&&""!==n&&(o[t]=n)}function c(...o){for(const t of o)if(null!=t&&""!==t)return t}},1298,[1297]);
200
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n){let t=n.children[0];for(;null!=t;){if("element"===t.type&&"code"===t.tagName)return t.children;t="children"in t?t.children[0]:null}throw console.error(n),new Error("getLineNodes: Unable to find children")}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getLineNodes",{enumerable:!0,get:function(){return n}})},1299,[]);
201
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"renderFileWithHighlighter",{enumerable:!0,get:function(){return u}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]),l=r(d[4]),f=r(d[5]),c=r(d[6]);const h={forcePlainText:!1};function u(u,T,{theme:p,tokenizeMaxLineLength:y,useTokenTransformer:L},{forcePlainText:b,startingLine:k,totalLines:P,lines:S}=h){b?(k??=0,P??=1/0):(k=0,P=1/0);const F=k>0||P<1/0,{state:z,transformers:C}=(0,s.createTransformerWithState)(L),M=b?"text":u.lang??(0,n.getFiletypeFromFileName)(u.name),V="string"==typeof p?T.getTheme(p).type:void 0,_=(0,f.getHighlighterThemeStyles)({theme:p,highlighter:T});z.lineInfo=t=>({type:"context",lineIndex:t-1+k,lineNumber:t+k});const j="string"==typeof p?{lang:M,theme:p,transformers:C,defaultColor:!1,cssVariablePrefix:(0,l.formatCSSVariablePrefix)("token"),tokenizeMaxLineLength:y,tokenizeTimeLimit:0}:{lang:M,themes:p,transformers:C,defaultColor:!1,cssVariablePrefix:(0,l.formatCSSVariablePrefix)("token"),tokenizeMaxLineLength:y,tokenizeTimeLimit:0},v=(0,c.getLineNodes)(T.codeToHast((F?x(S??(0,t.linesFromFileContents)(u.contents),k,P):u.contents).replace(/\r(?!\n)/g,"\n"),j));const H=F?new Array(k):v;return F&&(0,o.appendItems)(H,v),{code:H,themeStyles:_,baseThemeType:V}}function x(t,n,o){if(0===t.length)return"";const s=Math.min(n+o,t.length);return t.slice(n,s).join("")}},1300,[1301,1286,1302,1291,1294,1295,1299]);
202
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"computeLineOffsets",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"countLineBreaks",{enumerable:!0,get:function(){return i}}),Object.defineProperty(e,"linesFromFileContents",{enumerable:!0,get:function(){return u}});const n=10,t=13,o=4,c=40;function f(f){const i=[0];let u=f.indexOf("\r"),l=f.indexOf("\n"),s=0,h=0;for(;-1!==u||-1!==l;){let O;if(-1!==u&&(-1===l||u<l)?l===u+1?(O=l+1,u=f.indexOf("\r",O),l=f.indexOf("\n",O)):(O=u+1,u=f.indexOf("\r",O)):(O=l+1,l=f.indexOf("\n",O)),i.push(O),++h===o){if(O-s<=c){for(let o=O;o<f.length;o++){const c=f.charCodeAt(o);c!==n&&c!==t||(c===t&&o+1<f.length&&f.charCodeAt(o+1)===n&&o++,i.push(o+1))}return i}s=O,h=0}}return i}function i(o){let c=0;for(let f=0;f<o.length;f++){const i=o.charCodeAt(f);i!==n&&i!==t||(i===t&&f+1<o.length&&o.charCodeAt(f+1)===n&&f++,c++)}return c}function u(n){const t=f(n);return Array.from({length:t.length},(o,c)=>{const f=t[c],i=t[c+1]??n.length;return n.slice(f,i)})}},1301,[]);
203
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){for(const o of n)t.push(o)}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"appendItems",{enumerable:!0,get:function(){return t}})},1302,[]);
204
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"FileRenderer",{enumerable:!0,get:function(){return O}});var t=r(d[0]),i=r(d[1]),n=r(d[2]),s=r(d[3]),h=r(d[4]),l=r(d[5]),o=r(d[6]),c=r(d[7]),u=r(d[8]),p=r(d[9]),f=r(d[10]),C=r(d[11]),R=r(d[12]),T=r(d[13]),F=r(d[14]),v=r(d[15]),y=r(d[16]),L=r(d[17]),H=r(d[18]),k=r(d[19]),A=r(d[20]),E=r(d[21]),x=r(d[22]),M=r(d[23]);function S(t,i){return null==i.cacheKey?t.file===i&&t.sourceContents===i.contents:t.cacheKey===i.cacheKey}let w=-1;var O=class{__id="file-renderer:"+ ++w;computedLang="text";lineAnnotations={};textDocumentCache=new WeakMap;editSessionActive=!1;get fileCache(){return this.renderCache?.file}constructor(i={theme:t.DEFAULT_THEMES},n=k.getLineAnnotationName,l,o){this.options=i,this.annotationSlotName=n,this.onRenderUpdate=l,this.workerManager=o,!0!==o?.isWorkingPool()&&(this.highlighter=(0,s.areThemesAttached)(i.theme??t.DEFAULT_THEMES)?(0,h.getHighlighterIfLoaded)():void 0)}setOptions(t){this.options=t}mergeOptions(t){this.options=Object.assign({},this.options,t)}setLineAnnotations(t){this.lineAnnotations={};for(const i of t){const t=this.lineAnnotations[i.lineNumber]??[];this.lineAnnotations[i.lineNumber]=t,t.push(i)}}cleanUp(){this.endEditSession(),this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}beginEditSession(t,i){const{editSessionActive:n,renderCache:s}=this;if(this.editSessionActive=!0,n||(this.pendingHighlightResult=void 0),this.file=t,null==s)return;if(n&&s.file===t)return;if(n)return this.clearRenderCache(),this.lineCache=void 0,void(this.textDocumentCache=new WeakMap);const{options:h}=this.getRenderOptions(t),o=s.file===t,c=null!=i&&(0,l.areFileTargetsEqual)(s.file,i),{result:u}=s;if(!s.highlighted||null==u||!(0,f.areFileRenderOptionsEqual)(s.options,h)||!o&&!c)return this.clearRenderCache(),this.lineCache=void 0,void(this.textDocumentCache=new WeakMap);if(o)return;this.renderCache=Object.assign({},s,{file:t,result:Object.assign({},u,{code:[...u.code]})});const{lineCache:p}=this;null!=p&&null!=i&&S(p,i)?this.lineCache={cacheKey:void 0,file:t,sourceContents:t.contents,lines:p.lines}:this.lineCache=void 0}endEditSession(t){if(this.editSessionActive=!1,this.pendingHighlightResult=void 0,null==this.file)return this.clearRenderCache(),this.lineCache=void 0,void(this.textDocumentCache=new WeakMap);const{renderCache:i}=this;null!=t&&null!=i&&i.file!==t&&(0,l.areFileTargetsEqual)(i.file,t)&&(i.file=t)}editorRenderReady(){return!0===this.renderCache?.options.useTokenTransformer&&this.renderCache.highlighted&&null!=this.renderCache.result}recycle(){this.editSessionActive?(null!=this.renderCache&&(this.renderCache.renderRange=void 0),this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0):(this.clearRenderCache(),this.lineCache=void 0,this.textDocumentCache=new WeakMap),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.file=void 0}clearRenderCache(){this.pendingStructuralRows=void 0,this.renderCache=void 0,this.pendingHighlightResult=void 0}hydrate(t){this.file=t;const{options:i}=this.getRenderOptions(t),n=b(this.getOrCreateLineCache(t).length,this.getTokenizeMaxLength());let s=this.workerManager?.getFileResultCache(t);null==s||(0,f.areFileRenderOptionsEqual)(i,s.options)||(s=void 0),this.renderCache??={file:t,hydrated:!0,options:i,highlighted:!n&&!(0,E.isFilePlainText)(t),result:n?void 0:s?.result,renderRange:void 0},this.editSessionActive||!0!==this.workerManager?.isWorkingPool()?null==this.highlighter&&(this.computedLang=t.lang??(0,L.getFiletypeFromFileName)(t.name),this.initializeHighlighter()):null!=this.renderCache.result||n||this.workerManager.highlightFileAST(this,t)}getLocalHighlightTheme(){return this.workerManager?.getFileRenderOptions().theme??this.options.theme??t.DEFAULT_THEMES}getEffectiveCodeOptions(){const t=!0===this.workerManager?.isWorkingPool()?this.workerManager.getFileRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:t?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(t){const i=(()=>{if(!0===this.workerManager?.isWorkingPool()){const t=this.workerManager.getFileRenderOptions();return this.editSessionActive&&!0!==t.useTokenTransformer?Object.assign({},t,{useTokenTransformer:!0}):t}const{tokenizeMaxLineLength:t=1e3}=this.options;return{theme:this.getLocalHighlightTheme(),useTokenTransformer:this.editSessionActive||!0===this.options.useTokenTransformer,tokenizeMaxLineLength:t}})(),{renderCache:n}=this;return null==n?.result?{options:i,forceHighlight:!0}:(0,l.areFileTargetsEqual)(t,n.file)&&(0,f.areFileRenderOptionsEqual)(i,n.options)?{options:i,forceHighlight:!1}:{options:i,forceHighlight:!0}}getFileForNextRender(t){const{options:i}=this.getRenderOptions(t);if(null!=this.getReadyRenderResult(t,i))return t;const{renderCache:n}=this;if(null==n)return t;if((0,l.areFileTargetsEqual)(n.file,t))return n.file;const s=(0,R.linesFromFileContents)(t.contents),h=0===t.contents.length||(0,E.isFilePlainText)(t)||b(s.length,this.getTokenizeMaxLength());return this.canRenderFile(t,i,h)?t:n.file}canRenderFile(t,i,n){const{renderCache:h}=this;return!(null!=h&&!(0,l.areFileTargetsEqual)(h.file,t))||(n?null==h.result&&!0!==h.hydrated||!0===this.workerManager?.isWorkingPool()||null!=this.highlighter&&(0,s.areThemesAttached)(i.theme):null==h.result&&!0!==h.hydrated||(this.editSessionActive||!0!==this.workerManager?.isWorkingPool()?null!=this.highlighter&&(0,s.areThemesAttached)(i.theme):!h.highlighted))}getOrCreateLineCache(t){let{lineCache:i}=this;return null!=i&&S(i,t)||(i={cacheKey:t.cacheKey,file:t,sourceContents:t.contents,lines:(0,R.linesFromFileContents)(t.contents)}),this.lineCache=i,i.lines}getLineCount(t){const i=this.getOrCreateLineCache(t);return this.textDocumentCache.get(t)?.lineCount??i.length}updateRenderCache(t,i,n=!1){this.pendingStructuralRows=void 0;const{renderCache:s}=this;if(null==s)return;const{file:h,result:l}=s;if(null==l)return;const o=n?new Map:void 0;this.pendingStructuralRows=o;const c=null!=this.lineCache&&S(this.lineCache,h)?this.lineCache:void 0;for(const[i,n]of t){if(null==o&&null!=c&&i<c.lines.length){const t=n.map(t=>t[2]).join("");c.lines[i]=(0,p.applyLineTextWithNewline)(c.lines[i]??"",t)}const t={type:"element",tagName:"div",properties:{"data-line":i+1,"data-line-type":"context","data-line-index":i},children:n.map(([t,i,n])=>0===t&&""===i?""===n?{type:"element",tagName:"br",properties:{},children:[]}:{type:"text",value:n}:{type:"element",tagName:"span",properties:{"data-char":t,style:`color:${i};`},children:[{type:"text",value:n}]})};null!=o?o.set(i,t):l.code[i]=t}l.baseThemeType=i,s.isDirty=!0,null==o&&null!=c&&(h.contents=c.lines.join(""),c.sourceContents=h.contents)}applyDocumentChange(t){const{pendingStructuralRows:i,renderCache:n}=this;this.pendingStructuralRows=void 0;const s=this.file??n?.file;if(null==s)return;const h=n?.result,l=null!=this.lineCache&&S(this.lineCache,s)?this.lineCache.lines:(0,R.linesFromFileContents)(s.contents),o=(0,R.linesFromFileContents)(t.getText());if(null!=h&&l.length!==o.length){const s=Math.min(l.length,o.length);let c=0;for(;c<s&&l[c]===o[c];)c++;let u=0;for(;u<s-c&&l[l.length-1-u]===o[o.length-1-u];)u++;const p=h.code;h.code=new Array(o.length);for(let t=0;t<c;t++)h.code[t]=p[t];for(let t=0;t<u;t++)h.code[o.length-1-t]=p[l.length-1-t];if(void 0!==i)for(const[t,n]of i)t<o.length&&(h.code[t]=n);for(let i=c;i<o.length-u;i++)h.code[i]??={type:"element",tagName:"div",properties:{"data-line":i+1,"data-line-type":"context","data-line-index":i},children:[{type:"element",tagName:"span",properties:{"data-char":0},children:[{type:"text",value:t.getLineText(i)}]}]};for(let t=0;t<h.code.length;t++){const i=h.code[t];"element"===i?.type&&(i.properties["data-line"]=t+1,i.properties["data-line-index"]=t)}null!=n&&(n.isDirty=!0)}const c=t.getText();this.lineCache={cacheKey:s.cacheKey,file:s,sourceContents:c,lines:o},this.textDocumentCache.set(s,t),s.contents=c}renderFile(n=this.file,o=t.DEFAULT_RENDER_RANGE){if(this.file=n,null==n)return void(this.pendingHighlightResult=void 0);let{options:c,forceHighlight:u}=this.getRenderOptions(n);const p=this.getReadyRenderResult(n,c);this.pendingHighlightResult=void 0,null!=p&&(this.renderCache=Object.assign({},p,{file:n,renderRange:void 0}),u=!1),this.renderCache??={file:n,highlighted:!1,options:c,result:void 0,renderRange:void 0};const f=this.getOrCreateLineCache(n),R=n.contents.length>0,T=!R||(0,E.isFilePlainText)(n)||b(f.length,this.getTokenizeMaxLength()),F=this.canRenderFile(n,c,T),v=!(0,l.areFileTargetsEqual)(n,this.renderCache.file),y=!(0,C.areRenderRangesEqual)(this.renderCache.renderRange,o);if(this.editSessionActive||!0!==this.workerManager?.isWorkingPool()){this.computedLang=n.lang??(0,L.getFiletypeFromFileName)(n.name),this.highlighter??=(0,h.getHighlighterIfLoaded)();const t=null!=this.highlighter&&(0,s.areThemesAttached)(c.theme),l=null!=this.highlighter&&(0,i.areLanguagesAttached)(this.computedLang),o=!T&&l;if(F&&null!=this.highlighter&&t&&(u||T||!this.renderCache.highlighted&&o||null==this.renderCache.result)){const{result:t,options:i}=this.renderFileWithHighlighter(n,this.highlighter,T||!l);this.renderCache={file:n,options:i,highlighted:o,result:t,renderRange:void 0}}t&&(T||l)||this.asyncHighlight(n).then(({result:t,options:i})=>{this.applyHighlightResult(n,t,i,!T)})}else{const t=null==this.renderCache.result&&this.renderCache.highlighted&&!T&&!v&&(0,A.isDefaultRenderRange)(o);F&&!t&&(T||null==this.renderCache.result||!this.renderCache.highlighted&&(v||y))&&(this.renderCache.file=n,this.renderCache.options=c,this.renderCache.highlighted=!1,(null==this.renderCache.result||v||y||u)&&(this.renderCache.result=this.workerManager.getPlainFileAST(n,o.startingLine,o.totalLines,f)),this.renderCache.renderRange=o),T||!R||this.renderCache.highlighted&&!u||this.workerManager.highlightFileAST(this,n)}return null!=this.renderCache.result?this.processFileResult(this.renderCache.file,o,this.renderCache.result):void 0}async asyncRender(i,n=t.DEFAULT_RENDER_RANGE){this.file=i;const{result:s}=await this.asyncHighlight(i);return this.processFileResult(i,n,s)}async asyncHighlight(t){const s=b(this.getOrCreateLineCache(t).length,this.getTokenizeMaxLength());this.computedLang=s?"text":t.lang??(0,L.getFiletypeFromFileName)(t.name);const h=null!=this.highlighter&&(0,u.hasResolvedThemes)((0,n.getThemes)(this.getLocalHighlightTheme())),l=s||null!=this.highlighter&&(0,i.areLanguagesAttached)(this.computedLang);return null!=this.highlighter&&h&&l||(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(t,this.highlighter,s)}renderFileWithHighlighter(t,i,n=!1){const{options:s}=this.getRenderOptions(t);return{result:(0,x.renderFileWithHighlighter)(t,i,s,{forcePlainText:n}),options:s}}processFileResult(t,i,{code:n,themeStyles:s,baseThemeType:h}){const l=this.getLineCount(t),{disableFileHeader:u=!1}=this.options,p=[],f=(0,c.createGutterWrapper)(),C=Math.min(i.startingLine+i.totalLines,l);let R=0;const F=(0,o.shouldRenderFileAnnotations)(i)?(0,o.getFileAnnotations)(this.lineAnnotations):void 0;null!=F&&(f.children.push((0,c.createGutterGap)("context","annotation",1)),p.push((0,T.createAnnotationElement)({type:"annotation",hunkIndex:-1,lineIndex:-1,annotations:F.map(t=>this.annotationSlotName(t))})),R++);for(let s=i.startingLine;s<C;s++){const i=s+1,h=n[s];if(null==h){const n="FileRenderer.processFileResult: Line doesnt exist";throw console.error(n,{name:t.name,lineIndex:s,lineNumber:i}),new Error(n)}f.children.push((0,c.createGutterItem)("context",i,`${s}`)),p.push(h),R++;const l=this.lineAnnotations[i];null!=l&&(f.children.push((0,c.createGutterGap)("context","annotation",1)),p.push((0,T.createAnnotationElement)({type:"annotation",hunkIndex:0,lineIndex:i,annotations:l.map(t=>this.annotationSlotName(t))})),R++)}return f.properties.style=`grid-row: span ${R}`,{file:t,gutterAST:f.children??[],contentAST:p,preAST:this.createPreElement(l),headerAST:u?void 0:this.renderHeader(t),totalLines:l,rowCount:R,themeStyles:s,baseThemeType:h,bufferBefore:i.bufferBefore,bufferAfter:i.bufferAfter,css:""}}renderHeader(t){const{headerRenderMode:i="default",stickyHeader:n=!1}=this.options;return(0,v.createFileHeaderElement)({fileOrDiff:t,mode:i,stickyHeader:n})}renderFullHTML(t){return(0,M.toHtml)(this.renderFullAST(t))}renderFullAST(t,i=[]){return i.push((0,c.createHastElement)({tagName:"code",children:this.renderCodeAST(t),properties:{"data-code":""}})),Object.assign({},t.preAST,{children:i})}renderCodeAST(t){const i=(0,c.createGutterWrapper)();return i.children=t.gutterAST,i.properties.style=`grid-row: span ${t.rowCount}`,[i,(0,F.createContentColumn)(t.contentAST,t.rowCount)]}renderPartialHTML(t,i=!1){return i?(0,M.toHtml)((0,c.createHastElement)({tagName:"code",children:t,properties:{"data-code":""}})):(0,M.toHtml)(t)}async initializeHighlighter(){return this.highlighter=await(0,h.getSharedHighlighter)((0,H.getHighlighterOptions)(this.computedLang,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}onHighlightSuccess(t,i,n,s=!0){this.editSessionActive||this.applyHighlightResult(t,i,n,s)}applyHighlightResult(t,i,n,s=!0){const{file:h,renderCache:o}=this;null!=h&&null!=o&&(0,l.areFileTargetsEqual)(t,h)&&(0,f.areFileRenderOptionsEqual)(n,this.getRenderOptions(h).options)&&(null!=o.result&&o.highlighted&&(0,f.areFileRenderOptionsEqual)(o.options,n)&&(0,l.areFileTargetsEqual)(o.file,h)||(this.pendingHighlightResult={file:h,options:n,highlighted:s,result:i},this.onRenderUpdate?.()))}getMatchingWorkerResultCache(t,i){if(this.editSessionActive)return;const n=this.workerManager?.getFileResultCache(t);return null!=n&&(0,f.areFileRenderOptionsEqual)(i,n.options)?n:void 0}getReadyRenderResult(t,i){const{pendingHighlightResult:n}=this;if(null!=n&&(0,l.areFileTargetsEqual)(n.file,t)&&(0,f.areFileRenderOptionsEqual)(n.options,i))return n;const s=this.getMatchingWorkerResultCache(t,i);return null==s||this.hasHighlightedRenderCache(t,i)?void 0:Object.assign({file:t,highlighted:!0},s)}hasHighlightedRenderCache(t,i){const{renderCache:n}=this;return null!=n?.result&&n.highlighted&&(0,l.areFileTargetsEqual)(t,n.file)&&(0,f.areFileRenderOptionsEqual)(i,n.options)}onHighlightError(t){console.error(t)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}createPreElement(t){const{disableLineNumbers:i=!1,overflow:n="scroll"}=this.options;return(0,y.createPreElement)({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:i,overflow:n,split:!1,totalLines:t})}};function b(t,i){return t>i}},1303,[1148,1150,1232,1234,1252,1304,1305,1260,1279,1306,1280,1281,1301,1282,1307,1284,1285,1286,1287,1288,1289,1308,1300,1265]);
205
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n,t){return null!=n?.cacheKey||null!=t?.cacheKey?n?.cacheKey===t?.cacheKey:n?.contents===t?.contents&&n?.name===t?.name&&n?.lang===t?.lang}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areFileTargetsEqual",{enumerable:!0,get:function(){return n}})},1304,[]);
206
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"FILE_ANNOTATION_DOM_KEY",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"FILE_ANNOTATION_HUNK_INDEX",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"FILE_ANNOTATION_LINE_INDEX",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"FILE_ANNOTATION_LINE_NUMBER",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"getFileAnnotations",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"includesFileAnnotations",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"shouldRenderFileAnnotations",{enumerable:!0,get:function(){return l}});const n=0,t=-1,u=-1,o="-1,-1";function c(n){return n?.some(n=>0===n.lineNumber)??!1}function f(n){const t=n[0];return null!=t&&t.length>0?t:void 0}function l(n){return 0===n.startingLine&&n.totalLines>0}},1305,[]);
207
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n,t){return n.endsWith("\r\n")?t+"\r\n":n.endsWith("\r")?t+"\r":n.endsWith("\n")?t+"\n":t}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"applyLineTextWithNewline",{enumerable:!0,get:function(){return n}})},1306,[]);
208
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createContentColumn",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n,o){return(0,t.createHastElement)({tagName:"div",children:n,properties:{"data-content":"",style:`grid-row: span ${o}`}})}},1307,[1260]);
209
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"isFilePlainText",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){return"text"===(n.lang??(0,t.getFiletypeFromFileName)(n.name))}},1308,[1286]);
210
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SVGSpriteSheet",{enumerable:!0,get:function(){return l}});const l="<svg data-icon-sprite aria-hidden=\"true\" width=\"0\" height=\"0\">\n <symbol id=\"diffs-icon-arrow-right-short\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-brand-github\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-chevron\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-chevrons-narrow\" viewBox=\"0 0 10 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-diff-split\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-diff-unified\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-expand\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-expand-all\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-eye-slash\" viewBox=\"0 0 16 16\">\n <path d=\"m13.47 1.47-12 12 1.06 1.06 12-12zM8 14c-.92 0-1.802-.208-2.624-.547l1.173-1.174c.476.142.963.221 1.451.221 1.66 0 3.307-.949 4.626-2.196a10.4 10.4 0 0 0 1.494-1.751A5 5 0 0 0 14.443 8a5 5 0 0 0-.323-.553 10 10 0 0 0-1.238-1.5l1.061-1.062C15.222 6.173 16 7.511 16 8c0 1.05-3.582 6-8 6\"/><path d=\"M8 11q-.084 0-.167-.005l3.162-3.162q.006.083.005.167a3 3 0 0 1-3 3M5.005 8.167l3.162-3.162a3 3 0 0 0-3.162 3.162\"/><path d=\"M8 3.5c.485 0 .97.081 1.445.227l1.168-1.169C9.794 2.212 8.915 2 8 2 3.582 2 0 6.8 0 8c0 .555.766 1.88 2.027 3.144l1.06-1.06a9.5 9.5 0 0 1-1.203-1.461 4.3 4.3 0 0 1-.345-.617L1.536 8l.003-.006c.064-.149.176-.359.345-.617a9.8 9.8 0 0 1 1.482-1.73C4.675 4.427 6.326 3.5 8 3.5\"/>\n </symbol>\n <symbol id=\"diffs-icon-file-code\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-plus\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-added\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-added-duo\" viewBox=\"0 0 16 16\">\n <path d=\"M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8\" opacity=\".2\"/><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\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-added-fill\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m0 4a.75.75 0 0 0-.75.75v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5A.75.75 0 0 0 8 4\" clip-rule=\"evenodd\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-deleted\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-deleted-duo\" viewBox=\"0 0 16 16\">\n <path d=\"M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8\" opacity=\".2\"/><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\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-deleted-fill\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M4.75 7.25a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5z\" clip-rule=\"evenodd\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-diffstat\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-diffstat-duo\" viewBox=\"0 0 16 16\">\n <path d=\"M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8\" opacity=\".2\"/><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\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-diffstat-fill\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5zM8 3.546a.75.75 0 0 0-.75.75V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2V4.296a.75.75 0 0 0-.75-.75\" clip-rule=\"evenodd\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-extracted\" viewBox=\"0 0 16 16\">\n <path d=\"M8.25 4.25a.75.75 0 0 1 0 1.5H6.81l3.302 3.302a1.5 1.5 0 1 1-1.06 1.06L5.75 6.811V8.25a.75.75 0 0 1-1.5 0V5A.75.75 0 0 1 5 4.25z\"/><path fill-rule=\"evenodd\" d=\"M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m0 1.5c-1.613 0-2.807.089-3.704.288-.88.196-1.382.477-1.706.802-.325.324-.606.826-.802 1.706C1.588 5.193 1.5 6.387 1.5 8s.089 2.807.288 3.704c.196.88.477 1.382.802 1.706.324.325.826.606 1.706.802.897.2 2.091.288 3.704.288s2.807-.089 3.704-.288c.88-.196 1.382-.477 1.706-.802.325-.324.606-.826.802-1.706.2-.897.288-2.091.288-3.704s-.089-2.807-.288-3.704c-.196-.88-.477-1.382-.802-1.706-.324-.325-.826-.606-1.706-.802C10.807 1.588 9.613 1.5 8 1.5\" clip-rule=\"evenodd\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-extracted-duo\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8\" clip-rule=\"evenodd\" opacity=\".2\"/><path d=\"M8.25 4.25a.75.75 0 0 1 0 1.5H6.81l3.302 3.302a1.5 1.5 0 1 1-1.06 1.06L5.75 6.811V8.25a.75.75 0 0 1-1.5 0V5A.75.75 0 0 1 5 4.25z\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-extracted-fill\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M5 4.25a.75.75 0 0 0-.75.75v3.25a.75.75 0 0 0 1.5 0V6.81l3.302 3.302a1.5 1.5 0 1 0 1.06-1.06L6.811 5.75H8.25a.75.75 0 0 0 0-1.5z\" clip-rule=\"evenodd\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-ignored\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-ignored-duo\" viewBox=\"0 0 16 16\">\n <path d=\"M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8\" opacity=\".2\"/><path d=\"M11.53 4.47a.75.75 0 0 1 0 1.06l-6 6a.75.75 0 0 1-1.06-1.06l6-6a.75.75 0 0 1 1.06 0\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-ignored-fill\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m3.53 4.47a.75.75 0 0 0-1.06 0l-6 6a.75.75 0 1 0 1.06 1.06l6-6a.75.75 0 0 0 0-1.06\" clip-rule=\"evenodd\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-inlined\" viewBox=\"0 0 16 16\">\n <path d=\"M7.75 11.75a.75.75 0 0 1 0-1.5h1.44L5.887 6.948a1.5 1.5 0 1 1 1.06-1.06l3.302 3.301V7.75a.75.75 0 0 1 1.5 0V11a.75.75 0 0 1-.75.75z\"/><path fill-rule=\"evenodd\" d=\"M8 16c-6.588 0-8-1.412-8-8s1.412-8 8-8 8 1.412 8 8-1.412 8-8 8m0-1.5c1.613 0 2.807-.089 3.704-.288.88-.196 1.382-.477 1.706-.802.325-.324.606-.826.802-1.706.2-.897.288-2.091.288-3.704s-.089-2.807-.288-3.704c-.196-.88-.477-1.382-.802-1.706-.324-.325-.826-.606-1.706-.802C10.807 1.588 9.613 1.5 8 1.5s-2.807.089-3.704.288c-.88.196-1.382.477-1.706.802-.325.324-.606.826-.802 1.706C1.588 5.193 1.5 6.387 1.5 8s.089 2.807.288 3.704c.196.88.477 1.382.802 1.706.324.325.826.606 1.706.802.897.2 2.091.288 3.704.288\" clip-rule=\"evenodd\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-inlined-duo\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M8 16c-6.588 0-8-1.412-8-8s1.412-8 8-8 8 1.412 8 8-1.412 8-8 8\" clip-rule=\"evenodd\" opacity=\".2\"/><path d=\"M7.75 11.75a.75.75 0 0 1 0-1.5h1.44L5.887 6.948a1.5 1.5 0 1 1 1.06-1.06l3.302 3.301V7.75a.75.75 0 0 1 1.5 0V11a.75.75 0 0 1-.75.75z\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-inlined-fill\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8M5.5 4a1.5 1.5 0 1 0 .388 2.948l3.301 3.302H7.75a.75.75 0 0 0 0 1.5H11a.75.75 0 0 0 .75-.75V7.75a.75.75 0 0 0-1.5 0v1.44L6.948 5.887A1.5 1.5 0 0 0 5.5 4\" clip-rule=\"evenodd\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-modified\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-modified-duo\" viewBox=\"0 0 16 16\">\n <path d=\"M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8\" opacity=\".2\"/><path d=\"M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-modified-fill\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m0 5a3 3 0 1 0 0 6 3 3 0 0 0 0-6\" clip-rule=\"evenodd\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-moved\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-moved-duo\" viewBox=\"0 0 16 16\">\n <path d=\"M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8\" opacity=\".2\"/><path d=\"M8.496 4.695a.75.75 0 0 0-.051 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-.051 1.06L6.49 8.003 4.693 9.998a.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\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-moved-fill\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M8 0c6.588 0 8 1.412 8 8s-1.412 8-8 8-8-1.412-8-8 1.412-8 8-8m1.555 4.745a.75.75 0 0 0-1.11 1.01L10.486 8l-2.04 2.245a.75.75 0 0 0 1.109 1.01l2.5-2.75a.75.75 0 0 0 0-1.01zm-4 0a.75.75 0 0 0-1.11 1.01l2.043 2.248-1.796 1.995a.75.75 0 0 0 1.116 1.004l2.25-2.5a.75.75 0 0 0-.003-1.007z\" clip-rule=\"evenodd\"/>\n </symbol>\n <symbol id=\"diffs-icon-symbol-ref\" viewBox=\"0 0 16 16\">\n <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\"/>\n </symbol>\n</svg>"},1309,[]);
211
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){return t.lineNumber===n.lineNumber&&t.metadata===n.metadata}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areLineAnnotationsEqual",{enumerable:!0,get:function(){return t}})},1310,[]);
212
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){return null==t||null==n?t===n:o(t.customProperties,n.customProperties)&&t.type===n.type&&t.diffIndicators===n.diffIndicators&&t.disableBackground===n.disableBackground&&t.disableLineNumbers===n.disableLineNumbers&&t.overflow===n.overflow&&t.split===n.split&&t.totalLines===n.totalLines}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"arePrePropertiesEqual",{enumerable:!0,get:function(){return t}});const n={};function o(t=n,o=n){if(t===o)return!0;const s=Object.keys(t),u=Object.keys(o);if(s.length!==u.length)return!1;for(const n of s)if(t[n]!==o[n])return!1;return!0}},1311,[]);
213
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){const n=document.createElement("div");return n.dataset.annotationSlot="",n.slot=t,n.style.whiteSpace="normal",n}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createAnnotationWrapperNode",{enumerable:!0,get:function(){return t}})},1312,[]);
214
- __d(function(g,r,i,a,m,e,d){"use strict";function t(){const t=document.createElement("div");return t.slot="gutter-utility-slot",t.style.position="absolute",t.style.top="0",t.style.bottom="0",t.style.textAlign="center",t.style.whiteSpace="normal",t.style.touchAction="none",t}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createGutterUtilityContentNode",{enumerable:!0,get:function(){return t}})},1313,[]);
215
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createUnsafeCSSStyleNode",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(){const n=document.createElement("style");return n.setAttribute(t.UNSAFE_CSS_ATTRIBUTE,""),n}},1314,[1148]);
216
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"patchScrollbarGutterSize",{enumerable:!0,get:function(){return $}}),Object.defineProperty(_e,"wrapCoreCSS",{enumerable:!0,get:function(){return f}}),Object.defineProperty(_e,"wrapThemeCSS",{enumerable:!0,get:function(){return S}}),Object.defineProperty(_e,"wrapUnsafeCSS",{enumerable:!0,get:function(){return b}});var e,n=r(d[0]),t=r(d[1]),u=(e=t)&&e.__esModule?e:{default:e},c=r(d[2]);const o="@layer base, theme, rendered, unsafe;",l=new RegExp(`${s=n.DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY,s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*:\\s*[^;]+;`);var s;function f(e){return`${o}\n${u.default}\n@layer theme {\n ${e}\n}`}function b(e){return`${o}\n@layer unsafe {\n ${e}\n}`}function S(e,n="system",t){const u="system"===n?"":`\n color-scheme: ${n};`,l=(0,c.createMeasuredScrollbarGutterDeclaration)(t);return`${o}\n@layer rendered {\n :host {${u}\n ${l}\n ${e}\n }\n}`}function $(e,n){const t=(0,c.createMeasuredScrollbarGutterDeclaration)(n);return e.replace(l,t)}},1315,[1148,1316,1317]);
217
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t="@layer base,theme,rendered,unsafe;@layer base{:host{--diffs-font-fallback:\"SF Mono\", Monaco, Consolas, \"Ubuntu Mono\", \"Liberation Mono\", \"Courier New\", monospace;--diffs-header-font-fallback:system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif;--diffs-mixer:light-dark(#000,#fff);--diffs-gap-fallback:8px;--diffs-scrollbar-gutter-fallback:6px;--diffs-scrollbar-gutter:var(--diffs-scrollbar-gutter-override,var(--diffs-scrollbar-gutter-measured,var(--diffs-scrollbar-gutter-fallback)));--diffs-added-light:#0dbe4e;--diffs-added-dark:#5ecc71;--diffs-modified-light:#009fff;--diffs-modified-dark:#69b1ff;--diffs-deleted-light:#ff2e3f;--diffs-deleted-dark:#ff6762;--diffs-warning-light:#d5a910;--diffs-warning-dark:#ffd452;color-scheme:light dark;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);font-feature-settings:var(--diffs-font-features);--diffs-bg:light-dark(var(--diffs-light-bg,#fff),var(--diffs-dark-bg,#000));--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))));--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))));--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))));--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))));--diffs-fg:light-dark(var(--diffs-light,#000),var(--diffs-dark,#fff));--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))));--diffs-fg-conflict-marker:var(--diffs-fg-conflict-marker-override,var(--diffs-fg-number));--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)))));--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)))));--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)))));--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))));--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)));--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))));--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)));--diffs-selection-base:var(--diffs-modified-base);--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)));background-color:var(--diffs-bg);color:var(--diffs-fg);display:block}pre,code,[data-error-wrapper]{isolation:isolate;font-family:var(--diffs-font-family,var(--diffs-font-fallback));outline:none;margin:0;padding:0;display:block}pre,code{background-color:var(--diffs-bg)}code{contain:content}input,button{font-family:inherit;font-size:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box}[data-icon-sprite]{display:none}[data-diffs-header],[data-separator]{font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback))}[data-diffs-header][data-sticky]{z-index:1;background-color:var(--diffs-bg);position:sticky;top:0}[data-file-info]{color:var(--fg);background-color:color-mix(in lab, var(--bg) 98%, var(--fg));border-block:1px solid color-mix(in lab, var(--bg) 95%, var(--fg));padding:10px;font-weight:700}[data-diff],[data-file]{--diffs-grid-number-column-width:minmax(min-content, max-content);--diffs-code-grid:var(--diffs-grid-number-column-width) 1fr;&[data-dehydrated]{--diffs-code-grid:var(--diffs-grid-number-column-width) minmax(0, 1fr)}&:hover [data-code]::-webkit-scrollbar-thumb{background-color:var(--diffs-bg-context)}}@supports (-webkit-touch-callout:none){:host{--diffs-scrollbar-gutter-fallback:0px}}[data-line] span,[data-edit-prediction-suffix] span{color:light-dark(var(--diffs-token-light,var(--diffs-light)),var(--diffs-token-dark,var(--diffs-dark)));background-color:light-dark(var(--diffs-token-light-bg,inherit),var(--diffs-token-dark-bg,inherit));font-weight:light-dark(var(--diffs-token-light-font-weight,inherit),var(--diffs-token-dark-font-weight,inherit));font-style:light-dark(var(--diffs-token-light-font-style,inherit),var(--diffs-token-dark-font-style,inherit));text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit))}[data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions],[data-editor-overlay]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-computed-editor-active-line-bg:var(--diffs-computed-selected-line-bg);--diffs-computed-hovered-line-bg:var(--diffs-computed-editor-active-line-bg);--diffs-hover-mix-target:var(--diffs-bg-hover-override,var(--diffs-mixer));--diffs-line-bg:var(--diffs-computed-hovered-line-bg);color:var(--diffs-fg);background-color:var(--diffs-line-bg,var(--diffs-bg))}[data-line],[data-no-newline]{&[data-decoration-bg]{--mix-deco-light:92%;--mix-deco-dark:85%;&[data-decoration-bg-depth=\"2\"]{--mix-deco-light:88%;--mix-deco-dark:80%}&[data-decoration-bg-depth=\"3\"]{--mix-deco-light:85%;--mix-deco-dark:78%}--diffs-hover-mix-target:var(--diffs-decoration-bg);--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) var(--mix-deco-light), var(--diffs-decoration-bg)),color-mix(in lab, var(--diffs-bg) var(--mix-deco-dark), var(--diffs-decoration-bg)))}}[data-line-annotation],[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context);--diffs-computed-decoration-bg:var(--diffs-annotation-bg);--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[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]{--diffs-computed-decoration-bg:var(--diffs-bg-context);--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[data-gutter-buffer=merge-conflict-marker-start],[data-merge-conflict=marker-start]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))));--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[data-gutter-buffer=merge-conflict-marker-end],[data-merge-conflict=marker-end]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))));--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}[data-has-merge-conflict] [data-line-annotation],[data-has-merge-conflict] [data-gutter-buffer=annotation]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-hover-mix-target:var(--diffs-computed-editor-active-line-bg)}:where([data-background]){& [data-gutter-buffer],& [data-column-number]{--mix-light:91%;--mix-dark:85%}& [data-line],& [data-no-newline]{--mix-light:88%;--mix-dark:80%}& [data-gutter-buffer],& [data-column-number],& [data-line],& [data-no-newline]{--diffs-diff-line-mix-target:var(--diffs-bg);&[data-line-type=change-deletion]{--diffs-diff-line-mix-target:var(--diffs-bg-deletion-override,var(--diffs-deletion-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&:where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-deletion-override,var(--diffs-deletion-base));--diffs-diff-line-mix-target:var(--diffs-bg-deletion-number-override,var(--diffs-deletion-base))}--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)))}&[data-line-type=change-addition]{--diffs-diff-line-mix-target:var(--diffs-bg-addition-override,var(--diffs-addition-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&:where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--diffs-bg-addition-number-override,var(--diffs-addition-base))}--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)))}&[data-merge-conflict=current]{--diffs-diff-line-mix-target:var(--conflict-bg-current-override,var(--diffs-addition-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&:where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--conflict-bg-current-number-override,var(--diffs-addition-base))}--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)))}&[data-merge-conflict=incoming]{--diffs-diff-line-mix-target:var(--conflict-bg-incoming-override,var(--diffs-modified-base));--diffs-hover-mix-target:var(--diffs-diff-line-mix-target);&:where([data-gutter-buffer],[data-column-number]){color:var(--diffs-modified-base);--diffs-diff-line-mix-target:var(--conflict-bg-incoming-number-override,var(--diffs-modified-base))}--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)))}}}[data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline],[data-editor-overlay]{--diffs-selection-mix-target:var(--diffs-bg-selection-override,var(--diffs-selection-base));--diffs-selection-emphasis-mix-target:var(--diffs-selection-mix-target);&:where([data-editor-overlay]),&:where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline])[data-selected-line]{--mix-selection-light:82%;--mix-selection-dark:75%;--diffs-hover-mix-target:var(--diffs-selection-mix-target)}&:where([data-gutter-buffer][data-selected-line],[data-column-number]:is([data-selected-line],[data-editor-active-line])){--mix-selection-light:75%;--mix-selection-dark:60%;--diffs-selection-mix-target:var(--diffs-bg-selection-number-override,var(--diffs-selection-base));--diffs-hover-mix-target:var(--diffs-selection-mix-target)}&:where([data-line][data-selected-line]):is([data-line-type=change-addition],[data-line-type=change-deletion]){--diffs-selection-emphasis-mix-target:light-dark(color-mix(in lab, var(--diffs-diff-line-mix-target,var(--diffs-selection-mix-target)) var(--mix-selection-light), var(--diffs-selection-mix-target)),var(--diffs-selection-mix-target))}&:where([data-editor-overlay]),&[data-selected-line]{--diffs-computed-selected-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-light), var(--diffs-selection-mix-target)),color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-dark), var(--diffs-selection-mix-target)))}}[data-line][data-editor-active-line],[data-column-number][data-editor-active-line]{--diffs-computed-editor-active-line-bg:color-mix(in lab, var(--diffs-computed-selected-line-bg) var(--diffs-editor-active-line-source-mix,100%), var(--diffs-selection-emphasis-mix-target))}@media (pointer:fine){[data-line][data-hovered],[data-gutter-buffer][data-hovered],[data-column-number][data-hovered],[data-line-annotation][data-hovered],[data-no-newline][data-hovered],[data-merge-conflict][data-hovered],[data-merge-conflict-actions][data-hovered],[data-editor-overlay][data-hovered]{--diffs-computed-hovered-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-editor-active-line-bg) 97%, var(--diffs-hover-mix-target)),color-mix(in lab, var(--diffs-computed-editor-active-line-bg) 91%, var(--diffs-hover-mix-target)))}}[data-gutter-buffer][data-selected-line],[data-column-number]:is([data-selected-line],[data-editor-active-line]){color:var(--diffs-selection-number-fg)}[data-no-newline]{user-select:none;& span{opacity:.6}}[data-diff-type=split][data-overflow=scroll]{grid-template-columns:1fr 1fr;display:grid;& [data-additions]{border-left:1px solid var(--diffs-bg)}& [data-deletions]{border-right:1px solid var(--diffs-bg)}}[data-code]{grid-auto-flow:dense;grid-template-columns:var(--diffs-code-grid);overflow:var(--diffs-overflow-override,scroll) clip;overscroll-behavior-x:none;tab-size:var(--diffs-tab-size,2);padding-top:var(--diffs-gap-block,var(--diffs-gap-fallback));padding-bottom:max(0px, calc(var(--diffs-gap-block,var(--diffs-gap-fallback)) - var(--diffs-scrollbar-gutter)));scrollbar-gutter:stable;align-self:flex-start;display:grid}[data-diffs-scrollbar-measure]{opacity:0;pointer-events:none;scrollbar-gutter:auto;grid-template-columns:none;width:100px;height:100px;padding:0;position:absolute;top:-200px;left:-200px}[data-container-size]{container-type:inline-size}[data-code]::-webkit-scrollbar{width:0;height:var(--diffs-scrollbar-gutter)}[data-code]::-webkit-scrollbar-track{background:0 0}[data-code]::-webkit-scrollbar-thumb{background-color:#0000;background-clip:content-box;border:1px solid #0000;border-radius:3px}[data-code]::-webkit-scrollbar-corner{background-color:#0000}@supports ((-moz-appearance:none)){[data-code]{scrollbar-width:thin;scrollbar-color:var(--diffs-bg-context) transparent;padding-bottom:var(--diffs-gap-block,var(--diffs-gap-fallback))}}[data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]{& [data-code],&[data-overflow=wrap],&[data-dehydrated][data-diff-type=split][data-overflow=scroll]{padding-top:0}}[data-gutter]{grid-template-rows:subgrid;grid-template-columns:subgrid;z-index:3;background-color:var(--diffs-bg);grid-column:1;display:grid;position:relative;& [data-gutter-buffer],& [data-column-number]{border-right:var(--diffs-gap-style,2px solid var(--diffs-bg))}}[data-content]{grid-template-rows:subgrid;grid-template-columns:subgrid;background-color:var(--diffs-bg);grid-column:2;min-width:0;display:grid}[data-diff-type=split][data-overflow=wrap],[data-dehydrated][data-diff-type=split][data-overflow=scroll]{grid-auto-flow:dense;grid-template-columns:repeat(2, var(--diffs-code-grid));padding-block:var(--diffs-gap-block,var(--diffs-gap-fallback));display:grid;& [data-code]{display:contents}& [data-deletions]{& [data-gutter]{grid-column:1}& [data-content]{border-right:1px solid var(--diffs-bg);grid-column:2}}& [data-additions]{& [data-gutter]{border-left:1px solid var(--diffs-bg);grid-column:3}& [data-content]{grid-column:4}}}[data-dehydrated][data-diff-type=split][data-overflow=scroll] [data-content]{overflow:clip}[data-overflow=scroll] [data-gutter]{position:sticky;left:0}[data-interactive-lines] [data-line]{cursor:pointer}[data-interactive-line-numbers] [data-column-number]{cursor:pointer;touch-action:none}[data-content-buffer],[data-gutter-buffer]{user-select:none;min-height:1lh;position:relative}[data-gutter-buffer]{padding-left:2ch;padding-right:1ch;&:before{content:\"\";min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));display:block}}[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context-gutter);min-height:0}[data-gutter-buffer=buffer]{--diffs-line-bg:var(--diffs-bg-context-gutter)}[data-content-buffer]{background-position:5px 0;background-size:8px 8px;background-origin:border-box;background-image:repeating-linear-gradient(-45deg, transparent, transparent calc(3px * 1.414), var(--diffs-bg-buffer) calc(3px * 1.414), var(--diffs-bg-buffer) calc(4px * 1.414));grid-column:1}[data-separator]{box-sizing:content-box;background-color:var(--diffs-bg)}[data-separator=simple]{min-height:4px}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata],[data-separator=simple]{background-color:var(--diffs-bg-separator)}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata]{height:32px;position:relative}[data-separator-wrapper]{user-select:none;fill:currentColor;background-color:var(--diffs-bg);align-items:center;height:100%;display:flex;position:absolute;inset-inline:0}[data-content] [data-separator-wrapper]{display:none}[data-separator=metadata] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;color:var(--diffs-fg-number);white-space:nowrap;text-overflow:ellipsis;min-width:min-content;padding-inline:1ch;inset-inline:100% auto;overflow:hidden}[data-separator=line-info]{margin-block:var(--diffs-gap-block,var(--diffs-gap-fallback));& [data-separator-wrapper]{min-width:16px}}[data-separator=line-info-basic],[data-separator=metadata]{margin-block:0}[data-separator=line-info][data-separator-first]{margin-top:0}[data-separator=line-info][data-separator-last]{margin-bottom:0}[data-expand-index] [data-separator-wrapper]{grid-template-columns:32px auto;display:grid}[data-expand-index] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:32px 32px auto}[data-expand-button],[data-separator-content]{background-color:var(--diffs-bg-separator);flex:none;align-items:center;display:flex}[data-expand-index] [data-separator-content]:hover{cursor:pointer;text-decoration:underline}[data-expand-button]{cursor:pointer;min-width:32px;color:var(--diffs-fg-number);border-right:2px solid var(--diffs-bg);flex-shrink:0;justify-content:center;align-self:stretch;&:hover{color:var(--diffs-fg)}&[data-expand-all-button]{display:none}}[data-expand-down] [data-icon]{transform:scaleY(-1)}[data-separator-content]{height:100%;color:var(--diffs-fg-number);flex:auto;justify-content:flex-start;padding:0 1ch;overflow:hidden}[data-separator=line-info],[data-separator=line-info-basic]{& [data-separator-content]{user-select:none;height:100%;overflow:clip}}[data-unmodified-lines]{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;display:block;overflow:hidden}@supports (width:1cqi){[data-unified]{& [data-separator=line-info] [data-separator-wrapper]{padding-inline:var(--diffs-gap-inline,var(--diffs-gap-fallback));width:100cqi;& [data-separator-content]{border-radius:6px}}& [data-separator=line-info][data-expand-index] [data-separator-wrapper] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}}[data-gutter]{& [data-separator=line-info] [data-separator-wrapper]{padding-left:var(--diffs-gap-inline,var(--diffs-gap-fallback))}& [data-separator=line-info] [data-separator-content]{border-top-left-radius:6px;border-bottom-left-radius:6px}& [data-separator=line-info][data-expand-index] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}}[data-additions]{& [data-content] [data-separator=line-info]{background-color:var(--diffs-bg);& [data-separator-wrapper]{display:none}}& [data-gutter] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);border-top-right-radius:6px;border-bottom-right-radius:6px;height:100%;display:block;& [data-separator-content],& [data-expand-button]{display:none}}}[data-overflow=scroll] [data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{width:calc(100cqi - var(--diffs-gap-inline,var(--diffs-gap-fallback)))}[data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;margin-right:var(--diffs-gap-inline,var(--diffs-gap-fallback));border-top-right-radius:6px;border-bottom-right-radius:6px;display:block;& [data-separator-content],& [data-expand-button]{display:none}}[data-separator=line-info] [data-separator-wrapper]{& [data-expand-both],& [data-expand-down],& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}}@media (pointer:fine){[data-separator=line-info] [data-separator-wrapper]{&[data-separator-multi-button]{& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:unset}& [data-expand-down]{border-bottom-left-radius:6px;border-top-left-radius:unset}}}}}@media (pointer:coarse){[data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px 34px auto;& [data-separator-content]{grid-column:unset;grid-row:unset}}@supports (width:1cqi){[data-separator=line-info] [data-separator-wrapper]{& [data-expand-both],& [data-expand-down],& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}&[data-separator-multi-button]{& [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}& [data-expand-down]{border-bottom-left-radius:unset;border-top-left-radius:unset}}}}}@media (pointer:fine){[data-separator-wrapper][data-separator-multi-button]{grid-template-rows:50% 50%;display:grid;& [data-separator-content]{grid-area:1/2/-1;min-width:min-content}& [data-expand-button]{grid-column:1}}[data-separator=line-info] [data-separator-wrapper],[data-separator=line-info] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px auto}[data-separator=line-info-basic][data-expand-index] [data-separator-wrapper]{grid-template-columns:100% auto}[data-separator=line-info],[data-separator=line-info-basic]{& [data-separator-multi-button]{& [data-expand-up]{border-bottom:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}& [data-expand-down]{border-top:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}}}}[data-additions] [data-gutter] [data-separator-wrapper],[data-additions] [data-separator=line-info-basic] [data-separator-wrapper],[data-content] [data-separator-wrapper]{display:none}[data-line-annotation]{min-height:var(--diffs-annotation-min-height,0);z-index:2}[data-merge-conflict-actions]{z-index:2}[data-separator=custom]{grid-template-columns:subgrid;display:grid}[data-line],[data-column-number],[data-no-newline]{padding-inline:1ch;position:relative}[data-indicators=classic] [data-line]{padding-inline-start:2ch}[data-indicators=classic]{& [data-line-type=change-addition],& [data-line-type=change-deletion]{&[data-no-newline],&[data-line]{&:before{user-select:none;width:1ch;height:1lh;display:inline-block;position:absolute;top:0;left:0}}}& [data-line-type=change-addition]{&[data-line],&[data-no-newline]{&:before{content:\"+\";color:var(--diffs-addition-base)}}}& [data-line-type=change-deletion]{&[data-line],&[data-no-newline]{&:before{content:\"-\";color:var(--diffs-deletion-base)}}}}[data-indicators=bars]{& [data-line-type=change-deletion],& [data-line-type=change-addition]{&[data-column-number]{&:before{content:\"\";user-select:none;contain:strict;width:4px;height:100%;display:block;position:absolute;top:0;left:0}}}& [data-line-type=change-deletion]{&[data-column-number]{&:before{background-image:linear-gradient(0deg, var(--diffs-bg-deletion) 50%, var(--diffs-deletion-base) 50%);background-repeat:repeat;background-size:2px 2px;background-size:calc(1lh / round(1lh / 2px)) calc(1lh / round(1lh / 2px))}}}& [data-line-type=change-addition]{&[data-column-number]{&:before{background-color:var(--diffs-addition-base)}}}}[data-overflow=wrap]{& [data-line]{white-space:pre-wrap;word-break:break-word}& [data-annotation-content]{word-break:break-word}}[data-overflow=scroll] [data-line]{white-space:pre;min-height:1lh}[data-column-number]{box-sizing:content-box;text-align:right;user-select:none;color:var(--diffs-fg-number);padding-left:2ch}[data-line-number-content]{min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));z-index:1;display:inline-block;position:relative}[data-disable-line-numbers]{& [data-gutter-buffer],& [data-column-number]{min-width:4px;padding:0;&:before{min-width:0}}& [data-line-number-content]{display:none}& [data-gutter-utility-slot]{right:unset;justify-content:flex-start;left:0}&[data-indicators=bars] [data-gutter-utility-slot]{left:6px}}[data-file][data-disable-line-numbers]{& [data-gutter-buffer],& [data-column-number]{border-right:0;min-width:0}}[data-diff-span]{box-decoration-break:clone;border-radius:3px}[data-line-type=change-addition] [data-diff-span]{background-color:var(--diffs-bg-addition-emphasis)}[data-line-type=change-deletion] [data-diff-span]{background-color:var(--diffs-bg-deletion-emphasis)}[data-merge-conflict=marker-start],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator],[data-merge-conflict=marker-end]{color:var(--diffs-fg);padding-left:1ch}[data-merge-conflict=marker-start],[data-merge-conflict=marker-end]{align-items:center;display:flex;&:after{color:var(--diffs-fg-conflict-marker);font-size:.75rem;font-style:normal;line-height:1.25rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));padding-left:1ch}}[data-merge-conflict=marker-start]:after{content:\"(Current Change)\"}[data-merge-conflict=marker-end]:after{content:\"(Incoming Change)\"}[data-merge-conflict-actions-content]{min-height:1.75rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));color:var(--diffs-fg);align-items:center;gap:.25rem;padding-inline:.5rem;font-size:.75rem;line-height:1.2;display:flex}[data-merge-conflict-action]{appearance:none;color:var(--diffs-fg-number);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-style:normal}[data-merge-conflict-action]:hover{color:var(--diffs-fg)}[data-merge-conflict-action=current]:hover{color:var(--diffs-addition-base)}[data-merge-conflict-action=incoming]:hover{color:var(--diffs-modified-base)}[data-merge-conflict-action-separator]{color:var(--diffs-fg-number);opacity:.6;user-select:none}[data-diffs-header=default]{background-color:var(--diffs-bg);justify-content:space-between;align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));min-height:calc(1lh + (var(--diffs-gap-block,var(--diffs-gap-fallback)) * 3));z-index:2;flex-direction:row;padding-inline:16px;display:flex;position:relative;top:0}[data-header-content]{align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));white-space:nowrap;flex-direction:row;min-width:0;display:flex}[data-header-content] [data-prev-name],[data-header-content] [data-title]{text-overflow:ellipsis;white-space:nowrap;direction:rtl;min-width:0;overflow:hidden}[data-prev-name]{opacity:.7}[data-rename-icon]{fill:currentColor;flex-grow:0;flex-shrink:0}[data-diffs-header=default] [data-metadata]{white-space:nowrap;align-items:center;gap:1ch;display:flex}[data-diffs-header=default] [data-additions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-addition-base)}[data-diffs-header=default] [data-deletions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-deletion-base)}[data-change-icon]{fill:currentColor;flex-shrink:0}[data-change-icon=change],[data-change-icon=rename-pure],[data-change-icon=rename-changed]{color:var(--diffs-modified-base)}[data-change-icon=new]{color:var(--diffs-addition-base)}[data-change-icon=deleted]{color:var(--diffs-deletion-base)}[data-change-icon=file]{opacity:.6}[data-annotation-content]{z-index:2;isolation:isolate;white-space:normal;align-self:flex-start;min-width:0;display:flow-root;position:relative}[data-overflow=scroll] [data-annotation-content],[data-overflow=scroll] [data-merge-conflict-actions-content]{width:var(--diffs-column-content-width,auto);left:var(--diffs-column-number-width,0);position:sticky}[data-annotation-slot]{text-wrap-mode:wrap;word-break:normal;white-space-collapse:collapse}[data-gutter-utility-slot]{touch-action:none;justify-content:flex-end;display:flex;position:absolute;top:0;bottom:0;right:0}[data-utility-button]{appearance:none;cursor:pointer;width:1lh;height:1lh;font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);background-color:var(--diffs-modified-base);color:var(--diffs-bg);fill:currentColor;z-index:4;touch-action:none;border:none;border-radius:4px;justify-content:center;align-items:center;margin-right:calc(-1lh + 1ch);padding:0;display:flex;position:relative;&:before{content:\"\";display:block;position:absolute;inset:0 0 0 -4px}}[data-decoration-bar-stack]{pointer-events:none;isolation:isolate;z-index:1;background-color:var(--diffs-decoration-bar-color,transparent);box-sizing:content-box;border-left:2px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg);width:6px;position:absolute;top:0;bottom:0;right:-2px;[data-decoration-bar-depth=\"1\"] &{background-color:color-mix(in lab, var(--diffs-bg) 20%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth=\"2\"] &{background-color:color-mix(in lab, var(--diffs-bg) 45%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth=\"3\"] &{background-color:color-mix(in lab, var(--diffs-bg) 65%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-start] &{border-top-left-radius:5px;border-top-right-radius:5px}[data-decoration-bar-end] &{z-index:3;border-bottom-right-radius:5px;border-bottom-left-radius:5px}}[data-placeholder]{contain:strict}[data-error-wrapper]{padding:var(--diffs-gap-block,var(--diffs-gap-fallback)) var(--diffs-gap-inline,var(--diffs-gap-fallback));scrollbar-width:none;max-height:400px;overflow:auto;& [data-error-message]{color:var(--diffs-deletion-base);font-size:18px;font-weight:700}& [data-error-stack]{color:var(--diffs-fg-number)}}}@layer theme,rendered,unsafe;\n"},1316,[]);
218
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createMeasuredScrollbarGutterDeclaration",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"getMeasuredScrollbarGutter",{enumerable:!0,get:function(){return l}});var t=r(d[0]);let n;function l(l){if(null!=n)return n;const u=l.host;if("undefined"!=typeof HTMLElement&&u instanceof HTMLElement&&!u.isConnected)return;const o=document.createElement("div");o.setAttribute("data-code",""),o.setAttribute(t.DIFFS_SCROLLBAR_MEASURE_ATTRIBUTE,"true");const c=document.createElement("div");return c.style.position="relative",c.style.width="200%",c.style.height="200%",o.appendChild(c),l.appendChild(o),n=Math.max(o.offsetHeight-o.clientHeight,0),o.remove(),n}function u(n){const l=null==n?"var(--diffs-scrollbar-gutter-fallback)":`${n}px`;return`${t.DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY}: ${l};`}},1317,[1148]);
219
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getLineAnnotationSource",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"recordLineAnnotationSource",{enumerable:!0,get:function(){return o}});const n=new WeakMap;function t(t){const o=n.get(t);return null==o?t:o}function o(t,o){n.set(t,o)}},1318,[]);
220
- __d(function(g,r,i,a,m,e,d){"use strict";function t({code:t,pre:n,columnType:o,rowSpan:u,containerSize:c=!1}={}){return null==t&&((t=document.createElement("code")).setAttribute("data-code",""),null!=o&&t.setAttribute(`data-${o}`,""),n?.appendChild(t)),null!=u?t.style.setProperty("grid-row",`span ${u}`):t.style.removeProperty("grid-row"),c?t.setAttribute("data-container-size",""):t.removeAttribute("data-container-size"),t}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getOrCreateCodeNode",{enumerable:!0,get:function(){return t}})},1319,[]);
221
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n,t){if(null==t)return;const o=n.shadowRoot??n.attachShadow({mode:"open"});""===o.innerHTML&&(o.innerHTML=t)}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"prerenderHTMLIfNecessary",{enumerable:!0,get:function(){return n}})},1320,[]);
222
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,{type:s,diffIndicators:n,disableBackground:u,disableLineNumbers:o,overflow:b,split:f,totalLines:l,customProperties:c}){if(null!=c)for(const s in c){const n=c[s];null!=n&&t.setAttribute(s,`${n}`)}switch("diff"===s?(t.setAttribute("data-diff",""),t.removeAttribute("data-file")):(t.setAttribute("data-file",""),t.removeAttribute("data-diff")),n){case"bars":case"classic":t.setAttribute("data-indicators",n);break;case"none":t.removeAttribute("data-indicators")}return o?t.setAttribute("data-disable-line-numbers",""):t.removeAttribute("data-disable-line-numbers"),u?t.removeAttribute("data-background"):t.setAttribute("data-background",""),"diff"===s?t.setAttribute("data-diff-type",f?"split":"single"):t.removeAttribute("data-diff-type"),t.setAttribute("data-overflow",b),t.style.setProperty("--diffs-min-number-column-width-default",`${`${l}`.length}ch`),t}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"setPreNodeProperties",{enumerable:!0,get:function(){return t}})},1321,[]);
223
- __d(function(g,r,_i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"File",{enumerable:!0,get:function(){return B}});var t=r(d[0]),i=r(d[1]),n=r(d[2]),s=r(d[3]),o=r(d[4]),a=r(d[5]),l=r(d[6]),h=r(d[7]),u=r(d[8]),f=r(d[9]),c=r(d[10]),p=r(d[11]),S=r(d[12]),C=r(d[13]),v=r(d[14]),y=r(d[15]),E=r(d[16]),T=r(d[17]),b=r(d[18]),R=r(d[19]),A=r(d[20]),M=r(d[21]),H=r(d[22]),L=r(d[23]),w=r(d[24]),F=r(d[25]),P=r(d[26]),N=r(d[27]),_=r(d[28]),O=r(d[29]);r(d[30]);var x=r(d[31]);const D=[""];function I(t){const i=Object.assign({},t);return delete i.cacheKey,i}let U=-1;var B=class{static LoadedCustomComponent=!0;__id="file:"+ ++U;type="file";hasAdoptedThemeCSS=!1;mounted=!1;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;enabled=!0;constructor(i={theme:t.DEFAULT_THEMES},n,s=!1){this.options=i,this.workerManager=n,this.isContainerManaged=s,this.fileRenderer=new C.FileRenderer(i,this.getAnnotationSlotName,this.handleHighlightRender,this.workerManager),this.resizeManager=new u.ResizeManager,this.interactionManager=new h.InteractionManager("file",(0,h.pluckInteractionOptions)(i)),this.workerManager?.subscribeToThemeChanges(this)}getAnnotationSlotName=t=>(0,H.resolveEditSessionSlotName)(this.editSession?.annotations,t,p.getLineAnnotationName);handleHighlightRender=()=>{this.rerender()};rerender(){this.enabled&&null!=this.file&&this.render({file:this.file,forceRender:!0,renderRange:this.renderRange})}getTheme(){return this.workerManager?.getFileRenderOptions().theme??this.options.theme??t.DEFAULT_THEMES}getLatestFile(t=this.file){return this.editSession?.file??t}getRenderedFile(){return this.renderedFile}getLatestAnnotations(){return this.editSession?.annotations?.current??this.lineAnnotations}isNewAnnotations(t){const i=this.editSession?.annotations;return t!==this.lineAnnotations&&(null==i||t!==i.provided&&t!==i.current)}updateExternalFile(t,i){if((0,l.areFileTargetsEqual)(this.file,t))return!1;const n=null!=this.editSession;return this.file=t,n||null!=this.editor?this.installEditSession(t,n?void 0:this.editor?.__getDocumentContents(t),!0):this.editSession=void 0,null!=this.editSession?.annotations&&null!=i&&(this.lineAnnotations=i,this.editSession.annotations=(0,H.adoptEditSessionAnnotations)(i,p.getLineAnnotationName,this.editSession.annotations)),!0}installEditSession(t,i,n=!1){const s=null==i||i.name===t.name&&i.lang===t.lang&&i.contents===t.contents,o=I(i??t);this.editSession={file:o,externalReplacement:n&&s,annotations:this.editSession?.annotations??(0,H.adoptEditSessionAnnotations)(this.lineAnnotations,p.getLineAnnotationName)},this.fileRenderer.beginEditSession(o,s?t:void 0)}onThemeChange(){this.fileRenderer.clearRenderCache(),this.rerender()}setOptions(t){null!=t&&(this.options=t,this.cachedHeaderHTML=void 0,this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions((0,h.pluckInteractionOptions)(this.options))}mergeOptions(t){this.options=Object.assign({},this.options,t)}setThemeType(t){(this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),this.applyCachedThemeState(t))}applyCachedThemeState(t){if("string"==typeof this.options.theme||null==this.fileContainer||null==this.appliedThemeCSS)return!1;const i=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType!==i&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return null!=this.appliedThemeCSS&&!(0,s.areThemesEqual)(this.appliedThemeCSS.theme,this.getTheme())}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){const i=this.editSession?.annotations;null!=i?this.isNewAnnotations(t)&&(this.lineAnnotations=t,(0,H.writeEditSessionAnnotations)(i,t,p.getLineAnnotationName)):this.lineAnnotations=t}syncEditSessionAnnotationsFromEditor(t){const i=this.editSession?.annotations;return null!=i&&t!==i.current&&(i.current=t,this.fileRenderer.setLineAnnotations(t),this.renderAnnotations(),!0)}setSelectedLines(t,i){this.interactionManager.setSelection(t,i)}setEditorActiveLine(t,i){this.interactionManager.setEditorActiveLine(t,{lineNumberOnly:i?.lineNumberOnly,side:i?.side??"additions"})}getCodeScrollLeft(){return this.code?.scrollLeft??0}setCodeScrollLeft(t){null!=this.code&&(this.code.scrollLeft=t)}__getEffectiveCodeOptions(){return Object.assign({},this.options,this.fileRenderer.getEffectiveCodeOptions())}flushManagers(){if(!this.managersDirty||null==this.pre)return void(this.managersDirty=!1);const{overflow:t="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:"wrap"===t,columnVariables:this.shouldApplyColumnVariables(t)?"apply":"measure"}),this.managersDirty=!1}shouldApplyColumnVariables(t){return"scroll"===t&&this.getLatestAnnotations().length>0}cleanUp(t=!1){const i=this.editor;this.emitPostRender(!0),i?.cleanUp(t?"recycle":"discard"),t||(this.editor=void 0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,t||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.pre=void 0,this.code=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,t?this.fileRenderer.recycle():(this.fileRenderer.cleanUp(),this.workerManager=void 0,this.file=void 0,this.editSession=void 0,this.renderedFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(t){const{fileContainer:i,prerenderedHTML:n,preventEmit:s=!1,file:o,lineAnnotations:a}=t;if(!this.enabled)throw new Error("File.hydrate: attempting to call hydrate after cleaned up");if(null!=this.fileContainer)throw new Error("File.hydrate: hydrate can only be called before the instance has rendered or hydrated");this.hydrateElements(i,n);const l=null!=this.editor;l||G(this.pre,o,this.options.collapsed)||V(this.headerElement,o,this.options.disableFileHeader)?this.render(Object.assign({},t,{forceRender:l||t.forceRender,preventEmit:!0})):this.hydrationSetup({file:o,lineAnnotations:a}),s||this.emitPostRender()}hydrateElements(t,i){this.fileContainer!==t&&this.emitPostRender(!0),(0,N.prerenderHTMLIfNecessary)(t,i);for(const i of Array.from(t.shadowRoot?.children??[]))i instanceof SVGElement?this.spriteSVG=i:i instanceof HTMLElement&&(i instanceof HTMLPreElement?(this.pre=i,this.appliedPreAttributes=void 0):i instanceof HTMLStyleElement&&i.hasAttribute("data-theme-css")?this.themeCSSStyle=i:i instanceof HTMLStyleElement&&i.hasAttribute("data-unsafe-css")?(this.unsafeCSSStyle=i,this.appliedUnsafeCSS=i.textContent):"diffsHeader"in i.dataset&&(this.headerElement=i,this.lastRenderedHeaderHTML=void 0));null!=this.pre&&(this.syncCodeNodeFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({file:t,lineAnnotations:i}){this.lineAnnotations=i??this.lineAnnotations,this.file=t,this.fileRenderer.setOptions((0,L.getFileRendererOptions)(this.options)),this.syncInteractionOptions(),null!=this.pre&&(this.fileRenderer.hydrate(t),this.renderedFile=t,this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}getOrCreateLineCache(t=this.getLatestFile()){return null!=t?this.fileRenderer.getOrCreateLineCache(t):D}updateBuffers(t){null!=this.pre&&this.applyBuffers(this.pre,t)}syncRenderViewToEditor(){const{editor:t,fileContainer:s,renderRange:o}=this,a=this.getLatestAnnotations(),l=this.getLatestFile();if(null==t||null==s||null==l)return;const h=i=>{this.enabled&&this.editor===t&&this.fileContainer===s&&this.getLatestFile()===l&&t.__syncRenderView({highlighter:i,fileContainer:s,file:l,lineAnnotations:a,renderRange:o,externalDocument:!0===this.editSession?.externalReplacement})},u=this.getTheme(),f=l.lang??(0,c.getFiletypeFromFileName)(l.name),p=(0,n.getHighlighterIfLoaded)({theme:u,lang:f});null!=p?h(p):(0,n.getSharedHighlighter)({themes:(0,i.getThemes)(u),langs:Array.from(new Set(["text",f])),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter}).then(h)}__acknowledgeDocumentUpdate(){null!=this.editSession&&(this.editSession.externalReplacement=!1)}__acceptEditorChange(t){const{lineAnnotations:i}=t;null!=i&&this.syncEditSessionAnnotationsFromEditor(i)}emitEditChange(t){const{onEditChange:i}=this.options;i?.(t)}__captureDocumentSessionState(){}__attachEditor(t){if(null!=this.editor)throw new Error("File.__attachEditor: an editor is already attached");this.editor=t;const i=()=>{this.editor=void 0,this.fileRenderer.endEditSession()};try{return this.resumeEditorRendering(t),i}catch(t){throw i(),t}}__resumeEditor(t){if(this.editor!==t)throw new Error("File.__resumeEditor: editor association changed");this.resumeEditorRendering(t)}resumeEditorRendering(t){null!=this.editSession?this.fileRenderer.beginEditSession(this.editSession.file):null!=this.file&&this.installEditSession(this.file,t.__getDocumentContents(this.file));const i=this.editSession?.file;this.fileRenderer.editorRenderReady()?(this.fileRenderer.fileCache===i&&(this.renderedFile=i),this.syncRenderViewToEditor()):this.rerender()}__completeEditSession(t,i){this.settleEditSession("install"===i,t)}settleEditSession(t,i){const{editSession:n,file:s,lineAnnotations:o}=this;if(null==n||null==s)return;const{file:a,annotations:h}=n;if(null!=this.editor)throw new Error("File.__completeEditSession: detach the editor before completing the session");const u=h?.current;let f,c,p=!1;if(null==i)throw new Error("File.__completeEditSession: editor is required for completion");const S=Object.assign({},a),C={file:S,editor:i,originalFile:s,lineAnnotations:u,originalLineAnnotations:o};Object.freeze(C);try{if(i.__emitEditComplete(C),"accept"===this.options.onEditComplete?.(C)){if(null!=S.cacheKey&&S.cacheKey===s.cacheKey)throw new Error("File.__completeEditSession: an accepted file must not reuse the replaced file cacheKey");f=S}}catch(t){p=!0,c=t}t&&null!=f&&(this.file=f,null!=u&&(this.lineAnnotations=u)),this.editSession=void 0;const{renderedFile:v,file:y}=this;if(this.fileRenderer.endEditSession(y),null!=v&&null!=y&&v!==y&&(0,l.areFileTargetsEqual)(v,y)&&(this.renderedFile=y),t&&null!=this.fileContainer&&this.rerender(),p)throw c}applyDocumentChange(t,i){const n=this.editSession?.file;if(null==n)throw new Error("File.applyDocumentChange: requires an active edit session");this.fileRenderer.beginEditSession(n),this.fileRenderer.applyDocumentChange(t),null!=i&&this.syncEditSessionAnnotationsFromEditor(i)}applySuspendedDocumentChange(t,i){null!=this.editSession&&(this.applyDocumentChange(t,i),this.fileRenderer.clearRenderCache())}updateRenderCache(t,i,n){const s=this.editSession?.file;if(null==s)throw new Error("File.updateRenderCache: requires an active edit session");this.fileRenderer.beginEditSession(s),this.fileRenderer.updateRenderCache(t,i,n?.lineCountChangeInFlight)}render({file:i,fileContainer:n,forceRender:s=!1,preventEmit:o=!1,containerWrapper:a,deferManagers:h=!1,lineAnnotations:u,renderRange:c}){if(!this.enabled)throw new Error("File.render: attempting to call render after cleaned up");this.editor?.__postponeBgTokenizeToNextFrame();const{collapsed:p=!1,themeType:S="system"}=this.options,C=p?void 0:c,v=this.renderRange,y=this.hasThemeChanged(),E=null!=u&&(u.length>0||this.getLatestAnnotations().length>0)&&this.isNewAnnotations(u),T=!(0,l.areFileTargetsEqual)(this.file,i);T&&this.updateExternalFile(i,u);const b=this.getLatestFile(i)??i;if(!p&&!s&&(0,f.areRenderRangesEqual)(C,this.renderRange)&&!T&&!E&&!y){const t=this.applyCachedThemeState(S);return t&&this.finalizeRender(),t}this.renderRange=C,T&&(this.cachedHeaderHTML=void 0),this.fileRenderer.setOptions((0,L.getFileRendererOptions)(this.options)),this.syncInteractionOptions(),null!=u&&this.setLineAnnotations(u),this.fileRenderer.setLineAnnotations(this.getLatestAnnotations());const{disableErrorHandling:R=!1,disableFileHeader:A=!1}=this.options;if(A&&(null!=this.headerElement&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),n=this.getOrCreateFileContainerNode(n,a),this.applyCachedThemeState(S),p){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const i=this.fileRenderer.renderFile(b,t.EMPTY_RENDER_RANGE);null!=i&&this.applyThemeState(n,i.themeStyles,S,i.baseThemeType),null!=i?.headerAST&&this.applyHeaderToDOM(i.headerAST,n,i.file),this.renderedFile=i?.file??b,this.injectUnsafeCSS()}catch(t){if(R)throw t;console.error(t),t instanceof Error&&this.applyErrorToDOM(t,n)}return this.finalizeRender(),o||this.emitPostRender(),!0}try{const t=this.getOrCreatePreNode(n);if(!this.canPartiallyRender(s,E,T||y||!(0,l.areFileTargetsEqual)(this.renderedFile,b))||!this.applyPartialRender(b,v,C)){const i=this.fileRenderer.renderFile(b,C);if(null==i)return!1===this.workerManager?.isInitialized()&&this.workerManager.isWorkingPool()&&this.workerManager.initialize().catch(()=>{}).then(()=>this.rerender()),!1;this.applyThemeState(n,i.themeStyles,S,i.baseThemeType),null!=i.headerAST&&this.applyHeaderToDOM(i.headerAST,n,i.file),this.applyFullRender(i,t),this.renderedFile=i.file}this.applyBuffers(t,C),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,h||this.flushManagers(),this.finalizeRender(),null!=this.editor&&this.syncRenderViewToEditor()}catch(t){if(R)throw t;console.error(t),t instanceof Error&&this.applyErrorToDOM(t,n)}return o||this.emitPostRender(),!0}finalizeRender(){}emitPostRender(t=!1){const{fileContainer:i,options:{onPostRender:n}}=this;if(t){if(!this.mounted)return;if(this.mounted=!1,null==i)return;return void n?.(i,this,"unmount")}if(null==i)return;const s=this.mounted?"update":"mount";this.mounted=!0,n?.(i,this,s)}removeRenderedCode(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.code?.remove(),this.code=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:t}of this.annotationCache.values())t.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}canPartiallyRender(t,i,n){return!(t||i||n)}renderPlaceholder(t){if(null==this.fileContainer)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),null==this.placeHolder){const t=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",t.appendChild(this.placeHolder)}return this.setPlaceholderHeight(t)}setPlaceholderHeight(t){return null!=this.placeHolder&&(this.placeHolder.style.setProperty("height",`${t}px`),!0)}async primeHighlightCache(t=this.file){const{workerManager:i}=this;if(null==t||null==i||!i.isWorkingPool()||null==t.cacheKey||(0,S.isFilePlainText)(t))return;const n=this.options.tokenizeMaxLength??1e5;this.fileRenderer.getOrCreateLineCache(t).length>n||await i.primeFileHighlightCache(t).catch(t=>{(0,O.isHandledWorkerPoolError)(t)||console.error(t)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.code?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.code=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderAnnotations(){if(this.isContainerManaged||null==this.fileContainer){for(const{element:t}of this.annotationCache.values())t.remove();return void this.annotationCache.clear()}const t=new Map(this.annotationCache),{renderAnnotation:i}=this.options,n=this.getLatestAnnotations();if(null!=i&&n.length>0)for(const[s,o]of n.entries()){const n=this.getAnnotationSlotName(o),a=`${s}-${n}`;let l=this.annotationCache.get(a);if(null==l||!(0,y.areLineAnnotationsEqual)(o,l.annotation)){l?.element.remove();const t=i(o);if(null==t)continue;l={element:(0,T.createAnnotationWrapperNode)(n),annotation:o},l.element.appendChild(t),this.fileContainer.appendChild(l.element),this.annotationCache.set(a,l)}t.delete(a)}for(const[i,{element:n}]of t.entries())this.annotationCache.delete(i),n.remove()}renderGutterUtility(){const{renderGutterUtility:t}=this.options;if(null==this.fileContainer||null==t)return this.gutterUtilityContent?.remove(),void(this.gutterUtilityContent=void 0);const i=t(this.interactionManager.getHoveredLine);if(null!=i&&null!=this.gutterUtilityContent)return;if(null==i)return this.gutterUtilityContent?.remove(),void(this.gutterUtilityContent=void 0);const n=(0,b.createGutterUtilityContentNode)();n.appendChild(i),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,i=this.fileContainer?.shadowRoot;if(null!=i)return null==t||""===t?(null!=this.unsafeCSSStyle&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),void(this.appliedUnsafeCSS=void 0)):void(this.unsafeCSSStyle?.parentNode===i&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=(0,R.createUnsafeCSSStyleNode)(),this.unsafeCSSStyle.parentNode!==i&&i.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=(0,M.wrapUnsafeCSS)(t),this.appliedUnsafeCSS=t))}applyThemeState(t,i,n,s){const o=t.shadowRoot??t.attachShadow({mode:"open"}),a=s??n,l=this.getTheme(),h="string"==typeof l?l:Object.assign({},l),u=(0,A.getMeasuredScrollbarGutter)(o);if(this.themeCSSStyle?.parentNode!==o||this.appliedThemeCSS?.themeStyles!==i||this.appliedThemeCSS.themeType!==a||this.appliedThemeCSS.scrollbarGutter!==u){if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===o)return this.hasAdoptedThemeCSS=!1,void(this.appliedThemeCSS={theme:h,themeStyles:i,themeType:a,baseThemeType:s,scrollbarGutter:u});this.themeCSSStyle=(0,P.upsertHostThemeStyle)({shadowRoot:o,currentNode:this.themeCSSStyle,themeCSS:(0,M.wrapThemeCSS)(i,a,u)}),this.appliedThemeCSS=null!=this.themeCSSStyle?{theme:h,themeStyles:i,themeType:a,baseThemeType:s,scrollbarGutter:u}:void 0}else this.appliedThemeCSS.theme=h}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;null!=t&&null!=this.themeCSSStyle&&(this.themeCSSStyle.textContent=(0,M.patchScrollbarGutterSize)(this.themeCSSStyle.textContent??"",(0,A.getMeasuredScrollbarGutter)(t)))}shouldGuardRebuildScroll(){return null!=this.editor&&(0,a.isSafari)()}applyFullRender(t,i){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(i,t);const n=this.code=(0,w.getOrCreateCodeNode)({code:this.code}),s=this.fileRenderer.renderCodeAST(t);this.editor?.__captureFocusForDOMReplacement();const o=()=>{if(n.childElementCount>=2)for(let t=0;t<2;t++){const i=n.children[t],o=s[t];i.innerHTML=(0,x.toHtml)(o.children),i.style.cssText=o.properties.style}else n.innerHTML=(0,x.toHtml)(s);i.contains(n)||i.replaceChildren(n)};this.shouldGuardRebuildScroll()?(0,F.guardWebKitScrollDuringRebuild)(i,o):o(),this.lastRowCount=t.rowCount}applyPartialRender(t,i,n){if(null==i||null==n)return!1;const{code:s}=this,o=null!=s?this.getColumns(s):void 0;if(null==s||null==o)return!1;const a=i.startingLine,l=n.startingLine,h=i.totalLines===1/0?Number.POSITIVE_INFINITY:a+i.totalLines,u=n.totalLines===1/0?Number.POSITIVE_INFINITY:l+n.totalLines,f=Math.max(a,l),c=Math.min(h,u);if(c<=f)return!1;if(!this.trimDOMToOverlap(o.gutter,f,c)||!this.trimDOMToOverlap(o.content,f,c))throw new Error("File.applyPartialRender: failed to trim to overlap");let{length:p}=o.content.children;const S=(i,n)=>{if(!(n<=0))return this.fileRenderer.renderFile(t,{startingLine:i,totalLines:n,bufferBefore:0,bufferAfter:0})},C=l<f?S(l,f-l):void 0;if(void 0===C&&l<f)return!1;const v=u===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:Math.max(0,u-c),y=u>c?S(c,v):void 0;return!(void 0===y&&u>c)&&(this.cleanupErrorWrapper(),null!=C&&(o.gutter.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(C.gutterAST)),o.content.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(C.contentAST)),p+=C.rowCount),null!=y&&(o.gutter.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(y.gutterAST)),o.content.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(y.contentAST)),p+=y.rowCount),this.lastRowCount!==p&&(o.gutter.style.setProperty("grid-row",`span ${p}`),o.content.style.setProperty("grid-row",`span ${p}`),this.lastRowCount=p),!0)}getColumns(t){const i=t.children[0],n=t.children[1];if(i instanceof HTMLElement&&n instanceof HTMLElement&&null!=i.dataset.gutter&&null!=n.dataset.content)return{gutter:i,content:n}}trimDOMToOverlap(t,i,n){const s=this.getDOMBoundaryIndices(t,[i,n]),o=s.get(i)??t.children.length,a=s.get(n)??t.children.length;if(o>a)return!1;for(let i=t.children.length-1;i>=a;i-=1)t.children[i]?.remove();for(let i=o-1;i>=0;i-=1)t.children[i]?.remove();return!0}getDOMBoundaryIndices(t,i){const n=[...new Set(i)].sort((t,i)=>t-i),s=new Map;if(0===n.length)return s;let o=0,a=n[o];const{children:l}=t;0===a&&(s.set(0,0),o+=1,a=n[o]);for(let t=0;t<l.length;t+=1){const i=l[t];if(!(i instanceof HTMLElement))continue;const h=this.getLineIndexFromDOMNode(i);if(null!=h){for(;null!=a&&h>=a;)s.set(a,t),o+=1,a=n[o];if(o>=n.length)break}}for(const t of n)s.has(t)||s.set(t,l.length);return s}getLineIndexFromDOMNode(t){const i=t.dataset.lineIndex;if(null==i)return;const n=Number(i);return Number.isNaN(n)?void 0:n}applyBuffers(t,i){if(null==i||this.shouldDisableVirtualizationBuffers())return null!=this.bufferBefore&&(this.bufferBefore.remove(),this.bufferBefore=void 0),void(null!=this.bufferAfter&&(this.bufferAfter.remove(),this.bufferAfter=void 0));i.bufferBefore>0?(null==this.bufferBefore&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${i.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):null!=this.bufferBefore&&(this.bufferBefore.remove(),this.bufferBefore=void 0),i.bufferAfter>0?(null==this.bufferAfter&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${i.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):null!=this.bufferAfter&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyHeaderToDOM(i,n,s){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const o=this.cachedHeaderHTML??(0,x.toHtml)(i);if(this.cachedHeaderHTML=o,o!==this.lastRenderedHeaderHTML){const t=document.createElement("div");t.innerHTML=o;const i=t.firstElementChild;if(!(i instanceof HTMLElement))return;null!=this.headerElement?n.shadowRoot?.replaceChild(i,this.headerElement):n.shadowRoot?.prepend(i),this.headerElement=i,this.lastRenderedHeaderHTML=o}if(this.isContainerManaged)return;const{renderHeaderPrefix:a,renderHeaderFilenameSuffix:l,renderCustomHeader:h,renderHeaderMetadata:u}=this.options;if(null!=h){const i=h(s)??void 0;this.headerCustom=this.upsertHeaderSlotElement(n,this.headerCustom,t.CUSTOM_HEADER_SLOT_ID,i),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0}else{const i=a?.(s)??void 0,o=l?.(s)??void 0,h=u?.(s)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(n,this.headerPrefix,t.HEADER_PREFIX_SLOT_ID,i),this.headerFilenameSuffix=this.upsertHeaderSlotElement(n,this.headerFilenameSuffix,t.HEADER_FILENAME_SUFFIX_SLOT_ID,o),this.headerMetadata=this.upsertHeaderSlotElement(n,this.headerMetadata,t.HEADER_METADATA_SLOT_ID,h),this.headerCustom?.remove(),this.headerCustom=void 0}}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,i,n,s){if(null==s)return void i?.remove();const o=i??this.createHeaderSlotElement(n);return null==i&&t.appendChild(o),this.replaceHeaderSlotContent(o,s),o}replaceHeaderSlotContent(t,i){t.replaceChildren(),i instanceof Element?t.appendChild(i):t.innerText=`${i}`}createHeaderSlotElement(t){const i=document.createElement("div");return i.slot=t,i}getOrCreateFileContainerNode(t,i){const{fileContainer:n}=this,s=t??n??document.createElement("diffs-container"),o=n!==s;return null!=n&&o&&this.editor?.__captureFocusForDOMReplacement(),o&&this.emitPostRender(!0),this.fileContainer=s,null!=n&&o&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),null!=i&&this.fileContainer.parentNode!==i&&i.appendChild(this.fileContainer),o&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:i}=t;if(null!=i)for(const t of i.children)t instanceof SVGElement?this.spriteSVG??=t:(0,o.isStyleNode)(t)&&t.hasAttribute("data-theme-css")?(this.themeCSSStyle??=t,this.hasAdoptedThemeCSS=!0):(0,o.isStyleNode)(t)&&t.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=t,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const i=t.shadowRoot??t.attachShadow({mode:"open"});if(null==this.spriteSVG){const t=document.createElement("div");t.innerHTML=v.SVGSpriteSheet;const i=t.firstChild;i instanceof SVGElement&&(this.spriteSVG=i)}null!=this.spriteSVG&&this.spriteSVG.parentNode!==i&&i.appendChild(this.spriteSVG)}getOrCreatePreNode(t){const i=t.shadowRoot??t.attachShadow({mode:"open"});return null==this.pre?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.code=void 0,i.appendChild(this.pre)):this.pre.parentNode!==i&&(this.editor?.__captureFocusForDOMReplacement(),t.shadowRoot?.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodeFromPre(t){this.code=void 0;for(const i of Array.from(t.children))if(i instanceof HTMLElement&&i.hasAttribute("data-code"))return void(this.code=i)}applyPreNodeAttributes(t,{totalLines:i}){const{overflow:n="scroll",disableLineNumbers:s=!1}=this.options,o={type:"file",split:!1,overflow:n,disableLineNumbers:s,diffIndicators:"none",disableBackground:!0,totalLines:i};(0,E.arePrePropertiesEqual)(o,this.appliedPreAttributes)||((0,_.setPreNodeProperties)(t,o),this.appliedPreAttributes=o)}applyErrorToDOM(t,i){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const n=i.shadowRoot??i.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",n.appendChild(this.errorWrapper);const s=document.createElement("div");s.dataset.errorMessage="",s.innerText=t.message,this.errorWrapper.appendChild(s);const o=document.createElement("pre");o.dataset.errorStack="",o.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(o)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function G(t,i,n=!1){return!n&&null==t&&null!=i}function V(t,i,n=!1){return null==t&&null!=i&&!n}},1322,[1148,1232,1252,1255,1323,1324,1304,1262,1278,1281,1286,1288,1308,1303,1309,1310,1311,1312,1313,1314,1317,1315,1325,1326,1319,1328,1329,1320,1321,1330,1331,1265]);
224
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){if("undefined"!=typeof HTMLStyleElement&&t instanceof HTMLStyleElement)return!0;const n=t.tagName??t.nodeName;return"string"==typeof n&&"style"===n.toLowerCase()}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"isStyleNode",{enumerable:!0,get:function(){return t}})},1323,[]);
225
- __d(function(g,r,i,a,m,e,d){"use strict";let t,n,o,u;function f(){t=void 0,n=void 0,o=void 0,u=void 0}function c(){return t??=/macOS|MacIntel|iPhone|iPad|iPod/i.test(P())}function s(){return n??=/Linux/i.test(P())}function l(){return o??="safari"in window&&"pushNotification"in window.safari||/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function b(){return u??=/\bFirefox\//.test(navigator.userAgent)}function P(){const t=globalThis.navigator;return t?.platform??t?.userAgentData?.platform??"unknown"}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"isFirefox",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"isLinux",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"isMacLike",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"isSafari",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"resetPlatformDetection",{enumerable:!0,get:function(){return f}})},1324,[]);
226
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"adoptEditSessionAnnotations",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"resolveEditSessionSlotName",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"writeEditSessionAnnotations",{enumerable:!0,get:function(){return o}});var t=r(d[0]);function n(n,o,s){const u=new Map;for(const c of n){const n=(0,t.getLineAnnotationSource)(c);u.set(n,s?.slotNames.get(n)??o(c))}return{provided:n,current:n,slotNames:u}}function o(n,o,s){for(const u of o){const o=(0,t.getLineAnnotationSource)(u);n.slotNames.has(o)||n.slotNames.set(o,s(u))}n.provided=o,n.current=o}function s(n,o,s){if(null==n)return s(o);const u=(0,t.getLineAnnotationSource)(o);let c=n.slotNames.get(u);return null==c&&(c=s(o),n.slotNames.set(u,c)),c}},1325,[1318]);
227
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getFileRendererOptions",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){return{theme:n?.theme,disableLineNumbers:n?.disableLineNumbers,overflow:n?.overflow,themeType:n?.themeType,collapsed:n?.collapsed,disableFileHeader:n?.disableFileHeader,disableVirtualizationBuffers:n?.disableVirtualizationBuffers,stickyHeader:n?.stickyHeader,preferredHighlighter:n?.preferredHighlighter,useCSSClasses:n?.useCSSClasses,useTokenTransformer:(0,t.shouldUseTokenTransformer)(n),tokenizeMaxLineLength:n?.tokenizeMaxLineLength,tokenizeMaxLength:n?.tokenizeMaxLength,unsafeCSS:n?.unsafeCSS,headerRenderMode:null!=n?.renderCustomHeader?"custom":"default"}}},1326,[1327]);
228
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n){return!0===n?.useTokenTransformer||null!=n?.onTokenClick||null!=n?.onTokenEnter||null!=n?.onTokenLeave}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"shouldUseTokenTransformer",{enumerable:!0,get:function(){return n}})},1327,[]);
229
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){const l=t?.offsetHeight??0;if(null!=t&&0!==l){t.style.minHeight=`${l}px`;try{n(),t.offsetHeight}finally{t.style.minHeight=""}}else n()}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"guardWebKitScrollDuringRebuild",{enumerable:!0,get:function(){return t}})},1328,[]);
230
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createHostThemeStyleNode",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"upsertHostThemeStyle",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n({shadowRoot:t,currentNode:n,themeCSS:u}){if(""!==u.trim())return n??=o(),n.textContent=u,n.parentNode!==t&&t.appendChild(n),n;n?.remove()}function o(){const n=document.createElement("style");return n.setAttribute(t.THEME_CSS_ATTRIBUTE,""),n}},1329,[1148]);
231
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"WorkerPoolTaskCanceledError",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"WorkerPoolTerminatedError",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"WorkerPoolWorkerError",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"isHandledWorkerPoolError",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"isWorkerPoolCancellation",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"markWorkerErrorReported",{enumerable:!0,get:function(){return u}});var o=class extends Error{constructor(){super("WorkerPoolManager: operation canceled because the pool terminated"),this.name="WorkerPoolTerminatedError"}},n=class extends Error{constructor(){super("WorkerPoolManager: operation canceled before the task completed"),this.name="WorkerPoolTaskCanceledError"}},t=class extends Error{constructor(o,n){super(o,n),this.name="WorkerPoolWorkerError"}};const c=new WeakSet;function u(o){c.add(o)}function s(t){return t instanceof o||t instanceof n}function l(o){return s(o)||o instanceof t&&c.has(o)}},1330,[]);
232
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DiffsContainerLoaded",{enumerable:!0,get:function(){return l}});var e,t=r(d[0]),n=r(d[1]),o=(e=n)&&e.__esModule?e:{default:e},s=r(d[2]);if("undefined"!=typeof HTMLElement&&null==customElements.get("diffs-container")){let e;class n extends HTMLElement{constructor(){if(super(),null!=this.shadowRoot)return;const t=this.attachShadow({mode:"open"});null==e&&(e=new CSSStyleSheet,e.replaceSync(o.default)),t.adoptedStyleSheets=[e]}connectedCallback(){const e=this.shadowRoot??this.attachShadow({mode:"open"});(0,s.getMeasuredScrollbarGutter)(e)}}customElements.define(t.DIFFS_TAG_NAME,n)}const l=!0},1331,[1148,1316,1317]);
233
- __d(function(g,r,i,a,m,_e,d){"use strict";const e=["fileContainer","file","forceRender","lineAnnotations"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"VirtualizedFile",{enumerable:!0,get:function(){return y}});var t,n=r(d[0]),s=(t=n)&&t.__esModule?t:{default:t},h=r(d[1]),o=r(d[2]),l=r(d[3]),c=r(d[4]),u=r(d[5]),f=r(d[6]),p=r(d[7]);const R=new Map;let L=-1;function F(e,t){return(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||e.unsafeCSS!==t.unsafeCSS}var y=class extends p.File{__id="virtualized-file:"+ ++L;renderType="virtualized";height=0;cache={heights:new Map,checkpoints:[],fileAnnotationHeight:0,ghostTextRows:R};isVisible=!1;isSetup=!1;layoutDirty=!0;constructor(e,t,n=h.DEFAULT_VIRTUAL_FILE_METRICS,s,o=!1){super(e,s,o),this.virtualizer=t,this.metrics=n}setMetrics(e,t=!1){const n=(0,u.computeVirtualFileMetrics)(e);!t&&(0,o.areObjectsEqual)(this.metrics,n)||(this.metrics=n,this.resetLayoutCache())}setLineAnnotations(e){this.syncLineAnnotations(e)&&(this.forceRenderOverride=!0)}syncLineAnnotations(e){return!(null==e||!this.isNewAnnotations(e))&&((0!==e.length||0!==this.getLatestAnnotations().length)&&(super.setLineAnnotations(e),!0))}syncEditSessionAnnotationsFromEditor(e){return!!super.syncEditSessionAnnotationsFromEditor(e)&&(this.forceRenderOverride=!0,!0)}hasLineAnnotations(){return this.getLatestAnnotations().some(e=>e.lineNumber>0)}hasUniformLineHeights(){const{overflow:e="scroll"}=this.options;return"scroll"===e&&!this.hasLineAnnotations()&&0===this.cache.heights.size}getLineHeight(e,t=!1){const n=this.cache.heights.get(e);if(null!=n)return n;const s=t?2:1;return this.metrics.lineHeight*s}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(null==e)return;const{options:t}=this,n=!(0,l.areOptionsEqual)(t,e),s=F(t,e);super.setOptions(e),s&&this.resetLayoutCache(!0),n&&(this.forceRenderOverride=!0),n&&this.virtualizer.instanceChanged(this,s)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache(e=!1,t=!0){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heights.size>0&&this.cache.heights.clear(),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.ghostTextRows=R,null!=this.renderRange&&t&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}applyGhostTextRows(e){const{heights:t,ghostTextRows:n}=this.cache;if(n===e)return!1;const{lineHeight:s}=this.metrics;let h=!1;for(const o of new Set([...n.keys(),...e.keys()])){const l=n.get(o)??0,c=e.get(o)??0;if(c===l)continue;const u=(t.get(o)??s)-l*s+c*s;u===s?t.delete(o):t.set(o,u),h=!0}return this.cache.ghostTextRows=e,h}reconcileHeights(){let e=!1;if(null==this.fileContainer||null==this.getLayoutFile())return 0!==this.height&&(e=!0),this.height=0,e;const{overflow:t="scroll"}=this.options;this.top=this.getVirtualizedTop();const n=this.editor?.__getGhostTextRows()??R;e=this.applyGhostTextRows(n);const s="scroll"!==t||this.getLatestAnnotations().length>0||this.isResizeDebuggingEnabled();if(null!=this.placeHolder||!s&&0===this.cache.heights.size&&0===this.cache.fileAnnotationHeight)return e&&(this.computeApproximateSize(!0),this.setPlaceholderHeight(this.height)),e;const{lineHeight:h}=this.metrics;if(null==this.code)return e;const o=this.code.children[1];if(!(o instanceof HTMLElement))return e;if(null!=this.renderRange&&(0,f.shouldRenderFileAnnotations)(this.renderRange)){const t=z(o)??0;t!==this.cache.fileAnnotationHeight&&(this.cache.fileAnnotationHeight=t,e=!0)}for(const t of o.children){if(!(t instanceof HTMLElement))continue;const o=t.dataset.lineIndex;if(null==o)continue;const l=Number(o),c=(n.get(l)??0)*h,u=this.cache.heights.get(l);if(!s&&(null==u||u===h+c))continue;let f=t.getBoundingClientRect().height+c,p=!1;t.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in t.nextElementSibling.dataset||"noNewline"in t.nextElementSibling.dataset)&&("noNewline"in t.nextElementSibling.dataset&&(p=!0),f+=t.nextElementSibling.getBoundingClientRect().height);f!==this.getLineHeight(l,p)&&(e=!0,f===this.metrics.lineHeight*(p?2:1)?this.cache.heights.delete(l):this.cache.heights.set(l,f))}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>null!=this.fileContainer&&null!=this.file&&(e&&(this.top=this.getVirtualizedTop()),this.render({file:this.file}));updateCodeViewLayout(e,t,n,s){const h=!(0,c.areFileTargetsEqual)(this.file,e);h&&this.updateExternalFile(e,s);const{pendingRenderFile:o,layoutFileChanged:l,renderedFileChanged:u,annotationsChanged:f}=this.updatePendingRender(e,s);let p=!0===n?.resetFileLayoutCache||l;null!=n?.metrics&&(this.metrics=n.metrics,p=!0);const{collapsed:R=!1}=this.options;return this.currentCollapsed!==R&&(this.currentCollapsed=R,p=!0),p&&this.resetLayoutCache(),h&&(this.layoutDirty=!0),!this.forceRenderOverride&&(h||u||f)&&(this.forceRenderOverride=!0),this.top=t,this.computeApproximateSize(!1,o),this.height}getLayoutFile(){return this.pendingRender?.file??this.getRenderedFile()}getLinePosition(e){const t=this.getLayoutFile();if(null==t||e<1)return;const{disableFileHeader:n=!1,collapsed:s=!1}=this.options,h=this.fileRenderer.getLineCount(t)-1;if(s)return{top:(0,u.getVirtualFileHeaderHeight)(this.metrics,n),height:0};let o=(0,u.getVirtualFileHeaderRegion)(this.metrics,n);if(h<0)return{top:o,height:0};const l=Math.min(Math.max(e-1,0),h),{lineHeight:c}=this.metrics;if(o+=this.cache.fileAnnotationHeight,this.hasUniformLineHeights())return{top:o+l*c,height:c};const f=this.getLayoutCheckpointBeforeLineIndex(l);o=f?.top??o;for(let e=f?.lineIndex??0;e<l;e++)o+=this.getLineHeight(e,!1);return{top:o,height:this.getLineHeight(l,!1)}}getEditorViewport(){return"simple"===this.virtualizer.type?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){const t=this.getLayoutFile();if(null==t||null==this.renderRange)return;const{disableFileHeader:n=!1,collapsed:s=!1}=this.options;if(s||this.renderRange.totalLines<=0)return;const h=this.fileRenderer.getLineCount(t)-1;if(h<0)return;const o=(0,u.getVirtualFileHeaderRegion)(this.metrics,n),l=Math.min(this.renderRange.startingLine,h),c=Math.min(l+this.renderRange.totalLines-1,h);if(c<l)return;const{fileAnnotationHeight:f}=this.cache;if(this.hasUniformLineHeights()){const{lineHeight:t}=this.metrics,n=o+(0===l?f:this.renderRange.bufferBefore),s=l+Math.max(Math.ceil((e-n)/t),0);if(s>c)return;return{lineNumber:s+1,top:o+f+s*t}}let p=o+(0===l?f:this.renderRange.bufferBefore);for(let t=l;t<=c;t++){if(p>=e)return{lineNumber:t+1,top:p};p+=this.getLineHeight(t)}}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){const t=this.getLayoutFile();if(null==this.top||null==t)return;if(!0===this.options.collapsed)return{topOffset:this.top,height:this.height};const n=null!=e?this.computeRenderRangeFromWindow(t,this.top,e):this.renderRange;if(null==n)return;const{bufferBefore:s,bufferAfter:h,totalLines:o}=n;let l=0;if(0===o){const t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(l=h)}return{topOffset:this.top+s+l,height:this.height-(s+h)}}cleanUp(e=!1){const t=this.cache.ghostTextRows.size>0;t&&(this.layoutDirty=!0);const n=e&&this.isAdvancedMode()&&null!=this.fileContainer&&(t||!(0,c.areFileTargetsEqual)(this.getRenderedFile(),this.getLatestFile()));null!=this.fileContainer&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache(),this.pendingRender=void 0,this.isSetup=!1,super.cleanUp(e),n&&this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.getLayoutFile()){const n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;const s=0===this.height;if(this.height=0,this.cache.checkpoints=[],null==t)return void(this.layoutDirty=!1);this.applyGhostTextRows(this.editor?.__getGhostTextRows()??R);const{disableFileHeader:h=!1,collapsed:o=!1}=this.options,{lineHeight:l}=this.metrics,c=this.fileRenderer.getLineCount(t);if(o)return this.height+=(0,u.getVirtualFileHeaderHeight)(this.metrics,h),void(this.layoutDirty=!1);const f=(0,u.getVirtualFileHeaderRegion)(this.metrics,h),p=(0,u.getVirtualFilePaddingBottom)(this.metrics);if(this.height+=f,this.height+=this.cache.fileAnnotationHeight,this.hasUniformLineHeights())this.height+=c*l;else for(let e=0;e<c;e++)this.addLayoutCheckpoint(e,this.height),this.height+=this.getLineHeight(e,!1);if(c>0&&(this.height+=p),null!=this.fileContainer&&n&&!s){const e=this.fileContainer.getBoundingClientRect();e.height!==this.height?console.log("VirtualizedFile.computeApproximateSize: computed height doesnt match",{name:t.name,elementHeight:e.height,computedHeight:this.height}):console.log("VirtualizedFile.computeApproximateSize: computed height IS CORRECT")}this.layoutDirty=!1}setVisibility(e){this.isAdvancedMode()||null==this.fileContainer||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){if(!this.enabled||null==this.file)return;const e=this.getLatestFile(),t=null==e?void 0:this.fileRenderer.getFileForNextRender(e);this.isSimpleMode()&&(this.pendingRender=void 0),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!(0,c.areFileTargetsEqual)(this.getRenderedFile(),t))}syncGhostTextRows(){const e=this.getAdvancedVirtualizer();null!=e?(e.capturePendingLayoutAnchor(),this.layoutDirty=!0,e.instanceChanged(this,!0)):this.getSimpleVirtualizer()?.requestHeightReconcile(this)}applyDocumentChange(e,t,n=!1){const{renderRange:s}=this;this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache(this.isSimpleMode(),!1);const h=this.getRenderedFile();if(this.isSimpleMode()){if(n&&null!=s&&null!=h){const e=this.virtualizer.getWindowSpecs(),t=this.computeRenderRangeFromWindow(h,this.top??0,e);t.bufferAfter!==s.bufferAfter&&this.updateBuffers(t)}}else this.computeApproximateSize(!0);this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}render(t){let{fileContainer:n,file:h,forceRender:o=!1,lineAnnotations:l}=t,u=(0,s.default)(t,e);const f=!(0,c.areFileTargetsEqual)(this.file,h);f&&(this.updateExternalFile(h,l),this.cachedHeaderHTML=void 0);const{pendingRenderFile:p,layoutFileChanged:R,renderedFileChanged:L,annotationsChanged:F}=(()=>null!=this.pendingRender&&this.pendingRender.latestFile===(this.getLatestFile(h)??h)?{pendingRenderFile:this.pendingRender.file,layoutFileChanged:!1,renderedFileChanged:!1,annotationsChanged:this.syncLineAnnotations(l)}:this.updatePendingRender(h,l))(),{forceRenderOverride:y,isSetup:z}=this;if(this.forceRenderOverride=void 0,R&&this.resetLayoutCache(),n=this.getOrCreateFileContainerNode(n),z)this.top??=this.getVirtualizedTop(),this.layoutDirty&&this.isSimpleMode()&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.computeApproximateSize(!1,p));else{this.computeApproximateSize(!1,p);const e=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(null==e)throw new Error("VirtualizedFile.render: simple virtualizer is not available");e.connect(n,this),this.isVisible=e.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!f||!z))return this.renderPlaceholder(this.height);const C=this.virtualizer.getWindowSpecs(),b=this.top??0,v=this.computeRenderRangeFromWindow(p,b,C);return super.render(Object.assign({file:h,fileContainer:n,renderRange:v,lineAnnotations:l,forceRender:(y??o)||F||L||f},u))}finalizeRender(){if(this.getRenderedFile()!==this.pendingRender?.file)throw new Error("VirtualizedFile.render: rendered a different file than its prepared layout");this.pendingRender=void 0,this.isSimpleMode()&&this.getSimpleVirtualizer()?.requestHeightReconcile(this)}updatePendingRender(e,t){const n=this.getLatestFile(e)??e,s=this.getRenderedFile(),h=this.pendingRender?.file??s,o=this.fileRenderer.getFileForNextRender(n);return this.pendingRender={latestFile:n,file:o},{pendingRenderFile:o,annotationsChanged:this.syncLineAnnotations(t),layoutFileChanged:!(0,c.areFileTargetsEqual)(h,o),renderedFileChanged:!(0,c.areFileTargetsEqual)(s,o)}}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return"simple"===this.virtualizer.type}isAdvancedMode(){return"advanced"===this.virtualizer.type}addLayoutCheckpoint(e,t){e%5e3==0&&this.cache.checkpoints.push({lineIndex:e,top:t})}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||0===this.cache.checkpoints.length)return;let t,n=0,s=this.cache.checkpoints.length-1;for(;n<=s;){const h=n+s>>1,o=this.cache.checkpoints[h];if(null==o)throw new Error("VirtualizedFile: invalid checkpoint index");o.lineIndex<=e?(t=o,n=h+1):s=h-1}return t}getLayoutCheckpointBeforeTop(e,t){let n=0,s=this.cache.checkpoints.length-1,h=-1;for(;n<=s;){const t=n+s>>1,o=this.cache.checkpoints[t];if(null==o)throw new Error("VirtualizedFile: invalid checkpoint index");o.top<=e?(h=t,n=t+1):s=t-1}if(null==t)return h>=0?this.cache.checkpoints[h]:void 0;for(let e=h;e>=0;e--){const n=this.cache.checkpoints[e];if(null==n)throw new Error("VirtualizedFile: invalid checkpoint index");if(n.lineIndex%t===0)return n}}getVirtualizedTop(){return"advanced"===this.virtualizer.type?this.virtualizer.getLocalTopForInstance(this):null!=this.fileContainer?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return"simple"===this.virtualizer.type?this.virtualizer:void 0}getAdvancedVirtualizer(){return"advanced"===this.virtualizer.type?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}computeRenderRangeFromWindow(e,t,{top:n,bottom:s}){const{disableFileHeader:h=!1}=this.options,{hunkLineCount:o,lineHeight:l}=this.metrics,c=this.fileRenderer.getLineCount(e),p=this.height,R=(0,u.getVirtualFileHeaderRegion)(this.metrics,h),L=c>0?(0,u.getVirtualFilePaddingBottom)(this.metrics):0,{fileAnnotationHeight:F}=this.cache,y=R+F,z=Math.max(0,p-R-F-L),C=(0,f.includesFileAnnotations)(this.getLatestAnnotations()),b=t+R,v=F>0&&C&&b<s&&b+F>n;if(t<n-p||t>s)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:p-R-L};if(c<=o)return{startingLine:0,totalLines:o,bufferBefore:0,bufferAfter:0};const A=Math.ceil(Math.max(s-n,0)/l),M=Math.ceil(A/o)*o+o,V=M/o,H=(n+s)/2;if(this.hasUniformLineHeights()){const e=t+y;if(!(v||e<s&&e+z>n))return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:p-R-L};const h=Math.floor(v&&H<t+y?0:(H-(t+y))/l),u=Math.floor(h/o)-Math.floor(V/2),f=Math.ceil(c/o),C=Math.max(0,Math.min(u,f))*o,b=u<0?M+u*o:M,A=0===C?0:F+C*l,x=Math.min(b,c-C);return{startingLine:C,totalLines:b,bufferBefore:A,bufferAfter:Math.max(0,(c-C-x)*l)}}const x=V,S=[],w=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-M*l*2),o);let T,E,k,O=t+(w?.top??y),D=w?.lineIndex??0;for(let e=w?.lineIndex??0;e<c;e++){const h=D%o===0,l=Math.floor(D/o);if(h&&(S[l]=O-(t+y),null!=k)){if(k<=0)break;k--}const c=this.getLineHeight(e,!1);O>n-c&&O<s&&(T??=l),O+c>H&&(E??=l),null==k&&O>=s&&h&&(k=x),D++,O+=c}if(null==T){if(!v)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:p-R-L};T=0,E=0}E??=T;const B=Math.round(E-V/2),I=Math.max(0,Math.ceil(c/o)-V),_=Math.max(0,Math.min(B,I)),N=_*o,P=B<0?M+B*o:M,U=S[_]??0,q=0===N?0:F+U,G=_+P/o,W=G<S.length?z-S[G]:z-(O-t-y);return{startingLine:N,totalLines:P,bufferBefore:q,bufferAfter:Math.max(0,W)}}};function z(e){let t;for(const n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===f.FILE_ANNOTATION_DOM_KEY&&(t=Math.max(t??0,n.getBoundingClientRect().height));return t}},1332,[25,1148,1254,1256,1304,1333,1305,1322]);
234
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"computeVirtualFileMetrics",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"getDefaultHunkSeparatorHeight",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"getVirtualFileHeaderHeight",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"getVirtualFileHeaderRegion",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"getVirtualFilePaddingBottom",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"getVirtualFilePaddingTop",{enumerable:!0,get:function(){return o}});var t=r(d[0]);function n(n){return Object.assign({},t.DEFAULT_VIRTUAL_FILE_METRICS,n)}function u(t,n){return c(t,n)+o(t,n)}function c(t,n){return n?0:t.diffHeaderHeight}function o(t,n){return t.paddingTop??(n?t.spacing:0)}function f(t){return t.paddingBottom??t.spacing}function l(t){switch(t){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}},1333,[1148]);
235
- __d(function(g,r,i,a,m,e,d){"use strict";function c(c,n){return null!=c?.cacheKey||null!=n?.cacheKey?c?.cacheKey===n?.cacheKey:c===n}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areDiffTargetsEqual",{enumerable:!0,get:function(){return c}})},1334,[]);
236
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n,t){return n?.cacheKey===t?.cacheKey&&n?.contents===t?.contents&&n?.name===t?.name&&n?.lang===t?.lang}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areFilesEqual",{enumerable:!0,get:function(){return n}})},1335,[]);
237
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n){return n.map(n=>Object.assign({},n,{hunkContent:n.hunkContent.map(n=>Object.assign({},n))}))}function t(t){return Object.assign({},t,{hunks:n(t.hunks),deletionLines:[...t.deletionLines],additionLines:[...t.additionLines]})}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"cloneFileDiffMetadata",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"cloneHunks",{enumerable:!0,get:function(){return n}})},1336,[]);
238
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"hydratePartialDiff",{enumerable:!0,get:function(){return s}});var n=r(d[0]),t=r(d[1]),o=r(d[2]),l=r(d[3]);function s(n,o,s){const c="clone"===n?(0,t.cloneFileDiffMetadata)(o):o;if(!c.isPartial)throw new Error("hydratePartialDiff: fileDiff must be partial");switch(c.type){case"change":case"rename-changed":return u(c,f(c,s),h(c,s));case"rename-pure":{const n=h(c,s);y(c,s);const t=(0,l.splitFileContents)(n.contents);return c.isPartial=!1,c.deletionLines=t,c.additionLines=t,L(c,null,n),c}}throw new Error(`hydratePartialDiff: ${c.type} diffs cannot be hydrated from loaded files`)}function u(n,t,o){const s=(0,l.splitFileContents)(t.contents),u=(0,l.splitFileContents)(o.contents),{hunks:f,splitLineCount:h,unifiedLineCount:y}=c(n.hunks,u.length);return n.hunks=f,n.splitLineCount=h,n.unifiedLineCount=y,n.isPartial=!1,n.deletionLines=s,n.additionLines=u,L(n,t,o),n}function c(t,o){let l=0,s=0,u=0;const c=[];for(const o of t){const t=Math.max(o.additionStart-1,0),f=Math.max(o.deletionStart-1,0);let h=t,y=f,p=0,L=0,C=0,w=0;const x=[];for(const n of o.hunkContent)"context"!==n.type?(x.push(Object.assign({},n,{additionLineIndex:h,deletionLineIndex:y})),h+=n.additions,y+=n.deletions,p+=n.additions,L+=n.deletions,C+=Math.max(n.additions,n.deletions),w+=n.additions+n.deletions):(x.push(Object.assign({},n,{additionLineIndex:h,deletionLineIndex:y})),h+=n.lines,y+=n.lines,C+=n.lines,w+=n.lines);const F=Math.max((0,n.getHunkSideStartBoundary)(o.additionStart,o.additionCount)-u,0);c.push(Object.assign({},o,{collapsedBefore:F,additionLineIndex:t,deletionLineIndex:f,additionLines:p,deletionLines:L,hunkContent:x,splitLineStart:l+F,unifiedLineStart:s+F,splitLineCount:C,unifiedLineCount:w})),l+=F+C,s+=F+w,u=(0,n.getHunkSideEndBoundary)(o.additionStart,o.additionCount)}if(c.length>0){const t=c[c.length-1],u=(0,n.getHunkSideEndBoundary)(t.additionStart,t.additionCount),f=Math.max(o-u,0);l+=f,s+=f}return{hunks:c,splitLineCount:l,unifiedLineCount:s}}function f(n,t){if(null==t.oldFile)throw new Error(`hydratePartialDiff: ${n.type} diff for ${n.name} requires oldFile`);return t.oldFile}function h(n,t){if(null==t.newFile)throw new Error(`hydratePartialDiff: ${n.type} diff for ${n.name} requires newFile`);return t.newFile}function y(n,t){if(null!==t.oldFile)throw new Error(`hydratePartialDiff: ${n.type} diff for ${n.name} requires oldFile to be null`)}function p(n,t,o){return null!=n.cacheKey?`${n.cacheKey}:hydrated`:C(t,o)}function L(n,t,o){const l=p(n,t,o);null!=l?n.cacheKey=l:delete n.cacheKey}function C(n,t){return null!=n&&null!=t?null!=n.cacheKey&&null!=t.cacheKey?(0,o.composeCacheKey)("hydrated-files",n.cacheKey,t.cacheKey):void 0:n?.cacheKey??t?.cacheKey}},1337,[1338,1336,1339,1340]);
239
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n,t){return n-(0===t?0:1)}function t(t,u){return n(t,u)+u}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getHunkSideEndBoundary",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"getHunkSideStartBoundary",{enumerable:!0,get:function(){return n}})},1338,[]);
240
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"composeCacheKey",{enumerable:!0,get:function(){return n}});const t=1;function n(n,...c){return`ck${t}:${JSON.stringify([n,...c])}`}},1339,[]);
241
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"splitFileContents",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){return""!==n?n.split(t.SPLIT_WITH_NEWLINES):[]}},1340,[1148]);
242
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){let n=t.length;return 10===t.charCodeAt(n-1)&&(n--,13===t.charCodeAt(n-1)&&n--),t.slice(0,n)}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"cleanLastNewline",{enumerable:!0,get:function(){return t}})},1341,[]);
243
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"detachString",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"releaseStringDetachBuffer",{enumerable:!0,get:function(){return f}});const t=new TextEncoder,n=new TextDecoder("utf-8",{ignoreBOM:!0}),u=/[\uD800-\uDFFF]/,c=1024;let o=new Uint8Array(c);function f(){o.length!==c&&(o=new Uint8Array(c))}function s(c){if(0===c.length)return c;if(u.test(c))return JSON.parse(JSON.stringify(c));const f=3*c.length;o.length<f&&(o=new Uint8Array(f));const{written:s}=t.encodeInto(c,o);return n.decode(o.subarray(0,s))}},1342,[]);
244
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"parsePatchFiles",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"processFile",{enumerable:!0,get:function(){return C}}),Object.defineProperty(e,"processPatch",{enumerable:!0,get:function(){return f}});var n=r(d[0]),t=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]),u=r(d[5]),c=r(d[6]);const h=/^diff --git ("a\/(?:[^"\\]|\\.)*"|a\/.+?) ("b\/(?:[^"\\]|\\.)*"|b\/.+?)$/;function f(n,t,o){try{return p(n,t,o)}finally{(0,s.releaseStringDetachBuffer)()}}function p(t,l,u=!1,c){const h=D(t),f=h?M(t,"diff --git"):I(t);let p;const C=[];for(const t of f){if(h&&!n.GIT_DIFF_FILE_BREAK_REGEX.test(t)){if(null==p)p=(0,s.detachString)(t);else{if(u)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",t)}continue}if(!h&&!w(t)){if(null==p)p=(0,s.detachString)(t);else{if(u)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",t)}continue}const f=L(t,{cacheKey:null!=l?null==c?(0,o.composeCacheKey)("patch-file",l,String(C.length)):(0,o.composeCacheKey)("patch-file",l,String(c),String(C.length)):void 0,isGitDiff:h,throwOnError:u});null!=f&&C.push(f)}return{patchMetadata:p,files:C}}function C(n,t){try{return L(n,t)}finally{(0,s.releaseStringDetachBuffer)()}}function L(o,{cacheKey:u,isGitDiff:f=n.GIT_DIFF_FILE_BREAK_REGEX.test(o),oldFile:p,newFile:C,throwOnError:L=!1}={}){let S=0;const k=M(o,"@@ ");let I;const w=null==p||null==C;let v=0,W=0;for(const o of k){const c=E(o),k=c[0];if(null==k){if(L)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",o);continue}const P=O(k);let _,B,D=0,M=0;if(null==P||null==I){if(null!=I){if(L)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",o);continue}I={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:w,additionLines:w||null==p||null==C?[]:x(C.contents),deletionLines:w||null==p||null==C?[]:x(p.contents),cacheKey:N(u)},1===I.additionLines.length&&""===C?.contents&&(I.additionLines.length=0),1===I.deletionLines.length&&""===p?.contents&&(I.deletionLines.length=0);for(const t of c){if(t.startsWith("diff --git")){const n=t.trim().match(h);if(null==n){if(L)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",t);continue}const o=y(n[1],!0),l=y(n[2],!0);I.name=(0,s.detachString)(l),o!==l&&(I.prevName=(0,s.detachString)(o));continue}const o=t.startsWith("---")||t.startsWith("+++")?t.match(n.FILENAME_HEADER_REGEX):null;if(null!=o){const[,n,t]=o,l=y(t,f);if("---"===n&&"/dev/null"!==l){const n=(0,s.detachString)(l);I.prevName=n,I.name=n}else"+++"===n&&"/dev/null"!==l&&(I.name=(0,s.detachString)(l))}else if(f){if(t.startsWith("new mode ")&&(I.mode=(0,s.detachString)(t.slice(8).trim())),t.startsWith("old mode ")&&(I.prevMode=(0,s.detachString)(t.slice(8).trim())),t.startsWith("new file mode")&&(I.type="new",I.mode=(0,s.detachString)(t.slice(13).trim())),t.startsWith("deleted file mode")&&(I.type="deleted",I.mode=(0,s.detachString)(t.slice(17).trim())),t.startsWith("similarity index")&&(t.startsWith("similarity index 100%")?I.type="rename-pure":I.type="rename-changed"),t.startsWith("index ")){const[,o,l,u]=t.trim().match(n.INDEX_LINE_METADATA)??[];null!=o&&(I.prevObjectId=(0,s.detachString)(o)),null!=l&&(I.newObjectId=(0,s.detachString)(l)),null!=u&&(I.mode=(0,s.detachString)(u))}(t.startsWith("rename from ")||t.startsWith("copy from "))&&(I.prevName=(0,s.detachString)(y(t.slice(t.startsWith("rename")?12:10)))),(t.startsWith("rename to ")||t.startsWith("copy to "))&&(I.name=(0,s.detachString)(y(t.slice(t.startsWith("rename")?10:8))))}}continue}for(;c.length>0&&("\n"===c[c.length-1]||"\r"===c[c.length-1]||"\r\n"===c[c.length-1]||""===c[c.length-1]);)c.pop();const{additionStart:A,deletionStart:G}=P;v=w?v:G-1,W=w?W:A-1;const K={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:P.additionCount,additionStart:A,additionLines:D,deletionCount:P.deletionCount,deletionStart:G,deletionLines:M,deletionLineIndex:v,additionLineIndex:W,hunkContent:[],hunkContext:N(P.hunkContext),hunkSpecs:(0,s.detachString)(k),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let j=0,H=0;for(let n=1;n<c.length;n++){const t=c[n];if(j>=K.additionCount&&H>=K.deletionCount&&!t.startsWith("\\")){if(!b(t)||F(t))break;if(L)throw Error("parsePatchContent: hunk has more lines than expected")}const o=t[0];if("+"!==o&&"-"!==o&&" "!==o&&"\\"!==o){if(L)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${o}", full line: "${t}"`),console.error("processFile: invalid rawLine:",t);continue}const s=R(o);if("addition"===s){if(L&&j>=K.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const n=T(t);null!=_&&"change"===_.type||(_=$("change",v,W),K.hunkContent.push(_)),W++,j++,w&&I.additionLines.push(n),_.additions++,D++,B="addition"}else if("deletion"===s){if(L&&H>=K.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const n=T(t);null!=_&&"change"===_.type||(_=$("change",v,W),K.hunkContent.push(_)),v++,H++,w&&I.deletionLines.push(n),_.deletions++,M++,B="deletion"}else if("context"===s){if(L&&(H>=K.deletionCount||j>=K.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const n=T(t);null!=_&&"context"===_.type||(_=$("context",v,W),K.hunkContent.push(_)),W++,v++,j++,H++,w&&(I.deletionLines.push(n),I.additionLines.push(n)),_.lines++,B="context"}else if("metadata"===s&&null!=_){if("context"===_.type?(K.noEOFCRAdditions=!0,K.noEOFCRDeletions=!0):"deletion"===B?K.noEOFCRDeletions=!0:"addition"===B&&(K.noEOFCRAdditions=!0),w&&("addition"===B||"context"===B)){const n=I.additionLines.length-1;n>=0&&(I.additionLines[n]=(0,l.cleanLastNewline)(I.additionLines[n]))}if(w&&("deletion"===B||"context"===B)){const n=I.deletionLines.length-1;n>=0&&(I.deletionLines[n]=(0,l.cleanLastNewline)(I.deletionLines[n]))}}}if(j!==K.additionCount||H!==K.deletionCount){if(L)throw Error("parsePatchContent: hunk line count mismatch");console.error(`parsePatchContent: hunk line count mismatch: "${k.trimEnd()}", declared old/new ${K.deletionCount}/${K.additionCount}, parsed old/new ${H}/${j}`);const n=(0,t.getHunkSideStartBoundary)(K.additionStart,K.additionCount)+(0===j?0:1),o=(0,t.getHunkSideStartBoundary)(K.deletionStart,K.deletionCount)+(0===H?0:1);if(!w){const t=n-K.additionStart,l=o-K.deletionStart;K.additionLineIndex+=t,K.deletionLineIndex+=l;for(const n of K.hunkContent)n.additionLineIndex+=t,n.deletionLineIndex+=l}K.additionStart=n,K.deletionStart=o,K.additionCount=j,K.deletionCount=H}K.additionLines=D,K.deletionLines=M,K.collapsedBefore=Math.max((0,t.getHunkSideStartBoundary)(K.additionStart,K.additionCount)-S,0),I.hunks.push(K),S=(0,t.getHunkSideEndBoundary)(K.additionStart,K.additionCount);for(const n of K.hunkContent)"context"===n.type?(K.splitLineCount+=n.lines,K.unifiedLineCount+=n.lines):(K.splitLineCount+=Math.max(n.additions,n.deletions),K.unifiedLineCount+=n.deletions+n.additions);K.splitLineStart=I.splitLineCount+K.collapsedBefore,K.unifiedLineStart=I.unifiedLineCount+K.collapsedBefore,I.splitLineCount+=K.collapsedBefore+K.splitLineCount,I.unifiedLineCount+=K.collapsedBefore+K.unifiedLineCount}if(null!=I){if(L&&w&&!f&&0===I.hunks.length)throw Error("parsePatchContent: unified file has no hunks");if(I.hunks.length>0&&!w&&I.additionLines.length>0&&I.deletionLines.length>0){const n=I.hunks[I.hunks.length-1],o=(0,t.getHunkSideEndBoundary)(n.additionStart,n.additionCount),l=I.additionLines.length,s=Math.max(l-o,0);I.splitLineCount+=s,I.unifiedLineCount+=s}return f||(null!=I.prevName&&I.name!==I.prevName?I.hunks.length>0?I.type="rename-changed":I.type="rename-pure":null!=p&&""!==p.contents||null==C||""===C.contents?null==p||""===p.contents||null!=C&&""!==C.contents||(I.type="deleted"):I.type="new"),"rename-pure"!==I.type&&"rename-changed"!==I.type&&(I.prevName=void 0),(0,c.realignChangeContentBySimilarity)(I),I}}function S(t,o,l=!1){const u=[],c=k(t)?t.split(n.COMMIT_METADATA_SPLIT):[t];for(const n of c)try{u.push(p(n,o,l,null!=o?u.length:void 0))}catch(n){if(l)throw n;console.error(n)}finally{(0,s.releaseStringDetachBuffer)()}return u}function y(n,t=!1){const o=n.trim(),l=o.startsWith("\"")?(0,u.parseQuotedDiffFileName)(o)?.fileName??o:o;return t&&(l.startsWith("a/")||l.startsWith("b/"))?l.slice(2):l}function k(n){return n.startsWith("From ")||n.includes("\nFrom ")}function x(n){const t=E(n);for(let n=0;n<t.length;n++)t[n]=(0,s.detachString)(t[n]);return t}function E(n){if(0===n.length)return[""];const t=[];let o=0;for(;;){const l=n.indexOf("\n",o);if(-1===l)break;t.push(n.slice(o,l+1)),o=l+1}return o<n.length&&t.push(n.slice(o)),t}function I(n){if(0===n.length)return[""];const t=[];let o=0,l=0,s=0,u=0,c=!1;for(;l<n.length;){const h=P(n,l);if(s<=0&&u<=0){if(v(n,l)){l>o&&t.push(n.slice(o,l)),o=l,c=!0,l=P(n,h);continue}if(c&&n.startsWith("@@ -",l)){const t=O(n.slice(l,h));null!=t&&(s=t.deletionCount,u=t.additionCount)}l=h;continue}const f=n[l];"\\"!==f?(" "===f?(s=Math.max(s-1,0),u=Math.max(u-1,0)):"-"===f?s=Math.max(s-1,0):"+"===f&&(u=Math.max(u-1,0)),l=h):l=h}return t.push(n.slice(o)),t}function w(n){return v(n,0)}function v(n,t){const o=P(n,t);return W(n,t,"---")&&W(n,o,"+++")}function W(n,t,o){if(!n.startsWith(o,t))return!1;const l=n[t+o.length];if(" "!==l&&"\t"!==l)return!1;for(let l=t+o.length+1;l<n.length;l++){const t=n[l];if("\n"===t||"\r"===t)break;if(" "!==t&&"\t"!==t)return!0}return!1}function P(n,t){const o=n.indexOf("\n",t);return-1===o?n.length:o+1}function b(n){const t=n[0];return"+"===t||"-"===t||" "===t}function F(n){if(!n.startsWith("--"))return!1;for(let t=2;t<n.length;t++){const o=n[t];if(" "!==o&&"\t"!==o&&"\n"!==o&&"\r"!==o)return!1}return!0}function O(n){if(!n.startsWith("@@ -"))return;let t=4;const o=_(n,t);if(null==o)return;const l=o.value;t=o.endIndex;let s=1;if(","===n[t]){const o=_(n,t+1);if(null==o)return;s=o.value,t=o.endIndex}if(" "!==n[t]||"+"!==n[t+1])return;t+=2;const u=_(n,t);if(null==u)return;const c=u.value;t=u.endIndex;let h,f=1;if(","===n[t]){const o=_(n,t+1);if(null==o)return;f=o.value,t=o.endIndex}if(" "!==n[t]||"@"!==n[t+1]||"@"!==n[t+2])return;const p=t+3;return" "===n[p]&&(h=B(n.slice(p+1))),{additionCount:f,additionStart:c,deletionCount:s,deletionStart:l,hunkContext:h}}function _(n,t){let o=t,l=0;for(;o<n.length;o++){const t=n.charCodeAt(o)-48;if(t<0||t>9)break;l=10*l+t}if(o!==t)return{value:l,endIndex:o}}function B(n){return n.endsWith("\r\n")?n.slice(0,-2):n.endsWith("\n")?n.slice(0,-1):n}function D(n){return n.startsWith("diff --git")||n.includes("\ndiff --git")}function M(n,t){if(0===n.length)return[""];const o=`\n${t}`,l=n.startsWith(t)?0:A(n,o,0);if(-1===l)return[n];const s=[];l>0&&s.push(n.slice(0,l));let u=l;for(;;){const t=A(n,o,u+1);if(-1===t)break;s.push(n.slice(u,t)),u=t}return s.push(n.slice(u)),s}function A(n,t,o){const l=n.indexOf(t,o);return-1===l?-1:l+1}function N(n){return null==n?n:(0,s.detachString)(n)}function R(n){return" "===n?"context":"\\"===n?"metadata":"+"===n?"addition":"deletion"}function T(n){const t=n.slice(1);return(0,s.detachString)(""===t?"\n":t)}function $(n,t,o){return"change"===n?{type:"change",additions:0,deletions:0,additionLineIndex:o,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:o,deletionLineIndex:t}}},1343,[1148,1338,1339,1341,1342,1344,1345]);
245
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"parseQuotedDiffFileName",{enumerable:!0,get:function(){return o}});const n=new TextDecoder("utf-8",{ignoreBOM:!0}),t={"\"":"\"","\\":"\\",a:"\x07",b:"\b",t:"\t",n:"\n",v:"\v",f:"\f",r:"\r"};function o(o){if("\""!==o[0])return;let u="",f=1;for(;f<o.length;){const l=o[f];if("\""===l)return{fileName:u,rawLength:f+1};if("\\"!==l){u+=l,f++;continue}const s=t[o[f+1]];if(null!=s){u+=s,f+=2;continue}const h=[];do{const n=c(o,f+1);if(null==n)return;h.push(n),f+=4}while("\\"===o[f]&&o[f+1]>="0"&&o[f+1]<="7");u+=n.decode(new Uint8Array(h))}}function c(n,t){const o=n.charCodeAt(t)-48,c=n.charCodeAt(t+1)-48,u=n.charCodeAt(t+2)-48;if(o>=0&&o<=3&&c>=0&&c<=7&&u>=0&&u<=7)return 64*o+8*c+u}},1344,[]);
246
- __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"realignChangeContentBySimilarity",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"slideBlankBoundaryBlocksUp",{enumerable:!0,get:function(){return l}});const n=4096,t=.5;function o(n){for(const t of n.hunks)for(let o=0;o<t.hunkContent.length;o++){const l=t.hunkContent[o];if("change"!==l.type)continue;const c=s(n,l);null!=c&&(t.hunkContent.splice(o,1,...c),o+=c.length-1)}}function l(n,t,o){const{hunkContent:l}=n;for(let n=1;n<l.length;n++){const s=l[n],c=l[n-1];if("change"!==s.type||s.additions>0&&s.deletions>0||"context"!==c.type)continue;const u=s.additions>0,a=u?t.additionLines:t.deletionLines,f=u?s.additionLineIndex:s.deletionLineIndex,h=u?s.additions:s.deletions,L=a[f]??"";if(""!==L.trim())continue;let x=!0;for(let n=1;n<h;n++)if(a[f+n]!==L){x=!1;break}if(!x)continue;let p=0;for(;p<c.lines&&t.additionLines[c.additionLineIndex+c.lines-1-p]===L;)p++;if(0===p)continue;if(1===n&&p===c.lines)continue;if(null!=o&&(p=o(s,p),0===p))continue;s.additionLineIndex-=p,s.deletionLineIndex-=p;const I=s.additionLineIndex+s.additions,y=s.deletionLineIndex+s.deletions,k=l[n+1];"context"===k?.type?(k.lines+=p,k.additionLineIndex=I,k.deletionLineIndex=y):l.splice(n+1,0,{type:"context",lines:p,additionLineIndex:I,deletionLineIndex:y}),c.lines-=p,0===c.lines&&(l.splice(n-1,1),n--)}}function s(o,l){const{deletions:s,additions:c,deletionLineIndex:f,additionLineIndex:h}=l,L=Math.min(s,c),x=Math.abs(c-s);if(0===L||0===x||L*(x+1)>n)return null;const p=[];for(let n=0;n<s;n++)p.push(u(o.deletionLines[f+n]??""));const I=[];for(let n=0;n<c;n++)I.push(u(o.additionLines[h+n]??""));const y=c>s;let k=0,b=-1;for(let n=0;n<=x;n++){let o=0;for(let t=0;t<L;t++)o+=a(p[t+(y?0:n)],I[t+(y?n:0)]);0===n?b=o+L*t:o>b&&(b=o,k=n)}if(0===k)return null;const C=[],M=(n,t,o,l)=>{(n>0||t>0)&&C.push({type:"change",deletions:n,additions:t,deletionLineIndex:o,additionLineIndex:l})};return y?(M(0,k,f,h),M(L,L,f,h+k),M(0,c-L-k,f+L,h+k+L)):(M(k,0,f,h),M(L,L,f+k,h),M(s-L-k,0,f+k+L,h+L)),C}const c=/\s+/g;function u(n){return n.replace(c,"")}function a(n,t){if(n===t)return 1;const o=Math.max(n.length,t.length),l=Math.min(n.length,t.length);if(0===l)return 0;let s=0;for(;s<l&&n[s]===t[s];)s++;let c=0;for(;c<l-s&&n[n.length-1-c]===t[t.length-1-c];)c++;return(s+c)/o}},1345,[]);
247
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"parseDiffFromFile",{enumerable:!0,get:function(){return c}});var n=r(d[0]),l=r(d[1]),o=r(d[2]);const t="/dev/null";function c(t,c,s,f=!1){if(null===t&&null===c)throw new Error("parseDiffFromFile: You must pass oldFile, newFile, or both");const h=t??u(),p=c??u(),F=(0,o.createTwoFilesPatch)(h.name,p.name,h.contents,p.contents,h.header,p.header,s),v=(0,l.processFile)(F,{cacheKey:(()=>{const l=t?.cacheKey,o=c?.cacheKey;return null!=l&&null!=o?(0,n.composeCacheKey)("diff",l,o):void 0})(),oldFile:h,newFile:p,throwOnError:f});if(null==v)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");null===t?(v.type="new",v.prevName=void 0):null===c&&(v.type="deleted",v.prevName=void 0);const y=c?.lang??(null===c?t?.lang:void 0);return null!=y&&(v.lang=y),v}function u(){return{name:t,contents:""}}},1346,[1339,1343,1347]);
248
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Diff",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(_e,"diffChars",{enumerable:!0,get:function(){return f.diffChars}}),Object.defineProperty(_e,"characterDiff",{enumerable:!0,get:function(){return f.characterDiff}}),Object.defineProperty(_e,"diffWords",{enumerable:!0,get:function(){return c.diffWords}}),Object.defineProperty(_e,"wordDiff",{enumerable:!0,get:function(){return c.wordDiff}}),Object.defineProperty(_e,"diffWordsWithSpace",{enumerable:!0,get:function(){return c.diffWordsWithSpace}}),Object.defineProperty(_e,"wordsWithSpaceDiff",{enumerable:!0,get:function(){return c.wordsWithSpaceDiff}}),Object.defineProperty(_e,"diffLines",{enumerable:!0,get:function(){return u.diffLines}}),Object.defineProperty(_e,"lineDiff",{enumerable:!0,get:function(){return u.lineDiff}}),Object.defineProperty(_e,"diffTrimmedLines",{enumerable:!0,get:function(){return u.diffTrimmedLines}}),Object.defineProperty(_e,"diffSentences",{enumerable:!0,get:function(){return o.diffSentences}}),Object.defineProperty(_e,"sentenceDiff",{enumerable:!0,get:function(){return o.sentenceDiff}}),Object.defineProperty(_e,"diffCss",{enumerable:!0,get:function(){return b.diffCss}}),Object.defineProperty(_e,"cssDiff",{enumerable:!0,get:function(){return b.cssDiff}}),Object.defineProperty(_e,"diffJson",{enumerable:!0,get:function(){return P.diffJson}}),Object.defineProperty(_e,"jsonDiff",{enumerable:!0,get:function(){return P.jsonDiff}}),Object.defineProperty(_e,"diffArrays",{enumerable:!0,get:function(){return s.diffArrays}}),Object.defineProperty(_e,"arrayDiff",{enumerable:!0,get:function(){return s.arrayDiff}}),Object.defineProperty(_e,"structuredPatch",{enumerable:!0,get:function(){return O.structuredPatch}}),Object.defineProperty(_e,"createTwoFilesPatch",{enumerable:!0,get:function(){return O.createTwoFilesPatch}}),Object.defineProperty(_e,"createPatch",{enumerable:!0,get:function(){return O.createPatch}}),Object.defineProperty(_e,"formatPatch",{enumerable:!0,get:function(){return O.formatPatch}}),Object.defineProperty(_e,"INCLUDE_HEADERS",{enumerable:!0,get:function(){return O.INCLUDE_HEADERS}}),Object.defineProperty(_e,"FILE_HEADERS_ONLY",{enumerable:!0,get:function(){return O.FILE_HEADERS_ONLY}}),Object.defineProperty(_e,"OMIT_HEADERS",{enumerable:!0,get:function(){return O.OMIT_HEADERS}}),Object.defineProperty(_e,"applyPatch",{enumerable:!0,get:function(){return l.applyPatch}}),Object.defineProperty(_e,"applyPatches",{enumerable:!0,get:function(){return l.applyPatches}}),Object.defineProperty(_e,"parsePatch",{enumerable:!0,get:function(){return p.parsePatch}}),Object.defineProperty(_e,"reversePatch",{enumerable:!0,get:function(){return y.reversePatch}}),Object.defineProperty(_e,"convertChangesToDMP",{enumerable:!0,get:function(){return j.convertChangesToDMP}}),Object.defineProperty(_e,"convertChangesToXML",{enumerable:!0,get:function(){return h.convertChangesToXML}}),Object.defineProperty(_e,"canonicalize",{enumerable:!0,get:function(){return P.canonicalize}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e},f=r(d[1]),c=r(d[2]),u=r(d[3]),o=r(d[4]),b=r(d[5]),P=r(d[6]),s=r(d[7]),l=r(d[8]),p=r(d[9]),y=r(d[10]),O=r(d[11]),j=r(d[12]),h=r(d[13])},1347,[1348,1349,1350,1352,1354,1355,1356,1357,1358,1360,1362,1363,1364,1365]);
249
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});class t{diff(t,o,n={}){let s;'function'==typeof n?(s=n,n={}):'callback'in n&&(s=n.callback);const i=this.castInput(t,n),l=this.castInput(o,n),u=this.removeEmpty(this.tokenize(i,n)),c=this.removeEmpty(this.tokenize(l,n));return this.diffWithOptionsObj(u,c,n,s)}diffWithOptionsObj(t,o,n,s){var i;const l=t=>(t=this.postProcess(t,n),s?void setTimeout(function(){s(t)},0):t),u=o.length,c=t.length;let h=1,p=u+c;null!=n.maxEditLength&&(p=Math.min(p,n.maxEditLength));const f=null!==(i=n.timeout)&&void 0!==i?i:1/0,v=Date.now()+f,C=[{oldPos:-1,lastComponent:void 0}];let P=this.extractCommon(C[0],o,t,0,n);if(C[0].oldPos+1>=c&&P+1>=u)return l(this.buildValues(C[0].lastComponent,o,t));let b=-1/0,k=1/0;const T=()=>{for(let s=Math.max(b,-h);s<=Math.min(k,h);s+=2){let i;const h=C[s-1],p=C[s+1];h&&(C[s-1]=void 0);let f=!1;if(p){const t=p.oldPos-s;f=p&&0<=t&&t<u}const v=h&&h.oldPos+1<c;if(f||v){if(i=!v||f&&h.oldPos<p.oldPos?this.addToPath(p,!0,!1,0,n):this.addToPath(h,!1,!0,1,n),P=this.extractCommon(i,o,t,s,n),i.oldPos+1>=c&&P+1>=u)return l(this.buildValues(i.lastComponent,o,t))||!0;C[s]=i,i.oldPos+1>=c&&(k=Math.min(k,s-1)),P+1>=u&&(b=Math.max(b,s+1))}else C[s]=void 0}h++};if(s)!(function t(){setTimeout(function(){if(h>p||Date.now()>v)return s(void 0);T()||t()},0)})();else for(;h<=p&&Date.now()<=v;){const t=T();if(t)return t}}addToPath(t,o,n,s,i){const l=t.lastComponent;return l&&!i.oneChangePerToken&&l.added===o&&l.removed===n?{oldPos:t.oldPos+s,lastComponent:{count:l.count+1,added:o,removed:n,previousComponent:l.previousComponent}}:{oldPos:t.oldPos+s,lastComponent:{count:1,added:o,removed:n,previousComponent:l}}}extractCommon(t,o,n,s,i){const l=o.length,u=n.length;let c=t.oldPos,h=c-s,p=0;for(;h+1<l&&c+1<u&&this.equals(n[c+1],o[h+1],i);)h++,c++,p++,i.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return p&&!i.oneChangePerToken&&(t.lastComponent={count:p,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,h}equals(t,o,n){return n.comparator?n.comparator(t,o):t===o||!!n.ignoreCase&&t.toLowerCase()===o.toLowerCase()}removeEmpty(t){const o=[];for(let n=0;n<t.length;n++)t[n]&&o.push(t[n]);return o}castInput(t,o){return t}tokenize(t,o){return Array.from(t)}join(t){return t.join('')}postProcess(t,o){return t}get useLongestToken(){return!1}buildValues(t,o,n){const s=[];let i;for(;t;)s.push(t),i=t.previousComponent,delete t.previousComponent,t=i;s.reverse();const l=s.length;let u=0,c=0,h=0;for(;u<l;u++){const t=s[u];if(t.removed)t.value=this.join(n.slice(h,h+t.count)),h+=t.count;else{if(!t.added&&this.useLongestToken){let s=o.slice(c,c+t.count);s=s.map(function(t,o){const s=n[h+o];return s.length>t.length?s:t}),t.value=this.join(s)}else t.value=this.join(o.slice(c,c+t.count));c+=t.count,t.added||(h+=t.count)}}return s}}},1348,[]);
250
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"characterDiff",{enumerable:!0,get:function(){return u}}),_e.diffChars=function(e,t,n){return u.diff(e,t,n)};var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};class f extends n.default{}const u=new f},1349,[1348]);
251
- __d(function(g,r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"wordDiff",{enumerable:!0,get:function(){return s}}),_e.diffWords=function(e,n,l){if(null!=(null==l?void 0:l.ignoreWhitespace)&&!l.ignoreWhitespace)return p(e,n,l);return s.diff(e,n,l)},Object.defineProperty(_e,"wordsWithSpaceDiff",{enumerable:!0,get:function(){return c}}),_e.diffWordsWithSpace=p;var e,n=r(d[0]),l=(e=n)&&e.__esModule?e:{default:e},u=r(d[1]);const t='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}',i=new RegExp(`[${t}]+|\\s+|[^${t}]`,'ug');class o extends l.default{equals(e,n,l){return l.ignoreCase&&(e=e.toLowerCase(),n=n.toLowerCase()),e.trim()===n.trim()}tokenize(e,n={}){let l;if(n.intlSegmenter){const t=n.intlSegmenter;if('word'!=t.resolvedOptions().granularity)throw new Error('The segmenter passed must have a granularity of "word"');l=(0,u.segment)(e,t)}else l=e.match(i)||[];const t=[];let o=null;return l.forEach(e=>{/\s/.test(e)?null==o?t.push(e):t.push(t.pop()+e):null!=o&&/\s/.test(o)?t[t.length-1]==o?t.push(t.pop()+e):t.push(o+e):t.push(e),o=e}),t}join(e){return e.map((e,n)=>0==n?e:e.replace(/^\s+/,'')).join('')}postProcess(e,n){if(!e||n.oneChangePerToken)return e;let l=null,u=null,t=null;return e.forEach(e=>{e.added?u=e:e.removed?t=e:((u||t)&&f(l,t,u,e,n.intlSegmenter),l=e,u=null,t=null)}),(u||t)&&f(l,t,u,null,n.intlSegmenter),e}}const s=new o;function f(e,n,l,t,i){if(n&&l){const[o,s]=(0,u.leadingAndTrailingWs)(n.value,i),[f,v]=(0,u.leadingAndTrailingWs)(l.value,i);if(e){const t=(0,u.longestCommonPrefix)(o,f);e.value=(0,u.replaceSuffix)(e.value,f,t),n.value=(0,u.removePrefix)(n.value,t),l.value=(0,u.removePrefix)(l.value,t)}if(t){const e=(0,u.longestCommonSuffix)(s,v);t.value=(0,u.replacePrefix)(t.value,v,e),n.value=(0,u.removeSuffix)(n.value,e),l.value=(0,u.removeSuffix)(l.value,e)}}else if(l){if(e){const e=(0,u.leadingWs)(l.value,i);l.value=l.value.substring(e.length)}if(t){const e=(0,u.leadingWs)(t.value,i);t.value=t.value.substring(e.length)}}else if(e&&t){const l=(0,u.leadingWs)(t.value,i),[o,s]=(0,u.leadingAndTrailingWs)(n.value,i),f=(0,u.longestCommonPrefix)(l,o);n.value=(0,u.removePrefix)(n.value,f);const v=(0,u.longestCommonSuffix)((0,u.removePrefix)(l,f),s);n.value=(0,u.removeSuffix)(n.value,v),t.value=(0,u.replacePrefix)(t.value,l,v),e.value=(0,u.replaceSuffix)(e.value,l,l.slice(0,l.length-v.length))}else if(t){const e=(0,u.leadingWs)(t.value,i),l=(0,u.trailingWs)(n.value,i),o=(0,u.maximumOverlap)(l,e);n.value=(0,u.removeSuffix)(n.value,o)}else if(e){const l=(0,u.trailingWs)(e.value,i),t=(0,u.leadingWs)(n.value,i),o=(0,u.maximumOverlap)(l,t);n.value=(0,u.removePrefix)(n.value,o)}}class v extends l.default{tokenize(e){const n=new RegExp(`(\\r?\\n)|[${t}]+|[^\\S\\n\\r]+|[^${t}]`,'ug');return e.match(n)||[]}}const c=new v;function p(e,n,l){return c.diff(e,n,l)}},1350,[1348,1351]);
252
- __d(function(g,r,_i,_a,m,e,d){"use strict";function n(n,t,i){if(n.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(n)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return i+n.slice(t.length)}function t(n,t,i){if(!t)return n+i;if(n.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(n)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return n.slice(0,-t.length)+i}function i(n,t){let i=0;n.length>t.length&&(i=n.length-t.length);let s=t.length;n.length<t.length&&(s=n.length);const l=Array(s);let o=0;l[0]=0;for(let n=1;n<s;n++){for(t[n]==t[o]?l[n]=l[o]:l[n]=o;o>0&&t[n]!=t[o];)o=l[o];t[n]==t[o]&&o++}o=0;for(let s=i;s<n.length;s++){for(;o>0&&n[s]!=t[o];)o=l[o];n[s]==t[o]&&o++}return o}function s(n,t){const i=[];for(const s of Array.from(t.segment(n))){const n=s.segment;i.length&&/\s/.test(i[i.length-1])&&/\s/.test(n)?i[i.length-1]+=n:i.push(n)}return i}function l(n,t){if(t)return u(n,t)[1];let i;for(i=n.length-1;i>=0&&n[i].match(/\s/);i--);return n.substring(i+1)}function o(n,t){if(t)return u(n,t)[0];const i=n.match(/^\s*/);return i?i[0]:''}function u(n,t){if(!t)return[o(n),l(n)];if('word'!=t.resolvedOptions().granularity)throw new Error('The segmenter passed must have a granularity of "word"');const i=s(n,t),u=i[0],f=i[i.length-1];return[/\s/.test(u)?u:'',/\s/.test(f)?f:'']}Object.defineProperty(e,'__esModule',{value:!0}),e.longestCommonPrefix=function(n,t){let i;for(i=0;i<n.length&&i<t.length;i++)if(n[i]!=t[i])return n.slice(0,i);return n.slice(0,i)},e.longestCommonSuffix=function(n,t){let i;if(!n||!t||n[n.length-1]!=t[t.length-1])return'';for(i=0;i<n.length&&i<t.length;i++)if(n[n.length-(i+1)]!=t[t.length-(i+1)])return n.slice(-i);return n.slice(-i)},e.replacePrefix=n,e.replaceSuffix=t,e.removePrefix=function(t,i){return n(t,i,'')},e.removeSuffix=function(n,i){return t(n,i,'')},e.maximumOverlap=function(n,t){return t.slice(0,i(n,t))},e.hasOnlyWinLineEndings=function(n){return n.includes('\r\n')&&!n.startsWith('\n')&&!n.match(/[^\r]\n/)},e.hasOnlyUnixLineEndings=function(n){return!n.includes('\r\n')&&n.includes('\n')},e.segment=s,e.trailingWs=l,e.leadingWs=o,e.leadingAndTrailingWs=u},1351,[]);
253
- __d(function(g,r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"lineDiff",{enumerable:!0,get:function(){return o}}),_e.diffLines=function(e,n,i){return o.diff(e,n,i)},_e.diffTrimmedLines=function(e,n,i){return i=(0,t.generateOptions)(i,{ignoreWhitespace:!0}),o.diff(e,n,i)},_e.tokenize=l;var e,n=r(d[0]),i=(e=n)&&e.__esModule?e:{default:e},t=r(d[1]);class s extends i.default{constructor(){super(...arguments),this.tokenize=l}equals(e,n,i){return i.ignoreWhitespace?(i.newlineIsToken&&e.includes('\n')||(e=e.trim()),i.newlineIsToken&&n.includes('\n')||(n=n.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(e.endsWith('\n')&&(e=e.slice(0,-1)),n.endsWith('\n')&&(n=n.slice(0,-1))),super.equals(e,n,i)}}const o=new s;function l(e,n){n.stripTrailingCr&&(e=e.replace(/\r\n/g,'\n'));const i=[],t=e.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(let e=0;e<t.length;e++){const s=t[e];e%2&&!n.newlineIsToken?i[i.length-1]+=s:i.push(s)}return i}},1352,[1348,1353]);
254
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.generateOptions=function(t,n){if('function'==typeof t)n.callback=t;else if(t)for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}},1353,[]);
255
- __d(function(g,r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"sentenceDiff",{enumerable:!0,get:function(){return f}}),_e.diffSentences=function(e,t,n){return f.diff(e,t,n)};var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};function s(e){return'.'==e||'!'==e||'?'==e}class u extends n.default{tokenize(e){var t;const n=[];let u=0;for(let f=0;f<e.length;f++){if(f==e.length-1){n.push(e.slice(u));break}if(s(e[f])&&e[f+1].match(/\s/)){for(n.push(e.slice(u,f+1)),f=u=f+1;null===(t=e[f+1])||void 0===t?void 0:t.match(/\s/);)f++;n.push(e.slice(u,f+1)),u=f+1}}return n}}const f=new u},1354,[1348]);
256
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"cssDiff",{enumerable:!0,get:function(){return f}}),_e.diffCss=function(e,t,n){return f.diff(e,t,n)};var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};class s extends n.default{tokenize(e){return e.split(/([{}:;,]|\s+)/)}}const f=new s},1355,[1348]);
257
- __d(function(g,r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"jsonDiff",{enumerable:!0,get:function(){return l}}),_e.diffJson=function(e,t,n){return l.diff(e,t,n)},_e.canonicalize=s;var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e},o=r(d[1]);class u extends n.default{constructor(){super(...arguments),this.tokenize=o.tokenize}get useLongestToken(){return!0}castInput(e,t){const{undefinedReplacement:n,stringifyReplacer:o=(e,t)=>void 0===t?n:t}=t;return'string'==typeof e?e:JSON.stringify(s(e,null,null,o),null,' ')}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,'$1'),t.replace(/,([\r\n])/g,'$1'),n)}}const l=new u;function s(e,t,n,o,u){let l,i;for(t=t||[],n=n||[],o&&(e=o(void 0===u?'':u,e)),l=0;l<t.length;l+=1)if(t[l]===e)return n[l];if('[object Array]'===Object.prototype.toString.call(e)){for(t.push(e),i=new Array(e.length),n.push(i),l=0;l<e.length;l+=1)i[l]=s(e[l],t,n,o,String(l));return t.pop(),n.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),'object'==typeof e&&null!==e){t.push(e),i={},n.push(i);const u=[];let p;for(p in e)Object.prototype.hasOwnProperty.call(e,p)&&u.push(p);for(u.sort(),l=0;l<u.length;l+=1)p=u[l],i[p]=s(e[p],t,n,o,p);t.pop(),n.pop()}else i=e;return i}},1356,[1348,1352]);
258
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"arrayDiff",{enumerable:!0,get:function(){return f}}),_e.diffArrays=function(e,t,n){return f.diff(e,t,n)};var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};class u extends n.default{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}}const f=new u},1357,[1348]);
259
- __d(function(g,r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.applyPatch=s,_e.applyPatches=function(n,e){const t='string'==typeof n?(0,i.parsePatch)(n):n;let l=0;!(function n(){const i=t[l++];if(!i)return e.complete();e.loadFile(i,function(t,l){if(t)return e.complete(t);const o=s(l,i,e);e.patched(i,o,function(t){if(t)return e.complete(t);n()})})})()};var n,e=r(d[0]),t=r(d[1]),i=r(d[2]),l=r(d[3]),o=(n=l)&&n.__esModule?n:{default:n};function s(n,e,t={}){let l;if(l='string'==typeof e?(0,i.parsePatch)(e):Array.isArray(e)?e:[e],l.length>1)throw new Error('applyPatch only works with a single input.');return u(n,l[0],t)}function u(n,i,l={}){(l.autoConvertLineEndings||null==l.autoConvertLineEndings)&&((0,e.hasOnlyWinLineEndings)(n)&&(0,t.isUnix)(i)?i=(0,t.unixToWin)(i):(0,e.hasOnlyUnixLineEndings)(n)&&(0,t.isWin)(i)&&(i=(0,t.winToUnix)(i)));const s=n.split('\n'),u=i.hunks,f=l.compareLine||((n,e,t,i)=>e===i),c=l.fuzzFactor||0;let h=0;if(c<0||!Number.isInteger(c))throw new Error('fuzzFactor must be a non-negative integer');if(!u.length)return n;let p='',L=!1,y=!1;for(let n=0;n<u[u.length-1].lines.length;n++){const e=u[u.length-1].lines[n];'\\'==e[0]&&('+'==p[0]?L=!0:'-'==p[0]&&(y=!0)),p=e}if(L){if(y){if(!c&&''==s[s.length-1])return!1}else if(''==s[s.length-1])s.pop();else if(!c)return!1}else if(y)if(''!=s[s.length-1])s.push('');else if(!c)return!1;function w(n,e,t,i=0,l=!0,o=[],u=0){let c=0,h=!1;for(;i<n.length;i++){const p=n[i],L=p.length>0?p[0]:' ',y=p.length>0?p.substr(1):p;if('-'===L){if(!f(e+1,s[e],L,y))return t&&null!=s[e]?(o[u]=s[e],w(n,e+1,t-1,i,!1,o,u+1)):null;e++,c=0}if('+'===L){if(!l)return null;o[u]=y,u++,c=0,h=!0}if(' '===L){if(c++,o[u]=s[e],!f(e+1,s[e],L,y))return h||!t?null:s[e]&&(w(n,e+1,t-1,i+1,!1,o,u+1)||w(n,e+1,t-1,i,!1,o,u+1))||w(n,e,t-1,i+1,!1,o,u);u++,l=!0,h=!1,e++}}return u-=c,e-=c,o.length=u,{patchedLines:o,oldLineLastI:e-1}}const v=[];let E=0;for(let n=0;n<u.length;n++){const e=u[n];let t;const i=s.length-e.oldLines+c;let l;for(let n=0;n<=c;n++){l=e.oldStart+E-1;const s=(0,o.default)(l,h,i);for(;void 0!==l&&(t=w(e.lines,l,n),!t);l=s());if(t)break}if(!t)return!1;for(let n=h;n<l;n++)v.push(s[n]);for(let n=0;n<t.patchedLines.length;n++){const e=t.patchedLines[n];v.push(e)}h=t.oldLineLastI+1,E=l+1-e.oldStart}for(let n=h;n<s.length;n++)v.push(s[n]);return v.join('\n')}},1358,[1351,1359,1360,1361]);
260
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.unixToWin=function s(n){if(Array.isArray(n))return n.map(n=>s(n));return Object.assign(Object.assign({},n),{hunks:n.hunks.map(s=>Object.assign(Object.assign({},s),{lines:s.lines.map((n,i)=>{var t;return n.startsWith('\\')||n.endsWith('\r')||(null===(t=s.lines[i+1])||void 0===t?void 0:t.startsWith('\\'))?n:n+'\r'})}))})},e.winToUnix=function s(n){if(Array.isArray(n))return n.map(n=>s(n));return Object.assign(Object.assign({},n),{hunks:n.hunks.map(s=>Object.assign(Object.assign({},s),{lines:s.lines.map(s=>s.endsWith('\r')?s.substring(0,s.length-1):s)}))})},e.isUnix=function(s){Array.isArray(s)||(s=[s]);return!s.some(s=>s.hunks.some(s=>s.lines.some(s=>!s.startsWith('\\')&&s.endsWith('\r'))))},e.isWin=function(s){Array.isArray(s)||(s=[s]);return s.some(s=>s.hunks.some(s=>s.lines.some(s=>s.endsWith('\r'))))&&s.every(s=>s.hunks.every(s=>s.lines.every((n,i)=>{var t;return n.startsWith('\\')||n.endsWith('\r')||(null===(t=s.lines[i+1])||void 0===t?void 0:t.startsWith('\\'))})))}},1359,[]);
261
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.parsePatch=function(n){const t=n.split(/\n/),i=[];let s=0;function l(n){return/^diff --git /.test(n)}function o(n){return l(n)||/^Index:\s/.test(n)||/^diff(?: -r \w+)+\s/.test(n)}function c(n){return/^(---|\+\+\+)\s/.test(n)}function u(n){return/^@@\s/.test(n)}function f(){var n;const f={hunks:[]};i.push(f);let b=!1;for(;s<t.length;){const n=t[s];if(c(n)||u(n))break;if(l(n)){if(b)return;b=!0,f.isGit=!0;const i=h(n);for(i&&(f.oldFileName=i.oldFileName,f.newFileName=i.newFileName),s++;s<t.length;){const n=t[s];if(c(n)||u(n)||o(n))break;const i=/^rename from (.*)/.exec(n);i&&(f.oldFileName='a/'+w(i[1]),f.isRename=!0);const l=/^rename to (.*)/.exec(n);l&&(f.newFileName='b/'+w(l[1]),f.isRename=!0);const h=/^copy from (.*)/.exec(n);h&&(f.oldFileName='a/'+w(h[1]),f.isCopy=!0);const b=/^copy to (.*)/.exec(n);b&&(f.newFileName='b/'+w(b[1]),f.isCopy=!0);const N=/^new file mode (\d+)/.exec(n);N&&(f.isCreate=!0,f.newMode=N[1]);const F=/^deleted file mode (\d+)/.exec(n);F&&(f.isDelete=!0,f.oldMode=F[1]);const p=/^old mode (\d+)/.exec(n);p&&(f.oldMode=p[1]);const k=/^new mode (\d+)/.exec(n);k&&(f.newMode=k[1]),/^Binary files /.test(n)&&(f.isBinary=!0),s++}continue}if(o(n)){if(b)return;b=!0;const t=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(n);t&&(f.index=n.substring(t[0].length).trim())}s++}if(N(f),N(f),void 0===f.oldFileName!=(void 0===f.newFileName))throw new Error('Missing '+(void 0!==f.oldFileName?'"+++ ..."':'"--- ..."')+' file header for '+(null!==(n=f.oldFileName)&&void 0!==n?n:f.newFileName));for(;s<t.length;){const n=t[s];if(o(n)||c(n)||/^===================================================================/.test(n))break;u(n)?f.hunks.push(F()):s++}}function h(n){const t=n.substring(11);if(t.startsWith('"')){const n=b(t);if(null===n)return null;const i=t.substring(n.rawLength+1);let s;if(i.startsWith('"')){const n=b(i);if(null===n)return null;s=n.fileName}else s=i;return{oldFileName:n.fileName,newFileName:s}}const i=t.indexOf('"');if(i>0){const n=t.substring(0,i-1),s=b(t.substring(i));return null===s?null:{oldFileName:n,newFileName:s.fileName}}if(t.startsWith('a/')){const n=[];let i=0;for(;i=t.indexOf(' b/',i+1),-1!==i;)n.push(i);if(n.length>0){const i=n[Math.floor(n.length/2)];return{oldFileName:t.substring(0,i),newFileName:t.substring(i+1)}}}return null}function w(n){if(n.startsWith('"')){const t=b(n);if(t)return t.fileName}return n}function b(n){if(!n.startsWith('"'))return null;let t='',i=1;for(;i<n.length;){if('"'===n[i])return{fileName:t,rawLength:i+1};if('\\'===n[i]&&i+1<n.length)switch(i++,n[i]){case'a':t+='\x07';break;case'b':t+='\b';break;case'f':t+='\f';break;case'n':t+='\n';break;case'r':t+='\r';break;case't':t+='\t';break;case'v':t+='\v';break;case'\\':t+='\\';break;case'"':t+='"';break;case'0':case'1':case'2':case'3':case'4':case'5':case'6':case'7':{if(i+2>=n.length||n[i+1]<'0'||n[i+1]>'7'||n[i+2]<'0'||n[i+2]>'7')return null;const s=[parseInt(n.substring(i,i+3),8)];for(i+=3;'\\'===n[i]&&n[i+1]>='0'&&n[i+1]<='7';){if(i+3>=n.length||n[i+2]<'0'||n[i+2]>'7'||n[i+3]<'0'||n[i+3]>'7')return null;s.push(parseInt(n.substring(i+1,i+4),8)),i+=4}t+=new TextDecoder('utf-8').decode(new Uint8Array(s));continue}default:return null}else t+=n[i];i++}return null}function N(n){const i=/^(---|\+\+\+)\s+/.exec(t[s]);if(i){const l=i[1],o=t[s].substring(3).trim().split('\t',2),c=(o[1]||'').trim();let u=o[0];u=u.startsWith('"')?w(u):u.replace(/\\\\/g,'\\'),'---'===l?(n.oldFileName=u,n.oldHeader=c):(n.newFileName=u,n.newHeader=c),s++}}function F(){var n;const i=s,l=t[s++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),o={oldStart:+l[1],oldLines:void 0===l[2]?1:+l[2],newStart:+l[3],newLines:void 0===l[4]?1:+l[4],lines:[]};0===o.oldLines&&(o.oldStart+=1),0===o.newLines&&(o.newStart+=1);let u=0,f=0;for(;s<t.length&&(f<o.oldLines||u<o.newLines||(null===(n=t[s])||void 0===n?void 0:n.startsWith('\\')));s++){const n=0==t[s].length&&s!=t.length-1?' ':t[s][0];if('+'!==n&&'-'!==n&&' '!==n&&'\\'!==n)throw new Error(`Hunk at line ${i+1} contained invalid line ${t[s]}`);o.lines.push(t[s]),'+'===n?u++:'-'===n?f++:' '===n&&(u++,f++)}if(u||1!==o.newLines||(o.newLines=0),f||1!==o.oldLines||(o.oldLines=0),u!==o.newLines)throw new Error('Added line count did not match for hunk at line '+(i+1));if(f!==o.oldLines)throw new Error('Removed line count did not match for hunk at line '+(i+1));if(s<t.length&&t[s]&&/^[+ -]/.test(t[s])&&!c(t[s]))throw new Error('Hunk at line '+(i+1)+' has more lines than expected (expected '+o.oldLines+' old lines and '+o.newLines+' new lines)');return o}for(;s<t.length;)f();return i}},1360,[]);
262
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,n,u){let f=!0,c=!1,o=!1,l=1;return function _(){if(f&&!o){if(c?l++:f=!1,t+l<=u)return t+l;o=!0}if(!c)return o||(f=!0),n<=t-l?t-l++:(c=!0,_())}}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}})},1361,[]);
263
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return void 0===t||'/dev/null'===t?t:t.startsWith('a/')?'b/'+t.slice(2):t.startsWith('b/')?'a/'+t.slice(2):t}Object.defineProperty(e,'__esModule',{value:!0}),e.reversePatch=function s(n){if(Array.isArray(n))return n.map(t=>s(t)).reverse();const l=Object.assign(Object.assign({},n),{oldFileName:n.isGit?t(n.newFileName):n.newFileName,oldHeader:n.newHeader,newFileName:n.isGit?t(n.oldFileName):n.oldFileName,newHeader:n.oldHeader,oldMode:n.newMode,newMode:n.oldMode,isCreate:n.isDelete,isDelete:n.isCreate,hunks:n.hunks.map(t=>({oldLines:t.newLines,oldStart:t.newStart,newLines:t.oldLines,newStart:t.oldStart,lines:t.lines.map(t=>t.startsWith('-')?`+${t.slice(1)}`:t.startsWith('+')?`-${t.slice(1)}`:t)}))});n.isCopy&&(l.newFileName='/dev/null',l.newHeader=void 0,l.isDelete=!0,delete l.isCreate,delete l.isCopy,delete l.isRename,l.hunks=[]);return l}},1362,[]);
264
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"INCLUDE_HEADERS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(e,"FILE_HEADERS_ONLY",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"OMIT_HEADERS",{enumerable:!0,get:function(){return s}}),e.structuredPatch=c,e.formatPatch=u,e.createTwoFilesPatch=f,e.createPatch=function(n,t,l,i,o,s){return f(n,n,t,l,i,o,s)};var n=r(d[0]);function t(n){for(let t=0;t<n.length;t++)if(n[t]<' '||n[t]>'~'||'"'===n[t]||'\\'===n[t])return!0;return!1}function l(n){if(!t(n))return n;let l='"';const i=(new TextEncoder).encode(n);let o=0;for(;o<i.length;){const n=i[o];l+=7===n?'\\a':8===n?'\\b':9===n?'\\t':10===n?'\\n':11===n?'\\v':12===n?'\\f':13===n?'\\r':34===n?'\\"':92===n?'\\\\':n>=32&&n<=126?String.fromCharCode(n):'\\'+n.toString(8).padStart(3,'0'),o++}return l+='"',l}const i={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},o={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},s={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function c(t,l,i,o,s,c,u){let f;f=u?'function'==typeof u?{callback:u}:u:{},void 0===f.context&&(f.context=4);const p=f.context;if(f.newlineIsToken)throw new Error('newlineIsToken may not be used with patch-generation functions, only with diffing functions');if(!f.callback)return w((0,n.diffLines)(i,o,f));{const{callback:t}=f;(0,n.diffLines)(i,o,Object.assign(Object.assign({},f),{callback:n=>{const l=w(n);t(l)}}))}function w(n){if(!n)return;function i(n){return n.map(function(n){return' '+n})}n.push({value:'',lines:[]});const o=[];let u=0,f=0,w=[],b=1,F=1;for(let t=0;t<n.length;t++){const l=n[t],s=l.lines||h(l.value);if(l.lines=s,l.added||l.removed){if(!u){const l=n[t-1];u=b,f=F,l&&(w=p>0?i(l.lines.slice(-p)):[],u-=w.length,f-=w.length)}for(const n of s)w.push((l.added?'+':'-')+n);l.added?F+=s.length:b+=s.length}else{if(u)if(s.length<=2*p&&t<n.length-2)for(const n of i(s))w.push(n);else{const n=Math.min(s.length,p);for(const t of i(s.slice(0,n)))w.push(t);const t={oldStart:u,oldLines:b-u+n,newStart:f,newLines:F-f+n,lines:w};o.push(t),u=0,f=0,w=[]}b+=s.length,F+=s.length}}for(const n of o)for(let t=0;t<n.lines.length;t++)n.lines[t].endsWith('\n')?n.lines[t]=n.lines[t].slice(0,-1):(n.lines.splice(t+1,0,'\'),t++);return{oldFileName:t,newFileName:l,oldHeader:s,newHeader:c,hunks:o}}}function u(n,t){var o,s,c,f,h,p;if(t||(t=i),Array.isArray(n)){if(n.length>1&&!t.includeFileHeaders&&!n.every(n=>n.isGit))throw new 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 n.map(n=>u(n,t)).join('\n')}const w=[];if(n.isGit){if(t=i,!n.oldFileName)throw new Error('oldFileName must be specified for Git patches');if(!n.newFileName)throw new Error('newFileName must be specified for Git patches');let u=n.oldFileName,b=n.newFileName;n.isCreate&&'/dev/null'===u?u=b.replace(/^b\//,'a/'):n.isDelete&&'/dev/null'===b&&(b=u.replace(/^a\//,'b/')),w.push('diff --git '+l(u)+' '+l(b)),n.isDelete&&w.push('deleted file mode '+(null!==(o=n.oldMode)&&void 0!==o?o:'100644')),n.isCreate&&w.push('new file mode '+(null!==(s=n.newMode)&&void 0!==s?s:'100644')),n.oldMode&&n.newMode&&!n.isDelete&&!n.isCreate&&(w.push('old mode '+n.oldMode),w.push('new mode '+n.newMode)),n.isRename&&(w.push('rename from '+l((null!==(c=n.oldFileName)&&void 0!==c?c:'').replace(/^a\//,''))),w.push('rename to '+l((null!==(f=n.newFileName)&&void 0!==f?f:'').replace(/^b\//,'')))),n.isCopy&&(w.push('copy from '+l((null!==(h=n.oldFileName)&&void 0!==h?h:'').replace(/^a\//,''))),w.push('copy to '+l((null!==(p=n.newFileName)&&void 0!==p?p:'').replace(/^b\//,''))))}else t.includeIndex&&n.oldFileName==n.newFileName&&void 0!==n.oldFileName&&w.push('Index: '+n.oldFileName),t.includeUnderline&&w.push('===================================================================');const b=n.hunks.length>0;!t.includeFileHeaders||void 0===n.oldFileName||void 0===n.newFileName||n.isGit&&!b||(w.push('--- '+l(n.oldFileName)+(n.oldHeader?'\t'+n.oldHeader:'')),w.push('+++ '+l(n.newFileName)+(n.newHeader?'\t'+n.newHeader:'')));for(let t=0;t<n.hunks.length;t++){const l=n.hunks[t],i=0===l.oldLines?l.oldStart-1:l.oldStart,o=0===l.newLines?l.newStart-1:l.newStart;w.push('@@ -'+i+','+l.oldLines+' +'+o+','+l.newLines+' @@');for(const n of l.lines)w.push(n)}return w.join('\n')+'\n'}function f(n,t,l,i,o,s,f){if('function'==typeof f&&(f={callback:f}),!(null==f?void 0:f.callback)){const h=c(n,t,l,i,o,s,f);if(!h)return;return u(h,null==f?void 0:f.headerOptions)}{const{callback:h}=f;c(n,t,l,i,o,s,Object.assign(Object.assign({},f),{callback:n=>{h(n?u(n,f.headerOptions):void 0)}}))}}function h(n){const t=n.endsWith('\n'),l=n.split('\n').map(n=>n+'\n');return t?l.pop():l.push(l.pop().slice(0,-1)),l}},1363,[1352]);
265
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.convertChangesToDMP=function(t){const n=[];let o,u;for(let c=0;c<t.length;c++)o=t[c],u=o.added?1:o.removed?-1:0,n.push([u,o.value]);return n}},1364,[]);
266
- __d(function(g,r,_i,a,m,e,d){"use strict";function t(t){let n=t;return n=n.replace(/&/g,'&amp;'),n=n.replace(/</g,'&lt;'),n=n.replace(/>/g,'&gt;'),n=n.replace(/"/g,'&quot;'),n}Object.defineProperty(e,'__esModule',{value:!0}),e.convertChangesToXML=function(n){const u=[];for(let o=0;o<n.length;o++){const l=n[o];l.added?u.push('<ins>'):l.removed&&u.push('<del>'),u.push(t(l.value)),l.added?u.push('</ins>'):l.removed&&u.push('</del>')}return u.join('')}},1365,[]);
267
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ScrollSyncManager",{enumerable:!0,get:function(){return t}});var t=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(t,s,l){if(null==s||null==l)for(const o of t.children??[])o instanceof HTMLElement&&("deletions"in o.dataset?s=o:"additions"in o.dataset&&(l=o));null!=l&&null!=s?(this.codeDeletions!==s&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=s,s.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==l&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=l,l.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0):this.cleanUp()}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}}},1366,[]);
268
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areDiffRenderOptionsEqual",{enumerable:!0,get:function(){return t}});var n=r(d[0]);function t(t,f){return(0,n.areThemesEqual)(t.theme,f.theme)&&t.useTokenTransformer===f.useTokenTransformer&&t.tokenizeMaxLineLength===f.tokenizeMaxLineLength&&t.lineDiffType===f.lineDiffType&&t.maxLineDiffLength===f.maxLineDiffLength}},1367,[1255]);
269
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createEmptyRowBuffer",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){return(0,t.createHastElement)({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":n,style:`grid-row: span ${n};min-height:calc(${n} * 1lh)`}})}},1368,[1260]);
270
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createNoNewlineElement",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){return(0,t.createHastElement)({tagName:"div",children:[(0,t.createHastElement)({tagName:"span",children:[(0,t.createTextNodeElement)("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":n,"data-column-content":""}})}},1369,[1260]);
271
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createSeparator",{enumerable:!0,get:function(){return o}});var t=r(d[0]);function n(n){return(0,t.createHastElement)({tagName:"div",children:[(0,t.createIconElement)({name:"both"===n?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{role:"button","data-expand-button":"","data-expand-both":"both"===n?"":void 0,"data-expand-up":"up"===n?"":void 0,"data-expand-down":"down"===n?"":void 0}})}function o({type:o,content:p,expandIndex:s,chunked:l=!1,slotName:u,isFirstHunk:c,isLastHunk:h}){let x=0;const f=[];if("metadata"===o&&null!=p&&f.push((0,t.createHastElement)({tagName:"div",children:[(0,t.createTextNodeElement)(p)],properties:{"data-separator-wrapper":""}})),("line-info"===o||"line-info-basic"===o)&&null!=p){const o=[];null!=s&&(l?(c||(o.push(n("up")),x++),h||(o.push(n("down")),x++)):(o.push(n(c||h?c?"down":"up":"both")),x++)),o.push((0,t.createHastElement)({tagName:"div",children:[(0,t.createHastElement)({tagName:"span",children:[(0,t.createTextNodeElement)(p)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),l&&null!=s&&o.push((0,t.createHastElement)({tagName:"div",children:[(0,t.createTextNodeElement)("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),f.push((0,t.createHastElement)({tagName:"div",children:o,properties:{"data-separator-wrapper":"","data-separator-multi-button":x>1?"":void 0}}))}return"custom"===o&&null!=u&&f.push((0,t.createHastElement)({tagName:"slot",properties:{name:u}})),(0,t.createHastElement)({tagName:"div",children:f,properties:{"data-separator":0===f.length?"simple":o,"data-expand-index":s,"data-separator-first":c?"":void 0,"data-separator-last":h?"":void 0}})}},1370,[1260]);
272
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){return`hunk-separator-${t}-${n}`}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getHunkSeparatorSlotName",{enumerable:!0,get:function(){return t}})},1371,[]);
273
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getTotalLineCountFromHunks",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){const o=n.at(-1);return null==o?0:Math.max((0,t.getHunkSideEndBoundary)(o.additionStart,o.additionCount),(0,t.getHunkSideEndBoundary)(o.deletionStart,o.deletionCount))}},1372,[1338]);
274
- __d(function(g,r,i,a,m,e,d){"use strict";function n({line:n,spanStart:t,spanLength:u}){return{start:{line:n,character:t},end:{line:n,character:t+u},properties:{"data-diff-span":""},alwaysWrap:!0}}function t({item:n,arr:t,enableJoin:u,isNeutral:l=!1,isLastItem:c=!1}){const o=t[t.length-1];if(null==o||c||!u)return void t.push([l?0:1,n.value]);const s=0===o[0];l===s||l&&1===n.value.length&&!s?o[1]+=n.value:t.push([l?0:1,n.value])}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createDiffSpanDecoration",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"pushOrJoinSpan",{enumerable:!0,get:function(){return t}}),r(d[0])},1373,[1347]);
275
- __d(function(g,r,_i,a,m,_e,d){"use strict";const e=["theme"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"renderDiffWithHighlighter",{enumerable:!0,get:function(){return D}});var n,t=r(d[0]),i=(n=t)&&n.__esModule?n:{default:n};r(d[1]);var o=r(d[2]),l=r(d[3]),s=r(d[4]),f=r(d[5]),c=r(d[6]),h=r(d[7]),u=r(d[8]),L=r(d[9]),p=r(d[10]),I=r(d[11]);const x={forcePlainText:!1};function D(e,n,t,{forcePlainText:i,startingLine:o,totalLines:s,expandedHunks:f,collapsedContextThreshold:h=1}=x){i?(o??=0,s??=1/0):(o=0,s=1/0);const L=o>0||s<1/0,p="string"==typeof t.theme?n.getTheme(t.theme).type:void 0,I=(0,c.getHighlighterThemeStyles)({theme:t.theme,highlighter:n}),D=i&&!L&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":t.lineDiffType,S={deletionLines:[],additionLines:[]},{maxLineDiffLength:C}=t,N=!i&&!e.isPartial,T=i?f:void 0,y=new Map;function O(e){const n=N?0:e,t=y.get(n)??{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:[]};return y.set(n,t),t}function F(e,n,t,i){if(L){let e=t.at(-1);null!=e&&e.targetIndex+e.count===n||(e={targetIndex:n,originalOffset:i.length,count:0},t.push(e)),e.count++}i.push(e)}(0,u.iterateOverDiff)({diff:e,diffStyle:"both",startingLine:o,totalLines:s,expandedHunks:!L||T,collapsedContextThreshold:h,callback:({hunkIndex:n,additionLine:t,deletionLine:i,type:o})=>{const l=O(n),s=null!=t?t.splitLineIndex:i.splitLineIndex;"change"===o&&null!=t&&null!=i&&v({additionLine:e.additionLines[t.lineIndex],deletionLine:e.deletionLines[i.lineIndex],deletionLineIndex:l.deletionContent.length,additionLineIndex:l.additionContent.length,deletionDecorations:l.deletionDecorations,additionDecorations:l.additionDecorations,lineDiffType:D,maxLineDiffLength:C}),null!=i&&(F(e.deletionLines[i.lineIndex],i.lineIndex,l.deletionSegments,l.deletionContent),l.deletionInfo.push({type:"change"===o?"change-deletion":o,lineNumber:i.lineNumber,altLineNumber:"change"===o?void 0:t.lineNumber??void 0,lineIndex:`${i.unifiedLineIndex},${s}`})),null!=t&&(F(e.additionLines[t.lineIndex],t.lineIndex,l.additionSegments,l.additionContent),l.additionInfo.push({type:"change"===o?"change-addition":o,lineNumber:t.lineNumber,altLineNumber:"change"===o?void 0:i.lineNumber??void 0,lineIndex:`${t.unifiedLineIndex},${s}`}))}});for(const o of y.values()){if(0===o.deletionContent.length&&0===o.additionContent.length)continue;const s={name:e.prevName??e.name,contents:o.deletionContent.value},f={name:e.name,contents:o.additionContent.value},{deletionLines:c,additionLines:h}=b({deletionFile:s,deletionInfo:o.deletionInfo,deletionDecorations:o.deletionDecorations,additionFile:f,additionInfo:o.additionInfo,additionDecorations:o.additionDecorations,highlighter:n,options:t,languageOverride:i?"text":e.lang});if(N)S.deletionLines=c,S.additionLines=h;else{if(o.deletionSegments.length>0)for(const e of o.deletionSegments)for(let n=0;n<e.count;n++)S.deletionLines[e.targetIndex+n]=c[e.originalOffset+n];else(0,l.appendItems)(S.deletionLines,c);if(o.additionSegments.length>0)for(const e of o.additionSegments)for(let n=0;n<e.count;n++)S.additionLines[e.targetIndex+n]=h[e.originalOffset+n];else(0,l.appendItems)(S.additionLines,h)}}return{code:S,themeStyles:I,baseThemeType:p}}function S(e,{deletionLineIndex:n,additionLineIndex:t,deletionDecorations:i,additionDecorations:o}){let l=0,s=0,f=-1,c=0,h=-1,u=0;for(const{value:n,added:t,removed:i}of e)i?(-1===f&&(f=l),l+=n.length,c=l):t?(-1===h&&(h=s),s+=n.length,u=s):(l+=n.length,s+=n.length);-1!==f&&i.push((0,p.createDiffSpanDecoration)({line:n,spanStart:f,spanLength:c-f})),-1!==h&&o.push((0,p.createDiffSpanDecoration)({line:t,spanStart:h,spanLength:u-h}))}function v({deletionLine:e,additionLine:n,deletionLineIndex:t,additionLineIndex:i,deletionDecorations:o,additionDecorations:l,lineDiffType:s,maxLineDiffLength:f}){if(null==e||null==n||"none"===s)return;if(e=(0,L.cleanLastNewline)(e),n=(0,L.cleanLastNewline)(n),e.length>f||n.length>f)return;const c="char"===s?(0,I.diffChars)(e,n):(0,I.diffWordsWithSpace)(e,n);if("word-line"===s)return void S(c,{deletionLineIndex:t,additionLineIndex:i,deletionDecorations:o,additionDecorations:l});const h=[],u=[],x="word-alt"===s,D=c.at(-1);for(const e of c){const n=e===D;e.added||e.removed?e.removed?(0,p.pushOrJoinSpan)({item:e,arr:h,enableJoin:x,isLastItem:n}):(0,p.pushOrJoinSpan)({item:e,arr:u,enableJoin:x,isLastItem:n}):((0,p.pushOrJoinSpan)({item:e,arr:h,enableJoin:x,isNeutral:!0,isLastItem:n}),(0,p.pushOrJoinSpan)({item:e,arr:u,enableJoin:x,isNeutral:!0,isLastItem:n}))}let v=0;for(const e of h)1===e[0]&&o.push((0,p.createDiffSpanDecoration)({line:t,spanStart:v,spanLength:e[1].length})),v+=e[1].length;v=0;for(const e of u)1===e[0]&&l.push((0,p.createDiffSpanDecoration)({line:i,spanStart:v,spanLength:e[1].length})),v+=e[1].length}function b(n){let{deletionFile:t,additionFile:l,deletionInfo:c,additionInfo:u,highlighter:p,deletionDecorations:I,additionDecorations:x,languageOverride:D,options:{theme:S}}=n,v=(0,i.default)(n.options,e);const b=D??(0,o.getFiletypeFromFileName)(t.name),C=D??(0,o.getFiletypeFromFileName)(l.name),{state:N,transformers:T}=(0,s.createTransformerWithState)(v.useTokenTransformer),y="string"==typeof S?Object.assign({},v,{lang:"text",theme:S,transformers:T,decorations:void 0,defaultColor:!1,cssVariablePrefix:(0,f.formatCSSVariablePrefix)("token"),tokenizeTimeLimit:0}):Object.assign({},v,{lang:"text",themes:S,transformers:T,decorations:void 0,defaultColor:!1,cssVariablePrefix:(0,f.formatCSSVariablePrefix)("token"),tokenizeTimeLimit:0});return{deletionLines:""===t.contents?[]:(y.lang=b,N.lineInfo=c,y.decorations=I,(0,h.getLineNodes)(p.codeToHast((0,L.cleanLastNewline)(t.contents),y))),additionLines:""===l.contents?[]:(y.lang=C,y.decorations=x,N.lineInfo=u,(0,h.getLineNodes)(p.codeToHast((0,L.cleanLastNewline)(l.contents),y)))}}},1374,[25,1148,1286,1302,1291,1294,1295,1299,1375,1341,1373,1347]);
276
- __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"iterateOverDiff",{enumerable:!0,get:function(){return o}}),r(d[0]);var n=r(d[1]),t=r(d[2]);function o({diff:o,diffStyle:s,startingLine:u=0,totalLines:h=1/0,expandedHunks:c,collapsedContextThreshold:x=1,callback:C}){const k=l({diff:o,diffStyle:s,startingLine:u,expandedHunks:c,collapsedContextThreshold:x}),L={viewportStart:u,viewportEnd:u+h,isWindowedHighlight:u>0||h<1/0,splitCount:k.splitCount,unifiedCount:k.unifiedCount,finalHunkIndex:o.hunks.length-1,shouldBreak(){if(!L.isWindowedHighlight)return!1;const n=L.unifiedCount>=u+h,t=L.splitCount>=u+h;return"unified"===s?n:("split"===s||n)&&t},shouldSkip(n,t){if(!L.isWindowedHighlight)return!1;const o=n>0&&L.unifiedCount+n<=u,l=t>0&&L.splitCount+t<=u;return"unified"===s?o:("split"===s||o)&&l},incrementCounts(n,t){"unified"!==s&&"both"!==s||(L.unifiedCount+=n),"split"!==s&&"both"!==s||(L.splitCount+=t)},isInWindow(n,t){if(!L.isWindowedHighlight)return!0;const o=L.isInUnifiedWindow(n),l=L.isInSplitWindow(t);return"unified"===s?o:"split"===s?l:o||l},isInUnifiedWindow:n=>!L.isWindowedHighlight||L.unifiedCount>=u-n&&L.unifiedCount<u+h,isInSplitWindow:n=>!L.isWindowedHighlight||L.splitCount>=u-n&&L.splitCount<u+h,emit:(n,t=!1)=>(t||("unified"===s?L.incrementCounts(1,0):"split"===s?L.incrementCounts(0,1):L.incrementCounts(1,1)),C(n)??!1)};n:for(let I=k.hunkIndex;I<o.hunks.length;I++){const S=o.hunks[I];if(null==S)throw new Error("iterateOverDiff: invalid hunk index");if(L.shouldBreak())break;const v=(0,n.getHunkSideStartBoundary)(S.deletionStart,S.deletionCount),E=(0,n.getHunkSideStartBoundary)(S.additionStart,S.additionCount),w=o.isPartial||0!==S.deletionCount?S.deletionLineIndex:v,b=o.isPartial||0!==S.additionCount?S.additionLineIndex:E,O=(0,t.getExpandedRegion)({isPartial:o.isPartial,rangeSize:S.collapsedBefore,expandedHunks:c,hunkIndex:I,collapsedContextThreshold:x}),H=I===L.finalHunkIndex?(0,t.getTrailingExpandedRegion)({fileDiff:o,hunkIndex:I,expandedHunks:c,collapsedContextThreshold:x,errorPrefix:"iterateOverDiff"}):void 0,R=O.fromStart+O.fromEnd;function y(n,t){return null==H||H.collapsedLines<=0||H.fromStart+H.fromEnd>0?0:"unified"===s?n===S.unifiedLineStart+S.unifiedLineCount-1?H.collapsedLines:0:t===S.splitLineStart+S.splitLineCount-1?H.collapsedLines:0}let B=0===O.collapsedLines;function F(){return B?0:(B=!0,O.collapsedLines)}if(L.shouldSkip(R,R))L.incrementCounts(R,R),F();else{let z=S.unifiedLineStart-O.rangeSize,_=S.splitLineStart-O.rangeSize,j=w-O.rangeSize,U=b-O.rangeSize,q=v+1-O.rangeSize,G=E+1-O.rangeSize;if(f(L,O.fromStart,s,n=>L.emit({hunkIndex:I,hunk:S,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:q+n,lineIndex:j+n,noEOFCR:!1,unifiedLineIndex:z+n,splitLineIndex:_+n},additionLine:{unifiedLineIndex:z+n,splitLineIndex:_+n,lineIndex:U+n,lineNumber:G+n,noEOFCR:!1}})))break n;if(z=S.unifiedLineStart-O.fromEnd,_=S.splitLineStart-O.fromEnd,j=w-O.fromEnd,U=b-O.fromEnd,q=v+1-O.fromEnd,G=E+1-O.fromEnd,f(L,O.fromEnd,s,n=>L.emit({hunkIndex:I,hunk:S,collapsedBefore:F(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:q+n,lineIndex:j+n,noEOFCR:!1,unifiedLineIndex:z+n,splitLineIndex:_+n},additionLine:{unifiedLineIndex:z+n,splitLineIndex:_+n,lineIndex:U+n,lineNumber:G+n,noEOFCR:!1}}),()=>{F()}))break n}let D=S.unifiedLineStart,N=S.splitLineStart,W=w,A=b,T=v+1,M=E+1;const P=S.hunkContent.at(-1);for(const J of S.hunkContent){if(L.shouldBreak())break n;const K=J===P;if("context"===J.type){if(L.shouldSkip(J.lines,J.lines))L.incrementCounts(J.lines,J.lines),F();else if(f(L,J.lines,s,n=>{const t=K&&n===J.lines-1,o=D+n,l=N+n;return L.emit({hunkIndex:I,hunk:S,collapsedBefore:F(),collapsedAfter:y(o,l),type:"context",deletionLine:{lineNumber:T+n,lineIndex:W+n,noEOFCR:t&&S.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:l},additionLine:{unifiedLineIndex:o,splitLineIndex:l,lineIndex:A+n,lineNumber:M+n,noEOFCR:t&&S.noEOFCRAdditions}})},()=>{F()}))break n;D+=J.lines,N+=J.lines,W+=J.lines,A+=J.lines,T+=J.lines,M+=J.lines}else{const Q=Math.max(J.deletions,J.additions),V=J.deletions+J.additions;if(!L.shouldSkip(V,Q)){const X=a(L,J,s);(X[0]?.[0]??0)>0&&F();for(const[Y,Z]of X)for(let $=Y;$<Z;$++){const nn=y(D+$,"unified"===s?N+($<J.deletions?$:$-J.deletions):N+$);if(L.emit(p({hunkIndex:I,hunk:S,collapsedBefore:F(),collapsedAfter:nn,diffStyle:s,index:$,unifiedLineIndex:D,splitLineIndex:N,additionLineIndex:A,deletionLineIndex:W,additionLineNumber:M,deletionLineNumber:T,content:J,isLastContent:K,unifiedCount:V,splitCount:Q}),!0))break n}}F(),L.incrementCounts(V,Q),D+=V,N+=Q,W+=J.deletions,A+=J.additions,T+=J.deletions,M+=J.additions}}if(null!=H){const{collapsedLines:en,fromStart:tn,fromEnd:dn}=H,on=tn+dn;if(f(L,on,s,n=>{const t=n===on-1;return L.emit({hunkIndex:o.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:t?en:0,type:"context-expanded",deletionLine:{lineNumber:T+n,lineIndex:W+n,noEOFCR:!1,unifiedLineIndex:D+n,splitLineIndex:N+n},additionLine:{unifiedLineIndex:D+n,splitLineIndex:N+n,lineIndex:A+n,lineNumber:M+n,noEOFCR:!1}})},void 0,()=>L.shouldBreak()))break n}}}function l({diff:n,diffStyle:t,startingLine:o,expandedHunks:l,collapsedContextThreshold:u}){if(o<=0||"both"===t)return{hunkIndex:0,splitCount:0,unifiedCount:0};const f=s({diff:n,expandedHunks:l,collapsedContextThreshold:u});let a=0,p=n.hunks.length-1,h=n.hunks.length;for(;a<=p;){const n=a+p>>1,l=f[n+1];if(null==l)throw new Error("iterateOverDiff: invalid hunk prefix index");("unified"===t?l.unifiedCount:l.splitCount)>o?(h=n,p=n-1):a=n+1}if(h>=n.hunks.length){const t=f[n.hunks.length];if(null==t)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:n.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}const c=f[h];if(null==c)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:h,splitCount:c.splitCount,unifiedCount:c.unifiedCount}}function s({diff:n,expandedHunks:o,collapsedContextThreshold:l}){let s=0,u=0;const f=n.hunks.length-1,a=[{splitCount:0,unifiedCount:0}];for(let p=0;p<n.hunks.length;p++){const h=n.hunks[p];if(null==h)throw new Error("iterateOverDiff: invalid hunk summary index");const c=(0,t.getExpandedRegion)({isPartial:n.isPartial,rangeSize:h.collapsedBefore,expandedHunks:o,hunkIndex:p,collapsedContextThreshold:l}),x=c.fromStart+c.fromEnd;s+=x+h.splitLineCount,u+=x+h.unifiedLineCount;const C=p===f?(0,t.getTrailingExpandedRegion)({fileDiff:n,hunkIndex:p,expandedHunks:o,collapsedContextThreshold:l,errorPrefix:"iterateOverDiff"}):void 0;if(null!=C){const n=C.fromStart+C.fromEnd;s+=n,u+=n}a.push({splitCount:s,unifiedCount:u})}return a}function u(n,t,o){if(!n.isWindowedHighlight||t<=0)return[0,t];const l=[];function s(o){const s=Math.max(0,n.viewportStart-o),u=Math.min(t,n.viewportEnd-o);u>s&&l.push([s,u])}if("split"!==o&&s(n.unifiedCount),"unified"!==o&&s(n.splitCount),0===l.length)return[0,0];let u=l[0][0],f=l[0][1];for(let n=1;n<l.length;n++){const t=l[n];u=Math.min(u,t[0]),f=Math.max(f,t[1])}return[u,f]}function f(n,t,o,l,s,f){const[a,p]=u(n,t,o);a>0&&(n.incrementCounts(a,a),s?.());let h=a;for(;h<t;){if(!0===f?.())return!0;if(h>=p){n.incrementCounts(t-h,t-h);break}if(n.isInWindow(0,0)){if(!0===l(h))return!0}else n.incrementCounts(1,1);h++}return!1}function a(n,t,o){if(!n.isWindowedHighlight)return[[0,"unified"===o?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const l="unified"!==o,s="unified"===o?"unified":"split",u=[];function f(t,o){if(t+o<=n.viewportStart||t>=n.viewportEnd)return;const l=Math.max(0,n.viewportStart-t),s=Math.min(o,n.viewportEnd-t);return s>l?[l,s]:void 0}function a(n,o){return"split"===s?n:"additions"===o?[n[0]+t.deletions,n[1]+t.deletions]:n}function p(n,t){if(null==n)return;const[o,l]=a(n,t);l>o&&u.push([o,l])}if("split"!==o&&(p(f(n.unifiedCount,t.deletions),"deletions"),p(f(n.unifiedCount+t.deletions,t.additions),"additions")),l&&(p(f(n.splitCount,t.deletions),"deletions"),p(f(n.splitCount,t.additions),"additions")),0===u.length)return u;u.sort((n,t)=>n[0]-t[0]);const h=[u[0]];for(const[n,t]of u.slice(1)){const o=h[h.length-1];n<=o[1]?o[1]=Math.max(o[1],t):h.push([n,t])}return h}function p({hunkIndex:n,hunk:t,collapsedAfter:o,collapsedBefore:l,diffStyle:s,index:u,unifiedLineIndex:f,splitLineIndex:a,additionLineIndex:p,deletionLineIndex:h,additionLineNumber:c,deletionLineNumber:x,content:C,isLastContent:k,unifiedCount:L,splitCount:I}){const S=u<C.deletions?f+u:void 0,v="unified"===s?u>=C.deletions?f+u:void 0:u<C.additions?f+C.deletions+u:void 0,E="unified"===s?a+(u<C.deletions?u:u-C.deletions):a+u,w=u<C.deletions?h+u:void 0,b=u<C.deletions?x+u:void 0,O="unified"===s?u>=C.deletions?p+(u-C.deletions):void 0:u<C.additions?p+u:void 0,H="unified"===s?u>=C.deletions?c+(u-C.deletions):void 0:u<C.additions?c+u:void 0,R="unified"===s?k&&u===C.deletions-1&&t.noEOFCRDeletions:k&&u===I-1&&t.noEOFCRDeletions,y="unified"===s?k&&u===L-1&&t.noEOFCRAdditions:k&&u===I-1&&t.noEOFCRAdditions,B=null!=w&&null!=b&&null!=S?{lineNumber:b,lineIndex:w,noEOFCR:R,unifiedLineIndex:S,splitLineIndex:E}:void 0,F=null!=O&&null!=H&&null!=v?{unifiedLineIndex:v,splitLineIndex:E,lineIndex:O,lineNumber:H,noEOFCR:y}:void 0;if(null==B&&null!=F)return{type:"change",hunkIndex:n,hunk:t,collapsedAfter:o,collapsedBefore:l,deletionLine:void 0,additionLine:F};if(null!=B&&null==F)return{type:"change",hunkIndex:n,hunk:t,collapsedAfter:o,collapsedBefore:l,deletionLine:B,additionLine:void 0};if(null==B||null==F)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:n,hunk:t,collapsedAfter:o,collapsedBefore:l,deletionLine:B,additionLine:F}}},1375,[1148,1338,1376]);
277
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getExpandedRegion",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"getHunkAdditionLineRange",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"getHunkSeparatorGap",{enumerable:!0,get:function(){return k}}),Object.defineProperty(e,"getHunkSeparatorHeight",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"getLeadingHunkSeparatorLayout",{enumerable:!0,get:function(){return y}}),Object.defineProperty(e,"getNearestRenderableAdditionLine",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"getTrailingContextRangeSize",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"getTrailingExpandedRegion",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"getTrailingHunkSeparatorLayout",{enumerable:!0,get:function(){return P}}),Object.defineProperty(e,"hasLeadingHunkSeparator",{enumerable:!0,get:function(){return x}}),Object.defineProperty(e,"hasTrailingContext",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"hasTrailingContextMismatch",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"hasTrailingHunkSeparator",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"isAdditionLineRenderable",{enumerable:!0,get:function(){return h}});var n=r(d[0]),t=r(d[1]);function o(n){return[(0,t.getHunkSideStartBoundary)(n.additionStart,n.additionCount)+1,(0,t.getHunkSideEndBoundary)(n.additionStart,n.additionCount)+1]}function u({isPartial:n,rangeSize:t,expandedHunks:o,hunkIndex:u,collapsedContextThreshold:l}){const s=Math.max(t,0);if(0===s||n)return{fromStart:0,fromEnd:0,rangeSize:s,collapsedLines:s,renderAll:!1};if(!0===o||s<=l)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const f=o?.get(u),c=Math.min(Math.max(f?.fromStart??0,0),s),h=Math.min(Math.max(f?.fromEnd??0,0),s),p=c+h,S=p>=s;return{fromStart:S?s:c,fromEnd:S?0:h,rangeSize:s,collapsedLines:Math.max(s-p,0),renderAll:S}}function l(n){const o=n.hunks[n.hunks.length-1];if(null==o||n.isPartial||0===n.additionLines.length||0===n.deletionLines.length)return!1;const u=n.additionLines.length-(0,t.getHunkSideEndBoundary)(o.additionStart,o.additionCount),l=n.deletionLines.length-(0,t.getHunkSideEndBoundary)(o.deletionStart,o.deletionCount);return u>0||l>0}function s(n){const o=n.hunks[n.hunks.length-1];if(null==o||n.isPartial||0===n.additionLines.length||0===n.deletionLines.length)return!1;const u=n.additionLines.length-(0,t.getHunkSideEndBoundary)(o.additionStart,o.additionCount),l=n.deletionLines.length-(0,t.getHunkSideEndBoundary)(o.deletionStart,o.deletionCount);return!(u<=0&&l<=0)&&u!==l}function f({fileDiff:n,errorPrefix:o}){const u=n.hunks[n.hunks.length-1];if(null==u||n.isPartial||0===n.additionLines.length||0===n.deletionLines.length)return 0;const l=n.additionLines.length-(0,t.getHunkSideEndBoundary)(u.additionStart,u.additionCount),s=n.deletionLines.length-(0,t.getHunkSideEndBoundary)(u.deletionStart,u.deletionCount);if(l<=0&&s<=0)return 0;if(l!==s)throw new Error(`${o}: trailing context mismatch (additions=${l}, deletions=${s}) for ${n.name}`);return Math.min(l,s)}function c({fileDiff:n,hunkIndex:t,expandedHunks:o,collapsedContextThreshold:u,errorPrefix:l}){if(t!==n.hunks.length-1)return;const s=f({fileDiff:n,errorPrefix:l});if(s<=0)return;if(!0===o||s<=u)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const c=o?.get(n.hunks.length),h=Math.min(Math.max(c?.fromStart??0,0),s);return{fromStart:h,fromEnd:0,rangeSize:s,collapsedLines:s-h,renderAll:h>=s}}function h({fileDiff:n,lineNumber:t,expandedHunks:l,collapsedContextThreshold:s}){if(!0===l||n.isPartial)return!0;for(const[f,c]of n.hunks.entries()){const[h,p]=o(c);if(t<h){const o=u({isPartial:n.isPartial,rangeSize:c.collapsedBefore,expandedHunks:l,hunkIndex:f,collapsedContextThreshold:s}),p=h-o.rangeSize;return o.renderAll||t<p+o.fromStart||t>=h-o.fromEnd}if(t<p)return!0}const f=c({fileDiff:n,hunkIndex:n.hunks.length-1,expandedHunks:l,collapsedContextThreshold:s,errorPrefix:"isAdditionLineRenderable"});if(null==f||f.renderAll)return!0;const h=n.hunks[n.hunks.length-1],[,p]=o(h);return t<p+f.fromStart||t>=p+f.rangeSize}function p({fileDiff:n,lineNumber:t,direction:l,expandedHunks:s,collapsedContextThreshold:f}){if(!0===s||n.isPartial)return t;const h=[];let p=1;for(const[t,l]of n.hunks.entries()){const[c,S]=o(l),k=u({isPartial:n.isPartial,rangeSize:l.collapsedBefore,expandedHunks:s,hunkIndex:t,collapsedContextThreshold:f}),x=c-k.rangeSize;k.renderAll?h.push([x,c]):(k.fromStart>0&&h.push([x,x+k.fromStart]),k.fromEnd>0&&h.push([c-k.fromEnd,c])),h.push([c,S]),p=S}const S=c({fileDiff:n,hunkIndex:n.hunks.length-1,expandedHunks:s,collapsedContextThreshold:f,errorPrefix:"getNearestRenderableAdditionLine"});if(null!=S){const n=p;p=n+S.rangeSize,S.renderAll?h.push([n,p]):S.fromStart>0&&h.push([n,n+S.fromStart])}if(t>=p)return t;if("down"!==l)for(let n=h.length-1;n>=0;n--){const[o,u]=h[n];if(o<=t)return Math.min(u-1,t)}else for(const[n,o]of h)if(o>t)return Math.max(n,t)}function S({type:t,metrics:o}){return o.hunkSeparatorHeight??(0,n.getDefaultHunkSeparatorHeight)(t)}function k({type:n,metrics:t}){return"simple"===n||"metadata"===n||"line-info-basic"===n?0:t.spacing}function x({type:n,hunkIndex:t,hunkSpecs:o}){switch(n){case"simple":return t>0;case"metadata":return null!=o;case"line-info":case"line-info-basic":case"custom":return!0}}function b(n){return"simple"!==n&&"metadata"!==n}function y({type:n,metrics:t,hunkIndex:o,hunkSpecs:u}){if(!x({type:n,hunkIndex:o,hunkSpecs:u}))return;const l=S({type:n,metrics:t}),s=k({type:n,metrics:t}),f=o>0?s:0;return{height:l,gapBefore:f,gapAfter:s,totalHeight:f+l+s}}function P({type:n,metrics:t}){if(!b(n))return;const o=S({type:n,metrics:t}),u=k({type:n,metrics:t});return{height:o,gapBefore:u,gapAfter:0,totalHeight:u+o}}},1376,[1333,1338]);
278
- __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DiffHunksRenderer",{enumerable:!0,get:function(){return F}});var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),a=r(d[4]),l=r(d[5]),h=r(d[6]),u=r(d[7]),f=r(d[8]),c=r(d[9]),p=r(d[10]),L=r(d[11]),T=r(d[12]),S=r(d[13]),x=r(d[14]),C=r(d[15]),k=r(d[16]),R=r(d[17]),y=r(d[18]),A=r(d[19]),D=r(d[20]),H=r(d[21]),v=r(d[22]),E=r(d[23]),w=r(d[24]),b=r(d[25]),O=r(d[26]),G=r(d[27]),N=r(d[28]),M=r(d[29]),I=r(d[30]);let P=-1;var F=class{__id="diff-hunks-renderer:"+ ++P;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLangs=["text"];editSessionActive=!1;constructor(n={theme:t.DEFAULT_THEMES},a=x.getLineAnnotationName,l,h){this.options=n,this.annotationSlotName=a,this.onRenderUpdate=l,this.workerManager=h,!0!==h?.isWorkingPool()&&(this.highlighter=(0,s.areThemesAttached)(n.theme??t.DEFAULT_THEMES)?(0,o.getHighlighterIfLoaded)():void 0)}cleanUp(){this.endEditSession(),this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.editSessionActive?(null!=this.renderCache&&(this.renderCache.renderRange=void 0),this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0):this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}beginEditSession(t,n){const{editSessionActive:s}=this;this.editSessionActive=!0,s||(this.pendingHighlightResult=void 0),this.diff=t,s&&null!=this.renderCache&&this.renderCache.diff!==t&&this.clearRenderCache();const{renderCache:o}=this;if(!t.isPartial&&0===t.additionLines.length)return Object.assign(t,(0,w.recomputeEmptyDocumentDiff)(t,this.options.parseDiffOptions)),this.markEditSessionPass(t),void this.clearRenderCache();if(null==o)return;if(s&&o.diff===t)return;const{options:a}=this.getRenderOptions(t),l=o.diff===t,h=null!=n&&(0,k.areDiffTargetsEqual)(o.diff,n),{result:u}=o;o.highlighted&&null!=u&&(0,D.areDiffRenderOptionsEqual)(o.options,a)&&(l||h)?l||(this.renderCache={diff:t,options:a,highlighted:!0,result:Object.assign({},u,{code:Object.assign({},u.code,{additionLines:[...u.code.additionLines]})}),renderRange:o.renderRange}):this.clearRenderCache()}endEditSession(){this.editSessionActive=!1,this.pendingHighlightResult=void 0,null==this.diff&&this.clearRenderCache()}editorRenderReady(){return!0===this.renderCache?.options.useTokenTransformer&&this.renderCache.highlighted&&null!=this.renderCache.result}refreshHighlightedResult(){const{diff:t,renderCache:n,workerManager:s}=this;return null==t||null==n||!(0,k.areDiffTargetsEqual)(n.diff,t)||(0,N.isDiffPlainText)(t)||J(t,this.getTokenizeMaxLength())?Promise.resolve():this.editSessionActive||!0!==s?.isWorkingPool()||null==t.cacheKey?this.asyncHighlight(t).then(n=>this.applyRefreshedResult(t,n)).catch(t=>this.onHighlightError(t)):(s.evictDiffFromCache(t.cacheKey),s.primeDiffHighlightCache(t).then(()=>{this.applyRefreshedResult(t,s.getDiffResultCache(t))}).catch(t=>this.onHighlightError(t)))}applyRefreshedResult(t,n){const{diff:s,renderCache:o}=this;if(null==n||null==s||null==o||!(0,k.areDiffTargetsEqual)(s,t)||!(0,k.areDiffTargetsEqual)(o.diff,t)||this.editSessionActive)return;const{options:a}=this.getRenderOptions(s);(0,D.areDiffRenderOptionsEqual)(a,n.options)&&(this.pendingHighlightResult={diff:s,options:n.options,highlighted:!0,result:n.result},this.onRenderUpdate?.())}get diffCache(){return this.renderCache?.diff??this.diff}clearRenderCache(){this.renderCache=void 0,this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0}setOptions(t){this.options=t}mergeOptions(t){this.options=Object.assign({},this.options,t)}expandHunk(t,n,s=this.getOptionsWithDefaults().expansionLineCount){const o=Object.assign({},this.expandedHunks.get(t)??{fromStart:0,fromEnd:0});"up"!==n&&"both"!==n||(o.fromStart+=s),"down"!==n&&"both"!==n||(o.fromEnd+=s),!0!==this.renderCache?.highlighted&&this.clearRenderCache(),this.expandedHunks.set(t,o)}getExpandedHunk(n){return this.expandedHunks.get(n)??t.DEFAULT_EXPANDED_REGION}getExpandedHunksMap(){return this.expandedHunks}setExpandedHunksMap(t){this.expandedHunks=t}setLineAnnotations(t){this.additionAnnotations={},this.deletionAnnotations={};for(const n of t){const t=(()=>{switch(n.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),s=t[n.lineNumber]??[];t[n.lineNumber]=s,s.push(n)}}updateRenderCache(t,n,s=!1,o,a){this.pendingStructuralRows=void 0;const{renderCache:l}=this;if(null==l)return!1;const{result:u,diff:f}=l;if(null==u)return!1;if(f.isPartial)throw new Error("Could not update render cache for partial diff");const c=u.code.additionLines,p=this.pendingStructuralRows=s?new Map:void 0,L=[],T=new Map;if(null==p&&null!=o){const n=f.additionLines.length,s=K(f.additionLines,a);for(const[a,l]of o){if(a<0||a>n||a===n&&(""===l||!s))continue;const o=f.additionLines[a]??"";o!==l&&(f.additionLines[a]=l,L.push(a),T.set(a,o),t.has(a)||(c[a]=V(a,(0,A.cleanLastNewline)(l))))}}for(const[n,s]of t){const t=c[n]?.properties??{},a=s.map(t=>t[2]).join(""),l=n<f.additionLines.length,u=l?f.additionLines[n]??"":"",S=(0,A.cleanLastNewline)(u);null==p&&l&&!0!==o?.has(n)&&(f.additionLines[n]=(0,h.applyLineTextWithNewline)(u,a),S!==a&&(L.push(n),T.set(n,u)));const x={type:"element",tagName:"div",properties:{"data-line":t["data-line"]??n+1,"data-line-index":t["data-line-index"]??n,"data-line-type":t["data-line-type"]??"context"},children:s.map(([t,n,s])=>0===t&&""===n?""===s?{type:"element",tagName:"br",properties:{},children:[]}:{type:"text",value:s}:{type:"element",tagName:"span",properties:{"data-char":t,style:`color:${n};`},children:[{type:"text",value:s}]})};null!=p?p.set(n,x):c[n]=x}let S=!1;if(L.length>0)if(this.editSessionActive)if(f.additionLines.length<=1&&""===f.additionLines.join(""))this.applyRecomputePreservingSessionType(f,(0,w.recomputeEmptyDocumentDiff)(f,this.options.parseDiffOptions)),S=!0;else if((0,w.shouldTopAlignAdditionRecompute)(f,f.additionLines))this.applyRecomputePreservingSessionType(f,(0,w.recomputeTopAlignedAdditionDiff)(f,f.additionLines,this.options.parseDiffOptions)),S=!0;else{const t=(0,b.applySessionChangedLines)(f,L,this.options.parseDiffOptions,T);this.applyExpansionRemap(t),S=null!=t}else Object.assign(f,(0,w.updateDiffHunks)(f,L,this.options.parseDiffOptions));return u.baseThemeType=n,l.isDirty=!0,S}applyExpansionRemap(t){null!=t&&(this.expandedHunks=(0,b.remapExpandedHunksForRegionChange)(this.expandedHunks,t))}applyDocumentChange(t){const{pendingStructuralRows:n,renderCache:s}=this;this.pendingStructuralRows=void 0;const o=this.diff??s?.diff;if(null==o)return;const a=s?.result;if(o.isPartial)throw new Error("Could not apply document change for partial diff");const{additionLines:l}=o;if(o.additionLines=X(t),null!=a&&(a.code.additionLines=B(l,o.additionLines,a.code.additionLines,t)),o.additionLines.length<=1&&""===o.additionLines.join("")?(this.applyRecomputePreservingSessionType(o,(0,w.recomputeEmptyDocumentDiff)(o,this.options.parseDiffOptions)),null!=a&&(a.code.additionLines[0]=V(0,t.getLineText(0)))):this.editSessionActive?this.applySessionDocumentChange(o,l):Object.assign(o,(0,w.recomputeDiffHunksForEdit)(o,this.options.parseDiffOptions)),null!=n&&null!=a)for(const[t,s]of n)t<a.code.additionLines.length&&(a.code.additionLines[t]=s);null!=s&&(s.isDirty=!0)}applySessionDocumentChange(t,n){const{parseDiffOptions:s}=this.options,o=t.additionLines;(0,w.shouldTopAlignAdditionRecompute)(t,o)?this.applyRecomputePreservingSessionType(t,(0,w.recomputeTopAlignedAdditionDiff)(t,o,s)):this.applyExpansionRemap((0,b.rebuildSessionHunks)(t,s,t=>n[t]))}applyRecomputePreservingSessionType(t,n){const s=this.editSessionActive?t.type:void 0;Object.assign(t,n),null!=s&&(t.type=s),this.markEditSessionPass(t)}markEditSessionPass(t){this.editSessionActive&&(t.editSessionDirty=!0)}getUnifiedLineDecoration({lineType:t}){return{gutterLineType:t,contentProperties:{"data-line-type":t}}}getSplitLineDecoration({side:t,type:n}){const s="change"===n?"deletions"===t?"change-deletion":"change-addition":n;return{gutterLineType:s,contentProperties:{"data-line-type":s}}}createAnnotationElement=t=>(0,f.createAnnotationElement)(t);getOptionsWithDefaults(){const{diffIndicators:n="bars",diffStyle:s="split",disableBackground:o=!1,disableFileHeader:a=!1,disableLineNumbers:l=!1,disableVirtualizationBuffers:h=!1,collapsed:u=!1,expandUnchanged:f=!1,collapsedContextThreshold:c=1,expansionLineCount:p=100,hunkSeparators:L="line-info",lineDiffType:T="word-alt",maxLineDiffLength:S=1e3,overflow:x="scroll",stickyHeader:C=!1,theme:k=t.DEFAULT_THEMES,headerRenderMode:R="default",tokenizeMaxLineLength:y=1e3,tokenizeMaxLength:A=t.DEFAULT_TOKENIZE_MAX_LENGTH,useTokenTransformer:D=!1,useCSSClasses:H=!1}=this.options;return{diffIndicators:n,diffStyle:s,disableBackground:o,disableFileHeader:a,disableLineNumbers:l,disableVirtualizationBuffers:h,collapsed:u,expandUnchanged:f,collapsedContextThreshold:c,expansionLineCount:p,hunkSeparators:L,lineDiffType:T,maxLineDiffLength:S,overflow:x,stickyHeader:C,theme:this.workerManager?.getDiffRenderOptions().theme??k,headerRenderMode:R,tokenizeMaxLineLength:y,tokenizeMaxLength:A,useTokenTransformer:D,useCSSClasses:H}}async initializeHighlighter(){return this.highlighter=await(0,o.getSharedHighlighter)((0,S.getHighlighterOptions)(this.computedLangs,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}hydrate(t){if(null==t)return;this.diff=t;const{options:n}=this.getRenderOptions(t),s=J(t,this.getTokenizeMaxLength());let o=this.workerManager?.getDiffResultCache(t);null==o||(0,D.areDiffRenderOptionsEqual)(n,o.options)||(o=void 0),this.renderCache??={diff:t,hydrated:!0,highlighted:!s&&!(0,N.isDiffPlainText)(t),options:n,result:s?void 0:o?.result,renderRange:void 0},this.editSessionActive||!0!==this.workerManager?.isWorkingPool()?null==this.highlighter&&(this.computedLangs=Z(t),this.initializeHighlighter()):null!=this.renderCache.result||s||this.workerManager.highlightDiffAST(this,this.diff)}getLocalHighlightTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??t.DEFAULT_THEMES}getEffectiveCodeOptions(){const t=!0===this.workerManager?.isWorkingPool()?this.workerManager.getDiffRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:t?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(t){const n=(()=>{if(!0===this.workerManager?.isWorkingPool()){const t=this.workerManager.getDiffRenderOptions();return this.editSessionActive&&!0!==t.useTokenTransformer?Object.assign({},t,{useTokenTransformer:!0}):t}const{theme:t,tokenizeMaxLineLength:n,lineDiffType:s,maxLineDiffLength:o}=this.getOptionsWithDefaults();return{theme:t,useTokenTransformer:this.editSessionActive||!0===this.options.useTokenTransformer,tokenizeMaxLineLength:n,lineDiffType:s,maxLineDiffLength:o}})();this.getOptionsWithDefaults();const{renderCache:s}=this;return null==s?.result?{options:n,forceHighlight:!0}:(0,k.areDiffTargetsEqual)(t,s.diff)&&(0,D.areDiffRenderOptionsEqual)(n,s.options)?{options:n,forceHighlight:!1}:{options:n,forceHighlight:!0}}getDiffForNextRender(t){const{options:n}=this.getRenderOptions(t);if(null!=this.getReadyRenderResult(t,n))return t;if(null==this.renderCache)return t;if((0,k.areDiffTargetsEqual)(this.renderCache.diff,t))return this.renderCache.diff;const s=!(t.additionLines.length>0||t.deletionLines.length>0)||(0,N.isDiffPlainText)(t)||J(t,this.getTokenizeMaxLength());return this.canRenderDiff(t,n,s)?t:this.renderCache.diff}canRenderDiff(t,n,o){const{renderCache:a}=this;return!(null!=a&&!(0,k.areDiffTargetsEqual)(a.diff,t))||(o?null==a.result&&!0!==a.hydrated||!0===this.workerManager?.isWorkingPool()||null!=this.highlighter&&(0,s.areThemesAttached)(n.theme):null==a.result&&!0!==a.hydrated||(this.editSessionActive||!0!==this.workerManager?.isWorkingPool()?null!=this.highlighter&&(0,s.areThemesAttached)(n.theme):!a.highlighted))}renderDiff(a=this.diff,l=t.DEFAULT_RENDER_RANGE){if(this.diff=a,null==a)return void(this.pendingHighlightResult=void 0);const{expandUnchanged:h,collapsedContextThreshold:f}=this.getOptionsWithDefaults();let{options:c,forceHighlight:p}=this.getRenderOptions(a);const L=this.getReadyRenderResult(a,c);this.pendingHighlightResult=void 0,null!=L&&(this.renderCache=Object.assign({},L,{diff:a,renderRange:void 0}),p=!1),this.renderCache??={diff:a,highlighted:!1,options:c,result:void 0,renderRange:void 0};const T=a.additionLines.length>0||a.deletionLines.length>0,S=!T||(0,N.isDiffPlainText)(a)||J(a,this.getTokenizeMaxLength()),x=this.canRenderDiff(a,c,S),R=!(0,k.areDiffTargetsEqual)(a,this.renderCache.diff),y=!(0,u.areRenderRangesEqual)(this.renderCache.renderRange,l);if(this.editSessionActive||!0!==this.workerManager?.isWorkingPool()){this.computedLangs=Z(a),this.highlighter??=(0,o.getHighlighterIfLoaded)();const t=null!=this.highlighter&&(0,s.areThemesAttached)(c.theme),l=null!=this.highlighter&&(0,n.areLanguagesAttached)(this.computedLangs),h=!S&&l;if(x&&null!=this.highlighter&&t&&(p||S||!this.renderCache.highlighted&&h||null==this.renderCache.result)){const{result:t,options:n}=this.renderDiffWithHighlighter(a,this.highlighter,S||!l);this.renderCache={diff:a,options:n,highlighted:h,result:t,renderRange:void 0}}t&&(S||l)||this.asyncHighlight(a).then(({result:t,options:n})=>{this.applyHighlightResult(a,t,n,!S)})}else{const t=null==this.renderCache.result&&this.renderCache.highlighted&&!S&&!R&&(0,C.isDefaultRenderRange)(l);x&&!t&&(S||null==this.renderCache.result||!this.renderCache.highlighted&&(R||y))&&(this.renderCache.diff=a,this.renderCache.options=c,this.renderCache.highlighted=!1,(null==this.renderCache.result||R||y||p)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(a,l.startingLine,l.totalLines,!!(0,C.isDefaultRenderRange)(l)||(!!h||this.expandedHunks),f)),this.renderCache.renderRange=l),S||!T||this.renderCache.highlighted&&!p||this.workerManager.highlightDiffAST(this,a)}return null!=this.renderCache.result?this.processDiffResult(this.renderCache.diff,l,this.renderCache.result):void 0}async asyncRender(n,s=t.DEFAULT_RENDER_RANGE){this.diff=n;const{result:o}=await this.asyncHighlight(n);return this.processDiffResult(n,s,o)}createPreElement(t,n,s){const{diffIndicators:o,disableBackground:a,disableLineNumbers:l,overflow:h}=this.getOptionsWithDefaults();return(0,L.createPreElement)({type:"diff",diffIndicators:o,disableBackground:a,disableLineNumbers:l,overflow:h,split:t,totalLines:n,customProperties:s})}async asyncHighlight(t){const o=J(t,this.getTokenizeMaxLength());this.computedLangs=o?["text"]:Z(t);const a=null!=this.highlighter&&(0,s.areThemesAttached)(this.getLocalHighlightTheme()),l=o||null!=this.highlighter&&(0,n.areLanguagesAttached)(this.computedLangs);return null!=this.highlighter&&a&&l||(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(t,this.highlighter,o)}renderDiffWithHighlighter(t,n,s=!1){const{options:o}=this.getRenderOptions(t),{collapsedContextThreshold:a}=this.getOptionsWithDefaults(),l=(0,M.renderDiffWithHighlighter)(t,n,o,{forcePlainText:s,expandedHunks:!!s||void 0,collapsedContextThreshold:a});if(this.editSessionActive&&1===t.additionLines.length&&""===t.additionLines[0]&&null==l.code.additionLines[0]){let n;if((0,y.iterateOverDiff)({diff:t,diffStyle:"both",expandedHunks:!!s||void 0,collapsedContextThreshold:a,callback:({additionLine:t})=>{if(0===t?.lineIndex)return n=t,!0}}),null==n)throw new Error("DiffHunksRenderer: missing empty addition line");l.code.additionLines[0]=V(0,"",n.unifiedLineIndex,n.splitLineIndex)}return{result:l,options:o}}onHighlightSuccess(t,n,s,o=!0){this.editSessionActive||this.applyHighlightResult(t,n,s,o)}applyHighlightResult(t,n,s,o=!0){const{diff:a,renderCache:l}=this;null!=a&&null!=l&&(0,k.areDiffTargetsEqual)(a,t)&&(0,D.areDiffRenderOptionsEqual)(s,this.getRenderOptions(a).options)&&(null!=l.result&&l.highlighted&&(0,D.areDiffRenderOptionsEqual)(l.options,s)&&(0,k.areDiffTargetsEqual)(l.diff,a)||(this.pendingHighlightResult={diff:a,options:s,highlighted:o,result:n},this.onRenderUpdate?.()))}getMatchingWorkerResultCache(t,n){if(this.editSessionActive)return;const s=this.workerManager?.getDiffResultCache(t);return null!=s&&(0,D.areDiffRenderOptionsEqual)(n,s.options)?s:void 0}getReadyRenderResult(t,n){const{pendingHighlightResult:s}=this;if(null!=s&&(0,k.areDiffTargetsEqual)(s.diff,t)&&(0,D.areDiffRenderOptionsEqual)(s.options,n))return s;const o=this.getMatchingWorkerResultCache(t,n);return null==o||this.hasHighlightedRenderCache(t,n)?void 0:Object.assign({diff:t,highlighted:!0},o)}hasHighlightedRenderCache(t,n){const{renderCache:s}=this;return null!=s?.result&&s.highlighted&&(0,k.areDiffTargetsEqual)(t,s.diff)&&(0,D.areDiffRenderOptionsEqual)(n,s.options)}onHighlightError(t){console.error(t)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(t,n,{code:s,themeStyles:o,baseThemeType:a}){const{diffStyle:h,disableFileHeader:u,expandUnchanged:f,expansionLineCount:c,collapsedContextThreshold:p,hunkSeparators:L}=this.getOptionsWithDefaults(),T=this.renderCache?.isDirty??!1,S="unified"===h,x=Q(t,null!=this.options.loadDiffFiles),C=!t.isPartial||x;let k=[],A=[],D=[];const E=[],{additionLines:w,deletionLines:b}=s,O={rowCount:0,hunkSeparators:L,additionsContentAST:k,deletionsContentAST:A,unifiedContentAST:D,unifiedGutterAST:(0,l.createGutterWrapper)(),deletionsGutterAST:(0,l.createGutterWrapper)(),additionsGutterAST:(0,l.createGutterWrapper)(),expansionLineCount:c,hunkData:E,incrementRowCount(t=1){O.rowCount+=t},pushToGutter(t,n){switch(t){case"unified":O.unifiedGutterAST.children.push(n);break;case"deletions":O.deletionsGutterAST.children.push(n);break;case"additions":O.additionsGutterAST.children.push(n)}}},N=(0,R.getTrailingContextRangeSize)({fileDiff:t,errorPrefix:"DiffHunksRenderer.processDiffResult"}),M={size:0,side:void 0,increment(){this.size+=1},flush(){if("unified"!==h){if(this.size<=0||null==this.side)return this.side=void 0,void(this.size=0);"additions"===this.side?(O.pushToGutter("additions",(0,l.createGutterGap)(void 0,"buffer",this.size)),k?.push((0,H.createEmptyRowBuffer)(this.size))):(O.pushToGutter("deletions",(0,l.createGutterGap)(void 0,"buffer",this.size)),A?.push((0,H.createEmptyRowBuffer)(this.size))),this.size=0,this.side=void 0}}},I=(t,n,s,o,a)=>{O.pushToGutter(t,(0,l.createGutterItem)(n,s,o,a))};function P(t){M.flush(),"unified"===h?U("unified",t,O):(U("deletions",t,O),U("additions",t,O))}this.pushFileLevelAnnotations(t,h,n,O),(0,y.iterateOverDiff)({diff:t,diffStyle:h,startingLine:n.startingLine,totalLines:n.totalLines,expandedHunks:!!f||this.expandedHunks,collapsedContextThreshold:p,callback:({hunkIndex:n,hunk:s,collapsedBefore:o,collapsedAfter:a,additionLine:u,deletionLine:f,type:c})=>{const p=null!=f?f.splitLineIndex:u.splitLineIndex,S=null!=u?u.unifiedLineIndex:f.unifiedLineIndex;"split"===h&&"change"!==c&&M.flush(),o>0&&P({hunkIndex:n,collapsedLines:o,rangeSize:Math.max(s?.collapsedBefore??0,0),hunkSpecs:s?.hunkSpecs,isFirstHunk:0===n,isLastHunk:!1,isExpandable:C});const k="unified"===h?S:p,R={type:c,hunkIndex:n,lineIndex:k,unifiedLineIndex:S,splitLineIndex:p,deletionLine:f,additionLine:u};if("unified"===h){const s=this.getUnifiedInjectedRowsForLine?.(R);null!=s?.before&&W(s.before,O);let o=null!=f?b[f.lineIndex]:void 0,a=null!=u?w[u.lineIndex]:void 0;if(null==o&&null==a){const n="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(n,{file:t.name}),new Error(n)}const l="change"===c?null!=u?"change-addition":"change-deletion":c,h=this.getUnifiedLineDecoration({type:c,lineType:l,additionLineIndex:u?.lineIndex,deletionLineIndex:f?.lineIndex});I("unified",h.gutterLineType,null!=u?u.lineNumber:f.lineNumber,`${S},${p}`,h.gutterProperties),null!=a?a=$(a,h.contentProperties,T&&null!=u?{"data-line":u.lineNumber,"data-line-index":`${S},${p}`}:void 0):null!=o&&(o=$(o,h.contentProperties,T&&null!=f?{"data-line":f.lineNumber,"data-line-index":`${S},${p}`}:void 0)),q({diffStyle:"unified",type:c,deletionLine:o,additionLine:a,unifiedSpan:this.getAnnotations("unified",f?.lineNumber,u?.lineNumber,n,k),createAnnotationElement:t=>this.createAnnotationElement(t),context:O}),null!=s?.after&&W(s.after,O)}else{const s=this.getSplitInjectedRowsForLine?.(R);null!=s?.before&&j(s.before,O,M);let o=null!=f?b[f.lineIndex]:void 0,a=null!=u?w[u.lineIndex]:void 0;const l=this.getSplitLineDecoration({side:"deletions",type:c,lineIndex:f?.lineIndex}),h=this.getSplitLineDecoration({side:"additions",type:c,lineIndex:u?.lineIndex});if(null==o&&null==a){const n="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(n,{file:t.name}),new Error(n)}const L=(()=>{if("change"===c){if(null==a)return"additions";if(null==o)return"deletions"}})();null!=L?(null!=M.side&&M.side!==L&&M.flush(),M.side=L,M.increment()):"change"===c&&M.flush();const S=this.getAnnotations("split",f?.lineNumber,u?.lineNumber,n,k);if(null!=S&&M.size>0&&M.flush(),null!=f){const t=$(o,l.contentProperties,T?{"data-line":f.lineNumber,"data-line-index":`${f.unifiedLineIndex},${p}`}:void 0);I("deletions",l.gutterLineType,f.lineNumber,`${f.unifiedLineIndex},${p}`,l.gutterProperties),null!=t&&(o=t)}if(null!=u){const t=$(a,h.contentProperties,T?{"data-line":u.lineNumber,"data-line-index":`${u.unifiedLineIndex},${p}`}:void 0);I("additions",h.gutterLineType,u.lineNumber,`${u.unifiedLineIndex},${p}`,h.gutterProperties),null!=t&&(a=t)}q(Object.assign({diffStyle:"split",type:c,additionLine:a,deletionLine:o},S,{createAnnotationElement:t=>this.createAnnotationElement(t),context:O})),null!=s?.after&&j(s.after,O,M)}const y="split"===h&&null!=s&&p===s.splitLineStart+s.splitLineCount-1,A=n===t.hunks.length-1&&null!=s&&("split"===h?p===s.splitLineStart+s.splitLineCount-1:S===s.unifiedLineStart+s.unifiedLineCount-1),D=!!y&&s.noEOFCRDeletions,E=!!y&&s.noEOFCRAdditions,G=(f?.noEOFCR??!1)||D,F=(u?.noEOFCR??!1)||E;if(F||G){if("split"===h&&M.flush(),G){const t="context"===c||"context-expanded"===c?c:"change-deletion";"unified"===h?(O.unifiedContentAST.push((0,v.createNoNewlineElement)(t)),O.pushToGutter("unified",(0,l.createGutterGap)(t,"metadata",1))):(O.deletionsContentAST.push((0,v.createNoNewlineElement)(t)),O.pushToGutter("deletions",(0,l.createGutterGap)(t,"metadata",1)),F||(O.pushToGutter("additions",(0,l.createGutterGap)(void 0,"buffer",1)),O.additionsContentAST.push((0,H.createEmptyRowBuffer)(1))))}if(F){const t="context"===c||"context-expanded"===c?c:"change-addition";"unified"===h?(O.unifiedContentAST.push((0,v.createNoNewlineElement)(t)),O.pushToGutter("unified",(0,l.createGutterGap)(t,"metadata",1))):(O.additionsContentAST.push((0,v.createNoNewlineElement)(t)),O.pushToGutter("additions",(0,l.createGutterGap)(t,"metadata",1)),G||(O.pushToGutter("deletions",(0,l.createGutterGap)(void 0,"buffer",1)),O.deletionsContentAST.push((0,H.createEmptyRowBuffer)(1))))}O.incrementRowCount(1)}"simple"!==L&&"metadata"!==L&&(a>0||A&&x)&&P({hunkIndex:"context-expanded"===c?n:n+1,collapsedLines:A&&x?"unknown":a,rangeSize:N,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:C}),O.incrementRowCount(1)}}),"split"===h&&M.flush();const F=Math.max((0,G.getTotalLineCountFromHunks)(t.hunks),t.additionLines.length??0,t.deletionLines.length??0),z=n.bufferBefore>0||n.bufferAfter>0,_=!S&&"deleted"!==t.type,B=!S&&"new"!==t.type,K=O.rowCount>0||z;k=_&&K?k:void 0,A=B&&K?A:void 0,D=S&&K?D:void 0;const V=this.createPreElement(null!=A&&null!=k,F);return{fileDiff:t,unifiedGutterAST:S&&K?O.unifiedGutterAST.children:void 0,unifiedContentAST:D,deletionsGutterAST:B&&K?O.deletionsGutterAST.children:void 0,deletionsContentAST:A,additionsGutterAST:_&&K?O.additionsGutterAST.children:void 0,additionsContentAST:k,hunkData:E,preNode:V,themeStyles:o,baseThemeType:a,headerElement:u?void 0:this.renderHeader(t),totalLines:F,rowCount:O.rowCount,bufferBefore:n.bufferBefore,bufferAfter:n.bufferAfter,css:""}}renderCodeAST(t,n){const s="unified"===t?n.unifiedGutterAST:"deletions"===t?n.deletionsGutterAST:n.additionsGutterAST,o="unified"===t?n.unifiedContentAST:"deletions"===t?n.deletionsContentAST:n.additionsContentAST;if(null==s||null==o)return;const a=(0,l.createGutterWrapper)(s);return a.properties.style=`grid-row: span ${n.rowCount}`,[a,(0,c.createContentColumn)(o,n.rowCount)]}renderFullAST(t,n=[]){const s="line-info"===this.getOptionsWithDefaults().hunkSeparators,o=this.renderCodeAST("unified",t);if(null!=o)return n.push((0,l.createHastElement)({tagName:"code",children:o,properties:{"data-code":"","data-container-size":s?"":void 0,"data-unified":""}})),Object.assign({},t.preNode,{children:n});const a=this.renderCodeAST("deletions",t);null!=a&&n.push((0,l.createHastElement)({tagName:"code",children:a,properties:{"data-code":"","data-container-size":s?"":void 0,"data-deletions":""}}));const h=this.renderCodeAST("additions",t);return null!=h&&n.push((0,l.createHastElement)({tagName:"code",children:h,properties:{"data-code":"","data-container-size":s?"":void 0,"data-additions":""}})),Object.assign({},t.preNode,{children:n})}renderFullHTML(t,n=[]){return(0,I.toHtml)(this.renderFullAST(t,n))}renderPartialHTML(t,n){return null==n?(0,I.toHtml)(t):(0,I.toHtml)((0,l.createHastElement)({tagName:"code",children:t,properties:{"data-code":"","data-container-size":"line-info"===this.getOptionsWithDefaults().hunkSeparators?"":void 0,[`data-${n}`]:""}}))}pushFileLevelAnnotations(t,n,s,o){if(!(0,a.shouldRenderFileAnnotations)(s))return;const l="new"!==t.type?this.getAnnotationNames((0,a.getFileAnnotations)(this.deletionAnnotations)):[],h="deleted"!==t.type?this.getAnnotationNames((0,a.getFileAnnotations)(this.additionAnnotations)):[];if(0===l.length&&0===h.length)return;const{createAnnotationElement:u}=this;q("unified"!==n?{diffStyle:n,type:"context",deletionSpan:{type:"annotation",hunkIndex:-1,lineIndex:-1,annotations:l},additionSpan:{type:"annotation",hunkIndex:-1,lineIndex:-1,annotations:h},createAnnotationElement:u,context:o}:{diffStyle:n,type:"context",unifiedSpan:{type:"annotation",hunkIndex:-1,lineIndex:-1,annotations:l.concat(h)},createAnnotationElement:u,context:o})}getAnnotations(t,n,s,o,a){const l={type:"annotation",hunkIndex:o,lineIndex:a,annotations:[]};if(null!=n)for(const t of this.deletionAnnotations[n]??[])l.annotations.push(this.annotationSlotName(t));const h={type:"annotation",hunkIndex:o,lineIndex:a,annotations:[]};if(null!=s)for(const n of this.additionAnnotations[s]??[])("unified"===t?l:h).annotations.push(this.annotationSlotName(n));return"unified"===t?l.annotations.length>0?l:void 0:0!==h.annotations.length||0!==l.annotations.length?{deletionSpan:l,additionSpan:h}:void 0}getAnnotationNames(t){return t?.map(t=>this.annotationSlotName(t))??[]}renderHeader(t){const{headerRenderMode:n,stickyHeader:s}=this.getOptionsWithDefaults();return(0,p.createFileHeaderElement)({fileOrDiff:t,mode:n,stickyHeader:s})}};const z=new Intl.PluralRules("en-US");function W(t,n){for(const s of t)n.unifiedContentAST.push(s.content),n.pushToGutter("unified",s.gutter),n.incrementRowCount(1)}function j(t,n,s){for(const{deletion:o,addition:a}of t){if(null==o&&null==a)continue;const t=null!=o&&null!=a?void 0:null==o?"deletions":"additions";null!=t&&s.side===t||s.flush(),null!=o&&(n.deletionsContentAST.push(o.content),n.pushToGutter("deletions",o.gutter)),null!=a&&(n.additionsContentAST.push(a.content),n.pushToGutter("additions",a.gutter)),null!=t&&(s.side=t,s.increment()),n.incrementRowCount(1)}}function q({diffStyle:t,type:n,deletionLine:s,additionLine:o,unifiedSpan:a,deletionSpan:h,additionSpan:u,createAnnotationElement:f,context:c}){let p=!1;if("unified"===t){if(null!=o?c.unifiedContentAST.push(o):null!=s&&c.unifiedContentAST.push(s),null!=a){const t="change"===n?null!=s?"change-deletion":"change-addition":n;c.unifiedContentAST.push(f(a)),c.pushToGutter("unified",(0,l.createGutterGap)(t,"annotation",1)),p=!0}}else if("split"===t){if(null!=s&&c.deletionsContentAST.push(s),null!=o&&c.additionsContentAST.push(o),null!=h){const t="change"===n?null!=s?"change-deletion":"context":n;c.deletionsContentAST.push(f(h)),c.pushToGutter("deletions",(0,l.createGutterGap)(t,"annotation",1)),p=!0}if(null!=u){const t="change"===n?null!=o?"change-addition":"context":n;c.additionsContentAST.push(f(u)),c.pushToGutter("additions",(0,l.createGutterGap)(t,"annotation",1)),p=!0}}p&&c.incrementRowCount(1)}function U(t,{hunkIndex:n,collapsedLines:s,rangeSize:o,hunkSpecs:a,isFirstHunk:l,isLastHunk:h,isExpandable:u},f){if("number"==typeof s&&s<=0)return;const c="unified"===t?f.unifiedContentAST:"deletions"===t?f.deletionsContentAST:f.additionsContentAST;if("metadata"===f.hunkSeparators)return void(null!=a&&(f.pushToGutter(t,(0,E.createSeparator)({type:"metadata",content:a,isFirstHunk:l,isLastHunk:h})),c.push((0,E.createSeparator)({type:"metadata",content:a,isFirstHunk:l,isLastHunk:h})),"additions"!==t&&f.incrementRowCount(1)));if("simple"===f.hunkSeparators)return void(n>0&&(f.pushToGutter(t,(0,E.createSeparator)({type:"simple",isFirstHunk:l,isLastHunk:!1})),c.push((0,E.createSeparator)({type:"simple",isFirstHunk:l,isLastHunk:!1})),"additions"!==t&&f.incrementRowCount(1)));const p=(0,O.getHunkSeparatorSlotName)(t,n),L=o>f.expansionLineCount,T=u?n:void 0,S="number"==typeof s?`${x=s} unmodified line${"one"===z.select(x)?"":"s"}`:"More unchanged context may be available";var x;f.pushToGutter(t,(0,E.createSeparator)({type:f.hunkSeparators,content:S,expandIndex:T,chunked:L,slotName:p,isFirstHunk:l,isLastHunk:h})),c.push((0,E.createSeparator)({type:f.hunkSeparators,content:S,expandIndex:T,chunked:L,slotName:p,isFirstHunk:l,isLastHunk:h})),"additions"!==t&&f.incrementRowCount(1),f.hunkData.push({slotName:p,hunkIndex:n,lines:"number"==typeof s?s:0,lineCountKnown:"number"==typeof s,type:t,expandable:u?{up:!l,down:!h,chunked:L}:void 0})}function $(t,n,s){return null==t||"element"!==t.type||null==n&&null==s?t:Object.assign({},t,{properties:Object.assign({},t.properties,n,s)})}function _(t){return t.length>0&&""===t[t.length-1]?t.length-1:t.length}function B(t,n,s,o){const a=_(t),l=_(n),h=Math.min(a,l);let u=0;for(;u<h&&t[u]===n[u];)u++;let f=0;for(;f<h-u&&t[a-1-f]===n[l-1-f];)f++;const c=new Array(n.length);for(let t=0;t<u;t++)c[t]=s[t];for(let t=0;t<f;t++)c[l-1-t]=s[a-1-t];a<t.length&&l<n.length&&(c[n.length-1]=s[t.length-1]);for(let t=u;t<n.length;t++)c[t]??=V(t,o.getLineText(t));return c}function K(t,n){return n===t.length+1&&!0===t.at(-1)?.endsWith("\n")}function V(t,n,s=t,o=t){return{type:"element",tagName:"div",properties:{"data-line":t+1,"data-line-index":`${s},${o}`,"data-line-type":"context"},children:[{type:"element",tagName:"span",properties:{"data-char":0},children:[{type:"text",value:n}]}]}}function X(t){const n=[];for(let s=0;s<t.lineCount;s++)n.push(t.getLineText(s,!0));return n}function Z(t){if(null!=t.lang)return[t.lang];const n=(0,T.getFiletypeFromFileName)(t.prevName??t.name),s=(0,T.getFiletypeFromFileName)(t.name);return n===s?[s]:[n,s]}function J(t,n){return Math.max(t.additionLines.length,t.deletionLines.length)>n}function Q(t,n){return t.isPartial&&n&&("change"===t.type||"rename-changed"===t.type)}},1377,[1148,1150,1234,1252,1305,1260,1306,1281,1282,1307,1284,1285,1286,1287,1288,1289,1334,1376,1375,1341,1367,1368,1369,1370,1378,1379,1371,1372,1380,1374,1265]);
279
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"offsetHunkContent",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"preserveTrailingEditorBlankLine",{enumerable:!0,get:function(){return k}}),Object.defineProperty(e,"recomputeDiffHunks",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"recomputeDiffHunksForEdit",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"recomputeDiffRenderLineCounts",{enumerable:!0,get:function(){return D}}),Object.defineProperty(e,"recomputeEmptyDocumentDiff",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"recomputeHunkRenderLineCounts",{enumerable:!0,get:function(){return E}}),Object.defineProperty(e,"recomputeTopAlignedAdditionDiff",{enumerable:!0,get:function(){return L}}),Object.defineProperty(e,"shouldTopAlignAdditionRecompute",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"syncHunkNoEOFCRFromFullFile",{enumerable:!0,get:function(){return I}}),Object.defineProperty(e,"updateDiffHunks",{enumerable:!0,get:function(){return y}});var n=r(d[0]),t=r(d[1]),o=r(d[2]),u=r(d[3]);function s(n,t){const o=(0,u.parseDiffFromFile)({name:n.prevName??n.name,contents:n.deletionLines.join("")},{name:n.name,contents:n.additionLines.join(""),lang:n.lang},t);return{hunks:o.hunks,splitLineCount:o.splitLineCount,unifiedLineCount:o.unifiedLineCount,additionLines:o.additionLines,deletionLines:o.deletionLines,type:o.type}}function l(n,t){const o=Math.max(n,1);let u=Array.from({length:o},(n,t)=>`${" ".repeat(t+1)}\n`).join("");return u===t&&(u=Array.from({length:o},(n,t)=>`\0${" ".repeat(t)}\n`).join("")),u}function f(n){for(const t of n)if(t.trim().length>0)return!1;return!0}function c(n,t){return t.length>0&&t.length<n.deletionLines.length&&f(t)}function L(n,t,o){const s=n.deletionLines.join(""),f=l(t.length,s),c=(0,u.parseDiffFromFile)({name:n.prevName??n.name,contents:s},{name:n.name,contents:f,lang:n.lang},o);return{hunks:c.hunks,splitLineCount:c.splitLineCount,unifiedLineCount:c.unifiedLineCount,additionLines:t,deletionLines:c.deletionLines,type:c.type}}function p(n,t){return L(n,[""],t)}function h(n,t){if(0===n.additionLines.length)return p(n,t);if(c(n,n.additionLines))return L(n,n.additionLines,t);const o=n.additionLines,u=s(n,t);return k(u,o),u}function C(n){return n.length>1&&""===n.at(-1)}function k(t,o){if(!C(o))return;const u=o.length-t.additionLines.length;if(u<=0)return;const s=t.additionLines.length,l=t.hunks.at(-1);if(null!=l&&(0,n.getHunkSideEndBoundary)(l.additionStart,l.additionCount)===s)for(const n of l.hunkContent)if("change"===n.type&&n.additions<n.deletions&&n.additionLineIndex+n.additions===s)return t.additionLines=o,n.additions+=u,l.additionCount+=u,l.additionLines+=u,void D(t)}function y(n,u,l){if(n.isPartial)return x(n,s(n,l));if(n.deletionLines.length!==n.additionLines.length)return x(n,s(n,l));const f=Array.from(u);if(0===f.length)return x(n,{hunks:n.hunks,splitLineCount:n.splitLineCount,unifiedLineCount:n.unifiedLineCount,type:n.type});for(const t of f){const u=n.additionLines[t],f=n.deletionLines[t];if(null==u||null==f)return x(n,s(n,l));if((0,o.cleanLastNewline)(u)===(0,o.cleanLastNewline)(f))return x(n,s(n,l))}const c=b(n,f);if(0===c.size)return x(n,s(n,l));for(const t of c)if(!j(n,t,l))return x(n,s(n,l));return D(n),(0,t.hasTrailingContextMismatch)(n)?x(n,s(n,l)):x(n,{hunks:n.hunks,splitLineCount:n.splitLineCount,unifiedLineCount:n.unifiedLineCount,type:n.type})}function x(n,t){return Object.assign(n,t),t}function b(n,t){const o=new Set;for(const u of t){const t=O(n,u);if(null==t)return new Set;o.add(t)}return o}function O(n,t){for(const[o,u]of n.hunks.entries()){const n=u.additionLineIndex+u.additionCount;if(t>=u.additionLineIndex&&t<n)return o}}function j(n,t,o){const s=n.hunks[t];if(null==s)return!1;const l=n.deletionLines.slice(s.deletionLineIndex,s.deletionLineIndex+s.deletionCount),f=n.additionLines.slice(s.additionLineIndex,s.additionLineIndex+s.additionCount),c=(0,u.parseDiffFromFile)({name:n.prevName??n.name,contents:l.join("")},{name:n.name,contents:f.join(""),lang:n.lang},Object.assign({},o,{context:0})),L=c.hunks[0];return null!=L&&1===c.hunks.length&&(F(s,L),I(n,t),!0)}function I(n,t){const o=n.hunks[t];if(null==o)return;if(t!==n.hunks.length-1)return o.noEOFCRAdditions=!1,void(o.noEOFCRDeletions=!1);const u=n.additionLines.at(-1),s=n.deletionLines.at(-1);o.noEOFCRAdditions=null!=u&&""!==u&&!u.endsWith("\n"),o.noEOFCRDeletions=null!=s&&""!==s&&!s.endsWith("\n")}function F(n,t){const o=n.additionLineIndex,u=n.deletionLineIndex;n.hunkContent=t.hunkContent.map(n=>S(n,o,u)),n.additionLineIndex=o+t.additionLineIndex,n.additionStart=n.additionStart+t.additionLineIndex,n.additionCount=t.additionCount,n.additionLines=t.additionLines,t.deletionLineIndex>=0&&(n.deletionLineIndex=u+t.deletionLineIndex,n.deletionStart=n.deletionStart+t.deletionLineIndex),n.deletionCount=t.deletionCount,n.deletionLines=t.deletionLines,n.noEOFCRAdditions=t.noEOFCRAdditions,n.noEOFCRDeletions=t.noEOFCRDeletions,E(n)}function S(n,t,o){return Object.assign({},n,{additionLineIndex:n.additionLineIndex+t,deletionLineIndex:n.deletionLineIndex+o})}function E(n){let t=0,o=0;for(const u of n.hunkContent)"context"===u.type?(t+=u.lines,o+=u.lines):(t+=Math.max(u.additions,u.deletions),o+=u.additions+u.deletions);n.splitLineCount=t,n.unifiedLineCount=o}function D(t){let o=0,u=0,s=0;for(const l of t.hunks)l.collapsedBefore=Math.max((0,n.getHunkSideStartBoundary)(l.additionStart,l.additionCount)-s,0),l.splitLineStart=o+l.collapsedBefore,l.unifiedLineStart=u+l.collapsedBefore,E(l),o+=l.collapsedBefore+l.splitLineCount,u+=l.collapsedBefore+l.unifiedLineCount,s=(0,n.getHunkSideEndBoundary)(l.additionStart,l.additionCount);if(t.hunks.length>0){const s=t.hunks[t.hunks.length-1],l=Math.max(t.additionLines.length-(0,n.getHunkSideEndBoundary)(s.additionStart,s.additionCount),0);o+=l,u+=l}t.splitLineCount=o,t.unifiedLineCount=u}},1378,[1338,1376,1341,1346]);
280
- __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"applySessionChangedLines",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"captureExpansionAnchors",{enumerable:!0,get:function(){return k}}),Object.defineProperty(e,"findDivergenceCore",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"finishEditSessionForDiff",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"normalizeEditorLines",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"rebuildExpansionFromAnchors",{enumerable:!0,get:function(){return E}}),Object.defineProperty(e,"rebuildSessionHunks",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"remapExpandedHunksForRegionChange",{enumerable:!0,get:function(){return L}});var n=r(d[0]),t=r(d[1]),o=r(d[2]),s=r(d[3]),l=r(d[4]);const u=new WeakMap;function a(n){return n.length>1&&""===n[n.length-1]?n.slice(0,-1):n}function f(n,t){const o=Math.min(n.length,t.length);let s=0;for(;s<o&&n[s]===t[s];)s++;let l=n.length,u=t.length;for(;l>s&&u>s&&n[l-1]===t[u-1];)l--,u--;if(s!==l||s!==u)return{start:s,deletionEnd:l,additionEnd:u}}function c(n,t,o){const s=n.hunks,u=n.additionLines,f=a(u),c=f===u?n:Object.assign({},n,{additionLines:f}),h=v(s,C(c,t,o),n.deletionLines.length),p=j(c,h);if(n.additionLines=f,n.hunks=p,n.editSessionDirty=!0,A(n),(0,l.preserveTrailingEditorBlankLine)(n,u),w(s,n.hunks))return{regions:h.map(n=>n.previousSpan)}}function h(n,t,o,s){const l=new Set(t),u=Array.from(l).filter(t=>t>=0&&t<n.additionLines.length).sort((n,t)=>n-t);if(0===u.length)return;const a=t=>l.has(t)?s?.get(t):n.additionLines[t],{hunks:f}=n;let h,S=0;for(const t of u){for(;S<f.length;){const n=f[S];if(t<F(n)+n.additionCount)break;S++}const s=f[S],l=null==s?void 0:F(s);if(null==l||t<l||null!=h&&h!==S)return c(n,o,a);h=S}if(null!=h){if(!p(n,u,h,s,o))return c(n,o,a);n.editSessionDirty=!0}}function p(n,t,o,s,l){if(null==s||!0===l?.ignoreWhitespace||!0===l?.stripTrailingCr)return!1;const u=S(n),a=n.hunks[o];if(a.hunkContent.some(x))return!1;for(const o of t){const t=s.get(o),l=n.additionLines[o];if(null==t||null==l||u.has(t)||u.has(l))return!1;let f=!1;for(const n of a.hunkContent)if("change"===n.type&&n.additions===n.deletions&&o>=n.additionLineIndex&&o<n.additionLineIndex+n.additions){f=!0;break}if(!f)return!1}return!0}function S(n){const t=u.get(n);if(t?.lines===n.deletionLines)return t.set;const o=new Set(n.deletionLines);return u.set(n,{lines:n.deletionLines,set:o}),o}function x(n){return"change"===n?.type&&(0===n.additions||0===n.deletions)}function L(n,t){const o=new Map,{regions:s}=t;for(let t=0;t<=s.length;t++){const l=s[t-1],u=s[t],a=0===t?n.get(0):null==l?void 0:n.get(l.lastIndex+1),f=null==u?void 0:n.get(u.firstIndex),c=a?.fromStart??0,h=f?.fromEnd??0;(c>0||h>0)&&o.set(t,{fromStart:c,fromEnd:h})}return o}function k(n,o,s){const l=[];if(n.isPartial)return l;for(const[u,a]of n.hunks.entries()){const f=(0,t.getExpandedRegion)({isPartial:n.isPartial,rangeSize:a.collapsedBefore,expandedHunks:o,hunkIndex:u,collapsedContextThreshold:s});if(f.rangeSize<=s)continue;const c=R(a),h=c-f.rangeSize;f.fromStart>0&&l.push([h,h+f.fromStart]),f.fromEnd>0&&l.push([c-f.fromEnd,c])}const u=(0,t.getTrailingExpandedRegion)({fileDiff:n,hunkIndex:n.hunks.length-1,expandedHunks:o,collapsedContextThreshold:s,errorPrefix:"captureExpansionAnchors"});if(null!=u&&u.fromStart>0&&u.rangeSize>s){const t=n.hunks[n.hunks.length-1],o=R(t)+t.deletionCount;l.push([o,o+u.fromStart])}return l}function E(n,t){const o=new Map;if(0===t.length)return o;const s=(n,s,l)=>{if(l<=s)return;let u=0,a=0;for(const[n,o]of t)o<=s||n>=l||(n<=s&&(u=Math.max(u,Math.min(o,l)-s)),o>=l&&(a=Math.max(a,l-Math.max(n,s))));(u>0||a>0)&&o.set(n,{fromStart:u,fromEnd:a})};for(const[t,o]of n.hunks.entries()){const n=R(o);s(t,n-Math.max(o.collapsedBefore,0),n)}const l=n.hunks[n.hunks.length-1];return null!=l&&!n.isPartial&&n.deletionLines.length>0&&s(n.hunks.length,R(l)+l.deletionCount,n.deletionLines.length),o}function b(n,t){return!0===n.editSessionDirty&&(delete n.editSessionDirty,Object.assign(n,n.additionLines.length<=1&&""===n.additionLines.join("")?(0,l.recomputeDiffHunks)(n,t):(0,l.recomputeDiffHunksForEdit)(n,t)),!0)}function C(n,t,u){if(null==f(n.deletionLines,n.additionLines))return[];const a=(0,s.parseDiffFromFile)({name:n.prevName??n.name,contents:n.deletionLines.join("")},{name:n.name,contents:n.additionLines.join(""),lang:n.lang},t);let c;const h=(t,o)=>{c??=I(n.hunks);for(let n=0;n<=o;n++){const s=c.get(t.deletionLineIndex-n);if(null!=s&&s.additions===t.additions&&s.deletions===t.deletions){if(t.additions>0&&null!=u)for(let n=0;n<t.additions;n++)if(u(s.additionLineIndex+n)!==a.additionLines[t.additionLineIndex+n])return o;return n}}return o},p=[];let S=0,x=0;for(const n of a.hunks){(0,o.slideBlankBoundaryBlocksUp)(n,a,h);const t=n.additionCount>0?n.additionLineIndex-S:n.deletionLineIndex-x;S+=t,x+=t;for(const t of n.hunkContent){if("context"===t.type){S+=t.lines,x+=t.lines;continue}const n=(0,l.offsetHunkContent)(t,0,0);0===n.additions&&(n.additionLineIndex=S),0===n.deletions&&(n.deletionLineIndex=x),p.push(n),S+=n.additions,x+=n.deletions}}return p}function I(n){const t=new Map;for(const o of n)for(const n of o.hunkContent)"change"!==n.type||0!==n.additions&&0!==n.deletions||t.set(n.deletionLineIndex,n);return t}function v(n,t,o){const s=n.map((n,t)=>{const o=R(n);return{deletionStart:o,deletionEnd:o+n.deletionCount,blocks:[],previousSpan:{firstIndex:t,lastIndex:t}}}),l=[];let u=0;for(const n of t){const t=n.deletionLineIndex,a=t+n.deletions;for(;u<s.length&&s[u].deletionEnd<t;)l.push(s[u]),u++;let f=l.length>0&&y(t,a,l[l.length-1])?l.pop():void 0;for(;u<s.length&&s[u].deletionStart<=a;)f=M(f,s[u]),u++;if(null==f){let c=t,h=a;if((0===n.deletions||0===n.additions)&&o>n.deletions){const n=l[l.length-1]?.deletionEnd??0,f=s[u]?.deletionStart??o;t>n?c--:a<f&&h++}f={deletionStart:c,deletionEnd:h,blocks:[],previousSpan:void 0}}f.deletionStart=Math.min(f.deletionStart,t),f.deletionEnd=Math.max(f.deletionEnd,a),f.blocks.push(n),l.push(f)}for(;u<s.length;)l.push(s[u]),u++;return l}function y(n,t,o){return n<=o.deletionEnd&&t>=o.deletionStart}function M(n,t){return null==n?t:(n.deletionStart=Math.min(n.deletionStart,t.deletionStart),n.deletionEnd=Math.max(n.deletionEnd,t.deletionEnd),n.blocks.push(...t.blocks),null!=t.previousSpan&&(n.previousSpan??=Object.assign({},t.previousSpan),n.previousSpan.firstIndex=Math.min(n.previousSpan.firstIndex,t.previousSpan.firstIndex),n.previousSpan.lastIndex=Math.max(n.previousSpan.lastIndex,t.previousSpan.lastIndex)),n)}function j(n,t){const o=[];let s=0,l=0;for(const u of t){const t=u.deletionStart-s;if(t<0)throw new Error("buildRegionHunks: overlapping old-side regions");s+=t,l+=t;const a=l,f=[];for(const n of u.blocks){const t=n.deletionLineIndex-s,o=n.additionLineIndex-l;if(t<0||t!==o)throw new Error("buildRegionHunks: canonical block context mismatch");H(f,t,l,s),s+=t,l+=o,f.push(Object.assign({},n)),s+=n.deletions,l+=n.additions}const c=u.deletionEnd-s;if(c<0)throw new Error("buildRegionHunks: block exceeds its old-side region");H(f,c,l,s),s+=c,l+=c,o.push(O(n,{additionStart:a,additionEnd:l,deletionStart:u.deletionStart,deletionEnd:u.deletionEnd},f))}if(n.deletionLines.length-s!==n.additionLines.length-l)throw new Error("buildRegionHunks: trailing context mismatch");return o}function O(n,t,o){const s=t.additionEnd-t.additionStart,u=t.deletionEnd-t.deletionStart;let a=0,f=0;for(const n of o)"change"===n.type&&(a+=n.additions,f+=n.deletions);const c={collapsedBefore:0,additionStart:B(t.additionStart,s),additionCount:s,additionLines:a,additionLineIndex:z(t.additionStart,s),deletionStart:B(t.deletionStart,u),deletionCount:u,deletionLines:f,deletionLineIndex:z(t.deletionStart,u),hunkContent:o,hunkSpecs:`@@ -${B(t.deletionStart,u)},${u} +${B(t.additionStart,s)},${s} @@`,splitLineStart:0,splitLineCount:0,unifiedLineStart:0,unifiedLineCount:0,noEOFCRAdditions:!1,noEOFCRDeletions:!1};return(0,l.recomputeHunkRenderLineCounts)(c),c}function H(n,t,o,s){t>0&&n.push({type:"context",lines:t,additionLineIndex:o,deletionLineIndex:s})}function w(n,t){if(n.length!==t.length)return!0;for(let o=0;o<n.length;o++){const s=n[o],l=t[o];if(R(s)!==R(l)||s.deletionCount!==l.deletionCount||F(s)!==F(l)||s.additionCount!==l.additionCount||s.splitLineCount!==l.splitLineCount||!P(s,l))return!0}return!1}function P(n,t){const o=D(n),s=D(t);for(;;){const n=o.next(),t=s.next();if(!0===n.done||!0===t.done)return n.done===t.done;if(n.value[0]!==t.value[0]||n.value[1]!==t.value[1])return!1}}function*D(n){for(const t of n.hunkContent){if("context"===t.type){for(let n=0;n<t.lines;n++)yield[t.deletionLineIndex+n,t.additionLineIndex+n];continue}const n=Math.max(t.deletions,t.additions);for(let o=0;o<n;o++)yield[o<t.deletions?t.deletionLineIndex+o:void 0,o<t.additions?t.additionLineIndex+o:void 0]}}function F(t){return(0,n.getHunkSideStartBoundary)(t.additionStart,t.additionCount)}function R(t){return(0,n.getHunkSideStartBoundary)(t.deletionStart,t.deletionCount)}function B(n,t){return 0===t?n:n+1}function z(n,t){return 0===t?n-1:n}function A(n){(0,l.recomputeDiffRenderLineCounts)(n);for(let t=0;t<n.hunks.length;t++)(0,l.syncHunkNoEOFCRFromFullFile)(n,t)}},1379,[1338,1376,1345,1346,1378]);
281
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"isDiffPlainText",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){const l=n.lang??(0,t.getFiletypeFromFileName)(n.name),u=n.lang??(null!=n.prevName?(0,t.getFiletypeFromFileName)(n.prevName):"text");return"text"===l&&"text"===u}},1380,[1286]);
282
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){return t.lineNumber===n.lineNumber&&t.side===n.side&&t.metadata===n.metadata}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areDiffLineAnnotationsEqual",{enumerable:!0,get:function(){return t}})},1381,[]);
283
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n,t){return n.slotName===t.slotName&&n.hunkIndex===t.hunkIndex&&n.lines===t.lines&&n.lineCountKnown===t.lineCountKnown&&n.type===t.type&&n.expandable?.chunked===t.expandable?.chunked&&n.expandable?.up===t.expandable?.up&&n.expandable?.down===t.expandable?.down}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areHunkDataEqual",{enumerable:!0,get:function(){return n}})},1382,[]);
284
- __d(function(g,r,_i,a,m,_e,d){"use strict";const e=["fileContainer","prerenderedHTML","preventEmit","lineAnnotations","fileDiff"],t=["fileDiff","deferManagers","forceRender","preventEmit","lineAnnotations","fileContainer","containerWrapper","renderRange"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"FileDiff",{enumerable:!0,get:function(){return le}});var i,n=r(d[0]),s=(i=n)&&i.__esModule?i:{default:i},o=r(d[1]),l=r(d[2]),h=r(d[3]),f=r(d[4]),u=r(d[5]),c=r(d[6]),p=r(d[7]),S=r(d[8]),C=r(d[9]),y=r(d[10]),v=r(d[11]),D=r(d[12]),E=r(d[13]),R=r(d[14]),w=r(d[15]),A=r(d[16]),T=r(d[17]),b=r(d[18]),L=r(d[19]),F=r(d[20]),H=r(d[21]),k=r(d[22]),M=r(d[23]),P=r(d[24]),x=r(d[25]),_=r(d[26]),N=r(d[27]);r(d[28]);var U=r(d[29]),O=r(d[30]),B=r(d[31]),I=r(d[32]),z=r(d[33]),V=r(d[34]),G=r(d[35]),W=r(d[36]),j=r(d[37]),q=r(d[38]),$=r(d[39]),K=r(d[40]),X=r(d[41]),Y=r(d[42]),J=r(d[43]),Q=r(d[44]),Z=r(d[45]),ee=r(d[46]),te=r(d[47]),ie=r(d[48]);function ne(e){return e.isPartial&&("change"===e.type||"rename-changed"===e.type||"rename-pure"===e.type)}function se(e){const t=Object.assign({},e);return delete t.cacheKey,t}function re(e,t){if(e.isPartial||t.isPartial)throw new Error("FileDiff.shouldResetEditorForExternalDiff: diffs must be fully hydrated");const i=e.lang??(0,v.getFiletypeFromFileName)(e.name),n=t.lang??(0,v.getFiletypeFromFileName)(t.name),s="new"!==e.type,o="new"!==t.type;return e.name!==t.name||i!==n||s!==o||e.deletionLines.length!==t.deletionLines.length||e.deletionLines.some((e,i)=>e!==t.deletionLines[i])}function oe(e,t){const{oldFile:i}=e;return null==i?"new"===t.type:"new"!==t.type&&i.name===(t.prevName??t.name)&&(n=i.lines,s=t.deletionLines,n.length===s.length&&n.every((e,t)=>e===s[t]));var n,s}let ae=-1;var le=class{static LoadedCustomComponent=!0;__id="file-diff:"+ ++ae;type="file-diff";hasAdoptedThemeCSS=!1;separatorCache=new Map;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;headerCache={lastRenderedHTML:void 0,html:void 0,fileDiff:void 0};mounted=!1;enabled=!0;lineStateRefreshPending=!1;constructor(e={theme:o.DEFAULT_THEMES},t,i=!1){this.options=e,this.workerManager=t,this.isContainerManaged=i,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new C.ResizeManager,this.scrollSyncManager=new K.ScrollSyncManager,this.interactionManager=new S.InteractionManager("diff",(0,S.pluckInteractionOptions)(e,"function"==typeof e.hunkSeparators||"line-info"===(e.hunkSeparators??"line-info")||"line-info-basic"===e.hunkSeparators?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??o.DEFAULT_THEMES}getHunksRendererOptions(e){return(0,te.getDiffHunksRendererOptions)(e)}createHunksRenderer(e){return new Q.DiffHunksRenderer(this.getHunksRendererOptions(e),this.getAnnotationSlotName,this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t="additions")=>this.getLineIndexForDiff(this.getDiffForLineIndex(),e,t);getDiffForLineIndex(){return this.getRenderedDiff()}getLineIndexForDiff(e,t,i){if(null==e)return;const n=e.hunks.at(-1);let s,o;e:for(const l of e.hunks){const e="deletions"===i?l.deletionStart:l.additionStart,h="deletions"===i?l.deletionCount:l.additionCount;let f=(0,I.getHunkSideStartBoundary)(e,h)+1,u=l.splitLineStart,c=l.unifiedLineStart;if(t<f){const e=f-t;s=Math.max(c-e,0),o=Math.max(u-e,0);break e}if(!(t>=f+h)){for(const e of l.hunkContent)if("context"===e.type){if(t<f+e.lines){const e=t-f;o=u+e,s=c+e;break e}f+=e.lines,u+=e.lines,c+=e.lines}else{const n="deletions"===i?e.deletions:e.additions;if(t<f+n){const n=t-f;s=c+("additions"===i?e.deletions:0)+n,o=u+n;break e}f+=n,u+=Math.max(e.deletions,e.additions),c+=e.deletions+e.additions}break e}if(l===n){const e=t-(f+h);s=c+l.unifiedLineCount+e,o=u+l.splitLineCount+e;break e}}return null!=s&&null!=o?[s,o]:void 0}setOptions(e){null!=e&&(this.options=e,this.clearReusableHeader(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions((0,S.pluckInteractionOptions)(this.options,"function"==typeof this.options.hunkSeparators||"line-info"===(this.options.hunkSeparators??"line-info")||"line-info-basic"===this.options.hunkSeparators?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options=Object.assign({},this.options,e)}setThemeType(e){(this.options.themeType??"system")!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if("string"==typeof this.options.theme||null==this.fileContainer||null==this.appliedThemeCSS)return!1;const t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return null!=this.appliedThemeCSS&&!(0,u.areThemesEqual)(this.appliedThemeCSS.theme,this.getTheme())}getHoveredLine=()=>this.interactionManager.getHoveredLine();getAnnotationSlotName=e=>(0,H.resolveEditSessionSlotName)(this.editSession?.annotations,e,D.getLineAnnotationName);getLatestAnnotations(){return this.editSession?.annotations?.current??this.lineAnnotations}isNewAnnotations(e){const t=this.editSession?.annotations;return e!==this.lineAnnotations&&(null==t||e!==t.provided&&e!==t.current)}setLineAnnotations(e){const t=this.editSession?.annotations;null!=t?this.isNewAnnotations(e)&&(this.lineAnnotations=e,(0,H.writeEditSessionAnnotations)(t,e,D.getLineAnnotationName)):this.lineAnnotations=e}syncEditSessionAnnotationsFromEditor(e){const t=this.editSession?.annotations;return null!=t&&e!==t.current&&(t.current=e,this.hunksRenderer.setLineAnnotations(e),this.renderAnnotations(),!0)}canPartiallyRender(e,t,i){return!(e||t||i||"function"==typeof this.options.hunkSeparators)}setSelectedLines(e,t){this.lineStateRefreshPending?this.deferredSelectedLines=[e,t]:this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.lineStateRefreshPending?this.deferredEditorActiveLine=[e,t]:this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??"additions"})}flushDeferredLineState(){const{deferredEditorActiveLine:e,deferredSelectedLines:t}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,null!=e&&this.setEditorActiveLine(...e),null!=t&&this.interactionManager.setSelection(...t)}flushManagers(){if(!this.managersDirty||null==this.pre)return void(this.managersDirty=!1);const{diffStyle:e="split",overflow:t="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:"wrap"===t,columnVariables:this.shouldApplyColumnVariables(t)?"apply":"measure"}),"scroll"===t&&"split"===e?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(e){return"function"==typeof this.options.hunkSeparators||"scroll"===e&&(this.getLatestAnnotations().length>0||!0===this.pre?.hasAttribute("data-has-merge-conflict"))}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(e){null!=this.codeUnified&&(this.codeUnified.scrollLeft=e),null!=this.codeAdditions&&(this.codeAdditions.scrollLeft=e),null!=this.codeDeletions&&(this.codeDeletions.scrollLeft=e)}__getEffectiveCodeOptions(){return Object.assign({},this.options,this.hunksRenderer.getEffectiveCodeOptions())}cleanUp(e=!1){const{editor:t}=this;(0,f.dequeueRender)(this.handleEditSessionRender),this.emitPostRender(!0),t?.cleanUp(e?"recycle":"discard"),e||(this.editor=void 0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,e||(this.pendingFiles=void 0),this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,this.headerCache.lastRenderedHTML=void 0,e||this.clearReusableHeader(),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.editSession=void 0,this.renderedDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),null!=this.refreshViewTimeout&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(t){let{fileContainer:i,prerenderedHTML:n,preventEmit:o=!1,lineAnnotations:l,fileDiff:h}=t,f=(0,s.default)(t,e);if(!this.enabled)throw new Error("FileDiff.hydrate: attempting to call hydrate after cleaned up");if(null!=this.fileContainer)throw new Error("FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated");const u=(0,V.getDiffFileInput)(f,"FileDiff.hydrate"),c=u?.oldFile,p=u?.newFile;this.hydrateElements(i,n);const S=null!=this.editor;S||ue(this.pre,he({fileDiff:h,oldFile:c,newFile:p}),this.options.collapsed)||ce(this.headerElement,fe({fileDiff:h,oldFile:c,newFile:p}),this.options.disableFileHeader)?this.render(Object.assign({},f,{fileContainer:i,lineAnnotations:l,fileDiff:h,forceRender:S||f.forceRender,preventEmit:!0})):this.hydrationSetup(Object.assign({fileDiff:h,lineAnnotations:l},u)),o||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),(0,x.prerenderHTMLIfNecessary)(e,t);for(const t of e.shadowRoot?.children??[])if(t instanceof SVGElement)this.spriteSVG=t;else if(t instanceof HTMLElement)if(t instanceof HTMLPreElement){this.pre=t;for(const e of t.children)e instanceof HTMLElement&&"code"===e.tagName.toLowerCase()&&("deletions"in e.dataset&&(this.codeDeletions=e),"additions"in e.dataset&&(this.codeAdditions=e),"unified"in e.dataset&&(this.codeUnified=e))}else"diffsHeader"in t.dataset?this.headerElement=t:t instanceof HTMLStyleElement&&t.hasAttribute("data-theme-css")?this.themeCSSStyle=t:t instanceof HTMLStyleElement&&t.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent);null!=this.pre&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:i,lineAnnotations:n}){this.lineAnnotations=n??this.lineAnnotations,this.additionFile=i,this.deletionFile=t,this.fileDiff=e??(void 0!==t&&void 0!==i?(0,$.parseDiffFromFile)(t,i,this.options.parseDiffOptions):void 0),null!=this.pre&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderedDiff=this.fileDiff,this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||null==this.fileDiff&&null==this.additionFile&&null==this.deletionFile||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,i)=>{this.expandHunk(e,t,i)};expandHunk=(e,t,i)=>{this.loadFilesIfNecessary(),this.hunksRenderer.expandHunk(e,t,i),this.rerender()};loadFilesIfNecessary(){const{fileDiff:e,options:{loadDiffFiles:t}}=this;if(null==e||!ne(e)||this.pendingFiles?.fileDiff===e)return;if(null==t)throw new Error("FileDiff: loadDiffFiles is required to load full files for a partial diff");const i=this.loadFilesForDiff(e,t),n=this.pendingFiles={fileDiff:e,promise:i};n.promise=i.finally(()=>{this.pendingFiles===n&&(this.pendingFiles=void 0)})}__canAttachEditor(){return null!=this.fileDiff&&!this.fileDiff.isPartial}async prepareForEditing(){if(this.__canAttachEditor())return;const e=this.__prepareForEditing();if(null==e){if(!0===this.fileDiff?.isPartial&&!ne(this.fileDiff))throw new Error("FileDiff.prepareForEditing: this partial diff cannot be hydrated; provide a complete diff");throw new Error("FileDiff.prepareForEditing: a partial diff requires loadDiffFiles")}if(await e,!this.__canAttachEditor())throw new Error("FileDiff.prepareForEditing: the diff did not finish loading")}__prepareForEditing(){if(!this.__canAttachEditor()){if(!0===this.fileDiff?.isPartial&&!ne(this.fileDiff))throw new Error("FileDiff: this partial diff cannot be hydrated; provide a complete diff to edit");return this.loadFilesIfNecessary(),this.pendingFiles?.promise}}async loadFilesForDiff(e,t){try{const i=await t(e);if(this.fileDiff!==e)return;await this.handleFilesLoaded(e,i)}catch(e){if(!0===this.options.disableErrorHandling)throw e;console.error(e)}}async handleFilesLoaded(e,t){this.fileDiff===e&&e.isPartial&&((0,j.hydratePartialDiff)("merge",e,t),this.setHydratedState(t),this.installHydratedSessionDiff(e)?this.rerender():(await(0,B.awaitWithTimeout)(()=>this.primeHighlightCache(e)),this.enabled&&this.fileDiff===e&&this.rerender()))}installHydratedSessionDiff(e){if(e.isPartial)throw new Error("FileDiff.installHydratedSessionDiff: diffs cannot be partial for editing");return this.fileDiff===e&&(null!=this.editSession?.outgoingDiff&&(this.installEditSession(e),!0))}updateExternalDiff(e,t){if((0,U.areDiffTargetsEqual)(this.fileDiff,e))return!1;const i=this.editSession?.outgoingDiff??this.editSession?.diff;return this.fileDiff=e,null!=i&&(e.isPartial?this.loadFilesIfNecessary():this.installEditSession(e),null!=this.editSession&&(this.editSession.outgoingDiff=i)),null!=this.editSession?.annotations&&null!=t&&(this.lineAnnotations=t,this.editSession.annotations=(0,H.adoptEditSessionAnnotations)(t,D.getLineAnnotationName,this.editSession.annotations)),!0}installEditSession(e,t,i){const n=e.additionLines.join(""),s=null!=t?(0,W.splitFileContents)(t.contents):void 0,o=null!=i&&oe(i,e);if(null!=i&&!o)throw new Error("FileDiff: retained session cannot resume against a different old file");if(null!=t&&t.contents!==n&&!o)throw new Error("FileDiff: retained edits are missing their diff session state");const l=null==t||t.name===e.name&&t.lang===e.lang&&t.contents===n,h=se(e);null==t||null==s||l||(h.name=t.name,h.lang=t.lang),o&&null!=i&&null!=s&&(h.additionLines=s,h.type=i.type,h.hunks=i.hunks,h.editSessionDirty=!0,(0,X.recomputeDiffRenderLineCounts)(h)),this.editSession={diff:h,annotations:this.editSession?.annotations??(0,H.adoptEditSessionAnnotations)(this.lineAnnotations,D.getLineAnnotationName),outgoingDiff:this.editSession?.outgoingDiff},this.hunksRenderer.beginEditSession(h,l&&!o?e:void 0)}setHydratedState(e){this.deletionFile=e.oldFile,this.additionFile=e.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render(e){let{fileDiff:i,deferManagers:n=!1,forceRender:l=!1,preventEmit:h=!1,lineAnnotations:f,fileContainer:u,containerWrapper:c,renderRange:p}=e,S=(0,s.default)(e,t);if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const C=(0,V.getDiffFileInput)(S,"FileDiff.render"),v=C?.oldFile,D=C?.newFile;this.editor?.__postponeBgTokenizeToNextFrame();const{collapsed:E=!1,themeType:R="system",expandUnchanged:w=!1}=this.options,A=E?void 0:p,T=this.hasThemeChanged(),b=null!=C,L=b&&(!de(v,this.deletionFile)||!de(D,this.additionFile));let F=null!=i&&!(0,U.areDiffTargetsEqual)(i,this.fileDiff);const H=null!=f&&(f.length>0||this.getLatestAnnotations().length>0)&&this.isNewAnnotations(f);if(!E&&(0,y.areRenderRangesEqual)(A,this.renderRange)&&!l&&!H&&!T&&(null!=i&&!F||null==i&&!L)){const e=this.applyCachedThemeState(R);return e&&this.finalizeRender(),e}let k;null==i&&b&&(L||null==this.fileDiff)&&(k=(0,$.parseDiffFromFile)(C.oldFile,C.newFile,this.options.parseDiffOptions));const{renderRange:M}=this;this.renderRange=A,b?(this.deletionFile=v,this.additionFile=D):null!=i&&(this.deletionFile=void 0,this.additionFile=void 0),null!=i&&F?this.updateExternalDiff(i,f):null!=k&&(F=!0,this.updateExternalDiff(k,f)),F&&this.clearReusableHeader(),null!=f&&this.setLineAnnotations(f);const P=this.getLatestDiff();if(null==P)return!1;!0===P.editSessionDirty&&this.shouldSelfHealEditSession()&&((0,Y.finishEditSessionForDiff)(P,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),w&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.getLatestAnnotations());const{disableErrorHandling:x=!1,disableFileHeader:_=!1}=this.options;if(_&&(null!=this.headerElement&&(this.headerElement.remove(),this.headerElement=void 0,this.headerCache.lastRenderedHTML=void 0),this.clearHeaderSlots()),u=this.getOrCreateFileContainer(u,c),this.applyCachedThemeState(R),E){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const e=this.hunksRenderer.renderDiff(P,o.EMPTY_RENDER_RANGE);null!=e&&this.applyThemeState(u,e.themeStyles,R,e.baseThemeType),null!=e?.headerElement&&this.applyHeaderToDOM(e.headerElement,u,e.fileDiff),this.renderSeparators([]),this.renderedDiff=e?.fileDiff??P,this.injectUnsafeCSS()}catch(e){if(x)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,u)}return this.finalizeRender(),h||this.emitPostRender(),!0}try{const e=this.getOrCreatePreNode(u);if(!this.canPartiallyRender(l,H,L||F||T||!(0,U.areDiffTargetsEqual)(this.renderedDiff,P))||!this.applyPartialRender({fileDiff:P,previousRenderRange:M,renderRange:A})){const t=this.hunksRenderer.renderDiff(P,A);if(null==t)return!1===this.workerManager?.isInitialized()&&this.workerManager.isWorkingPool()&&this.workerManager.initialize().catch(()=>{}).then(()=>this.rerender()),!1;this.applyThemeState(u,t.themeStyles,R,t.baseThemeType),null!=t.headerElement&&this.applyHeaderToDOM(t.headerElement,u,t.fileDiff),null!=t.additionsContentAST||null!=t.deletionsContentAST||null!=t.unifiedContentAST?this.applyHunksToDOM(e,t):null!=this.pre&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData),this.renderedDiff=t.fileDiff}this.applyBuffers(e,A),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,n||this.flushManagers(),this.finalizeRender(),null!=this.editor&&this.syncRenderViewToEditor()}catch(e){if(x)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,u)}return h||this.emitPostRender(),!0}finalizeRender(){}emitPostRender(e=!1){const{fileContainer:t,options:{onPostRender:i}}=this;if(e){if(!this.mounted)return;if(this.mounted=!1,null==t)return;return void this.options.onPostRender?.(t,this,"unmount")}if(null==t)return;const n=this.mounted?"update":"mount";this.mounted=!0,i?.(t,this,n)}getLatestDiff(e=this.fileDiff){return this.editSession?.diff??e}getRenderedDiff(){return this.renderedDiff}syncRenderViewToEditor(){const{editor:e,fileContainer:t}=this,i=this.getLatestAnnotations(),n=this.computeEditorRenderRange(this.renderRange),s=this.getLatestDiff();if(null==e||null==t||null==s||s.isPartial)return;const o=o=>{if(!this.enabled||this.editor!==e||this.fileContainer!==t||this.getLatestDiff()!==s)return;const l=this.editSession?.outgoingDiff,{fileDiff:h}=this,f=null!=l&&null!=h&&l!==s,u=!(!f||null==l||null==h)&&re(l,h);e.__syncRenderView({highlighter:o,fileContainer:t,fileDiff:s,lineAnnotations:i,renderRange:n,externalDocument:f,resetHistory:u})},f=this.getTheme(),u=s.lang??(0,v.getFiletypeFromFileName)(s.name),c=(0,h.getHighlighterIfLoaded)({theme:f,lang:u});null!=c?o(c):(0,h.getSharedHighlighter)({themes:(0,l.getThemes)(f),langs:["text",u],preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter}).then(o)}computeEditorRenderRange(e){const t=this.getLatestDiff();if(null==e||null==t||(0,E.isDefaultRenderRange)(e))return e;const{diffStyle:i="split",expandUnchanged:n=!1,collapsedContextThreshold:s=1}=this.options;let o,l;return(0,q.iterateOverDiff)({diff:t,diffStyle:i,startingLine:e.startingLine,totalLines:e.totalLines,expandedHunks:!!n||this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({additionLine:e})=>{null!=e&&(o??=e.lineNumber,l=e.lineNumber)}}),null==o||null==l?Object.assign({},e,{startingLine:0,totalLines:0}):Object.assign({},e,{startingLine:o-1,totalLines:l-o+1})}__acknowledgeDocumentUpdate(){null!=this.editSession&&(this.editSession.outgoingDiff=void 0)}__acceptEditorChange(e){const{lineAnnotations:t}=e;null!=t&&this.syncEditSessionAnnotationsFromEditor(t)}emitEditChange(e){const{onEditChange:t}=this.options;t?.(e)}__captureDocumentSessionState(e=!0){let{fileDiff:t,editSession:{diff:i,outgoingDiff:n}={}}=this;if(null!=n&&null!=t){if(!t.isPartial&&re(n,t))return;i=n}if(null!=i&&!i.isPartial)return{diffSession:{oldFile:"new"!==i.type?{name:i.prevName??i.name,lines:e?[...i.deletionLines]:i.deletionLines}:null,type:i.type,hunks:e?(0,G.cloneHunks)(i.hunks):i.hunks},hasChanges:!0===i.editSessionDirty}}__attachEditor(e){if("file-diff"!==this.type)throw new Error(`FileDiff.__attachEditor: cannot attach an editor to a "${this.type}" diff`);if(null!=this.editor)throw new Error("FileDiff.__attachEditor: an editor is already attached");if(!this.__canAttachEditor())throw new Error("FileDiff.__attachEditor: a complete diff is required before editing");const t=()=>{this.editor=void 0,this.finishEditSession()};try{return this.resumeEditorRendering(e),t}catch(e){throw t(),e}}__resumeEditor(e){if(this.editor!==e)throw new Error("FileDiff.__resumeEditor: editor association changed");this.resumeEditorRendering(e)}resumeEditorRendering(e){const{fileDiff:t}=this,i=this.editSession?.outgoingDiff;null==i||null==t||t.isPartial||this.editSession?.diff!==i||this.installEditSession(t);const n=null!=this.editSession||null==t||t.isPartial?void 0:t;var s;null!=n?this.installEditSession(n,e.__getDocumentContents({name:(s=n).name,lang:s.lang,contents:s.additionLines.join("")}),e.__getDocumentSessionState()):null!=this.editSession&&this.hunksRenderer.beginEditSession(this.editSession.diff),this.editor=e,!0===this.fileDiff?.isPartial&&this.loadFilesIfNecessary();const o=this.editSession?.diff;this.hunksRenderer.editorRenderReady()?(null!=o&&this.hunksRenderer.diffCache===o&&(this.renderedDiff=o),this.syncRenderViewToEditor()):this.rerender()}finishEditSession(){this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks()}__completeEditSession(e,t){this.settleEditSession("install"===t,e)}settleEditSession(e,t){const{editSession:i,fileDiff:n,lineAnnotations:s}=this;if(null==i||null==n)return;const{diff:o,annotations:l}=i;if(null!=this.editor)throw new Error("FileDiff.__completeEditSession: detach the editor before completing the session");this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks();const h=l?.current;let f,u,c=null,p=null,S=!1;if(null==t)throw new Error("FileDiff.__completeEditSession: editor is required for completion");const C=(0,G.cloneFileDiffMetadata)(o),y={name:C.name,contents:C.additionLines.join("")};null!=C.lang&&(y.lang=C.lang);const v={fileDiff:C,editor:t,originalFileDiff:n,oldFile:"new"===C.type?null:{name:C.prevName??C.name,contents:C.deletionLines.join("")},newFile:y,lineAnnotations:h,originalLineAnnotations:s};Object.freeze(v);try{if(t.__emitEditComplete(v),"accept"===this.options.onEditComplete?.(v)){if(null!=C.cacheKey&&C.cacheKey===n.cacheKey)throw new Error("FileDiff.__completeEditSession: an accepted diff must not reuse the replaced diff cacheKey");f=C,c=v.oldFile,p=v.newFile}}catch(e){S=!0,u=e}if(e&&null!=f&&(this.fileDiff=f,null!=this.additionFile&&(this.deletionFile=c,this.additionFile=p),null!=h&&(this.lineAnnotations=h)),this.editSession=void 0,e&&null!=this.fileContainer&&this.rerender(),S)throw u}finalizeEditSessionHunks(){const e=this.getLatestDiff();if(null==e||!0!==e.editSessionDirty)return!1;const{collapsedContextThreshold:t=1}=this.options,i=(0,Y.captureExpansionAnchors)(e,this.hunksRenderer.getExpandedHunksMap(),t);return(0,Y.finishEditSessionForDiff)(e,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap((0,Y.rebuildExpansionFromAnchors)(e,i)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(e,t){const i=this.editSession?.diff;if(null==i)throw new Error("FileDiff.applyDocumentChange: requires an active edit session");this.detachAdditionLines(),this.hunksRenderer.beginEditSession(i),this.hunksRenderer.applyDocumentChange(e),null!=t&&this.syncEditSessionAnnotationsFromEditor(t),this.rerender(),this.interactionManager.setSelectionDirty()}applySuspendedDocumentChange(e,t){this.applyDocumentChange(e,t),this.hunksRenderer.clearRenderCache()}updateRenderCache(e,t,i={}){const n=this.editSession?.diff;if(null==n)throw new Error("FileDiff.updateRenderCache: requires an active edit session");this.detachAdditionLines(),this.hunksRenderer.beginEditSession(n);const{shouldRefreshDiffsView:s,lineCountChangeInFlight:o}=i;if(this.hunksRenderer.updateRenderCache(e,t,o,i.changedDocumentLines,i.documentLineCount))return null!=this.refreshViewTimeout&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,void this.escalateEditSessionRender();!0===s&&(null!=this.refreshViewTimeout&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,"split"===this.options.diffStyle?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}detachAdditionLines(){const e=this.editSession?.diff,{fileDiff:t}=this;null==e||e.additionLines!==t?.additionLines&&e.additionLines!==e.deletionLines||(e.additionLines=[...e.additionLines])}isLineRenderable(e){const t=this.getRenderedDiff();if(null==t)return!0;const{expandUnchanged:i=!1,collapsedContextThreshold:n=1}=this.options;return(0,z.isAdditionLineRenderable)({fileDiff:t,lineNumber:e,expandedHunks:!!i||this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:n})}getNearestRenderableLine(e,t){const i=this.getRenderedDiff();if(null==i)return e;const{expandUnchanged:n=!1,collapsedContextThreshold:s=1}=this.options;return(0,z.getNearestRenderableAdditionLine)({fileDiff:i,lineNumber:e,direction:t,expandedHunks:!!n||this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s})}revealLine(e){const t=this.getRenderedDiff(),{expandUnchanged:i=!1,collapsedContextThreshold:n=1,expansionLineCount:s=100}=this.options;if(null==t||t.isPartial||i)return!1;const o=this.hunksRenderer.getExpandedHunksMap();for(const[i,l]of t.hunks.entries()){const[h,f]=(0,z.getHunkAdditionLineRange)(l);if(e<h){const f=(0,z.getExpandedRegion)({isPartial:t.isPartial,rangeSize:l.collapsedBefore,expandedHunks:o,hunkIndex:i,collapsedContextThreshold:n}),u=h-f.rangeSize;if(f.renderAll||e<u+f.fromStart||e>=h-f.fromEnd)return!1;const c=e-(u+f.fromStart)+1,p=h-f.fromEnd-e;return c<=p?this.expandHunk(i,"up",c+s):this.expandHunk(i,"down",p+s),!0}if(e<f)return!1}const l=(0,z.getTrailingExpandedRegion)({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:o,collapsedContextThreshold:n,errorPrefix:"FileDiff.revealLine"});if(null==l||l.renderAll)return!1;const h=t.hunks[t.hunks.length-1],[,f]=(0,z.getHunkAdditionLineRange)(h);return!(e<f+l.fromStart||e>=f+l.rangeSize)&&(this.expandHunk(t.hunks.length,"up",e-(f+l.fromStart)+1+s),!0)}shouldSelfHealEditSession(){return null==this.editor}escalateEditSessionRender(){(0,f.queueRender)(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(const{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(null==this.fileContainer)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),null==this.placeHolder){const e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",e.appendChild(this.placeHolder)}return this.setPlaceholderHeight(e)}setPlaceholderHeight(e){return null!=this.placeHolder&&(this.placeHolder.style.setProperty("height",`${e}px`),!0)}async primeHighlightCache(e=this.fileDiff){const{workerManager:t}=this;if(null==e||null==t||!t.isWorkingPool()||null==e.cacheKey||(0,J.isDiffPlainText)(e))return;const i=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>i||await t.primeDiffHighlightCache(e).catch(e=>{(0,N.isHandledWorkerPoolError)(e)||console.error(e)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.headerCache.lastRenderedHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){const{hunkSeparators:t}=this.options;if(this.isContainerManaged||null==this.fileContainer||"function"!=typeof t){for(const{element:e}of this.separatorCache.values())e.remove();return void this.separatorCache.clear()}const i=new Map(this.separatorCache);for(const n of e){const e=n.slotName;let s=this.separatorCache.get(e);if(null==s||!(0,ee.areHunkDataEqual)(n,s.hunkData)){s?.element.remove();const i=document.createElement("div");i.style.display="contents",i.slot=n.slotName;const o=t(n,this);null!=o&&i.appendChild(o),this.fileContainer.appendChild(i),s={element:i,hunkData:n},this.separatorCache.set(e,s)}i.delete(e)}for(const[e,{element:t}]of i.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||null==this.fileContainer){for(const{element:e}of this.annotationCache.values())e.remove();return void this.annotationCache.clear()}const e=new Map(this.annotationCache),{renderAnnotation:t}=this.options,i=this.getLatestAnnotations();if(null!=t&&i.length>0)for(const[n,s]of i.entries()){const i=this.getAnnotationSlotName(s),o=`${n}-${i}`;let l=this.annotationCache.get(o);if(null==l||!(0,Z.areDiffLineAnnotationsEqual)(s,l.annotation)){l?.element.remove();const e=t(s);if(null==e)continue;l={element:(0,A.createAnnotationWrapperNode)(i),annotation:s},l.element.appendChild(e),this.fileContainer.appendChild(l.element),this.annotationCache.set(o,l)}e.delete(o)}for(const[t,{element:i}]of e.entries())this.annotationCache.delete(t),i.remove()}renderGutterUtility(){const{renderGutterUtility:e}=this.options;if(null==this.fileContainer||null==e)return this.gutterUtilityContent?.remove(),void(this.gutterUtilityContent=void 0);const t=e(this.interactionManager.getHoveredLine);if(null!=t&&null!=this.gutterUtilityContent)return;if(null==t)return this.gutterUtilityContent?.remove(),void(this.gutterUtilityContent=void 0);const i=(0,T.createGutterUtilityContentNode)();i.appendChild(t),this.fileContainer.appendChild(i),this.gutterUtilityContent=i}getOrCreateFileContainer(e,t){const{fileContainer:i}=this,n=e??i??document.createElement("diffs-container"),s=i!==n;return null!=i&&s&&this.editor?.__captureFocusForDOMReplacement(),s&&this.emitPostRender(!0),this.fileContainer=n,null!=i&&s&&(this.headerCache.lastRenderedHTML=void 0,this.headerElement=void 0),null!=t&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),s&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){const{shadowRoot:t}=e;if(null!=t)for(const e of t.children)e instanceof SVGElement?this.spriteSVG??=e:(0,c.isStyleNode)(e)&&e.hasAttribute("data-theme-css")?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):(0,c.isStyleNode)(e)&&e.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){const t=e.shadowRoot??e.attachShadow({mode:"open"});if(null==this.spriteSVG){const e=document.createElement("div");e.innerHTML=R.SVGSpriteSheet;const t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}null!=this.spriteSVG&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){const t=e.shadowRoot??e.attachShadow({mode:"open"});return null==this.pre?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute("data-unified")?this.codeUnified=t:t.hasAttribute("data-deletions")?this.codeDeletions=t:t.hasAttribute("data-additions")&&(this.codeAdditions=t))}applyHeaderToDOM(e,t,i){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{headerCache:{fileDiff:n,html:s,lastRenderedHTML:l}}=this,h=(i!==this.editSession?.diff&&(0,U.areDiffTargetsEqual)(n,i)?s:void 0)??(0,ie.toHtml)(e);if(this.headerCache.html=h,this.headerCache.fileDiff=i,h!==l){const e=document.createElement("div");e.innerHTML=h;const i=e.firstElementChild;if(!(i instanceof HTMLElement))return;null!=this.headerElement?t.shadowRoot?.replaceChild(i,this.headerElement):t.shadowRoot?.prepend(i),this.headerElement=i,this.headerCache.lastRenderedHTML=h}if(this.isContainerManaged)return;const{renderCustomHeader:f,renderHeaderPrefix:u,renderHeaderFilenameSuffix:c,renderHeaderMetadata:p}=this.options;if(null!=f){const e=f(i)??void 0;return this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,o.CUSTOM_HEADER_SLOT_ID,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,void(this.headerMetadata=void 0)}const S=u?.(i)??void 0,C=c?.(i)??void 0,y=p?.(i)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,o.HEADER_PREFIX_SLOT_ID,S),this.headerFilenameSuffix=this.upsertHeaderSlotElement(t,this.headerFilenameSuffix,o.HEADER_FILENAME_SUFFIX_SLOT_ID,C),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,o.HEADER_METADATA_SLOT_ID,y),this.headerCustom?.remove(),this.headerCustom=void 0}clearReusableHeader(){this.headerCache.html=void 0,this.headerCache.fileDiff=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,i,n){if(null==n)return void t?.remove();const s=t??this.createHeaderSlotElement(i);return null==t&&e.appendChild(s),this.replaceHeaderSlotContent(s,n),s}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){const t=document.createElement("div");return t.slot=e,t}injectUnsafeCSS(){const{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(null!=t)return null==e||""===e?(null!=this.unsafeCSSStyle&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),void(this.appliedUnsafeCSS=void 0)):void(this.unsafeCSSStyle?.parentNode===t&&this.appliedUnsafeCSS===e||(this.unsafeCSSStyle??=(0,b.createUnsafeCSSStyleNode)(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=(0,F.wrapUnsafeCSS)(e),this.appliedUnsafeCSS=e))}applyThemeState(e,t,i,n){const s=e.shadowRoot??e.attachShadow({mode:"open"}),o=n??i,l=this.getTheme(),h="string"==typeof l?l:Object.assign({},l),f=(0,L.getMeasuredScrollbarGutter)(s);if(this.themeCSSStyle?.parentNode!==s||this.appliedThemeCSS?.themeStyles!==t||this.appliedThemeCSS.themeType!==o||this.appliedThemeCSS.scrollbarGutter!==f){if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===s)return this.hasAdoptedThemeCSS=!1,void(this.appliedThemeCSS={theme:h,themeStyles:t,themeType:o,baseThemeType:n,scrollbarGutter:f});this.themeCSSStyle=(0,P.upsertHostThemeStyle)({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:(0,F.wrapThemeCSS)(t,o,f)}),this.appliedThemeCSS=null!=this.themeCSSStyle?{theme:h,themeStyles:t,themeType:o,baseThemeType:n,scrollbarGutter:f}:void 0}else this.appliedThemeCSS.theme=h}hydrateMeasuredScrollbar(){const e=this.fileContainer?.shadowRoot;null!=e&&null!=this.themeCSSStyle&&(this.themeCSSStyle.textContent=(0,F.patchScrollbarGutterSize)(this.themeCSSStyle.textContent??"",(0,L.getMeasuredScrollbarGutter)(e)))}shouldGuardRebuildScroll(){return null!=this.editor&&(0,p.isSafari)()}applyHunksToDOM(e,t){this.shouldGuardRebuildScroll()?(0,M.guardWebKitScrollDuringRebuild)(e,()=>this.replaceCodeColumns(e,t)):this.replaceCodeColumns(e,t)}applyCodeColumnsInPlace(e,t,i){const n=this.getColumnPair(e);if(null==n)return!1;const s=pe(t[0]),o=pe(t[1]);return null!=s&&null!=o&&(n.gutter.innerHTML=(0,ie.toHtml)(s),n.content.innerHTML=(0,ie.toHtml)(o),i!==this.lastRowCount&&(n.gutter.style.setProperty("grid-row",`span ${i}`),n.content.style.setProperty("grid-row",`span ${i}`)),!0)}replaceCodeColumns(e,t){const{overflow:i="scroll"}=this.options,n="line-info"===(this.options.hunkSeparators??"line-info"),s="wrap"===i?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let o=!1;const l=[],h=this.hunksRenderer.renderCodeAST("unified",t),f=this.hunksRenderer.renderCodeAST("deletions",t),u=this.hunksRenderer.renderCodeAST("additions",t);this.editor?.__captureFocusForDOMReplacement(),null!=h?(o=null==this.codeUnified||null!=this.codeAdditions||null!=this.codeDeletions,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=(0,k.getOrCreateCodeNode)({code:this.codeUnified,columnType:"unified",rowSpan:s,containerSize:n}),this.applyCodeColumnsInPlace(this.codeUnified,h,t.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(h)),l.push(this.codeUnified)):null!=f||null!=u?(null!=f?(o=null==this.codeDeletions||null!=this.codeUnified,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=(0,k.getOrCreateCodeNode)({code:this.codeDeletions,columnType:"deletions",rowSpan:s,containerSize:n}),this.applyCodeColumnsInPlace(this.codeDeletions,f,t.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(f)),l.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),null!=u?(o=o||null==this.codeAdditions||null!=this.codeUnified,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=(0,k.getOrCreateCodeNode)({code:this.codeAdditions,columnType:"additions",rowSpan:s,containerSize:n}),this.applyCodeColumnsInPlace(this.codeAdditions,u,t.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(u)),l.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),0===l.length?e.textContent="":o&&e.replaceChildren(...l),this.lastRowCount=t.rowCount}applyPartialRender({fileDiff:e,previousRenderRange:t,renderRange:i}){const{pre:n,codeUnified:s,codeAdditions:o,codeDeletions:l,options:{diffStyle:h="split"}}=this;if(null==n||null==t||null==i||!Number.isFinite(t.totalLines)||!Number.isFinite(i.totalLines)||null==this.lastRowCount)return!1;const f=this.getCodeColumns(h,s,l,o);if(null==f)return!1;const u=t.startingLine,c=i.startingLine,p=u+t.totalLines,S=c+i.totalLines,C=Math.max(u,c),y=Math.min(p,S);if(y<=C)return!1;const v=Math.max(0,C-u),D=Math.max(0,p-y),E=this.trimColumns({columns:f,trimStart:v,trimEnd:D,previousStart:u,overlapStart:C,overlapEnd:y,diffStyle:h});if(E<0)throw new Error("FileDiff.applyPartialRender: failed to trim to overlap");if(this.lastRowCount<E)throw new Error("FileDiff.applyPartialRender: trimmed beyond DOM row count");let R=this.lastRowCount-E;const w=(t,i)=>{if(!(i<=0))return this.hunksRenderer.renderDiff(e,{startingLine:t,totalLines:i,bufferBefore:0,bufferAfter:0})},A=w(c,Math.max(C-c,0));if(null==A&&c<C)return!1;const T=w(y,Math.max(S-y,0));if(null==T&&S>y)return!1;const b=(e,t)=>{if(null!=e){if("unified"!==h||Array.isArray(f)){if("split"!==h||!Array.isArray(f))throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");this.insertPartialHTML(h,f,e,t)}else this.insertPartialHTML(h,f,e,t);R+=e.rowCount,this.renderedDiff=e.fileDiff}};return this.cleanupErrorWrapper(),b(A,"afterbegin"),b(T,"beforeend"),this.lastRowCount!==R&&(this.applyRowSpan(h,f,R),this.lastRowCount=R),!0}insertPartialHTML(e,t,i,n){if("unified"!==e||Array.isArray(t)){if("split"!==e||!Array.isArray(t))throw new Error("FileDiff.insertPartialHTML: Invalid argument composition");{const e=this.hunksRenderer.renderCodeAST("deletions",i),s=this.hunksRenderer.renderCodeAST("additions",i);this.renderPartialColumn(t[0],e,n),this.renderPartialColumn(t[1],s,n)}}else{const e=this.hunksRenderer.renderCodeAST("unified",i);this.renderPartialColumn(t,e,n)}}refreshSplitDiffView(){const e=this.getLatestDiff();if("split"!==this.options.diffStyle||null==e)return;const t=this.hunksRenderer.renderDiff(e,this.renderRange);if(null==t)return;const i=this.getCodeColumns("split",this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(i))return;const n=(e,i)=>{if(null==i)return;const n=this.hunksRenderer.renderCodeAST(e,t),s=pe(n?.[0]),o=pe(n?.[1]);for(const[e,t]of[[i.gutter,s],[i.content,o]])if(null!=t&&e.childElementCount===t.length)for(let i=0;i<t.length;i++){const n=e.children[i],s=t[i].properties["data-line-type"];null!=s&&n.dataset.lineType!==s&&(n.dataset.lineType=s)}};n("deletions",i[0]),n("additions",i[1]),this.renderedDiff=t.fileDiff}refreshUnifiedDiffView(){const e=this.getLatestDiff();if("unified"!==this.options.diffStyle||null==e)return;const t=this.hunksRenderer.renderDiff(e,this.renderRange);if(null==t)return;const i=this.getCodeColumns("unified",this.codeUnified,this.codeDeletions,this.codeAdditions);if(null==i||Array.isArray(i))return;const n=this.hunksRenderer.renderCodeAST("unified",t),s=pe(n?.[0]),o=pe(n?.[1]),l=()=>{for(const[e,t]of[[i.gutter,s],[i.content,o]])null!=t&&(e.innerHTML=(0,ie.toHtml)(t));t.rowCount!==this.lastRowCount&&(this.applyRowSpan("unified",i,t.rowCount),this.lastRowCount=t.rowCount),this.renderedDiff=t.fileDiff};this.shouldGuardRebuildScroll()?(0,M.guardWebKitScrollDuringRebuild)(this.pre,l):l(),this.renderSeparators(t.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(e,t,i){if(null==e||null==t)return;const n=pe(t[0]),s=pe(t[1]);if(null==n||null==s)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const o=s.at(0);"beforeend"===i&&"element"===o?.type&&"number"==typeof o.properties["data-buffer-size"]&&this.mergeBuffersIfNecessary(o.properties["data-buffer-size"],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],n,s,!0);const l=s.at(-1);"afterbegin"===i&&"element"===l?.type&&"number"==typeof l.properties["data-buffer-size"]&&this.mergeBuffersIfNecessary(l.properties["data-buffer-size"],e.content.children[0],e.gutter.children[0],n,s,!1),e.gutter.insertAdjacentHTML(i,this.hunksRenderer.renderPartialHTML(n)),e.content.insertAdjacentHTML(i,this.hunksRenderer.renderPartialHTML(s))}mergeBuffersIfNecessary(e,t,i,n,s,o){if(!(t instanceof HTMLElement&&i instanceof HTMLElement))return;const l=this.getBufferSize(t.dataset);null!=l&&(o?(n.shift(),s.shift()):(n.pop(),s.pop()),this.updateBufferSize(t,l+e),this.updateBufferSize(i,l+e))}applyRowSpan(e,t,i){const n=e=>{null!=e&&(e.gutter.style.setProperty("grid-row",`span ${i}`),e.content.style.setProperty("grid-row",`span ${i}`))};if("unified"!==e||Array.isArray(t)){if("split"!==e||!Array.isArray(t))throw new Error("dun fuuuuked up");n(t[0]),n(t[1])}else n(t)}trimColumnRows(e,t,i){let n=0,s=0,o=0,l=!1;const h=i>=0;if(null==e)return 0;const f=Array.from(e.content.children),u=Array.from(e.gutter.children);if(f.length!==u.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;o<f.length&&(!(t<=0)||h||l);){const e=u[o],c=f[o];if(o++,!(e instanceof HTMLElement&&c instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:c}),new Error("FileDiff.trimColumnRows: invalid row elements");if(l&&(l=!1,"annotation"===e.dataset.gutterBuffer&&"lineAnnotation"in c.dataset||"metadata"===e.dataset.gutterBuffer&&"noNewline"in c.dataset))e.remove(),c.remove(),s++;else if("lineIndex"in e.dataset&&"lineIndex"in c.dataset)(t>0||h&&n>=i)&&(e.remove(),c.remove(),t>0&&0===--t&&(l=!0),s++),n++;else if("separator"in e.dataset&&"separator"in c.dataset)(t>0||h&&n>=i)&&(e.remove(),c.remove(),s++);else if("annotation"===e.dataset.gutterBuffer&&"lineAnnotation"in c.dataset)(t>0||h&&n>=i)&&(e.remove(),c.remove(),s++);else{if("metadata"!==e.dataset.gutterBuffer||!("noNewline"in c.dataset)){if("buffer"===e.dataset.gutterBuffer&&"contentBuffer"in c.dataset){const o=this.getBufferSize(c.dataset);if(null==o)throw new Error("FileDiff.trimColumnRows: invalid element");if(t>0){const i=Math.min(t,o),n=o-i;n>0?(this.updateBufferSize(e,n),this.updateBufferSize(c,n),s+=i):(e.remove(),c.remove(),s+=o),0===(t-=i)&&0===n&&(l=!0)}else if(h){const t=n+o-1;if(i<=n)e.remove(),c.remove(),s+=o;else if(i<=t){const n=t-i+1,l=o-n;this.updateBufferSize(e,l),this.updateBufferSize(c,l),s+=n}}n+=o;continue}throw console.error({gutterElement:e,contentElement:c}),new Error("FileDiff.trimColumnRows: unknown row elements")}(t>0||h&&n>=i)&&(e.remove(),c.remove(),s++)}}return s}trimColumns({columns:e,diffStyle:t,overlapEnd:i,overlapStart:n,previousStart:s,trimEnd:o,trimStart:l}){const h=Math.max(0,n-s),f=i-s;if(f<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const u=l>0,c=o>0;if(!u&&!c)return 0;const p=u?h:0,S=c?f:-1;if("unified"!==t||Array.isArray(e)){if("split"===t&&Array.isArray(e)){const t=this.trimColumnRows(e[0],p,S),i=this.trimColumnRows(e[1],p,S);if(null!=e[0]&&null!=e[1]&&t!==i)throw new Error("FileDiff.trimColumns: split columns out of sync");return null!=e[0]?t:i}throw console.error({diffStyle:t,columns:e}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}return this.trimColumnRows(e,p,S)}getBufferSize(e){const t=Number.parseInt(e?.bufferSize??"",10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty("grid-row",`span ${t}`),e.style.setProperty("min-height",`calc(${t} * 1lh)`)}getColumnPair(e){if(null==e)return;const t=e.children[0],i=e.children[1];return t instanceof HTMLElement&&i instanceof HTMLElement&&null!=t.dataset.gutter&&null!=i.dataset.content?{gutter:t,content:i}:void 0}getCodeColumns(e,t,i,n){if("unified"===e)return this.getColumnPair(t);{const e=this.getColumnPair(i),t=this.getColumnPair(n);return null!=e||null!=t?[e,t]:void 0}}updateBuffers(e){null!=this.pre&&this.applyBuffers(this.pre,e)}applyBuffers(e,t){if(null==t||this.shouldDisableVirtualizationBuffers())return null!=this.bufferBefore&&(this.bufferBefore.remove(),this.bufferBefore=void 0),void(null!=this.bufferAfter&&(this.bufferAfter.remove(),this.bufferAfter=void 0));t.bufferBefore>0?(null==this.bufferBefore&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",e.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${t.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):null!=this.bufferBefore&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(null==this.bufferAfter&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",e.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${t.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):null!=this.bufferAfter&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:i,totalLines:n},s){const{diffIndicators:o="bars",disableBackground:l=!1,disableLineNumbers:h=!1,overflow:f="scroll",diffStyle:u="split"}=this.options,c={type:"diff",diffIndicators:o,disableBackground:l,disableLineNumbers:h,overflow:f,split:"unified"!==u&&(null!=t&&null!=i),totalLines:n,customProperties:s};(0,w.arePrePropertiesEqual)(c,this.appliedPreAttributes)||((0,_.setPreNodeProperties)(e,c),this.appliedPreAttributes=c)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const i=t.shadowRoot??t.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",i.appendChild(this.errorWrapper);const n=document.createElement("div");n.dataset.errorMessage="",n.innerText=e.message,this.errorWrapper.appendChild(n);const s=document.createElement("pre");s.dataset.errorStack="",s.innerText=e.stack??"No Error Stack",this.errorWrapper.appendChild(s)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function de(e,t){return null==e||null==t?null==e&&null==t:(0,O.areFilesEqual)(e,t)}function he({fileDiff:e,oldFile:t,newFile:i}){return null!=e&&e.hunks.length>0||null!=t||null!=i}function fe({fileDiff:e,oldFile:t,newFile:i}){return null!=e||null!=t||null!=i}function ue(e,t,i=!1){return!i&&null==e&&t}function ce(e,t,i=!1){return null==e&&t&&!i}function pe(e){if(null!=e&&"element"===e.type)return e.children??[]}},1383,[25,1148,1232,1252,1253,1255,1323,1324,1262,1278,1281,1286,1288,1289,1309,1311,1312,1313,1314,1317,1315,1325,1319,1328,1329,1320,1321,1330,1331,1334,1335,1384,1338,1376,1385,1336,1340,1337,1375,1346,1366,1378,1379,1380,1377,1381,1382,1386,1265]);
285
- __d(function(g,r,i,a,m,e,d){"use strict";async function t(t,n=300){let u;try{await Promise.race([t(),new Promise(t=>{u=setTimeout(t,n)})])}finally{null!=u&&clearTimeout(u)}}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"awaitWithTimeout",{enumerable:!0,get:function(){return t}})},1384,[]);
286
- __d(function(g,r,i,a,m,e,d){"use strict";function n({oldFile:n,newFile:l},o){if(void 0!==n||void 0!==l){if(void 0===n||void 0===l)throw new Error(`${o}: Pass null for an intentionally missing oldFile or newFile side`);if(null===n){if(null===l)throw new Error(`${o}: You must pass oldFile, newFile, or both`);return{oldFile:n,newFile:l}}return{oldFile:n,newFile:l}}}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getDiffFileInput",{enumerable:!0,get:function(){return n}})},1385,[]);
287
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getDiffHunksRendererOptions",{enumerable:!0,get:function(){return t}});var n=r(d[0]);function t(t){return{theme:t?.theme,disableLineNumbers:t?.disableLineNumbers,overflow:t?.overflow,collapsed:t?.collapsed,disableFileHeader:t?.disableFileHeader,disableVirtualizationBuffers:t?.disableVirtualizationBuffers,stickyHeader:t?.stickyHeader,preferredHighlighter:t?.preferredHighlighter,useCSSClasses:t?.useCSSClasses,useTokenTransformer:(0,n.shouldUseTokenTransformer)(t),tokenizeMaxLineLength:t?.tokenizeMaxLineLength,tokenizeMaxLength:t?.tokenizeMaxLength,diffStyle:t?.diffStyle,diffIndicators:t?.diffIndicators,disableBackground:t?.disableBackground,hunkSeparators:"function"==typeof t?.hunkSeparators?"custom":t?.hunkSeparators,expandUnchanged:t?.expandUnchanged,loadDiffFiles:t?.loadDiffFiles,parseDiffOptions:t?.parseDiffOptions,collapsedContextThreshold:t?.collapsedContextThreshold,lineDiffType:t?.lineDiffType,maxLineDiffLength:t?.maxLineDiffLength,expansionLineCount:t?.expansionLineCount,headerRenderMode:null!=t?.renderCustomHeader?"custom":"default"}}},1386,[1327]);
288
- __d(function(g,r,i,_a,m,_e,d){"use strict";const e=["fileContainer","fileDiff","forceRender","lineAnnotations"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"VIRTUALIZED_FILE_DIFF_LAYOUT_CHECKPOINT_INTERVAL",{enumerable:!0,get:function(){return C}}),Object.defineProperty(_e,"VirtualizedFileDiff",{enumerable:!0,get:function(){return v}});var t,n=r(d[0]),s=(t=n)&&t.__esModule?t:{default:t};r(d[1]);var o=r(d[2]),a=r(d[3]),l=r(d[4]),h=r(d[5]),u=r(d[6]),f=r(d[7]),c=r(d[8]),p=r(d[9]),x=r(d[10]),D=r(d[11]),L=r(d[12]),y=r(d[13]),H=r(d[14]),S=r(d[15]);const C=3e3,R=new Map;let k=-1;var v=class extends S.FileDiff{__id="little-virtualized-file-diff:"+ ++k;renderType="virtualized";height=0;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0,ghostTextRows:R,ghostTextRowsByIndex:new Map};isVisible=!1;isSetup=!1;layoutDirty=!0;constructor(e,t,n,s,o=!1){super(e,s,o),this.virtualizer=t,this.metrics=(0,l.computeVirtualFileMetrics)(n)}setMetrics(e,t=!1){const n=(0,l.computeVirtualFileMetrics)(e);!t&&(0,o.areObjectsEqual)(this.metrics,n)||(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&(this.forceRenderOverride=!0)}syncLineAnnotations(e){return!(null==e||!this.isNewAnnotations(e)||0===e.length&&0===this.getLatestAnnotations().length)&&(super.setLineAnnotations(e),!0)}syncEditSessionAnnotationsFromEditor(e){return!!super.syncEditSessionAnnotationsFromEditor(e)&&(this.forceRenderOverride=!0,!0)}setFileAnnotationHeight(e){const t=this.cache.fileAnnotationHeight;return e!==t&&(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e){const t=this.getLatestAnnotations();return!!(0,h.includesFileAnnotations)(t)&&t.some(t=>0===t.lineNumber&&("new"===e.type?"additions"===t.side:"deleted"!==e.type||"deletions"===t.side))}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){const t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(null==e)return;const{options:t}=this,n=!(0,a.areOptionsEqual)(t,e),s=n&&I(t,e);super.setOptions(e),s&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:V(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,s)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1,resetRenderRange:n=!0}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal=0,this.cache.ghostTextRows=R,this.cache.ghostTextRowsByIndex.size>0&&this.cache.ghostTextRowsByIndex.clear(),this.invalidateDerivedLayoutCache(t,n),e&&this.isSimpleMode()&&this.computeApproximateSize()}invalidateDerivedLayoutCache(e,t=!0){this.layoutDirty=!0,this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),0!==this.cache.totalLines&&(this.cache.totalLines=0),e&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),null!=this.renderRange&&t&&(this.renderRange=void 0)}applyGhostTextRows(e,t){const{cache:{heightDeltas:n,ghostTextRows:s,ghostTextRowsByIndex:o},metrics:{lineHeight:a}}=this;if(s===t)return!1;const l=this.getDiffStyle(),h=new Map;for(const[n,s]of t){const t=this.getLineIndexForDiff(e,n+1,"additions");null!=t&&h.set("split"===l?t[1]:t[0],s)}let u=!1;for(const e of new Set([...o.keys(),...h.keys()])){const t=((h.get(e)??0)-(o.get(e)??0))*a;if(0===t)continue;const s=(n.get(e)??0)+t;0===s?n.delete(e):n.set(e,s),this.cache.measuredHeightDeltaTotal+=t,u=!0}return this.cache.ghostTextRows=t,this.cache.ghostTextRowsByIndex=h,u}reconcileHeights(){let e=!1;const{options:{overflow:t="scroll"},metrics:{lineHeight:n}}=this,s=null!=this.placeHolder?this.getLayoutDiff():this.getRenderedDiff();if(null==this.fileContainer||null==s)return 0!==this.height&&(e=!0),this.height=0,e;this.top=this.getVirtualizedTop(),e=this.applyGhostTextRows(s,this.editor?.__getGhostTextRows()??R);const{ghostTextRowsByIndex:o}=this.cache,a="scroll"!==t||this.getLatestAnnotations().length>0||this.isResizeDebuggingEnabled();if(null!=this.placeHolder||!a&&0===this.cache.heightDeltas.size&&0===this.cache.fileAnnotationHeight)return e&&(this.computeApproximateSize(!0),this.setPlaceholderHeight(this.height)),e;const l=this.getDiffStyle(),u="split"===l?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];if(null!=this.renderRange&&(0,h.shouldRenderFileAnnotations)(this.renderRange)){const t=E(u)??0;this.setFileAnnotationHeight(t)&&(e=!0)}for(const t of u){if(null==t)continue;const s=t.children[1];if(!(s instanceof HTMLElement))continue;const h="split"===l&&t===this.codeDeletions;for(const t of s.children){if(!(t instanceof HTMLElement))continue;const s=t.dataset.lineIndex;if(null==s)continue;const u=B(s,l),f=o.get(u)??0;if(h&&f>0)continue;const c=this.cache.heightDeltas.get(u)??0;if(!a&&c===f*n)continue;let p=t.getBoundingClientRect().height+f*n,x=!1;t.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in t.nextElementSibling.dataset||"noNewline"in t.nextElementSibling.dataset)&&("noNewline"in t.nextElementSibling.dataset&&(x=!0),p+=t.nextElementSibling.getBoundingClientRect().height);const D=p-this.getEstimatedLineHeight(x);D!==c&&(e=!0,this.cache.measuredHeightDeltaTotal+=D-c,0===D?this.cache.heightDeltas.delete(u):this.cache.heightDeltas.set(u,D))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>null!=this.fileContainer&&(e&&(this.top=this.getVirtualizedTop()),this.render());flushManagers(){super.flushManagers(),this.lineStateRefreshPending&&this.flushDeferredLineState()}updateCodeViewLayout(e,t,n,s){let o=!1,a=!1;const{pendingExpansions:h,pendingHydratedDiff:u,options:{collapsed:f=!1}}=this;if(null!=u&&(this.pendingHydratedDiff=void 0,u.expectedDiff===e&&(Object.assign(e,u.nextDiff),this.setHydratedState(u.files),this.installHydratedSessionDiff(e),this.forceRenderOverride=!0,o=!0,a=!0)),null!=h){this.pendingExpansions=void 0;for(const{hunkIndex:e,direction:t,expansionLineCountOverride:n}of h)this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,a=!0}const c=this.updateExternalDiff(e,s),{pendingRenderDiff:p,layoutDiffChanged:x,renderedDiffChanged:D,annotationsChanged:L}=this.updatePendingRender(e,s);return!this.forceRenderOverride&&(c||D||L)&&(this.forceRenderOverride=!0),(!0===n?.resetDiffLayoutCache||x)&&(o=!0),(x||!0===n?.resetDiffLayoutCache&&n.includeEstimatedDiffHeights)&&(a=!0),null!=n?.metrics&&(this.metrics=(0,l.computeVirtualFileMetrics)(n.metrics),o=!0,a=!0),this.currentCollapsed!==f&&(this.currentCollapsed=f,o=!0),o?this.resetLayoutCache({includeEstimatedHeights:a}):a&&this.invalidateDerivedLayoutCache(!0),this.top=t,this.computeApproximateSize(!1,p),this.height}getLinePosition(e,t="additions"){const n=this.getLayoutDiff();if(null==n||e<1)return;const s=this.getLineIndexForDiff(n,e,t);if(null==s)return;const{disableFileHeader:o=!1,expandUnchanged:a=!1,collapsed:h=!1,collapsedContextThreshold:u=1}=this.options,f=this.getDiffStyle(),c=this.getHunkSeparatorType(),x="split"===f?s[1]:s[0];this.approximateLayoutCheckpoints(n);const D=(0,l.getVirtualFileHeaderRegion)(this.metrics,o),L=this.getLayoutCheckpointBeforeLineIndex(x);let H,S=L?.top??D+this.cache.fileAnnotationHeight;return h?{top:(0,l.getVirtualFileHeaderHeight)(this.metrics,o),height:0}:((0,y.iterateOverDiff)({diff:n,diffStyle:f,startingLine:L?.renderedLineIndex??0,expandedHunks:!!a||this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:u,callback:({hunkIndex:e,hunk:t,collapsedBefore:n,collapsedAfter:s,deletionLine:o,additionLine:a})=>{const l="split"===f?a?.splitLineIndex??o?.splitLineIndex:a?.unifiedLineIndex??o?.unifiedLineIndex;if(null==l)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(n>0){const s=(0,p.getLeadingHunkSeparatorLayout)({type:c,metrics:this.metrics,hunkIndex:e,hunkSpecs:t?.hunkSpecs});if(null!=s){if(S+=s.gapBefore,x>=l-n&&x<l)return H={top:S,height:s.height},!0;S+=s.height+s.gapAfter}}const h=this.getLineHeight(l,(a?.noEOFCR??!1)||(o?.noEOFCR??!1));if(l===x)return H={top:S,height:h},!0;if(S+=h,s>0){const e=(0,p.getTrailingHunkSeparatorLayout)({type:c,metrics:this.metrics});if(null!=e){if(x>l&&x<=l+s)return H={top:S+e.gapBefore,height:e.height},!0;S+=e.totalHeight}}return!1}}),H)}getEditorViewport(){return"simple"===this.virtualizer.type?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){const t=this.getLayoutDiff();if(null==t)return;const{disableFileHeader:n=!1,expandUnchanged:s=!1,collapsed:o=!1,collapsedContextThreshold:a=1}=this.options;if(o)return;const h=this.getDiffStyle(),u=this.getHunkSeparatorType();this.approximateLayoutCheckpoints(t);const f=this.getLayoutCheckpointBeforeTop(e);let c,x=f?.top??(0,l.getVirtualFileHeaderRegion)(this.metrics,n)+this.cache.fileAnnotationHeight;return(0,y.iterateOverDiff)({diff:t,diffStyle:h,startingLine:f?.renderedLineIndex??0,expandedHunks:!!s||this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a,callback:({hunkIndex:t,hunk:n,collapsedBefore:s,collapsedAfter:o,deletionLine:a,additionLine:l})=>{const f="split"===h?l?.splitLineIndex??a?.splitLineIndex:l?.unifiedLineIndex??a?.unifiedLineIndex;if(null==f)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(s>0){const e=(0,p.getLeadingHunkSeparatorLayout)({type:u,metrics:this.metrics,hunkIndex:t,hunkSpecs:n?.hunkSpecs});null!=e&&(x+=e.totalHeight)}if(x>=e&&(null!=a?c={lineNumber:a.lineNumber,side:"deletions",top:x}:null!=l&&(c={lineNumber:l.lineNumber,side:"additions",top:x}),null!=c))return!0;const D=this.getLineHeight(f,(l?.noEOFCR??!1)||(a?.noEOFCR??!1));if(x+=D,o>0){const e=(0,p.getTrailingHunkSeparatorLayout)({type:u,metrics:this.metrics});null!=e&&(x+=e.totalHeight)}return!1}}),c}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){const t=this.getLayoutDiff();if(null==this.top||null==t)return;if(!0===this.options.collapsed)return{topOffset:this.top,height:this.height};const n=null!=e?this.computeRenderRangeFromWindow(t,this.top,e):this.renderRange;if(null==n)return;const{bufferBefore:s,bufferAfter:o,totalLines:a}=n;let l=0;if(0===a){const t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(l=o)}return{topOffset:this.top+s+l,height:this.height-(s+o)}}cleanUp(e=!1){const t=this.cache.ghostTextRows.size>0;t&&(this.layoutDirty=!0);const n=e&&this.isAdvancedMode()&&null!=this.fileContainer&&(t||!(0,u.areDiffTargetsEqual)(this.getRenderedDiff(),this.getLatestDiff()));null!=this.fileContainer&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||(this.resetLayoutCache({includeEstimatedHeights:!0}),this.pendingExpansions=void 0,this.pendingHydratedDiff=void 0),this.pendingRender=void 0,this.isSetup=!1,super.cleanUp(e),n&&this.virtualizer.instanceChanged(this,!0)}expandHunk=(e,t,n)=>{null!=this.fileDiff&&(this.loadFilesIfNecessary(),this.isAdvancedMode()?(this.pendingExpansions??=[],this.pendingExpansions.push({hunkIndex:e,direction:t,expansionLineCountOverride:n})):(this.hunksRenderer.expandHunk(e,t,n),this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))};async handleFilesLoaded(e,t){if(this.fileDiff===e&&e.isPartial){if(this.isAdvancedMode()){const n=(0,L.hydratePartialDiff)("clone",e,t);if(await(0,c.awaitWithTimeout)(()=>this.primeHighlightCache(n)),this.fileDiff!==e)return;this.pendingHydratedDiff={expectedDiff:e,nextDiff:n,files:t}}else{if((0,L.hydratePartialDiff)("merge",e,t),this.setHydratedState(t),!this.installHydratedSessionDiff(e)&&(await(0,c.awaitWithTimeout)(()=>this.primeHighlightCache(e)),this.fileDiff!==e))return;this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}}loadFilesIfNecessary(){if(null!=this.pendingHydratedDiff){if(this.pendingHydratedDiff.expectedDiff===this.fileDiff)return;this.pendingHydratedDiff=void 0}super.loadFilesIfNecessary()}isLineRenderable(e){if(super.isLineRenderable(e))return!0;const{pendingExpansions:t}=this,n=this.getRenderedDiff();if(null==t||0===t.length||null==n)return!1;const{expansionLineCount:s=100,collapsedContextThreshold:o=1}=this.options,a=new Map(this.hunksRenderer.getExpandedHunksMap());for(const e of t){const t=Object.assign({},a.get(e.hunkIndex)??{fromStart:0,fromEnd:0}),n=e.expansionLineCountOverride??s;"up"!==e.direction&&"both"!==e.direction||(t.fromStart+=n),"down"!==e.direction&&"both"!==e.direction||(t.fromEnd+=n),a.set(e.hunkIndex,t)}return(0,p.isAdditionLineRenderable)({fileDiff:n,lineNumber:e,expandedHunks:a,collapsedContextThreshold:o})}invalidateEditSessionLayout(){this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),this.isSimpleMode()||this.computeApproximateSize(!0),this.getSimpleVirtualizer()?.requestHeightReconcile(this)}escalateEditSessionRender(){this.invalidateEditSessionLayout(),this.enabled&&null!=this.fileDiff&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))}shouldSelfHealEditSession(){return!this.isAdvancedMode()&&super.shouldSelfHealEditSession()}setVisibility(e){this.isAdvancedMode()||null==this.fileContainer||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){if(!this.enabled||null==this.fileDiff&&null==this.additionFile&&null==this.deletionFile)return;const e=this.getLatestDiff(),t=null==e?void 0:this.hunksRenderer.getDiffForNextRender(e);this.isSimpleMode()&&(this.pendingRender=void 0),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!(0,u.areDiffTargetsEqual)(this.getRenderedDiff(),t))}syncGhostTextRows(){const e=this.getAdvancedVirtualizer();null!=e?(e.capturePendingLayoutAnchor(),this.layoutDirty=!0,e.instanceChanged(this,!0)):this.getSimpleVirtualizer()?.requestHeightReconcile(this)}applyDocumentChange(e,t,n=!1){const{renderRange:s}=this;this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1});const o=this.getRenderedDiff();if(this.isSimpleMode()){if(n&&null!=s&&null!=o){const e=this.virtualizer.getWindowSpecs(),t=this.computeRenderRangeFromWindow(o,this.top??0,e);t.bufferAfter!==s.bufferAfter&&this.updateBuffers(t)}}else this.computeApproximateSize(!0);this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.getLayoutDiff()){const n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;const s=0===this.height;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,null==t)return void(this.layoutDirty=!1);this.applyGhostTextRows(t,this.editor?.__getGhostTextRows()??R);const{disableFileHeader:o=!1,collapsed:a=!1}=this.options;if(a)return this.height+=(0,l.getVirtualFileHeaderHeight)(this.metrics,o),void(this.layoutDirty=!1);this.height=this.getActiveEstimatedHeight(t)+this.cache.measuredHeightDeltaTotal,n&&!s&&this.validateComputedHeight(t),this.layoutDirty=!1}getLayoutDiff(){return this.pendingRender?.diff??this.getRenderedDiff()}getActiveEstimatedHeight(e=this.getLayoutDiff()){this.ensureEstimatedDiffHeights(e);const t="split"===this.getDiffStyle()?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(null==t)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return t}ensureEstimatedDiffHeights(e=this.getLayoutDiff()){if(null==e)return this.cache.estimatedSplitHeight=void 0,void(this.cache.estimatedUnifiedHeight=void 0);if(null!=this.cache.estimatedSplitHeight&&null!=this.cache.estimatedUnifiedHeight)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:s=1}=this.options,{splitHeight:o,unifiedHeight:a}=(0,x.computeEstimatedDiffHeights)({fileDiff:e,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,canHydratePartialDiff:M(e,null!=this.options.loadDiffFiles)});this.cache.estimatedSplitHeight=o,this.cache.estimatedUnifiedHeight=a}validateComputedHeight(e=this.getLayoutDiff()){if(null==this.fileContainer||null==e)return;const t=this.fileContainer.getBoundingClientRect();t.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:e.name,elementHeight:t.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render(t={}){let{fileContainer:n,fileDiff:o,forceRender:a=!1,lineAnnotations:l}=t,h=(0,s.default)(t,e);const f=(0,D.getDiffFileInput)(h,"VirtualizedFileDiff.render"),c=null!=f,p=f?.oldFile,x=f?.newFile,L=c&&(!O(p,this.deletionFile)||!O(x,this.additionFile));let y=o??this.fileDiff;null==o&&c&&(L||null==this.fileDiff)&&(y=(0,H.parseDiffFromFile)(f.oldFile,f.newFile,this.options.parseDiffOptions));const{forceRenderOverride:S,isSetup:C}=this;this.forceRenderOverride=void 0;const R=null!=y&&!(0,u.areDiffTargetsEqual)(this.fileDiff,y),k=R||L;if(n=this.getOrCreateFileContainer(n),null==y)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;R&&this.updateExternalDiff(y,l);const{pendingRenderDiff:v,layoutDiffChanged:E,renderedDiffChanged:F,annotationsChanged:T}=(()=>null!=this.pendingRender&&this.pendingRender.latestDiff===(this.getLatestDiff(y)??y)?{pendingRenderDiff:this.pendingRender.diff,layoutDiffChanged:!1,renderedDiffChanged:!1,annotationsChanged:this.syncLineAnnotations(l)}:this.updatePendingRender(y,l))();if(E&&this.resetLayoutCache({includeEstimatedHeights:!0}),C)this.top??=this.getVirtualizedTop(),this.layoutDirty&&this.isSimpleMode()&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.computeApproximateSize(!1,v));else{this.computeApproximateSize(!1,v);const e=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(null==e)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");e.connect(n,this),this.isVisible=e.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!k||!C))return null!=f&&(this.deletionFile=p,this.additionFile=x),R&&this.clearReusableHeader(),this.renderPlaceholder(this.height);const z=this.virtualizer.getWindowSpecs(),A=this.top??0,b=this.computeRenderRangeFromWindow(v,A,z);return super.render(Object.assign({fileDiff:y,fileContainer:n,renderRange:b,lineAnnotations:l,forceRender:(S??a)||T||F||R},f,h))}finalizeRender(){if(!(0,u.areDiffTargetsEqual)(this.getRenderedDiff(),this.pendingRender?.diff))throw new Error("VirtualizedFileDiff.render: rendered a different diff than its prepared layout");this.pendingRender=void 0,this.isSimpleMode()&&this.getSimpleVirtualizer()?.requestHeightReconcile(this)}updatePendingRender(e,t){const n=this.getLatestDiff(e)??e,s=this.getRenderedDiff(),{pendingRender:o}=this,a=o?.diff??s,l=this.hunksRenderer.getDiffForNextRender(n);return this.pendingRender={latestDiff:n,diff:l},{pendingRenderDiff:l,annotationsChanged:this.syncLineAnnotations(t),layoutDiffChanged:!(0,u.areDiffTargetsEqual)(a,l),renderedDiffChanged:!(0,u.areDiffTargetsEqual)(s,l)}}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return"simple"===this.virtualizer.type}isAdvancedMode(){return"advanced"===this.virtualizer.type}getVirtualizedTop(){return"advanced"===this.virtualizer.type?this.virtualizer.getLocalTopForInstance(this):null!=this.fileContainer?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return"simple"===this.virtualizer.type?this.virtualizer:void 0}getAdvancedVirtualizer(){return"advanced"===this.virtualizer.type?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return"function"==typeof(e=this.options.hunkSeparators)?"custom":e??"line-info";var e}approximateLayoutCheckpoints(e){if(!this.layoutDirty&&this.cache.checkpoints.length>0||0===e.hunks.length||!0===this.options.collapsed)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:s=1}=this.options,o=e.hunks.length-1,a=M(e,null!=this.options.loadDiffFiles),h=this.getDiffStyle(),u=this.getHunkSeparatorType(),f=!!n||this.hunksRenderer.getExpandedHunksMap(),c=F(this.cache.heightDeltas);let x=(0,l.getVirtualFileHeaderRegion)(this.metrics,t)+this.cache.fileAnnotationHeight,D=0;const L=({rowCount:e,startLineIndex:t,preSeparatorHeight:n=0,postSeparatorHeight:s=0,metadataOffsets:o=[]})=>{if(e<=0)return;const a=D,l=D+e;let h=A(a);for(;h<l;){const e=h-a,s=x+(e>0?n:0)+e*this.metrics.lineHeight+b(o,e)*this.metrics.lineHeight+T(c,t,t+e);this.cache.checkpoints.push({renderedLineIndex:h,lineIndex:t+e,top:s}),h+=C}x+=n+e*this.metrics.lineHeight+o.length*this.metrics.lineHeight+T(c,t,t+e)+s,D=l};for(let t=0;t<e.hunks.length;t++){const n=e.hunks[t];if(null==n)throw new Error("VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index");const l=(0,p.getExpandedRegion)({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:f,hunkIndex:t,collapsedContextThreshold:s}),c=l.collapsedLines>0?(0,p.getLeadingHunkSeparatorLayout)({type:u,metrics:this.metrics,hunkIndex:t,hunkSpecs:n.hunkSpecs})?.totalHeight??0:0;L({rowCount:l.fromStart,startLineIndex:("split"===h?n.splitLineStart:n.unifiedLineStart)-l.rangeSize});let x=c;L({rowCount:l.fromEnd,startLineIndex:("split"===h?n.splitLineStart:n.unifiedLineStart)-l.fromEnd,preSeparatorHeight:x}),l.fromEnd>0&&(x=0);const D=t===o?(0,p.getTrailingExpandedRegion)({fileDiff:e,hunkIndex:t,expandedHunks:f,collapsedContextThreshold:s,errorPrefix:"VirtualizedFileDiff"}):void 0,y=null!=D&&D.collapsedLines>0||t===o&&a?(0,p.getTrailingHunkSeparatorLayout)({type:u,metrics:this.metrics})?.totalHeight??0:0,H=null!=D?D.fromStart+D.fromEnd:0,S="split"===h?n.splitLineCount:n.unifiedLineCount,C="split"===h?n.splitLineStart:n.unifiedLineStart;L({rowCount:S,startLineIndex:C,preSeparatorHeight:x,postSeparatorHeight:0===H?y:0,metadataOffsets:w({diffStyle:h,hunk:n,rowCount:S})}),null!=D&&H>0&&L({rowCount:H,startLineIndex:C+S,postSeparatorHeight:y})}this.cache.totalLines=D}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||0===this.cache.checkpoints.length)return;let t,n=0,s=this.cache.checkpoints.length-1;for(;n<=s;){const o=n+s>>1,a=this.cache.checkpoints[o];if(null==a)throw new Error("VirtualizedFileDiff: invalid checkpoint index");a.lineIndex<=e?(t=a,n=o+1):s=o-1}return t}getLayoutCheckpointBeforeTop(e,t){let n=0,s=this.cache.checkpoints.length-1,o=-1;for(;n<=s;){const t=n+s>>1,a=this.cache.checkpoints[t];if(null==a)throw new Error("VirtualizedFileDiff: invalid checkpoint index");a.top<=e?(o=t,n=t+1):s=t-1}if(null==t)return o>=0?this.cache.checkpoints[o]:void 0;for(let e=o;e>=0;e--){const n=this.cache.checkpoints[e];if(null==n)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(n.renderedLineIndex%t===0)return n}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(const s of e.hunks)n+="split"===t?s.splitLineCount:s.unifiedLineCount;return n}const{expandUnchanged:s=!1,collapsedContextThreshold:o=1}=this.options,a=!!s||this.hunksRenderer.getExpandedHunksMap();for(const[s,l]of e.hunks.entries()){n+="split"===t?l.splitLineCount:l.unifiedLineCount;const h=Math.max(l.collapsedBefore,0),{fromStart:u,fromEnd:f,renderAll:c}=(0,p.getExpandedRegion)({isPartial:e.isPartial,rangeSize:h,expandedHunks:a,hunkIndex:s,collapsedContextThreshold:o});h>0&&(n+=c?h:u+f)}const l=(0,p.getTrailingExpandedRegion)({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:a,collapsedContextThreshold:o,errorPrefix:"VirtualizedFileDiff"});return null!=l&&(n+=l.fromStart+l.fromEnd),n}getLayoutLineCount(e,t){const n=this.getExpandedLineCount(e,t),s="split"===t?e.splitLineCount:e.unifiedLineCount;return Math.max(n,s,e.additionLines.length,e.deletionLines.length,this.cache.totalLines)}computeRenderRangeFromWindow(e,t,{top:n,bottom:s}){const{disableFileHeader:o=!1,expandUnchanged:a=!1,collapsedContextThreshold:h=1}=this.options,{hunkLineCount:u,lineHeight:f}=this.metrics,c=this.getDiffStyle(),x=this.getHunkSeparatorType(),D=M(e,null!=this.options.loadDiffFiles),L=this.height;let H=this.getLayoutLineCount(e,c);const S=(0,l.getVirtualFileHeaderRegion)(this.metrics,o),C=e.hunks.length>0?(0,l.getVirtualFilePaddingBottom)(this.metrics):0,{fileAnnotationHeight:R}=this.cache,k=S+R,v=Math.max(0,L-S-R-C),E=this.hasFileAnnotations(e),F=t+S,T=R>0&&E&&F<s&&F+R>n;if(t<n-L||t>s)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:L-S-C};if(H<=u||0===e.hunks.length)return{startingLine:0,totalLines:u,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(e),H=this.getLayoutLineCount(e,c);const z=Math.ceil(Math.max(s-n,0)/f),A=Math.ceil(z/u)*u+u,b=A/u,w=b,I=[],V=(n+s)/2,O=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-A*f*2),u);let B,P,N,U=t+(O?.top??k),_=O?.renderedLineIndex??0;if((0,y.iterateOverDiff)({diff:e,diffStyle:c,startingLine:O?.renderedLineIndex??0,expandedHunks:!!a||this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:h,callback:({hunkIndex:o,hunk:a,collapsedBefore:l,collapsedAfter:h,deletionLine:f,additionLine:L})=>{const y=null!=L?L.splitLineIndex:f.splitLineIndex,H=null!=L?L.unifiedLineIndex:f.unifiedLineIndex,S=(L?.noEOFCR??!1)||(f?.noEOFCR??!1),C=o===e.hunks.length-1&&null!=a&&("split"===c?y===a.splitLineStart+a.splitLineCount-1:H===a.unifiedLineStart+a.unifiedLineCount-1),R=(l>0?(0,p.getLeadingHunkSeparatorLayout)({type:x,metrics:this.metrics,hunkIndex:o,hunkSpecs:a?.hunkSpecs}):void 0)?.totalHeight??0;U+=R;const v=_%u===0,E=Math.floor(_/u);if(v&&(I[E]=U-(t+k+R),null!=N)){if(N<=0)return!0;N--}const F=this.getLineHeight("split"===c?y:H,S);if(U>n-F&&U<s&&(B??=E),null==P&&U+F>V&&(P=E),null==N&&U>=s&&v&&(N=w),_++,U+=F,h>0||C&&D){const e=(0,p.getTrailingHunkSeparatorLayout)({type:x,metrics:this.metrics});null!=e&&(U<s&&U+e.totalHeight>n&&(B??=E),null==P&&U+e.totalHeight>V&&(P=E),U+=e.totalHeight)}return!1}}),null==B){if(!T)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:L-S-C};B=0,P=0}P??=B;const q=Math.round(P-b/2),W=Math.max(0,Math.ceil(H/u)-b),j=Math.max(0,Math.min(q,W)),G=j*u,K=q<0?A+q*u:A,Y=I[j]??0,Z=0===G?0:R+Y,J=j+K/u,Q=J<I.length?v-I[J]:v-(U-t-k);return{startingLine:G,totalLines:K,bufferBefore:Z,bufferAfter:Math.max(0,Q)}}};function E(e){let t;for(const n of e){if(null==n)continue;const e=n.children[1];if(e instanceof HTMLElement)for(const n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===h.FILE_ANNOTATION_DOM_KEY&&(t=Math.max(t??0,n.getBoundingClientRect().height))}return t}function F(e){const t=Array.from(e).sort((e,t)=>e[0]-t[0]),n=[],s=[0];let o=0;for(const[e,a]of t)n.push(e),o+=a,s.push(o);return{lineIndexes:n,prefixTotals:s}}function T({lineIndexes:e,prefixTotals:t},n,s){if(n>=s||0===e.length)return 0;const o=z(e,n);return(t[z(e,s)]??0)-(t[o]??0)}function z(e,t){let n=0,s=e.length;for(;n<s;){const o=n+s>>1,a=e[o];if(null==a)throw new Error("VirtualizedFileDiff: invalid prefix index");a<t?n=o+1:s=o}return n}function A(e){return Math.ceil(e/C)*C}function b(e,t){let n=0;for(const s of e)s<t&&n++;return n}function w({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];const s=t.hunkContent.at(-1);if(null==s)return[];if("context"===s.type)return[n-1];const o=Math.max(s.deletions,s.additions),a=s.deletions+s.additions;if("split"===e)return o>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];const l=[],h=n-a;return s.deletions>0&&t.noEOFCRDeletions&&l.push(h+s.deletions-1),s.additions>0&&t.noEOFCRAdditions&&l.push(n-1),l}function I(e,t){return(e.diffStyle??"split")!==(t.diffStyle??"split")||(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??"bars")!==(t.diffIndicators??"bars")||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||Boolean(e.loadDiffFiles)!==Boolean(t.loadDiffFiles)||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function V(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||Boolean(e.loadDiffFiles)!==Boolean(t.loadDiffFiles)||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function M(e,t){return e.isPartial&&t&&("change"===e.type||"rename-changed"===e.type)}function O(e,t){return null==e||null==t?null==e&&null==t:(0,f.areFilesEqual)(e,t)}function B(e,t){const[n,s]=e.split(",").map(Number);return"split"===t?s:n}},1387,[25,1148,1254,1256,1333,1305,1334,1335,1384,1376,1388,1385,1337,1375,1346,1383]);
289
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"computeEstimatedDiffHeights",{enumerable:!0,get:function(){return o}});var t=r(d[0]),n=r(d[1]);function o({fileDiff:o,metrics:l,disableFileHeader:u,hunkSeparators:f,expandUnchanged:c,expandedHunks:h,collapsedContextThreshold:p,canHydratePartialDiff:H}){let k=(0,t.getVirtualFileHeaderRegion)(l,u),x=k;const E=!!c||h,C=o.hunks.length-1;for(let t=0;t<o.hunks.length;t++){const u=o.hunks[t];if(null==u)throw new Error("computeEstimatedDiffHeights: invalid hunk index");const c=(0,n.getExpandedRegion)({isPartial:o.isPartial,rangeSize:u.collapsedBefore,expandedHunks:E,hunkIndex:t,collapsedContextThreshold:p}),h=(c.fromStart+c.fromEnd)*l.lineHeight;if(k+=h,x+=h,c.collapsedLines>0){const o=(0,n.getLeadingHunkSeparatorLayout)({type:f,metrics:l,hunkIndex:t,hunkSpecs:u.hunkSpecs})?.totalHeight??0;k+=o,x+=o}k+=u.splitLineCount*l.lineHeight,x+=u.unifiedLineCount*l.lineHeight;const y=s(u);k+=y.split*l.lineHeight,x+=y.unified*l.lineHeight;const D=t===C?(0,n.getTrailingExpandedRegion)({fileDiff:o,hunkIndex:t,expandedHunks:E,collapsedContextThreshold:p,errorPrefix:"computeEstimatedDiffHeights"}):void 0;if(null!=D){const t=(D.fromStart+D.fromEnd)*l.lineHeight;if(k+=t,x+=t,D.collapsedLines>0){const t=(0,n.getTrailingHunkSeparatorLayout)({type:f,metrics:l})?.totalHeight??0;k+=t,x+=t}}else if(t===C&&o.isPartial&&H){const t=(0,n.getTrailingHunkSeparatorLayout)({type:f,metrics:l})?.totalHeight??0;k+=t,x+=t}}if(o.hunks.length>0){const n=(0,t.getVirtualFilePaddingBottom)(l);k+=n,x+=n}return{splitHeight:k,unifiedHeight:x}}function s(t){if(!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return{split:0,unified:0};const n=t.hunkContent.at(-1);if(null==n)return{split:0,unified:0};if("context"===n.type){const t=n.lines>0?1:0;return{split:t,unified:t}}return l(t,n)}function l(t,n){const o=(n.deletions>0&&t.noEOFCRDeletions?1:0)+(n.additions>0&&t.noEOFCRAdditions?1:0),s=n.deletions>0&&t.noEOFCRDeletions,l=n.additions>0&&t.noEOFCRAdditions;return{split:s||l?1:0,unified:o}}},1388,[1333,1376]);
290
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CODE_VIEW_DIFF_OPTION_KEYS",{enumerable:!0,get:function(){return P}}),Object.defineProperty(e,"CODE_VIEW_FILE_OPTION_KEYS",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"CodeView",{enumerable:!0,get:function(){return z}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]),l=r(d[4]),h=r(d[5]),c=r(d[6]),p=r(d[7]),u=r(d[8]),f=r(d[9]),S=r(d[10]),y=r(d[11]),T=r(d[12]),v=r(d[13]),I=r(d[14]),E=r(d[15]),C=r(d[16]),w=r(d[17]);const P=["theme","disableLineNumbers","overflow","themeType","disableFileHeader","disableVirtualizationBuffers","preferredHighlighter","useCSSClasses","useTokenTransformer","tokenizeMaxLineLength","tokenizeMaxLength","unsafeCSS","diffStyle","diffIndicators","disableBackground","expandUnchanged","loadDiffFiles","parseDiffOptions","collapsedContextThreshold","lineDiffType","maxLineDiffLength","expansionLineCount","lineHoverHighlight","enableTokenInteractionsOnWhitespace","enableGutterUtility","__debugPointerEvents","enableLineSelection","controlledSelection","disableErrorHandling"],b=["theme","disableLineNumbers","overflow","themeType","disableFileHeader","disableVirtualizationBuffers","preferredHighlighter","useCSSClasses","useTokenTransformer","tokenizeMaxLineLength","tokenizeMaxLength","unsafeCSS","lineHoverHighlight","enableTokenInteractionsOnWhitespace","enableGutterUtility","__debugPointerEvents","enableLineSelection","controlledSelection","disableErrorHandling"],k=["renderCustomHeader","renderHeaderPrefix","renderHeaderFilenameSuffix","renderHeaderMetadata","renderAnnotation","renderGutterUtility","onPostRender","onGutterUtilityClick","onLineClick","onLineNumberClick","onLineEnter","onLineLeave","onTokenClick","onTokenEnter","onTokenLeave"],L=["onLineSelected","onLineSelectionStart","onLineSelectionChange","onLineSelectionEnd"],x=Symbol("CodeView.itemOptionsState");function O(t,n){Object.defineProperty(t,x,{configurable:!1,enumerable:!1,value:n})}function H(t){return t[x]}function M(t,n,o){Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get(){return o(this)}})}const R="--diffs-overflow-override";function F(t,n,o){return{containerHeight:t,triggerTop:n,targetTop:o,targetBottom:t-o,threshold:t-n}}const A=F(12e6,1e6,2e6),D=F(4194304,5e5,1e6);function V(t){if(null==t)throw new Error("CodeView: createEditor is required for items with edit: true")}const _=(()=>{const{navigator:t}=globalThis,n=t.userAgent,o=/iP(?:hone|ad|od)/.test(n),s="MacIntel"===t.platform&&t.maxTouchPoints>1;return(o||s)&&/AppleWebKit/.test(n)&&/Safari/.test(n)&&!/(CriOS|FxiOS|EdgiOS|OPiOS)/.test(n)})();var z=class T{static __STOP=!1;static __lastScrollPosition=0;type="advanced";config={overscrollSize:200,intersectionObserverMargin:0,resizeDebugging:!1};items=[];idToItem=new Map;selectedLines=null;itemEditors=new Map;attachedEditors=new Set;instanceToItem=new Map;renderOptionsRevision=0;scrollListeners=new Set;scrollHeight=0;containerHeight=-1;scrollTop=0;scrollPageOffset=0;scrollRebaseConfig=(0,v.isFirefox)()?D:A;scrollDirty=!0;pointerEventsDisabled=!1;codeOverflowFix=!1;height=0;heightDirty=!0;windowSpecs={top:0,bottom:0};renderState={scrollTop:-1,firstIndex:-1,lastIndex:-1,stickyHeight:0,stickyTop:-1,stickyBottom:-1};itemMetricsCache=t.DEFAULT_CODE_VIEW_FILE_METRICS;shouldFixContainerFocus=!1;container=document.createElement("div");stickyContainer=document.createElement("div");stickyOffset=document.createElement("div");header={element:void 0,render:void 0,height:0};footer={element:void 0,render:void 0,height:0};elementPool=[];elementPoolVersion=0;elementPoolTracker=new WeakMap;pendingElementPool=[];constructor(n={theme:t.DEFAULT_THEMES},o,s=!1){this.options=n,this.computeMetricsCache(n.itemMetrics),this.fileOptionsPrototype=this.createFileOptionsPrototype(),this.diffOptionsPrototype=this.createDiffOptionsPrototype(),this.workerManager=o,this.isContainerManaged=s,this.stickyOffset.style.contain="layout size",this.stickyContainer.style.position="sticky",this.stickyContainer.style.width="100%",this.stickyContainer.style.contain="layout style inline-size",this.stickyContainer.style.isolation="isolate",this.stickyContainer.style.display="flex",this.stickyContainer.style.flexDirection="column"}getLayout(){return this.options.layout??t.DEFAULT_CODE_VIEW_LAYOUT}getItemTopOffset(){return this.getLayout().paddingTop+this.header.height}computeMetricsCache(n){return this.itemMetricsCache={hunkLineCount:n?.hunkLineCount??t.DEFAULT_CODE_VIEW_FILE_METRICS.hunkLineCount,lineHeight:n?.lineHeight??t.DEFAULT_CODE_VIEW_FILE_METRICS.lineHeight,diffHeaderHeight:n?.diffHeaderHeight??t.DEFAULT_CODE_VIEW_FILE_METRICS.diffHeaderHeight,hunkSeparatorHeight:n?.hunkSeparatorHeight,spacing:n?.spacing??t.DEFAULT_CODE_VIEW_FILE_METRICS.spacing,paddingTop:n?.paddingTop,paddingBottom:n?.paddingBottom},this.itemMetricsCache}getSmoothScrollSettings(){return this.options.smoothScrollSettings??t.DEFAULT_SMOOTH_SCROLL_SETTINGS}shouldDisablePointerEvents(){return!0!==this.options.pointerEventsOnScroll}shouldValidateItemHeights(){return t.DIFFS_DEVELOPMENT_BUILD&&!0===this.options.__devOnlyValidateItemHeights}validateRenderedItemHeight(t){if(!this.shouldValidateItemHeights()||null==t.element)return;const n=t.instance.getAdvancedStickySpecs();if(null==n)return;const o=n.height,s=t.element.getBoundingClientRect().height;o!==s&&console.error("CodeView: reconciled item height does not match DOM height",{id:t.item.id,type:t.type,index:t.index,version:t.version,expectedHeight:o,actualHeight:s,delta:s-o,stickyTopOffset:n.topOffset,virtualizedHeight:t.instance.getVirtualizedHeight(),top:t.top,scrollTop:this.getScrollTop(),windowSpecs:Object.assign({},this.windowSpecs),element:t.element,instance:t.instance})}validateStickyContainerHeight(){if(!this.shouldValidateItemHeights())return;const{firstIndex:t,lastIndex:n,stickyHeight:o,stickyTop:s,stickyBottom:l}=this.renderState;if(-1===t||-1===n)return;const h=this.stickyContainer.getBoundingClientRect().height;Math.abs(h-o)<1||console.error("CodeView: sticky container height does not match computed layout",{computedStickyHeight:o,actualStickyHeight:h,delta:h-o,stickyTop:s,stickyBottom:l,firstIndex:t,lastIndex:n,firstStickySpecs:this.items[t]?.instance.getAdvancedStickySpecs(),lastStickySpecs:this.items[n]?.instance.getAdvancedStickySpecs(),scrollTop:this.getScrollTop(),scrollPageOffset:this.scrollPageOffset,windowSpecs:Object.assign({},this.windowSpecs),stickyContainer:this.stickyContainer})}clearScrollInteractionTimer(){null!=this.scrollInteractionFixTimer&&(clearTimeout(this.scrollInteractionFixTimer),this.scrollInteractionFixTimer=void 0)}suspendScrollInteractions(){this.clearScrollInteractionTimer(),this.shouldDisablePointerEvents()&&!this.pointerEventsDisabled&&(this.stickyContainer.style.pointerEvents="none",this.pointerEventsDisabled=!0),_&&!this.codeOverflowFix&&(this.stickyContainer.style.setProperty(R,"hidden"),this.codeOverflowFix=!0),this.scrollInteractionFixTimer=setTimeout(this.restoreScrollInteractions,120)}restoreScrollInteractions=()=>{this.clearScrollInteractionTimer(),this.pointerEventsDisabled&&(this.stickyContainer.style.removeProperty("pointer-events"),this.pointerEventsDisabled=!1),this.codeOverflowFix&&(this.stickyContainer.style.setProperty(R,"auto"),this.codeOverflowFix=!1)};syncLayout(){const{gap:t,paddingBottom:n,paddingTop:o}=this.getLayout();this.stickyContainer.style.gap=`${t}px`,this.container?.style.setProperty("margin-top",`${o}px`),this.container?.style.setProperty("margin-bottom",`${n}px`)}reconcileHeaderFooterHosts(){const t=this.reconcileHost("header"),n=this.reconcileHost("footer");return t||n}reconcileHost(t){const{root:n,container:o}=this;if(null==n||null==o)return!1;const s="header"===t?this.header:this.footer,l="header"===t?this.options.renderCodeViewHeader:this.options.renderCodeViewFooter;if(null==l)return null==s.element||(this.resizeObserver?.unobserve(s.element),s.element.remove(),s.element=void 0,s.render=void 0,this.setHostHeight(s,0)),!1;if(null!=s.element&&l===s.render)return!1;const h=s.element??(0,S.createCodeViewHeaderFooterHostElement)(t,o,this.resizeObserver);s.element=h;const c=l();return null!=c?h.replaceChildren(c):!this.isContainerManaged&&h.children.length>0&&(h.textContent=""),s.render=l,!0}setHostHeight(t,n){t.height!==n&&(t.height=n,this.scrollDirty=!0)}measureMountedHosts(){null!=this.header.element&&this.setHostHeight(this.header,this.header.element.getBoundingClientRect().height),null!=this.footer.element&&this.setHostHeight(this.footer,this.footer.element.getBoundingClientRect().height)}setup(t){if(null!=this.root)throw new Error("CodeView.setup: already setup");this.workerManager?.subscribeToThemeChanges(this),this.root=t,this.root.style.overflowAnchor="none",this.root.hasAttribute("tabindex")||(this.root.tabIndex=-1),this.container??=document.createElement("div"),this.container.style.contain="layout style",this.syncLayout(),this.container.appendChild(this.stickyOffset),this.container.appendChild(this.stickyContainer),this.root.appendChild(this.container),this.scrollDirty=!0,this.heightDirty=!0,this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.stickyContainer),this.root.addEventListener("scroll",this.handleScroll,{passive:!0}),this.root.addEventListener("wheel",this.clearPendingScroll,{passive:!0}),this.root.addEventListener("touchstart",this.clearPendingScroll,{passive:!0}),this.root.addEventListener("pointerdown",this.clearPendingScroll,{passive:!0}),this.root.addEventListener("keydown",this.clearPendingScroll,{passive:!0}),this.resizeObserver.observe(this.root),this.render(!0),window.__INSTANCE=this,window.__TOGGLE=()=>{T.__STOP?(T.__STOP=!1,this.scrollTo({type:"position",position:T.__lastScrollPosition,behavior:"instant"})):(T.__lastScrollPosition=this.getScrollTop(),T.__STOP=!0)}}reset(){(0,l.dequeueRender)(this.computeRenderRangeAndEmit),this.clearReadySubscription(),this.restoreScrollInteractions(),this.cleanAllRenderedItems();const{items:t}=this,n=[...this.itemEditors.values()].map(t=>{const n=this.idToItem.get(t.state.id);return null!=n&&(t.state.removedItem=n.item),t});this.itemEditors.clear(),this.attachedEditors.clear(),this.selectedLines=null,this.items=[],this.idToItem.clear(),this.instanceToItem.clear();let o,s=!1;for(const t of n)try{t.editor.cleanUp("discard")}catch(t){s||(s=!0,o=t)}for(const n of t)try{n.instance.cleanUp()}catch(t){s||(s=!0,o=t)}if(this.layoutDirtyIndex=void 0,this.pendingLayoutReset=void 0,this.stickyContainer.textContent="",this.stickyOffset.style.height="",this.container?.style.removeProperty("height"),this.containerHeight=-1,this.windowSpecs={top:0,bottom:0},this.pendingLayoutAnchor=void 0,this.shouldFixContainerFocus=!1,this.height=0,this.scrollTop=0,this.scrollPageOffset=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.resetRenderState(),this.isContainerManaged||this.flushSlotCoordinator(),s)throw o}cleanUp(){let t,n=!1;try{this.reset()}catch(o){n=!0,t=o}if(this.clearElementPool(),this.restoreScrollInteractions(),this.workerManager?.unsubscribeToThemeChanges(this),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.root?.removeEventListener("scroll",this.handleScroll),this.root?.removeEventListener("wheel",this.clearPendingScroll),this.root?.removeEventListener("touchstart",this.clearPendingScroll),this.root?.removeEventListener("pointerdown",this.clearPendingScroll),this.root?.removeEventListener("keydown",this.clearPendingScroll),this.root?.style.removeProperty("overflow-anchor"),this.container?.remove(),this.stickyOffset.remove(),this.stickyContainer.remove(),this.stickyContainer.textContent="",this.header.element?.remove(),this.header.element=void 0,this.header.render=void 0,this.header.height=0,this.footer.element?.remove(),this.footer.element=void 0,this.footer.render=void 0,this.footer.height=0,this.root=void 0,this.container=void 0,n)throw t}cleanAllRenderedItems(){if(-1!==this.renderState.firstIndex)for(let t=this.renderState.firstIndex;t<=this.renderState.lastIndex;t++){const n=this.items[t];if(null==n)throw new Error(`CodeView.cleanAllRenderedItems: Item does not exist at index: ${t}`);this.releaseRenderedItem(n)}}primeScrollTarget(t){if("position"===t.type)return;const n=this.idToItem.get(t.id);null!=n&&n.instance.primeHighlightCache()}getElementPoolLimit(){const t=this.getHeight()+2*this.config.overscrollSize,{diffHeaderHeight:n}=this.itemMetricsCache;return Math.max(8,Math.ceil(t/Math.max(n,10))+1)*(this.isContainerManaged?2:1)}acquireElement(){this.promotePendingPooledElements();let n=this.elementPool.pop();for(;null!=n&&!this.isElementPoolGenerationCurrent(n);)n=this.elementPool.pop();return n??=document.createElement(t.DIFFS_TAG_NAME),this.markElementPoolGenerationCurrent(n),n}releaseRenderedItem(t){const{element:n}=t;null!=n&&this.renderedItemOwnsFocus(n)&&(this.shouldFixContainerFocus=!0),t.instance.cleanUp(!0),this.attachedEditors.delete(t.item.id),t.element=void 0,null!=n&&(n.remove(),this.cleanElement(n),this.queueElementForPool(n))}renderedItemOwnsFocus(t){const{activeElement:n}=document;return n===t||t.contains(n)||null!=t.shadowRoot?.activeElement}fixContainerFocus(){this.shouldFixContainerFocus&&(this.shouldFixContainerFocus=!1,this.root?.focus({preventScroll:!0}))}cleanElement(t){const{shadowRoot:n}=t;if(null!=n)for(const t of Array.from(n.children))N(t)||t.remove();this.isContainerManaged||t.replaceChildren()}queueElementForPool(t){const n=this.getElementPoolLimit();!this.isElementPoolGenerationCurrent(t)||this.getElementPoolSize()>=n||(this.isElementClean(t)?this.elementPool.push(t):this.pendingElementPool.push(t))}promotePendingPooledElements(){if(0===this.pendingElementPool.length)return;const{pendingElementPool:t}=this;this.pendingElementPool=[];const n=this.getElementPoolLimit();for(const o of t)this.isElementPoolGenerationCurrent(o)&&this.isElementClean(o)&&this.elementPool.length<n?this.elementPool.push(o):this.isElementPoolGenerationCurrent(o)&&this.getElementPoolSize()<n&&this.pendingElementPool.push(o)}isElementClean(t){return 0===t.childNodes.length}getElementPoolSize(){return this.elementPool.length+this.pendingElementPool.length}clearElementPool(){this.elementPool.length=0,this.pendingElementPool.length=0}invalidateElementPool(){this.elementPoolVersion++,this.clearElementPool()}markElementPoolGenerationCurrent(t){this.elementPoolTracker.set(t,this.elementPoolVersion)}isElementPoolGenerationCurrent(t){return this.elementPoolTracker.get(t)===this.elementPoolVersion}resolveEffectiveScrollBehavior(t,n){return(0,I.prefersReducedMotion)()?"instant":"smooth-auto"!==t.behavior?t.behavior??"instant":Math.abs(n-this.getScrollTop())<=10*this.getHeight()?"smooth":"instant"}scrollTo(t){if(null==this.root)return;const n=this.normalizeScrollTarget(t);if(null==n)return;const o=this.resolveScrollTargetTop(n);null!=o&&(this.primeScrollTarget(n),"smooth"===this.resolveEffectiveScrollBehavior(n,o)?this.scrollAnimation??={position:this.getScrollTop(),velocity:0,lastTimestamp:performance.now()}:this.scrollAnimation=void 0,this.suspendScrollInteractions(),this.pendingLayoutAnchor=void 0,this.pendingScrollTarget=n,this.render())}setSelectedLines(t,n){this.applySelectedLines(t,n)}getSelectedLines(){return this.selectedLines}clearSelectedLines(t){this.applySelectedLines(null,t)}getItem(t){return this.idToItem.get(t)?.item}getEditor(t){return this.itemEditors.get(t)?.editor}updateItem(t){const n=this.idToItem.get(t.id);return null==n?(console.error(`CodeView.updateItem: unknown item id "${t.id}"`),!1):!!this.syncItemRecord(n,t)&&(this.markItemLayoutDirty(n),this.scrollDirty=!0,this.render(),this.syncItemEditors(),this.syncSelection(),!0)}updateItemId(t,n){if(t===n)return!0;const o=this.idToItem.get(t);if(null==o)return console.error(`CodeView.updateItemId: unknown item id "${t}"`),!1;if(this.idToItem.has(n))return console.error(`CodeView.updateItemId: duplicate item id "${n}"`),!1;this.idToItem.delete(t),o.item.id=n,this.idToItem.set(n,o),this.updateItemOptionsId(o.instance.options,n),this.selectedLines?.id===t&&(this.selectedLines=Object.assign({},this.selectedLines,{id:n}),this.options.onSelectedLinesChange?.(this.selectedLines));const s=this.itemEditors.get(t);return null!=s&&(this.itemEditors.delete(t),this.itemEditors.set(n,s),this.attachedEditors.delete(t)&&this.attachedEditors.add(n)),this.renamePendingScrollTarget(t,n),this.renamePendingLayoutAnchor(t,n),this.render(),!0}addItem(t){this.addItems([t])}addItems(t){this.appendItemsInternal(t),this.syncItemEditors(),this.syncSelection()}removeItem(t){const n=this.idToItem.get(t);if(null==n)return console.error(`CodeView.removeItem: unknown item id "${t}"`),!1;const o=[];for(const t of this.items)t!==n&&o.push(t.item);return this.setItems(o),!0}setItems(t){let n;0===this.items.length?this.appendItemsInternal(t):this.tryAppendItems(t)||(n=this.reconcileItems(t));try{this.syncItemEditors(n)}finally{for(const t of n?.values()??[])t.instance.cleanUp()}this.syncSelection()}appendItemsInternal(t,n=!0){if(0===t.length)return;const o=this.getLayout();let s=0===this.items.length?0:this.scrollHeight+o.gap;const l=s;for(let n=0;n<t.length;n++){const l=t[n];if(null==l)throw new Error("CodeView.appendItemsInternal: missing input item");if(this.idToItem.has(l.id))throw new Error(`CodeView.addItem: duplicate id "${l.id}"`);const h=this.createItem(l,this.items.length,s);this.items.push(h),this.idToItem.set(h.item.id,h),this.instanceToItem.set(h.instance,h),h.height=$(h),s+=h.height+o.gap}this.scrollHeight=s-o.gap,this.scrollDirty=!0,n&&(this.canSkipRenderForAppend(l)?this.syncContainerHeight():this.render())}canSkipRenderForAppend(t){return null!=this.container&&-1!==this.renderState.firstIndex&&null==this.pendingScrollTarget&&null==this.scrollAnimation&&null==this.layoutDirtyIndex&&t>this.windowSpecs.bottom}onThemeChange(){this.invalidateElementPool()}setOptions(n){if(null==n)return;this.capturePendingLayoutAnchor();const{options:o}=this,s=this.getLayout(),{itemMetricsCache:l}=this;var h,f;h=o,f=n,(0,p.areThemesEqual)(h.theme??t.DEFAULT_THEMES,f.theme??t.DEFAULT_THEMES)&&(h.themeType??"system")===(f.themeType??"system")&&h.unsafeCSS===f.unsafeCSS||this.invalidateElementPool(),this.options=n;const S=this.computeMetricsCache(n.itemMetrics),y=!(0,c.areObjectsEqual)(l,S),T=!(0,c.areObjectsEqual)(s,this.getLayout());T&&this.syncLayout();const v=y||B(o,n);if(v){const t=this.pendingLayoutReset;this.pendingLayoutReset={metrics:y?S:t?.metrics,resetFileLayoutCache:!0,resetDiffLayoutCache:!0,includeEstimatedDiffHeights:!0===t?.includeEstimatedDiffHeights||y||U(o,n)}}(T||v)&&(this.markLayoutDirtyFromIndex(0),this.scrollDirty=!0),(0,u.areOptionsEqual)(o,n)||this.renderOptionsRevision++,this.syncItemEditors();const I=o.renderCodeViewHeader!==n.renderCodeViewHeader||o.renderCodeViewFooter!==n.renderCodeViewFooter;!this.isContainerManaged&&(this.items.length>0||I)&&this.render()}capturePendingLayoutAnchor(t=this.idToItem){null!=this.root&&0!==this.items.length&&null==this.pendingScrollTarget&&(this.pendingLayoutAnchor=this.getScrollAnchor(this.getScrollTop(),t))}render(t=!1){T.__STOP||(t?((0,l.dequeueRender)(this.computeRenderRangeAndEmit),this.computeRenderRangeAndEmit()):(0,l.queueRender)(this.computeRenderRangeAndEmit))}isReady(){const{workerManager:t}=this;return null==t||t.getStats().workersFailed?this.isSharedHighlighterReady():t.isInitialized()?(this.clearReadySubscription(),!0):(this.isReadySubscription??=t.subscribeToStatChanges(t=>{("initialized"===t.managerState||t.workersFailed)&&(this.clearReadySubscription(),this.render(!0))}),"waiting"===t.getStats().managerState&&t.initialize().catch(()=>{}),!1)}clearReadySubscription(){null!=this.isReadySubscription&&(this.isReadySubscription(),this.isReadySubscription=void 0,this.pendingHighlighterTheme=void 0)}isSharedHighlighterReady(){const l=this.workerManager?.getFileRenderOptions().theme??this.options.theme??t.DEFAULT_THEMES;return(0,s.isHighlighterLoaded)()&&(0,o.areThemesAttached)(l)?(this.clearReadySubscription(),!0):((0,p.areThemesEqual)(this.pendingHighlighterTheme,l)||this.clearReadySubscription(),this.isReadySubscription??=(()=>{this.pendingHighlighterTheme=l;let t=!1;return(0,s.preloadHighlighter)({themes:(0,n.getThemes)(l),langs:[],preferredHighlighter:this.options.preferredHighlighter}).then(()=>{t||(this.clearReadySubscription(),this.render(!0))},n=>{t||(this.clearReadySubscription(),console.error(n))}),()=>{t=!0}})(),!1)}instanceChanged(t,n){const o=this.instanceToItem.get(t);if(null==o)throw new Error("CodeView.instanceChanged: An instance has changed that is not registered");n&&this.markItemLayoutDirty(o),this.render()}getWindowSpecs(){return this.windowSpecs}getContainerElement(){return this.root}getHeaderElement(){return this.header.element}getFooterElement(){return this.footer.element}getRenderedItems(){const{firstIndex:t,lastIndex:n}=this.renderState;if(-1===t||-1===n||n<t)return[];const o=[];for(let s=t;s<=n;s++){const t=this.items[s];null!=t?.element&&("diff"===t.type?o.push({id:t.item.id,type:"diff",item:t.item,version:t.version,element:t.element,instance:t.instance}):o.push({id:t.item.id,type:"file",item:t.item,version:t.version,element:t.element,instance:t.instance}))}return o}setSlotCoordinator(t){return t!==this.slotCoordinator&&(this.slotCoordinator=t,this.slotSnapshot=void 0,!0)}getSlotSnapshot(t){return this.buildSlotSnapshot(t)}buildSlotSnapshot(t){const n=Y(this.getRenderedItems(),t),{element:o}=this.header,{element:s}=this.footer;if(null!=n||null!=o||null!=s)return{items:n,header:o,footer:s}}subscribeToScroll(t){return this.scrollListeners.add(t),()=>{this.scrollListeners.delete(t)}}getLocalTopForInstance(t){const n=this.instanceToItem.get(t);if(null==n)throw new Error("CodeView.getLocalTopForInstance: unknown virtualized instance");return n.top}getTopForItem(t){const n=this.idToItem.get(t);if(null!=n)return n.top+this.getItemTopOffset()}createItem(t,n,o){const{itemMetricsCache:s}=this;if("diff"===t.type){const l=new w.VirtualizedFileDiff(this.createDiffOptions(t.id),this,s,this.workerManager,this.isContainerManaged);return{type:"diff",item:t,version:t.version,index:n,top:o,height:0,element:void 0,renderedOptionsRevision:this.renderOptionsRevision,instance:l}}const l=new C.VirtualizedFile(this.createFileOptions(t.id),this,s,this.workerManager,this.isContainerManaged);return{type:"file",item:t,version:t.version,index:n,top:o,height:0,element:void 0,renderedOptionsRevision:this.renderOptionsRevision,instance:l}}applySelectedLines(t,n){const{selectedLines:o}=this;null==t&&null==o||null!=t&&o?.id===t.id&&(0,f.areSelectionsEqual)(o.range,t.range)||(null!=o&&o.id!==t?.id&&this.idToItem.get(o.id)?.instance.setSelectedLines(null,{notify:!1}),this.selectedLines=t,this.idToItem.get(t?.id??"")?.instance.setSelectedLines(t?.range??null,n))}syncSelection(){if(null==this.selectedLines)return;const t=this.idToItem.get(this.selectedLines.id);if(null==t)return this.selectedLines=null,void this.options.onSelectedLinesChange?.(null);t.instance.setSelectedLines(this.selectedLines.range,{notify:!1})}isItemInEditMode(t){return!0===t.item.edit&&!0!==t.item.collapsed}attachItemEditor(t){const{id:n}=t.item,{createEditor:o}=this.options;if(null==t.element||this.attachedEditors.has(n)||!this.isItemInEditMode(t))return;const s=this.itemEditors.get(n);let l;try{if(null==s&&"diff"===t.type&&!t.instance.__canAttachEditor())return void t.instance.__prepareForEditing();if(null==s){V(o);const s=H(t.instance.options);if(null==s)throw new Error("CodeView.attachItemEditor: instance options are missing their state");const h=t=>{const n=this.idToItem.get(s.id);null!=n&&this.options.onItemEditChange?.(t,n.item)},c=this.options.getEditStateKey?.(t.item);if("diff"===t.type){const p=o("file-diff",{onChange:h},c);l=p,this.itemEditors.set(n,{editor:p,state:s,dispose:p.edit(t.instance)})}else{const p=o("file",{onChange:h},c);l=p,this.itemEditors.set(n,{editor:p,state:s,dispose:p.edit(t.instance)})}}else t.type,s.dispose=s.editor.edit(t.instance);this.attachedEditors.add(n)}catch(n){throw l?.cleanUp(),this.releaseRenderedItem(t),n}}syncItemEditors(t){if(0===this.itemEditors.size)return;const n=[];for(const[o,s]of this.itemEditors){const l=this.idToItem.get(o),h=t?.get(o);if(null==h&&null!=l){const{edit:t=!1,collapsed:n=!1}=l.item;if(t){n&&this.attachedEditors.delete(o)&&s.editor.cleanUp("recycle");continue}}else null!=h&&(s.state.removedItem=h.item);this.itemEditors.delete(o),this.attachedEditors.delete(o),n.push(s)}if(0===n.length)return;let o,s=!1;for(const t of n){try{t.dispose()}catch(t){s||(s=!0,o=t)}const n=this.idToItem.get(t.state.id);null!=n&&this.markItemLayoutDirty(n)}if(this.render(),s)throw o}requireItemFromState(t){const n=this.idToItem.get(t.id)?.item??t.removedItem;if(null==n)throw new Error(`CodeView.onItemEditComplete: unknown item "${t.id}"`);return n}completeFileItemEdit(t,n){const o=this.requireItemFromState(t);if("file"!==o.type)throw new Error(`CodeView.onItemEditComplete: item "${t.id}" is not a file item`);const s=Object.assign({},o,{file:n.file,annotations:n.lineAnnotations,edit:!1,version:(o.version??0)+1});return"reject"===(this.options.onItemEditComplete?.(n,o,s)??"reject")?"reject":(this.idToItem.has(o.id)&&this.updateItem(s),"accept")}completeDiffItemEdit(t,n){const o=this.requireItemFromState(t);if("diff"!==o.type)throw new Error(`CodeView.onItemEditComplete: item "${t.id}" is not a diff item`);const s=Object.assign({},o,{fileDiff:n.fileDiff,annotations:n.lineAnnotations,edit:!1,version:(o.version??0)+1});return"reject"===(this.options.onItemEditComplete?.(n,o,s)??"reject")?"reject":(this.idToItem.has(o.id)&&this.updateItem(s),"accept")}renamePendingScrollTarget(t,n){const{pendingScrollTarget:o}=this;null!=o&&"position"!==o.type&&o.id===t&&(this.pendingScrollTarget=Object.assign({},o,{id:n}))}renamePendingLayoutAnchor(t,n){this.pendingLayoutAnchor?.id===t&&(this.pendingLayoutAnchor.id=n)}createFileOptionsPrototype(){const t={};for(const n of b)M(t,n,()=>this.options[n]);M(t,"stickyHeader",()=>this.options.stickyHeaders),M(t,"collapsed",t=>{const n=H(t);if(null!=n)return this.getItemOptions(n,"file")?.item.collapsed}),M(t,"onEditComplete",t=>{if(null==this.options.onItemEditComplete)return;const n=H(t);return null!=n?t=>this.completeFileItemEdit(n,t):void 0});for(const n of k)this.defineItemSharedCallback(t,"file",n);for(const n of L)this.defineItemSelectionCallback(t,"file",n);return t}createDiffOptionsPrototype(){const t={};for(const n of P)M(t,n,()=>this.options[n]);M(t,"stickyHeader",()=>this.options.stickyHeaders),M(t,"hunkSeparators",()=>this.options.hunkSeparators),M(t,"collapsed",t=>{const n=H(t);if(null!=n)return this.getItemOptions(n,"diff")?.item.collapsed}),M(t,"onEditComplete",t=>{if(null==this.options.onItemEditComplete)return;const n=H(t);return null!=n?t=>this.completeDiffItemEdit(n,t):void 0});for(const n of k)this.defineItemSharedCallback(t,"diff",n);for(const n of L)this.defineItemSelectionCallback(t,"diff",n);return t}createFileOptions(t){const n=Object.create(this.fileOptionsPrototype);return O(n,{id:t}),n}createDiffOptions(t){const n=Object.create(this.diffOptionsPrototype);return O(n,{id:t}),n}updateItemOptionsId(t,n){const o=H(t);if(null==o)throw new Error("CodeView.updateItemOptionsId: No valid state");o.id=n}getItemOptions(t,n){const o=this.idToItem.get(t.id);if(null!=o&&o.type===n)return o}defineItemSharedCallback(t,n,o){M(t,o,t=>{if(null==this.options[o])return;const s=H(t);if(null==s)return;const l=s.callbackCache??={};let h=l[o];return null==h&&(h=(...t)=>{const l=this.getItemOptions(s,n);if(null==l)return;const h=this.options[o];return h?.(...t,l)},l[o]=h),h})}defineItemSelectionCallback(t,n,o){M(t,o,t=>{const s=H(t);if(null==s)return;const l=s.callbackCache??={};let h=l[o];return null==h&&(h=t=>{const l=this.getItemOptions(s,n);if(null==l)return;const h=null==t?null:{id:l.item.id,range:t};!0!==this.options.controlledSelection&&(null==t&&this.selectedLines?.id!==l.item.id||this.applySelectedLines(h,{notify:!1})),this.options.onSelectedLinesChange?.(h);const c=this.options[o];return c?.(t,l)},l[o]=h),h})}markLayoutDirtyFromIndex(t){this.layoutDirtyIndex=Math.min(this.layoutDirtyIndex??t,t)}markItemLayoutDirty(t){if(this.items[t.index]!==t)throw new Error(`CodeView.markItemLayoutDirty: unknown item id "${t.item.id}"`);this.markLayoutDirtyFromIndex(t.index)}tryAppendItems(t){if(t.length<=this.items.length)return!1;for(let n=0;n<this.items.length;n++){const o=this.items[n];if(null==o)throw new Error("CodeView.tryAppendItems: missing existing item");const s=t[n];if(null==s||o.item.id!==s.id||o.type!==s.type)return!1}for(let n=0;n<this.items.length;n++){const o=this.items[n];if(null==o)throw new Error("CodeView.tryAppendItems: missing existing item");const s=t[n];if(null==s)throw new Error("CodeView.tryAppendItems: append candidate missing prefix item");this.syncItemRecord(o,s)&&this.markLayoutDirtyFromIndex(n)}return this.appendItemsInternal(t.slice(this.items.length),!1),this.scrollDirty=!0,this.render(),!0}reconcileItems(t){const{items:n,idToItem:o}=this,s=new Set(n),l=[],h=new Map,c=new Map,p=new Map;let u;for(let p=0;p<t.length;p++){const f=t[p];if(null==f)throw new Error("CodeView.reconcileItems: missing input item");if(h.has(f.id))throw new Error(`CodeView.setItems: duplicate id "${f.id}"`);const S=o.get(f.id),y=null!=S&&S.type===f.type?S:this.createItem(f,p,0);y.index=p,null!=S&&S.type===f.type?(s.delete(S),this.syncItemRecord(y,f)&&(u=Math.min(u??p,p))):u=Math.min(u??p,p),n[p]!==y&&(u=Math.min(u??p,p)),l.push(y),h.set(f.id,y),c.set(y.instance,y)}if(null==u){if(0===s.size)return;u=Math.max(l.length-1,0)}this.capturePendingLayoutAnchor(h);for(let t=0;t<n.length;t++){const o=n[t];if(null==o||!s.has(o))continue;p.set(o.item.id,o),this.releaseRenderedItem(o);const h=Math.max(l.length-1,0);u=Math.min(u??h,h)}return this.items=l,this.idToItem=h,this.instanceToItem=c,this.renderState.firstIndex>=l.length?this.resetRenderState():this.renderState.lastIndex>=l.length&&(this.renderState.lastIndex=l.length-1),this.markLayoutDirtyFromIndex(u),this.scrollDirty=!0,this.render(),p.size>0?p:void 0}syncItemRecord(t,n){if(t.type!==n.type)throw new Error(`CodeView.syncItemRecord: type mismatch for id "${n.id}"`);return t.version!==n.version&&(t.item=n,t.version=n.version,t.renderedOptionsRevision=-1,!0)}getMaxScrollTopForHeight(t){const{paddingBottom:n,paddingTop:o}=this.getLayout();return Math.max(o+this.header.height+t+this.footer.height+n-this.getHeight(),0)}getMaxScrollTop(){return this.getMaxScrollTopForHeight(this.getScrollHeight())}shouldRebaseScroll(){return this.getMaxScrollTop()>this.scrollRebaseConfig.threshold}getPagedScrollHeight(){return this.shouldRebaseScroll()?Math.min(this.getScrollHeight(),this.scrollRebaseConfig.containerHeight):this.getScrollHeight()}getMaxPagedScrollTop(){return this.getMaxScrollTopForHeight(this.getPagedScrollHeight())}clampPagedScrollTop(t){const n=this.getMaxPagedScrollTop();return Math.max(0,Math.min(t,n))}clampScrollTop(t){const n=this.getMaxScrollTop();return Math.max(0,Math.min(t,n))}getMaxScrollPageOffset(){return Math.max(this.getMaxScrollTop()-this.getMaxPagedScrollTop(),0)}clampScrollPageOffset(t){const n=this.getMaxScrollPageOffset();return Math.max(0,Math.min(t,n))}resolveScrollPageWindow(t,n){let o=(0,E.roundToDevicePixel)(this.clampPagedScrollTop(n)),s=this.clampScrollPageOffset(t-o);return o=(0,E.roundToDevicePixel)(this.clampPagedScrollTop(t-s)),s=this.clampScrollPageOffset(t-o),{pagedScrollTop:o,scrollPageOffset:s}}resolvePagedScrollPosition(t){if(!this.shouldRebaseScroll())return{pagedScrollTop:this.clampPagedScrollTop(t),scrollPageOffset:0};const{scrollPageOffset:n,scrollRebaseConfig:o}=this,s=this.clampScrollPageOffset(n),l=t-s,h=this.getMaxPagedScrollTop(),c=this.getMaxScrollPageOffset(),p=l>o.threshold&&s<c,u=l<o.triggerTop&&s>0;return l<0||l>h||p||u?this.resolveScrollPageWindow(t,u?Math.min(o.targetBottom,h):o.targetTop):{pagedScrollTop:(0,E.roundToDevicePixel)(this.clampPagedScrollTop(l)),scrollPageOffset:s}}needsScrollPageUpdate(t){const n=(0,E.roundToDevicePixel)(this.clampScrollTop(t)),{scrollPageOffset:o}=this.resolvePagedScrollPosition(n);return o!==this.scrollPageOffset}getPagedLayoutTop(t){return this.shouldRebaseScroll()?Math.max(t-this.scrollPageOffset,0):t}getStickyHeaderOffset(){return!0===this.options.stickyHeaders&&!0!==this.options.disableFileHeader?this.itemMetricsCache.diffHeaderHeight:0}getScrollTargetRect(t){const n=this.idToItem.get(t.id);if(null==n)return void console.warn(`CodeView.scrollTo: unknown item id "${t.id}"`);if("item"===t.type)return{top:n.top,height:n.height};if("range"===t.type){const o=this.getRangeScrollPosition(n,t);return null==o?void console.warn(`CodeView.scrollTo: unable to resolve range ${j(t.range)} for item "${t.id}"`):{top:n.top+o.top,height:o.height}}const o=this.getLineScrollPosition(n,t);if(null!=o)return{top:n.top+o.top,height:o.height};console.warn(`CodeView.scrollTo: unable to resolve line ${t.lineNumber} for item "${t.id}"`)}normalizeScrollTarget(t){if("position"===t.type||"nearest"!==t.align)return t;const n=this.getScrollTargetRect(t);if(null==n)return;const o=t.offset??0,s=this.getItemTopOffset()+n.top,l=s+n.height,h=this.getScrollTop(),c=h+("line"===t.type||"range"===t.type?this.getStickyHeaderOffset():0),p=h+this.getHeight();return s-o<=c&&l+o>=p?void 0:s-o<c?Object.assign({},t,{align:"start"}):l+o>p?Object.assign({},t,{align:"end"}):void 0}resolveScrollTargetTop(t){if("position"===t.type){const n=this.clampScrollTop(t.position);return n!==t.position?n:this.clampScrollTop(t.position-this.getStickyHeaderOffset())}const n=this.idToItem.get(t.id);if(null==n)return void console.warn(`CodeView.scrollTo: unknown item id "${t.id}"`);if("item"===t.type)return this.clampScrollTop(this.resolveAlignedScrollPosition(n.top,n.height,t.align,t.offset));if("range"===t.type){const o=this.getRangeScrollPosition(n,t);return null==o?void console.warn(`CodeView.scrollTo: unable to resolve range ${j(t.range)} for item "${t.id}"`):this.clampScrollTop(this.resolveAlignedScrollPosition(n.top+o.top,o.height,t.align,t.offset,this.getStickyHeaderOffset()))}const o=this.getLineScrollPosition(n,t);if(null!=o)return this.clampScrollTop(this.resolveAlignedScrollPosition(n.top+o.top,o.height,t.align,t.offset,this.getStickyHeaderOffset()));console.warn(`CodeView.scrollTo: unable to resolve line ${t.lineNumber} for item "${t.id}"`)}resolveAlignedScrollPosition(t,n,o,s=0,l=0){t+=this.getItemTopOffset();const h=this.getHeight();return"center"===o&&n+s<h?t-(h-n)/2+s:"end"===o?t-(h-n)+s:t-l-s}getLineScrollPosition(t,n){return"diff"===t.type?t.instance.getLinePosition(n.lineNumber,n.side):t.instance.getLinePosition(n.lineNumber)}getRangeScrollPosition(t,n){const{range:o}=n,s=this.getLineScrollPosition(t,{type:"line",id:n.id,lineNumber:o.start,side:o.side}),l=this.getLineScrollPosition(t,{type:"line",id:n.id,lineNumber:o.end,side:o.endSide??o.side});if(null==s||null==l)return;const h=s.top,c=h+s.height,p=l.top,u=p+l.height,f=Math.min(h,p);return{top:f,height:Math.max(c,u)-f}}computeTargetScrollTopForFrame(t,n){if(null==this.pendingScrollTarget)return t;const o=this.resolveScrollTargetTop(this.pendingScrollTarget);if(null==o)return t;const{scrollAnimation:s}=this;return null==s?o:this.computeSpringStep(s,o,n).position}computeSpringStep(t,n,o){const s=Math.max(0,o-t.lastTimestamp),{omega:l}=this.getSmoothScrollSettings(),h=Math.exp(-l*s),c=t.position-n,p=t.velocity+l*c;return{position:n+(c+p*s)*h,velocity:(p*(1-l*s)-l*c)*h}}advanceScrollAnimation(t,n){if(null==this.pendingScrollTarget)return;const o=this.resolveScrollTargetTop(this.pendingScrollTarget);if(null==o)return this.pendingScrollTarget=void 0,void(this.scrollAnimation=void 0);const s=this.scrollAnimation;if(null==s)return o;s.position+=n;const{position:l,velocity:h}=this.computeSpringStep(s,o,t);s.lastTimestamp=t,s.position=l,s.velocity=h;const{positionEpsilon:c,velocityEpsilon:p}=this.getSmoothScrollSettings();return Math.abs(o-l)<=c&&Math.abs(h)<=p?(s.position=o,s.velocity=0,this.scrollAnimation=void 0,o):s.position}computeRenderRangeAndEmit=(t=performance.now())=>{if(T.__STOP||null==this.container)return;if(!this.isReady())return;const n=this.getHeight(),o=this.getScrollTop();let s=o,l=null!=this.pendingLayoutAnchor,h=this.getScrollAnchor(s);if(null!=this.layoutDirtyIndex&&(this.recomputeLayout(this.layoutDirtyIndex,this.pendingLayoutReset),this.layoutDirtyIndex=void 0,this.pendingLayoutReset=void 0,l=!0),l&&null!=h){const t=this.resolveAnchoredScrollTop(h);if(null!=t){const n=t-s;s=t,null!=this.scrollAnimation&&(this.scrollAnimation.position+=n)}}l&&(s=this.clampScrollTop(s),this.syncContainerHeight());const c=this.computeTargetScrollTopForFrame(s,t),p=!l&&(-1===this.renderState.scrollTop||Math.abs(c-this.renderState.scrollTop)>n+2*this.config.overscrollSize);p&&(h=void 0),this.windowSpecs=(0,y.createWindowFromScrollPosition)({scrollTop:c-this.header.height,height:n,scrollHeight:this.getScrollHeight(),fitPerfectly:p,fitPerfectlyOverscroll:this.getFitPerfectlyOverscroll(),overscrollSize:this.config.overscrollSize});let u=o;(null!=this.pendingScrollTarget&&c!==u||this.needsScrollPageUpdate(c))&&(this.applyScrollFix(c,u,this.windowSpecs),u=c);const{top:f,bottom:S}=this.windowSpecs,{firstIndex:v,lastIndex:I}=this.renderState;if(v>=0)for(let t=v;t<=I;t++){const n=this.items[t];if(null==n)throw new Error(`CodeView.computeRenderRangeAndEmit: No item at index: ${t}`);n.top>f-n.height&&n.top<=S||this.releaseRenderedItem(n)}const C=this.reconcileHeaderFooterHosts();let w;const P=new Set,b=this.findFirstVisibleIndex(f),k=this.findLastVisibleIndex(S);for(let t=b;t<=k;t++){const n=this.items[t];if(null==n)throw new Error("CodeView.computeRenderRangeAndEmit: missing item");const{instance:o}=n;null==n.element?(n.element=this.acquireElement(),W(this.stickyContainer,n.element,w),o.virtualizedSetup(),G(n,n.element)&&(n.renderedOptionsRevision=this.renderOptionsRevision,P.add(n)),w=n.element):(W(this.stickyContainer,n.element,w),G(n,void 0,n.renderedOptionsRevision!==this.renderOptionsRevision)&&(n.renderedOptionsRevision=this.renderOptionsRevision,P.add(n)),w=n.element),!0===n.item.edit&&this.attachItemEditor(n)}this.renderState.firstIndex=b<=k?b:-1,this.renderState.lastIndex=k,this.flushSlotCoordinator(),this.flushManagers(P),C&&this.measureMountedHosts(),this.reconcileRenderedItems(P),this.syncContainerHeight(),this.updateStickyPositioning();const L=null!=h?this.resolveAnchoredScrollTop(h):void 0;h===this.pendingLayoutAnchor&&(this.pendingLayoutAnchor=void 0);const x=null!=L?L-s:0;let O=c,H=!1;if(null!=this.pendingScrollTarget){const n=this.advanceScrollAnimation(t,x);null!=n?(O=n,H=!0):O=s}else O=L??c;O!==u&&(this.applyScrollFix(O,u,this.windowSpecs),u=O),H&&null!=this.pendingScrollTarget&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0),this.renderState.scrollTop=(0,E.roundToDevicePixel)(u),this.updateStickyPositioning(),this.validateStickyContainerHeight(),this.fixContainerFocus(),(p||null!=this.scrollAnimation)&&this.render()};flushManagers(t){for(const n of t)n.instance.flushManagers()}syncContainerHeight(){const t=this.getPagedScrollHeight();null!=this.container&&this.containerHeight!==t&&(this.container.style.height=`${t}px`,this.containerHeight=t)}getStickyBounds(t){const{firstIndex:n,lastIndex:o}=null!=t?{firstIndex:this.findFirstVisibleIndex(t.top),lastIndex:this.findLastVisibleIndex(t.bottom)}:this.renderState;if(-1===n||-1===o||n>o)return;const s=this.items[n]?.instance.getAdvancedStickySpecs(t),l=this.items[o]?.instance.getAdvancedStickySpecs(t);return null!=s&&null!=l?{stickyTop:this.getPagedLayoutTop(Math.max(s.topOffset,0)),stickyBottom:this.getPagedLayoutTop(l.topOffset+l.height)}:void 0}applyStickyPositioning({stickyTop:t,stickyBottom:n}){const o=this.getHeight(),{itemMetricsCache:s}=this,l=n-t;this.renderState.stickyHeight=l,this.renderState.stickyTop=t,this.renderState.stickyBottom=n,this.stickyOffset.style.height=`${t}px`;const h=-1*(Math.random()*s.lineHeight|0),c=-Math.max(l+h,0)+o;this.stickyContainer.style.top=`${c}px`,this.stickyContainer.style.bottom=`${c+s.diffHeaderHeight}px`}syncPagedScrollScaffolding(t){this.syncContainerHeight();const n=this.getStickyBounds(t);null!=n?this.applyStickyPositioning(n):this.stickyOffset.style.height=`${this.getPagedLayoutTop(t.top)}px`}reconcileRenderedItems(t){const{firstIndex:n,lastIndex:o}=this.renderState;if(-1===n)return;let s=-1,l=!1;for(let h=n;h<this.items.length&&(l||!(h>o));h++){const n=this.items[h];if(null==n)throw new Error("CodeView.reconcileRenderedItems: Invalid item");-1===s?s=n.top:n.top!==s&&(n.top=s,n.instance.syncVirtualizedTop(),l=!0),(null==t?h<=o:t.has(n))&&(n.instance.reconcileHeights()&&(l=!0,n.height=n.instance.getVirtualizedHeight()),this.validateRenderedItemHeight(n)),s+=n.instance.getVirtualizedHeight(),h<this.items.length-1&&(s+=this.getLayout().gap)}l&&null!=s&&(this.scrollDirty=!0,this.scrollHeight=s)}updateStickyPositioning(){const t=this.getStickyBounds();if(null==t)return void(-1===this.renderState.firstIndex&&(this.stickyOffset.style.height=""));const{stickyTop:n,stickyBottom:o}=t;o-n===this.renderState.stickyHeight&&n===this.renderState.stickyTop&&o===this.renderState.stickyBottom||this.applyStickyPositioning(t)}handleScroll=()=>{T.__STOP||(this.suspendScrollInteractions(),this.scrollDirty=!0,this.notifyScroll(),this.render())};clearPendingScroll=()=>{this.pendingScrollTarget=void 0,this.pendingLayoutAnchor=void 0,this.scrollAnimation=void 0};handleResize=t=>{let n=!1;for(const o of t)if(o.target===this.stickyContainer){const t=o.borderBoxSize[0].blockSize;if(Math.abs(t-this.renderState.stickyHeight)>=1){const t=this.getScrollTop(),o=this.getScrollAnchor(t);this.reconcileRenderedItems(),this.updateStickyPositioning();const s=null!=o?this.resolveAnchoredScrollTop(o):void 0;if(null!=s){const n=s-t;this.applyScrollFix(s,t,this.windowSpecs),null!=this.scrollAnimation&&(this.scrollAnimation.position+=n)}null!=this.pendingScrollTarget&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0),n=!0}}else if(o.target===this.header.element||o.target===this.footer.element){const t=o.target===this.header.element?this.header:this.footer,s=o.borderBoxSize[0].blockSize;if(s!==t.height){const o=this.getScrollTop(),l=this.getScrollAnchor(o);this.setHostHeight(t,s);const h=null!=l?this.resolveAnchoredScrollTop(l):void 0;if(null!=h){const t=h-o;this.applyScrollFix(h,o,this.windowSpecs),null!=this.scrollAnimation&&(this.scrollAnimation.position+=t)}null!=this.pendingScrollTarget&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0),n=!0}}else this.scrollDirty=!0,this.heightDirty=!0,n=!0;n&&this.render(!0)};getScrollAnchorViewportTop(t,n){return t<n?n+this.getStickyHeaderOffset():n}getScrollAnchor(t,n=this.idToItem){let o;const{pendingLayoutAnchor:s}=this;if(null!=s){const t=this.idToItem.get(s.id);if(null!=t&&n.get(s.id)===t)return s;null!=t&&(o=t)}if(t<=0)return;const{firstIndex:l,lastIndex:h,stickyTop:c,stickyBottom:p}=this.renderState;if(-1===l||-1===h)return;const u=this.getHeight();if(-1!==c&&-1!==p){for(let s=l;s<=h;s++){const l=this.items[s];if(null==l)continue;const h=this.getItemTopOffset()+l.top;if(h+l.height<=t)continue;if(h>=t+u)break;if(n.get(l.item.id)!==l){o??=l;continue}if(h>=t)return{type:"item",id:l.item.id,viewportOffset:h-t};const c=this.getScrollAnchorViewportTop(h,t)-h,p=l.instance.getNumericScrollAnchor(c);if(null!=p){const n=h+p.top;return{type:"line",id:l.item.id,lineNumber:p.lineNumber,side:p.side,viewportOffset:n-t}}}if(null!=o)for(let t=o.index+1;t<this.items.length;t++){const o=this.items[t];if(null!=o&&n.get(o.item.id)===o)return{type:"item",id:o.item.id,viewportOffset:0}}}}resolveAnchoredScrollTop(t){const n=this.idToItem.get(t.id);if(null==n)return;const o=this.getItemTopOffset();if("item"===t.type){const s=o+n.top;return this.clampScrollTop(s-t.viewportOffset)}const s="diff"===n.type?n.instance.getLinePosition(t.lineNumber,t.side):n.instance.getLinePosition(t.lineNumber);if(null==s)return;const l=o+n.top+s.top;return this.clampScrollTop(l-t.viewportOffset)}applyScrollFix(t,n,o){if(null==this.root)return;const s=(0,E.roundToDevicePixel)(this.clampScrollTop(t)),l=(0,E.roundToDevicePixel)(n),{scrollPageOffset:h}=this,c=(0,E.roundToDevicePixel)(this.clampPagedScrollTop(l-h)),{pagedScrollTop:p,scrollPageOffset:u}=this.resolvePagedScrollPosition(s),f=p,S=h!==u;(s!==this.renderState.scrollTop||s!==l||f!==c||S)&&(this.suspendScrollInteractions(),(f!==c||S)&&(this.scrollPageOffset=u,this.syncPagedScrollScaffolding(o)),f!==c&&this.root.scrollTo({top:f,behavior:"instant"}),this.renderState.scrollTop=s,this.scrollTop=s,this.scrollDirty=!1)}isPendingTargetSettled(t){const n=this.resolveScrollTargetTop(t);return null==n||(0,E.roundToDevicePixel)(this.getScrollTop())===(0,E.roundToDevicePixel)(n)}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;const t=this.root?.scrollTop??0;return this.scrollTop=this.clampScrollTop(t+this.scrollPageOffset),this.scrollTop}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root?.getBoundingClientRect().height??0,this.height):this.height}getScrollHeight(){return this.scrollHeight}flushSlotCoordinator(){if(null==this.slotCoordinator)return;const t=this.buildSlotSnapshot(this.slotCoordinator);(0,h.areManagedSnapshotsEqual)(this.slotSnapshot,t)||(this.slotSnapshot=t,this.slotCoordinator.onSnapshotChange(t))}notifyScroll(){if(0===this.scrollListeners.size)return;const t=this.getScrollTop();for(const n of this.scrollListeners)n(t,this)}findFirstVisibleIndex(t){let n=0,o=this.items.length-1,s=this.items.length;for(;n<=o;){const l=n+o>>1,h=this.items[l];if(null==h)throw new Error("CodeView.findFirstVisibleIndex: invalid item index");h.top+h.height>t?(s=l,o=l-1):n=l+1}return s}findLastVisibleIndex(t){let n=0,o=this.items.length-1,s=-1;for(;n<=o;){const l=n+o>>1,h=this.items[l];if(null==h)throw new Error("CodeView.findLastVisibleIndex: invalid item index");h.top<=t?(s=l,n=l+1):o=l-1}return s}recomputeLayout(t=0,n){if(0===this.items.length)return void(this.scrollHeight=0);const o=this.getLayout();let s=0;if(t>0){const n=this.items[t-1];if(null==n)throw new Error("CodeView.recomputeLayout: invalid dirty index");s=n.top+n.height+o.gap}for(let l=t;l<this.items.length;l++){const t=this.items[l];if(null==t)throw new Error("CodeView.recomputeLayout: invalid item index");t.top=s,"diff"===t.type?t.height=t.instance.updateCodeViewLayout(t.item.fileDiff,s,n,t.item.annotations??[]):t.height=t.instance.updateCodeViewLayout(t.item.file,s,n,t.item.annotations??[]),s+=t.height,l<this.items.length-1&&(s+=o.gap)}s!==this.scrollHeight&&(this.scrollDirty=!0),this.scrollHeight=s}resetRenderState(){this.renderState.scrollTop=-1,this.renderState.firstIndex=-1,this.renderState.lastIndex=-1,this.renderState.stickyHeight=0,this.renderState.stickyTop=-1,this.renderState.stickyBottom=-1}getFitPerfectlyOverscroll(){return this.getLayout().gap+this.itemMetricsCache.diffHeaderHeight}};function $(t){return t.instance.cleanUp(!0),"diff"===t.type?t.instance.updateCodeViewLayout(t.item.fileDiff,t.top,void 0,t.item.annotations??[]):t.instance.updateCodeViewLayout(t.item.file,t.top,void 0,t.item.annotations??[])}function B(t,n){return(t.overflow??"scroll")!==(n.overflow??"scroll")||(t.disableLineNumbers??!1)!==(n.disableLineNumbers??!1)||(t.disableFileHeader??!1)!==(n.disableFileHeader??!1)||t.unsafeCSS!==n.unsafeCSS||(t.diffStyle??"split")!==(n.diffStyle??"split")||(t.diffIndicators??"bars")!==(n.diffIndicators??"bars")||(t.hunkSeparators??"line-info")!==(n.hunkSeparators??"line-info")||(t.expandUnchanged??!1)!==(n.expandUnchanged??!1)||(t.collapsedContextThreshold??1)!==(n.collapsedContextThreshold??1)}function U(t,n){return(t.disableFileHeader??!1)!==(n.disableFileHeader??!1)||(t.hunkSeparators??"line-info")!==(n.hunkSeparators??"line-info")||(t.expandUnchanged??!1)!==(n.expandUnchanged??!1)||(t.collapsedContextThreshold??1)!==(n.collapsedContextThreshold??1)}function N(t){return t instanceof SVGElement||(0,T.isStyleNode)(t)&&(t.hasAttribute("data-core-css")||t.hasAttribute("data-theme-css")||t.hasAttribute("data-unsafe-css"))}function j(t){const n=q(t.start,t.side),o=q(t.end,t.endSide??t.side);return n===o?n:`${n}-${o}`}function q(t,n){return null==n?`${t}`:`${"deletions"===n?"D":"A"}${t}`}function G(t,n,o=!1){return"diff"===t.type?t.instance.render({deferManagers:!0,fileContainer:n,fileDiff:t.item.fileDiff,forceRender:o,lineAnnotations:t.item.annotations??[]}):t.instance.render({deferManagers:!0,fileContainer:n,file:t.item.file,forceRender:o,lineAnnotations:t.item.annotations??[]})}function W(t,n,o){null!=o?o.nextSibling!==n&&o.after(n):t.firstChild!==n&&t.prepend(n)}function K(t){return(t.annotations?.length??0)>0}function Y(t,{hasHeaderRenderers:n,hasAnnotationRenderer:o,hasGutterRenderer:s}){if(0===t.length)return;if(n||s)return t;if(!o)return;const l=[];for(const n of t)K(n.item)&&l.push(n);return l.length>0?l:void 0}},1389,[1148,1232,1234,1252,1253,1390,1254,1255,1256,1257,1391,1258,1323,1324,1259,1392,1332,1387]);
291
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n,l){return null==n||null==l?n===l:n.header===l.header&&n.footer===l.footer&&t(n.items,l.items)}function t(n,t){if(null==n||null==t)return n===t;if(n.length!==t.length)return!1;for(let l=0;l<n.length;l++){const u=n[l],o=t[l];if(null==u||null==o||u.id!==o.id||u.type!==o.type||u.element!==o.element||u.instance!==o.instance||u.version!==o.version)return!1}return!0}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areManagedSnapshotsEqual",{enumerable:!0,get:function(){return n}})},1390,[]);
292
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createCodeViewHeaderFooterHostElement",{enumerable:!0,get:function(){return o}});var t=r(d[0]);function o(o,n,u){const E=document.createElement("div");return E.style.display="flow-root","header"===o?(E.setAttribute(t.CODE_VIEW_HEADER_ATTRIBUTE,""),n.before(E)):(E.setAttribute(t.CODE_VIEW_FOOTER_ATTRIBUTE,""),n.after(E)),u?.observe(E),E}},1391,[1148]);
293
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n){const t=window.devicePixelRatio??1;return Math.round(n*t)/t}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"roundToDevicePixel",{enumerable:!0,get:function(){return n}})},1392,[]);
294
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ShikiStreamTokenizer",{enumerable:!0,get:function(){return s}});var t=r(d[0]),s=class s{tokensStable=[];tokensUnstable=[];lastUnstableCodeChunk="";constructor(t){this.options=t}async enqueue(s){const n=(this.lastUnstableCodeChunk+s).split("\n"),l=[];let o=[];const i=this.tokensUnstable.length;return n.forEach((t,s)=>{const i=s===n.length-1,h=this.options.highlighter.codeToTokens(t,Object.assign({},this.options,{grammarState:this.lastStableGrammarState})),b=h.tokens[0];i||b.push({content:"\n",offset:0}),i?(o=b,this.lastUnstableCodeChunk=t):(this.lastStableGrammarState=h.grammarState,l.push(...b))}),(0,t.appendItems)(this.tokensStable,l),this.tokensUnstable=o,{recall:i,stable:l,unstable:o}}close(){const t=this.tokensUnstable;return this.tokensUnstable=[],this.lastUnstableCodeChunk="",this.lastStableGrammarState=void 0,{stable:t}}clear(){this.tokensStable=[],this.tokensUnstable=[],this.lastUnstableCodeChunk="",this.lastStableGrammarState=void 0}clone(){const t=new s(this.options);return t.lastUnstableCodeChunk=this.lastUnstableCodeChunk,t.tokensUnstable=this.tokensUnstable,t.tokensStable=this.tokensStable,t.lastStableGrammarState=this.lastStableGrammarState,t}}},1393,[1302]);
295
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CodeToTokenTransformStream",{enumerable:!0,get:function(){return o}});var n=r(d[0]),o=class extends TransformStream{constructor(o){const t=new n.ShikiStreamTokenizer(o),{allowRecalls:s=!1}=o;super({async transform(n,o){const{stable:u,unstable:c,recall:l}=await t.enqueue(n);s&&l>0&&o.enqueue({recall:l});for(const n of u)o.enqueue(n);if(s)for(const n of c)o.enqueue(n)},async flush(n){const{stable:o}=t.close();if(!s)for(const t of o)n.enqueue(t)}}),this.tokenizer=t,this.options=o}}},1394,[1393]);
296
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createSpanFromToken",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){const o=document.createElement("span"),c=n.htmlStyle??(0,t.getTokenStyleObject)(n);return o.style=(0,t.stringifyTokenStyle)(c),o.textContent=n.content,o}},1395,[1155]);
297
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"FileStream",{enumerable:!0,get:function(){return E}});var t=r(d[0]),n=r(d[1]),i=r(d[2]),s=r(d[3]),o=r(d[4]),l=r(d[5]),h=r(d[6]),u=r(d[7]),c=r(d[8]),p=r(d[9]),S=r(d[10]),C=r(d[11]),T=r(d[12]);let f=-1;var E=class{__id="file-stream:"+ ++f;currentRowCount=0;constructor(n={theme:t.DEFAULT_THEMES}){this.options=n,this.currentLineIndex=this.options.startingLineIndex??1}cleanUp(){(0,i.dequeueRender)(this.render),this.abortController?.abort(),this.abortController=void 0}setThemeType(t){(this.options.themeType??"system")!==t&&(this.options=Object.assign({},this.options,{themeType:t}),"string"!=typeof this.options.theme&&null!=this.fileContainer&&null!=this.appliedThemeCSS&&this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType))}async initializeHighlighter(){return this.highlighter=await(0,n.getSharedHighlighter)((0,s.getHighlighterOptions)(this.options.lang,this.options)),this.highlighter}async setup(t,n){const i=null!=this.queuedSetupArgs;if(this.queuedSetupArgs=[t,n],i)return;this.highlighter??=await this.initializeHighlighter();const[s,o]=this.queuedSetupArgs;this.queuedSetupArgs=void 0;const l=s;this.setupStream(l,o,this.highlighter)}setupStream(n,i,s){const{disableLineNumbers:h=!1,overflow:u="scroll",theme:p=t.DEFAULT_THEMES,themeType:T="system"}=this.options,f=this.getOrCreateFileContainer();null==f.parentElement&&i.appendChild(f),this.pre??=document.createElement("pre"),null==this.pre.parentElement&&f.shadowRoot?.appendChild(this.pre);const E="string"==typeof p?s.getTheme(p).type:void 0,b=(0,l.getHighlighterThemeStyles)({theme:p,highlighter:s});this.applyThemeState(f,b,T,E);const y=(0,S.setPreNodeProperties)(this.pre,{type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:h,overflow:u,split:!1,totalLines:0});y.textContent="",this.pre=y,this.code=(0,c.getOrCreateCodeNode)({code:this.code,pre:y}),this.gutterElement=void 0,this.contentElement=void 0,this.currentRowCount=0,this.currentLineElement=void 0,this.currentLineIndex=this.options.startingLineIndex??1,this.abortController?.abort(),this.abortController=new AbortController;const{onStreamStart:w,onStreamClose:L,onStreamAbort:v}=this.options;this.stream?.cancel().catch(()=>{}),this.stream=n,this.stream.pipeThrough("string"==typeof p?new C.CodeToTokenTransformStream(Object.assign({},this.options,{theme:p,highlighter:s,allowRecalls:!0,defaultColor:!1,cssVariablePrefix:(0,o.formatCSSVariablePrefix)("token"),tokenizeTimeLimit:0})):new C.CodeToTokenTransformStream(Object.assign({},this.options,{themes:p,highlighter:s,allowRecalls:!0,defaultColor:!1,cssVariablePrefix:(0,o.formatCSSVariablePrefix)("token"),tokenizeTimeLimit:0}))).pipeTo(new WritableStream({start(t){w?.(t)},close(){L?.()},abort(t){v?.(t)},write:this.handleWrite}),{signal:this.abortController.signal}).catch(t=>{"AbortError"!==t.name&&console.error("FileStream pipe error:",t)})}queuedTokens=[];handleWrite=t=>{"recall"in t&&this.queuedTokens.length>=t.recall?this.queuedTokens.length=this.queuedTokens.length-t.recall:this.queuedTokens.push(t),(0,i.queueRender)(this.render),this.options.onStreamWrite?.(t)};render=()=>{this.options.onPreRender?.(this);const{gutter:t,content:n}=this.getOrCreateStreamColumns(),i=document.createDocumentFragment(),s=document.createDocumentFragment();for(const t of this.queuedTokens)if("recall"in t){if(null==this.currentLineElement)throw new Error("FileStream.render: no current line element, shouldnt be possible to get here");if(t.recall>this.currentLineElement.childNodes.length)throw new Error("FileStream.render: Token recall exceed the current line, there's probably a bug...");for(let n=0;n<t.recall;n++)this.currentLineElement.lastChild?.remove()}else{const n=(0,T.createSpanFromToken)(t);if(null==this.currentLineElement){const{gutterLine:t,contentLine:n}=this.createLine();i.appendChild(t),s.appendChild(n)}if(this.currentLineElement?.appendChild(n),"\n"===t.content){this.currentLineIndex++;const{gutterLine:t,contentLine:n}=this.createLine();i.appendChild(t),s.appendChild(n)}}i.childNodes.length>0&&t.appendChild(i),s.childNodes.length>0&&n.appendChild(s),this.queuedTokens.length=0,this.options.onPostRender?.(this)};getOrCreateStreamColumns(){if(null==this.code)throw new Error("FileStream: expected code element to exist");if(null!=this.gutterElement&&null!=this.contentElement)return{gutter:this.gutterElement,content:this.contentElement};const t=document.createElement("div");t.dataset.gutter="";const n=document.createElement("div");return n.dataset.content="",this.code.appendChild(t),this.code.appendChild(n),this.gutterElement=t,this.contentElement=n,{gutter:t,content:n}}updateRowSpan(){null!=this.gutterElement&&(this.gutterElement.style.gridRow=`span ${this.currentRowCount}`),null!=this.contentElement&&(this.contentElement.style.gridRow=`span ${this.currentRowCount}`)}createLine(){const t=this.currentLineIndex,n=""+(t-1),i=document.createElement("div");i.dataset.columnNumber=`${t}`,i.dataset.lineType="context",i.dataset.lineIndex=n;const s=document.createElement("span");s.dataset.lineNumberContent="",s.textContent=`${t}`,i.appendChild(s);const o=document.createElement("div");return o.dataset.line=`${t}`,o.dataset.lineType="context",o.dataset.lineIndex=n,this.currentRowCount+=1,this.updateRowSpan(),this.currentLineElement=o,{gutterLine:i,contentLine:o}}getOrCreateFileContainer(t){return null!=t&&t===this.fileContainer||null==t&&null!=this.fileContainer||(null!=this.fileContainer&&null!=t&&t!==this.fileContainer&&(this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0),this.fileContainer=t??document.createElement("diffs-container")),this.fileContainer}applyThemeState(n,i,s,o){const l=n.shadowRoot??n.attachShadow({mode:"open"}),c=o??s,S=this.options.theme??t.DEFAULT_THEMES,C="string"==typeof S?S:Object.assign({},S),T=(0,h.getMeasuredScrollbarGutter)(l);this.themeCSSStyle?.parentNode!==l||this.appliedThemeCSS?.themeStyles!==i||this.appliedThemeCSS.themeType!==c||this.appliedThemeCSS.scrollbarGutter!==T?(this.themeCSSStyle=(0,p.upsertHostThemeStyle)({shadowRoot:l,currentNode:this.themeCSSStyle,themeCSS:(0,u.wrapThemeCSS)(i,c,T)}),this.appliedThemeCSS=null!=this.themeCSSStyle?{theme:C,themeStyles:i,themeType:c,baseThemeType:o,scrollbarGutter:T}:void 0):this.appliedThemeCSS.theme=C}}},1396,[1148,1252,1253,1287,1294,1295,1317,1315,1319,1329,1321,1394,1395]);
298
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"resolveRegion",{enumerable:!0,get:function(){return i}});var n=r(d[0]);function i(i,L){const{resolution:x,hunkIndex:f,startContentIndex:c,endContentIndex:h,indexesToDelete:C=new Set}=L,p=i.hunks[f];if(null==p)throw console.error({diff:i,hunkIndex:f}),new Error(`resolveRegion: Invalid hunk index: ${f}`);if(c<0||h>=p.hunkContent.length||c>h)throw new Error(`resolveRegion: Invalid content range, ${c}, ${h}`);const{hunks:I,additionLines:S,deletionLines:D}=i,k=Object.assign({},i,{hunks:[],deletionLines:[],additionLines:[],splitLineCount:0,unifiedLineCount:0,cacheKey:null!=i.cacheKey?`${i.cacheKey}:${x[0]}-${f}:${c}-${h}`:void 0}),A={nextAdditionLineIndex:0,nextDeletionLineIndex:0,nextAdditionStart:1,nextDeletionStart:1,splitLineCount:0,unifiedLineCount:0},w=f===I.length-1&&h===p.hunkContent.length-1,y=!i.isPartial;for(const[t,L]of I.entries()){o(i,k,A,(0,n.getHunkSideStartBoundary)(L.deletionStart,L.deletionCount)-L.collapsedBefore,(0,n.getHunkSideStartBoundary)(L.additionStart,L.additionCount)-L.collapsedBefore,L.collapsedBefore,y);const p=Object.assign({},L,{hunkContent:[],additionStart:A.nextAdditionStart,deletionStart:A.nextDeletionStart,additionLineIndex:A.nextAdditionLineIndex,deletionLineIndex:A.nextDeletionLineIndex,additionCount:0,deletionCount:0,deletionLines:0,additionLines:0,splitLineStart:A.splitLineCount,unifiedLineStart:A.unifiedLineCount,splitLineCount:0,unifiedLineCount:0});for(const[n,i]of L.hunkContent.entries())if(t!==f||n<c||n>h){s(i,k,D,S);const n=Object.assign({},i,{additionLineIndex:A.nextAdditionLineIndex,deletionLineIndex:A.nextDeletionLineIndex});p.hunkContent.push(n),u(n,A,p)}else if(C.has(n))p.hunkContent.push({type:"context",lines:0,deletionLineIndex:A.nextDeletionLineIndex,additionLineIndex:A.nextAdditionLineIndex});else if("context"===i.type){s(i,k,D,S);const n=Object.assign({},i,{deletionLineIndex:A.nextDeletionLineIndex,additionLineIndex:A.nextAdditionLineIndex});p.hunkContent.push(n),u(n,A,p)}else{l(x,i,k,D,S);const n={type:"context",lines:"deletions"===x?i.deletions:"additions"===x?i.additions:i.deletions+i.additions,deletionLineIndex:A.nextDeletionLineIndex,additionLineIndex:A.nextAdditionLineIndex};p.hunkContent.push(n),u(n,A,p)}if(t===f&&w){const n="deletions"===x?L.noEOFCRDeletions:L.noEOFCRAdditions;p.noEOFCRAdditions=n,p.noEOFCRDeletions=n}0===p.additionCount&&(p.additionStart--,i.isPartial||p.additionLineIndex--),0===p.deletionCount&&(p.deletionStart--,i.isPartial||p.deletionLineIndex--),k.hunks.push(p)}const E=I.at(-1);if(null!=E&&!i.isPartial){const i=(0,n.getHunkSideEndBoundary)(E.deletionStart,E.deletionCount),o=(0,n.getHunkSideEndBoundary)(E.additionStart,E.additionCount),s=Math.min(D.length-i,S.length-o);t(k,D,S,i,o,s),A.splitLineCount+=s,A.unifiedLineCount+=s}return k.splitLineCount=A.splitLineCount,k.unifiedLineCount=A.unifiedLineCount,k}function t(n,i,t,o,s,l){for(let u=0;u<l;u++){const l=i[o+u],L=t[s+u];if(null==l||null==L)throw new Error("pushCollapsedContextLines: missing collapsed context line");n.deletionLines.push(l),n.additionLines.push(L)}}function o(n,i,o,s,l,u,L){u<=0||(L&&(t(i,n.deletionLines,n.additionLines,s,l,u),o.nextAdditionLineIndex+=u,o.nextDeletionLineIndex+=u),o.nextAdditionStart+=u,o.nextDeletionStart+=u,o.splitLineCount+=u,o.unifiedLineCount+=u)}function s(n,i,t,o){if("context"===n.type)for(let t=0;t<n.lines;t++){const s=o[n.additionLineIndex+t];if(null==s)throw console.error({additionLines:o,content:n,i:t}),new Error("pushContentLinesToDiff: Context line does not exist");i.deletionLines.push(s),i.additionLines.push(s)}else{const s=Math.max(n.deletions,n.additions);for(let l=0;l<s;l++){if(l<n.deletions){const o=t[n.deletionLineIndex+l];if(null==o)throw console.error({deletionLines:t,content:n,i:l}),new Error("pushContentLinesToDiff: Deletion line does not exist");i.deletionLines.push(o)}if(l<n.additions){const t=o[n.additionLineIndex+l];if(null==t)throw console.error({additionLines:o,content:n,i:l}),new Error("pushContentLinesToDiff: Addition line does not exist");i.additionLines.push(t)}}}}function l(n,i,t,o,s){if("deletions"===n||"both"===n)for(let n=0;n<i.deletions;n++){const s=o[i.deletionLineIndex+n];if(null==s)throw console.error({deletionLines:o,content:i,i:n}),new Error("pushResolveLinesToDiff: Deletion line does not exist");t.deletionLines.push(s),t.additionLines.push(s)}if("additions"===n||"both"===n)for(let n=0;n<i.additions;n++){const o=s[i.additionLineIndex+n];if(null==o)throw console.error({additionLines:s,content:i,i:n}),new Error("pushResolveLinesToDiff: Addition line does not exist");t.deletionLines.push(o),t.additionLines.push(o)}}function u(n,i,t){"context"===n.type?(i.nextAdditionLineIndex+=n.lines,i.nextDeletionLineIndex+=n.lines,i.nextAdditionStart+=n.lines,i.nextDeletionStart+=n.lines,i.splitLineCount+=n.lines,i.unifiedLineCount+=n.lines,t.additionCount+=n.lines,t.deletionCount+=n.lines,t.splitLineCount+=n.lines,t.unifiedLineCount+=n.lines):(i.nextAdditionLineIndex+=n.additions,i.nextDeletionLineIndex+=n.deletions,i.nextAdditionStart+=n.additions,i.nextDeletionStart+=n.deletions,i.splitLineCount+=Math.max(n.deletions,n.additions),i.unifiedLineCount+=n.deletions+n.additions,t.deletionCount+=n.deletions,t.deletionLines+=n.deletions,t.additionCount+=n.additions,t.additionLines+=n.additions,t.splitLineCount+=Math.max(n.deletions,n.additions),t.unifiedLineCount+=n.deletions+n.additions)}},1397,[1338]);
299
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"resolveConflict",{enumerable:!0,get:function(){return o}});var n=r(d[0]),t=r(d[1]);function o(o,s,l){return(0,t.resolveRegion)(o,{resolution:(0,n.normalizeDiffResolution)(l),hunkIndex:s.hunkIndex,startContentIndex:s.startContentIndex,endContentIndex:s.endContentIndex,indexesToDelete:u(s)})}function u(n){const t=new Set;return null!=n.baseContentIndex&&t.add(n.baseContentIndex),n.endMarkerContentIndex!==n.endContentIndex&&t.add(n.endMarkerContentIndex),t}},1398,[1399,1397]);
300
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){const n="string"==typeof t?t:t.type;return"accept"===n||"incoming"===n?"additions":"reject"===n||"current"===n?"deletions":"both"}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"normalizeDiffResolution",{enumerable:!0,get:function(){return t}})},1399,[]);
301
- __d(function(g,r,i,a,m,_e,d){"use strict";const e=["file","fileDiff","actions","markerRows","lineAnnotations","preventEmit"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"UnresolvedFile",{enumerable:!0,get:function(){return D}}),Object.defineProperty(_e,"getUnresolvedDiffHunksRendererOptions",{enumerable:!0,get:function(){return O}});var n,t=r(d[0]),o=(n=t)&&n.__esModule?n:{default:n},l=r(d[1]),s=r(d[2]),c=r(d[3]),f=r(d[4]),u=r(d[5]),h=r(d[6]),p=r(d[7]),C=r(d[8]),v=r(d[9]),A=r(d[10]),k=r(d[11]),w=r(d[12]);let x=-1;var D=class extends p.FileDiff{__id="unresolved-file:"+ ++x;type="unresolved-file";computedCache={file:void 0,fileDiff:void 0,actions:void 0,markerRows:void 0};conflictActions=[];markerRows=[];conflictActionCache=new Map;constructor(e={theme:l.DEFAULT_THEMES},n,t=!1){super(void 0,n,t),this.options=e,this.setOptions(e)}setOptions(e){if(null!=e){if(null!=e.onMergeConflictAction&&null!=e.onMergeConflictResolve)throw new Error("UnresolvedFile: onMergeConflictAction and onMergeConflictResolve are mutually exclusive. Use only one callback.");this.options=e,this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions()}}syncInteractionOptions(){this.interactionManager.setOptions((0,s.pluckInteractionOptions)(this.options,"function"==typeof this.options.hunkSeparators||"line-info"===(this.options.hunkSeparators??"line-info")||"line-info-basic"===this.options.hunkSeparators?this.handleExpandHunk:void 0,this.getLineIndex,this.handleMergeConflictActionClick))}createHunksRenderer(e){return new A.UnresolvedFileHunksRenderer(this.getHunksRendererOptions(e),this.getAnnotationSlotName,this.handleHighlightRender,this.workerManager)}getHunksRendererOptions(e){return O(e,this.options)}applyPreNodeAttributes(e,n){super.applyPreNodeAttributes(e,n,{"data-has-merge-conflict":""})}cleanUp(){this.emitPostRender(!0),this.clearMergeConflictActionCache(),this.computedCache={file:void 0,fileDiff:void 0,actions:void 0,markerRows:void 0},this.conflictActions=[],super.cleanUp()}getOrComputeDiff({file:e,fileDiff:n,actions:t,markerRows:o}){const{maxContextLines:l,onMergeConflictAction:s}=this.options;e:{if(null!=s){const s=null!=n;if(s!==(null!=t)||s!==(null!=o))throw new Error("UnresolvedFile.getOrComputeDiff: fileDiff, actions, and markerRows must be passed together");if(null!=n&&null!=t&&null!=o){this.computedCache={file:e??this.computedCache.file,fileDiff:n,actions:t,markerRows:o};break e}if(null!=e||null!=this.computedCache.file){if(null!=e&&null!=this.computedCache.file&&!(0,u.areFilesEqual)(e,this.computedCache.file)&&null!=this.computedCache.fileDiff&&null!=this.computedCache.actions)throw new Error("UnresolvedFile.getOrComputeDiff: file can only be used to initialize unresolved state once. Pass fileDiff and actions for subsequent updates.");if(e??=this.computedCache.file,null==e)throw new Error("UnresolvedFile.getOrComputeDiff: file is null, should be impossible");if(!(0,u.areFilesEqual)(e,this.computedCache.file)||null==this.computedCache.fileDiff||null==this.computedCache.actions){const n=(0,v.parseMergeConflictDiffFromFile)(e,l);this.computedCache={file:e,fileDiff:n.fileDiff,actions:n.actions,markerRows:n.markerRows}}n=this.computedCache.fileDiff,t=this.computedCache.actions,o=this.computedCache.markerRows;break e}n=this.computedCache.fileDiff,t=this.computedCache.actions,o=this.computedCache.markerRows;break e}if(null!=n||null!=t||null!=o)throw new Error("UnresolvedFile.getOrComputeDiff: fileDiff, actions, and markerRows are only usable in controlled mode, you must pass in `onMergeConflictAction`");if(null!=e&&null!=this.computedCache.file&&!(0,u.areFilesEqual)(e,this.computedCache.file))throw new Error("UnresolvedFile.getOrComputeDiff: uncontrolled unresolved files parse the file only once. Later updates must come from the cached diff state.");if(this.computedCache.file??=e,null==this.computedCache.fileDiff&&null!=this.computedCache.file){const e=(0,v.parseMergeConflictDiffFromFile)(this.computedCache.file,l);this.computedCache.fileDiff=e.fileDiff,this.computedCache.actions=e.actions,this.computedCache.markerRows=e.markerRows}n=this.computedCache.fileDiff,t=this.computedCache.actions,o=this.computedCache.markerRows}if(null!=n&&null!=t&&null!=o)return{fileDiff:n,actions:t,markerRows:o}}hydrate(e){const{file:n,fileDiff:t,actions:o,markerRows:l,lineAnnotations:s,fileContainer:c,prerenderedHTML:f,preventEmit:u=!1}=e,h=this.getOrComputeDiff({file:n,fileDiff:t,actions:o,markerRows:l});null!=h&&(this.hydrateElements(c,f),this.setActiveMergeConflictState(h.actions,h.markerRows),F(this.pre,h.fileDiff,this.options.collapsed)||E(this.headerElement,h.fileDiff,this.options.disableFileHeader)?this.render(Object.assign({},e,{preventEmit:!0})):(this.hydrationSetup({fileDiff:h.fileDiff,lineAnnotations:s}),null!=this.pre&&this.renderMergeConflictActionSlots()),u||this.emitPostRender())}rerender(){this.enabled&&null!=this.fileDiff&&this.render({forceRender:!0,renderRange:this.renderRange})}render(n={}){const{file:t,fileDiff:l,actions:s,markerRows:c,lineAnnotations:f,preventEmit:u=!1}=n,h=(0,o.default)(n,e),p=this.getOrComputeDiff({file:t,fileDiff:l,actions:s,markerRows:c});if(null==p)return!1;this.setActiveMergeConflictState(p.actions,p.markerRows);const C=super.render(Object.assign({},h,{fileDiff:p.fileDiff,lineAnnotations:f,preventEmit:!0}));return C&&(this.renderMergeConflictActionSlots(),u||this.emitPostRender()),C}resolveConflict(e,n,t=this.computedCache.fileDiff){const o=this.conflictActions[e];if(null==t||null==o)return;if(o.conflictIndex!==e)throw console.error({conflictIndex:e,action:o}),new Error("UnresolvedFile.resolveConflict: conflictIndex and conflictAction don't match");const l=(0,w.resolveConflict)(t,o,n),s=this.computedCache.file,{file:c,actions:f,markerRows:u}=I({fileDiff:l,previousActions:this.conflictActions,resolvedConflictIndex:e,previousFile:s,resolution:n});return{file:c,fileDiff:l,actions:f,markerRows:u}}resolveConflictAndRender(e,n){const t=this.conflictActions[e];if(null==t)return;if(t.conflictIndex!==e)throw console.error({conflictIndex:e,action:t}),new Error("UnresolvedFile.resolveConflictAndRender: conflictIndex and conflictAction don't match");const o={resolution:n,conflict:t.conflict},{file:l,fileDiff:s,actions:c,markerRows:f}=this.resolveConflict(e,n)??{};null!=l&&null!=s&&null!=c&&null!=f&&(this.computedCache={file:l,fileDiff:s,actions:c,markerRows:f},this.setActiveMergeConflictState(c,f),null!=this.workerManager?this.hunksRenderer.renderDiff(s):this.render({forceRender:!0}),this.options.onMergeConflictResolve?.(l,o))}setActiveMergeConflictState(e=this.conflictActions,n=this.markerRows){this.conflictActions=e,this.markerRows=n,null!=this.computedCache.fileDiff&&this.hunksRenderer instanceof A.UnresolvedFileHunksRenderer&&this.hunksRenderer.setConflictState("none"===this.options.mergeConflictActionsType?[]:e,n,this.computedCache.fileDiff)}handleMergeConflictActionClick=e=>{const n=this.conflictActions[e.conflictIndex];if(null==n)return;if(n.conflictIndex!==e.conflictIndex)throw console.error({conflictIndex:e.conflictIndex,action:n}),new Error("UnresolvedFile.handleMergeConflictActionClick: conflictIndex and conflictAction don't match");const t={resolution:e.resolution,conflict:n.conflict};null==this.options.onMergeConflictAction?this.resolveConflictAndRender(e.conflictIndex,e.resolution):this.options.onMergeConflictAction(t,this)};renderMergeConflictActionSlots(){const{fileDiff:e}=this.computedCache;if(this.isContainerManaged||null==this.fileContainer||"function"!=typeof this.options.mergeConflictActionsType||0===this.conflictActions.length||null==e)return void this.clearMergeConflictActionCache();const n=new Map(this.conflictActionCache);for(let t=0;t<this.conflictActions.length;t++){const o=this.conflictActions[t];if(null==o)continue;if(o.conflictIndex!==t)throw console.error({conflictIndex:t,action:o}),new Error("UnresolvedFile.renderMergeConflictActionSlots: conflictIndex and conflictAction don't match");const l=(0,v.getMergeConflictActionAnchor)(o,e);if(null==l)continue;const s=o.conflictIndex,f=(0,C.getMergeConflictActionSlotName)({hunkIndex:l.hunkIndex,lineIndex:l.lineIndex,conflictIndex:s}),u=`${t}-${f}`;let h=this.conflictActionCache.get(u);if(null==h||!(0,k.areMergeConflictActionsEqual)(h.action,o)){h?.element.remove();const e=this.renderMergeConflictAction(o);if(null==e)continue;const n=(0,c.createAnnotationWrapperNode)(f);n.appendChild(e),this.fileContainer.appendChild(n),h={element:n,action:o},this.conflictActionCache.set(u,h)}n.delete(u)}for(const[e,{element:t}]of n.entries())this.conflictActionCache.delete(e),t.remove()}renderMergeConflictAction(e){if("function"!=typeof this.options.mergeConflictActionsType)return;const n=this.options.mergeConflictActionsType(e,this);if(null!=n){if(n instanceof HTMLElement)return n;if("undefined"!=typeof DocumentFragment&&n instanceof DocumentFragment){const e=document.createElement("div");return e.style.display="contents",e.appendChild(n),e}}}clearMergeConflictActionCache(){for(const{element:e}of this.conflictActionCache.values())e.remove();this.conflictActionCache.clear()}};function I({fileDiff:e,previousActions:n,resolvedConflictIndex:t,previousFile:o,resolution:l}){const s=n[t];if(null==s)throw new Error("rebuildFileAndActions: missing resolved action for unresolved file rebuild");const c=b(n,t,s,l),f=(0,v.buildMergeConflictMarkerRows)(e,c);return{file:R({fileDiff:e,resolvedAction:s,resolvedConflictIndex:t,previousFile:o,resolution:l}),actions:c,markerRows:f}}function R({resolvedAction:e,resolvedConflictIndex:n,previousFile:t,fileDiff:o,resolution:l}){const s=t?.contents??"",c=(0,h.splitFileContents)(s),{conflict:f}=e,u=M(c,f,l),p=[...c.slice(0,f.startLineIndex),...u,...c.slice(f.endLineIndex+1)].join("");return{name:t?.name??o.name,contents:p,cacheKey:null!=t?.cacheKey?`${t.cacheKey}:mc-${n}-${l}`:void 0}}function M(e,n,t){const o=e.slice(n.startLineIndex+1,n.baseMarkerLineIndex??n.separatorLineIndex),l=e.slice(n.separatorLineIndex+1,n.endLineIndex);return"current"===t?o:"incoming"===t?l:[...o,...l]}function b(e,n,t,o){const l=L(t.conflict,o);return e.map((e,o)=>{if(o!==n&&null!=e)return e.conflict.startLineIndex>t.conflict.endLineIndex?Object.assign({},e,{conflict:y(e.conflict,l)}):e})}function L(e,n){const t=(e.baseMarkerLineIndex??e.separatorLineIndex)-e.startLineIndex-1,o=e.endLineIndex-e.separatorLineIndex-1;return("current"===n?t:"incoming"===n?o:t+o)-(e.endLineIndex-e.startLineIndex+1)}function y(e,n){return Object.assign({},e,{startLineIndex:e.startLineIndex+n,startLineNumber:e.startLineNumber+n,separatorLineIndex:e.separatorLineIndex+n,separatorLineNumber:e.separatorLineNumber+n,endLineIndex:e.endLineIndex+n,endLineNumber:e.endLineNumber+n,baseMarkerLineIndex:null!=e.baseMarkerLineIndex?e.baseMarkerLineIndex+n:void 0,baseMarkerLineNumber:null!=e.baseMarkerLineNumber?e.baseMarkerLineNumber+n:void 0})}function F(e,n,t=!1){return!t&&null==e&&null!=n}function E(e,n,t=!1){return null==e&&null!=n&&!t}function O(e,n){const t=Object.assign({},n,e);return Object.assign({},t,{useTokenTransformer:(0,f.shouldUseTokenTransformer)(t),hunkSeparators:"function"==typeof e?.hunkSeparators?"custom":e?.hunkSeparators,mergeConflictActionsType:"function"==typeof e?.mergeConflictActionsType?"custom":e?.mergeConflictActionsType})}},1400,[25,1148,1262,1312,1327,1335,1340,1383,1401,1402,1403,1404,1398]);
302
- __d(function(g,r,i,a,m,e,d){"use strict";function n({hunkIndex:n,lineIndex:t,conflictIndex:c}){return`merge-conflict-action-${n}-${t}-${c}`}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getMergeConflictActionSlotName",{enumerable:!0,get:function(){return n}})},1401,[]);
303
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"buildMergeConflictMarkerRows",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"getMergeConflictActionAnchor",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"parseMergeConflictDiffFromFile",{enumerable:!0,get:function(){return o}});var n=r(d[0]);function t(n,t){const o=t.hunks[n.hunkIndex];if(null!=o)return{hunkIndex:n.hunkIndex,lineIndex:w(o,n.startContentIndex)}}function o(t,o=6){const s={deletionLines:[],additionLines:[],conflictStack:[],conflictBuilders:[],actions:[],hunks:[],nextConflictIndex:0,splitLineCount:0,unifiedLineCount:0,lastHunkEnd:0,activeHunk:void 0,maxContextLines:o=Math.max(o,1),maxContextLines2:2*o},u=t.contents,l=u.length;if(l>0){let n=0,t=0,o=u.indexOf("\n",n);for(;-1!==o;)c(s,u.slice(n,o+1),t),n=o+1,t++,o=u.indexOf("\n",n);n<l&&c(s,u.slice(n),t)}if(s.conflictStack.length>0)throw new Error("parseMergeConflictDiffFromFile: unfinished merge conflict marker stack");null!=s.activeHunk&&s.activeHunk.hunkContent.length>0&&(f(s,s.activeHunk,"trailing"),x(s));for(let n=0;n<s.conflictBuilders.length;n++){const t=s.conflictBuilders[n];if(null==t||!t.completed)throw new Error(`parseMergeConflictDiffFromFile: failed to build merge conflict action ${n}`)}if(s.hunks.length>0&&s.additionLines.length>0&&s.deletionLines.length>0){const t=s.hunks[s.hunks.length-1],o=Math.max(s.additionLines.length-(0,n.getHunkSideEndBoundary)(t.additionStart,t.additionCount),0);s.splitLineCount+=o,s.unifiedLineCount+=o}const C=s.deletionLines.join(""),h=s.additionLines.join(""),k=v(t,"current",C),L=v(t,"incoming",h);let I="change";""===h?I="deleted":""===C&&(I="new");const p={name:t.name,prevName:void 0,type:I,hunks:s.hunks,splitLineCount:s.splitLineCount,unifiedLineCount:s.unifiedLineCount,isPartial:!1,deletionLines:s.deletionLines,additionLines:s.additionLines,cacheKey:null!=t.cacheKey?`${t.cacheKey}:merge-conflict-diff`:void 0};return{fileDiff:p,currentFile:k,incomingFile:L,actions:s.actions,markerRows:S(p,s.actions)}}function c(n,t,o){const c=n.conflictStack[n.conflictStack.length-1];if(null==c)return t.length>=7&&60===t.charCodeAt(0)&&"start"===b(t)?void I(n,t,o):void h(n,t);const s=b(t);if("start"!==s){if("base"===s)return c.stage="base",c.baseMarkerLineIndex=o,void(c.markerLines.base=t);if("separator"===s)return c.stage="incoming",c.separatorLineIndex=o,void(c.markerLines.separator=t);if("end"===s){const c=n.conflictStack.pop();if(null==c)throw new Error("parseMergeConflictDiffFromFile: encountered end marker before start marker");return void L(n,c,o,t)}"current"===c.stage?k(n,"deletion",t,c.conflictIndex,"current"):"base"===c.stage?h(n,t,c.conflictIndex):k(n,"addition",t,c.conflictIndex,"incoming")}else I(n,t,o)}function s(n){return n.activeHunk??=p(n.additionLines.length+1,n.deletionLines.length+1),n.activeHunk}function u(n,t,o,c){const s=n.conflictBuilders[t];if(null==s)throw new Error(`parseMergeConflictDiffFromFile: failed to locate conflict action ${t}`);const u=s.action,l=n.hunks.length;if(u.hunkIndex<0)u.hunkIndex=l;else if(u.hunkIndex!==l)throw new Error(`parseMergeConflictDiffFromFile: conflict ${t} spans multiple hunks and cannot be anchored`);u.startContentIndex<0&&(u.startContentIndex=c),u.endContentIndex=c,u.endMarkerContentIndex=c,"current"!==o?"base"!==o?u.incomingContentIndex=c:u.baseContentIndex??=c:u.currentContentIndex??=c}function l(n,t,o,c){const s=n.hunkContent,u=s[s.length-1];return"change"===u?.type?("addition"===t?u.additions++:u.deletions++,s.length-1):(s.push({type:"change",additions:"addition"===t?1:0,deletions:"deletion"===t?1:0,additionLineIndex:o,deletionLineIndex:c}),s.length-1)}function f(n,t,o){let c=t.contextBufferCount,s=t.contextBufferAdditionStart,l=t.contextBufferDeletionStart;if("leading"===o&&c>n.maxContextLines){const o=c-n.maxContextLines;s+=o,l+=o,c=n.maxContextLines,t.additionStart+=o,t.deletionStart+=o,t.additionLineIndex+=o,t.deletionLineIndex+=o}if("trailing"===o&&c>n.maxContextLines&&(c=n.maxContextLines),0===c)return t.contextBufferCount=0,void(t.contextBufferBaseConflicts=void 0);const f=t.hunkContent,x=f[f.length-1];let C;"context"===x?.type?(x.lines+=c,C=f.length-1):(f.push({type:"context",lines:c,additionLineIndex:s,deletionLineIndex:l}),C=f.length-1),t.additionCount+=c,t.deletionCount+=c;const h=t.contextBufferBaseConflicts;if(null!=h){const o=s-t.contextBufferAdditionStart;for(const[t,s]of h)t>=o&&t<o+c&&u(n,s,"base",C)}t.contextBufferCount=0,t.contextBufferBaseConflicts=void 0}function x(t){if(null==t.activeHunk)return;const o=t.activeHunk;if(t.activeHunk=void 0,0===o.hunkContent.length)return;let c=0,s=0;for(const n of o.hunkContent)"context"===n.type?(c+=n.lines,s+=n.lines):(c+=Math.max(n.additions,n.deletions),s+=n.additions+n.deletions);const u=0===o.additionCount?o.additionStart-1:o.additionStart,l=0===o.deletionCount?o.deletionStart-1:o.deletionStart,f=Math.max((0,n.getHunkSideStartBoundary)(u,o.additionCount)-t.lastHunkEnd,0),x={collapsedBefore:f,additionStart:u,additionCount:o.additionCount,additionLines:o.additionLines,additionLineIndex:o.additionLineIndex,deletionStart:l,deletionCount:o.deletionCount,deletionLines:o.deletionLines,deletionLineIndex:o.deletionLineIndex,hunkContent:o.hunkContent,hunkContext:void 0,hunkSpecs:`@@ -${B(l,o.deletionCount)} +${B(u,o.additionCount)} @@\n`,splitLineStart:t.splitLineCount+f,splitLineCount:c,unifiedLineStart:t.unifiedLineCount+f,unifiedLineCount:s,noEOFCRAdditions:!1,noEOFCRDeletions:!1};t.hunks.push(x),t.splitLineCount+=f+c,t.unifiedLineCount+=f+s,t.lastHunkEnd=(0,n.getHunkSideEndBoundary)(u,o.additionCount)}function C(n){if(null==n.activeHunk)return;const t=n.activeHunk,o=t.contextBufferCount,c=o-n.maxContextLines2,s=t.contextBufferAdditionStart+o-n.maxContextLines,u=t.contextBufferDeletionStart+o-n.maxContextLines;let l;if(null!=t.contextBufferBaseConflicts){const c=o-n.maxContextLines;for(const[n,o]of t.contextBufferBaseConflicts)n>=c&&(l??=new Map,l.set(n-c,o))}f(n,t,"trailing");const C=t.additionCount,h=t.deletionCount;x(n),n.activeHunk=p(t.additionStart+C+c,t.deletionStart+h+c),n.activeHunk.contextBufferAdditionStart=s,n.activeHunk.contextBufferDeletionStart=u,n.activeHunk.contextBufferCount=n.maxContextLines,n.activeHunk.contextBufferBaseConflicts=l}function h(n,t,o=-1){const c=s(n);0===c.contextBufferCount&&(c.contextBufferAdditionStart=n.additionLines.length,c.contextBufferDeletionStart=n.deletionLines.length),n.additionLines.push(t),n.deletionLines.push(t),o>=0&&(c.contextBufferBaseConflicts??=new Map,c.contextBufferBaseConflicts.set(c.contextBufferCount,o)),c.contextBufferCount++}function k(n,t,o,c,x){let h=s(n);h.hunkContent.length>0&&h.contextBufferCount>n.maxContextLines2&&(C(n),h=n.activeHunk),f(n,h,0===h.hunkContent.length?"leading":"before-change");const k=n.additionLines.length,L=n.deletionLines.length;"addition"===t?n.additionLines.push(o):n.deletionLines.push(o);const I=l(h,t,k,L);"addition"===t?(h.additionCount++,h.additionLines++):(h.deletionCount++,h.deletionLines++),u(n,c,x,I)}function L(n,t,o,c){if(null==t.separatorLineIndex||null==t.markerLines.separator)throw new Error(`parseMergeConflictDiffFromFile: conflict ${t.conflictIndex} is missing a separator marker`);const s=n.conflictBuilders[t.conflictIndex];if(null==s)throw new Error(`parseMergeConflictDiffFromFile: failed to finalize conflict ${t.conflictIndex}`);const u=s.action;u.markerLines.separator=t.markerLines.separator,u.markerLines.end=c,null!=t.markerLines.base&&(u.markerLines.base=t.markerLines.base),u.conflict={conflictIndex:t.conflictIndex,startLineIndex:t.startLineIndex,startLineNumber:t.startLineIndex+1,separatorLineIndex:t.separatorLineIndex,separatorLineNumber:t.separatorLineIndex+1,endLineIndex:o,endLineNumber:o+1,baseMarkerLineIndex:t.baseMarkerLineIndex,baseMarkerLineNumber:null!=t.baseMarkerLineIndex?t.baseMarkerLineIndex+1:void 0};const l=u.currentContentIndex??u.incomingContentIndex;if(u.currentContentIndex??=l,u.incomingContentIndex??=l,u.startContentIndex<0&&null!=l&&(u.startContentIndex=l),u.endContentIndex<0&&null!=l&&(u.endContentIndex=l),u.endMarkerContentIndex<0&&null!=l&&(u.endMarkerContentIndex=l),u.hunkIndex<0||u.startContentIndex<0||u.endContentIndex<0||u.endMarkerContentIndex<0)throw new Error(`parseMergeConflictDiffFromFile: failed to anchor merge conflict ${t.conflictIndex}`);n.actions[u.conflictIndex]=u,s.completed=!0}function I(n,t,o){const c=n.nextConflictIndex;n.nextConflictIndex++,n.conflictStack.push({conflictIndex:c,stage:"current",startLineIndex:o,markerLines:{start:t}}),n.conflictBuilders[c]={completed:!1,action:{conflict:{conflictIndex:c,startLineIndex:o,startLineNumber:o+1,separatorLineIndex:o,separatorLineNumber:o+1,endLineIndex:o,endLineNumber:o+1,baseMarkerLineIndex:void 0,baseMarkerLineNumber:void 0},conflictIndex:c,hunkIndex:-1,startContentIndex:-1,endContentIndex:-1,endMarkerContentIndex:-1,markerLines:{start:t,separator:"",end:""}}}}function p(n,t){return{additionStart:n,deletionStart:t,additionCount:0,deletionCount:0,additionLines:0,deletionLines:0,additionLineIndex:Math.max(n-1,0),deletionLineIndex:Math.max(t-1,0),hunkContent:[],contextBufferAdditionStart:Math.max(n-1,0),contextBufferDeletionStart:Math.max(t-1,0),contextBufferCount:0,contextBufferBaseConflicts:void 0}}function B(n,t){return 1===t?`${n}`:`${n},${t}`}function b(n){if(n.length<7)return;const t=n.charCodeAt(0);if(60!==t&&62!==t&&61!==t&&124!==t)return;const o=M(n);if(o<7)return;let c=1;for(;c<o&&n.charCodeAt(c)===t;)c++;if(!(c<7)){if(61===t)return c===o?"separator":void 0;var s;if(c===o||(9===(s=n.charCodeAt(c))||10===s||11===s||12===s||13===s||32===s))return 60===t?"start":62===t?"end":"base"}}function M(n){let t=n.length;return t>0&&10===n.charCodeAt(t-1)&&t--,t>0&&13===n.charCodeAt(t-1)&&t--,t}function v(n,t,o){return Object.assign({},n,{contents:o,cacheKey:null!=n.cacheKey?`${n.cacheKey}:merge-conflict-${t}`:void 0})}function S(n,t){const o=[],c=new Array(n.hunks.length),s=(t,o)=>{const s=n.hunks[t];if(null==s)return 0;let u=c[t];if(null==u){u=new Array(s.hunkContent.length+1);let n=s.unifiedLineStart;u[0]=n;for(let t=0;t<s.hunkContent.length;t++){const o=s.hunkContent[t];n+="context"===o.type?o.lines:o.deletions+o.additions,u[t+1]=n}c[t]=u}return u[Math.max(o,0)]??s.unifiedLineStart},u=(n,t)=>{const o=s(n,t),u=c[n]?.[Math.max(t+1,0)]??s(n,t+1);return Math.max(o,u-1)};for(const c of t){if(null==c)continue;const t=n.hunks[c.hunkIndex];if(null==t)continue;const l=s(c.hunkIndex,c.startContentIndex);if(o.push(y(c,"marker-start",c.startContentIndex,c.markerLines.start,l)),null!=c.baseContentIndex){const n=c.currentContentIndex,l=c.incomingContentIndex;if(null==n||null==l)continue;const f=c.markerLines.base;if(null==f)continue;const x=t.hunkContent[n],C=t.hunkContent[c.baseContentIndex],h=t.hunkContent[l];if("change"!==x?.type||"context"!==C?.type||"change"!==h?.type)continue;const k=s(c.hunkIndex,n),L=s(c.hunkIndex,l);o.push(y(c,"marker-base",c.baseContentIndex,f,k+x.deletions)),o.push(y(c,"marker-separator",c.baseContentIndex,c.markerLines.separator,L),y(c,"marker-end",c.endMarkerContentIndex,c.markerLines.end,u(c.hunkIndex,c.endMarkerContentIndex)));continue}const f=c.currentContentIndex;if(null==f)continue;const x=t.hunkContent[f];if("change"!==x?.type)continue;const C=s(c.hunkIndex,f),h=x.deletions>0?C+x.deletions:l;o.push(y(c,"marker-separator",f,c.markerLines.separator,h),y(c,"marker-end",c.endMarkerContentIndex,c.markerLines.end,u(c.hunkIndex,c.endMarkerContentIndex)))}return o}function y(n,t,o,c,s){return{type:t,hunkIndex:n.hunkIndex,contentIndex:o,conflictIndex:n.conflictIndex,lineText:c,lineIndex:s}}function w(n,t){let o=n.unifiedLineStart;for(let c=0;c<t;c++){const t=n.hunkContent[c];o+="context"===t.type?t.lines:t.deletions+t.additions}return o}},1402,[1338]);
304
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"UnresolvedFileHunksRenderer",{enumerable:!0,get:function(){return l}});var t=r(d[0]),n=r(d[1]),c=r(d[2]),o=r(d[3]),s=r(d[4]),l=class extends c.DiffHunksRenderer{pendingConflictActions=[];pendingMarkerRows=[];injectedRows=new Map;constructor(n={theme:t.DEFAULT_THEMES},c,o,s){super(void 0,c,o,s),this.options=n}setConflictState(t,n,c){this.pendingConflictActions=t,this.pendingMarkerRows=n,this.syncInjectedRows(t,n,c)}syncInjectedRows(t,n,c){this.injectedRows.clear();for(const n of t){const t=null!=n?(0,s.getMergeConflictActionAnchor)(n,c):void 0;if(null==n||null==t)continue;const o={type:"actions",hunkIndex:t.hunkIndex,lineIndex:t.lineIndex,conflictIndex:n.conflictIndex};this.addInjectedRow(o)}for(const t of n)this.addInjectedRow(t)}addInjectedRow(t){const n=`${t.hunkIndex}:${t.lineIndex}`,c=this.injectedRows.get(n);null==c?this.injectedRows.set(n,[t]):c.push(t)}renderDiff(n,c=t.DEFAULT_RENDER_RANGE){return null!=n&&this.syncInjectedRows(this.pendingConflictActions,this.pendingMarkerRows,n),super.renderDiff(n,c)}async asyncRender(n,c=t.DEFAULT_RENDER_RANGE){return this.syncInjectedRows(this.pendingConflictActions,this.pendingMarkerRows,n),super.asyncRender(n,c)}createPreElement(t,n){return super.createPreElement(t,n,{"data-has-merge-conflict":""})}getUnifiedLineDecoration({type:t,lineType:n}){const c="change"===t?"change-deletion"===n?"current":"incoming":void 0;return{gutterLineType:"change"===t?"context":n,gutterProperties:u(c),contentProperties:f(t,c)}}getSplitLineDecoration({side:t,type:n}){const c="change"===n?"deletions"===t?"current":"incoming":void 0;return{gutterLineType:"change"===n?"context":n,gutterProperties:u(c),contentProperties:f(n,c)}}getUnifiedInjectedRowsForLine=t=>{const n=this.injectedRows.get(`${t.hunkIndex}:${t.lineIndex}`);if(null==n||0===n.length)return;const{mergeConflictActionsType:c}=this.getOptionsWithDefaults(),o=[],s=[];for(const t of n)"actions"!==t.type?("marker-end"===t.type?s:o).push({content:x(t),gutter:p("marker",t.type)}):o.push({content:h({row:t,includeDefaultActions:"default"===c,includeSlot:!0}),gutter:p("action")});return{before:o.length>0?o:void 0,after:s.length>0?s:void 0}};getOptionsWithDefaults(){const t=super.getOptionsWithDefaults();return t.diffStyle="unified",t.lineDiffType="none",t.mergeConflictActionsType=this.options.mergeConflictActionsType??"default",t}};function u(t){return null!=t?{"data-merge-conflict":t}:void 0}function f(t,n){if(null!=n)return"change"===t?"current"===n||"incoming"===n?{"data-line-type":"context","data-merge-conflict":n}:void 0:"marker-start"===n||"marker-base"===n||"marker-separator"===n||"marker-end"===n?{"data-merge-conflict":n}:void 0}function p(t,c){const o=(0,n.createGutterGap)(void 0,"annotation",1);return o.properties["data-gutter-buffer"]="action"===t?"merge-conflict-action":`merge-conflict-${c??"marker"}`,o}function h({row:t,includeDefaultActions:c,includeSlot:s}){const l=c?[I({resolution:"current",label:"Accept current change",conflictIndex:u=t.conflictIndex}),R(),I({resolution:"incoming",label:"Accept incoming change",conflictIndex:u}),R(),I({resolution:"both",label:"Accept both",conflictIndex:u})]:[];var u;return s&&l.push((0,n.createHastElement)({tagName:"slot",properties:{name:(0,o.getMergeConflictActionSlotName)({hunkIndex:t.hunkIndex,lineIndex:t.lineIndex,conflictIndex:t.conflictIndex}),"data-merge-conflict-action-slot":""}})),(0,n.createHastElement)({tagName:"div",properties:{"data-merge-conflict-actions":""},children:[(0,n.createHastElement)({tagName:"div",properties:{"data-merge-conflict-actions-content":""},children:l})]})}function x(t){return(0,n.createHastElement)({tagName:"div",properties:{"data-merge-conflict":t.type,"data-merge-conflict-marker-row":""},children:[(0,n.createTextNodeElement)(t.lineText.replace(/(?:\r\n|\n|\r)$/,""))]})}function I({resolution:t,label:c,conflictIndex:o}){return(0,n.createHastElement)({tagName:"button",properties:{type:"button","data-merge-conflict-action":t,"data-merge-conflict-conflict-index":`${o}`},children:[(0,n.createTextNodeElement)(c)]})}function R(){return(0,n.createHastElement)({tagName:"span",properties:{"data-merge-conflict-action-separator":""},children:[(0,n.createTextNodeElement)("|")]})}},1403,[1148,1260,1377,1401,1402]);
305
- __d(function(g,r,i,_a,m,e,d){"use strict";function n(n,o){return n.hunkIndex===o.hunkIndex&&n.startContentIndex===o.startContentIndex&&n.endContentIndex===o.endContentIndex&&n.currentContentIndex===o.currentContentIndex&&n.baseContentIndex===o.baseContentIndex&&n.incomingContentIndex===o.incomingContentIndex&&n.endMarkerContentIndex===o.endMarkerContentIndex&&n.conflictIndex===o.conflictIndex&&t(n.conflict,o.conflict)}function t(n,t){return n.conflictIndex===t.conflictIndex&&n.startLineIndex===t.startLineIndex&&n.startLineNumber===t.startLineNumber&&n.separatorLineIndex===t.separatorLineIndex&&n.separatorLineNumber===t.separatorLineNumber&&n.endLineIndex===t.endLineIndex&&n.endLineNumber===t.endLineNumber&&n.baseMarkerLineIndex===t.baseMarkerLineIndex&&n.baseMarkerLineNumber===t.baseMarkerLineNumber}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areMergeConflictActionsEqual",{enumerable:!0,get:function(){return n}})},1404,[]);
306
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){return null==t||null==n?t===n:t.top===n.top&&t.bottom===n.bottom}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areVirtualWindowSpecsEqual",{enumerable:!0,get:function(){return t}})},1405,[]);
307
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"Virtualizer",{enumerable:!0,get:function(){return u}});var t=r(d[0]),s=r(d[1]),n=r(d[2]);const o=[0,1e-6,.99999,1],l={overscrollSize:1e3,intersectionObserverMargin:4e3,resizeDebugging:!1};let h=0,c=-1;var u=class u{static __STOP=!1;static __lastScrollPosition=0;__id="virtualizer-"+ ++c;type="simple";scrollTop=0;height=0;scrollHeight=0;windowSpecs={top:0,bottom:0};observers=new Map;visibleInstances=new Map;visibleInstancesDirty=!1;instancesChanged=new Set;reconcileQueue=new Set;scrollDirty=!0;heightDirty=!0;scrollHeightDirty=!0;renderedObservers=0;connectQueue=new Map;constructor(t){this.config=Object.assign({},l,t)}setup(s,n){if(null==this.root){this.root=s,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:o,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),s instanceof Document?this.setupWindow():this.setupElement(n),window.__INSTANCE=this,window.__TOGGLE=()=>{u.__STOP?(u.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:u.__lastScrollPosition}),(0,t.queueRender)(this.computeRenderRangeAndEmit)):(u.__lastScrollPosition=this.getScrollTop(),u.__STOP=!0)};for(const[t,s]of this.connectQueue.entries())this.connect(t,s);this.connectQueue.clear(),this.markDOMDirty(),(0,t.queueRender)(this.computeRenderRangeAndEmit)}}instanceChanged(s,n){this.instancesChanged.add(s),n&&this.markDOMDirty(),(0,t.queueRender)(this.computeRenderRangeAndEmit)}requestHeightReconcile(s){this.reconcileQueue.add(s),(0,t.queueRender)(this.computeRenderRangeAndEmit)}getWindowSpecs(){return 0===this.windowSpecs.top&&0===this.windowSpecs.bottom&&(this.windowSpecs=(0,s.createWindowFromScrollPosition)({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(t,s){const n=this.getScrollTop(),o=this.getHeight(),l=this.config.intersectionObserverMargin;return!(t<n-l-s||t>n+o+l)}handleContainerResize=s=>{if(null==this.root)return;let n=!1;for(const t of s){const s=t.borderBoxSize[0].blockSize;this.root instanceof Document?s!==this.scrollHeight&&(this.scrollHeightDirty=!0,n=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:s-h,newSize:s}),h=s)):t.target===this.root?s!==this.height&&(this.heightDirty=!0,n=!0):t.target===this.contentContainer&&(this.scrollHeightDirty=!0,n=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:s-h,newSize:s}),h=s))}n&&(0,t.queueRender)(this.computeRenderRangeAndEmit)};setupWindow(){if(null==this.root||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(t){if(null==this.root||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),t??=this.root.firstElementChild??void 0,t instanceof HTMLElement&&(this.contentContainer=t,this.resizeObserver?.observe(t))}cleanUp(){(0,t.dequeueRender)(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(t){return this.getScrollTop()+f(t,this.getScrollContainerElement())}connect(s,n){if(this.observers.has(s))throw new Error("Virtualizer.connect: instance is already connected...");return null==this.intersectionObserver?this.connectQueue.set(s,n):(this.intersectionObserver.observe(s),this.observers.set(s,n),this.instancesChanged.add(n),this.markDOMDirty(),(0,t.queueRender)(this.computeRenderRangeAndEmit)),()=>this.disconnect(s)}disconnect(s){const n=this.observers.get(s);this.connectQueue.delete(s),null!=n&&(this.intersectionObserver?.unobserve(s),this.observers.delete(s),this.instancesChanged.delete(n),this.reconcileQueue.delete(n),this.visibleInstances.delete(s)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),(0,t.queueRender)(this.computeRenderRangeAndEmit))}handleWindowResize=()=>{u.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,(0,t.queueRender)(this.computeRenderRangeAndEmit))};handleWindowScroll=()=>{!u.__STOP&&null!=this.root&&this.root instanceof Document&&(this.scrollDirty=!0,(0,t.queueRender)(this.computeRenderRangeAndEmit))};handleElementScroll=()=>{u.__STOP||null==this.root||this.root instanceof Document||(this.scrollDirty=!0,(0,t.queueRender)(this.computeRenderRangeAndEmit))};computeRenderRangeAndEmit=()=>{if(u.__STOP)return;const o=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(0===this.instancesChanged.size){const t=(0,s.createWindowFromScrollPosition)({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!o&&(0,n.areVirtualWindowSpecsEqual)(this.windowSpecs,t)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&0===this.reconcileQueue.size)return;this.windowSpecs=t}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const h=this.getScrollAnchor(this.height),c=new Set;for(const t of o?this.observers.values():this.visibleInstances.values())t.onRender(o)&&c.add(t);for(const t of this.instancesChanged)c.has(t)||t.onRender(o)&&c.add(t);this.scrollFix(h);for(const t of c)this.reconcileQueue.delete(t),t.reconcileHeights();for(const t of this.reconcileQueue)t.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||o)&&(0,t.queueRender)(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()};scrollFix(t){if(null==t)return;const s=this.getScrollContainerElement(),{lineIndex:n,lineOffset:o,fileElement:l,fileOffset:h,fileTypeOffset:c}=t;if(null!=n&&null!=o){const t=l.shadowRoot?.querySelector(`[data-line][data-line-index="${n}"]`);if(t instanceof HTMLElement){const n=f(t,s);if(n!==o){const t=n-o;this.applyScrollFix(t)}return}}const u=f(l,s);if("top"===c)u!==h&&this.applyScrollFix(u-h);else{const t=u+l.getBoundingClientRect().height;t!==h&&this.applyScrollFix(t-h)}}applyScrollFix(t){null==this.root||this.root instanceof Document?window.scrollTo({top:window.scrollY+t,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+t,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(t){const s=this.getScrollContainerElement();let n;for(const[o]of this.visibleInstances.entries()){const l=f(o,s),h=l+o.offsetHeight;let c,u,p,v;if(h<=0?(c=h,u="bottom"):(c=l,u="top"),h>0&&l<t)for(const t of o.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(t instanceof HTMLElement))continue;const n=t.dataset.lineIndex;if(null==n)continue;const o=f(t,s);if(!(o<0)){p=n,v=o;break}}if(null!=n?.lineOffset&&null==v)continue;let b=!1;(null==n||null!=v&&(null==n.lineOffset||v<n.lineOffset)||null==v&&null==n.lineOffset&&(c>=0&&(n.fileOffset<0||c<n.fileOffset)||c<0&&n.fileOffset<0&&c>n.fileOffset))&&(b=!0),b&&(n={fileElement:o,fileTypeOffset:u,fileOffset:c,lineIndex:p,lineOffset:v})}return n}handleIntersectionChange=s=>{this.scrollDirty=!0;for(const{target:t,isIntersecting:n}of s){if(!(t instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const s=this.observers.get(t);null!=s&&(n&&!this.visibleInstances.has(t)?(s.setVisibility(!0),this.visibleInstances.set(t,s),this.visibleInstancesDirty=!0):!n&&this.visibleInstances.has(t)&&(s.setVisibility(!1),this.visibleInstances.delete(t),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&(0,t.queueRender)(this.computeRenderRangeAndEmit)};getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let t=(()=>null==this.root?0:this.root instanceof Document?window.scrollY:this.root.scrollTop)();return t=this.clampScrollTop(t),this.scrollTop=t,t}scrollTo({top:s,behavior:n="auto"}){const{root:o}=this;if(null==o)return;const l=this.clampScrollTop(s);o instanceof Document?window.scrollTo({top:l,behavior:n}):o.scrollTo({top:l,behavior:n}),this.scrollDirty=!0,(0,t.queueRender)(this.computeRenderRangeAndEmit)}clampScrollTop(t){return Math.max(0,Math.min(t,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=(()=>null==this.root?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight)(),this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=(()=>null==this.root?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height)(),this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return null==this.root||this.root instanceof Document?void 0:this.root}};function f(t,s){const n=t.getBoundingClientRect(),o=s?.getBoundingClientRect().top??0;return n.top-o}},1406,[1253,1258,1405]);
308
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getResolvedLanguages",{enumerable:!0,get:function(){return o}});var n=r(d[0]);function o(o){const t=[];for(const s of o){const o=n.ResolvedLanguages.get(s);if(null==o)throw new Error(`getResolvedLanguages: ${s} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(o)}return t}},1407,[1149]);
309
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"hasResolvedLanguages",{enumerable:!0,get:function(){return t}});var n=r(d[0]);function t(t){for(const u of Array.isArray(t)?t:[t])if(!n.ResolvedLanguages.has(u))return!1;return!0}},1408,[1149]);
310
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"registerCustomLanguage",{enumerable:!0,get:function(){return n}});var t=r(d[0]),s=r(d[1]);function n(n,o,u=[]){if("text"===n||"ansi"===n)throw new Error("registerCustomLanguage: 'text' and 'ansi' are reserved language names");if(t.RegisteredCustomLanguages.has(n))console.error(`registerCustomLanguage: lang: ${n} is already registered`);else{t.RegisteredCustomLanguages.set(n,o);for(const t of u)(0,s.setCustomExtension)(t,n)}}},1409,[1149,1286]);
311
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"resolveLanguages",{enumerable:!0,get:function(){return o}});var n=r(d[0]),t=r(d[1]);async function o(o){const s=[],u=[];for(const l of o){if("text"===l||"ansi"===l)continue;const o=(0,t.getResolvedOrResolveLanguage)(l)??(0,n.resolveLanguage)(l);"then"in o?u.push(o):s.push(o)}return u.length>0&&await Promise.all(u).then(n=>{for(const t of n){if(null==t)throw new Error("resolvedLanguages: unable to resolve language");s.push(t)}}),s}},1410,[1154,1231]);
312
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getResolvedThemes",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){return t.themeResolver.getResolvedThemes(n)}},1411,[1236]);
313
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"registerCustomTheme",{enumerable:!0,get:function(){return c}});var t=r(d[0]),o=r(d[1]),n=r(d[2]);function c(c,s){try{const n=(0,o.createTheme)({name:c,load:s});t.themeResolver.registerTheme(n.name,n.load)}catch(t){if(t instanceof n.DuplicateThemeError)return void console.error("SharedHighlight.registerCustomTheme: theme name already registered",c);throw t}}},1412,[1236,1246,1237]);
314
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"registerCustomCSSVariableTheme",{enumerable:!0,get:function(){return l}});var t=r(d[0]),o=r(d[1]),s=r(d[2]);function l(l,n,u=!1){const f=(0,s.createCssVariablesTheme)({name:l,variablePrefix:(0,t.formatCSSVariablePrefix)("global"),variableDefaults:n,fontStyle:u});(0,o.registerCustomTheme)(l,()=>Promise.resolve(f))}},1413,[1294,1412,1155]);
315
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"resolveThemes",{enumerable:!0,get:function(){return n}});var t=r(d[0]),o=r(d[1]);async function n(n){for(const t of n)(0,o.prepareThemeResolution)(t);const s=await t.themeResolver.resolveThemes(n);for(let t=0;t<n.length;t++)(0,o.validateResolvedThemeName)(n[t],s[t]);return s}},1414,[1236,1245]);
316
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n){return"side"in n}function t(t){return!n(t)}function o(t){const o=t[0];return null==o||n(o)}function u(n){const o=n[0];return null==o||t(o)}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"isDiffAnnotation",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"isDiffAnnotationCollection",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"isFileAnnotation",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"isFileAnnotationCollection",{enumerable:!0,get:function(){return u}})},1415,[]);
317
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t,s){return null==t||null==s?t===s:t.busyWorkers===s.busyWorkers&&t.diffCacheSize===s.diffCacheSize&&t.fileCacheSize===s.fileCacheSize&&t.managerState===s.managerState&&t.activeTasks===s.activeTasks&&t.queuedTasks===s.queuedTasks&&t.themeSubscribers===s.themeSubscribers&&t.totalWorkers===s.totalWorkers&&t.workersFailed===s.workersFailed}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"areWorkerStatsEqual",{enumerable:!0,get:function(){return t}})},1416,[]);
318
- __d(function(g,r,i,a,m,e,d){"use strict";function t(t){const n=document.createElement("div");n.dataset.line=`${t}`;const o=document.createElement("div");o.dataset.columnNumber="",o.textContent=`${t}`;const c=document.createElement("div");return c.dataset.columnContent="",n.appendChild(o),n.appendChild(c),{row:n,content:c}}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createRowNodes",{enumerable:!0,get:function(){return t}})},1417,[]);
319
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createStyleElement",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"createThemeStyleElement",{enumerable:!0,get:function(){return o}});var t=r(d[0]),n=r(d[1]),c=r(d[2]);function l(l,o=!1){return(0,n.createHastElement)({tagName:"style",children:[(0,n.createTextNodeElement)(o?(0,c.wrapCoreCSS)(l):(0,c.wrapUnsafeCSS)(l))],properties:{[t.CORE_CSS_ATTRIBUTE]:o?"":void 0,[t.UNSAFE_CSS_ATTRIBUTE]:o?void 0:""}})}function o(c){return(0,n.createHastElement)({tagName:"style",children:[(0,n.createTextNodeElement)(c)],properties:{[t.THEME_CSS_ATTRIBUTE]:""}})}},1418,[1148,1260,1315]);
320
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"diffAcceptRejectHunk",{enumerable:!0,get:function(){return o}});var n=r(d[0]),t=r(d[1]);function o(o,u,c){const f=o.hunks[u];if(null==f)throw console.error({hunkIndex:u,diff:o}),new Error("diffAcceptRejectHunk: Invalid hunk index");return(0,t.resolveRegion)(o,Object.assign({resolution:(0,n.normalizeDiffResolution)(c),hunkIndex:u},"object"==typeof c?{startContentIndex:c.changeIndex,endContentIndex:c.changeIndex}:{startContentIndex:0,endContentIndex:Math.max(0,(f.hunkContent.length??1)-1)}))}},1419,[1399,1397]);
321
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n){return n.includes("\r\n")?"CRLF":n.includes("\r")?"CR":n.includes("\n")?"LF":"none"}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getLineEndingType",{enumerable:!0,get:function(){return n}})},1420,[]);
322
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getSingularPatch",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){const o=(0,t.parsePatchFiles)(n);if(1!==o.length)throw console.error(o),new Error("PatchDiff: Provided patch must include only 1 patch, with 1 diff");const{files:c}=o[0];if(1!==c.length)throw console.error(c),new Error("FileDiff: Provided patch must contain exactly 1 file diff");return c[0]}},1421,[1343]);
323
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n){const t=n[0];if("+"!==t&&"-"!==t&&" "!==t&&"\\"!==t)return void console.error(`parseLineType: Invalid firstChar: "${t}", full line: "${n}"`);const o=n.substring(1);return{line:""===o?"\n":o,type:" "===t?"context":"\\"===t?"metadata":"+"===t?"addition":"deletion"}}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"parseLineType",{enumerable:!0,get:function(){return n}})},1422,[]);
324
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n,t){return Object.assign({},n,{lang:t})}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"setLanguageOverride",{enumerable:!0,get:function(){return n}})},1423,[]);
325
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"trimPatchContext",{enumerable:!0,get:function(){return o}});var t=r(d[0]),n=r(d[1]);function o(n,o=10){const u=[];let c;for(const h of n.split("\n")){const n=h.match(t.HUNK_HEADER);if(null!=n){null!=c&&(c.hunkLines.length>0&&(s(c,o,"trailing"),l(c,u)),c=void 0);const t=parseInt(n[3]),L=parseInt(n[1]),f=parseInt(n[4]??"1"),p=parseInt(n[2]??"1");isNaN(t)||isNaN(L)||isNaN(f)||isNaN(p)?u.push(h):c={additionStart:t,deletionStart:L,additionCount:0,deletionCount:0,hunkLines:[],contextLines:[]};continue}if(null!=c){if(h.startsWith(" "))c.contextLines.push(h);else if(""!==h){if(c.hunkLines.length>0&&c.contextLines.length>2*o){const t=c.contextLines.length-2*o,n=c.contextLines.slice(-o);s(c,o,"trailing");const{additionCount:h,deletionCount:L}=c;l(c,u),c={additionStart:c.additionStart+h+t,deletionStart:c.deletionStart+L+t,deletionCount:0,additionCount:0,contextLines:n,hunkLines:[]}}s(c,o,0===c.hunkLines.length?"leading":"before-change"),c.hunkLines.push(h),h.startsWith("+")?c.additionCount+=1:h.startsWith("-")&&(c.deletionCount+=1)}}else u.push(h)}null!=c&&c.hunkLines.length>0&&(s(c,o,"trailing"),l(c,u));const h=u.join("\n");return n.endsWith("\n")?`${h}\n`:h}function s(t,o,s){if("leading"===s&&t.contextLines.length>o){const n=t.contextLines.length-o;t.contextLines.splice(0,n),t.additionStart+=n,t.deletionStart+=n}return"trailing"===s&&t.contextLines.length>o&&(t.contextLines.length=o),t.contextLines.length>0&&((0,n.appendItems)(t.hunkLines,t.contextLines),t.additionCount+=t.contextLines.length,t.deletionCount+=t.contextLines.length,t.contextLines.length=0),t}function l(t,o){o.push(`@@ -${u(t.deletionStart,t.deletionCount)} +${u(t.additionStart,t.additionCount)} @@`),(0,n.appendItems)(o,t.hunkLines)}function u(t,n){return 1===n?`${t}`:`${t},${n}`}},1424,[1148,1302]);
326
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CodeView",{enumerable:!0,get:function(){return c.CodeView}}),Object.defineProperty(e,"EditContext",{enumerable:!0,get:function(){return n.EditContext}}),Object.defineProperty(e,"EditProvider",{enumerable:!0,get:function(){return n.EditProvider}}),Object.defineProperty(e,"File",{enumerable:!0,get:function(){return p.File}}),Object.defineProperty(e,"FileDiff",{enumerable:!0,get:function(){return s.FileDiff}}),Object.defineProperty(e,"GutterUtilitySlotStyles",{enumerable:!0,get:function(){return u.GutterUtilitySlotStyles}}),Object.defineProperty(e,"MergeConflictSlotStyles",{enumerable:!0,get:function(){return u.MergeConflictSlotStyles}}),Object.defineProperty(e,"MultiFileDiff",{enumerable:!0,get:function(){return O.MultiFileDiff}}),Object.defineProperty(e,"PatchDiff",{enumerable:!0,get:function(){return C.PatchDiff}}),Object.defineProperty(e,"UnresolvedFile",{enumerable:!0,get:function(){return F.UnresolvedFile}}),Object.defineProperty(e,"Virtualizer",{enumerable:!0,get:function(){return P.Virtualizer}}),Object.defineProperty(e,"VirtualizerContext",{enumerable:!0,get:function(){return P.VirtualizerContext}}),Object.defineProperty(e,"WorkerPoolContext",{enumerable:!0,get:function(){return f.WorkerPoolContext}}),Object.defineProperty(e,"WorkerPoolContextProvider",{enumerable:!0,get:function(){return f.WorkerPoolContextProvider}}),Object.defineProperty(e,"noopRender",{enumerable:!0,get:function(){return u.noopRender}}),Object.defineProperty(e,"renderDiffChildren",{enumerable:!0,get:function(){return o.renderDiffChildren}}),Object.defineProperty(e,"renderFileChildren",{enumerable:!0,get:function(){return l.renderFileChildren}}),Object.defineProperty(e,"templateRender",{enumerable:!0,get:function(){return b.templateRender}}),Object.defineProperty(e,"useCreateEditor",{enumerable:!0,get:function(){return n.useCreateEditor}}),Object.defineProperty(e,"useFileDiffInstance",{enumerable:!0,get:function(){return j.useFileDiffInstance}}),Object.defineProperty(e,"useFileInstance",{enumerable:!0,get:function(){return y.useFileInstance}}),Object.defineProperty(e,"useStableCallback",{enumerable:!0,get:function(){return t.useStableCallback}}),Object.defineProperty(e,"useVirtualizer",{enumerable:!0,get:function(){return P.useVirtualizer}}),Object.defineProperty(e,"useWorkerPool",{enumerable:!0,get:function(){return f.useWorkerPool}});var t=r(d[0]),n=r(d[1]),u=r(d[2]),o=r(d[3]),l=r(d[4]),f=r(d[5]),c=r(d[6]),b=r(d[7]),P=r(d[8]),y=r(d[9]),p=r(d[10]),j=r(d[11]),s=r(d[12]),O=r(d[13]),C=r(d[14]),F=r(d[15])},1425,[1426,1427,1428,1429,1430,1431,1435,1437,1438,1439,1440,1441,1442,1443,1444,1445]);
327
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"useStableCallback",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function n(n){const u=(0,t.useRef)(n);return(0,t.useInsertionEffect)(()=>{u.current=n}),(0,t.useCallback)((...t)=>u.current(...t),[])}},1426,[15]);
328
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"EditContext",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"EditProvider",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"useCreateEditor",{enumerable:!0,get:function(){return l}});var t=r(d[0]),n=r(d[1]),o=r(d[2]);const u=(0,n.createContext)(void 0);function c({children:n,createEditor:c}){const l=(0,t.useStableCallback)((t,n,o)=>c(t,n,o));return(0,o.jsx)(u.Provider,{value:l,children:n})}function l(){return(0,n.useContext)(u)}},1427,[1426,15,7]);
329
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"GutterUtilitySlotStyles",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"MergeConflictSlotStyles",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"noopRender",{enumerable:!0,get:function(){return o}});const t={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},n={display:"contents"};function o(){return null}},1428,[]);
330
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"renderDiffChildren",{enumerable:!0,get:function(){return c}});var n=r(d[0]),t=r(d[1]),l=r(d[2]),o=r(d[3]),s=r(d[4]),u=r(d[5]);function c({fileDiff:l,actions:o,renderCustomHeader:c,renderHeaderPrefix:x,renderHeaderFilenameSuffix:h,renderHeaderMetadata:j,renderAnnotation:v,renderGutterUtility:y,renderMergeConflictUtility:S,lineAnnotations:A,getHoveredLine:I,getInstance:C,getAnnotationSlotName:M=t.getLineAnnotationName}){const _=c?.(l),H=x?.(l),p=h?.(l),D=j?.(l);return(0,u.jsxs)(u.Fragment,{children:[null!=_?(0,u.jsx)("div",{slot:n.CUSTOM_HEADER_SLOT_ID,children:_}):(0,u.jsxs)(u.Fragment,{children:[null!=H&&(0,u.jsx)("div",{slot:"header-prefix",children:H}),null!=p&&(0,u.jsx)("div",{slot:"header-filename-suffix",children:p}),null!=D&&(0,u.jsx)("div",{slot:"header-metadata",children:D})]}),null!=v&&A?.map((n,t)=>(0,u.jsx)("div",{slot:M(n),children:v(n)},t)),null!=o&&null!=S&&null!=C&&o.map(n=>{if(null==n)return;const t=f(n,l);return(0,u.jsx)("div",{slot:t,style:s.MergeConflictSlotStyles,children:S(n,C)},t)}),null!=y&&(0,u.jsx)("div",{slot:"gutter-utility-slot",style:s.GutterUtilitySlotStyles,children:y(I)})]})}function f(n,t){const s=(0,o.getMergeConflictActionAnchor)(n,t);return null!=s?(0,l.getMergeConflictActionSlotName)({hunkIndex:s.hunkIndex,lineIndex:s.lineIndex,conflictIndex:n.conflictIndex}):void 0}},1429,[1148,1288,1401,1402,1428,7]);
331
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"renderFileChildren",{enumerable:!0,get:function(){return s}});var t=r(d[0]),n=r(d[1]),l=r(d[2]),o=r(d[3]);function s({file:s,renderCustomHeader:u,renderHeaderPrefix:c,renderHeaderFilenameSuffix:f,renderHeaderMetadata:h,renderAnnotation:x,lineAnnotations:j,renderGutterUtility:v,getHoveredLine:y,getAnnotationSlotName:_=n.getLineAnnotationName}){const H=u?.(s),S=c?.(s),A=f?.(s),p=h?.(s);return(0,o.jsxs)(o.Fragment,{children:[null!=H?(0,o.jsx)("div",{slot:t.CUSTOM_HEADER_SLOT_ID,children:H}):(0,o.jsxs)(o.Fragment,{children:[null!=S&&(0,o.jsx)("div",{slot:"header-prefix",children:S}),null!=A&&(0,o.jsx)("div",{slot:"header-filename-suffix",children:A}),null!=p&&(0,o.jsx)("div",{slot:"header-metadata",children:p})]}),null!=x&&j?.map((t,n)=>(0,o.jsx)("div",{slot:_(t),children:x(t)},n)),null!=v&&(0,o.jsx)("div",{slot:"gutter-utility-slot",style:l.GutterUtilitySlotStyles,children:v(y)})]})}},1430,[1148,1288,1428,7]);
332
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"WorkerPoolContext",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"WorkerPoolContextProvider",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"useWorkerPool",{enumerable:!0,get:function(){return f}});var t=r(d[0]),n=r(d[1]),o=r(d[2]);const u=(0,n.createContext)(void 0);let l=0;function c({children:c,poolOptions:f,highlighterOptions:s}){const[p]=(0,n.useState)(()=>{if("undefined"!=typeof window)return(0,t.getOrCreateWorkerPoolSingleton)({poolOptions:f,highlighterOptions:s})});return(0,n.useInsertionEffect)(()=>{if(null!=p)return l++,()=>{l--}},[p]),(0,n.useEffect)(()=>()=>{0===l&&(0,t.terminateWorkerPoolSingleton)()},[]),(0,o.jsx)(u.Provider,{value:p,children:c})}function f(){return(0,n.useContext)(u)}},1431,[1432,15,7]);
333
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getOrCreateWorkerPoolSingleton",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"terminateWorkerPoolSingleton",{enumerable:!0,get:function(){return l}});var t=r(d[0]);let n;function o({poolOptions:o,highlighterOptions:l}){return n??=new t.WorkerPoolManager(o,l),n}function l(){null!=n&&(n.terminate(),n=void 0)}},1432,[1433]);
334
- __d(function(g,r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"WorkerPoolManager",{enumerable:!0,get:function(){return F}});var e,t=r(d[0]),i=r(d[1]),s=r(d[2]),n=r(d[3]),o=r(d[4]),h=r(d[5]),l=r(d[6]),c=r(d[7]),u=r(d[8]),f=r(d[9]),k=r(d[10]),p=r(d[11]),y=r(d[12]),T=r(d[13]),q=r(d[14]),v=r(d[15]),C=r(d[16]),R=r(d[17]),w=r(d[18]),I=r(d[19]),b=r(d[20]),S=r(d[21]),E=r(d[22]),O=(e=E)&&e.__esModule?e:{default:e};const B=Symbol("IGNORE_RESPONSE");var F=class{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;lifecycleGeneration=0;constructor(e,{langs:i,theme:s=t.DEFAULT_THEMES,useTokenTransformer:n=!1,lineDiffType:o="word-alt",maxLineDiffLength:h=1e3,tokenizeMaxLineLength:l=1e3,preferredHighlighter:c="shiki-js"}){this.options=e,this.preferredHighlighter=c,this.renderOptions={theme:s,useTokenTransformer:n,lineDiffType:o,maxLineDiffLength:h,tokenizeMaxLineLength:l},this.fileCache=new O.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new O.default.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(i)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return null!=e.cacheKey?this.fileCache.get(e.cacheKey):void 0}getDiffResultCache(e){return null!=e.cacheKey?this.diffCache.get(e.cacheKey):void 0}inspectCaches(){const{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return void 0!==this.fileCache.delete(e)}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return void 0!==this.diffCache.delete(e)}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??t.DEFAULT_THEMES,useTokenTransformer:i=this.renderOptions.useTokenTransformer??!1,lineDiffType:c=this.renderOptions.lineDiffType??"word-alt",maxLineDiffLength:u=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:f=this.renderOptions.tokenizeMaxLineLength??1e3}){const{lifecycleGeneration:k}=this,y=++this.renderOptionsRequestVersion,T=()=>this.isCurrentLifecycle(k)&&this.renderOptionsRequestVersion===y;try{const t={theme:e,useTokenTransformer:i,lineDiffType:c,maxLineDiffLength:u,tokenizeMaxLineLength:f};if(this.isInitialized()||await this.initialize(),!T()||(0,q.areDiffRenderOptionsEqual)(t,this.renderOptions))return;const k=(0,s.getThemes)(e);let p=[];if((0,h.areThemesEqual)(t.theme,this.renderOptions.theme)||(p=(0,l.hasResolvedThemes)(k)?(0,b.getResolvedThemes)(k):await(0,S.resolveThemes)(k)),!T())return;if(null!=this.highlighter)(0,n.attachResolvedThemes)(p,this.highlighter);else{const e=await(0,o.getSharedHighlighter)({themes:k,langs:["text"],preferredHighlighter:this.preferredHighlighter});if(!T())return;this.highlighter=e}const y=this.setRenderOptionsOnWorkers(t,p);this.renderOptions=t,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(const e of this.themeSubscribers)e.onThemeChange();await y}catch(e){if(e instanceof p.WorkerPoolTerminatedError||!T())return;throw e}}getPreferredHighlighter(){return this.preferredHighlighter}getFileRenderOptions(){const{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:i}=this.renderOptions;return{theme:t,useTokenTransformer:i,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return Object.assign({},this.renderOptions)}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();const i=[];for(const s of this.workers){if(!s.initialized)throw console.log({managedWorker:s}),new Error("setRenderOptionsOnWorkers: Somehow we have an uninitialized worker");i.push(new Promise((i,n)=>{const o=this.generateRequestId(),h={type:"set-render-options",id:o,request:{type:"set-render-options",id:o,renderOptions:e,resolvedThemes:t},resolve:i,reject:n,requestStart:Date.now()};this.activeTaskById.set(o,h),s.pendingSetupRequestId=o,s.worker.postMessage(h.request)}))}await Promise.all(i)}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(){null==this._queuedBroadcast&&(this._queuedBroadcast=requestAnimationFrame(this._broadcastStateChanges))}_broadcastStateChanges=()=>{null!=this._queuedBroadcast&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);const e=this.getStats();for(const t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);const t=this.activeRequestByInstance.get(e);if(null!=t){const i=this.activeTaskById.get(t);z(i)?(this.detachInstanceFromRenderTask(i,e),i.primeCache||0!==i.instances.size||this.removeActiveTask(i)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return!0===this.initialized}async initialize(e=[]){if(!0!==this.initialized){if(!1===this.initialized){const{lifecycleGeneration:t}=this,i=new Promise((i,n)=>{(async()=>{try{const n=(0,s.getThemes)(this.renderOptions.theme);let h=[];if(h=(0,l.hasResolvedThemes)(n)?(0,b.getResolvedThemes)(n):await(0,S.resolveThemes)(n),!this.isCurrentLifecycle(t))return void i();let c=[];if(c=(0,w.hasResolvedLanguages)(e)?(0,R.getResolvedLanguages)(e):await(0,I.resolveLanguages)(e),!this.isCurrentLifecycle(t))return void i();const[u]=await Promise.all([(0,o.getSharedHighlighter)({themes:n,langs:["text",...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(h,c)]);if(!this.isCurrentLifecycle(t))return this.terminateWorkers(),void i();this.highlighter=u,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),i()}catch(e){if(e instanceof p.WorkerPoolTerminatedError||!this.isCurrentLifecycle(t))return void i();this.initialized=!1,this.workersFailed=!0,this.cancelActiveWorkerTasks(),this.terminateWorkers(),this.activeTaskById.clear();for(const t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,H(e));this.queueBroadcastStateChanges(),n(e)}})()});return this.initialized=i,this.queueBroadcastStateChanges(),i}return this.initialized}}async initializeWorkers(e,t){this.workersFailed=!1;const i=[],s=(0,u.getCustomExtensionsVersion)(),n=s>0?(0,u.getCustomExtensionsMap)():void 0;this.workers.length>0&&this.terminateWorkers();for(let o=0;o<(this.options.poolSize??8);o++){const o=this.options.workerFactory(),h={worker:o,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set(["text",...t.map(({name:e})=>e)]),customExtensionsVersion:0};o.addEventListener("message",e=>{this.handleWorkerMessage(h,e.data)}),o.addEventListener("error",e=>this.handleWorkerError(h,e)),this.workers.push(h),i.push(new Promise((i,o)=>{const l=this.generateRequestId(),c={type:"initialize",id:l,request:{type:"initialize",id:l,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:null!=n?s:void 0,customExtensionMap:n},resolve(){h.initialized=!0,i()},reject:o,requestStart:Date.now()};h.pendingSetupRequestId=l,this.activeTaskById.set(l,c),this.executeTask(h,c)}))}const o=this.options.workerInitializationTimeout??1e4;let h;try{await Promise.race([Promise.all(i),new Promise((e,t)=>{h=setTimeout(()=>{t(new Error(`WorkerPoolManager: worker initialization timed out after ${o}ms`))},o)})])}finally{null!=h&&clearTimeout(h)}}handleWorkerError(e,t){const{onWorkerError:i}=this.options;if(null!=i)try{i(t,e.worker)}catch(e){console.error("WorkerPoolManager: onWorkerError threw:",e)}else console.error("Worker error:",t,e);const{pendingSetupRequestId:s}=e;if(null==s)return;const n=this.activeTaskById.get(s);if("initialize"!==n?.type)return;const o=L(t);null!=i&&(0,p.markWorkerErrorReported)(o),n.reject(o),this.cleanWorkerAndTask(e,n)}drainQueue=()=>{if(this._queuedDrain=void 0,!0===this.initialized&&0!==this.queuedTasks.length){for(let e=0;e<this.queuedTasks.length;){const t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}const i=W(t),s=this.getAvailableWorker(i);if(null==s)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,s),this.resolveLanguagesAndExecuteTask(s,t,i)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){const i=this.getFileResultCache(t);(0,f.isFilePlainText)(t)||null!=i&&(0,c.areFileRenderOptionsEqual)(i.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:"file",file:t})}primeFileHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(new Error("WorkerPoolManager.primeFileHighlightCache: worker pool is not working"));const t=this.getOrCreateFileHighlightCacheTask(e);return null!=t?this.createRenderTaskCallbacks(t):Promise.resolve()}getOrCreateFileHighlightCacheTask(e){if(null==e.cacheKey)return void console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);const t=this.getFileResultCache(e),i=this.getFileHighlightKey(e);if(null==i||(0,f.isFilePlainText)(e)||null!=t&&(0,c.areFileRenderOptionsEqual)(t.options,this.getFileRenderOptions()))return;const s=this.getTaskByHighlightKey(i);if(null!=s)return s.primeCache=!0,"file"===s.type?s:void 0;{const t=this.submitCacheTask({type:"file",file:e},i);return"file"===t.type?t:void 0}}getPlainFileAST(e,t,i,s){if(null!=this.highlighter)return(0,k.renderFileWithHighlighter)(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:i,lines:s});this.queueInitialization()}highlightDiffAST(e,t){const i=this.getDiffResultCache(t);(0,v.isDiffPlainText)(t)||null!=i&&(0,q.areDiffRenderOptionsEqual)(i.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:"diff",diff:t})}primeDiffHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(new Error("WorkerPoolManager.primeDiffHighlightCache: worker pool is not working"));const t=this.getOrCreateDiffHighlightCacheTask(e);return null!=t?this.createRenderTaskCallbacks(t):Promise.resolve()}getOrCreateDiffHighlightCacheTask(e){if(null==e.cacheKey)return void console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);const t=this.getDiffResultCache(e),i=this.getDiffHighlightKey(e);if(null==i||(0,v.isDiffPlainText)(e)||null!=t&&(0,q.areDiffRenderOptionsEqual)(t.options,this.getDiffRenderOptions()))return;const s=this.getTaskByHighlightKey(i);if(null!=s)return s.primeCache=!0,"diff"===s.type?s:void 0;{const t=this.submitCacheTask({type:"diff",diff:e},i);return"diff"===t.type?t:void 0}}getPlainDiffAST(e,t,i,s,n){return null!=this.highlighter?(0,C.renderDiffWithHighlighter)(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:i,expandedHunks:s,collapsedContextThreshold:n}):void 0}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers();const e=new p.WorkerPoolTerminatedError;for(const 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=>{(0,p.isHandledWorkerPoolError)(e)||console.error(e)})}cancelActiveWorkerTasks(){const e=new p.WorkerPoolTerminatedError;for(const t of this.activeTaskById.values())"reject"in t?t.reject(e):z(t)&&this.rejectRenderTaskCallbacks(t,e)}terminateWorkers(){for(const e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:(()=>!1===this.initialized?"waiting":!0!==this.initialized?"initializing":"initialized")(),totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>null!=e.requestId||null!=e.pendingSetupRequestId).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){!1===this.initialized&&this.queueInitialization();const i=this.getHighlightKeyForRequest(t),s=null!=i?this.getTaskByHighlightKey(i):void 0;if(null!=s)return this.detachInstanceFromQueuedTasks(e,s),this.addInstanceToTask(s,e),void this.queueBroadcastStateChanges();this.detachInstanceFromQueuedTasks(e);const n=this.generateRequestId(),o=Date.now(),{renderOptionsVersion:h}=this,l=(()=>{switch(t.type){case"file":return{type:"file",id:n,request:Object.assign({},t,{id:n}),instances:new Set([e]),primeCache:!1,highlightKey:i,callbacks:new Set,renderOptionsVersion:h,requestStart:o};case"diff":return{type:"diff",id:n,request:Object.assign({},t,{id:n}),instances:new Set([e]),primeCache:!1,highlightKey:i,callbacks:new Set,renderOptionsVersion:h,requestStart:o}}})();this.enqueueRenderTask(l,e)}submitCacheTask(e,t){!1===this.initialized&&this.queueInitialization();const i=this.generateRequestId(),s=Date.now(),{renderOptionsVersion:n}=this,o=(()=>{switch(e.type){case"file":return{type:"file",id:i,request:Object.assign({},e,{id:i}),instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:n,requestStart:s};case"diff":return{type:"diff",id:i,request:Object.assign({},e,{id:i}),instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:n,requestStart:s}}})();return this.enqueueRenderTask(o),o}enqueueRenderTask(e,t){this.queuedTasks.push(e),null!=t&&this.queuedTaskByInstance.set(t,e),null!=e.highlightKey&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{const h=n.filter(e=>!(0,i.areLanguagesAttached)(e));h.length>0&&(0,o.getSharedHighlighter)({themes:(0,s.getThemes)(this.renderOptions.theme),langs:["text",...h],preferredHighlighter:this.preferredHighlighter}).catch(e=>{console.error(e)});const l=n.filter(t=>!e.langs.has(t));if(l.length>0&&((0,w.hasResolvedLanguages)(l)?t.request.resolvedLanguages=(0,R.getResolvedLanguages)(l):t.request.resolvedLanguages=await(0,I.resolveLanguages)(l)),!this.activeTaskById.has(t.id))return void(e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()));this.executeTask(e,t)}catch(i){this.rejectRenderTaskCallbacks(t,H(i)),this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){const i=this.activeTaskById.get(t.id);try{if(null==i)throw B;if("error"===t.type){const e=new Error(t.error);if(t.stack&&(e.stack=t.stack),"reject"in i)i.reject(e);else{if(!z(i))throw new Error("handleWorkerMessage: unknown task type");this.notifyHighlightError(i,e),this.rejectRenderTaskCallbacks(i,e)}throw e}if(z(i))for(const{name:t}of i.request.resolvedLanguages??[])e.langs.add(t);switch(t.requestType){case"initialize":if("initialize"!==i.type)throw new Error("handleWorkerMessage: task/response dont match");this.syncCustomExtensionVersion(e,i.request),i.resolve();break;case"set-render-options":if("set-render-options"!==i.type)throw new Error("handleWorkerMessage: task/response dont match");i.resolve();break;case"file":{if("file"!==i.type)throw new Error("handleWorkerMessage: task/response dont match");const{result:s,options:n}=t;if(!this.isCurrentRenderTask(i)||!(0,c.areFileRenderOptionsEqual)(n,this.getFileRenderOptions()))throw B;const{request:o}=i;this.syncCustomExtensionVersion(e,o),null!=i.cacheKeyAtDispatch&&this.fileCache.set(i.cacheKeyAtDispatch,{result:s,options:n}),this.resolveRenderTaskCallbacks(i),this.notifyFileInstances(i,s,n);break}case"diff":{if("diff"!==i.type)throw new Error("handleWorkerMessage: task/response dont match");const{result:s,options:n}=t;if(!this.isCurrentRenderTask(i)||!(0,q.areDiffRenderOptionsEqual)(n,this.getDiffRenderOptions()))throw B;const{request:o}=i;this.syncCustomExtensionVersion(e,o),null!=i.cacheKeyAtDispatch&&this.diffCache.set(i.cacheKeyAtDispatch,{result:s,options:n}),this.resolveRenderTaskCallbacks(i),this.notifyDiffInstances(i,s,n);break}}}catch(e){e!==B&&console.error(e,i,t)}this.cleanWorkerAndTask(e,i,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}queueDrain(){null==this._queuedDrain&&(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,z(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,i=t?.id){e.requestId===i&&(e.requestId=void 0),e.pendingSetupRequestId===i&&(e.pendingSetupRequestId=void 0),null!=t&&(z(t)&&(this.rejectRenderTaskCallbacks(t,new p.WorkerPoolTaskCanceledError),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){var i;("initialize"===(i=t.request).type||"file"===i.type||"diff"===i.type)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);try{"file"===t.type?t.cacheKeyAtDispatch=t.request.file.cacheKey:"diff"===t.type&&(t.cacheKeyAtDispatch=t.request.diff.cacheKey),e.worker.postMessage(t.request)}catch(i){console.error("Failed to post message to worker:",i),z(t)?(this.notifyHighlightError(t,i),this.rejectRenderTaskCallbacks(t,H(i))):"reject"in t&&t.reject(i),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(null!=t.customExtensionsVersion)return;const i=(0,u.getCustomExtensionsVersion)();e.customExtensionsVersion>=i||(t.customExtensionsVersion=i,t.customExtensionMap=(0,u.getCustomExtensionsMap)())}syncCustomExtensionVersion(e,t){null!=t.customExtensionsVersion&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(const i of this.workers){if(null!=i.requestId||null!=i.pendingSetupRequestId||!i.initialized)continue;if(t=i,0===e.length)break;let s=!0;for(const t of e)if(!i.langs.has(t)){s=!1;break}if(s)break}return t}getFileHighlightKey(e){if(null!=e.cacheKey)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(null!=e.cacheKey)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(const t of D(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){const i=this.queuedTaskByInstance.get(e);null!=i&&i!==t&&(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(i,e),i.primeCache||0!==i.instances.size||this.removeQueuedTask(i))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){const t=this.queuedTasks.indexOf(e);-1!==t&&this.queuedTasks.splice(t,1),this.rejectRenderTaskCallbacks(e,new p.WorkerPoolTaskCanceledError),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new p.WorkerPoolTaskCanceledError),this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}createRenderTaskCallbacks(e){return new Promise((t,i)=>{e.callbacks.add({resolve:t,reject:i})})}resolveRenderTaskCallbacks(e){for(const t of e.callbacks)t.resolve();e.callbacks.clear()}rejectRenderTaskCallbacks(e,t){for(const i of e.callbacks)i.reject(t);e.callbacks.clear()}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){const t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(const e of Array.from(this.activeTaskById.values()))z(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(const t of D(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){null!=e.highlightKey&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(const t of D(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(const t of D(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,i){for(const s of e.instances)this.activeRequestByInstance.get(s)===e.id&&s.onHighlightSuccess(e.request.file,t,i)}notifyDiffInstances(e,t,i){for(const s of e.instances)this.activeRequestByInstance.get(s)===e.id&&s.onHighlightSuccess(e.request.diff,t,i)}notifyHighlightError(e,t){for(const i of D(e))this.activeRequestByInstance.get(i)===e.id&&i.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(const i of this.iterateRenderTasks())if("file"===i.type&&this.isCurrentRenderTask(i)&&i.instances.has(e)&&(0,T.areFilesEqual)(t,i.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(const i of this.iterateRenderTasks())if("diff"===i.type&&this.isCurrentRenderTask(i)&&i.instances.has(e)&&(0,y.areDiffTargetsEqual)(i.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){const t=this.taskByHighlightKey.get(e);return null!=t&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(const e of this.queuedTasks)yield e;for(const e of this.activeTaskById.values())z(e)&&(yield e)}generateRequestId(){return"req_"+ ++this.nextRequestId}};function W(e){const t=new Set;if("initialize"===e.type||"set-render-options"===e.type)return[];switch(e.type){case"file":t.add(e.request.file.lang??(0,u.getFiletypeFromFileName)(e.request.file.name));break;case"diff":t.add(e.request.diff.lang??(0,u.getFiletypeFromFileName)(e.request.diff.name)),t.add(e.request.diff.lang??(0,u.getFiletypeFromFileName)(e.request.diff.prevName??"-"))}return t.delete("text"),Array.from(t)}function z(e){return"file"===e?.type||"diff"===e?.type}function D(e){return e.instances}function H(e){if(e instanceof Error)return e;if(null!=e&&"object"==typeof e){if("error"in e&&e.error instanceof Error)return e.error;if("message"in e&&"string"==typeof e.message)return new Error(e.message)}return new Error(String(e))}function L(e){const t="error"in e?e.error:void 0,i="message"in e&&"string"==typeof e.message&&""!==e.message?e.message:t instanceof Error?t.message:"the worker script failed to load (the error event carries no message)";return new p.WorkerPoolWorkerError(`WorkerPoolManager: worker failed: ${i}`,t instanceof Error?{cause:t}:void 0)}},1433,[1148,1150,1232,1235,1252,1255,1279,1280,1286,1308,1300,1330,1334,1335,1367,1380,1374,1407,1408,1410,1411,1414,1434]);
335
- __d(function(_g,r,_i,_a,_m,_e,_d){var t,e;t=this,e=function(t){const e=Symbol("newer"),s=Symbol("older");class i{constructor(t,e){"number"!=typeof t&&(e=t,t=0),this.size=0,this.limit=t,this.oldest=this.newest=void 0,this._keymap=new Map,e&&(this.assign(e),t<1&&(this.limit=this.size))}_markEntryAsUsed(t){t!==this.newest&&(t[e]&&(t===this.oldest&&(this.oldest=t[e]),t[e][s]=t[s]),t[s]&&(t[s][e]=t[e]),t[e]=void 0,t[s]=this.newest,this.newest&&(this.newest[e]=t),this.newest=t)}assign(t){let i,n=this.limit||Number.MAX_VALUE;this._keymap.clear();let h=t[Symbol.iterator]();for(let t=h.next();!t.done;t=h.next()){let h=new o(t.value[0],t.value[1]);if(this._keymap.set(h.key,h),i?(i[e]=h,h[s]=i):this.oldest=h,i=h,0==n--)throw new Error("overflow")}this.newest=i,this.size=this._keymap.size}get(t){var e=this._keymap.get(t);return e?(this._markEntryAsUsed(e),e.value):void 0}set(t,i){var n=this._keymap.get(t);return n?(n.value=i,this._markEntryAsUsed(n),this):(this._keymap.set(t,n=new o(t,i)),this.newest?(this.newest[e]=n,n[s]=this.newest):this.oldest=n,this.newest=n,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var t=this.oldest;if(t)return this.oldest[e]?(this.oldest=this.oldest[e],this.oldest[s]=void 0):(this.oldest=void 0,this.newest=void 0),t[e]=t[s]=void 0,this._keymap.delete(t.key),--this.size,[t.key,t.value]}find(t){let e=this._keymap.get(t);return e?e.value:void 0}has(t){return this._keymap.has(t)}delete(t){var i=this._keymap.get(t);return i?(this._keymap.delete(i.key),i[e]&&i[s]?(i[s][e]=i[e],i[e][s]=i[s]):i[e]?(i[e][s]=void 0,this.oldest=i[e]):i[s]?(i[s][e]=void 0,this.newest=i[s]):this.oldest=this.newest=void 0,this.size--,i.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new h(this.oldest)}values(){return new l(this.oldest)}entries(){return this}[Symbol.iterator](){return new n(this.oldest)}forEach(t,s){"object"!=typeof s&&(s=this);let i=this.oldest;for(;i;)t.call(s,i.value,i.key,this),i=i[e]}toJSON(){for(var t=new Array(this.size),s=0,i=this.oldest;i;)t[s++]={key:i.key,value:i.value},i=i[e];return t}toString(){for(var t="",s=this.oldest;s;)t+=String(s.key)+":"+s.value,(s=s[e])&&(t+=" < ");return t}}function o(t,i){this.key=t,this.value=i,this[e]=void 0,this[s]=void 0}function n(t){this.entry=t}function h(t){this.entry=t}function l(t){this.entry=t}t.LRUMap=i,n.prototype[Symbol.iterator]=function(){return this},n.prototype.next=function(){let t=this.entry;return t?(this.entry=t[e],{done:!1,value:[t.key,t.value]}):{done:!0,value:void 0}},h.prototype[Symbol.iterator]=function(){return this},h.prototype.next=function(){let t=this.entry;return t?(this.entry=t[e],{done:!1,value:t.key}):{done:!0,value:void 0}},l.prototype[Symbol.iterator]=function(){return this},l.prototype.next=function(){let t=this.entry;return t?(this.entry=t[e],{done:!1,value:t.value}):{done:!0,value:void 0}}},"object"==typeof _e&&void 0!==_m?e(_e):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).lru_map=t.lru_map||{})},1434,[]);
336
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CodeView",{enumerable:!0,get:function(){return I}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]),u=r(d[5]),c=r(d[6]),f=r(d[7]),C=r(d[8]),h=r(d[9]),S=r(d[10]),v=r(d[11]);const w="undefined"==typeof window?h.useEffect:h.useLayoutEffect;function p(t){return{instance:void 0,items:void 0,controlled:t,managedOptions:void 0,disableFlushSync:!1,slotCoordinator:void 0}}function H(t,c){const{className:f,containerRef:H,disableWorkerPool:I=!1,editorOptions:L,getEditStateKey:A,initialItems:M,items:P,onItemEditChange:k,onItemEditComplete:G,onScroll:O,onSelectedLinesChange:R,options:U,renderAnnotation:j,renderCodeViewFooter:N,renderCodeViewHeader:K,renderCustomHeader:T,renderGutterUtility:$,renderHeaderFilenameSuffix:_,renderHeaderMetadata:D,renderHeaderPrefix:q,selectedLines:W,style:z}=t,B=void 0!==P,J=(0,s.useCreateEditor)(),Q=(0,h.useContext)(C.WorkerPoolContext),X=(0,h.useRef)(p(B)),Y=null!=T,Z=null!=j,ee=null!=$,te=Y||null!=q||null!=_||null!=D,ne=te||Z||ee,re=null!=K,oe=null!=N,ie=(0,l.useStableCallback)(t=>{R?.(t)}),le=void 0!==W,de=(0,l.useStableCallback)((t,n,o)=>{if(null==J)throw new Error("CodeView: EditContext is not attached");const l=Object.assign({},L,n);return J(t,l,o)}),ae=(0,l.useStableCallback)((t,n)=>{k?.(t,n)}),se=(0,l.useStableCallback)((t,n,o)=>G?.(t,n,o)??"reject"),ue=(0,h.useMemo)(()=>x({options:U,hasCustomHeader:Y,hasGutterRenderer:ee,hasCodeViewHeader:re,hasCodeViewFooter:oe,onSelectedLinesChange:null!=R?ie:void 0,controlledSelection:le,getEditStateKey:A,createEditor:null!=J?de:void 0,onItemEditChange:null!=k?ae:void 0,onItemEditComplete:null!=G?se:void 0}),[J,le,de,ae,se,ie,oe,re,Y,ee,A,k,G,R,U]),[ce]=(0,h.useState)(()=>V()),[,me]=(0,h.useState)({}),fe=(0,l.useStableCallback)(t=>{null==X.current.instance||null!=t&&t===X.current.instance.getContainerElement()||(X.current.instance.cleanUp(),ce.publish(void 0),X.current=p(B)),null!=t&&t!==X.current.instance?.getContainerElement()&&(X.current.instance=new o.CodeView(ue,I?void 0:Q,!0),X.current.instance.setup(t)),(0,u.assignRef)(H,t)}),Ce=(0,l.useStableCallback)(t=>{X.current.disableFlushSync?ce.publish(t):(0,S.flushSync)(()=>{ce.publish(t)})}),he=(0,h.useMemo)(()=>te||Z||ee||re||oe?{hasHeaderRenderers:te,hasAnnotationRenderer:Z,hasGutterRenderer:ee,onSnapshotChange:Ce}:void 0,[Ce,Z,ee,te,re,oe]);return w(()=>null!=O?X.current.instance?.subscribeToScroll(O):void 0),w(()=>{const{instance:t,controlled:o,items:l,managedOptions:s,slotCoordinator:u}=X.current;if(null!=t)try{X.current.disableFlushSync=!0;let c=!1;if((0,n.areOptionsEqual)(ue,s)||(X.current.managedOptions=ue,t.setOptions(ue),c=!0),o!==B)return void console.error("CodeView: cannot switch between controlled and uncontrolled modes. Remount with a new key instead.");if(B)P!==l&&(y(l,P)?X.current.items=P:b(l,P)?(X.current.items=P,t.addItems(P.slice(l.length))):(X.current.items=P,t.setItems(P),c=!0));else if(null==l){const n=M??[];X.current.items=n,n.length>0&&(t.setItems(n),c=!0)}void 0!==W&&t.setSelectedLines(W,{notify:!1});const f=t.setSlotCoordinator(he);let C=!1;he!==u&&(null!=he&&null!=u||(C=!0),X.current.slotCoordinator=he),(c||f)&&t.render(!0),f&&null==he&&ce.publish(void 0),C&&me({})}finally{X.current.disableFlushSync=!1}}),(0,h.useImperativeHandle)(c,()=>({addItems(t){const{controlled:n,instance:o}=X.current;E(n,"addItems"),null==o?console.error("CodeView.addItems: no valid instance to append items with",t):o.addItems(t)},getItem(t){const{instance:n}=X.current;return null==n?void console.error("CodeView.getItem: no valid instance exists",t):n.getItem(t)},removeItem(t){const{controlled:n,instance:o}=X.current;return E(n,"removeItem"),null==o?(console.error("CodeView.removeItem: no valid instance to remove item from",t),!1):o.removeItem(t)},updateItem(t){const{controlled:n,instance:o}=X.current;return E(n,"updateItem"),null==o?(console.error("CodeView.updateItem: no valid instance to update item with",t),!1):o.updateItem(t)},updateItemId(t,n){const{controlled:o,instance:l}=X.current;return E(o,"updateItemId"),null==l?(console.error("CodeView.updateItemId: no valid instance to update item id with",t,n),!1):l.updateItemId(t,n)},scrollTo(t){const{instance:n}=X.current;null==n?console.error("CodeView.scrollTo: no valid instance to scroll with",t):n.scrollTo(t)},setSelectedLines(t){const{instance:n}=X.current;null==n?console.error("CodeView.setSelectedLines: no valid instance to update selection with",t):(n.setSelectedLines(t,{notify:!1}),ie(t))},getSelectedLines(){const{instance:t}=X.current;return null==t?(console.error("CodeView.getSelectedLines: no valid instance exists"),null):t.getSelectedLines()},clearSelectedLines(){const{instance:t}=X.current;null==t?console.error("CodeView.clearSelectedLines: no valid instance to update selection with"):(t.clearSelectedLines({notify:!1}),ie(null))},getEditor(t){const{instance:n}=X.current;if(null!=n)return n.getEditor(t);console.error("CodeView.getEditor: no valid instance exists",t)},getInstance:()=>X.current.instance}),[ie]),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{ref:fe,className:f,style:z}),(ne||re||oe)&&(0,v.jsx)(F,{managedContentStore:ce,renderCustomHeader:T,renderHeaderPrefix:q,renderHeaderFilenameSuffix:_,renderHeaderMetadata:D,renderAnnotation:j,renderGutterUtility:$,renderCodeViewHeader:K,renderCodeViewFooter:N})]})}const I=(0,h.forwardRef)(H);function b(t,n){if(null==t||n.length<=t.length)return!1;if(0===t.length)return!0;for(let o=0;o<t.length;o++)if(n[o]!==t[o])return!1;return!0}function y(t,n){if(null==t||t.length!==n.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!==n[o])return!1;return!0}function E(t,n){if(t)throw new Error(`CodeView.${n} cannot be used when CodeView is controlled. Use initialItems for imperative item updates.`)}function V(){let n;const o=new Set;return{getSnapshot:()=>n,publish(l){if(!(0,t.areManagedSnapshotsEqual)(n,l)){n=l;for(const t of o)t()}},subscribe:t=>(o.add(t),()=>{o.delete(t)})}}function x({options:t,hasCustomHeader:n,hasGutterRenderer:o,hasCodeViewHeader:l,hasCodeViewFooter:s,onSelectedLinesChange:u,controlledSelection:c,getEditStateKey:f,createEditor:C,onItemEditChange:h,onItemEditComplete:S}){const v=Object.assign({},t,{controlledSelection:c,onSelectedLinesChange:u,createEditor:C});return null!=f&&(v.getEditStateKey=f),null!=h&&(v.onItemEditChange=h),null!=S&&(v.onItemEditComplete=S),n&&(v.renderCustomHeader=A),o&&(v.renderGutterUtility=A),l&&(v.renderCodeViewHeader=A),s&&(v.renderCodeViewFooter=A),v}const F=(0,h.memo)(function({managedContentStore:t,renderCustomHeader:n,renderHeaderPrefix:o,renderHeaderFilenameSuffix:s,renderHeaderMetadata:u,renderAnnotation:c,renderGutterUtility:f,renderCodeViewHeader:C,renderCodeViewFooter:w}){const p=(0,l.useStableCallback)(n=>t.subscribe(n)),H=(0,l.useStableCallback)(()=>t.getSnapshot()),I=(0,h.useSyncExternalStore)(p,H,H);let b="";for(const t of I?.items??[])b+=`${t.id}:${t.version}:${t.type}`;const y=(0,h.useMemo)(()=>I?.items?.map(t=>(0,S.createPortal)(L({renderedItem:t,renderCustomHeader:n,renderHeaderPrefix:o,renderHeaderFilenameSuffix:s,renderHeaderMetadata:u,renderAnnotation:c,renderGutterUtility:f}),t.element,t.id)),[n,o,s,u,c,f,b]),E=(0,h.useMemo)(()=>null!=C&&null!=I?.header?(0,S.createPortal)(C(),I.header):null,[C,I?.header]),V=(0,h.useMemo)(()=>null!=w&&null!=I?.footer?(0,S.createPortal)(w(),I.footer):null,[w,I?.footer]);return(0,v.jsxs)(v.Fragment,{children:[y,E,V]})});function L({renderedItem:t,renderCustomHeader:n,renderHeaderPrefix:o,renderHeaderFilenameSuffix:l,renderHeaderMetadata:s,renderAnnotation:u,renderGutterUtility:C}){if("diff"===t.type){const{item:f,instance:h}=t;return(0,c.renderDiffChildren)({fileDiff:f.fileDiff,renderCustomHeader:null!=n?()=>n(f):void 0,renderHeaderPrefix:null!=o?()=>o(f):void 0,renderHeaderFilenameSuffix:null!=l?()=>l(f):void 0,renderHeaderMetadata:null!=s?()=>s(f):void 0,renderAnnotation:null!=u?t=>u(t,f):void 0,lineAnnotations:f.annotations,renderGutterUtility:null!=C?t=>C(t,f):void 0,getHoveredLine:h.getHoveredLine,getAnnotationSlotName:h.getAnnotationSlotName})}{const{item:c,instance:h}=t;return(0,f.renderFileChildren)({file:c.file,renderCustomHeader:null!=n?()=>n(c):void 0,renderHeaderPrefix:null!=o?()=>o(c):void 0,renderHeaderFilenameSuffix:null!=l?()=>l(c):void 0,renderHeaderMetadata:null!=s?()=>s(c):void 0,renderAnnotation:null!=u?t=>u(t,c):void 0,lineAnnotations:c.annotations,renderGutterUtility:null!=C?t=>C(t,c):void 0,getHoveredLine:h.getHoveredLine,getAnnotationSlotName:h.getAnnotationSlotName})}}function A(){}},1435,[1390,1256,1389,1426,1427,1436,1429,1430,1431,15,143,7]);
337
- __d(function(g,r,i,a,m,e,d){"use strict";function n(n,t){"function"==typeof n?n(t):null!=n&&(n.current=t)}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"assignRef",{enumerable:!0,get:function(){return n}})},1436,[]);
338
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"templateRender",{enumerable:!0,get:function(){return t}});var n=r(d[0]);function t(t,o){return"undefined"==typeof window&&null!=o?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:o}}),t]}):(0,n.jsx)(n.Fragment,{children:t})}},1437,[7]);
339
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"Virtualizer",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"VirtualizerContext",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"useVirtualizer",{enumerable:!0,get:function(){return o}});var t=r(d[0]),n=r(d[1]),u=r(d[2]);const l=(0,n.createContext)(void 0);function c({children:c,config:o,className:s,style:f,contentClassName:y,contentStyle:b}){const[v]=(0,n.useState)(()=>"undefined"!=typeof window?new t.Virtualizer(o):void 0),j=(0,n.useCallback)(t=>{null!=t?v?.setup(t):v?.cleanUp()},[v]);return(0,u.jsx)(l.Provider,{value:v,children:(0,u.jsx)("div",{className:s,style:f,ref:j,children:(0,u.jsx)("div",{className:y,style:b,children:c})})})}function o(){return(0,n.useContext)(l)}},1438,[1406,15,7]);
340
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"useFileInstance",{enumerable:!0,get:function(){return b}});var n=r(d[0]),t=r(d[1]),l=r(d[2]),o=r(d[3]),u=r(d[4]),s=r(d[5]),c=r(d[6]),f=r(d[7]),C=r(d[8]),h=r(d[9]),p=r(d[10]);const E="undefined"==typeof window?p.useEffect:p.useLayoutEffect;function b({file:t,options:f,editorOptions:b,editStateKey:S,lineAnnotations:v,selectedLines:H,prerenderedHTML:R,metrics:F,hasGutterRenderUtility:L,hasCustomHeader:U,disableWorkerPool:k,edit:G,onEditChange:O,onEditComplete:x}){const j=(0,h.useVirtualizer)(),P=void 0!==H,_=(0,p.useContext)(C.WorkerPoolContext),M=(0,c.useCreateEditor)(),N=(0,s.useStableCallback)(n=>O?.(n)),T=null!=O?N:void 0,q=(0,p.useRef)(null),z=(0,s.useStableCallback)(n=>{const t=x?.(n)??"reject";return"accept"===t&&(q.current={file:{installed:n.file,stale:n.originalFile},annotations:{installed:n.lineAnnotations,stale:n.originalLineAnnotations}}),t}),V=null!=x?z:void 0,W=(0,p.useRef)(null),I=(0,p.useRef)(null),K=(0,s.useStableCallback)(()=>{if(null==M)throw new Error("File: EditContext is not attached");return M("file",b??{},S)}),B=(0,s.useStableCallback)(n=>{if(null!=n){if(null!=W.current)throw new Error("File: An instance should not already exist when a node is created");W.current=null!=j?new u.VirtualizedFile(w({controlledSelection:P,hasCustomHeader:U,hasGutterRenderUtility:L,onEditChange:T,onEditComplete:V,options:f}),j,F,k?void 0:_,!0):new o.File(w({controlledSelection:P,hasCustomHeader:U,hasGutterRenderUtility:L,onEditChange:T,onEditComplete:V,options:f}),k?void 0:_,!0),G&&null==I.current&&(I.current=A(W.current,K)),W.current.hydrate({file:t,fileContainer:n,lineAnnotations:v,prerenderedHTML:R})}else{if(null==W.current)throw new Error("File: A File instance should exist when unmounting");W.current.cleanUp(),W.current=null,I.current=null}});return E(()=>{const{current:l}=W;if(null==l)return;const o=w({controlledSelection:P,hasCustomHeader:U,hasGutterRenderUtility:L,onEditChange:T,onEditComplete:V,options:f}),u=void 0!==o&&!(0,n.areOptionsEqual)(l.options,o);if(l.setOptions(o),!G&&null!=I.current){const{current:n}=I;I.current=null,n()}const s=y(t,v,q);l.render({file:s.file,lineAnnotations:s.lineAnnotations,forceRender:u}),void 0!==H&&l.setSelectedLines(H),G&&null==I.current&&(I.current=A(l,K))}),{ref:B,getHoveredLine:(0,p.useCallback)(()=>W.current?.getHoveredLine(),[]),getAnnotationSlotName:(0,p.useCallback)(n=>W.current?.getAnnotationSlotName(n)??(0,l.getLineAnnotationName)(n),[])}}function y(n,l,o){const{current:u}=o;if(null==u)return{file:n,lineAnnotations:l};const{file:s,annotations:c}=u;let f=n;null!=s&&((0,t.areFileTargetsEqual)(n,s.stale)?f=s.installed:u.file=null);let C=l;return null!=c&&(l===c.stale?C=c.installed:u.annotations=null),null==u.file&&null==u.annotations&&(o.current=null),{file:f,lineAnnotations:C}}function w({options:n,controlledSelection:t,hasCustomHeader:l,hasGutterRenderUtility:o,onEditChange:u,onEditComplete:s}){return t||o||l||null!=u||null!=s?Object.assign({},n,{controlledSelection:t,renderCustomHeader:l?f.noopRender:n?.renderCustomHeader,renderGutterUtility:o?f.noopRender:n?.renderGutterUtility,onEditChange:u,onEditComplete:s}):n}function A(n,t){const l=t();try{return l.edit(n)}catch(n){throw l.cleanUp(),n}}},1439,[1256,1304,1288,1322,1332,1426,1427,1428,1431,1438,15]);
341
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"File",{enumerable:!0,get:function(){return u}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]);function u({file:u,lineAnnotations:f,selectedLines:c,options:H,editorOptions:p,editStateKey:y,metrics:A,className:C,style:F,renderAnnotation:S,renderCustomHeader:h,renderHeaderPrefix:L,renderHeaderFilenameSuffix:M,renderHeaderMetadata:P,prerenderedHTML:_,renderGutterUtility:b,disableWorkerPool:x=!1,edit:E=!1,onEditChange:N,onEditComplete:v}){const{ref:G,getHoveredLine:O,getAnnotationSlotName:j}=(0,l.useFileInstance)({file:u,options:H,editorOptions:p,editStateKey:y,metrics:A,lineAnnotations:f,selectedLines:c,prerenderedHTML:_,hasGutterRenderUtility:null!=b,hasCustomHeader:null!=h,disableWorkerPool:x,edit:E,onEditChange:N,onEditComplete:v}),T=(0,n.renderFileChildren)({file:u,renderAnnotation:S,renderCustomHeader:h,renderHeaderPrefix:L,renderHeaderFilenameSuffix:M,renderHeaderMetadata:P,renderGutterUtility:b,lineAnnotations:f,getHoveredLine:O,getAnnotationSlotName:j});return(0,s.jsx)(t.DIFFS_TAG_NAME,{ref:G,className:C,style:F,children:(0,o.templateRender)(T,_)})}},1440,[1148,1430,1437,1439,7]);
342
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"useFileDiffInstance",{enumerable:!0,get:function(){return w}});var n=r(d[0]),t=r(d[1]),l=r(d[2]),o=r(d[3]),u=r(d[4]),f=r(d[5]),s=r(d[6]),c=r(d[7]),p=r(d[8]),h=r(d[9]),C=r(d[10]),D=r(d[11]),E=r(d[12]);const F="undefined"==typeof window?E.useEffect:E.useLayoutEffect;function w({fileDiff:t,oldFile:o,newFile:u,options:h,editorOptions:w,editStateKey:b,lineAnnotations:R,selectedLines:H,prerenderedHTML:_,metrics:L,hasGutterRenderUtility:O,hasCustomHeader:U,disableWorkerPool:k,edit:P,onEditChange:G,onEditComplete:x}){const T=(0,D.useVirtualizer)(),j=void 0!==H,q=(0,E.useContext)(C.WorkerPoolContext),M=(0,p.useCreateEditor)(),[I,N]=(0,E.useState)(),z=(0,c.useStableCallback)(n=>G?.(n)),V=null!=G?z:void 0,W=(0,E.useRef)(null),K=(0,c.useStableCallback)(n=>{const l=x?.(n)??"reject";return"accept"===l&&(W.current={fileDiff:{installed:n.fileDiff,stale:n.originalFileDiff},filePair:null==t?{fileDiff:n.fileDiff,installed:{oldFile:n.oldFile,newFile:n.newFile},stale:{oldFile:o??null,newFile:u??null}}:null,annotations:{installed:n.lineAnnotations,stale:n.originalLineAnnotations}}),l}),B=null!=x?K:void 0,J=v({acceptedCache:W,fileDiff:t,newFile:u,oldFile:o,parseDiffOptions:h?.parseDiffOptions}),Q=(0,E.useRef)(null),X=(0,E.useRef)(null),Y=(0,E.useRef)(null),Z=(0,c.useStableCallback)(()=>{if(null==M)throw new Error("FileDiff: EditContext is not attached");return M("file-diff",w??{},b)}),$=(0,c.useStableCallback)(n=>{if(null!=n){if(null!=Q.current)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");Q.current=null!=T?new s.VirtualizedFileDiff(A({controlledSelection:j,hasCustomHeader:U,hasGutterRenderUtility:O,onEditChange:V,onEditComplete:B,options:h}),T,L,k?void 0:q,!0):new f.FileDiff(A({controlledSelection:j,hasCustomHeader:U,hasGutterRenderUtility:O,onEditChange:V,onEditComplete:B,options:h}),k?void 0:q,!0),Q.current.hydrate({fileDiff:J,fileContainer:n,lineAnnotations:R,prerenderedHTML:_})}else{if(null==Q.current)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");Y.current=null,Q.current.cleanUp(),Q.current=null,X.current=null}});F(()=>{const{current:t}=Q;if(null==t)return;const l=A({controlledSelection:j,hasCustomHeader:U,hasGutterRenderUtility:O,onEditChange:V,onEditComplete:B,options:h}),o=void 0!==l&&!(0,n.areOptionsEqual)(t.options,l);if(t.setOptions(l),!P&&(Y.current=null,null!=X.current)){const{current:n}=X;X.current=null,n()}const u=y(J,R,W);if(t.render({forceRender:o,fileDiff:u.fileDiff,lineAnnotations:u.lineAnnotations}),void 0!==H&&t.setSelectedLines(H),!P||null!=X.current)return;if(null==M)throw new Error("FileDiff: EditContext is not attached");const f=()=>{Q.current===t&&null==X.current&&t.__canAttachEditor()&&(X.current=S(t,Z))};if(t.__canAttachEditor())return Y.current=null,void f();const s=t.__prepareForEditing();if(null==s)return void(Y.current=null);if(Y.current?.promise===s)return;const c={promise:s};Y.current=c,s.then(()=>{Y.current===c&&(f(),Y.current=null)}).catch(n=>{Y.current===c&&(Y.current=null,N(n))})});const ee=(0,E.useCallback)(()=>Q.current?.getHoveredLine(),[]),ne=(0,E.useCallback)(n=>Q.current?.getAnnotationSlotName(n)??(0,l.getLineAnnotationName)(n),[]);if(null!=I)throw I;return{fileDiff:J,ref:$,getHoveredLine:ee,getAnnotationSlotName:ne}}function v({acceptedCache:n,fileDiff:t,newFile:l,oldFile:o,parseDiffOptions:f}){return(0,E.useMemo)(()=>{if(null!=t)return t;const{current:s}=n,c=s?.filePair;if(null!=s&&null!=c){if(b(o,l,c.stale)||b(o,l,c.installed))return c.fileDiff;s.filePair=null}return(0,u.parseDiffFromFile)(o??null,l??null,f)},[n,t,o,l,f])}function b(n,l,o){return(0,t.areFileTargetsEqual)(n??void 0,o.oldFile??void 0)&&(0,t.areFileTargetsEqual)(l??void 0,o.newFile??void 0)}function y(n,t,l){const{current:u}=l;if(null==u)return{fileDiff:n,lineAnnotations:t};const{fileDiff:f,annotations:s}=u;let c=n;null!=f&&((0,o.areDiffTargetsEqual)(n,f.stale)?c=f.installed:u.fileDiff=null);let p=t;return null!=s&&(t===s.stale?p=s.installed:u.annotations=null),null==u.fileDiff&&null==u.annotations&&null==u.filePair&&(l.current=null),{fileDiff:c,lineAnnotations:p}}function A({options:n,controlledSelection:t,hasCustomHeader:l,hasGutterRenderUtility:o,onEditChange:u,onEditComplete:f}){return t||o||l||null!=u||null!=f?Object.assign({},n,{controlledSelection:t,renderCustomHeader:l?h.noopRender:n?.renderCustomHeader,renderGutterUtility:o?h.noopRender:n?.renderGutterUtility,onEditChange:u,onEditComplete:f}):n}function S(n,t){const l=t();try{return l.edit(n)}catch(n){throw l.cleanUp(),n}}},1441,[1256,1304,1288,1334,1346,1383,1387,1426,1427,1428,1431,1438,15]);
343
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"FileDiff",{enumerable:!0,get:function(){return f}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]);function f({fileDiff:f,options:u,editorOptions:c,editStateKey:H,metrics:p,lineAnnotations:y,selectedLines:A,className:C,style:D,prerenderedHTML:S,renderAnnotation:h,renderCustomHeader:F,renderHeaderPrefix:L,renderHeaderFilenameSuffix:M,renderHeaderMetadata:P,renderGutterUtility:_,disableWorkerPool:b=!1,edit:x=!1,onEditChange:E,onEditComplete:N}){const{ref:v,getHoveredLine:G,getAnnotationSlotName:O}=(0,l.useFileDiffInstance)({fileDiff:f,options:u,editorOptions:c,editStateKey:H,metrics:p,lineAnnotations:y,selectedLines:A,prerenderedHTML:S,hasGutterRenderUtility:null!=_,hasCustomHeader:null!=F,disableWorkerPool:b,edit:x,onEditChange:E,onEditComplete:N}),j=(0,n.renderDiffChildren)({fileDiff:f,renderCustomHeader:F,renderHeaderPrefix:L,renderHeaderFilenameSuffix:M,renderHeaderMetadata:P,renderAnnotation:h,renderGutterUtility:_,lineAnnotations:y,getHoveredLine:G,getAnnotationSlotName:O});return(0,s.jsx)(t.DIFFS_TAG_NAME,{ref:v,className:C,style:D,children:(0,o.templateRender)(j,S)})}},1442,[1148,1429,1437,1441,7]);
344
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MultiFileDiff",{enumerable:!0,get:function(){return f}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]);function f({oldFile:f,newFile:u,options:c,editorOptions:H,editStateKey:p,metrics:F,lineAnnotations:y,selectedLines:A,className:C,style:M,prerenderedHTML:S,renderAnnotation:h,renderCustomHeader:D,renderHeaderPrefix:L,renderHeaderFilenameSuffix:P,renderHeaderMetadata:_,renderGutterUtility:b,disableWorkerPool:x=!1,edit:E=!1,onEditChange:N,onEditComplete:v}){const{fileDiff:G,ref:O,getHoveredLine:j,getAnnotationSlotName:T}=(0,l.useFileDiffInstance)({oldFile:f,newFile:u,options:c,editorOptions:H,editStateKey:p,metrics:F,lineAnnotations:y,selectedLines:A,prerenderedHTML:S,hasGutterRenderUtility:null!=b,hasCustomHeader:null!=D,disableWorkerPool:x,edit:E,onEditChange:N,onEditComplete:v}),U=(0,n.renderDiffChildren)({fileDiff:G,renderCustomHeader:D,renderHeaderPrefix:L,renderHeaderFilenameSuffix:P,renderHeaderMetadata:_,renderAnnotation:h,lineAnnotations:y,renderGutterUtility:b,getHoveredLine:j,getAnnotationSlotName:T});return(0,s.jsx)(t.DIFFS_TAG_NAME,{ref:O,className:C,style:M,children:(0,o.templateRender)(U,S)})}},1443,[1148,1429,1437,1441,7]);
345
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PatchDiff",{enumerable:!0,get:function(){return c}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]),f=r(d[5]),u=r(d[6]);function c({patch:n,options:f,editorOptions:c,editStateKey:p,metrics:h,lineAnnotations:y,selectedLines:A,className:C,style:P,prerenderedHTML:S,renderAnnotation:M,renderCustomHeader:D,renderHeaderPrefix:L,renderHeaderFilenameSuffix:_,renderHeaderMetadata:b,renderGutterUtility:x,disableWorkerPool:E=!1,edit:F=!1,onEditChange:N,onEditComplete:v}){const G=H(n),{ref:O,getHoveredLine:j,getAnnotationSlotName:T}=(0,s.useFileDiffInstance)({fileDiff:G,options:f,editorOptions:c,editStateKey:p,metrics:h,lineAnnotations:y,selectedLines:A,prerenderedHTML:S,hasGutterRenderUtility:null!=x,hasCustomHeader:null!=D,disableWorkerPool:E,edit:F,onEditChange:N,onEditComplete:v}),U=(0,o.renderDiffChildren)({fileDiff:G,renderCustomHeader:D,renderHeaderPrefix:L,renderHeaderFilenameSuffix:_,renderHeaderMetadata:b,renderAnnotation:M,lineAnnotations:y,renderGutterUtility:x,getHoveredLine:j,getAnnotationSlotName:T});return(0,u.jsx)(t.DIFFS_TAG_NAME,{ref:O,className:C,style:P,children:(0,l.templateRender)(U,S)})}function H(t){return(0,f.useMemo)(()=>(0,n.getSingularPatch)(t),[t])}},1444,[1148,1421,1429,1437,1441,15,7]);
346
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"UnresolvedFile",{enumerable:!0,get:function(){return f}});var n=r(d[0]),t=r(d[1]),l=r(d[2]),o=r(d[3]),s=r(d[4]);function f({file:f,options:u,lineAnnotations:c,selectedLines:H,className:y,style:M,prerenderedHTML:U,renderAnnotation:p,renderCustomHeader:A,renderHeaderPrefix:C,renderHeaderFilenameSuffix:v,renderHeaderMetadata:F,renderGutterUtility:L,renderMergeConflictUtility:P,disableWorkerPool:_=!1}){const{ref:b,getHoveredLine:h,fileDiff:x,actions:D,getInstance:G}=(0,o.useUnresolvedFileInstance)({file:f,options:u,lineAnnotations:c,selectedLines:H,prerenderedHTML:U,hasConflictUtility:null!=P,hasGutterRenderUtility:null!=L,hasCustomHeader:null!=A,disableWorkerPool:_}),I=(0,t.renderDiffChildren)({fileDiff:x,renderCustomHeader:A,renderHeaderPrefix:C,renderHeaderFilenameSuffix:v,renderHeaderMetadata:F,renderAnnotation:p,renderGutterUtility:L,lineAnnotations:c,getHoveredLine:h,actions:D,renderMergeConflictUtility:P,getInstance:G});return(0,s.jsx)(n.DIFFS_TAG_NAME,{ref:b,className:y,style:M,children:(0,l.templateRender)(I,U)})}},1445,[1148,1429,1437,1446,7]);
347
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"useUnresolvedFileInstance",{enumerable:!0,get:function(){return C}});var n=r(d[0]),t=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]),c=r(d[5]),u=r(d[6]);const f="undefined"==typeof window?u.useEffect:u.useLayoutEffect;function C({file:s,options:C,lineAnnotations:h,selectedLines:y,prerenderedHTML:R,hasConflictUtility:k,hasGutterRenderUtility:v,hasCustomHeader:w,disableWorkerPool:U}){const[{fileDiff:A,actions:b,markerRows:S},D]=(0,u.useState)(()=>{const{fileDiff:n,actions:o,markerRows:l}=(0,t.parseMergeConflictDiffFromFile)(s,C?.maxContextLines);return{fileDiff:n,actions:o,markerRows:l}}),H=(0,l.useStableCallback)((n,t)=>{D(o=>{const{fileDiff:l,actions:s,markerRows:c}=t.resolveConflict(n.conflict.conflictIndex,n.resolution,o.fileDiff)??{};return null==l||null==s||null==c?o:{fileDiff:l,actions:s,markerRows:c}})}),L=void 0!==y,M=(0,u.useContext)(c.WorkerPoolContext),x=(0,u.useRef)(null),F=(0,l.useStableCallback)(n=>{if(null!=n){if(null!=x.current)throw new Error("useUnresolvedFileInstance: An instance should not already exist when a node is created");x.current=new o.UnresolvedFile(p({controlledSelection:L,hasConflictUtility:k,hasCustomHeader:w,hasGutterRenderUtility:v,onMergeConflictAction:H,options:C}),U?void 0:M,!0),x.current.hydrate({fileDiff:A,actions:b,markerRows:S,fileContainer:n,lineAnnotations:h,prerenderedHTML:R})}else{if(null==x.current)throw new Error("useUnresolvedFileInstance: A UnresolvedFile instance should exist when unmounting");x.current.cleanUp(),x.current=null}});return f(()=>{if(null==x.current)return;const t=x.current,o=p({controlledSelection:L,hasConflictUtility:k,hasCustomHeader:w,hasGutterRenderUtility:v,onMergeConflictAction:H,options:C}),l=void 0!==o&&!(0,n.areOptionsEqual)(t.options,o);t.setOptions(o),t.render({fileDiff:A,actions:b,markerRows:S,lineAnnotations:h,forceRender:l}),void 0!==y&&t.setSelectedLines(y)}),{ref:F,getHoveredLine:(0,u.useCallback)(()=>x.current?.getHoveredLine(),[]),fileDiff:A,actions:b,markerRows:S,getInstance:(0,u.useCallback)(()=>x.current??void 0,[])}}function p({options:n,controlledSelection:t,onMergeConflictAction:o,hasConflictUtility:l,hasCustomHeader:c,hasGutterRenderUtility:u}){return Object.assign({},n,{controlledSelection:t,onMergeConflictAction:o,hunkSeparators:"custom"===n?.hunkSeparators?s.noopRender:n?.hunkSeparators,mergeConflictActionsType:l||"custom"===n?.mergeConflictActionsType?s.noopRender:n?.mergeConflictActionsType,renderCustomHeader:c?s.noopRender:void 0,renderGutterUtility:u?s.noopRender:void 0})}},1446,[1256,1402,1400,1426,1428,1431,15]);
348
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.DiffWorkerPool=function({theme:t,children:c}){return(0,s.jsxs)(o.WorkerPoolContextProvider,{poolOptions:{workerFactory:l},highlighterOptions:{theme:(0,n.diffThemeNames)(t)},children:[(0,s.jsx)(h,{theme:t}),c]})};var o=r(d[0]),t=r(d[1]),n=r(d[2]),s=r(d[3]);const l=()=>new(r(d[5]).unstable_createWorker)(new URL(r(d[5]).unstable_resolve(d[4],d.paths),globalThis.__ExpoImportMetaRegistry.url));function h({theme:s}){const l=(0,o.useWorkerPool)();return(0,t.useEffect)(()=>{l?.setRenderOptions({theme:(0,n.diffThemeNames)(s)}).catch(o=>{console.error("diff worker pool: theme not applied",o)})},[l,s]),null}},1447,{"0":1425,"1":15,"2":1108,"3":7,"4":1768,"5":987,"paths":{"1768":"/_expo/static/js/web/diff-worker-b7f0838466311e17f09dece725c3751c.js"}});
349
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ThreadAnnotation=function({thread:c,onEdit:u}){const[h,j]=(0,n.useState)(!c.resolved),f=(0,o.useDraftText)(`reply:${c.id}`),p=c.comments[0],y=c.commentsTotal-c.comments.length,P=(0,n.useMemo)(()=>(0,t.suggestionOriginalLines)(c),[c]);if(!h)return(0,v.jsx)(T,{children:(0,v.jsxs)(s.View,{className:"flex-row flex-wrap items-center gap-xs",children:[(0,v.jsx)(s.Badge,{accent:"success",size:"sm",children:"Resolved"}),(0,v.jsx)(s.Text,{className:"text-sm text-muted",children:`${p?.author.login??"thread"}, ${(0,t.pluralOf)(c.commentsTotal,"comment")}`}),(0,v.jsx)(s.Button,{size:"sm",accent:"neutral",variant:"soft",text:"Show",onPress:()=>{j(!0)}})]})});return(0,v.jsxs)(T,{children:[c.resolved?(0,v.jsxs)(s.View,{className:"flex-row items-center gap-xs",children:[(0,v.jsx)(s.Badge,{accent:"success",size:"sm",children:"Resolved"}),(0,v.jsx)(s.Button,{size:"sm",accent:"neutral",variant:"soft",text:"Hide",onPress:()=>{j(!1)}})]}):null,(0,v.jsx)(x.SuggestionOriginalContext,{value:P,children:c.comments.map(t=>(0,v.jsx)(b,{thread:c,comment:t,onEdit:u},t.id))}),y>0?(0,v.jsx)(s.Text,{className:"text-xs text-muted",children:`${(0,t.pluralOf)(y,"more comment")} on GitHub`}):null,c.viewerCanReply&&void 0!==p?(0,v.jsxs)(s.View,{className:"gap-xs",children:[(0,v.jsx)(w.PullRequestMarkdownInput,{"aria-label":"Reply",value:f.text,onChange:f.setText}),(0,v.jsxs)(s.View,{className:"flex-row flex-wrap items-center justify-end gap-xs",children:[c.resolved&&c.viewerCanUnresolve?(0,v.jsx)(s.Tooltip,{content:"Open the thread again, here and on GitHub",render:t=>(0,v.jsx)(s.ActionButton,Object.assign({},t,{size:"sm",accent:"neutral",variant:"soft",text:"Unresolve",errorMessageVariant:"flat",errorToMessage:l.errorToMessage,onPress:async()=>{await u({kind:"resolveThread",threadId:c.id,resolved:!1})}}))}):null,!c.resolved&&c.viewerCanResolve?(0,v.jsx)(s.Tooltip,{content:"Mark the thread done: it folds, here and on GitHub",render:t=>(0,v.jsx)(s.ActionButton,Object.assign({},t,{size:"sm",accent:"neutral",variant:"soft",text:"Resolve",errorMessageVariant:"flat",errorToMessage:l.errorToMessage,onPress:async()=>{await u({kind:"resolveThread",threadId:c.id,resolved:!0})}}))}):null,(0,v.jsx)(s.ActionButton,{size:"sm",text:"Reply",errorMessageVariant:"flat",errorToMessage:l.errorToMessage,onPress:async()=>{const t=f.text;""!==t.trim()&&(await u({kind:"reply",inReplyTo:p.databaseId,body:t}),f.discard(t))}})]})]}):null]})},e.PendingAnnotation=function({comment:t,draft:l}){const c=`pending:${t.key}`,x=(0,o.useHasDraftText)(c),[h,j]=(0,n.useState)(x),f=(0,o.useDraftText)(c,t.body);return(0,v.jsxs)(T,{children:[(0,v.jsxs)(s.View,{className:"flex-row flex-wrap items-center gap-xs",children:[(0,v.jsx)(s.Badge,{accent:"warning",size:"sm",children:"Pending"}),(0,v.jsx)(s.Text,{className:"text-sm text-muted",children:"sent with your review"})]}),h?(0,v.jsxs)(s.View,{className:"gap-xs",children:[(0,v.jsx)(w.PullRequestMarkdownInput,{"aria-label":"Pending comment",value:f.text,onChange:f.setText}),(0,v.jsxs)(s.View,{className:"flex-row justify-end gap-xs",children:[(0,v.jsx)(s.Button,{size:"sm",accent:"neutral",variant:"soft",text:"Cancel",onPress:()=>{f.discard(),j(!1)}}),(0,v.jsx)(s.Button,{size:"sm",text:"Save",onPress:()=>{""!==f.text.trim()&&(l.update(t.key,f.text),f.discard(),j(!1))}})]})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(u.MarkdownText,{github:!0,text:t.body}),(0,v.jsxs)(s.View,{className:"flex-row gap-xs",children:[(0,v.jsx)(s.Button,{size:"sm",accent:"neutral",text:"Edit",onPress:()=>{j(!0)}}),(0,v.jsx)(s.Button,{size:"sm",accent:"danger",variant:"soft",text:"Delete",onPress:()=>{l.remove(t.key)}})]})]})]})},e.ComposerAnnotation=function({anchor:t,suggestionLines:n,commitId:c,draft:x,onEdit:u,onClose:h}){const f=(0,o.useDraftText)(`inline:${c}:${t.path}:${t.side}:${String(t.startLine??"")}-${String(t.line)}`),p=()=>{f.discard(),h()},b=null===t.startLine?`line ${String(t.line)}`:`lines ${String(t.startLine)} to ${String(t.line)}`,y={path:t.path,side:t.side,line:t.line,startLine:t.startLine,startSide:t.startSide,body:f.text};return(0,v.jsxs)(T,{children:[(0,v.jsx)(s.Text,{className:"text-sm text-muted",children:`Comment on ${b}`}),(0,v.jsx)(w.PullRequestMarkdownInput,{autoFocus:!0,"aria-label":"Comment",value:f.text,onChange:f.setText}),(0,v.jsxs)(s.View,{className:"flex-row flex-wrap items-center gap-xs",children:[null===n?null:(0,v.jsx)(s.Tooltip,{content:"Insert the selected lines as a suggested change, which can then be committed to the branch, from here or GitHub",render:t=>(0,v.jsx)(s.Button,Object.assign({},t,{size:"sm",accent:"neutral",text:"Suggestion",onPress:()=>{f.setText(`${f.text}${""===f.text?"":"\n"}${(0,j.suggestionBlock)(n)}`)}}))}),(0,v.jsxs)(s.View,{className:"ml-auto flex-row flex-wrap items-center justify-end gap-xs",children:[(0,v.jsx)(s.Button,{size:"sm",accent:"neutral",variant:"soft",text:"Cancel",onPress:p}),null===x?null:(0,v.jsx)(s.Tooltip,{content:"Keep the comment pending: it is sent with your review, from Review changes",render:t=>(0,v.jsx)(s.Button,Object.assign({},t,{size:"sm",accent:"neutral",text:x.hasPending?"Add review comment":"Start a review",onPress:()=>{""!==f.text.trim()&&(x.add(y),p())}}))}),(0,v.jsx)(s.Tooltip,{content:"Post this comment now, on its own, outside any review",render:t=>(0,v.jsx)(s.ActionButton,Object.assign({},t,{size:"sm",text:"Add single comment",errorMessageVariant:"flat",errorToMessage:l.errorToMessage,onPress:async()=>{""!==y.body.trim()&&(await u({kind:"inlineComment",commitId:c,comment:y}),f.discard(y.body),h())}}))})]})]})]})};var t=r(d[0]),s=r(d[1]),n=r(d[2]),o=r(d[3]),l=r(d[4]),c=r(d[5]),x=r(d[6]),u=r(d[7]),h=r(d[8]),j=r(d[9]),w=r(d[10]),f=r(d[11]),p=r(d[12]),v=r(d[13]);function T({children:t}){return(0,v.jsx)(s.View,{className:"p-xs",children:(0,v.jsx)(s.View,{className:"min-w-0 gap-sm rounded-sm border border-border-muted p-m",children:t})})}function b({thread:t,comment:n,onEdit:o}){return(0,v.jsxs)(s.View,{className:"gap-xs",children:[(0,v.jsxs)(s.View,{className:"flex-row flex-wrap items-center gap-xs",children:[(0,v.jsx)(h.PersonAvatar,{person:n.author}),(0,v.jsx)(s.Text,{className:"text-sm font-body-bold",children:n.author.login}),(0,v.jsx)(s.ExternalLinkText,{size:"sm",href:n.url,text:(0,c.formatDataAge)(n.createdAt)})]}),""===n.body.trim()?null:(0,v.jsx)(u.MarkdownText,{github:!0,text:n.body}),(0,v.jsx)(p.SuggestionActions,{thread:t,comment:n}),(0,v.jsx)(f.PullRequestReactions,{subject:n,onEdit:o})]})}},1448,[903,64,15,945,956,948,1085,1047,966,1449,995,1091,1106,7]);
350
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"annotationSideOf",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"anchorOfRange",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"rightSideLines",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"isLineInPatch",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"suggestionBlock",{enumerable:!0,get:function(){return f}});const n=n=>"RIGHT"===n?"additions":"deletions",t=n=>"additions"===n?"RIGHT":"LEFT",o=(n,{start:o,end:u,side:l="additions",endSide:s})=>{const c=s??l,f=l===c&&o>u,S=f?u:o,b=f?o:u,p=S===b&&l===c;return{path:n,side:t(c),line:b,startLine:p?null:S,startSide:p?null:t(l)}},u=n=>n.replace(/\r?\n$/,""),l=(n,t)=>{const o=n.hunks.find(({additionStart:n,additionCount:o})=>t>=n&&t<n+o);if(void 0===o)return null;const l=n.additionLines[o.additionLineIndex+t-o.additionStart];return void 0===l?null:u(l)},s=(n,t)=>{if("RIGHT"!==t.side)return null;if(null!==t.startSide&&"RIGHT"!==t.startSide)return null;const o=[];for(let u=t.startLine??t.line;u<=t.line;u+=1){const t=l(n,u);if(null===t)return null;o.push(t)}return o},c=(n,t,o)=>n.hunks.some(n=>"RIGHT"===t?o>=n.additionStart&&o<n.additionStart+n.additionCount:o>=n.deletionStart&&o<n.deletionStart+n.deletionCount),f=n=>`\`\`\`suggestion\n${n.join("\n")}\n\`\`\``},1449,[]);